Re: [PATCH 5/5] x86_64 EFI support -v3: EFI document

From: Huang, Ying
Date: Wed Aug 08 2007 - 04:18:30 EST


On Tue, 2007-08-07 at 11:54 +0200, Andi Kleen wrote:
> On Tuesday 07 August 2007 11:29:44 Huang, Ying wrote:
>
> > > How does EFI handle 32bit/64bit compatibility? In particular
> > > how do I load a 32bit kernel on machine with a 64bit EFI? Can
> > > it be done?
> > >
> > Because the EFI memory map is converted to E820 map in bootloader now,
> > it is possible to load 32bit kernel on machine with a 64bit EFI.
>
> The 32bit EFI code doesn't know this yet, does it?

The needed code changing is minimal. In fact, I can boot 32bit Linux
kernel on my x86_64 EFI machine. With setup as follow:

1. Apply the efi-fb.patch
2. make efi fb driver not depend on EFI
3. configure kernel as follow:
a. CONFIG_EFI is turned off
b. CONFIG_FB_EFI is turned on

> > But it
> > is almost impossible to call EFI runtime service in 32bit kernel. But I
> > think EFI runtime service is not essential in this situation, because
> > the raw hardware can be used too.
>
> That doesn't sound good. Is this really supposed to work this way?
>
> If the raw hardware works why are we using EFI services at all?
> We generally trust hardware more than BIOSes.
>
> Might we end up with machines that only boot with the 64bit kernel?
>
> Will systems have a dual EFI implementation?

I don't know. But I can ask some EFI guys about this.

> Also long term I would like to use a few useful EFI services,
> like the support to put some data into the CMOS area to survive
> a reboot. That would be quite useful for panics and oopses.
> But we would prefer to have that on 32bit too.

Yes, although oopses and panics information can be saved though kdump
too, it is more convenient to use EFI variable services to store
information like that especially for ordinary user.

Best Regards,
Huang Ying
-
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/