Monday, December 8, 2008

why should we do memory remapping in ARM7

Most ARM cores support two vector locations 0x0 or 0xFFFF0000, controlled via a signal sampled at reset and a bit in CP15. Lets say that the core is configured to have its vectors at 0x0, then as the core comes out of reset it will start fetching instructions from 0x0. There has to some valid code at this position. So generally you would require to have a nonvolatile memory at this location.

For eg you can palce ROM at 0x0.

The problem with ROM is that it is normally slower than RAM. Also your vector table will then sit in ROM. This is a bad idea beacuse when an IRQ occurs it will it will relatively take a long time to fetch the instruction in the IRQ entry of the vector table.

So solve this problem, it is suggested to do memory remap so that when the processor
jumps to 0x0, it is redirected to the ROM. The Code is the Copied to the RAM and system jumps to RAM (eg in __main) where vector table is copied.

0 comments:

Post a Comment