lkml.org 
[lkml]   [2005]   [Jun]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: mabye simple,but i confused
On Thu, 16 Jun 2005, guorke wrote:

> in understangding the linux kernel, the authors says
> "..Moves itself from address 0x00007c00 to address 0x00090000.."
>
> What i confused is why the Boot Loader do this, i asked google,but
> still no answe.
> who can make me understand it ?
> Thanks.

The IBM 'IPL' (initial program load) address was specified to be
at 7c00. There was room here for only one "sector", which in the
early days was 512 bytes. The very first sector, the boot sector,
was loaded into this address and then execution was started at
a specified offset so that this boot code could load the rest
of the operating system. To load the rest of the operating system,
one needs to move the boot-code to somewhere it won't get
overwritten by subsequent reads from the disk.

To load Linux, the boot developers wanted to load code 64k at
a time. The only address in real-mode, that was guaranteed to
not be in use, where the boot code could load a whole 64k was
at 90000 hex. This provides a buffer from which the boot-loader
can copy 64k at a time into the protected-mode address space
starting at 0x00100000. The boot-loader uses real-mode BIOS
services to copy the code to the 1 megabyte address which can't
be reached in real mode.
Cheers,
Dick Johnson
Penguin : Linux version 2.6.11.9 on an i686 machine (5537.79 BogoMips).
Notice : All mail here is now cached for review by Dictator Bush.
98.36% of all statistics are fiction.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-06-16 14:35    [from the cache]
©2003-2011 Jasper Spaans