Unified Extensible Firmware Interface Specification
Version 2.1Integrates approved Errata and amplifications through October 1, 2008
Note: Added a number of amplifications. These additions are not errata. They clarify particular topics which previously might have been abstract or obscure.
Unified Extensible Firmware Interface Specification
Acknowledgements
The material contained herein is not a license, either expressly or impliedly, to any intellectual property owned or controlled by any of the authors or developers of this material or to any contribution thereto. The material contained herein is provided on an "AS IS" basis and, to the maximum extent permitted by applicable law, this information is provided AS IS AND WITH ALL FAULTS, and the authors and developers of this material hereby disclaim all other warranties and conditions, either express, implied or statutory, including, but not limited to, any (if any) implied warranties, duties or conditions of merchantability, of fitness for a particular purpose, of accuracy or completeness of responses, of results, of workmanlike effort, of lack of viruses and of lack of negligence, all with regard to this material and any contribution thereto. Designers must not rely on the absence or characteristics of any features or instructions marked "reserved" or "undefined." The Unified EFI Forum, Inc. reserves any features or instructions so marked for future definition and shall have no responsibility whatsoever for conflicts or incompatibilities arising from future changes to them. ALSO, THERE IS NO WARRANTY OR CONDITION OF TITLE, QUIET ENJOYMENT, QUIET POSSESSION, CORRESPONDENCE TO DESCRIPTION OR NON-INFRINGEMENT WITH REGARD TO THE SPECIFICATION AND ANY CONTRIBUTION THERETO. IN NO EVENT WILL ANY AUTHOR OR DEVELOPER OF THIS MATERIAL OR ANY CONTRIBUTION THERETO BE LIABLE TO ANY OTHER PARTY FOR THE COST OF PROCURING SUBSTITUTE GOODS OR SERVICES, LOST PROFITS, LOSS OF USE, LOSS OF DATA, OR ANY INCIDENTAL, CONSEQUENTIAL, DIRECT, INDIRECT, OR SPECIAL DAMAGES WHETHER UNDER CONTRACT, TORT, WARRANTY, OR OTHERWISE, ARISING IN ANY WAY OUT OF THIS OR ANY OTHER AGREEMENT RELATING TO THIS DOCUMENT, WHETHER OR NOT SUCH PARTY HAD ADVANCE NOTICE OF THE POSSIBILITY OF SUCH DAMAGES.
Copyright 2006, 2007, 2008 Unified EFI, Inc. All Rights Reserved.
ii Errata and amplifications through October 1, 2008 Version 2.1
Revision History
Revision Revision History (numbers = Mantis ticket numbers) Date2.0 First release of specification. January 31,
2006
2.1 Second release January 23, 2007
2.1a UEFI 2.1 incorporating Errata through 4-27-07 April 27, 2007
2.1b 51 Long physical blocks updates December 11, 2007
2.1b 156 SendForm API Errata December 11, 2007
2.1b 158 Errata to the UEFI 2.1 configuration sections December 11, 2007
2.1b 159 Adjust some of the #define names in the Simple Text Input Ex protocol December 11, 2007
2.1b 160 Clean up references to PCIR December 11, 2007
2.1b 162 UEFI PIWG Device Path Errata December 11, 2007
2.1b 164 Update to USB2_HC_PROTOCOL Table December 11, 2007
2.1b 165 Fix EFI_GRAPHICS_OUTPUT_PIXEL December 11, 2007
2.1b 168 Remove LOAD_OPTION_GRAPHICS December 11, 2007
2.1b 170 (Addition of) Driver Family Override Protocol December 11, 2007
2.1b 172 Typo for ResetSystem() December 11, 2007
2.1b 173 Minor changes to the description of two of the fields in the Common Platform Error Record, in Appendix N
December 11, 2007
2.1b 174 Error record addition for dma remapping units December 11, 2007
2.1b 175 Update to SendForm API December 11, 2007
2.1b 177 remove ending paragraph (editing text) in section 9.6 December 11, 2007
2.1b 181 Correct MNP GUID collision December 11, 2007
2.1b 182 Clarify EFI_MTFTP4_TOKEN December 11, 2007
Unified Extensible Firmware Interface Specification
2.1b 184 SNIA/DDF Wording Update December 11, 2007
2.1b 185 Change EFI term to UEFI for consistency December 11, 2007
2.1b 186 change PCIR struct to match PCI FW Spec 3.0 December 11, 2007
2.1b 187 Clarify input protocols. December 11, 2007
2.1b 190 Extensive errata form UCST including OP codes changes ro resolve conflicts.
December 11, 2007
2.1b 197 EFI Loaded Image Device Path Protocol December 11, 2007
2.1b 205 Change LoadImage() parameter name from FilePath to DevicePath; ends confusion with EFI_LOADED_IMAGE_PROTOCOL
December 11, 2007
2.1c 52 New GUID for Driver Diagnostics and Driver Configuration Protocols with new GUID
June 5, 2008
2.1c 54 ACPI Table Protocol GUID Update June 5, 20082.1c 55 Clarification on UpdateCapsule June 5, 2008
2.1c 56 Clarification on ResetSystem June 5, 2008
2.1c 57 Clarify text for Extended SCSI Pass Thru Protocol.GetNextTargetLun() June 5, 2008
2.1c 58 Language update for EfiReservedMemory type usage June 5, 2008
2.1c 59 Add return code to Diagnostics Protocol June 5, 2008
2.1c 60 iSCSI Device Path Update June 5, 2008
2.1c 189 Graphics Output Protocol clarification June 5, 2008
2.1c 193 Loaded Image device paths for EFI Drivers loaded from PCI Option ROMs June 5, 2008
2.1c 203 Platform Error Record - x64 register state errata June 5, 2008
2.1c 206 Clarify return values for extended scsi passthru protocol June 5, 2008
2.1c 207 Updated Wording for the File Path June 5, 2008
2.1c 208 Driver Protocol Names and GUIDs June 5, 2008
2.1c 209 ESP number/location clarifications June 5, 2008
2.1c 213 UEFI HII Errata June 5, 2008
2.1c 214 Device_IO + typos June 5, 2008
2.1c 216 UEFI 2.1 text corrections June 5, 2008
2.1c 217 EFI_PLATFORM_TO_DRIVER_CONFIGURATION_PROTOCOL.Query() Update
June 5, 2008
2.1c 218 SATA update to section 9.3.5.6 June 5, 2008
2.1c 219 IA-32 and x64 stack need to be 16-byte aligned June 5, 2008
2.1c 220 Replace references to RFC 3066 to RFC 4646 June 5, 2008
2.1c 221Image Block Structure name typos in 27.3.7.2 June 5, 2008
2.1c 244 Replace references to EFI_FIRMWARE_VOLUME_INFO_PPI with EFI_PEI_FIRMWARE_VOLUME_INFO_PPI
June 5, 2008
iv Errata and amplifications through October 1, 2008 Version 2.1
2.1c 245 Remove extraneous text in Chapter 29 June 5, 2008
2.1c 246 New return code June 5, 2008
2.1c 248 Correction to text in Chapter 8.2 of UEFI 2.1b June 5, 2008
2.1c 249 Latest update to UCST Errata list June 5, 2008
2.1c 266 PKCS11.5 structure does not correctly specify the portion of the cited RFC that pertains to the certificate struct/algorithm
June 5, 2008
2.1c 278 Change references to EFI_SIMPLE_INPUT_PROTOCOL into EFI_SIMPLE_TEXT_INPUT_PROTOCOL
June 5, 2008
2.1c 280 Some minor errata to keyboard related topics June 5, 20082.1c 281 Runtime memory allocation June 5, 2008
2.1c 283 Minor update to clarify a typedef/return code in HII June 5, 20082.1c Re-format Revision History from bulleted lists to one row per Mantis ticket/
Engineering Change RequestJune 5, 2008
2.1d 293 Write-Authenticated Variable Errata October 1, 2008
2.1d 309 IPv6 Address display format clarification October 1, 2008
2.1d 316 Corrections to iSCSI Device Path description October 1, 2008
2.1d 327clarify the support in DHCP4 protocol for "Inform" (DHCPINFORM) messages.
October 1, 2008
2.1d 330 EFI_IFR_REF: Change cross reference to a question October 1, 2008
2.1d 331Correct missing definition for EFI_BROWSER_ACTION. October 1, 2008
2.1d 332 For the SendForm description, correct Type, PackageGuid and FormsetGuid parameters
October 1, 2008
2.1d 333 Correct several #define statements for EFI_GUIDs incorrectly place a ';' at the end
October 1, 2008
Unified Extensible Firmware Interface Specification
vi Errata and amplifications through October 1, 2008 Version 2.1
Contents
Acknowledgements iiRevision History iiiContents viiFigures xxxiTables xxxv1
Introduction..................................................................................................... 11.1 UEFI Driver Model Extensions.......................................................................................... 11.2 Overview ........................................................................................................................... 21.3 Goals................................................................................................................................. 51.4 Target Audience................................................................................................................ 71.5 UEFI Design Overview...................................................................................................... 71.6 UEFI Driver Model ............................................................................................................ 9
1.6.1 UEFI Driver Model Goals ...................................................................................... 91.6.2 Legacy Option ROM Issues ................................................................................ 10
1.7 Migration Requirements.................................................................................................. 101.7.1 Legacy Operating System Support ..................................................................... 101.7.2 Supporting the UEFI Specification on a Legacy Platform ................................... 11
1.8 Conventions Used in this Document............................................................................... 111.8.1 Data Structure Descriptions ................................................................................ 111.8.2 Protocol Descriptions .......................................................................................... 111.8.3 Procedure Descriptions....................................................................................... 121.8.4 Instruction Descriptions....................................................................................... 121.8.5 Pseudo-Code Conventions ................................................................................. 121.8.6 Typographic Conventions ................................................................................... 13
2 Overview........................................................................................................ 152.1 Boot Manager ................................................................................................................. 15
2.1.1 UEFI Images ....................................................................................................... 162.1.2 Applications......................................................................................................... 172.1.3 UEFI OS Loaders................................................................................................ 172.1.4 UEFI Drivers........................................................................................................ 18
2.2 Firmware Core ................................................................................................................ 182.2.1 UEFI Services ..................................................................................................... 182.2.2 Runtime Services ................................................................................................ 19
2.3 Calling Conventions ........................................................................................................ 202.3.1 Data Types.......................................................................................................... 202.3.2 IA-32 Platforms ................................................................................................... 222.3.3 Intel® Itanium®-Based Platforms......................................................................... 242.3.4 x64 Platforms ...................................................................................................... 26
Errata and amplifications through October 1, 2008
Unified Extensible Firmware Interface Specification
2.4 Protocols ......................................................................................................................... 282.5 UEFI Driver Model .......................................................................................................... 33
2.5.1 Legacy Option ROM Issues ................................................................................ 342.5.2 Driver Initialization............................................................................................... 362.5.3 Host Bus Controllers ........................................................................................... 382.5.4 Device Drivers..................................................................................................... 402.5.5 Bus Drivers.......................................................................................................... 412.5.6 Platform Components ......................................................................................... 432.5.7 Hot-Plug Events .................................................................................................. 442.5.8 EFI Services Binding........................................................................................... 44
2.6 Requirements.................................................................................................................. 462.6.1 Required Elements.............................................................................................. 462.6.2 Platform-Specific Elements ................................................................................ 472.6.3 Driver-Specific Elements..................................................................................... 48
3 Boot Manager................................................................................................ 513.1 Firmware Boot Manager ................................................................................................. 51
3.1.1 Boot Manager Programming ............................................................................... 523.1.2 Load Option Processing...................................................................................... 523.1.3 Load Options....................................................................................................... 533.1.4 Boot Manager Capabilities .................................................................................. 553.1.5 Launching Boot#### Applications....................................................................... 553.1.6 Launching Boot#### Load Options Using Hot Keys ........................................... 56
3.2 Globally Defined Variables.............................................................................................. 583.3 Boot Option Variables Default Boot Behavior ................................................................. 603.4 Boot Mechanisms ........................................................................................................... 61
3.4.1 Boot via the Simple File Protocol ........................................................................ 613.4.2 Boot via LOAD_FILE PROTOCOL...................................................................... 62
4 EFI System Table.......................................................................................... 634.1 UEFI Image Entry Point .................................................................................................. 63
EFI_IMAGE_ENTRY_POINT.............................................................................. 634.2 EFI Table Header ........................................................................................................... 64
EFI_TABLE_HEADER ........................................................................................ 654.3 EFI System Table .......................................................................................................... 66
EFI_SYSTEM_TABLE......................................................................................... 664.4 EFI Boot Services Table ................................................................................................ 67
EFI_BOOT_SERVICES ...................................................................................... 684.5 EFI Runtime Services Table .......................................................................................... 72
EFI_RUNTIME_SERVICES ................................................................................ 724.6 EFI Configuration Table ................................................................................................. 74
EFI_CONFIGURATION_TABLE ......................................................................... 744.7 Image Entry Point Examples........................................................................................... 75
4.7.1 Image Entry Point Examples............................................................................... 764.7.2 UEFI Driver Model Example ............................................................................... 774.7.3 UEFI Driver Model Example (Unloadable) .......................................................... 78
viii Errata and amplifications through October 1, 2008 Version 2.1
4.7.4 EFI Driver Model Example (Multiple Instances) .................................................. 79
5 GUID Partition Table (GPT) Format............................................................. 835.1 EFI Partition Formats ...................................................................................................... 835.2 LBA 0 Format.................................................................................................................. 83
5.2.1 Legacy Master Boot Record (MBR) .................................................................... 835.2.2 Protective Master Boot Record .......................................................................... 85
5.3 GUID Partition Table (GPT) Format................................................................................ 855.3.1 GUID Format overview........................................................................................ 855.3.2 GPT Partition Table Header................................................................................ 885.3.3 GUID Partition Entry Array .................................................................................. 90
6 Services — Boot Services ........................................................................... 936.1 Event, Timer, and Task Priority Services........................................................................ 94
CreateEvent() ...................................................................................................... 98CreateEventEx()................................................................................................ 102CloseEvent()...................................................................................................... 105SignalEvent()..................................................................................................... 106WaitForEvent() .................................................................................................. 107CheckEvent()..................................................................................................... 109SetTimer() ......................................................................................................... 110RaiseTPL() ........................................................................................................ 112RestoreTPL()..................................................................................................... 114
6.2 Memory Allocation Services.......................................................................................... 114AllocatePages() ................................................................................................. 117FreePages() ...................................................................................................... 120GetMemoryMap() .............................................................................................. 121AllocatePool() .................................................................................................... 125FreePool() ......................................................................................................... 126
6.3 Protocol Handler Services ............................................................................................ 1266.3.1 Driver Model Boot Services............................................................................... 128
InstallProtocolInterface() ................................................................................... 131UninstallProtocolInterface() ............................................................................... 133ReinstallProtocolInterface() ............................................................................... 135RegisterProtocolNotify() .................................................................................... 137LocateHandle().................................................................................................. 139HandleProtocol() ............................................................................................... 141LocateDevicePath()........................................................................................... 143OpenProtocol() .................................................................................................. 145CloseProtocol().................................................................................................. 152OpenProtocolInformation() ................................................................................ 154ConnectController() ........................................................................................... 156DisconnectController()....................................................................................... 160ProtocolsPerHandle() ........................................................................................ 163LocateHandleBuffer() ........................................................................................ 165LocateProtocol() ................................................................................................ 168
Errata and amplifications through October 1, 2008
Unified Extensible Firmware Interface Specification
InstallMultipleProtocolInterfaces() ..................................................................... 169UninstallMultipleProtocolInterfaces()................................................................. 170
6.4 Image Services ............................................................................................................. 170LoadImage() ...................................................................................................... 173StartImage() ...................................................................................................... 176UnloadImage()................................................................................................... 178EFI_IMAGE_ENTRY_POINT............................................................................ 179Exit() .................................................................................................................. 181ExitBootServices()............................................................................................. 183
6.5 Miscellaneous Boot Services ........................................................................................ 184SetWatchdogTimer() ......................................................................................... 185Stall() ................................................................................................................. 187CopyMem()........................................................................................................ 188SetMem()........................................................................................................... 189GetNextMonotonicCount()................................................................................. 190InstallConfigurationTable() ................................................................................ 191CalculateCrc32() ............................................................................................... 193
7 Services — Runtime Services ................................................................... 1957.1 Runtime Services Rules and Restrictions..................................................................... 196
7.1.1 Exception for Machine Check, INIT, and NMI. .................................................. 1967.2 Variable Services .......................................................................................................... 197
GetVariable() ..................................................................................................... 199GetNextVariableName() .................................................................................... 201SetVariable() ..................................................................................................... 203QueryVariableInfo() ........................................................................................... 208
7.2.1 Hardware Error Record Persistence ................................................................. 2097.3 Time Services ............................................................................................................... 210
GetTime() .......................................................................................................... 211SetTime()........................................................................................................... 214GetWakeupTime() ............................................................................................. 215SetWakeupTime() ............................................................................................. 216
7.4 Virtual Memory Services ............................................................................................... 217SetVirtualAddressMap() .................................................................................... 218ConvertPointer() ................................................................................................ 220
7.5 Miscellaneous Runtime Services .................................................................................. 2217.5.1 Reset System.................................................................................................... 221
ResetSystem()................................................................................................... 2227.5.2 Get Next High Monotonic Count ....................................................................... 223
GetNextHighMonotonicCount() ......................................................................... 2247.5.3 Update Capsule ................................................................................................ 225
UpdateCapsule() ............................................................................................... 226QueryCapsuleCapabilities() .............................................................................. 231
8 Protocols — EFI Loaded Image................................................................. 2338.1 EFI Loaded Image Protocol .......................................................................................... 233
x Errata and amplifications through October 1, 2008 Version 2.1
EFI_LOADED_IMAGE_PROTOCOL ................................................................ 233EFI_LOADED_IMAGE_PROTOCOL.Unload() ................................................. 235
8.2 EFI Loaded Image Device Path Protocol...................................................................... 235EFI_LOADED_IMAGE_DEVICE_PATH_PROTOCOL ..................................... 235
9 Protocols — Device Path Protocol ........................................................... 2379.1 Device Path Overview................................................................................................... 2379.2 EFI Device Path Protocol .............................................................................................. 237
EFI_DEVICE_PATH_PROTOCOL.................................................................... 2379.3 Device Path Nodes ....................................................................................................... 238
9.3.1 Generic Device Path Structures........................................................................ 2399.3.2 Hardware Device Path ...................................................................................... 2409.3.3 ACPI Device Path ............................................................................................. 2429.3.4 ACPI _ADR Device Path................................................................................... 2449.3.5 Messaging Device Path .................................................................................... 2459.3.6 Media Device Path ............................................................................................ 2579.3.7 BIOS Boot Specification Device Path ............................................................... 261
9.4 Device Path Generation Rules...................................................................................... 2629.4.1 Housekeeping Rules ......................................................................................... 2629.4.2 Rules with ACPI _HID and _UID....................................................................... 2629.4.3 Rules with ACPI _ADR...................................................................................... 2639.4.4 Hardware vs. Messaging Device Path Rules .................................................... 2639.4.5 Media Device Path Rules.................................................................................. 2649.4.6 Other Rules ....................................................................................................... 264
9.5 Device Path Utilities Protocol ........................................................................................ 264EFI_DEVICE_PATH_UTILITIES_PROTOCOL................................................. 264EFI_DEVICE_PATH_UTILITIES_PROTOCOL.GetDevicePathSize() .............. 266EFI_DEVICE_PATH_UTILITIES_PROTOCOL.DuplicateDevicePath() ............ 267EFI_DEVICE_PATH_UTILITIES_PROTOCOL.AppendDevicePath()............... 268EFI_DEVICE_PATH_UTILITIES_PROTOCOL.AppendDeviceNode() ............. 269EFI_DEVICE_PATH_UTILITIES_PROTOCOL.AppendDevicePathInstance() . 270EFI_DEVICE_PATH_UTILITIES_PROTOCOL.GetNextDevicePathInstance() 271EFI_DEVICE_PATH_UTILITIES_PROTOCOL.CreateDeviceNode() ............... 272EFI_DEVICE_PATH_UTILITIES_PROTOCOL.IsDevicePathMultiInstance() ... 273
9.6 EFI Device Path Display Format Overview................................................................... 2739.6.1 Design Discussion............................................................................................. 2739.6.2 Device Path to Text Protocol............................................................................. 288
EFI_DEVICE_PATH_TO_TEXT_PROTOCOL ................................................. 288EFI_DEVICE_PATH_TO_TEXT_PROTOCOL.ConvertDeviceNodeToText()... 289EFI_DEVICE_PATH_TO_TEXT_PROTOCOL.ConvertDevicePathToText().... 290
9.6.3 Device Path from Text Protocol ........................................................................ 291EFI_DEVICE_PATH_FROM_TEXT_PROTOCOL............................................ 291EFI_DEVICE_PATH_FROM_TEXT_PROTOCOL.ConvertTextToDeviceNode() ...
292EFI_DEVICE_PATH_FROM_TEXT_PROTOCOL.ConvertTextToDevicePath() ....
293
Errata and amplifications through October 1, 2008
Unified Extensible Firmware Interface Specification
10 Protocols — UEFI Driver Model ................................................................ 29510.1 EFI Driver Binding Protocol......................................................................................... 295
EFI_DRIVER_BINDING_PROTOCOL.............................................................. 295EFI_DRIVER_BINDING_PROTOCOL.Supported() .......................................... 298EFI_DRIVER_BINDING_PROTOCOL.Start() ................................................... 304EFI_DRIVER_BINDING_PROTOCOL.Stop() ................................................... 312
10.2 EFI Platform Driver Override Protocol ........................................................................ 315EFI_PLATFORM_DRIVER_OVERRIDE_PROTOCOL..................................... 316EFI_PLATFORM_DRIVER_OVERRIDE_PROTOCOL.GetDriver().................. 318EFI_PLATFORM_DRIVER_OVERRIDE_PROTOCOL.GetDriverPath() .......... 320EFI_PLATFORM_DRIVER_OVERRIDE_PROTOCOL.DriverLoaded()............ 322
10.3 EFI Bus Specific Driver Override Protocol .................................................................. 323EFI_BUS_SPECIFIC_DRIVER_OVERRIDE_PROTOCOL .............................. 323EFI_BUS_SPECIFIC_DRIVER_OVERRIDE_PROTOCOL.GetDriver() ........... 325
10.4 EFI Driver Diagnostics Protocol .................................................................................. 326EFI_DRIVER_DIAGNOSTICS2_PROTOCOL .................................................. 326EFI_DRIVER_DIAGNOSTICS_PROTOCOL.RunDiagnostics()........................ 328
10.5 EFI Component Name Protocol .................................................................................. 330EFI_COMPONENT_NAME2_PROTOCOL....................................................... 330EFI_COMPONENT_NAME2_PROTOCOL.GetDriverName() .......................... 332EFI_COMPONENT_NAME2_PROTOCOL.GetControllerName() .................... 333
10.6 EFI Service Binding Protocol ...................................................................................... 334EFI_SERVICE_BINDING_PROTOCOL............................................................ 334EFI_SERVICE_BINDING_PROTOCOL.CreateChild() ..................................... 336EFI_SERVICE_BINDING_PROTOCOL.DestroyChild().................................... 340
10.7 EFI Platform to Driver Configuration Protocol ............................................................. 344EFI_PLATFORM_TO_DRIVER_CONFIGURATION_PROTOCOL .................. 344EFI_PLATFORM_TO_DRIVER_CONFIGURATION_PROTOCOL.Query() ..... 346EFI_PLATFORM_TO_DRIVER_CONFIGURATION_PROTOCOL.Response().....
34810.8 EFI Driver Supported EFI Version Protocol ................................................................ 352
EFI_DRIVER_SUPPORTED_EFI_VERSION_PROTOCOL............................. 35210.9 EFI Driver Family Override Protocol ........................................................................... 352
EFI_DRIVER_FAMILY_OVERRIDE_PROTOCOL ........................................... 352EFI_DRIVER_FAMILY_OVERRIDE_PROTOCOL.GetVersion ()..................... 354
11 Protocols — Console Support .................................................................. 35511.1 Console I/O Protocol................................................................................................... 355
11.1.1 Overview ......................................................................................................... 35511.1.2 ConsoleIn Definition ....................................................................................... 355
11.2 Simple Text Input Ex Protocol..................................................................................... 357EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL................................................. 357EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL.Reset().................................... 358EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL.ReadKeyStrokeEx()................ 359EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL.SetState() ............................... 362
xii Errata and amplifications through October 1, 2008 Version 2.1
EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL.RegisterKeyNotify() ................ 363EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL.UnregisterKeyNotify() ............. 365
11.3 Simple Text Input Protocol.......................................................................................... 365EFI_SIMPLE_TEXT_INPUT_PROTOCOL ....................................................... 365EFI_SIMPLE_TEXT_INPUT_PROTOCOL.Reset()........................................... 367EFI_SIMPLE_TEXT_INPUT_PROTOCOL.ReadKeyStroke()........................... 368
11.3.1 ConsoleOut or StandardError ......................................................................... 36811.4 Simple Text Output Protocol ....................................................................................... 369
EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL ................................................... 369EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL.Reset()....................................... 372EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL.OutputString()............................ 373EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL.TestString()................................ 376EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL.QueryMode() ............................. 377EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL.SetMode().................................. 378EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL.SetAttribute() ............................. 379EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL.ClearScreen() ............................ 381EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL.SetCursorPosition() ................... 382EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL.EnableCursor() .......................... 383
11.5 Simple Pointer Protocol .............................................................................................. 383EFI_SIMPLE_POINTER_PROTOCOL ............................................................. 383EFI_SIMPLE_POINTER_PROTOCOL.Reset()................................................. 386EFI_SIMPLE_POINTER_PROTOCOL.GetState()............................................ 387
11.6 EFI Simple Pointer Device Paths ............................................................................... 38811.7 Absolute Pointer Protocol ........................................................................................... 391
EFI_ABSOLUTE_POINTER_PROTOCOL ....................................................... 392EFI_ABSOLUTE_POINTER_PROTOCOL.Reset()........................................... 395EFI_ABSOLUTE_POINTER_PROTOCOL.GetState()...................................... 396
11.8 Serial I/O Protocol....................................................................................................... 397EFI_SERIAL_IO_PROTOCOL.......................................................................... 397EFI_SERIAL_IO_PROTOCOL.Reset() ............................................................. 401EFI_SERIAL_IO_PROTOCOL.SetAttributes() .................................................. 402EFI_SERIAL_IO_PROTOCOL.SetControl()...................................................... 404EFI_SERIAL_IO_PROTOCOL.GetControl() ..................................................... 406EFI_SERIAL_IO_PROTOCOL.Write() .............................................................. 407EFI_SERIAL_IO_PROTOCOL.Read() .............................................................. 408
11.9 Graphics Output Protocol............................................................................................ 40811.9.1 Blt Buffer ......................................................................................................... 409
EFI_GRAPHICS_OUTPUT_PROTOCOL......................................................... 410EFI_GRAPHICS_OUTPUT_PROTOCOL.QueryMode()................................... 415EFI_GRAPHICS_OUTPUT_PROTOCOL.SetMode() ....................................... 417EFI_GRAPHICS_OUTPUT_PROTOCOL.Blt() ................................................. 418EFI_EDID_DISCOVERED_PROTOCOL .......................................................... 420EFI_EDID_ACTIVE_PROTOCOL..................................................................... 421EFI_EDID_OVERRIDE_PROTOCOL ............................................................... 422EFI_EDID_OVERRIDE_PROTOCOL.GetEdid()............................................... 423
11.10 Rules for PCI/AGP Devices ...................................................................................... 424
Errata and amplifications through October 1, 2008
Unified Extensible Firmware Interface Specification
12 Protocols - Media Access .......................................................................... 42712.1 Load File Protocol ....................................................................................................... 427
EFI_LOAD_FILE_PROTOCOL ......................................................................... 427EFI_LOAD_FILE_PROTOCOL.LoadFile() ........................................................ 428
12.2 EFI_LOAD_FILE2_PROTOCOL................................................................................. 429EFI_LOAD_FILE2_PROTOCOL.LoadFile() ...................................................... 431
12.3 File System Format..................................................................................................... 43212.3.1 System Partition .............................................................................................. 43212.3.2 Partition Discovery .......................................................................................... 43412.3.3 Number and Location of System Partitions..................................................... 43612.3.4 Media Formats ................................................................................................ 436
12.4 Simple File System Protocol ....................................................................................... 438EFI_SIMPLE_FILE_SYSTEM_PROTOCOL..................................................... 438EFI_SIMPLE_FILE SYSTEM_PROTOCOL.OpenVolume().............................. 440
12.5 EFI File Protocol ......................................................................................................... 441EFI_FILE_PROTOCOL..................................................................................... 441EFI_FILE_PROTOCOL.Open()......................................................................... 443EFI_FILE_PROTOCOL.Close() ........................................................................ 445EFI_FILE_PROTOCOL.Delete() ....................................................................... 446EFI_FILE_PROTOCOL.Read() ......................................................................... 447EFI_FILE_PROTOCOL.Write() ......................................................................... 449EFI_FILE_PROTOCOL.SetPosition() ............................................................... 450EFI_FILE_PROTOCOL.GetPosition() ............................................................... 451EFI_FILE_PROTOCOL.GetInfo()...................................................................... 452EFI_FILE_PROTOCOL.SetInfo() ...................................................................... 454EFI_FILE_PROTOCOL.Flush()......................................................................... 456EFI_FILE_INFO................................................................................................. 456EFI_FILE_SYSTEM_INFO................................................................................ 458EFI_FILE_SYSTEM_VOLUME_LABEL............................................................ 458
12.6 Tape Boot Support...................................................................................................... 45912.6.1 Tape I/O Support............................................................................................. 45912.6.2 Tape I/O Protocol ............................................................................................ 460
EFI_TAPE_IO_PROTOCOL ............................................................................. 460EFI_TAPE_IO_PROTOCOL.TapeRead() ......................................................... 462EFI_TAPE_IO_PROTOCOL.TapeWrite() ......................................................... 464EFI_TAPE_IO_PROTOCOL.TapeRewind()...................................................... 466EFI_TAPE_IO_PROTOCOL.TapeSpace()........................................................ 467EFI_TAPE_IO_PROTOCOL.TapeWriteFM() .................................................... 469EFI_TAPE_IO_PROTOCOL.TapeReset() ........................................................ 470
12.6.3 Tape Header Format....................................................................................... 47012.7 Disk I/O Protocol ......................................................................................................... 472
EFI_DISK_IO_PROTOCOL .............................................................................. 472EFI_DISK_IO_PROTOCOL.ReadDisk() ........................................................... 474EFI_DISK_IO_PROTOCOL.WriteDisk()............................................................ 475
12.8 “Updated” EFI Block I/O Protocol................................................................................ 476EFI_BLOCK_IO_PROTOCOL........................................................................... 476
xiv Errata and amplifications through October 1, 2008 Version 2.1
EFI_BLOCK_IO_PROTOCOL.Reset().............................................................. 480EFI_BLOCK_IO_PROTOCOL.ReadBlocks() .................................................... 481EFI_BLOCK_IO_PROTOCOL.WriteBlocks() .................................................... 483EFI_BLOCK_IO_PROTOCOL.FlushBlocks().................................................... 485
12.9 Unicode Collation Protocol.......................................................................................... 485EFI_UNICODE_COLLATION_ PROTOCOL..................................................... 485EFI_UNICODE_COLLATION_PROTOCOL.StriColl()....................................... 488EFI_UNICODE_COLLATION_PROTOCOL.MetaiMatch()................................ 489EFI_UNICODE_COLLATION_PROTOCOL.StrLwr()........................................ 491EFI_UNICODE_COLLATION_PROTOCOL.StrUpr()........................................ 492EFI_UNICODE_COLLATION_PROTOCOL.FatToStr() .................................... 493EFI_UNICODE_COLLATION_PROTOCOL.StrToFat() .................................... 494
13 Protocols - PCI Bus Support ..................................................................... 49513.1 PCI Root Bridge I/O Support....................................................................................... 495
13.1.1 PCI Root Bridge I/O Overview ........................................................................ 49513.2 PCI Root Bridge I/O Protocol ...................................................................................... 500
EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL..................................................... 500EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL.PollMem() ................................... 508EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL.PollIo() ........................................ 510EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL.Mem.Read()
EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL.Mem.Write() .......................... 512EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL.Io.Read()
EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL.Io.Write() ............................... 514EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL.Pci.Read()
EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL.Pci.Write() ............................. 516EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL.CopyMem() ................................ 518EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL.Map() .......................................... 520EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL.Unmap()...................................... 522EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL.AllocateBuffer()........................... 523EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL.FreeBuffer() ................................ 525EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL.Flush() ........................................ 526EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL.GetAttributes() ............................ 527EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL.SetAttributes()............................. 529EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL.Configuration()............................ 531
13.2.1 PCI Root Bridge Device Paths ........................................................................ 53213.3 PCI Driver Model......................................................................................................... 535
13.3.1 PCI Driver Initialization.................................................................................... 53513.3.2 PCI Bus Drivers............................................................................................... 53813.3.3 PCI Device Drivers.......................................................................................... 543
13.4 EFI PCI I/O Protocol ................................................................................................... 544EFI_PCI_IO_PROTOCOL................................................................................. 545EFI_PCI_IO_PROTOCOL.PollMem() ............................................................... 554EFI_PCI_IO_PROTOCOL.PollIo() .................................................................... 556EFI_PCI_IO_PROTOCOL.Mem.Read()
EFI_PCI_IO_PROTOCOL.Mem.Write() ...................................................... 558
Errata and amplifications through October 1, 2008
Unified Extensible Firmware Interface Specification
EFI_PCI_IO_PROTOCOL.Io.Read() EFI_PCI_IO_PROTOCOL.Io.Write() ........................................................... 560
EFI_PCI_IO_PROTOCOL.Pci.Read() EFI_PCI_IO_PROTOCOL.Pci.Write() ......................................................... 562
EFI_PCI_IO_PROTOCOL.CopyMem() ............................................................ 564EFI_PCI_IO_PROTOCOL.Map() ..................................................................... 567EFI_PCI_IO_PROTOCOL.Unmap().................................................................. 569EFI_PCI_IO_PROTOCOL.AllocateBuffer() ....................................................... 570EFI_PCI_IO_PROTOCOL.FreeBuffer() ............................................................ 572EFI_PCI_IO_PROTOCOL.Flush()..................................................................... 573EFI_PCI_IO_PROTOCOL.GetLocation() .......................................................... 574EFI_PCI_IO_PROTOCOL.Attributes() .............................................................. 575EFI_PCI_IO_PROTOCOL.GetBarAttributes()................................................... 578EFI_PCI_IO_PROTOCOL.SetBarAttributes() ................................................... 581
13.4.1 PCI Device Paths ........................................................................................... 58213.4.2 PCI Option ROMs ........................................................................................... 58413.4.3 Nonvolatile Storage......................................................................................... 58913.4.4 PCI Hot-Plug Events ....................................................................................... 590
14 Protocols — SCSI Driver Models and Bus Support ................................ 59114.1 SCSI Driver Model Overview ...................................................................................... 59114.2 SCSI Bus Drivers ........................................................................................................ 592
14.2.1 Driver Binding Protocol for SCSI Bus Drivers ................................................. 59214.2.2 SCSI Enumeration .......................................................................................... 593
14.3 SCSI Device Drivers ................................................................................................... 59314.3.1 Driver Binding Protocol for SCSI Device Drivers ............................................ 593
14.4 EFI SCSI I/O Protocol ................................................................................................. 594EFI_SCSI_IO_PROTOCOL .............................................................................. 594EFI_SCSI_IO_PROTOCOL.GetDeviceType() .................................................. 596EFI_SCSI_IO_PROTOCOL.GetDeviceLocation()............................................. 598EFI_SCSI_IO_PROTOCOL.ResetBus() ........................................................... 599EFI_SCSI_IO_PROTOCOL.ResetDevice()....................................................... 600EFI_SCSI_IO_PROTOCOL.ExecuteScsiCommand()....................................... 601
14.5 SCSI Device Paths ..................................................................................................... 60514.5.1 SCSI Device Path Example ............................................................................ 60514.5.2 ATAPI Device Path Example .......................................................................... 60614.5.3 Fibre Channel Device Path Example .............................................................. 60714.5.4 InfiniBand Device Path Example..................................................................... 608
14.6 SCSI Pass Thru Device Paths ................................................................................... 60914.7 Extended SCSI Pass Thru Protocol ............................................................................ 611
EFI_EXT_SCSI_PASS_THRU_PROTOCOL.................................................... 612EFI_EXT_SCSI_PASS_THRU_PROTOCOL.PassThru()................................. 615EFI_EXT_SCSI_PASS_THRU_PROTOCOL.GetNextTargetLun()................... 621EFI_EXT_SCSI_PASS_THRU_PROTOCOL.BuildDevicePath()...................... 623EFI_EXT_SCSI_PASS_THRU_PROTOCOL.GetTargetLun() .......................... 625EFI_EXT_SCSI_PASS_THRU_PROTOCOL.ResetChannel() ......................... 627
xvi Errata and amplifications through October 1, 2008 Version 2.1
EFI_EXT_SCSI_PASS_THRU_PROTOCOL.ResetTargetLun() ...................... 628EFI_EXT_SCSI_PASS_THRU_PROTOCOL.GetNextTarget()......................... 630
15 Protocols - iSCSI Boot ............................................................................... 63315.1 Overview ..................................................................................................................... 633
15.1.1 iSCSI UEFI Driver Layering ............................................................................ 63315.2 EFI iSCSI Initiator Name Protocol............................................................................... 633
EFI_ISCSI_INITIATOR_NAME_PROTOCOL................................................... 633EFI_ISCSI_INITIATOR_NAME_PROTOCOL. Get()......................................... 635EFI_ISCSI_INITIATOR_NAME_PROTOCOL.Set() .......................................... 636
16 Protocols — USB Support ......................................................................... 63716.1 USB2 Host Controller Protocol ................................................................................... 637
16.1.1 USB Host Controller Protocol Overview.......................................................... 637EFI_USB2_HC_PROTOCOL............................................................................ 637EFI_USB2_HC_PROTOCOL.GetCapability() ................................................... 640EFI_USB2_HC_PROTOCOL.Reset() ............................................................... 642EFI_USB2_HC_PROTOCOL.GetState() .......................................................... 644EFI_USB2_HC_PROTOCOL.SetState()........................................................... 646EFI_USB2_HC_PROTOCOL.ControlTransfer()................................................ 648EFI_USB2_HC_PROTOCOL.BulkTransfer() .................................................... 651EFI_USB2_HC_PROTOCOL.AsyncInterruptTransfer() .................................... 654EFI_USB2_HC_PROTOCOL.SyncInterruptTransfer()...................................... 657EFI_USB2_HC_PROTOCOL.IsochronousTransfer()........................................ 659EFI_USB2_HC_PROTOCOL.AsyncIsochronousTransfer().............................. 662EFI_USB2_HC_PROTOCOL.GetRootHubPortStatus().................................... 665EFI_USB2_HC_PROTOCOL.SetRootHubPortFeature() .................................. 669EFI_USB2_HC_PROTOCOL.ClearRootHubPortFeature()............................... 671
16.2 USB Driver Model ....................................................................................................... 67216.2.1 Scope .............................................................................................................. 67216.2.2 USB Bus Driver ............................................................................................... 67316.2.3 USB Device Driver .......................................................................................... 67416.2.4 USB I/O Protocol............................................................................................. 675
EFI_USB_IO_PROTOCOL ............................................................................... 675EFI_USB_IO_PROTOCOL.UsbControlTransfer()............................................. 678EFI_USB_IO_PROTOCOL.UsbBulkTransfer() ................................................. 681EFI_USB_IO_PROTOCOL.UsbAsyncInterruptTransfer() ................................. 683EFI_USB_IO_PROTOCOL.UsbSyncInterruptTransfer()................................... 687EFI_USB_IO_PROTOCOL.UsbIsochronousTransfer()..................................... 689EFI_USB_IO_PROTOCOL.UsbAsyncIsochronousTransfer()........................... 691EFI_USB_IO_PROTOCOL.UsbGetDeviceDescriptor() .................................... 693EFI_USB_IO_PROTOCOL.UsbGetConfigDescriptor() ..................................... 695EFI_USB_IO_PROTOCOL.UsbGetInterfaceDescriptor() ................................. 697EFI_USB_IO_PROTOCOL.UsbGetEndpointDescriptor() ................................. 699EFI_USB_IO_PROTOCOL.UsbGetStringDescriptor() ...................................... 701EFI_USB_IO_PROTOCOL.UsbGetSupportedLanguages() ............................. 702
Errata and amplifications through October 1, 2008
Unified Extensible Firmware Interface Specification
EFI_USB_IO_PROTOCOL.UsbPortReset()...................................................... 703
17 Protocols - Debugger Support .................................................................. 70517.1 Overview ..................................................................................................................... 70517.2 EFI Debug Support Protocol ....................................................................................... 706
17.2.1 EFI Debug Support Protocol Overview ........................................................... 706EFI_DEBUG_SUPPORT_PROTOCOL ............................................................ 706EFI_DEBUG_SUPPORT_PROTOCOL.GetMaximumProcessorIndex()........... 709EFI_DEBUG_SUPPORT_PROTOCOL.RegisterPeriodicCallback()................. 710EFI_DEBUG_SUPPORT_PROTOCOL.RegisterExceptionCallback() .............. 715EFI_DEBUG_SUPPORT_PROTOCOL.InvalidateInstructionCache()............... 719
17.3 EFI Debugport Protocol .............................................................................................. 72017.3.1 EFI Debugport Overview................................................................................. 720
EFI_DEBUGPORT_PROTOCOL...................................................................... 720EFI_DEBUGPORT_PROTOCOL.Reset() ......................................................... 722EFI_DEBUGPORT_PROTOCOL.Write() .......................................................... 723EFI_DEBUGPORT_PROTOCOL.Read().......................................................... 724EFI_DEBUGPORT_PROTOCOL.Poll() ............................................................ 725
17.3.2 Debugport Device Path ................................................................................... 72517.3.3 EFI Debugport Variable................................................................................... 726
17.4 EFI Debug Support Table ........................................................................................... 72717.4.1 Overview ......................................................................................................... 72717.4.2 EFI System Table Location ............................................................................. 72817.4.3 EFI Image Info................................................................................................. 728
18 Protocols - Compression Algorithm Specification ................................. 73118.1 Algorithm Overview..................................................................................................... 73118.2 Data Format ................................................................................................................ 732
18.2.1 Bit Order.......................................................................................................... 73218.2.2 Overall Structure ............................................................................................. 73318.2.3 Block Structure................................................................................................ 734
18.3 Compressor Design .................................................................................................... 73718.3.1 Overall Process............................................................................................... 73718.3.2 String Info Log................................................................................................. 73818.3.3 Huffman Code Generation .............................................................................. 741
18.4 Decompressor Design ................................................................................................ 74318.5 Decompress Protocol.................................................................................................. 743
EFI_DECOMPRESS_PROTOCOL................................................................... 744EFI_DECOMPRESS_PROTOCOL.GetInfo().................................................... 745EFI_DECOMPRESS_PROTOCOL.Decompress() ........................................... 747
19 Protocols - ACPI Protocols........................................................................ 749
EFI_ACPI_TABLE_PROTOCOL....................................................................... 749EFI_ACPI_TABLE_PROTOCOL.InstallAcpiTable() .......................................... 750EFI_ACPI_TABLE_PROTOCOL.UninstallAcpiTable()...................................... 751
xviii Errata and amplifications through October 1, 2008 Version 2.1
20 EFI Byte Code Virtual Machine.................................................................. 75320.1 Overview ..................................................................................................................... 753
20.1.1 Processor Architecture Independence ............................................................ 75320.1.2 OS Independent ............................................................................................. 75420.1.3 EFI Compliant ................................................................................................. 75420.1.4 Coexistence of Legacy Option ROMs ............................................................. 75420.1.5 Relocatable Image .......................................................................................... 75420.1.6 Size Restrictions Based on Memory Available ............................................... 754
20.2 Memory Ordering ........................................................................................................ 75520.3 Virtual Machine Registers ........................................................................................... 75520.4 Natural Indexing.......................................................................................................... 756
20.4.1 Sign Bit............................................................................................................ 75720.4.2 Bits Assigned to Natural Units......................................................................... 75720.4.3 Constant.......................................................................................................... 75720.4.4 Natural Units ................................................................................................... 758
20.5 EBC Instruction Operands .......................................................................................... 75820.5.1 Direct Operands .............................................................................................. 75820.5.2 Indirect Operands............................................................................................ 75920.5.3 Indirect with Index Operands .......................................................................... 75920.5.4 Immediate Operands....................................................................................... 759
20.6 EBC Instruction Syntax .............................................................................................. 76020.7 Instruction Encoding ................................................................................................... 760
20.7.1 Instruction Opcode Byte Encoding ................................................................. 76020.7.2 Instruction Operands Byte Encoding............................................................... 76120.7.3 Index/Immediate Data Encoding ..................................................................... 761
20.8 EBC Instruction Set..................................................................................................... 762ADD................................................................................................................... 763AND................................................................................................................... 764ASHR ................................................................................................................ 765BREAK .............................................................................................................. 766CALL ................................................................................................................. 768CMP .................................................................................................................. 770CMPI ................................................................................................................. 772DIV .................................................................................................................... 774DIVU.................................................................................................................. 775EXTNDB............................................................................................................ 776EXTNDD............................................................................................................ 777EXTNDW........................................................................................................... 778JMP ................................................................................................................... 779JMP8 ................................................................................................................. 781LOADSP............................................................................................................ 782MOD.................................................................................................................. 783MODU ............................................................................................................... 784MOV .................................................................................................................. 785MOVI ................................................................................................................. 787MOVIn ............................................................................................................... 789
Errata and amplifications through October 1, 2008
Unified Extensible Firmware Interface Specification
MOVn ................................................................................................................ 790MOVREL ........................................................................................................... 791MOVsn .............................................................................................................. 792MUL................................................................................................................... 794MULU ................................................................................................................ 795NEG................................................................................................................... 796NOT................................................................................................................... 797OR..................................................................................................................... 798POP................................................................................................................... 799POPn................................................................................................................. 800PUSH ................................................................................................................ 801PUSHn .............................................................................................................. 802RET ................................................................................................................... 803SHL ................................................................................................................... 804SHR................................................................................................................... 805STORESP ......................................................................................................... 806SUB................................................................................................................... 807XOR................................................................................................................... 808
20.9 Runtime and Software Conventions ........................................................................... 80920.9.1 Calling Outside VM ......................................................................................... 80920.9.2 Calling Inside VM ............................................................................................ 80920.9.3 Parameter Passing.......................................................................................... 80920.9.4 Return Values ................................................................................................. 80920.9.5 Binary Format.................................................................................................. 809
20.10 Architectural Requirements....................................................................................... 80920.10.1 EBC Image Requirements ............................................................................ 80920.10.2 EBC Execution Interfacing Requirements..................................................... 81020.10.3 Interfacing Function Parameters Requirements............................................ 81020.10.4 Function Return Requirements ..................................................................... 81020.10.5 Function Return Values Requirements ......................................................... 810
20.11 EBC Interpreter Protocol........................................................................................... 810EFI_EBC_PROTOCOL ..................................................................................... 811EFI_EBC_PROTOCOL.CreateThunk() ............................................................. 812EFI_EBC_PROTOCOL.UnloadImage() ............................................................ 813EFI_EBC_PROTOCOL.RegisterICacheFlush() ................................................ 814EFI_EBC_PROTOCOL.GetVersion()................................................................ 816
20.12 EBC Tools................................................................................................................. 81620.12.1 EBC C Compiler............................................................................................ 81620.12.2 C Coding Convention .................................................................................... 81620.12.3 EBC Interface Assembly Instructions............................................................ 81720.12.4 Stack Maintenance and Argument Passing .................................................. 81720.12.5 Native to EBC Arguments Calling Convention .............................................. 81720.12.6 EBC to Native Arguments Calling Convention .............................................. 81720.12.7 EBC to EBC Arguments Calling Convention................................................. 81820.12.8 Function Returns........................................................................................... 81820.12.9 Function Return Values................................................................................. 81820.12.10 Thunking ..................................................................................................... 818
xx Errata and amplifications through October 1, 2008 Version 2.1
20.12.11 EBC Linker .................................................................................................. 82020.12.12 Image Loader .............................................................................................. 82120.12.13 Debug Support ............................................................................................ 821
20.13 VM Exception Handling............................................................................................. 82120.13.1 Divide By 0 Exception ................................................................................... 82120.13.2 Debug Break Exception ................................................................................ 82120.13.3 Invalid Opcode Exception ............................................................................. 82120.13.4 Stack Fault Exception ................................................................................... 82220.13.5 Alignment Exception ..................................................................................... 82220.13.6 Instruction Encoding Exception..................................................................... 82220.13.7 Bad Break Exception..................................................................................... 82220.13.8 Undefined Exception ..................................................................................... 822
20.14 Option ROM Formats................................................................................................ 82220.14.1 EFI Drivers for PCI Add-in Cards .................................................................. 82320.14.2 Non-PCI Bus Support.................................................................................... 823
21 Network Protocols - SNP, PXE and BIS.................................................... 82521.1 Simple Network Protocol ............................................................................................ 825
EFI_SIMPLE_NETWORK_PROTOCOL........................................................... 825EFI_SIMPLE_NETWORK.Start() ...................................................................... 830EFI_SIMPLE_NETWORK.Stop() ...................................................................... 831EFI_SIMPLE_NETWORK.Initialize()................................................................. 832EFI_SIMPLE_NETWORK.Reset() .................................................................... 833EFI_SIMPLE_NETWORK.Shutdown().............................................................. 834EFI_SIMPLE_NETWORK.ReceiveFilters() ....................................................... 835EFI_SIMPLE_NETWORK.StationAddress() ..................................................... 838EFI_SIMPLE_NETWORK.Statistics() ............................................................... 839EFI_SIMPLE_NETWORK.MCastIPtoMAC() ..................................................... 842EFI_SIMPLE_NETWORK.NvData().................................................................. 843EFI_SIMPLE_NETWORK.GetStatus().............................................................. 845EFI_SIMPLE_NETWORK.Transmit()................................................................ 847EFI_SIMPLE_NETWORK.Receive()................................................................. 849
21.2 Network Interface Identifier Protocol ........................................................................... 850EFI_NETWORK_INTERFACE_IDENTIFIER_PROTOCOL.............................. 850
21.3 PXE Base Code Protocol............................................................................................ 853EFI_PXE_BASE_CODE_PROTOCOL ............................................................. 853EFI_PXE_BASE_CODE_PROTOCOL.Start() .................................................. 864EFI_PXE_BASE_CODE_PROTOCOL.Stop()................................................... 866EFI_PXE_BASE_CODE_PROTOCOL.Dhcp().................................................. 867EFI_PXE_BASE_CODE_PROTOCOL.Discover() ............................................ 869EFI_PXE_BASE_CODE_PROTOCOL.Mtftp() .................................................. 873EFI_PXE_BASE_CODE_PROTOCOL.UdpWrite() ........................................... 877EFI_PXE_BASE_CODE_PROTOCOL.UdpRead()........................................... 879EFI_PXE_BASE_CODE_PROTOCOL.SetIpFilter().......................................... 882EFI_PXE_BASE_CODE_PROTOCOL.Arp() .................................................... 884EFI_PXE_BASE_CODE_PROTOCOL.SetParameters() .................................. 886
Errata and amplifications through October 1, 2008
Unified Extensible Firmware Interface Specification
EFI_PXE_BASE_CODE_PROTOCOL.SetStationIp() ...................................... 888EFI_PXE_BASE_CODE_PROTOCOL.SetPackets()........................................ 890
21.4 PXE Base Code Callback Protocol ............................................................................. 891EFI_PXE_BASE_CODE_CALLBACK_PROTOCOL ........................................ 891EFI_PXE_BASE_CODE_CALLBACK.Callback().............................................. 893
21.5 Boot Integrity Services Protocol.................................................................................. 894EFI_BIS_PROTOCOL....................................................................................... 894EFI_BIS_PROTOCOL.Initialize() ...................................................................... 897EFI_BIS_PROTOCOL.Shutdown() ................................................................... 901EFI_BIS_PROTOCOL.Free() ............................................................................ 902EFI_BIS_PROTOCOL.GetBootObjectAuthorizationCertificate()....................... 903EFI_BIS_PROTOCOL.GetBootObjectAuthorizationCheckFlag()...................... 904EFI_BIS_PROTOCOL.GetBootObjectAuthorizationUpdateToken() ................. 905EFI_BIS_PROTOCOL.GetSignatureInfo() ........................................................ 906EFI_BIS_PROTOCOL.UpdateBootObjectAuthorization() ................................. 911EFI_BIS_PROTOCOL.VerifyBootObject() ........................................................ 919EFI_BIS_PROTOCOL.VerifyObjectWithCredential() ........................................ 927
22 Network Protocols — Managed Network ................................................. 93522.1 EFI Managed Network Protocol .................................................................................. 935
EFI_MANAGED_NETWORK_SERVICE_BINDING_PROTOCOL ................... 935EFI_MANAGED_NETWORK_PROTOCOL...................................................... 936EFI_MANAGED_NETWORK_PROTOCOL.GetModeData() ............................ 938EFI_MANAGED_NETWORK_PROTOCOL.Configure() ................................... 941EFI_MANAGED_NETWORK_PROTOCOL.McastIpToMac() ........................... 943EFI_MANAGED_NETWORK_PROTOCOL.Groups()....................................... 944EFI_MANAGED_NETWORK_PROTOCOL.Transmit()..................................... 945EFI_MANAGED_NETWORK_PROTOCOL.Receive()...................................... 951EFI_MANAGED_NETWORK_PROTOCOL.Cancel() ....................................... 952EFI_MANAGED_NETWORK_PROTOCOL.Poll()............................................. 953
23 Network Protocols - ARP and DHCPv4 ................................................... 95523.1 ARP Protocol .............................................................................................................. 955
EFI_ARP_SERVICE_BINDING_PROTOCOL .................................................. 955EFI_ARP_PROTOCOL ..................................................................................... 956EFI_ARP_PROTOCOL.Configure() .................................................................. 958EFI_ARP_PROTOCOL.Add() ........................................................................... 960EFI_ARP_PROTOCOL.Find()........................................................................... 962Related Definitions ............................................................................................ 963EFI_ARP_PROTOCOL.Delete() ....................................................................... 964EFI_ARP_PROTOCOL.Flush() ......................................................................... 965EFI_ARP_PROTOCOL.Request() .................................................................... 966EFI_ARP_PROTOCOL.Cancel()....................................................................... 968
23.2 EFI DHCPv4 Protocol ................................................................................................. 969EFI_DHCP4_SERVICE_BINDING_PROTOCOL.............................................. 969EFI_DHCP4_PROTOCOL ................................................................................ 969
xxii Errata and amplifications through October 1, 2008 Version 2.1
EFI_DHCP4_PROTOCOL.GetModeData()....................................................... 972EFI_DHCP4_PROTOCOL.Configure() ............................................................ 976EFI_DHCP4_PROTOCOL.Start() ..................................................................... 983EFI_DHCP4_PROTOCOL.RenewRebind() ...................................................... 985EFI_DHCP4_PROTOCOL.Release()................................................................ 987EFI_DHCP4_PROTOCOL.Stop()...................................................................... 988EFI_DHCP4_PROTOCOL.Build() ..................................................................... 989EFI_DHCP4_PROTOCOL.TransmitReceive() .................................................. 991EFI_DHCP4_PROTOCOL.Parse().................................................................... 994
24 Network Protocols —TCPv4, IPv4 and Configuration ............................ 99724.1 EFI TCPv4 Protocol .................................................................................................... 997
EFI_TCP4_SERVICE_BINDING_PROTOCOL................................................. 997EFI TCP4 Variable ............................................................................................ 997EFI_TCP4_PROTOCOL ................................................................................... 999EFI_TCP4_PROTOCOL.GetModeData()........................................................ 1001EFI_TCP4_PROTOCOL.Configure() .............................................................. 1006EFI_TCP4_PROTOCOL.Routes()................................................................... 1008EFI_TCP4_PROTOCOL.Connect()................................................................. 1010EFI_TCP4_PROTOCOL.Accept() ................................................................... 1013EFI_TCP4_PROTOCOL.Transmit() ................................................................ 1015EFI_TCP4_PROTOCOL.Receive() ................................................................. 1020EFI_TCP4_PROTOCOL.Close()..................................................................... 1022EFI_TCP4_PROTOCOL.Cancel()................................................................... 1024EFI_TCP4_PROTOCOL.Poll() ........................................................................ 1025
24.2 EFI IPv4 Protocol ...................................................................................................... 1025EFI_IP4_SERVICE_BINDING_PROTOCOL .................................................. 1026EFI IPv4 Variable ............................................................................................ 1026EFI_IP4_PROTOCOL ..................................................................................... 1027EFI_IP4_PROTOCOL.GetModeData() ........................................................... 1029EFI_IP4_PROTOCOL.Configure() .................................................................. 1034EFI_IP4_PROTOCOL.Groups() ...................................................................... 1036EFI_IP4_PROTOCOL.Routes() ...................................................................... 1038EFI_IP4_PROTOCOL.Transmit().................................................................... 1040EFI_IP4_PROTOCOL.Receive()..................................................................... 1046EFI_IP4_PROTOCOL.Cancel()....................................................................... 1048EFI_IP4_PROTOCOL.Poll()............................................................................ 1049
24.3 EFI IPv4 Configuration Protocol................................................................................ 1049EFI_IP4_CONFIG_PROTOCOL ..................................................................... 1049EFI_IP4_CONFIG_PROTOCOL.Start() .......................................................... 1051EFI_IP4_CONFIG_PROTOCOL.Stop() .......................................................... 1053EFI_IP4_CONFIG_PROTOCOL.GetData() .................................................... 1054Related Definitions .......................................................................................... 1054
25 Network Protocols — UDPv4 and MTFTPv4 .......................................... 105725.1 EFI UDPv4 Protocol.................................................................................................. 1057
Errata and amplifications through October 1, 2008
Unified Extensible Firmware Interface Specification
EFI_UDP4_SERVICE_BINDING_PROTOCOL .............................................. 1057EFI UDP4 Variable .......................................................................................... 1057EFI_UDP4_PROTOCOL................................................................................. 1059EFI_UDP4_PROTOCOL.GetModeData() ....................................................... 1061EFI_UDP4_PROTOCOL.Configure() ......................