http://kerneltrap.org/node/6884Linux: Linus On The Extensible Firmware Interfaceon July 26, 2006 - 11:45am
A recent patch posted to the lkml contained the following description, "this patch adds an efi e820 memory mapping", in response to which Andrew Morton [interview] asked, "why?". Linus Torvalds offered his views on EFI, the Extensible Firmware Interface beginning by describing it as "this other Intel brain-damage (the first one being ACPI)". EFI is a replacement for BIOS, originally designed for use on the ia64 architecture though since adopted by other computers, including Apple's Intel-based Macs. Linus went on to explain, "the original EFI code in the kernel basically duplicates all the BIOS interfaces (ie everything that looks at a memory map comes in two varieties: the normal and tested BIOS e820 variety, and the usually broken and hacked-up EFI memory map variety). Translating the EFI memory map to e820 is very much the sane thing to do". Linus continued in a followup email, "don't get me wrong - the problem with EFI is that it actually superficially looks much better than the BIOS, but in practice it ends up being one of those things where it has few real advantages, and often just a lot of extra complexity because of the 'new and improved' interfaces that were largely defined by a committee." He went on, "so EFI has this cool shell, a loadable driver framework, and other nice features. Where 'nice' obviously means 'much more complex than the simple things they designed in the late seventies back when people were stupid and just wanted things to work'. Of course, it's somewhat questionable whether people have actually gotten smarter or stupider in the last 30 years. It's not enough time for evolution to have increased our brain capacity, but it certainly _is_ enough time for most people to no longer understand how hardware works any more." As for BIOS, Linus noted, "not that I'd ever claim that the BIOS is wonderful either, but at least everybody knows that the BIOS is just a bootloader, and doesn't try to make it anything else." From: Andrew Morton [email blocked] Subject: Re: [PATCH 1/1] Add efi e820 memory mapping on x86 [try #1] Date: Mon, 24 Jul 2006 21:29:11 -0700
On Sun, 16 Jul 2006 10:55:30 +0200
Edgar Hucek [email blocked] wrote:
> This Patch add an efi e820 memory mapping.
>
Why?
> /*
> + * Make a e820 memory map
> + */
> +void __init efi_init_e820_map(void)
> +{
> + efi_memory_desc_t *md;
> + unsigned long long start = 0;
> + unsigned long long end = 0;
> + unsigned long long size = 0;
I guess these should have type resource_size_t, given that they ultimately
get remembered via request_resource(). But that has a good chance of
breaking something, so let's leave it alone.
> + add_memory_region(md->phys_addr, md->num_pages <<
> EFI_PAGE_SHIFT, E820_ACPI);
The patch is wordwrapped and will not apply.
From: Linus Torvalds [email blocked]
Subject: Re: [PATCH 1/1] Add efi e820 memory mapping on x86 [try #1]
Date: Mon, 24 Jul 2006 22:32:17 -0700 (PDT)
On Mon, 24 Jul 2006, Andrew Morton wrote:
>
> > This Patch add an efi e820 memory mapping.
> >
>
> Why?
EFI is this other Intel brain-damage (the first one being ACPI). It's
totally different from a normal BIOS, and was brought on by ia64, which
never had a BIOS, of course.
Sadly, Apple bought into the whole "BIOS bad, EFI good" hype, so we now
have x86 machines with EFI as the native boot protocol.
The original EFI code in the kernel basically duplicates all the BIOS
interfaces (ie everything that looks at a memory map comes in two
varieties: the normal and tested BIOS e820 variety, and the usually broken
and hacked-up EFI memory map variety).
Translating the EFI memory map to e820 is very much the sane thing to do,
and should have been done by ia64 in the first place. Sadly, EFI people
(a) think that their stinking mess is better than a BIOS and (b) are
historically ia64-only, so they didn't do that, but went the "we'll just
duplicate everything using our inferior EFI interfaces" way.
Edgars patch looks fine per se, I'd just wish we had more testers (or,
alternatively, people would just use bootcamp and make their Apple
machines look like PC's, but see (a) above).
Linus
From: Linus Torvalds [email blocked]
Subject: Re: [PATCH 1/1] Add efi e820 memory mapping on x86 [try #1]
Date: Mon, 24 Jul 2006 23:00:05 -0700 (PDT)
On Mon, 24 Jul 2006, Linus Torvalds wrote:
>
> Sadly, Apple bought into the whole "BIOS bad, EFI good" hype, so we now
> have x86 machines with EFI as the native boot protocol.
Btw, that's not totally new. I think some people played around with EFI on
x86 even before Apple came around. And don't get me wrong - the problem
with EFI is that it actually superficially looks much better than the
BIOS, but in practice it ends up being one of those things where it has
few real advantages, and often just a lot of extra complexity because of
the "new and improved" interfaces that were largely defined by a
committee.
I think a lot of the "new standards" tend to be that way. Trying to solve
a lot of problems and allow everybody to add their own features, instead
of just saying that it's better to just standardize the hardware.
For example, instead of ACPI, we could just have had standardized hardware
(and a few tables to define things like numbers of CPU's etc). It would
have been simpler for everybody. But no, people seem to think that it's
somehow "better" to have wild and crazy hardware, and then have a really
complicated way of describing it - and driving it - dynamically.
So EFI has this cool shell, a loadable driver framework, and other nice
features. Where "nice" obviously means "much more complex than the simple
things they designed in the late seventies back when people were stupid
and just wanted things to work".
Of course, it's somewhat questionable whether people have actually gotten
smarter or stupider in the last 30 years. It's not enough time for
evolution to have increased our brain capacity, but it certainly _is_
enough time for most people to no longer understand how hardware works any
more.
Not a good combination, in other words.
Not that I'd ever claim that the BIOS is wonderful either, but at least
everybody knows that the BIOS is just a bootloader, and doesn't try to
make it anything else.
The absolutely biggest advantage of a BIOS is that it's _so_ inconvenient
and obviously oldfashioned, that you have to be crazy to want to do
anything serious in it. Real mode, 16-bit code is actually an _advantage_
in that sense. People know how to treat it, and don't get any ideas about
it being some grandiose framework for anything else than "just load the OS
and get the hell out of there".
Linus
|
