lkml.org 
[lkml]   [2013]   [Jan]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH v7u1 22/31] x86, boot: add fields to support load bzImage and ramdisk above 4G
From
On Mon, Jan 14, 2013 at 12:05 PM, Borislav Petkov <bp@alien8.de> wrote:
> On Mon, Jan 14, 2013 at 10:57:08AM -0800, Yinghai Lu wrote:
>> please check if following is enough?
>>
>> + /*
>> + * kernel have sentinel to set as 0xff in setup link scripts,
>> + * so if bootloader just copy whole page from kernel image to
>> + * get setup_header instead of clearing boot_param buffer and
>> + * copying setup_header only, will leave sentinel as 0xff.
>> + * With that, we can tell some fields in boot_param have
>> + * invalid values, and we need to zero them in kernel.
>> + */
>> + __u8 sentinel; /* 0x1ef */
>
> "The sentinel variable is set by the linker script to 0xff. If a
> bootloader doesn't know about this variable and just copies the
> setup_header portion and doesn't clear the boot_params buffer as it is
> supposed to, it will leave the sentinel to its initial value of 0xff.

no, no, no.

bootloader does not need to know sentinel, and they only need to do:
clearing boot_param buffer and copying setup_header only

even new bootloader is not supposed to know sentinel ...


>
> This tells the kernel that some fields in boot_params have invalid
> values and we have to zero them out in the kernel."


\
 
 \ /
  Last update: 2013-01-14 22:02    [W:0.323 / U:0.704 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site