[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: Kernel using LZMA compression

On 11/04/2009 06:37 PM, Ikem Krueger wrote:
I am reading between the lines here (I have never looked at this
stuff in Xen) but I would assume it's for the reason given above.
The kernel's own decompression routines must run very early on in
the boot process - well before the first line of C code runs and
while the CPU (on x86) is still running in legacy real addressing
mode (right after the handover from the bootloader and relocation
of the kernel image).

Ok. Sounds plausible. How is it to seperate the routines? Can they
brought from "legacy mode" to "real mode"?

Quite tricky I'd guess - it's chicken-and-egg. The code to switch the
CPU from real mode to protected mode is in the kernel's startup routines
*inside* the compressed image.

I don't think anyone is going to want to reorganise things to move that code to the primitive early-boot period - the idea is to do as little as possible in that part of the kernel and leave everything else to later in the boot process when life gets easier.

Decompressing the kernel is always going to be done in that part of the startup sequence because that's when it has to happen.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]