Linux: Linus On The Extensible Firmware Interface

Submitted by Jeremy
on July 26, 2006 - 8: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

Related Links:

bad link

Ferdinand (not verified)
on
July 26, 2006 - 9:58am

The "Archive of above thread" link is broken: href=""

Thanks for Linux off topic

Anonymous (not verified)
on
July 27, 2006 - 1:56pm

Linus, Thanks for Linux I really was not into computers like I should have been. Windows was the same ho hum.

Thanks for teaching me about computers and how the work. What do I mean well I learned more about windows from Linux than I did about windows from MS school?

Windows says where to you want to go today and Linux goes there !

EFI would like to be DOS-in-flash, but isn't quite...

Anonymous (not verified)
on
July 27, 2006 - 2:50pm

... because last time I looked you had to keep a small FAT32 partition around for the larger utilities to live in.

All the evils of DOS, fewer of the advantages.

EFI is basically a bigger suckier bios

error27
on
July 27, 2006 - 4:38pm

Like say if you have a hardware problem, right then you just file a bugzilla on kernel.org. You figure out who maintains that part of the kernel. You send a mail to the list. It gets fixed. Everything is happy.

With a BIOS then you don't have the source code so it's pretty hard to figure out what the problem is. But you swap a couple motherboards out and you're pretty sure that you don't just have defective hardware. Then you email the mobo manufacturers. They ignore you. Then you email them 3 more times and threaten to drop all their business. So eventually they respond, but they don't know anything about it. Those are just tables that they get from nvidia. They can't come out with a new release of the BIOS just for that alone. The nvidia guys who designed the table have moved to Gambia. So you're basically screwed.

With EFI it's like that but even more. Hardware manufactures are talking about how they can implement drivers in the EFI firmware so that it will work on every OS. But the problem with that is that it won't work on any OS...

Also intel has always been completely insane with regards to BIOSes. I remember one of there systems that took 30 minutes to update the firmware. And it wasn't like you could start it and then come back 30 minutes later, you had to be right in front of the system to answer questions for 30 minutes.

I was so hoping that EFI would die with the Itanium...

Stupid EFI. Stupid Intel. Stupid Apple.

EFI versus OpenBoot?

Anonymous (not verified)
on
July 27, 2006 - 7:24pm

Any reason why Open Boot couldn't have been used, instead of designed a new system? While originally used by Sun, it was standardized by the IEEE (1275), and was architecture independent (SPARC, PowerPC for Apple, x86 as well I believe).

What (supposed) advantages does EFI have over OB? Are there things in OB that couldn't have been worked around?

The advantage is that Windows

Mark B (not verified)
on
July 28, 2006 - 9:15am

