Re: [PATCH v3 11/12] x86, boot: add fields to support load bzImageand ramdisk high

From: Yinghai Lu
Date: Thu Nov 22 2012 - 17:13:16 EST


On Thu, Nov 22, 2012 at 1:02 PM, H. Peter Anvin <hpa@xxxxxxxxx> wrote:
> On 11/22/2012 12:50 PM, H. Peter Anvin wrote:
>>
>> The limit is 0x280, not 0x290, or -- better -- you can use the byte at
>> 0x201 to get the size.
>>
>
> Not doing so would be wrong, in fact.

+ if (!real_mode_entry) {
+ unsigned long end;
+ /* clear value before header */
+ memset(real_mode, 0, 0x1f1);
+ /* clear value after setup_header */
+ end = *((unsigned char *)real_mode + 0x201);
+ end += 0x202;
+ memset((unsigned char *)real_mode + end, 0, kern16_size - end);
+ }
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/