开发BSP时,对romInit.s中remap的疑惑,请求解答!!!
[复制链接]
在开发arm926的BSP,在romInit.s中,对remap部分有点疑惑:比如在remap之前,系统上电后,ROM地址是0,SDRAM地址是0x30000000;而在remap后,ROM地址是0x30000000,SDRAM变为0
疑惑1:那么在Makefile或者config.h中,定义ROM_BASE_ADRS,RAM_LOW_ADRS等地址时,是应该按照remap之前的地址来定义呢,还是remap之后的来定义呢?
疑惑2:在romInit.s中,看范例at91sam9260的代码中,是跳转到HiPosn后,才进行的remap,而且代码还加了2段注释: -------------------------------- /* * Jump to the normal (higher) ROM Position. After a reset, the * ROM is mapped into memory from location zero upwards as well * as in its normal position at This code could be executing in * the lower position. We wish to be executing the code, still * in ROM, but in its normal (higher) position before we remap * the machine so that the ROM is no longer dual-mapped from zero * upwards, but so that RAM appears from 0 upwards. */
LDR r1, L$_HiPosn /* to check with the emulator what is loaded into PC */ LDR pc, L$_HiPosn /* <=> mov pc,r1 */
HiPosn: /*
* We are now executing in the normal (higher, still in ROM)
* position in the memory map. Remap memory to post-reset state,
* so that the ROM is not now dual-mapped to zero upwards, but
* RAM is mapped from zero, instead.
*/ /* todo: remap code base on your HW */
-------------------------------- 对注释里的ROM(higher)和ROM(lower),dual-mapped等没看明白是什么意思。。
请教有经验的同行给看看,非常感谢哈!!!
|