Introducing Uefi-Compliant Firmware On Ibm System x.1.0
Introducing Uefi-Compliant Firmware On Ibm System x.1.0
OBIBMu
Introducing UEFI-Compliant Firmware on IBM System x and BladeCenter Servers Revision 1.0
Nathan C. Skalsky, Cecil Lockett, Michael Turner, Adam L. Soderlund, Michael Brinkman, with System x UEFI/BIOS Development Team IBM Systems and Technology Group
Page 2
Executive overview
The purpose of this paper is to introduce and describe key features of the IBM System x Server Firmware. The following IBM System x and BladeCenter servers are the IBM x86 servers that include native UEFI support (as well as BIOS compatibility), as of the date of this document: IBM iDataPlex dx360 M2 IBM BladeCenter HS22 IBM System x3200/3250 M3 IBM System x3400/3500 M2 IBM System x3550/3650 M2 IBM System x Server Firmware replaces the BIOS of previous-generation servers while maintaining full backward compatibility.
Page 3
UEFI introduction
The Unified Extensible Firmware Interface (UEFI) replaces the basic input/output system (BIOS), which has enabled x86 personal computer and server products for nearly 30 years, starting with the IBM Personal Computer (PC) in 1981. UEFI defines a standard interface between the operating system, platform firmware, and external devices and offers capabilities that far exceed those of BIOS and improved effectiveness of server development. Intel Corporation developed EFI in the mid 1990s to enable the Itanium class of processors without having to implement legacy processor operating modes that are required by BIOS. Later, the UEFI Forum Inc. was formed by Intel, IBM, Hewlett-Packard, Dell, Apple, and other companies to turn EFI into a industry standard that is appropriate for broader use on other architectures, including x86 and x64. In 2001, IBM introduced xSeries 450 and 455 (Itanium) servers with an EFI-compliant firmware. Today, UEFI 2.1 is becoming widely accepted throughout the industry, and many systems are making the transition to UEFI-compliant firmware. The IBM System x Server Firmware enables the following code to be invoked from the UEFI preboot environment: Operating-system boot loaders: A special type of UEFI application that invokes and passes control to a protected-mode operating system. UEFI applications: Files that contain architecture-specific binary machine code or EFI byte code that can be loaded into memory and invoked. Common examples include the UEFI shell (command-line environment) and third-party adapter tools and updates.
BIOS limitations
BIOS originated with the first IBM PC in 1981 and has grown over time to accommodate the everincreasing demands of enterprise and high-performance computing. The further growth of BIOS is restricted by significant architectural limitations. One major architectural restraint is that BIOS runs in 16-bit processor mode, causing the following functionality limitations: Generally, only 1 MB of memory is addressable at any time. The space for PCI option ROMs and how much code they can run are limited, restricting both the number of adapters that can be installed (approximately four) and how much functionality they can contain. Space for advanced BIOS functionality is limited. The firmware image is monolithic and non-modular. Although much of the x86 processor, memory, and I/O technology has greatly evolved over the past 30 years, the system BIOS has remained essentially unchanged. The original BIOS was not intended to accommodate server technologies such as scalable multiway systems, advanced power and energy management and capping, remote console, or systems management.
Page 4
POST
SEC CRTM CAR RC PEI BDS Boot Device App
Pre-Boot
CSM
Legacy Tables Legacy PCI
ROMs
Runtime
Legacy HV/OS
CRTM
UEFI OS Loader
FSB/CSI Memory DXE 64-bit Busses Drivers Setup UEFI Shell Application
UEFI HV/OS
EFI Boot/Runtime Services System Tables: ACPI, SMBIOS, UEFI System Management Mode
Consoles
Integrated Management Module (includes BMC, RSA, SIO, SPI+FLASH, TPM, USB, Video Functions)
Page 5
Page 6
Notes: IBM System x Server Firmware supports both boot processes through the System x boot manager with the limitation that BIOS booting is terminal; that is, when the compatibility support module (CSM) is invoked for a boot, the system cannot return to the UEFI boot manager. In UEFI bootable media, the main UEFI boot loader is usually at \efi\boot\bootx64.efi. It must be at that location if the firmware is to boot it automatically without requiring that you manually add a boot option for where the applicable boot loader binary is located and named. Any valid UEFI boot loader at efi\boot\bootx64.efi will be invoked when the boot option for the device is enumerated.
Page 7
* If there is no Legacy Only flag in the boot order list, the boot manager gives preference to booting dual-boot media as UEFI. If you insert the Legacy Only flag above a boot target in the boot order list, that media will be forced into a BIOS boot. Note: All UEFI bootable media must be FAT formatted. Legacy Only is not a boot option but a flag that indicates to the firmware that any generic boot options below it in the boot order list should be BIOS booted, even if they could be UEFI booted. There are two designed reasons for the Legacy Only option: To force a CD/DVD BIOS installation for a dual-boot CD or DVD To boot to a hard disk that is not visible to the EFI environment (a non-IBM disk controller without EFI firmware) CD or DVD: Partitions are described by a table of contents that indicates whether those partitions are bootable, and if they are, which architecture (BIOS x86 or UEFI). Notes: The Microsoft Windows Server 2008 installation DVD contains two bootable partitions: one for BIOS x86 and one for UEFI. Some versions of SLES 11 installation media contain two bootable partitions; however, both are designated for BIOS x86 and therefore will be booted through the BIOS compatibility mechanism. Diskette: Diskettes use a FAT file system, and they are not able to store a large amount of data. However, a diskette is tested to determine whether it is bootable, and if it is, the server goes into BIOS mode to boot the diskette. Note that a formatted diskette always appears to be bootable, even if it has no DOS or other bootable image; therefore, the presence of a diskette in the drive causes the server to attempt to boot it. Remove any diskette from the drive before you boot the server unless you intend to boot from it. USB storage: USB storage is similar to a hard disk in that it has an MBR. However, because it is removable media, the specification allows for USB storage to include a \efi\boot\bootx64.efi file. If a USB key contains the file, it is EFI bootable. You can place a fullshell.efi file on a USB key and rename it to \efi\boot\bootx64.efi. Then, if you boot to the USB key, it EFI boots to the shell. If there is no \efi\boot\bootxX64.efi file on the USB key, the UEFI boot manager examines the MBR, and if it is designated as bootable, the server goes into BIOS mode and boots the USB key. (See Starting the UEFI shell for information about obtaining and running the shell environment.)
Page 8
Hard disk: A BIOS-bootable operating system can be installed only to a master boot record (MBR) partition, and an EFI-bootable operating system can be installed only to a GPT partition. MBR partitions and GPT partitions may not coexist on the same volume. Therefore, if a selected partition is MBR, it is BIOS-booted; if it is GPT, it is EFI-booted. Network: The server first attempts an EFI network boot. If that fails, the server passes control to the compatibility source module (CSM) to attempt a BIOS network boot. You can configure the iSCSI and PXE settings through the Setup utility (System Settings Network panel). You can specify Legacy, UEFI, Both, or None. Note: A UEFI firmware update that is available in 4Q of 2009 might be required to enable network boots of UEFI operating systems to boot without specific boot options. This might happen in deployment scenarios in which the booting system is not the one on which the operating system was installed. This generic media path boot support is specified only for removable media in the UEFI 2.1 specification; it has been generalized in the UEFI 2.3 specification. Embedded hypervisor: A hypervisor is a USB key with a specific vendor ID/product ID (VID/PID). It is excluded from processing in the USB storage entry, and USB keys are excluded when the Embedded Hypervisor entry is processed. An embedded hypervisor key can be installed internally or externally.
Page 9
Operating-system deployment
The UEFI boot manager processes devices in the boot order list, one at a time, as it searches for a potential bootable device. If the boot manager detects a UEFI-bootable device, it attempts to boot that device. If that attempt fails, the boot manager returns to the boot order list. For most devices, the boot manager goes to the next device and tries again. For PXE and iSCSI, the boot manager checks for Legacy at this time. If the firmware detects that the boot target is only BIOS bootable (that is, it has only a bootable MBR), it will take the current boot order list and perform the same step as Legacy Only, and transition to legacy mode. Example: The boot order is as follows: 1. DVD 2. Hard disk drive 0 (formatted with a bootable BIOS MBR) 3. USB The UEFI boot manager inspects for a DVD and determines that no DVD is present. Next, the boot manager attempts to inspect hard disk drive 0. If the boot manager successfully inspects hard disk drive 0 and determines that it is has a bootable BIOS MBR, the boot manager sends the boot order list to the compatibility support module (CSM), unloads UEFI from memory, and starts the CSM for a BIOS boot. However, if the boot manager is unable to inspect hard disk drive 0 (for example, because it is managed by an atypical legacy storage adapter that does not have a UEFI device driver and cannot have UEFI support emulated through thunking), the boot manager does not recognize a BIOS operating system. In this case, you must manually add the Legacy Only flag above HardDrive0 to instruct the boot manager to assume that a BIOS operating system is associated with hard disk drive 0. For information about adapter support issues and use of the Legacy Only flag, see BIOS support and Optimizing boot-time performance. Notes: Before attempting to install a UEFI-aware operating system on a hard disk that is already formatted with an MBR, you must delete all partitions from the disk or reformat the disk with GPT. The UEFI 2.4 specification allows the UEFI boot manager to look in \efi\boot\bootx64.efi for a valid UEFI boot loader on a hard disk drive when no specific boot loader is specified in the boot option, because a generic boot option (such as HardDrive0) or a partial media path is being used. Earlier UEFI specifications provide this capability only for removable media such as USB keys.
Page 10
Page 11
BIOS support
The IBM Surepath BIOS compatibility support module (CSM) is packaged with IBM System x Server Firmware, allowing for time-proven BIOS support. This module allows non-UEFIcompliant adapters and boot devices to be used as part of the boot process and to boot non-UEFIcompliant operating systems. It also provides the CSM Compatible16 following functionality: It allows the use of specific PCI adapters that have only a legacy option ROM to function in the UEFI preboot environment. (this compatibility support is limited to PCI storage or video devices). It allows the installation and use of nonUEFI-compliant (BIOS) operating systems.
Thunk-to-16bit
Thunk-to-64bit
The CSM provides the ability for IBM System x Legacy OPROM (16bit code) Server Firmware implementations to use and interact with devices that are controlled by legacy Figure 2; Thunking Explained in the context of option ROMs and to boot to a BIOS operating executing legacy code from a Legacy Option ROM system. IBM System x Server Firmware does this by creating a 16-bit BIOS environment that contains the necessary data structures and interfaces to allow legacy code to run. The CSM is not a full BIOS implementation; it provides the minimum functionality that is necessary for BIOS option ROM execution and booting a BIOS operating system. The CSM has the following key features: Allocates memory below 1 MB for legacy use Locates and loads the Compatibility16 image into memory Initializes BDA, EBDA, and CMOS with the correct values Provides a thunk interface for communication with Compatibility16 Produces the necessary tables (MPS, PCIIRQ, APCI, SMBIOS) Converts the UEFI memory map into E820 format Locates load and execute legacy PCI option ROMs Determines boot devices Sets up hardware for legacy operating system use Interface with setup USB legacy SMM handler interface Operating-system deployment and boot There are two scenarios in which the CSM is involved in booting an operating system: o The CSM supports installing and booting into a UEFI-compliant operating system when a supported hardware device is being controlled by a PCI option ROM through the UEFI thunk driver. The CSM supports installing and booting to supported BIOS operating systems.
UEFI-compliant operating systems The CSM is responsible only for providing an environment in which a legacy option ROM can be installed and executed. BIOS operating systems The CSM is responsible for providing a complete operating environment that is compatible with what BIOS would provide.
Page 12
Page 13
Optimal scenario
The best way to ensure the fastest boot time is to use UEFI-compliant adapters and a UEFIaware operating system. The following figure illustrates the firmware interactions of an adapter with both a UEFI-compliant device driver and legacy ROM. The legacy code of the adapter is never invoked; therefore, the time penalty of that initialization is not incurred. Because the server is booting a UEFI operating system, there is no need for BIOS compatibility for this boot.
Optimal scenario: Default dual BIOS/UEFI-compatibility adapter behavior during a UEFI boot
Page 14
Page 15
Optimized BIOS boot scenario: Adapter behavior with UEFI support disabled on UEFI/BIOS adapter ROM during a BIOS boot
Page 16
Page 17
Adapter and add-on device configuration management Driver Configuration Protocol (DCP)
You can configure UEFI 2.0 and earlier EFI-compliant adapters by using the Setup utility (System Settings Adapter and UEFI Drivers). To display all the driver instances that support DCP, press Enter when refresh list is displayed. To start the DCP user interface for a driver, highlight the driver and press Enter.
Legacy adapters
You can manage adapters that do not have UEFI or EFI device drivers by using escape sequences, such as Ctrl+A, during the POST/handoff process (as you would with BIOS-based servers). Note: Some adapters can be managed through both the DCP and the HII Configuration Access Protocol. See the adapter documentation for information about which one to use.
Built-In Settings (DCP) UEFI < 2.1 Drivers UEFI 2.1+ Drivers (HII)
Page 18
Page 19
3. Use one of the following procedures to switch the server back to the primary bank: Disconnect the server from ac power. Wait 15 seconds, and then reconnect the server to power. Restart the server and press F3 when the splash screen is displayed. Three consecutive boot failure (for UEFI Firmware Build Dates prior to 2/02/2010): If the server is unable to complete the UEFI Pre-Boot process three times in a row, the server will restore default settings and automatically enter F1 Setup where the customer can resolve the potential configuration issue(s) and reboot the system. Note: IPMI tools can be used to remotely recovery systems experiencing three boot failures, Configuration Updates can be remotely accomplished via ASU. IPMI System Power events (reset, power off then on) will restore the system to the current customer-settings.
Three consecutive boot failure (for UEFI Firmware Build Dates of 2/02/2010 and greater): If the server is unable to complete the UEFI Pre-Boot process three times in a row, the server will temporarily use default settings and give the customer an opportunity to enter F1 Setup and fix the potential configuration issue(s). If the user does not press F1 to enter setup, the system will reboot with the customer-saved settings. If the system is still unable to successfully POST after three attempts, the second three-boot failure be triggered, the system will POST using defaultsettings and the customer will again prompted to enter F1 Setup. If the three consecutive boot failure recovery code is invoked three times in a row (for a total of nine boot attempts with customer-settings and three boots using default settings), the system will issue a fatal configuration error event and power off. Configuration errors can be corrected remotely via ASU. If the system has already shut-down after excessive boot attempts, it can be remotely powered on using IMM/AMM web, CLI, or IPMI power commands. Note: Pre-Boot hangs are typically associated newly added hardware, a recent configuration change or repeated power interruptions.
Page 20
Page 21
Page 22
Page 23
Page 24
Page 25
To add the Legacy Only flag to the boot order list, complete the following steps: 1. Restart the server and press F1 to start the Setup utility. 2. Select Boot Manager. 3. Select Add Boot Option or Add WOL Boot Option. 4. Select Legacy Only and press Enter. The Legacy Only flag is added to the end of the boot order list. 5. Select Change Boot Order or Change WOL Boot Order and press Enter. 6. Highlight Legacy Only and press + until the Legacy Only flag is above the first boot target to which the Legacy Only flag applies. Press Enter. 7. Select Commit Changes and press Enter. 8. Exit from the Setup utility.
Page 26
General UEFI checkpoint ranges: 0x00-0x0F Hardware/CPU init code 0x10-0x1F PEI phase device drivers 0x20-0x9E DXE phase device drivers 0xA0-0xAF QPI init status 0xB0-0xBF Memory init status 0xC0-0xFF Miscellaneous discrete events Select specific error checkpoints: 0xE0-E5 Processor/BUS Initialization Failure 0xE8 No memory detected or available (confirm the MEM and CFG LEDs also) 0xED Invalid Mixed DIMM Configuration 0xEE Invalid DIMM Population 0x9F POST complete Note: Caution should be exercised when interpreting checkpoint values, as multiple hardware, firmware and adapters can issue checkpoints, it may not be clear who the issuing entity was. For example; Memory events, the checkpoint data should be correlated with the presence of MEM light on the diagnostics panel and memory event(s) in the System Event Log.
Page 27
Legal Information
IBM Corporation 2010 IBM Systems and Technology Group Dept. U2SA 3039 Cornwallis Road Research Triangle Park, NC 27709 Produced in the USA January 2010 All rights reserved For a copy of applicable product warranties, write to: Warranty Information, P.O. Box 12195, RTP, NC 27709, Attn: Dept. JDJA/B203. IBM makes no representation or warranty regarding third-party products or services including those designated as ServerProven or ClusterProven. Telephone support may be subject to additional charges. For onsite labor, IBM will attempt to diagnose and resolve the problem remotely before sending a technician. IBM, the IBM logo, and ibm.com are trademarks or registered trademarks of International Business Machines Corporation in the United States, other countries, or both. If these and other IBM trademarked terms are marked on their first occurrence in this information with a trademark symbol ( or ), these symbols indicate U.S. registered or common law trademarks owned by IBM at the time this information was published. Such trademarks may also be registered or common law trademarks in other countries. A current list of IBM trademarks is available on the Web at Copyright and trademark information at http://ibm.com/legal/copytrade.shtml. Intel, Intel Xeon, Itanium, and Pentium are trademarks or registered trademarks of Intel Corporation or its subsidiaries in the United States and other countries. Linux is a registered trademark of Linus Torvalds in the United States, other countries, or both. Microsoft, Windows, and Windows NT are trademarks of Microsoft Corporation in the United States, other countries, or both. Other company, product, or service names may be trademarks or service marks of others. IBM reserves the right to change specifications or other product information without notice. References in this publication to IBM products or services do not imply that IBM intends to make them available in all countries in which IBM operates. IBM PROVIDES THIS PUBLICATION AS IS WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. Some jurisdictions do not allow disclaimer of express or implied warranties in certain transactions; therefore, this statement may not apply to you. This publication may contain links to third party sites that are not under the control of or maintained by IBM. Access to any such third party site is at the user's own risk and IBM is not responsible for the accuracy or reliability of any information, data, opinions, advice or statements made on these sites. IBM provides these links merely as a convenience and the inclusion of such links does not imply an endorsement. Information in this presentation concerning non-IBM products was obtained from the suppliers of these products, published announcement material or other publicly available sources. IBM has not tested these products and cannot confirm the accuracy of performance, compatibility or any other claims related to non-IBM products. Questions on the capabilities of non-IBM products should be addressed to the suppliers of those products. MB, GB and TB = 1,000,000, 1,000,000,000 and 1,000,000,000,000 bytes, respectively, when referring to storage capacity. Accessible capacity is less; up to 3 GB is used in service partition. Actual storage capacity will vary based upon many factors and may be less than stated. Performance is in Internal Throughput Rate (ITR) ratio based on measurements and projections using standard IBM benchmarks in a controlled environment. The actual throughput that any user will experience will depend on considerations such as the amount of multiprogramming in the users job stream, the I/O configuration, the storage configuration and the workload processed. Therefore, no assurance can be given that an individual user will achieve throughput improvements equivalent to the performance ratios stated here. Maximum internal hard disk and memory capacities may require the replacement of any standard hard drives and/or memory and the population of all hard disk bays and memory slots with the largest currently supported drives available. When referring to variable speed CD-ROMs, CD-Rs, CD-RWs and DVDs, actual playback speed will vary and is often less than the maximum possible.
XSW02525-USEN-00