开发者

why does the module start from address 0xbf000000

开发者 https://www.devze.com 2023-02-25 09:33 出处:网络
i use insmod hello.ko to launched the module which i buil开发者_StackOverflow社区d. and use the lsmod to look up this module.Then i found a strange issue, i saw the module start from address 0xbf00000

i use insmod hello.ko to launched the module which i buil开发者_StackOverflow社区d. and use the lsmod to look up this module.Then i found a strange issue, i saw the module start from address 0xbf000000. As i known, the kernel address start from 0xc0000000, the driver module is a part of the kernel.But its address is in the user space.This`s quit odd.

BTW it`s on the ARM platform .


The scheme under which all kernel code resides at virtual address 0xc0000000 is actually only limited to x86 and even there only when using the default config option of 3:1 memory address split between user space and kernel.

On Arm, the virtual memory space addressing scheme is different and kernel loadable modules are mapped from the constants TASK_SIZE to PAGE_OFFSET-1, where PAGE_OFFSET is the address where a direct 1:1 mapping of physical memory begins.

For a full accord of what goes where in Arm, see this document: http://www.arm.linux.org.uk/developer/memory.txt

It also resides somewhere in the Documentation directory of the Linux kernel under the Arm sub-directory, which is a good place to look for answers for such questions for other architectures :-)

0

精彩评论

暂无评论...
验证码 换一张
取 消