板级移植的几个变量解释
/********************************************************************/
LOAD_ADDR就是zImage中解压缩代码的RAM偏移地址
——————————————————————————————
ZTEXTADDR就是解压缩代码的RAM偏移地址,这里看到指定ZTEXTADDR的地址为0,是物理地址
We now have a PIC decompressor implementation. Decompressors running
# from RAM should not define ZTEXTADDR. Decompressors running directly
# from ROM or Flash must define ZTEXTADDR (preferably via the config)
# FIXME: Previous assignment to ztextaddr-y is lost here. See SHARK
——————————————————————————————
ZRELADDR是内核ram启动的偏移地址,物理地址
在内核文档kernel/Document/arm/Booting 文件中有:
Calling the kernel image
Existing boot loaders: MANDATORY
New boot loaders: MANDATORY
There are two options for calling the kernel zImage. If the zImage is stored in flash, and is linked correctly to be run from flash, then it is legal for the boot loader to call the zImage in flash directly.
The zImage may also be placed in system RAM (at any location) and called there. Note that the kernel uses 16K of RAM below the image to store page tables. The recommended placement is 32KiB into RAM.
看来在image下面用了32K(0x8000)的空间存放内核页表,
0x30008000就是2410的内核在RAM中的启动地址,这个地址就是这么来的。
——————————————————————————————
TEXT_START是内核ram启动的偏移地址,这个地址是物理地址
——————————————————————————————
LOAD_ADDR就是zImage中解压缩代码的ram偏移地址
——————————————————————————————
TASK_SIZE定义了虚拟地址的上限,即3GB(0xc0000000),带MMU的ARM采用地址映射,对32位的CPU,虚拟空间的容量为4G,最高1G为内核空间即系统空间,而底3GB则为用户空间,系统所有的进程都共享系统空间,但是各有自己的用户空间。这些定义在:include/asm-arm/arch-pxa/memory.h
——————————————————————————————
PHYS_OFFSET定义了内存的物理地址
/******************************************************
参考资料:
Porting the Linux Kernel to a New ARM Platform
Porting Linux to a New ARM Platform
阅读(1525) | 评论(0) | 转发(0) |