lkml.org 
[lkml]   [2009]   [Apr]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: Linux image boot
From
Hey thanks roland,

the link is just what I was interested in. So GRUB does that loading
back and forth around
first 1 MB. I just looked at article:

http://duartes.org/gustavo/blog/post/how-computers-boot-up

and it says that there:
------------------------------------------------------------------------------
There’s a complication worth mentioning (aka, I told you this thing is
hacky). The image for a current Linux kernel, even compressed, does
not fit into the 640K of RAM available in real mode. My vanilla Ubuntu
kernel is 1.7 MB compressed. Yet the boot loader must run in real mode
in order to call the BIOS routines for reading from the disk, since
the kernel is clearly not available at that point. The solution is the
venerable unreal mode. This is not a true processor mode (I wish the
engineers at Intel were allowed to have fun like that), but rather a
technique where a program switches back and forth between real mode
and protected mode in order to access memory above 1MB while still
using the BIOS. If you read GRUB source code, you’ll see these
transitions all over the place (look under stage2/ for calls to
real_to_prot and prot_to_real). At the end of this sticky process the
loader has stuffed the kernel in memory, by hook or by crook, but it
leaves the processor in real mode when it’s done.
------------------------------------------------------------------------------

Thanks again,

Dragoslav Zaric
[Programmer; M Sc Astrophysics]
--
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: 2009-04-16 12:21    [W:0.043 / U:0.896 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site