[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <m1absjpr6w.fsf@ebiederm.dsl.xmission.com>
Date: Wed, 22 Aug 2007 08:41:27 -0600
From: ebiederm@...ssion.com (Eric W. Biederman)
To: Andi Kleen <ak@...e.de>
Cc: Yinghai Lu <yhlu.kernel@...il.com>,
"H. Peter Anvin" <hpa@...or.com>,
"Huang, Ying" <ying.huang@...el.com>,
Andrew Morton <akpm@...ux-foundation.org>,
Chandramouli Narayanan <mouli@...ux.intel.com>,
linux-kernel@...r.kernel.org, Aaron Durbin <adurbin@...gle.com>
Subject: Re: [PATCH 0/3] x86_64 EFI runtime service support
Andi Kleen <ak@...e.de> writes:
> On Tue, Aug 21, 2007 at 11:43:38PM -0700, Yinghai Lu wrote:
>> On 8/21/07, Andi Kleen <ak@...e.de> wrote:
>> > > current LinuxBIOS's path: the elfboot in LinuxBIOS will prepare the
>> > > e820 table, and jump to startup_32 in kernel. is that not good and
>> > > simple?
>> >
>> > The problem is that the zero page cannot be changed at all in this
>> > setup. Or rather it can be only changed by breaking LinuxBios.
>>
>> So you want to construct e820 table in x86_boot_params from LinuxBIOS
>> memmap in head64.c?
>
> The short term fix is probably to just add a version number to
> the zero page and make sure new changes only add stuff to the
> end and the kernel has reasonable compat code for old versions.
>
> Then LinuxBIOS would need to be changed to supply that version number.
To clear up a small misconception. It isn't LinuxBIOS but the LinuxBIOS
bootloaders that need to be changed. A subtle distinction.
> Perhaps it could also include a checksum just to detect old BIOS
> that don't supply a version number.
>
> Long term I'm not sure. Adding LinuxBIOS specific tables also doesn't
> sound very attractive.
Second thinking of this as the empty_zero_page is probably the wrong
mental model of how things work.
At least until HPA's recent changes bzImage is organized as follows:
bootsector (512 bytes)
Various boot protocol variables.
Some filled in or read by bootloaders
some filled in by the real mode code.
real mode code.
32bit Data+Code to load at 1MB.
The empty zero page really is the first 4K or whatever of
the current setup.S. Any sane bootloader loading the bzImage
will just load the 16bit portion and overwrite the variables
it knows how to fill in.
To ensure there was enough space the code did:
> trampoline: call start_of_setup
> .align 16
> # The offset at this point is 0x240
> .space (0xeff-0x240+1) # E820 & EDD space (ending at 0xeff)
We already have the boot protocol revision and if this is something we
are going to support that should be enough of a revision field. If
the bootloader can't support what the kernel is doing the bootloader
should just give up. We have major and minor fields there so we can
distinguish between compatible and incompatible changes as well.
Further that arrangement ensures all of the data fields are initialized.
Further there is no 4K limit when used that way except as a convention
and as an implementation detail. The bootloaders don't care. The
have to load all of the 16bit real mode section.
I need to review HPA changes a little more from his rewrite in C.
I think he messed up with the guarantee of initialization in that
rewrite, but I'm not quite certain.
Eric
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists