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

Go from lowly lizard to wicked Wyvern in...
Do you like questing, and do you like dragons? If not then boy is this not the announcement for you, as Loongcheer Game has unveiled Quest Dragon: Idle Mobile Game. Yes, it is amazing Square Enix hasn’t sued them for copyright infringement, but... | Read more »
Aether Gazer unveils Chapter 16 of its m...
After a bit of maintenance, Aether Gazer has released Chapter 16 of its main storyline, titled Night Parade of the Beasts. This big update brings a new character, a special outfit, some special limited-time events, and, of course, an engaging... | Read more »
Challenge those pesky wyverns to a dance...
After recently having you do battle against your foes by wildly flailing Hello Kitty and friends at them, GungHo Online has whipped out another surprising collaboration for Puzzle & Dragons. It is now time to beat your opponents by cha-cha... | Read more »
Pack a magnifying glass and practice you...
Somehow it has already been a year since Torchlight: Infinite launched, and XD Games is celebrating by blending in what sounds like a truly fantastic new update. Fans of Cthulhu rejoice, as Whispering Mist brings some horror elements, and tests... | Read more »
Summon your guild and prepare for war in...
Netmarble is making some pretty big moves with their latest update for Seven Knights Idle Adventure, with a bunch of interesting additions. Two new heroes enter the battle, there are events and bosses abound, and perhaps most interesting, a huge... | Read more »
Make the passage of time your plaything...
While some of us are still waiting for a chance to get our hands on Ash Prime - yes, don’t remind me I could currently buy him this month I’m barely hanging on - Digital Extremes has announced its next anticipated Prime Form for Warframe. Starting... | Read more »
If you can find it and fit through the d...
The holy trinity of amazing company names have come together, to release their equally amazing and adorable mobile game, Hamster Inn. Published by HyperBeard Games, and co-developed by Mum Not Proud and Little Sasquatch Studios, it's time to... | Read more »
Amikin Survival opens for pre-orders on...
Join me on the wonderful trip down the inspiration rabbit hole; much as Palworld seemingly “borrowed” many aspects from the hit Pokemon franchise, it is time for the heavily armed animal survival to also spawn some illegitimate children as Helio... | Read more »
PUBG Mobile teams up with global phenome...
Since launching in 2019, SpyxFamily has exploded to damn near catastrophic popularity, so it was only a matter of time before a mobile game snapped up a collaboration. Enter PUBG Mobile. Until May 12th, players will be able to collect a host of... | Read more »
Embark into the frozen tundra of certain...
Chucklefish, developers of hit action-adventure sandbox game Starbound and owner of one of the cutest logos in gaming, has released their roguelike deck-builder Wildfrost. Created alongside developers Gaziter and Deadpan Games, Wildfrost will... | Read more »

Price Scanner via MacPrices.net

13-inch M2 MacBook Airs in stock today at App...
Apple has 13″ M2 MacBook Airs available for only $849 today in their Certified Refurbished store. These are the cheapest M2-powered MacBooks for sale at Apple. Apple’s one-year warranty is included,... Read more
New today at Apple: Series 9 Watches availabl...
Apple is now offering Certified Refurbished Apple Watch Series 9 models on their online store for up to $80 off MSRP, starting at $339. Each Watch includes Apple’s standard one-year warranty, a new... Read more
The latest Apple iPhone deals from wireless c...
We’ve updated our iPhone Price Tracker with the latest carrier deals on Apple’s iPhone 15 family of smartphones as well as previous models including the iPhone 14, 13, 12, 11, and SE. Use our price... Read more
Boost Mobile will sell you an iPhone 11 for $...
Boost Mobile, an MVNO using AT&T and T-Mobile’s networks, is offering an iPhone 11 for $149.99 when purchased with their $40 Unlimited service plan (12GB of premium data). No trade-in is required... Read more
Free iPhone 15 plus Unlimited service for $60...
Boost Infinite, part of MVNO Boost Mobile using AT&T and T-Mobile’s networks, is offering a free 128GB iPhone 15 for $60 per month including their Unlimited service plan (30GB of premium data).... Read more
$300 off any new iPhone with service at Red P...
Red Pocket Mobile has new Apple iPhones on sale for $300 off MSRP when you switch and open up a new line of service. Red Pocket Mobile is a nationwide MVNO using all the major wireless carrier... Read more
Clearance 13-inch M1 MacBook Airs available a...
Apple has clearance 13″ M1 MacBook Airs, Certified Refurbished, available for $759 for 8-Core CPU/7-Core GPU/256GB models and $929 for 8-Core CPU/8-Core GPU/512GB models. Apple’s one-year warranty is... Read more
Updated Apple MacBook Price Trackers
Our Apple award-winning MacBook Price Trackers are continually updated with the latest information on prices, bundles, and availability for 16″ and 14″ MacBook Pros along with 13″ and 15″ MacBook... Read more
Every model of Apple’s 13-inch M3 MacBook Air...
Best Buy has Apple 13″ MacBook Airs with M3 CPUs in stock and on sale today for $100 off MSRP. Prices start at $999. Their prices are the lowest currently available for new 13″ M3 MacBook Airs among... Read more
Sunday Sale: Apple iPad Magic Keyboards for 1...
Walmart has Apple Magic Keyboards for 12.9″ iPad Pros, in Black, on sale for $150 off MSRP on their online store. Sale price for online orders only, in-store price may vary. Order online and choose... Read more

Jobs Board

Solutions Engineer - *Apple* - SHI (United...
**Job Summary** An Apple Solution Engineer's primary role is tosupport SHI customers in their efforts to select, deploy, and manage Apple operating systems and Read more
DMR Technician - *Apple* /iOS Systems - Haml...
…relevant point-of-need technology self-help aids are available as appropriate. ** Apple Systems Administration** **:** Develops solutions for supporting, deploying, Read more
Omnichannel Associate - *Apple* Blossom Mal...
Omnichannel Associate - Apple Blossom Mall Location:Winchester, VA, United States (https://jobs.jcp.com/jobs/location/191170/winchester-va-united-states) - Apple Read more
Operations Associate - *Apple* Blossom Mall...
Operations Associate - Apple Blossom Mall Location:Winchester, VA, United States (https://jobs.jcp.com/jobs/location/191170/winchester-va-united-states) - Apple 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.