TweetFollow Us on Twitter

Apple's Transition from Open Firmware to Extensible Firmware Interface

Volume Number: 23 (2007)
Issue Number: 05
Column Tag: System Technologies

Apple's Transition from Open Firmware to Extensible Firmware Interface

By Criss Myers

Preface

In January 2006, Apple introduced Intel Architecture based Macs. They took this hardware move as an opportunity to also upgrade their choice of firmware. Their previous firmware, Open Firmware, was not in itself a bad choice, being far more advanced than the IBM PC BIOS that Windows computers use. There is, however, a better firmware choice that offers improvements on Open Firmware, called Extensible Firmware Interface, EFI, developed by Intel. When Apple looked for a successor to their PowerPC Processors, they found a complete hardware package from Intel. They got the latest CoreDuo and Xeon Processors, as well as advancements in boot firmware and disk partitioning. Since Apple offers an integrated package, this enables them to control all aspects of the computer system from processors to boot firmware to operating system. This also enabled them to make a smooth transition from the PowerPC, Open Firmware, APM and their 32bit OS, to Intel processors, EFI, GPT and 64bit Tiger OS X. Anyone using these 2 systems will not notice any difference apart from their performance. In this article we will take a brief look at Open Firmware and then explain what EFI is, its history, and what this means for Apple's future as well as that of the PC market in general.

Open Firmware

Apple's PowerPC Macs, post-NuBus, used a boot firmware called Open Firmware. Open Firmware, also called OpenBoot, was developed by Sun Microsystems and is used in Sun's Sparc work stations and servers, IBM POWER systems and PegasosPPC systems and is available under a BSD license. It was described by IEEE as IEEE 1275-1994 but since 1998, it has been withdrawn. In 2006 several commercial versions were released to the open source community under the OpenBIOS project, these include, SUN OpenBOOT, Firmworks OpenFirmware and Codegen SmartFirmware. Open Firmware is a hardware independent firmware and fulfils the same tasks as BIOS does in a PC. The advantage of Open Firmware to Apple is that any I/O cards that work, in say SUN machines, could also be used in Mac machines without requiring any specific Mac drivers. Open Firmware also offered BOOTP capabilities for Netbooting machines as well as setting boot devices. On a Macintosh, most user settings can be changed via GUI tools and the Open Firmware can be locked to prevent booting from non-authorized sources.

Extensible Firmware Interface (EFI)

History

EFI was developed by Andrew Fish working for Intel back in the 1990's and was initially called "Intel Boot Initiative (IBI)". It grew up around the need to replace the aging PC BIOS developed by IBM in the 1970's. IBI was intended for their Itanium Architecture (IA) based computers because the existing PC BIOS was far too limiting for future 64 bit operating systems, some of these problems being 16 bit processor mode and PC AT hardware dependencies to name a few. Since then, IBI was developed by Intel into EFI and subsequently released by them to the open source community in 2005. It is now called UEFI (Unified Extensible Firmware Interface) and is currently at version 2.1.

Due to the failed performance of these IA machines, EFI never took off as a common replacement for the PC BIOS. In 2006, Apple moved to EFI and was then the only vendor to take advantage of this firmware interface. Linux has supported EFI since 2000 using "elilo" as a boot loader and both Windows and HP-UX support EFI, but all of these only support IA-32 and IA-64 platforms. Windows Vista is expected to support EFI but only in a later service pack and Microsoft's stance is that until EFI becomes mainstream they will not support it.

What is EFI?

EFI was designed to abstract the firmware and hardware layers from the operating system layer. This is so that operating system vendors and developers no longer need to battle with cumbersome 16bit BIOS and constant hardware configurations.


Fig 1. Legacy PC BIOS vs. EFI

Figure 1 compares EFI and BIOS showing EFI as a standard interface between the OS and the hardware. EFI is a set of specifications to define interactions and programmatic interfaces between the hardware and the operating systems, it is then up to the specific hardware vendors to make an EFI compliant system. Since EFI is just a set of specifications, it is not an actual firmware; therefore, it is up to each vendor to create their own firmware to initialize their hardware. Intel's firmware, and hence Apple's choice, is called "Intel Platform Innovation Framework for EFI", also called "Framework". It is a legacy free firmware that complies with EFI. It is not available to end-users as a complete firmware package but parts of the code are released under the TianoCore project, (www.tianocore.org). Apple created their own version of "Framework"; we will see later how they implemented EFI and framework.

