login
Header Space

 
 

Trying to understand the I386 Boot Protocol and relate header.S to it

June 22, 2008 - 1:27pm
Submitted by Anonymous on June 22, 2008 - 1:27pm.
Linux

I am trying to relate the code in the header.S file for rev 2.6.24.4 of the kernel with the I386 Boot Protocol written by H. Peter Anvin.

I have some questions that I hope you can clear up.

1. In the header.S file BOOTSEG is #defined as 0x07C0. I take that this is an indication to a linear address? If it is a linear address then how does the Boot sector entry point at 0000:7C00 relate to this value? In the BIG FAT NOTE at the beginning of the header.S file to get from a segment address to a linear address one must multiply with 16. However this look more like dividing the segment address by 16 to get the linear address?

2. The I382 Boot Protocol talks about the header at offset 0x01f1. In relation to the typical memory map for the kernel loader from what address is this an offset from? Is it memory address 000000 or possibly 007C00?

Thanks,
Franz

7C00

June 23, 2008 - 12:56am

07C0 * 10 = 7C00, hence 07C0:0000 = 0000:7C00, i.e. segment 07C0 is indeed the boot sector entry point. of course the inverse of this multiplication is division, i.e. to get the operand for the multiplication you have to divide.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
speck-geostationary