ARM linux内核启动时几个关键地址

本文详细介绍了ARM Linux内核启动时涉及的几个关键地址:ZTEXTADDR、ZRELADDR、TEXTADDR、PHYS_OFFSET和PAGE_OFFSET。ZTEXTADDR是解压代码的开始地址,ZRELADDR是内核在RAM中的地址。内核启动的虚拟地址TEXTADDR由PAGE_OFFSET和TEXTOFFSET设定。文中还探讨了如何通过bootp.lds、Makefile和vmlinux.lds确定这些地址,并解析了内核启动过程和自引导阶段的工作原理。
摘要由CSDN通过智能技术生成

ARM linux内核启动时几个关键地址

 

1.       内核启动地址
1.1.   名词解释
ZTEXTADDR

解压代码运行的开始地址。没有物理地址和虚拟地址之分,因为此时MMU处于关闭状态。这个地址不一定时RAM的地址,可以是支持读写寻址的flash等存储中介。

Start address of decompressor. here's no point in talking about virtual or physical addresses here, since the MMU will be off at the time when you call the decompressor code. You normally call   the kernel at this address to start it booting. This doesn't have to be located in RAM, it can be in flash or other read-only or      read-write addressable medium.

      

ZRELADDR

       内核启动在RAM中的地址。压缩的内核映像被解压到这个地址,然后执行。

This is the address where the decompressed kernel will be written, and eventually executed. The following constraint must be valid:

              __virt_to_phys(TEXTADDR) == ZRELADDR

       The initial part of the kernel is carefully coded to be position independent.

TEXTADDR

       内核启动的虚拟地址,与ZRELADDR相对应。一般内核启动的虚拟地址为RAM的第一个bank地址加上0x8000。

       TEXTADDR = PAGE_OFFSET + TEXTOFFST

       Virtual start address of kernel, normally PAGE_OFFSET + 0x8000.This is where the kernel image ends up. With the latest kernels, it must be located at 32768 bytes into a 128MB region. Previous kernels placed a restriction of 256MB here.

TEXTOFFSET

       内核偏移地址。在arch/arm/makefile中设定。

PHYS_OFFSET

       RAM第一个bank的物理起始地址。

Physical start address of the first bank of RAM.

PAGE_OFFSET

RAM第一个bank的虚拟起始地址。

       Virtual start address of the first bank of RAM. During the kernel

       boot phase, virtual address PAGE_OFFSET will be mapped to physical

       address PHYS_OFFSET, along with any other mappings you supply.

       This should be the

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值