EFI is very similar to Open Firmware in that it is a boot firmware independent of hardware and operating system. What this means is that it allows the operating system to boot and run in a "sandbox" mode. A "sandbox" mode is a safe protected mode where the operating system does not make direct calls to the hardware. EFI controls the hardware; it takes the calls from the operating system, and then passes them on to the hardware, creating an interface between the OS and the physical firmware, in much the same way that a virtual machine works. This then offers a stable environment from which to run the OS. The advantage of this is that only the firmware controls the hardware (see Fig 2).


Figure 2 - EFI as an interface between the OS and the Firmware

For developers this means they will no longer need to make BIOS/OS dependant drivers, they can create EFI based drivers which will then work in any compatible EFI machine irrelevant of the OS or BIOS loaded. Obviously, for Apple this means a wider range of I/O cards can be supported in the future once more hardware vendors support EFI. EFI is free of any of the memory restrictions that BIOS has and can use all available memory. This speeds up boot time as well, a Mac Pro for instance can boot up and load the OS in just 15 seconds.

The EFI specification is broken down into "boot services" and "runtime services". Boot Services are any services that run during boot only, such as, the loading of drivers and the accessing of graphics during boot. The services use "EFI Drivers" "EFI Applications" and "EFI Boot Code". Runtime Services run while the computer is running accessing such things as date/time etc. EFI Drivers are written in C and conform to the EFI Drivers Model. They can be loaded from any non-volatile memory, either in option ROM, or on the device directly.

Apple's implementation of EFI and Framework

The EFI Boot Process

Firstly, the computer powers up, then Framework, then, via EFI boot services, initializes the hardware such as the Bluetooth, USB, VGA, network IP stack, remote control, etc. These boot services will load all the hardware drivers necessary to detect any OS that resides on either an internal or external hard disk, or a network volume. Apple's Framework does not boot into text mode but directly into graphics mode, just like it did with Open Firmware. There is no direct access to the text mode or EFI shell. Apple has developed their Framework to work in much the same way as Open Firmware did, using the same key strokes: C boots to CD/DVD, N boots into the Netboot disk, V boots verbose and S boots into Safe Mode, etc. This makes a seamless transition from Open Firmware to EFI for the user.

Following this, various EFI Applications can be loaded; one such application is the Boot Manager. The Boot Manager is used to select and load the operating system, removing the need for a dedicated boot-loader mechanism. On an Apple this looks very similar to the Open Firmware boot-loader but with updated graphics. Apple has created their own EFI compliant Boot Manager with their own graphics. Apple's Boot Manager can detect any Mac operating system that is available to the system. According to Apple, their EFI Application can, however, only read boot-code from a GPT formatted drive or an Intel based NetBoot image; only one Netboot image is displayed and is either set via the "Startup Disk" section on the client or is the default image set on the server. Initially the Boot Manager could only detect Mac OS, but Apple used the "compatibility support module" to support legacy PC BIOS such as XP. This will only display a single legacy OS per drive.


Figure 3 - EFI with the CSM Module

Apple's Boot Manager Application will either boot from the default volume or you can enter the graphical selection screen via the option keystroke, just as with Open Firmware. The EFI boot code is then read from the hard disk and the operating system is loaded. Control is then transferred to the OS. Some higher operating system drivers can now be loaded for various devices. The operating system will then pass calls to the firmware, which will pass them to the hardware.


Figure 4 - EFI Boot Process

rEFIt tools

When Apple released BootCamp with their Firmware update, which added the compatibility support module to their firmware, it became possible to load the Linux OS onto a Mac. However, this module only recognizes a single legacy OS per drive and labels them as Windows only. This is not useful in a triple boot system. An open source project was then started called rEFIt tools which offers a boot menu to detect multiple OS per drive and label them as the appropriate OS's. It also offers a maintenance toolkit with direct access to the EFI pre-boot environment and gives access to the EFI Shell Application. The current version is 0.8 and can be loaded via CD, USB or directly off the internal drive. When you boot the Mac with the option key held down, you can then select the rEFIt tools from their installed location.