The advantage is that Windows supports EFI not Open Boot! :-(

it looks like EFI is just ano

rca (not verified)
on
July 28, 2006 - 9:40am

it looks like EFI is just another way for hardware manufacturers to make your computer obsolete.

Windows does NOT support EFI

Anonymous (not verified)
on
July 28, 2006 - 9:47am

Windows does NOT support EFI on x86 systems.

Vista does.

Anonymous (not verified)
on
August 6, 2006 - 8:57am

Vista does.

No, they dropped that feature

Darren Winsper (not verified)
on
August 10, 2006 - 6:32am

No, they dropped that feature.

Heh

TGM (not verified)
on
September 15, 2009 - 3:49am

Sounds like another Windows(tm) "Genuine" Advantage :P

How about Sun open source all

Anonymous (not verified)
on
July 28, 2006 - 12:21pm

How about Sun open source all of modern open boot? Does anyone think that would spur interest in using it as a solution going forward? That's essentially what the Open Bios project is trying to do - Sun could do it virtually overnight. Everybody hates EFI but there really isn't anything else on the visible horizon that looks like a viable alternative.

Openening Openfirmware

Anonymous (not verified)
on
July 30, 2006 - 10:00am

It is already open, since decades in fact, even got approved by the IEEE as IEEE 1275. The one thing which was held back has been the the specific interfacing of the keyboard controller AFAIK. Which has been a problem with some SparcClones regarding absolute compatibility with SunOS/Solaris. Nowadays there are projects like OpenBIOS and LinuxBIOS which go in that direction. Ever wondered why VGA- and SCSI-Controllers for Macintoshes have been so expensive compared to their commoditiy PC-Counterparts? Because they had a "BIOS" coded in OpenFirmwarecompliant FORTH on it. Though there ARE companies which specialize in this, it is no massmarket. Why? Well, fruitless discussion, things are like they are. AFAIK even Aopen sometimes had a VGA which had a grafted on OpenFirmware for regular PC's, but this is years ago also.

Correction

Anonymous (not verified)
on
July 30, 2006 - 10:14am

After a quick googling i found this link which states that the IEEE has withdrawn its approval for whatever reason.
http://en.wikipedia.org/wiki/Open_Firmware
Despite that, it is really, really open for everyone who likes to use it, as you can see when you are following the links from there.
Out of my personal experience with older Sparcs i think this is all what a computersystem needs to have to startup with whichever periphery it has, over whatever way, be it local, some form of netboot, headless, with or without local console and whatnot.
As Aopen showed with their VGA once, there is nothing prohibiting wrapping a more or less graphical shell about that all which is more suited to the average user, in fact it looked like thy typical awardbios.

You guys are confusing "open

Anonymous (not verified)
on
July 31, 2006 - 10:17am

You guys are confusing "open standard" with "open source". The point is to have Sun give their implementation of IEEE-1275 to the open source community, thus providing a reference implementation, fully open sourced, for which platforms could use for bootstrapping. No more EFI, no more Bios. The real question is would vendors move to this or not if it was free?

opensparc.net

Anonymous (not verified)
on
July 31, 2006 - 10:19am

There are rumors of Sun posting Openboot source code on opensparc.net very soon now...

As with Java, it's too late.

Anonymous (not verified)
on
August 24, 2006 - 3:51pm

As with Java, it's too late. The competitors are already entrenched.

Confused by Open Standards?

Anonymous (not verified)
on
July 31, 2006 - 2:15pm

Ermm, when the standard is open, why i'd need the source of the reference implementation? Furthermore, why not try getting it from Apple instead of Sun? Until they switched to Intel-Cpus they used it in their systems. Or do you really think the SAMBA developers ever had a view at the relevant parts of Windows? Open Standard means you can implement it in whatever way you like to, as long it's working as
mandated by that standard. Exactly this is what OpenBIOS is about.
And No, the vendors wouldn't move to it in a quasimonopolistic world where the most used OS wouldn't support it.

News flash

Anonymous (not verified)
on
July 31, 2006 - 6:11pm

Apple's OpenBoot implementation is said to be so braindead that even the most ravenous of zombies wouldn't sneeze their way. Like "minimal implementation required to boot something and poke a few PCI or AGP cards" braindead. Essentially a subset slash incompatible variant of OpenBoot.

The real quaestion is why App

Anonymous (not verified)
on
October 11, 2006 - 10:18am

The real quaestion is why Apple which used Open Firmware on the PowerPC didn't just continue with it on the Mactels?

Lots of uninformed statements floating around...

Anonymous (not verified)
on
August 1, 2006 - 1:51am

I think I know what I'm talking about when it comes to EFI and I noticed that there are quite a few uninformed statements about EFI floating around here.

  • You don't need a FAT partition for EFI. Not for small utilities, not for larger ones. You can load your tools from a flash ROM on a PCI controller, via TFTP or from a disk. In the latter case you'd need a FAT partition. But since EFI uses GPT, an extra partition of a few Megabytes on a Multigigabyte disk is not a big deal.
  • Although EFI allows it, nobody seriously wants to use EFI drivers when the OS is up and running. EFI requires interrupts to be masked when calling EFI Service Routines which would make drivers very inefficient.
  • Windows (Vista) will probably not support EFI on any platform other than the Itanium platform. Not in the initial release that is.

    While I agree that EFI is somewhat overly complex in some areas, it does have some real advantages. And although I do like the EFI concept, I don't think that EFI will replace BIOS anytime soon. The PC world has always tried to carry around their compatibility cruft and they will not go out of their way for EFI.

  • Comment viewing options

    Select your preferred way to display the comments and click "Save settings" to activate your changes.