A question about kernel real-mode code's LMA & VMA
落痕
losemyheaven at qq.com
Sat May 7 02:40:27 EDT 2016
Hi,
The following is extracted from Documentation/x86/boot.txt,
which show's memory map when booting a kernel.
117 ~ ~ 118 | Protected-mode kernel | 119 100000 +------------------------+ 120 | I/O memory hole | 121 0A0000 +------------------------+ 122 | Reserved for BIOS | Leave as much as possible unused 123 ~ ~ 124 | Command line | (Can also be below the X+10000 mark) 125 X+10000 +------------------------+ 126 | Stack/heap | For use by the kernel real-mode code. 127 X+08000 +------------------------+ 128 | Kernel setup | The kernel real-mode code. 129 | Kernel boot sector | The kernel legacy boot sector. 130 X +------------------------+ 131 | Boot loader | <- Boot sector entry point 0000:7C00 132 001000 +------------------------+ 133 | Reserved for MBR/BIOS | 134 000800 +------------------------+ 135 | Typically used by MBR | 136 000600 +------------------------+ 137 | BIOS use only | 138 000000 +------------------------+where the address X is as low as the design of the boot loader 141 permits.
The address X is not determined by kernel, so the kernel real-mode code's VMA may not equal to LMA, how kernel solved it??
One more question, in ld script, does the location counter ".", represent VMA??
Thanks.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20160507/2f52d155/attachment.html
More information about the Kernelnewbies
mailing list