EmbeddedRelated.com
Forums
The 2024 Embedded Online Conference

memory remap

Started by Tutu January 19, 2007
What is meant by remapping of memory. I occasionaly read this term
during the initialisation sequence of any microcontroller, but never
understood. Can someone throw some light ?

"Tutu" <bytespedition@googlemail.com> wrote in message 
news:1169253737.342366.241770@38g2000cwa.googlegroups.com...
> What is meant by remapping of memory. >
In the early days of micros (circa late 1970s) it referred to problem of CPUs (most commonly the 8080/Z80 variety) that used 0x0000 as the restart/power up address. This required a ROM in low memory, but that was also the location of the interrupt/RST vectors, which often had to be modified by programs. One solution was to boot up in the ROM when reading, but to a RAM when writing at the same address. It was then possible to copy the ROM to itself, in effect making a RAM image of the boot ROM. An I/O port was then used to switch bus reads to RAM. The ROM was mapped out of the processor address space. You can still see this feature on the current Zilog eZ80 family of processors. You may also be referring to more modern CPUs that have an integral memory management unit (MMU). RAM regions that may be fragmented in the physical address space (for instance the many ARM7 variants where peripherals and buses are memory mapped) can be remapped by the MMU into one large and contiguous program address space. The MMU can also be used to map out peripherals for user programs, protecting them from crashes. Jack Peacock
Tutu wrote:
> What is meant by remapping of memory. I occasionaly read this term > during the initialisation sequence of any microcontroller, but never > understood. Can someone throw some light ?
It's any process that has the same memory (including its contents) end up visible under a different address than it was before. This can be done either by a memory management unit (MMU) built into the CPU, or by external logic circuitry if the memory is external, too. A very simple example would be a port pin controlling an inverter spliced into one of the address lines of an external memory bus. Toggle the pin, and two areas of memory trade places in address space. You've thus changed the mapping from CPU addresses to physical memory cells, i.e. you've "re-mapped" memory.

On Jan 22, 4:20 am, Hans-Bernhard Br=F6ker <HBBroe...@t-online.de>
wrote:
> Tutu wrote: > > What is meant by remapping of memory. I occasionaly read this term > > during the initialisation sequence of any microcontroller, but never > > understood. Can someone throw some light ?It's any process that has the=
same memory (including its contents) end
> up visible under a different address than it was before. > > This can be done either by a memory management unit (MMU) built into the > CPU, or by external logic circuitry if the memory is external, too. A > very simple example would be a port pin controlling an inverter spliced > into one of the address lines of an external memory bus. Toggle the > pin, and two areas of memory trade places in address space. You've thus > changed the mapping from CPU addresses to physical memory cells, i.e. > you've "re-mapped" memory.
I can give another scenario.Some DSP processors (TI) have their own internal Boot ROM (Primary Bootloader) code that will get copied to the address where you will be placing your interrupt vector tables of your bootloader(secondary bootloader) & application. In that case you may need ot re-map (shift) the address of Reset Vector (Virtual - Physical Mapping) so that it doesnt get overwritten during the initial boot process of the processor. (Otherwise, your IVT will be overwritten and your Bootloader & application will not Come Up ). Karthik Balaguru

The 2024 Embedded Online Conference