Conclusion -- Future Benefits of EFI for Apple

EFI is a complete pre-boot environment, that makes life much easier for developers, and since EFI is written in C, it is much easier to program for. With more vendors supporting this specification it means, for Apple users, that more and more devices with be compatible with Macs. This can only be a good thing. Developers find it a much easier environment to develop in due to its pre-boot environment. They can test and develop without the need for a VDU because they can output the tests directly to text. The pre-boot environment can also be used for backup, recovery, and diagnostics, updating firmware by accessing the Internet without the need for an OS. Both American Megatrends Inc (AMI) and Insyde Technology, both members of UEFI, have made Pre-Boot Applications sets.


Figure 5 - AMI Pre-Boot Interface

There are development tools available that allow users to create their own pre-boot applications.


Figure 6 - Pre-Boot Applications

This offers Apple the chance to create their own Pre-Boot Applications which can be stored on the System EFI partition, which is currently empty on Apples GPT drives, but is created by default with a set size of 200mb. Apple could develop pre-boot versions of Time Machine for Leopard so that an OS X system could be recovered via an existing backup, or use a pre-boot Disk Utility to repair a drive. Third party companies such as Norton or Tech Tool could install pre-boot versions of their Applications to this hidden partition also. Apple could also make a pre-boot version of Front Row so that users can access their DVD's, MP3s, AppleTV without needing to boot the OS. This also offers secure network booting, remote provisioning and setup as well as virus scanning etc. For the general user it will offer them a stable environment to run the Mac OS X without as many kernel panics.

Bibliography and References

UEFI. UEFI Extensible Firmware Interface Specifications Version 2.1, Copyright 2006.

Windows Hardware Developer Central, EFI and Windows, April 2006.

Wikipedia, Extensible Firmware Interface, 2007.

Wikipedia, Open Firmware, 2007.

Wikipedia, BIOS, 2007.

OSX86Project, EFI, February 2007.

Intel Software Network, Extensible Firmware Interface, 2006.

Intel Software Network, Enhanced Pre-Boot Environments with EFI Applications, 2007

Michael Kinney - Intel Developer Update Magazine, Solving Boot Issues with EFI, September 2000

Amit Singh - Kernelthread.com, More Power to Firmware, Copyright 2006.

American Megatrends Inc, AMI Pre-Boot Applications, December 2005.


Criss Myers is a Senior Mac IT Technician for the Faculty of Science and Technology, at the University of Central Lancashire, Preston, United Kingdom. He has been a Systems Server Administrator from the very first version of OS X Server. He Works with Macs as well as Linux, Unix and Windows.

 

Community Search:
MacTech Search:

Software Updates via MacUpdate

Latest Forum Discussions

See All

Top Mobile Game Discounts
Every day, we pick out a curated list of the best mobile discounts on the App Store and post them here. This list won't be comprehensive, but it every game on it is recommended. Feel free to check out the coverage we did on them in the links... | Read more »
Price of Glory unleashes its 1.4 Alpha u...
As much as we all probably dislike Maths as a subject, we do have to hand it to geometry for giving us the good old Hexgrid, home of some of the best strategy games. One such example, Price of Glory, has dropped its 1.4 Alpha update, stocked full... | Read more »
The SLC 2025 kicks off this month to cro...
Ever since the Solo Leveling: Arise Championship 2025 was announced, I have been looking forward to it. The promotional clip they released a month or two back showed crowds going absolutely nuts for the previous competitions, so imagine the... | Read more »
Dive into some early Magicpunk fun as Cr...
Excellent news for fans of steampunk and magic; the Precursor Test for Magicpunk MMORPG Crystal of Atlan opens today. This rather fancy way of saying beta test will remain open until March 5th and is available for PC - boo - and Android devices -... | Read more »
Prepare to get your mind melted as Evang...
If you are a fan of sci-fi shooters and incredibly weird, mind-bending anime series, then you are in for a treat, as Goddess of Victory: Nikke is gearing up for its second collaboration with Evangelion. We were also treated to an upcoming... | Read more »
Square Enix gives with one hand and slap...
We have something of a mixed bag coming over from Square Enix HQ today. Two of their mobile games are revelling in life with new events keeping them alive, whilst another has been thrown onto the ever-growing discard pile Square is building. I... | Read more »
Let the world burn as you have some fest...
It is time to leave the world burning once again as you take a much-needed break from that whole “hero” lark and enjoy some celebrations in Genshin Impact. Version 5.4, Moonlight Amidst Dreams, will see you in Inazuma to attend the Mikawa Flower... | Read more »
Full Moon Over the Abyssal Sea lands on...
Aether Gazer has announced its latest major update, and it is one of the loveliest event names I have ever heard. Full Moon Over the Abyssal Sea is an amazing name, and it comes loaded with two side stories, a new S-grade Modifier, and some fancy... | Read more »
Open your own eatery for all the forest...
Very important question; when you read the title Zoo Restaurant, do you also immediately think of running a restaurant in which you cook Zoo animals as the course? I will just assume yes. Anyway, come June 23rd we will all be able to start up our... | Read more »
Crystal of Atlan opens registration for...
Nuverse was prominently featured in the last month for all the wrong reasons with the USA TikTok debacle, but now it is putting all that behind it and preparing for the Crystal of Atlan beta test. Taking place between February 18th and March 5th,... | Read more »

