lkml.org 
[lkml]   [2008]   [Apr]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCHv3 1/3] x86: use ELF format in compressed images.
Yinghai Lu wrote:
> On Sun, Apr 6, 2008 at 9:38 AM, H. Peter Anvin <hpa@zytor.com> wrote:
>> Yinghai Lu wrote:
>>
>>> so will cost every bzImage extra memory copy? that could be 18M or
>>> even more big.
>>>
>> I wouldn't worry about that. You will typically have several copies of the
>> images during the execution of the boot loader.
>
> i put all drivers needed in kernel.
> 1. bootloader copy bzImage (6M) to memory
> 2. arch/x86/boot/compressed/head_32.S, will copy bzImage to end of
> buffer to do uncompress on possiton.
> 3. parse_elf will copy the vmlinux (the uncompressed, that is some big, 18M)
>
> I suggest that could have special elf header, and will only have one
> PT_LOAD, and avoid the copy, and just offset start address of
> uncompressed kernel for jump later.

Once again, I think you will have a hard time measuring the time difference.

The start address of the uncompressed kernel is defined at compile time.
Typically it is set based on alignment constraints in the hardware;
for x86-32 is is normally 1 MB but for reasonably large hardware 16 MB
is better (in fact, I have proposed making 16 MB the default.) Recovery
kernels are frequently compiled with completely different addresses.

With your proposal, this would no longer be possible to be a
configurable option, which would be a major loss -- a major loss of
functionality for a small fraction of time at bootup time (which is
almost certainly dwarfed by all the other copying and initialization
that happens at boot time.)

-hpa


\
 
 \ /
  Last update: 2008-04-06 19:33    [W:1.397 / U:0.296 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site