Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

why does the module start from address 0xbf000000

i use insmod hello.ko to launched the module which i build. 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 .

like image 500
Sim Sun Avatar asked Jun 08 '26 05:06

Sim Sun


1 Answers

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 :-)

like image 129
gby Avatar answered Jun 10 '26 06:06

gby



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!