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

Tokkun Studio unveils alpha trailer for...
We are back on the MMORPG news train, and this time it comes from the sort of international developers Tokkun Studio. They are based in France and Japan, so it counts. Anyway, semantics aside, they have released an alpha trailer for the upcoming... | Read more »
Win a host of exclusive in-game Honor of...
To celebrate its latest Jujutsu Kaisen crossover event, Honor of Kings is offering a bounty of login and achievement rewards kicking off the holiday season early. [Read more] | Read more »
Miraibo GO comes out swinging hard as it...
Having just launched what feels like yesterday, Dreamcube Studio is wasting no time adding events to their open-world survival Miraibo GO. Abyssal Souls arrives relatively in time for the spooky season and brings with it horrifying new partners to... | Read more »
Ditch the heavy binders and high price t...
As fun as the real-world equivalent and the very old Game Boy version are, the Pokemon Trading Card games have historically been received poorly on mobile. It is a very strange and confusing trend, but one that The Pokemon Company is determined to... | Read more »
Peace amongst mobile gamers is now shatt...
Some of the crazy folk tales from gaming have undoubtedly come from the EVE universe. Stories of spying, betrayal, and epic battles have entered history, and now the franchise expands as CCP Games launches EVE Galaxy Conquest, a free-to-play 4x... | Read more »
Lord of Nazarick, the turn-based RPG bas...
Crunchyroll and A PLUS JAPAN have just confirmed that Lord of Nazarick, their turn-based RPG based on the popular OVERLORD anime, is now available for iOS and Android. Starting today at 2PM CET, fans can download the game from Google Play and the... | Read more »
Digital Extremes' recent Devstream...
If you are anything like me you are impatiently waiting for Warframe: 1999 whilst simultaneously cursing the fact Excalibur Prime is permanently Vault locked. To keep us fed during our wait, Digital Extremes hosted a Double Devstream to dish out a... | Read more »
The Frozen Canvas adds a splash of colou...
It is time to grab your gloves and layer up, as Torchlight: Infinite is diving into the frozen tundra in its sixth season. The Frozen Canvas is a colourful new update that brings a stylish flair to the Netherrealm and puts creativity in the... | Read more »
Back When AOL WAS the Internet – The Tou...
In Episode 606 of The TouchArcade Show we kick things off talking about my plans for this weekend, which has resulted in this week’s show being a bit shorter than normal. We also go over some more updates on our Patreon situation, which has been... | Read more »
Creative Assembly's latest mobile p...
The Total War series has been slowly trickling onto mobile, which is a fantastic thing because most, if not all, of them are incredibly great fun. Creative Assembly's latest to get the Feral Interactive treatment into portable form is Total War:... | Read more »

Price Scanner via MacPrices.net

Early Black Friday Deal: Apple’s newly upgrad...
Amazon has Apple 13″ MacBook Airs with M2 CPUs and 16GB of RAM on early Black Friday sale for $200 off MSRP, only $799. Their prices are the lowest currently available for these newly upgraded 13″ M2... Read more
13-inch 8GB M2 MacBook Airs for $749, $250 of...
Best Buy has Apple 13″ MacBook Airs with M2 CPUs and 8GB of RAM in stock and on sale on their online store for $250 off MSRP. Prices start at $749. Their prices are the lowest currently available for... Read more
Amazon is offering an early Black Friday $100...
Amazon is offering early Black Friday discounts on Apple’s new 2024 WiFi iPad minis ranging up to $100 off MSRP, each with free shipping. These are the lowest prices available for new minis anywhere... Read more
Price Drop! Clearance 14-inch M3 MacBook Pros...
Best Buy is offering a $500 discount on clearance 14″ M3 MacBook Pros on their online store this week with prices available starting at only $1099. Prices valid for online orders only, in-store... Read more
Apple AirPods Pro with USB-C on early Black F...
A couple of Apple retailers are offering $70 (28%) discounts on Apple’s AirPods Pro with USB-C (and hearing aid capabilities) this weekend. These are early AirPods Black Friday discounts if you’re... Read more
Price drop! 13-inch M3 MacBook Airs now avail...
With yesterday’s across-the-board MacBook Air upgrade to 16GB of RAM standard, Apple has dropped prices on clearance 13″ 8GB M3 MacBook Airs, Certified Refurbished, to a new low starting at only $829... Read more
Price drop! Apple 15-inch M3 MacBook Airs now...
With yesterday’s release of 15-inch M3 MacBook Airs with 16GB of RAM standard, Apple has dropped prices on clearance Certified Refurbished 15″ 8GB M3 MacBook Airs to a new low starting at only $999.... Read more
Apple has clearance 15-inch M2 MacBook Airs a...
Apple has clearance, Certified Refurbished, 15″ M2 MacBook Airs now available starting at $929 and ranging up to $410 off original MSRP. These are the cheapest 15″ MacBook Airs for sale today at... Read more
Apple drops prices on 13-inch M2 MacBook Airs...
Apple has dropped prices on 13″ M2 MacBook Airs to a new low of only $749 in their Certified Refurbished store. These are the cheapest M2-powered MacBooks for sale at Apple. Apple’s one-year warranty... Read more
Clearance 13-inch M1 MacBook Airs available a...
Apple has clearance 13″ M1 MacBook Airs, Certified Refurbished, now available for $679 for 8-Core CPU/7-Core GPU/256GB models. Apple’s one-year warranty is included, shipping is free, and each... Read more

Jobs Board

Seasonal Cashier - *Apple* Blossom Mall - J...
Seasonal Cashier - Apple Blossom Mall Location:Winchester, VA, United States (https://jobs.jcp.com/jobs/location/191170/winchester-va-united-states) - Apple Read more
Seasonal Fine Jewelry Commission Associate -...
…Fine Jewelry Commission Associate - Apple Blossom Mall Location:Winchester, VA, United States (https://jobs.jcp.com/jobs/location/191170/winchester-va-united-states) Read more
Seasonal Operations Associate - *Apple* Blo...
Seasonal Operations Associate - Apple Blossom Mall Location:Winchester, VA, United States (https://jobs.jcp.com/jobs/location/191170/winchester-va-united-states) - Read more
Hair Stylist - *Apple* Blossom Mall - JCPen...
Hair Stylist - Apple Blossom Mall Location:Winchester, VA, United States (https://jobs.jcp.com/jobs/location/191170/winchester-va-united-states) - Apple Blossom Read more
Cashier - *Apple* Blossom Mall - JCPenney (...
Cashier - Apple Blossom Mall Location:Winchester, VA, United States (https://jobs.jcp.com/jobs/location/191170/winchester-va-united-states) - Apple Blossom Mall Read more
All contents are Copyright 1984-2011 by Xplain Corporation. All rights reserved. Theme designed by Icreon.