Re: [PATCH 0/3] x86_64 EFI runtime service support

Huang, Ying
2007-08-23T02:21:04Z

On Thu, 2007-08-23 at 00:28 +0800, H. Peter Anvin wrote:
> huang ying wrote:
> >
> > My proposal: Use Peter proposed "linked list of struct setup_data"
> > style boot protocol as long term goal.
> >
> > To smooth the transforming process, the following back compatible
> > scheme can be taken:
> >
> > 1. Keep zero page as an informal external boot protocol, and marked
> it
> > as deprecated for external usage.
> > 2. Add a magic number to standard boot protocol, which is set by
> > bootloader to indicate the new style or old style boot protocol is
> > used.
> > 3. Add the pointer to "linked list of struct setup_data" to standard
> > boot protocol.
> > 4. If kernel is booted with correct magic number, the kernel will
> > convert "linked list" to zero page, or use "linked list" directly.
> If
> > kernel is booted with incorrect magic number, the kernel will use
> the
> > "zero page" from bootloader or convert "zero page" to "linked list".
> >
> You're making it needlessly complicated.

My intention is that we have 3 possible schemes for kernel to use boot
information.

1. Use "linked list" only. Then if booted with old bootloader which uses
"zero page" protocol, the "zero page" information provided by bootloader
should be converted to "linked list" for other part of kernel to use.

2. Use "zero page" only. Then if booted with new bootloader which
provides "linked list" but not "zero page", the "linked list"
information provided by bootloader should be converted to "zero page"
for other part of kernel to use.

3. Use "zero page" + "linked list". Then if booted with old bootloader,
the "linked list" is empty. If booted with new bootloader, both the
"zero page" and "linked list" are used.

We need to choose one from schemes above.

- The scheme 1 appears the most clean one.
- The scheme 2 has 4k "zero page" constraint, so it is not good.
- The scheme 3 is easiest to be implemented.

Personally, I prefer the scheme 1. But the scheme 3 is OK too.

Best Regards,
Huang Ying