Price Scanner via MacPrices.net

AT&T is offering a 65% discount on the ne...
AT&T is offering the new iPhone 16e for up to 65% off their monthly finance fee with 36-months of service. No trade-in is required. Discount is applied via monthly bill credits over the 36 month... Read more
Use this code to get a free iPhone 13 at Visi...
For a limited time, use code SWEETDEAL to get a free 128GB iPhone 13 Visible, Verizon’s low-cost wireless cell service, Visible. Deal is valid when you purchase the Visible+ annual plan. Free... Read more
M4 Mac minis on sale for $50-$80 off MSRP at...
B&H Photo has M4 Mac minis in stock and on sale right now for $50 to $80 off Apple’s MSRP, each including free 1-2 day shipping to most US addresses: – M4 Mac mini (16GB/256GB): $549, $50 off... Read more
Buy an iPhone 16 at Boost Mobile and get one...
Boost Mobile, an MVNO using AT&T and T-Mobile’s networks, is offering one year of free Unlimited service with the purchase of any iPhone 16. Purchase the iPhone at standard MSRP, and then choose... Read more
Get an iPhone 15 for only $299 at Boost Mobil...
Boost Mobile, an MVNO using AT&T and T-Mobile’s networks, is offering the 128GB iPhone 15 for $299.99 including service with their Unlimited Premium plan (50GB of premium data, $60/month), or $20... Read more
Unreal Mobile is offering $100 off any new iP...
Unreal Mobile, an MVNO using AT&T and T-Mobile’s networks, is offering a $100 discount on any new iPhone with service. This includes new iPhone 16 models as well as iPhone 15, 14, 13, and SE... Read more
Apple drops prices on clearance iPhone 14 mod...
With today’s introduction of the new iPhone 16e, Apple has discontinued the iPhone 14, 14 Pro, and SE. In response, Apple has dropped prices on unlocked, Certified Refurbished, iPhone 14 models to a... Read more
B&H has 16-inch M4 Max MacBook Pros on sa...
B&H Photo is offering a $360-$410 discount on new 16-inch MacBook Pros with M4 Max CPUs right now. B&H offers free 1-2 day shipping to most US addresses: – 16″ M4 Max MacBook Pro (36GB/1TB/... Read more
Amazon is offering a $100 discount on the M4...
Amazon has the M4 Pro Mac mini discounted $100 off MSRP right now. Shipping is free. Their price is the lowest currently available for this popular mini: – Mac mini M4 Pro (24GB/512GB): $1299, $100... Read more
B&H continues to offer $150-$220 discount...
B&H Photo has 14-inch M4 MacBook Pros on sale for $150-$220 off MSRP. B&H offers free 1-2 day shipping to most US addresses: – 14″ M4 MacBook Pro (16GB/512GB): $1449, $150 off MSRP – 14″ M4... Read more

Jobs Board

All contents are Copyright 1984-2011 by Xplain Corporation. All rights reserved. Theme designed by Icreon.