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.

 
AAPL
$116.47
Apple Inc.
+0.16
MSFT
$47.98
Microsoft Corpora
-0.72
GOOG
$537.50
Google Inc.
+2.67

MacTech Search:
Community Search:

Software Updates via MacUpdate

Cobook 3.0.7 - Intelligent address book....
Cobook Contacts is an intuitive, engaging address book. Solve the problem of contact management with Cobook Contacts and its simple interface and powerful syncing and integration possibilities.... Read more
StatsBar 1.9 - Monitor system processes...
StatsBar gives you a comprehensive and detailed analysis of the following areas of your Mac: CPU usage Memory usage Disk usage Network and bandwidth usage Battery power and health (MacBooks only)... Read more
Cyberduck 4.6 - FTP and SFTP browser. (F...
Cyberduck is a robust FTP/FTP-TLS/SFTP browser for the Mac whose lack of visual clutter and cleverly intuitive features make it easy to use. Support for external editors and system technologies such... Read more
Maya 2015 - Professional 3D modeling and...
Maya is an award-winning software and powerful, integrated 3D modeling, animation, visual effects, and rendering solution. Because Maya is based on an open architecture, all your work can be scripted... Read more
Evernote 6.0.1 - Create searchable notes...
Evernote allows you to easily capture information in any environment using whatever device or platform you find most convenient, and makes this information accessible and searchable at anytime, from... Read more
calibre 2.11 - Complete e-library manage...
Calibre is a complete e-book library manager. Organize your collection, convert your books to multiple formats, and sync with all of your devices. Let Calibre be your multi-tasking digital... Read more
Herald 5.0.1 - Notification plugin for M...
Note: Versions 2.1.3 (for OS X 10.7), 3.0.6 (for OS X 10.8), and 4.0.8 (for OS X 10.9) are no longer supported by the developer. Herald is a notification plugin for Mail.app, Apple's Mac OS X email... Read more
Firetask 3.7 - Innovative task managemen...
Firetask uniquely combines the advantages of classical priority-and-due-date-based task management with GTD. Stay focused and on top of your commitments - Firetask's "Today" view shows all relevant... Read more
TechTool Pro 7.0.6 - Hard drive and syst...
TechTool Pro is now 7, and this is the most advanced version of the acclaimed Macintosh troubleshooting utility created in its 20-year history. Micromat has redeveloped TechTool Pro 7 to be fully 64... Read more
PhotoDesk 3.0.1 - Instagram client for p...
PhotoDesk lets you view, like, comment, and download Instagram pictures/videos! (NO Uploads! / Image Posting! Instagram forbids that! AND you *need* an *existing* Instagram account). But you can do... Read more

Latest Forum Discussions

See All

Ubisoft Gives Everyone Two New Ways to E...
Ubisoft Gives Everyone Two New Ways to Earn In-Game Stuff for Far Cry 4 Posted by Jessica Fisher on November 21st, 2014 [ permalink ] | Read more »
Golfinity – Tips, Tricks, Strategies, an...
Dig this: Would you like to know what we thought of being an infinite golfer? Check out our Golfinity review! Golfinity offers unlimited ways to test your skills at golf. Here are a few ways to make sure your score doesn’t get too high and your... | Read more »
Dark Hearts, The Sequel to Haunting Meli...
Dark Hearts, The Sequel to Haunting Melissa, is Available Now Posted by Jessica Fisher on November 21st, 2014 [ permalink ] Universal App - Designed for iPhone and iPad | Read more »
Meowza! Toyze Brings Talking Tom to Life...
Meowza! | Read more »
Square Enix Announces New Tactical RPG f...
Square Enix Announces New Tactical RPG for Mobile, Heavenstrike Rivals. Posted by Jessica Fisher on November 21st, 2014 [ permalink ] With their epic stories and gorgeous graphics, | Read more »
Quest for Revenge (Games)
Quest for Revenge 1.0.0 Device: iOS Universal Category: Games Price: $4.99, Version: 1.0.0 (iTunes) Description: The great Kingdom of the west has fallen. The gods ignore the prayers of the desperate. A dark warlord has extinguished... | Read more »
Threadz is a New Writing Adventure for Y...
Threadz is a New Writing Adventure for You and Your Friends Posted by Jessica Fisher on November 21st, 2014 [ permalink ] In the tradition of round-robin storytelling, | Read more »
SteelSeries Stratus XL Hardware Review
Made by: SteelSeries Price: $59.99 Hardware/iOS Integration Rating: 4 out of 5 stars Usability Rating: 4.5 out of 5 stars Reuse Value Rating: 4.25 out of 5 stars Build Quality Rating: 4.5 out of 5 stars Overall Rating: 4.31 out of 5 stars | Read more »
ACDSee (Photography)
ACDSee 1.0.0 Device: iOS iPhone Category: Photography Price: $1.99, Version: 1.0.0 (iTunes) Description: Capture, perfect, and share your photos with ACDSee. The ACDSee iPhone app combines an innovative camera, a powerful photo... | Read more »
ProTube for YouTube (Entertainment)
ProTube for YouTube 2.0.2 Device: iOS Universal Category: Entertainment Price: $1.99, Version: 2.0.2 (iTunes) Description: ProTube is the ultimate, fully featured YouTube app. With it's highly polished design, ProTube offers ad-free... | Read more »

Price Scanner via MacPrices.net

Save up to $400 with Apple refurbished 2014 1...
The Apple Store has restocked Apple Certified Refurbished 2014 15″ Retina MacBook Pros for up to $400 off the cost of new models. An Apple one-year warranty is included with each model, and shipping... Read more
New 13-inch 1.4GHz MacBook Air on sale for $8...
 Adorama has the 2014 13″ 1.4GHz/128GB MacBook Air on sale for $899.99 including free shipping plus NY & NJ tax only. Their price is $100 off MSRP. B&H Photo has the 13″ 1.4GHz/128GB MacBook... Read more
Apple Expected to Reverse Nine-Month Tablet S...
Apple and Samsung combined accounted for 62 percent of the nearly 36 million branded tablets shipped in 3Q 2014, according to early vendor shipment share estimates from market intelligence firm ABI... Read more
Stratos: 30 Percent of US Smartphone Owners t...
Stratos, Inc., creator of the Bluetooth Connected Card Platform, has announced results from its 2014 Holiday Mobile Payments Survey. The consumer survey found that nearly one out of three (30 percent... Read more
2014 1.4GHz Mac mini on sale for $449, save $...
 B&H Photo has lowered their price on the new 1.4GHz Mac mini to $449.99 including free shipping plus NY tax only. Their price is $50 off MSRP, and it’s the lowest price available for this new... Read more
Check Apple prices on any device with the iTr...
MacPrices is proud to offer readers a free iOS app (iPhones, iPads, & iPod touch) and Android app (Google Play and Amazon App Store) called iTracx, which allows you to glance at today’s lowest... Read more
64GB iPod touch on sale for $249, save $50
Best Buy has the 64GB iPod touch on sale for $249 on their online store for a limited time. Their price is $50 off MSRP. Choose free shipping or free local store pickup (if available). Sale price for... Read more
15″ 2.2GHz Retina MacBook Pro on sale for $17...
 B&H Photo has the 2014 15″ 2.2GHz Retina MacBook Pro on sale for $1799.99 for a limited time. Shipping is free, and B&H charges NY sales tax only. B&H will also include free copies of... Read more
New Logitech AnyAngle Case/Stand Brings Flexi...
Logitec has announced the newest addition to its suite of tablet products — the Logitech AnyAngle. A protective case with an any-angle stand for iPad Air 2 and all iPad mini models, AnyAngle is the... Read more
Notebook PC Shipments Rise Year-Over-Year as...
According to preliminary results from the upcoming DisplaySearch Quarterly Mobile PC Shipment and Forecast Report, the global notebook PC market grew 10 percent year-over-year in Q3’14 to 49.4... Read more

Jobs Board

*Apple* Solutions Consultant (ASC)- Retail S...
**Job Summary** The ASC is an Apple employee who serves as an Apple brand ambassador and influencer in a Reseller's store. The ASC's role is to grow Apple Read more
Project Manager, *Apple* Financial Services...
**Job Summary** Apple Financial Services (AFS) offers consumers, businesses and educational institutions ways to finance Apple purchases. We work with national and Read more
*Apple* Store Leader Program - College Gradu...
Job Description: Job Summary As an Apple Store Leader Program agent, you can continue your education as you major in the art of leadership at the Apple Store. You'll Read more
*Apple* Retail - Multiple Positions (US) - A...
Sales Specialist - Retail Customer Service and Sales Transform Apple Store visitors into loyal Apple customers. When customers enter the store, you're also the Read more
Senior Event Manager, *Apple* Retail Market...
…This senior level position is responsible for leading and imagining the Apple Retail Team's global event strategy. Delivering an overarching brand story; in-store, Read more
All contents are Copyright 1984-2011 by Xplain Corporation. All rights reserved. Theme designed by Icreon.