Page 2 - Extensible Firmware Interface Specification
Extensible Firmware Interface Specification ii 12/12/00 Version 1.02 THIS SPECIFICATION IS PROVIDED "AS IS" WITH NO WARRANTIES WHATSOEVER, INCLUDING ANY WARRANTYOF MERCHANTABILITY, FITNESS FOR ANY PARTICULAR PURPOSE, OR ANY WARRANTY OTHERWISE ARISINGOUT OF ANY PROPOSAL, SPECIFICATION OR SAMP...
Page 3 - Revision History; Revision
Version 1.02 12/12/00 iii Revision History Revision Revision History Date 1.01 Original Issue. 12/01/00 1.02 Update for legal and trademarking requirements. 12/12/00
Page 5 - Table of Contents; Introduction
Version 1.02 12/12/00 v Table of Contents 1 Introduction 1.1 Overview.................................................................................................... 2 1.2 Goals ......................................................................................................... 3 1.3 Target...
Page 6 - Services
Extensible Firmware Interface Specification vi 12/12/00 Version 1.02 3 Services 3.1 Event, Timer, and Task Priority Services ................................................. 26 3.1.1 CreateEvent() .................................................................................. 29 3.1.2 CloseEvent...
Page 7 - Contents; EFI Image
Contents Version 1.02 12/12/00 vii 3.5 Variable Services ..................................................................................... 77 3.5.1 GetVariable() ................................................................................... 78 3.5.2 GetNextVariableName() ......................
Page 9 - Device I/O Protocol
Contents Version 1.02 12/12/00 ix 5.4.4 Hardware vs. Messaging Device Path Rules ................................. 135 5.4.5 Media Device Path Rules .............................................................. 136 5.4.6 Other Rules .....................................................................
Page 10 - 0 File System Protocol
Extensible Firmware Interface Specification x 12/12/00 Version 1.02 8 Block I/O Protocol 8.1 BLOCK_IO Protocol............................................................................... 173 8.1.1 EFI_BLOCK_IO.Reset() ................................................................ 176 8.1.2 EFI_...
Page 11 - 2 Serial I/O Protocol
Contents Version 1.02 12/12/00 xi 12 Serial I/O Protocol 12.1 SERIAL_IO Protocol .............................................................................. 213 12.1.1 SERIAL_IO.Reset() ....................................................................... 217 12.1.2 SERIAL_IO.SetAttributes() .....
Page 12 - 5 Simple Network Protocol
Extensible Firmware Interface Specification xii 12/12/00 Version 1.02 15 Simple Network Protocol 15.1 EFI_SIMPLE_NETWORK Protocol........................................................ 277 15.1.1 EFI_SIMPLE_NETWORK.Start() ..................................................... 282 15.1.2 EFI_SIMPLE_...
Page 15 - Index
Contents Version 1.02 12/12/00 xv G.4.18 Transmit......................................................................................... 460 G.4.19 Receive.......................................................................................... 464 G.5 UNDI as an EFI Runtime Driver .................
Page 19 - Introduction; This
Version 1.02 12/12/00 1 1 Introduction This Extensible Firmware Interface (hereafter known as EFI) Specification describes an interface between the operating system (OS) and the platform firmware. The interface is in the form of datatables that contain platform-related information, and boot and runt...
Page 20 - Overview; This specification is organized as follows:; Organization of EFI Specification; Description
Extensible Firmware Interface Specification 2 12/12/00 Version 1.02 1.1 Overview This specification is organized as follows: Table 1-1. Organization of EFI Specification Chapter/Appendix Description 1. Introduction Provides an overview of the EFI Specification. 2. Overview Describes the major compon...
Page 21 - Goals; Coherent, scalable platform environment
Introduction Version 1.02 12/12/00 3 Table 1-1. Organization of EFI Specification (continued) Chapter/Appendix Description 15. Simple Network Protocol Defines the Simple Network Protocol, which provides a packet levelinterface to a network device. Also defines the Network InterfaceIdentifier Protoco...
Page 22 - Abstraction of the OS from the firmware
Extensible Firmware Interface Specification 4 12/12/00 Version 1.02 • Abstraction of the OS from the firmware . The specification defines interfaces to platform capabilities. Through the use of abstract interfaces, the specification allows the OS loader to beconstructed with far less knowledge of th...
Page 23 - Compatibility by design; Target Audience; This document is intended for the following readers:
Introduction Version 1.02 12/12/00 5 • Compatibility by design . The design of the system partition structures also preserves all the structures that are currently used in the “PC-AT” boot environment. Thus it is a simple matterto construct a single system that is capable of booting a legacy OS or a...
Page 24 - Related Information; , Compaq Computer Corporation, Phoenix Technologies
Extensible Firmware Interface Specification 6 12/12/00 Version 1.02 1.4 Related Information The following publications and sources of information may be useful to you or are referred to bythis specification: • ACPI Implementers’ Guide , Intel Corporation, Microsoft Corporation, Toshiba Corporation, ...
Page 25 - Available at
Introduction Version 1.02 12/12/00 7 • Microsoft Extensible Firmware Initiative FAT32 File System Specification , Version 1.03, Microsoft Corporation, December 6, 2000 • OSTA Universal Disk Format Specification , Revision 2.00, Optical Storage Technology Association, 1998, http://www2.osta.org/osta/...
Page 26 - Prerequisite Specifications; The interface defined by the; Specification; The
Extensible Firmware Interface Specification 8 12/12/00 Version 1.02 1.5 Prerequisite Specifications In general, this specification requires that functionality defined in a number of other existingspecifications be present on a system that implements this specification. This specification requirestha...
Page 27 - Additional Considerations for Itanium; and portions of the; EFI Design Overview; The design of EFI is based on the following fundamental elements:
Introduction Version 1.02 12/12/00 9 1.5.3 Additional Considerations for Itanium ™ -based Platforms Any information or service that is available via Itanium-based firmware architecture specificationssupercedes any requirement in the common IA-32 and Itanium-based specifications listed above.The Itan...
Page 29 - Migration Requirements; The ability to continue booting legacy operating systems; Legacy Operating System Support
Introduction Version 1.02 12/12/00 11 1.7 Migration Requirements Migration requirements cover the transition period from initial implementation of this specificationto a future time when all platforms and operating systems implement to this specification. Duringthis period, two major compatibility c...
Page 30 - Conventions Used in This Document; Data Structure Descriptions; reserved; Conventions; Prototype; Argument; Name; register; Guidelines for Use of the Term “Extensible Firmware Interface”; where it is necessary to abbreviate
Extensible Firmware Interface Specification 12 12/12/00 Version 1.02 1.8 Conventions Used in This Document This document uses typographic and illustrative conventions described below. 1.8.1 Data Structure Descriptions The Intel architecture processors of the IA-32 family are “little endian” machines...
Page 32 - Boot Manager; Services
Extensible Firmware Interface Specification 14 12/12/00 Version 1.02 2.1 Boot Manager EFI contains a boot manager that allows the loading of EFI applications (including OS 1st stageloader) or EFI drivers from any file on an EFI defined file system or through the use of an EFIdefined image loading se...
Page 33 - EFI Runtime Services
Overview Version 1.02 12/12/00 15 Interfaces added by this specification are divided into the following categories and are detailed laterin this document: • Runtime services • Boot services interfaces, with the following sub-categories: Global boot service interfaces Device handle-based boot ser...
Page 34 - Calling Conventions; and; parameter to a function unless it is; NULL; pointer is passed to a function, the results are unpredictable and; Types; Common EFI Data Types; Mnemonic
Extensible Firmware Interface Specification 16 12/12/00 Version 1.02 2.3 Calling Conventions Unless otherwise stated, all functions defined in the EFI specification are called through pointers incommon, architecturally defined, calling conventions found in C compilers. Pointers to the variousglobal ...
Page 35 - Modifiers for Common EFI Data Types
Overview Version 1.02 12/12/00 17 Table 2-2. Common EFI Data Types (continued) Mnemonic Description UINT64 8 byte unsigned value. CHAR8 1 byte Character. CHAR16 2 byte Character. Unless otherwise specified all strings are stored in theUTF-16 encoding format as defined by Unicode 2.1 and ISO/IEC 1064...
Page 36 - eax; not; Platforms
Extensible Firmware Interface Specification 18 12/12/00 Version 1.02 2.3.2 IA-32 Platforms All functions are called with the C language calling convention. The general-purpose registers thatare volatile across function calls are eax , ecx , and edx . All other general-purpose registers are non- vola...
Page 37 - IA-64 System Abstraction Layer; Protocols; Handle
Overview Version 1.02 12/12/00 19 The EFI Image may invoke both SAL and EFI procedures. Once in virtual mode, the EFI OS mustswitch back to physical mode to call any boot services. If SetVirtualAddressMap() has been used, then runtime service calls are made in virtual mode. Refer to the IA-64 System...
Page 38 - The following C code fragment illustrates the use of protocols:; EFI Protocols; Protocol Name
Extensible Firmware Interface Specification 20 12/12/00 Version 1.02 The following C code fragment illustrates the use of protocols: // There is a global “EffectsDevice” structure. This// structure contains information pertinent to the device. // Connect to the ILLUSTRATION_PROTOCOL on the EffectsDe...
Page 39 - Requirements; Elements; must; Required EFI Implementation Elements; Element
Overview Version 1.02 12/12/00 21 2.5 Requirements This document is an architectural specification. As such, care has been taken to specifyarchitecture in ways that allow maximum flexibility in implementation. However, there are certainrequirements on which elements of this specification must be imp...
Page 40 - may choose; Optional EFI Implementation Elements
Extensible Firmware Interface Specification 22 12/12/00 Version 1.02 Table 2-5. Required EFI Implementation Elements (continued) Element Description SIMPLE_INPUT protocol Protocol interfaces for devices that support simple console style textinput. SIMPLE_TEXT_OUTPUT protocol Protocol interfaces for ...
Page 43 - Boot Services; before; Runtime Services; before and after
Version 1.02 12/12/00 25 3 Services This chapter discusses the fundamental services that are present in an EFI-compliant system. Theservices are defined by interface functions that may be used by code running in the EFIenvironment. Such code may include protocols that manage device access or extend ...
Page 44 - Runtime Services fall into these categories:; Event, Timer, and Task Priority Services; Event, Timer, and Task Priority Functions
Extensible Firmware Interface Specification 26 12/12/00 Version 1.02 The rest of this chapter discusses individual functions. Global boot services functions fall intothese categories: • Event, Timer, and Task Priority Services (Section 3.1) • Memory Allocation Services (Section 3.2) • Protocol Handl...
Page 45 - TPL Usage; Task Priority Level
Services Version 1.02 12/12/00 27 Execution in the boot services environment occurs at different task priority levels, or TPLs. Theboot services environment exposes only three of these levels to EFI applications and drivers: • TPL_APPLICATION , the lowest priority level • TPL_CALLBACK , an intermedi...
Page 47 - Summary; IN VOID; Parameters; in the notification function.
Services Version 1.02 12/12/00 29 3.1.1 CreateEvent() Summary Creates an event. Prototype EFI_STATUS CreateEvent ( IN UINT32 Type, IN EFI_TPL NotifyTpl, IN EFI_EVENT_NOTIFY NotifyFunction, IN VOID * NotifyContext, OUT EFI_EVENT *Event ); Parameters Type The type of event to create and its mode and a...
Page 48 - Related Definitions; NotifyContext
Extensible Firmware Interface Specification 30 12/12/00 Version 1.02 Related Definitions //*******************************************************// EFI_EVENT//*******************************************************typedef VOID *EFI_EVENT //*******************************************************// E...
Page 50 - NotifyTpl; Status Codes Returned
Extensible Firmware Interface Specification 32 12/12/00 Version 1.02 can’t clean up on behalf of drivers that have been loaded into the system. The drivers have to dothat themselves by creating an event whose type is EVT_SIGNAL_EXIT_BOOT_SERVICES and whose notification function is a function within ...
Page 51 - Event
Services Version 1.02 12/12/00 33 3.1.2 CloseEvent() Summary Closes an event. Prototype EFI_STATUS CloseEvent ( IN EFI_EVENT Event ); Parameters Event The event to close. Type EFI_EVENT is defined in Section 3.1.1. Description The CloseEvent() function removes the caller’s reference to the event and...
Page 52 - The supplied
Extensible Firmware Interface Specification 34 12/12/00 Version 1.02 3.1.3 SignalEvent() Summary Signals an event. Prototype EFI_STATUS SignalEvent ( IN EFI_EVENT Event ); Parameters Event The event to signal. Type EFI_EVENT is defined in Section 3.1.1. Description The supplied Event is signaled and...
Page 53 - IN UINTN
Services Version 1.02 12/12/00 35 3.1.4 WaitForEvent() Summary Stops execution until an event is signaled. Prototype EFI_STATUS WaitForEvent ( IN UINTN NumberOfEvents, IN EFI_EVENT *Event, OUT UINTN *Index ); Parameters NumberOfEvents The number of events in the Event array. Event An array of EFI_EV...
Page 55 - TimerCancel; TriggerTime
Services Version 1.02 12/12/00 37 3.1.6 SetTimer() Summary Sets the type of timer and the trigger time for a timer event. Prototype EFI_STATUS SetTimer ( IN EFI_EVENT Event, IN EFI_TIMER_DELAY Type, IN UINT64 TriggerTime ); Parameters Event The timer event that is to be signaled at the specified tim...
Page 57 - Raises a task’s priority level and returns its previous level.; NewTpl
Services Version 1.02 12/12/00 39 3.1.7 RaiseTPL() Summary Raises a task’s priority level and returns its previous level. Prototype EFI_TPL RaiseTPL ( IN EFI_TPL NewTpl ); Parameters NewTpl The new task priority level. It must be greater than or equal to thecurrent task priority level. See “Related ...
Page 59 - VOID; OldTpl; OldTpl
Services Version 1.02 12/12/00 41 3.1.8 RestoreTPL() Summary Restores a task’s priority level to its previous value. Prototype VOID RestoreTPL ( IN EFI_TPL OldTpl ) Parameters OldTpl The previous task priority level to restore (the value from a previous,matching call to RaiseTPL() ). Type EFI_TPL is...
Page 60 - Memory Allocation Services; Memory Allocation Functions; When EFI memory is allocated, it is “typed” according to the values in
Extensible Firmware Interface Specification 42 12/12/00 Version 1.02 3.2 Memory Allocation Services The functions that make up Memory Allocation Services are used during pre-boot to allocate andfree memory, and to obtain the system’s memory map. See Table 3-4. Table 3-4. Memory Allocation Functions ...
Page 61 - Memory Type Usage Before ExitBootServices()
Services Version 1.02 12/12/00 43 Table 3-5. Memory Type Usage Before ExitBootServices() Mnemonic Description EfiReservedMemoryType Not used. EfiLoaderCode The code portions of a loaded EFI application. (Note that EFI OSloaders are EFI applications.) EfiLoaderData The data portions of a loaded EFI a...
Page 62 - Memory Type Usage After ExitBootServices(); NOTE; unused
Extensible Firmware Interface Specification 44 12/12/00 Version 1.02 Table 3-6. Memory Type Usage After ExitBootServices() Mnemonic Description EfiReservedMemoryType Not used. EfiLoaderCode The Loader and/or OS may use this memory as they see fit. Note: theOS loader that called ExitBootServices() is...
Page 66 - Memory; Memory; Pages
Extensible Firmware Interface Specification 48 12/12/00 Version 1.02 3.2.2 FreePages() Summary Frees memory pages. Prototype EFI_STATUS FreePages ( IN EFI_PHYSICAL_ADDRESS Memory, IN UINTN Pages ); Parameters Memory The base physical address of the pages to be freed. Type EFI_PHYSICAL_ADDRESS is def...
Page 67 - Returns the current memory map.; IN OUT UINTN; “Related Definitions”.
Services Version 1.02 12/12/00 49 3.2.3 GetMemoryMap() Summary Returns the current memory map. Prototype EFI_STATUS GetMemoryMap ( IN OUT UINTN *MemoryMapSize, IN OUT EFI_MEMORY_DESCRIPTOR *MemoryMap, OUT UINTN *MapKey, OUT UINTN *DescriptorSize, OUT UINT32 *DescriptorVersion ); Parameters MemoryMap...
Page 68 - Type
Extensible Firmware Interface Specification 50 12/12/00 Version 1.02 Related Definitions //*******************************************************//EFI_MEMORY_DESCRIPTOR//*******************************************************typedef struct { UINT32 Type; EFI_PHYSICAL_ADDRESS PhysicalStart; EFI_VIRT...
Page 69 - MemoryMap
Services Version 1.02 12/12/00 51 EFI_MEMORY_WB Memory cacheability attribute: Memory region is cacheable with“write back” policy. Reads and writes that hit in the cache do notpropagate to main memory. Dirty data is written back to mainmemory when a new cache line is allocated. EFI_MEMORY_UCE Memory...
Page 70 - DescriptorSize; MemoryMapSize
Extensible Firmware Interface Specification 52 12/12/00 Version 1.02 The GetMemoryMap() function also returns the size and revision number of the EFI_MEMORY_DESCRIPTOR . The DescriptorSize represents the size in bytes of an EFI_MEMORY_DESCRIPTOR array element returned in MemoryMap . The size is retu...
Page 71 - EfiRuntimeServicesData, EfiACPIReclaimMemory,; EfiConventionalMemory
Services Version 1.02 12/12/00 53 3.2.4 AllocatePool() Summary Allocates pool memory. Prototype EFI_STATUS AllocatePool ( IN EFI_MEMORY_TYPE PoolType, IN UINTN Size, OUT VOID **Buffer ); Parameters PoolType The type of pool to allocate. The only supported types are EfiLoaderData, EfiBootServicesData...
Page 72 - Buffer; Buffer; Buffer
Extensible Firmware Interface Specification 54 12/12/00 Version 1.02 3.2.5 FreePool() Summary Returns pool memory to the system. Prototype EFI_STATUS FreePool ( IN VOID *Buffer ); Parameters Buffer Pointer to the buffer to free. Description The FreePool() function returns the memory specified by Buf...
Page 73 - Protocol Handler Services; Protocol Interface Functions; function. Protocols can only be
Services Version 1.02 12/12/00 55 3.3 Protocol Handler Services In the abstract, a protocol consists of a 128-bit guaranteed unique identifier (GUID) and a ProtocolInterface structure. The structure contains the functions and instance data that are used to access adevice. The functions that make up ...
Page 74 - Figure 3-1. Device Handle to Protocol Handler Mapping; protocol support that would build on the handle’s underlying
Extensible Firmware Interface Specification 56 12/12/00 Version 1.02 Device Handle First Handle GUIDInterface GUIDInterface GUIDInterface GUIDInterface ProtocolInterface InstanceData ProtocolInterface InstanceData ProtocolInterface InstanceData ProtocolInterface InstanceData Device Handle GUIDInterf...
Page 75 - InstallProtocolInterface (
Services Version 1.02 12/12/00 57 3.3.1 InstallProtocolInterface() Summary Installs a protocol interface on a device handle. If the handle does not exist, it is created and addedto the list of handles in the system. Prototype EFI_STATUS InstallProtocolInterface ( IN OUT EFI_HANDLE *Handle, IN EFI_GU...
Page 77 - UninstallProtocolInterface (
Services Version 1.02 12/12/00 59 3.3.2 UninstallProtocolInterface() Summary Removes a protocol interface from a device handle. Prototype EFI_STATUS UninstallProtocolInterface ( IN EFI_HANDLE Handle, IN EFI_GUID *Protocol, IN VOID *Interface ); Parameters Handle The handle on which the interface was...
Page 78 - ReinstallProtocolInterface (
Extensible Firmware Interface Specification 60 12/12/00 Version 1.02 3.3.3 ReinstallProtocolInterface() Summary Reinstalls a protocol interface on a device handle. Prototype EFI_STATUS ReinstallProtocolInterface ( IN EFI_HANDLE Handle, IN EFI_GUID *Protocol, IN VOID *OldInterface, IN VOID *NewInterf...
Page 79 - RegisterProtocolNotify (
Services Version 1.02 12/12/00 61 3.3.4 RegisterProtocolNotify() Summary Creates an event that is to be signaled whenever an interface is installed for a specified protocol. Prototype EFI_STATUS RegisterProtocolNotify ( IN EFI_GUID *Protocol, IN EFI_EVENT Event, OUT VOID **Registration ); Parameters...
Page 81 - AllHandles; BufferSize
Services Version 1.02 12/12/00 63 Related Definitions //*******************************************************// EFI_LOCATE_SEARCH_TYPE//*******************************************************typedef enum { AllHandles,ByRegisterNotify,ByProtocol } EFI_LOCATE_SEARCH_TYPE; AllHandles Protocol and Sea...
Page 82 - OUT VOID
Extensible Firmware Interface Specification 64 12/12/00 Version 1.02 3.3.6 HandleProtocol() Summary Queries a handle to determine if it supports a specified protocol. Prototype EFI_STATUS HandleProtocol ( IN EFI_HANDLE Handle, IN EFI_GUID *Protocol, OUT VOID **Interface ); Parameters Handle The hand...
Page 83 - Protocol
Services Version 1.02 12/12/00 65 3.3.7 LocateDevicePath() Summary Locates the handle to a device on the device path that supports the specified protocol. Prototype EFI_STATUS LocateDevicePath ( IN EFI_GUID *Protocol, IN OUT EFI_DEVICE_PATH **DevicePath, OUT EFI_HANDLE *Device ); Parameters Protocol...
Page 84 - DevicePath
Extensible Firmware Interface Specification 66 12/12/00 Version 1.02 Description The LocateDevicePath() function locates all devices on DevicePath that support Protocol and returns the handle to the device that is closest to DevicePath . DevicePath is advanced over the device path nodes that were ma...
Page 85 - Image Services; Image Type Differences Summary; EFI Application
Services Version 1.02 12/12/00 67 3.4 Image Services Three types of images can be loaded: EFI Applications, EFI Boot Services Drivers, and EFIRuntime Services Drivers. An EFI OS Loader is a type of EFI Application. The most significantdifference between these image types is the type of memory into w...
Page 86 - Image Functions
Extensible Firmware Interface Specification 68 12/12/00 Version 1.02 Most images are loaded by the boot manager. When an EFI application or driver is installed, theinstallation procedure registers itself with the boot manager for loading. However, in some casesan application or driver may want to pr...
Page 89 - OUT UINTN
Services Version 1.02 12/12/00 71 3.4.2 StartImage() Summary Transfers control to a loaded image’s entry point. Prototype EFI_STATUS StartImage ( IN EFI_HANDLE ImageHandle, OUT UINTN *ExitDataSize, OUT CHAR16 **ExitData OPTIONAL ); Parameters ImageHandle Handle of image to be started. Type EFI_HANDL...
Page 90 - ImageHandle; ImageHandle
Extensible Firmware Interface Specification 72 12/12/00 Version 1.02 3.4.3 UnloadImage() Summary Unloads an image. Prototype EFI_STATUS UnloadImage ( IN EFI_HANDLE ImageHandle ); Parameters ImageHandle Handle that identifies the image to be unloaded. Type EFI_HANDLE is defined in Section 3.3.1 . Des...
Page 91 - typedef
Services Version 1.02 12/12/00 73 3.4.4 EFI_IMAGE_ENTRY_POINT Summary This is the declaration of an EFI image entry point. This can be the entry point to an EFIapplication, an EFI boot service driver, or an EFI runtime driver. Prototype typedef EFI_STATUS (EFIAPI *EFI_IMAGE_ENTRY_POINT) ( IN EFI_HAN...
Page 94 - MapKey; EfiBootServicesCode
Extensible Firmware Interface Specification 76 12/12/00 Version 1.02 3.4.6 ExitBootServices() Summary Terminates all boot services. Prototype EFI_STATUS ExitBootServices ( IN EFI_HANDLE ImageHandle, IN UINTN MapKey ); Parameters ImageHandle Handle that identifies the exiting image. Type EFI_HANDLE i...
Page 95 - Variable Services
Services Version 1.02 12/12/00 77 3.5 Variable Services Variables are defined as key/value pairs that consist of identifying information plus attributes (thekey) and arbitrary data (the value). Variables are intended for use as a means to store data that ispassed between the EFI environment implemen...
Page 98 - GetNextVariableName (
Extensible Firmware Interface Specification 80 12/12/00 Version 1.02 3.5.2 GetNextVariableName() Summary Enumerates the current variable names. Prototype EFI_STATUS GetNextVariableName ( IN OUT UINTN *VariableNameSize, IN OUT CHAR16 *VariableName, IN OUT EFI_GUID *VendorGuid ); Parameters VariableNa...
Page 99 - Once; VariableNameSize
Services Version 1.02 12/12/00 81 Once ExitBootServices() is performed, variables that are only visible during boot services will no longer be returned. To obtain the data contents or attribute for a variable returned by GetNextVariableName(), the GetVariable() interface is used. Status Codes Return...
Page 101 - Data; VariableSize
Services Version 1.02 12/12/00 83 EFI_VARIABLE_NON_VOLATILE variables are stored in fixed hardware that has a limited storage capacity; sometimes a severely limited capacity. Software should only use a non-volatilevariable when absolutely necessary. In addition, if software uses a non-volatile varia...
Page 102 - Time Services
Extensible Firmware Interface Specification 84 12/12/00 Version 1.02 3.6 Time Services This section contains function definitions for time-related functions that are typically needed byoperating systems at runtime to access underlying hardware that manages time information andservices. The purpose o...
Page 103 - OPTIONAL; A pointer to storage to receive a snapshot of the current time. Type
Services Version 1.02 12/12/00 85 3.6.1 GetTime() Summary Returns the current time and date information, and the time-keeping capabilities of the hardwareplatform. Prototype EFI_STATUS GetTime ( OUT EFI_TIME *Time, OUT EFI_TIME_CAPABILITIES *Capabilities OPTIONAL ); Parameters Time A pointer to stor...
Page 104 - Daylight
Extensible Firmware Interface Specification 86 12/12/00 Version 1.02 //*******************************************************// Bit Definitions for EFI_TIME. Daylight . See below. //*******************************************************#define EFI_TIME_ADJUST_DAYLIGHT 0x01 #define EFI_TIME_IN_DAYL...
Page 105 - // real time clock device as exposed through the EFI interfaces.
Services Version 1.02 12/12/00 87 //*******************************************************// EFI_TIME_CAPABILITIES//*******************************************************// This provides the capabilities of the // real time clock device as exposed through the EFI interfaces. typedef struct { UINT3...
Page 106 - Time
Extensible Firmware Interface Specification 88 12/12/00 Version 1.02 3.6.2 SetTime() Summary Sets the current local time and date information. Prototype EFI_STATUS SetTime ( IN EFI_TIME *Time ); Parameters Time A pointer to the current time. Type EFI_TIME is defined in Section 3.6.1. Full error chec...
Page 107 - Returns the current wakeup alarm clock setting.; OUT BOOLEAN; Enabled
Services Version 1.02 12/12/00 89 3.6.3 GetWakeupTime() Summary Returns the current wakeup alarm clock setting. Prototype EFI_STATUS GetWakeupTime ( OUT BOOLEAN *Enabled, OUT BOOLEAN *Pending, OUT EFI_TIME *Time ); Parameters Enabled Indicates if the alarm is currently enabled or disabled. Pending I...
Page 108 - is; TRUE
Extensible Firmware Interface Specification 90 12/12/00 Version 1.02 3.6.4 SetWakeupTime() Summary Sets the system wakeup alarm clock time. Prototype EFI_STATUS SetWakeupTime ( IN BOOLEAN Enable, IN EFI_TIME *Time OPTIONAL ); Parameters Enable Enable or disable the wakeup alarm. Time If Enable is TR...
Page 109 - Virtual Memory Services
Services Version 1.02 12/12/00 91 3.7 Virtual Memory Services This section contains function definitions for the virtual memory support that may be optionallyused by an operating system at runtime. If an operating system chooses to make EFI runtimeservice calls in a virtual addressing mode instead o...
Page 111 - DescriptorVersion
Services Version 1.02 12/12/00 93 A virtual address map may only be applied one time. Once the runtime system is in virtual mode,calls to this function return EFI_UNSUPPORTED . Status Codes Returned EFI_SUCCESS The virtual address map has been applied. EFI_UNSUPPORTED EFI firmware is not at runtime,...
Page 112 - DebugDisposition; Address; Address
Extensible Firmware Interface Specification 94 12/12/00 Version 1.02 3.7.2 ConvertPointer() Summary Determines the new virtual address that is to be used on subsequent memory accesses. Prototype EFI_STATUSConvertPointer ( IN UINTN DebugDisposition, IN VOID **Address ); Parameters DebugDisposition Su...
Page 113 - Miscellaneous Services; Table 3-13. Miscellaneous Services Functions
Services Version 1.02 12/12/00 95 3.8 Miscellaneous Services This section contains the remaining function definitions for services not defined elsewhere butwhich are required to complete the definition of the EFI environment. Table 3-13 lists theMiscellaneous Services Functions. Table 3-13. Miscella...
Page 114 - EfiResetWarm
Extensible Firmware Interface Specification 96 12/12/00 Version 1.02 3.8.1 ResetSystem() Summary Resets the entire platform. Prototype VOID ResetSystem ( IN EFI_RESET_TYPE ResetType, IN EFI_STATUS ResetStatus, IN UINTN DataSize, IN CHAR16 *ResetData OPTIONAL ); Parameters ResetType The type of reset...
Page 115 - EfiResetCold; ResetType
Services Version 1.02 12/12/00 97 Description The ResetSystem() function resets the entire platform, including all processors and devices, and reboots the system. Calling this interface with ResetType of EfiResetCold causes a system-wide reset. This sets all circuitry within the system to its initia...
Page 116 - Sets the system’s watchdog timer.
Extensible Firmware Interface Specification 98 12/12/00 Version 1.02 3.8.2 SetWatchdogTimer() Summary Sets the system’s watchdog timer. Prototype EFI_STATUS SetWatchdogTimer ( IN UINTN Timeout, IN UINT64 WatchdogCode, IN UINTN DataSize, IN CHAR16 *WatchdogData OPTIONAL ); Parameters Timeout The numb...
Page 117 - WatchdogCode
Services Version 1.02 12/12/00 99 Status Codes Returned EFI_SUCCESS The timeout has been set. EFI_INVALID_PARAMETER The supplied WatchdogCode is invalid. EFI_UNSUPPORTED The system does not have a watchdog timer. EFI_DEVICE_ERROR The watch dog timer could not be programmed due to a hardwareerror.
Page 118 - Microseconds; Microseconds
Extensible Firmware Interface Specification 100 12/12/00 Version 1.02 3.8.3 Stall() Summary Induces a fine-grained stall. Prototype EFI_STATUS Stall ( IN UINTN Microseconds ) Parameters Microseconds The number of microseconds to stall execution. Description The Stall() function stalls execution on t...
Page 119 - GetNextMonotonicCount (; Count
Services Version 1.02 12/12/00 101 3.8.4 GetNextMonotonicCount() Summary Returns a monotonically increasing count for the platform. Prototype EFI_STATUS GetNextMonotonicCount ( OUT UINT64 *Count ); Parameters Count Pointer to returned value. Description The GetNextMonotonicCount() function returns a...
Page 120 - GetNextHighMonotonicCount (; HighCount
Extensible Firmware Interface Specification 102 12/12/00 Version 1.02 3.8.5 GetNextHighMonotonicCount() Summary Returns the next high 32 bits of the platform’s monotonic counter. Prototype EFI_STATUS GetNextHighMonotonicCount ( OUT UINT32 *HighCount ); Parameters HighCount Pointer to returned value....
Page 122 - Note: If there is not enough memory to perform an add operation, then; Guid
Extensible Firmware Interface Specification 104 12/12/00 Version 1.02 If an add, modify, or remove operation is completed, then EFI_SUCCESS is returned. Note: If there is not enough memory to perform an add operation, then EFI_OUT_OF_RESOURCES is returned. Status Codes Returned EFI_SUCCESS The ( Gui...
Page 123 - EFI Image; LOADED_IMAGE Protocol; This section provides a detailed description of the
Version 1.02 12/12/00 105 4 EFI Image This chapter defines EFI images, a class of files that contain executable code. We begin bydescribing the EFI_LOADED_IMAGE protocol, and then discuss EFI image headers, applications, OS loaders, and drivers. 4.1 LOADED_IMAGE Protocol This section provides a deta...
Page 124 - Protocol Interface Structure
Extensible Firmware Interface Specification 106 12/12/00 Version 1.02 Protocol Interface Structure typedef struct { UINT32 Revision ; EFI_HANDLE ParentHandle ; EFI_SYSTEM_TABLE *SystemTable ; // Source location of the image EFI_HANDLE DeviceHandle ; EFI_DEVICE_PATH *FilePath ; VOID *Reserved; // Ima...
Page 126 - Unloads an image from memory.
Extensible Firmware Interface Specification 108 12/12/00 Version 1.02 4.1.1 LOADED_IMAGE.Unload() Summary Unloads an image from memory. Prototype typedef EFI_STATUS (EFIAPI *EFI_UNLOAD_IMAGE) ( IN EFI_HANDLE ImageHandle, ); Parameters ImageHandle The handle to the image to unload. Type EFI_HANDLE is...
Page 127 - EFI Image Header; Subsystem
EFI Image Version 1.02 12/12/00 109 4.2 EFI Image Header EFI Images are a class of files defined by EFI that contain executable code. The mostdistinguishing feature of EFI Images is that the first set of bytes in the EFI Image file contains animage header that defines the encoding of the executable ...
Page 128 - EFI Applications; LoadOptions; EFI OS Loaders; ExitData; EFI Drivers; EFIImageBootServiceDriver
Extensible Firmware Interface Specification 110 12/12/00 Version 1.02 4.3 EFI Applications Applications are loaded by the boot manager in the EFI firmware, or by other applications. To loadan application the firmware allocates enough memory to hold the image, copies the sections withinthe applicatio...
Page 129 - EFI Image Handoff State; AddressOfEntryPoint
EFI Image Version 1.02 12/12/00 111 When the boot manager loads a driver, the image handle may be used to locate the “load options”for the driver. The load options are those options that were stored in the LoadOptions field of the EFI_LOADED_IMAGE information for the driver. 4.5.1 EFI Image Handoff ...
Page 131 - function is shown as an example.; HeaderSize
EFI Image Version 1.02 12/12/00 113 typedef struct_EFI_CONFIGURATION_TABLE { EFI_GUID VendorGuid; VOID *VendorTable;} EFI_CONFIGURATION_TABLE; The EFI system table contains pointers to the runtime and boot services tables. The definitions forthese tables are shown in the following code fragments. Ex...
Page 133 - Figure 4-1 shows the stack after; ImageEntryPoint; Stack; ESP
EFI Image Version 1.02 12/12/00 115 EFI_INSTALL_PROTOCOL_INTERFACE InstallProtocolInterface; EFI_REINSTALL_PROTOCOL_INTERFACE ReinstallProtocolInterface; EFI_UNINSTALL_PROTOCOL_INTERFACE UninstallProtocolInterface; EFI_HANDLE_PROTOCOL HandleProtocol; EFI_HANDLE_PROTOCOL PCHandleProtocol; EFI_REGISTE...
Page 134 - plabel; SP; Location
Extensible Firmware Interface Specification 116 12/12/00 Version 1.02 4.5.1.2 Handoff State, Itanium-based Operating Systems EFI uses the standard P64 C calling conventions that are defined for Itanium-based operatingsystems. Figure 4-2 shows the stack after ImageEntryPoint has been called on Itaniu...
Page 135 - Device Path Protocol; Device Path Overview; Device Path
Version 1.02 12/12/00 117 5 Device Path Protocol This chapter contains the definition of the device path protocol and the information needed toconstruct and manage device paths in the EFI environment. A device path is constructed and usedby the firmware to convey the location of important devices, s...
Page 136 - is successfully called.
Extensible Firmware Interface Specification 118 12/12/00 Version 1.02 5.2 EFI_DEVICE_PATH Protocol This section provides a detailed description of the EFI_DEVICE_PATH protocol. Summary Can be used on any device handle to obtain generic path/location information concerning thephysical device or logic...
Page 137 - Device Path Nodes; Generic Device Path Structures; Generic Device Path Node Structure
Device Path Protocol Version 1.02 12/12/00 119 5.3 Device Path Nodes There are six major types of Device Path nodes: • Hardware Device Path . This Device Path defines how a device is attached to the resource domain of a system, where resource domain is simply the shared memory, memory mappedI/O, and...
Page 138 - UNALIGNED; End This Instance of a Device Path; would send the; ConsoleOut; stream to both VGA and serial concurrently and thus has a; Device Path End Structure; Device
Extensible Firmware Interface Specification 120 12/12/00 Version 1.02 A Device Path is a series of generic Device Path nodes. The first Device Path node starts at byteoffset zero of the Device Path. The next Device Path node starts at the end of the previous DevicePath node. Therefore all nodes are ...
Page 139 - OS performs a Plug and Play configuration of the PCI bus.; PCI Device Path; PCCARD Device Path
Device Path Protocol Version 1.02 12/12/00 121 5.3.2.1 PCI Device Path The Device Path for PCI defines the path to the PCI configuration space address for a PCI device.There is one PCI Device Path entry for each device and function number that defines the path fromthe root PCI bus to the device. Bec...
Page 140 - Memory Mapped Device Path; bytes that follow in the Vendor Device Path node.; Vendor-Defined Device Path
Extensible Firmware Interface Specification 122 12/12/00 Version 1.02 5.3.2.3 Memory Mapped Device Path Table 5-5. Memory Mapped Device Path Mnemonic ByteOffset ByteLength Description Type 0 1 Type 1 – Hardware Device Path Sub-Type 1 1 Sub-Type 3 – Memory Mapped Length 2 2 Length of this structure i...
Page 141 - ACPI Device Path; Messaging Device Path
Device Path Protocol Version 1.02 12/12/00 123 5.3.3 ACPI Device Path This Device Path contains ACPI Device IDs that represent a device’s Plug and Play Hardware IDand its corresponding unique persistent ID. The ACPI IDs are stored in the ACPI _HID and _UIDdevice identification objects that are assoc...
Page 142 - ATAPI Device Path
Extensible Firmware Interface Specification 124 12/12/00 Version 1.02 5.3.4.1 ATAPI Device Path Table 5-9. ATAPI Device Path Mnemonic ByteOffset ByteLength Description Type 0 1 Type 3 – Messaging Device Path Sub-Type 1 1 Sub-Type 1 – ATAPI Length 2 2 Length of this structure in bytes. Length is 8 by...
Page 143 - type defined in the EFI Specification.
Device Path Protocol Version 1.02 12/12/00 125 5.3.4.4 1394 Device Path Table 5-12. 1394 Device Path Mnemonic ByteOffset ByteLength Description Type 0 1 Type 3 – Messaging Device Path Sub-Type 1 1 Sub-Type 4 – 1394 Length 2 2 Length of this structure in bytes. Length is 16 bytes. Reserved 4 4 Reserv...
Page 144 - O Device Path
Extensible Firmware Interface Specification 126 12/12/00 Version 1.02 5.3.4.6 USB Class Device Path Table 5-14. USB Class Device Path Mnemonic ByteOffset ByteLength Description Type 0 1 Type 3 - Messaging Device Path Sub-Type 1 1 Sub-Type 15 - USB Class Length 2 2 Length of this structure in bytes. ...
Page 147 - Media Device Path; number of zero can be used to represent the raw hard drive.
Device Path Protocol Version 1.02 12/12/00 129 5.3.4.13 Vendor-Defined Messaging Device Path Table 5-21. Vendor-Defined Messaging Device Path Mnemonic ByteOffset ByteLength Description Type 0 1 Type 3 – Messaging Device Path Sub-Type 1 1 Sub-Type 10 – Vendor Length 2 2 Length of this structure in by...
Page 148 - The following structure defines an MBR for EFI:
Extensible Firmware Interface Specification 130 12/12/00 Version 1.02 Table 5-22. Hard Drive Media Device Path Mnemonic ByteOffset ByteLength Description Type 0 1 Type 4 – Media Device Path Sub-Type 1 1 Sub-Type 1 – Hard Drive Length 2 2 Length of this structure in bytes. Length is 42 bytes. Partiti...
Page 150 - Table 5-26. Media Protocol Media Device Path
Extensible Firmware Interface Specification 132 12/12/00 Version 1.02 5.3.5.4 File Path Media Device Path Table 5-25. File Path Media Device Path Mnemonic ByteOffset ByteLength Description Type 0 1 Type 4 – Media Device Path. Sub-Type 1 1 Sub-Type 4 – File Path. Length 2 2 Length of this structure i...
Page 151 - BIOS Boot Specification Device Path; BIOS; Table 5-27. BIOS Boot Specification Device Path; Example BIOS Boot Specification Device Types would include:; Device Path Generation Rules; Rules
Device Path Protocol Version 1.02 12/12/00 133 5.3.6 BIOS Boot Specification Device Path This Device Path is used to describe the booting of non-EFI-aware operating systems. This DevicePath is based on the IPL and BCV table entry data structures defined in Appendix A of the BIOS Boot Specification ....
Page 152 - The following table maps ACPI _CRS devices to EFI Device Path.; EFI Device Path
Extensible Firmware Interface Specification 134 12/12/00 Version 1.02 Device Path structure in the stream. Any future additions to the Device Path structure types willalways start with the current standard header. The size of a Device Path can be determined bytraversing the generic Device Path struc...
Page 153 - Hardware vs. Messaging Device Path Rules
Device Path Protocol Version 1.02 12/12/00 135 5.4.3 Rules with ACPI _ADR If a device in the ACPI name space can be completely described by a _ADR object then it will mapto an EFI ACPI, Hardware, or Message Device Path structure. A _ADR method implies a bus witha standard enumeration algorithm. If t...
Page 154 - Media Device Path Rules; protocol to not have to understand media formats. The
Extensible Firmware Interface Specification 136 12/12/00 Version 1.02 5.4.5 Media Device Path Rules The Media Device Path is used to define the location of information on a medium. Hard Drives aresubdivided into partitions by the MBR and a Media Device Path is used to define which partition isbeing ...
Page 155 - Device I/O Overview; The interfaces provided in the
Version 1.02 12/12/00 137 6 Device I/O Protocol This chapter defines the Device I/O protocol. This protocol is used by code, typically drivers,running in the EFI boot services environment to access memory and I/O. In particular, functionsfor managing PCI buses are defined here although other bus typ...
Page 156 - Releases any resources allocated by Map.
Extensible Firmware Interface Specification 138 12/12/00 Version 1.02 6.2 DEVICE_IO Protocol Summary Provides the basic Memory, I/O, and PCI interfaces that are used to abstract accesses to devices. GUID #define DEVICE_IO_PROTOCOL \ { af6ac311-84c3-11d2-8e3c-00a0c969723b } Protocol Interface Structu...
Page 157 - IoFncs
Device I/O Protocol Version 1.02 12/12/00 139 Description The DEVICE_IO protocol provides the basic Memory, I/O, and PCI interfaces that are used to abstract accesses to devices. A driver that controls a physical device obtains the proper DEVICE_IO protocol interface by checking for the supported pr...
Page 158 - Read
Extensible Firmware Interface Specification 140 12/12/00 Version 1.02 Related Definitions //*******************************************************// EFI_IO_WIDTH//******************************************************* typedef enum { IO_UINT8 = 0, IO_UINT16 = 1, IO_UINT32 = 2, IO_UINT64 = 3 } EFI_I...
Page 160 - PCI Address
Extensible Firmware Interface Specification 142 12/12/00 Version 1.02 Table 6-1. PCI Address Mnemonic ByteOffset ByteLength Description Register 0 1 The register number on the function. Function 1 1 The function on the device. Device 2 1 The device on the bus. Bus 3 1 The bus. Segment 4 1 The segmen...
Page 163 - NumberOfBytes
Device I/O Protocol Version 1.02 12/12/00 145 Related Definitions //*******************************************************// EFI_IO_OPERATION_TYPE//******************************************************* typedef enum { EfiBusMasterRead, EfiBusMasterWrite, EfiBusMasterCommonBuffer } EFI_IO_OPERATION...
Page 164 - EFIBusMasterWrite
Extensible Firmware Interface Specification 146 12/12/00 Version 1.02 6.2.4 DEVICE_IO.Unmap() Summary Completes the Map() operation and releases any corresponding resources. Prototype typedef EFI_STATUS (EFIAPI *EFI_IO_UNMAP) ( IN EFI_DEVICE_IO_INTERFACE *This, IN VOID *Mapping ); Parameters This A ...
Page 166 - AllocateMaxAddress; AllocateAddress; HostAddress
Extensible Firmware Interface Specification 148 12/12/00 Version 1.02 Allocation requests of Type AllocateMaxAddress will allocate any available range of pages that satisfies the request that are below or equal to the value pointed to by HostAddress on input. On success, the value pointed to by Host...
Page 167 - Flushes any posted write data to the device.
Device I/O Protocol Version 1.02 12/12/00 149 6.2.6 DEVICE_IO.Flush() Summary Flushes any posted write data to the device. Prototype typedef EFI_STATUS (EFIAPI *EFI_IO_FLUSH) ( IN EFI_DEVICE_IO_INTERFACE *This ); Parameters This A pointer to the EFI_DEVICE_IO_INTERFACE instance. Type EFI_DEVICE_IO_I...
Page 169 - Console I/O Overview
Version 1.02 12/12/00 151 7 Console I/O Protocol This chapter defines the Console I/O protocol. This protocol is used to handle input and output oftext-based information intended for the system user during the operation of code in the EFI bootservices environment. Also included here are the definiti...
Page 170 - ConsoleIn Definition; Supported Unicode Control Characters
Extensible Firmware Interface Specification 152 12/12/00 Version 1.02 7.2 ConsoleIn Definition The SIMPLE_INPUT protocol defines an input stream that contains Unicode characters and required EFI scan codes. Only the control characters defined in Table 7-1 have meaning in theUnicode input or output s...
Page 171 - EFI Scan Codes for SIMPLE_INPUT_INTERFACE; EFI Scan Code
Console I/O Protocol Version 1.02 12/12/00 153 Table 7-2. EFI Scan Codes for SIMPLE_INPUT_INTERFACE (continued) EFI Scan Code Description 0x0b Function 1. 0x0c Function 2. 0x0d Function 3. 0x0e Function 4. 0x0f Function 5. 0x10 Function 6. 0x11 Function 7. 0x12 Function 8. 0x13 Function 9. 0x14 Func...
Page 172 - SIMPLE_INPUT Protocol; EFI_EVENT
Extensible Firmware Interface Specification 154 12/12/00 Version 1.02 7.3 SIMPLE_INPUT Protocol Summary This protocol is used to obtain input from the ConsoleIn device. GUID #define SIMPLE_INPUT_PROTOCOL \ { 387477c1-69c7-11d2-8e39-00a0c969723b } Protocol Interface Structure typedef struct _SIMPLE_I...
Page 173 - IN BOOLEAN; ExtendedVerification
Console I/O Protocol Version 1.02 12/12/00 155 7.3.1 SIMPLE_INPUT.Reset() Summary Resets the input device hardware. Prototype EFI_STATUS (EFIAPI *EFI_INPUT_RESET) ( IN SIMPLE_INPUT_INTERFACE *This, IN BOOLEAN ExtendedVerification ); Parameters This A pointer to the SIMPLE_INPUT_INTERFACE instance. T...
Page 175 - ConsoleOut or StandardError
Console I/O Protocol Version 1.02 12/12/00 157 7.4 ConsoleOut or StandardError The SIMPLE_TEXT_OUTPUT protocol must implement the same Unicode code pages as the SIMPLE_INPUT protocol. The protocol must also support the Unicode control characters defined in Table 7-1. The SIMPLE_TEXT_OUTPUT protocol ...
Page 177 - ClearScreen; StandardError
Console I/O Protocol Version 1.02 12/12/00 159 Description The SIMPLE_TEXT_OUTPUT protocol is used to control text-based output devices. It is the minimum required protocol for any handle supplied as the ConsoleOut or StandardError device. In addition, the minimum supported text mode of such devices...
Page 179 - Writes a Unicode string to the output device.; #define BOXDRAW_VERTICAL 0x2502
Console I/O Protocol Version 1.02 12/12/00 161 7.5.2 SIMPLE_TEXT_OUTPUT.OutputString() Summary Writes a Unicode string to the output device. Prototype EFI_STATUS (EFIAPI *EFI_TEXT_STRING) ( IN SIMPLE_TEXT_OUTPUT_INTERFACE *This, IN CHAR16 *String ); Parameters This A pointer to the SIMPLE_TEXT_OUTPU...
Page 184 - ModeNumber
Extensible Firmware Interface Specification 166 12/12/00 Version 1.02 7.5.5 SIMPLE_TEXT_OUTPUT.SetMode() Summary Sets the output device(s) to a specified mode. Prototype EFI_STATUS (* EFIAPI EFI_TEXT_SET_MODE) ( IN SIMPLE_TEXT_OUTPUT_INTERFACE *This, IN UINTN ModeNumber ); Parameters This A pointer ...
Page 185 - Sets the background and foreground colors for the; Attribute
Console I/O Protocol Version 1.02 12/12/00 167 7.5.6 SIMPLE_TEXT_OUTPUT.SetAttribute() Summary Sets the background and foreground colors for the OutputString() and ClearScreen() functions. Prototype EFI_STATUS (EFIAPI *EFI_TEXT_SET_ATTRIBUTE) ( IN SIMPLE_TEXT_OUTPUT_INTERFACE *This, IN UINTN Attribu...
Page 188 - Sets the current coordinates of the cursor position.; Row
Extensible Firmware Interface Specification 170 12/12/00 Version 1.02 7.5.8 SIMPLE_TEXT_OUTPUT.SetCursorPosition() Summary Sets the current coordinates of the cursor position. Prototype EFI_STATUS (EFIAPI *EFI_TEXT_SET_CURSOR_POSITION) ( IN SIMPLE_TEXT_OUTPUT_INTERFACE *This, IN UINTN Column, IN UIN...
Page 189 - Visible
Console I/O Protocol Version 1.02 12/12/00 171 7.5.9 SIMPLE_TEXT_OUTPUT.EnableCursor() Summary Makes the cursor visible or invisible. Prototype EFI_STATUS (EFIAPI *EFI_TEXT_ENABLE_CURSOR) ( IN SIMPLE_TEXT_OUTPUT_INTERFACE *This, IN BOOLEAN Visible ); Parameters This A pointer to the SIMPLE_TEXT_OUTP...
Page 191 - This protocol provides control over block devices.; GUID; UINT64 Revision
Version 1.02 12/12/00 173 8 Block I/O Protocol This chapter defines the Block I/O protocol. This protocol is used to abstract mass storage devicesto allow code running in the EFI boot services environment to access them without specificknowledge of the type of device or controller that manages the d...
Page 193 - LogicalPartition
Block I/O Protocol Version 1.02 12/12/00 175 Related Definitions //*******************************************************// EFI_BLOCK_IO_MEDIA//******************************************************* typedef struct { UINT32 MediaId; BOOLEAN RemovableMedia; BOOLEAN MediaPresent; BOOLEAN LogicalParti...
Page 196 - MediaId
Extensible Firmware Interface Specification 178 12/12/00 Version 1.02 Status Codes Returned EFI_SUCCESS The data was read correctly from the device. EFI_DEVICE_ERROR The device reported an error while attempting to perform the readoperation. EFI_NO_MEDIA There is no media in the device. EFI_MEDIA_CH...
Page 199 - Flushes all modified data to a physical block device.
Block I/O Protocol Version 1.02 12/12/00 181 8.1.4 BLOCK_IO.FlushBlocks() Summary Flushes all modified data to a physical block device. Prototype EFI_STATUS (EFIAPI *EFI_BLOCK_FLUSH) ( IN EFI_BLOCK_IO *This ); Parameters This Indicates a pointer to the calling context. Type EFI_BLOCK_IO is defined i...
Page 201 - This protocol is used to abstract Block I/O interfaces.
Version 1.02 12/12/00 183 9 Disk I/O Protocol This chapter defines the Disk I/O protocol. This protocol is used to abstract the block accesses ofthe Block I/O protocol to a more general offset-length protocol. The firmware is responsible foradding this protocol to any Block I/O interface that appear...
Page 204 - IN UNITN
Extensible Firmware Interface Specification 186 12/12/00 Version 1.02 9.1.2 EFI_DISK_IO.WriteDisk() Summary Writes a specified number of bytes to a device. Prototype EFI_STATUS (EFIAPI *EFI_DISK_WRITE) ( IN EFI_DISK_IO *This, IN UINT32 MediaId, IN UINT64 Offset, IN UNITN BufferSize, IN VOID *Buffer ...
Page 205 - File System Protocol; that provides interfaces to access files on a; Simple File System Protocol; Provides a minimal interface for file-type access to a device.
Version 1.02 12/12/00 187 10 File System Protocol This chapter defines the File System protocol. This protocol allows code running in the EFI bootservices environment to obtain file based access to a device. The Simple File System protocol isused to open a device volume and return an EFI_FILE that p...
Page 206 - Devices that support the Simple File System protocol return an
Extensible Firmware Interface Specification 188 12/12/00 Version 1.02 Description The Simple File System protocol provides a minimal interface for file-type access to a device. Thisprotocol is only supported on some devices. Devices that support the Simple File System protocol return an EFI_FILE_IO_...
Page 208 - Provides file based access to supported file systems.; Revision Number; The version of the
Extensible Firmware Interface Specification 190 12/12/00 Version 1.02 10.2 EFI_FILE Protocol Summary Provides file based access to supported file systems. Revision Number #define EFI_FILE_REVISION 0x00010000 Protocol Interface Structure typedef struct _EFI _ FILE { UINT64 Revision ; EFI_FILE_OPEN Op...
Page 210 - Opens a new file relative to the source file’s location.; A pointer to the
Extensible Firmware Interface Specification 192 12/12/00 Version 1.02 10.2.1 EFI_FILE.Open() Summary Opens a new file relative to the source file’s location. Prototype EFI_STATUS(EFIAPI *EFI_FILE_OPEN) ( IN EFI_FILE *This, OUT EFI_FILE **NewHandle, IN CHAR16 *FileName, IN UINT64 OpenMode, IN UINT64 ...
Page 213 - Closes a specified file handle.
File System Protocol Version 1.02 12/12/00 195 10.2.2 EFI_FILE.Close() Summary Closes a specified file handle. Prototype EFI_STATUS(EFIAPI *EFI_FILE_CLOSE) ( IN EFI_FILE *This ); Parameters This A pointer to the EFI_FILE instance that is the file handle to close. Type EFI_FILE is defined in Section ...
Page 214 - In all cases the file handle is closed.
Extensible Firmware Interface Specification 196 12/12/00 Version 1.02 10.2.3 EFI_FILE.Delete() Summary Closes and deletes a file. Prototype EFI_STATUS(EFIAPI *EFI_FILE_DELETE) ( IN EFI_FILE *This ); Parameters This A pointer to the EFI_FILE instance that is the handle to the file to delete. Type EFI...
Page 217 - Position
File System Protocol Version 1.02 12/12/00 199 10.2.6 EFI_FILE.SetPosition() Summary Sets a file’s current position. Prototype EFI_STATUS(EFIAPI *EFI_FILE_SET_POSITION) ( IN EFI_FILE *This, IN UINT64 Position ); Parameters This A pointer to the EFI_FILE instance that is the he file handle to set the...
Page 221 - Flushes all modified data associated with a file to a device.
File System Protocol Version 1.02 12/12/00 203 10.2.10 EFI_FILE.Flush() Summary Flushes all modified data associated with a file to a device. Prototype EFI_STATUS(EFIAPI *EFI_FILE_FLUSH) ( IN EFI_FILE *This ); Parameters This A pointer to the EFI_FILE instance that is the file handle to flush. Type ...
Page 224 - BOOLEAN
Extensible Firmware Interface Specification 206 12/12/00 Version 1.02 10.2.12 EFI_FILE_SYSTEM_INFO Summary Provides a GUID and a data structure that can be used with EFI_FILE.GetInfo() to get information about the system volume, and EFI_FILE.SetInfo() to set the system volume’s volume label. GUID #d...
Page 225 - VolumeLabel
File System Protocol Version 1.02 12/12/00 207 10.2.13 EFI_FILE_SYSTEM_VOLUME_LABEL Summary Provides a GUID and a data structure that can be used with EFI_FILE.GetInfo() or EFI_FILE.SetInfo() to get or set information about the system’s volume label. GUID #define EFI_FILE_SYSTEM_VOLUME_LABEL_ID \ { ...
Page 227 - Load File Protocol; LoadFile
Version 1.02 12/12/00 209 11 Load File Protocol This chapter defines the Load File protocol. This protocol is designed to allow code running in theEFI boot services environment to find and load other modules of code. 11.1 LOAD_FILE Protocol Summary Is used to obtain files from arbitrary devices. GUI...
Page 229 - FALSE; BootPolicy
Load File Protocol Version 1.02 12/12/00 211 If BootPolicy is FALSE the FilePath must match an exact file to be loaded. If no such file exists, EFI_NOT_FOUND is returned. If BootPolicy is FALSE , and an attempt is being made to perform a network boot through the PXE Base Code protocol, EFI_UNSUPPORT...
Page 231 - The revision to which the
Version 1.02 12/12/00 213 12 Serial I/O Protocol This chapter defines the Serial I/O protocol. This protocol is used to abstract byte stream devices. 12.1 SERIAL_IO Protocol Summary This protocol is used to communicate with any type of character-based I/O device. GUID #define SERIAL_IO_PROTOCOL \ { ...
Page 233 - SpaceParity
Serial I/O Protocol Version 1.02 12/12/00 215 Parity If applicable, this is the EFI_PARITY_TYPE that is computed or checked as each character is transmitted or received. If the devicedoes not support parity the value is the default parity value. StopBits If applicable, the EFI_STOP_BITS_TYPE number ...
Page 235 - Resets the serial device.
Serial I/O Protocol Version 1.02 12/12/00 217 12.1.1 SERIAL_IO.Reset() Summary Resets the serial device. Prototype EFI_STATUS (EFIAPI *EFI_SERIAL_RESET) ( IN SERIAL_IO_INTERFACE *This ); Parameters This A pointer to the SERIAL_IO_INTERFACE instance. Type SERIAL_IO_INTERFACE is defined in Section 12....
Page 236 - IN UINT8; DefaultParity
Extensible Firmware Interface Specification 218 12/12/00 Version 1.02 12.1.2 SERIAL_IO.SetAttributes() Summary Sets the baud rate, receive FIFO depth, transmit/receive time out, parity, data bits, and stop bits on aserial device. EFI_STATUS (EFIAPI *EFI_SERIAL_SET_ATTRIBUTES) ( IN SERIAL_IO_INTERFAC...
Page 238 - Control
Extensible Firmware Interface Specification 220 12/12/00 Version 1.02 12.1.3 SERIAL_IO.SetControl() Summary Sets the control bits on a serial device. Prototype EFI_STATUS (EFIAPI *EFI_SERIAL_SET_CONTROL) ( IN SERIAL_IO_INTERFACE *This, IN UINT32 Control ); Parameters This A pointer to the SERIAL_IO_...
Page 240 - Retrieves the status of the control bits on a serial device.
Extensible Firmware Interface Specification 222 12/12/00 Version 1.02 12.1.4 SERIAL_IO.GetControl() Summary Retrieves the status of the control bits on a serial device. Prototype EFI_STATUS (EFIAPI *EFI_SERIAL_GET_CONTROL) ( IN SERIAL_IO_INTERFACE *This, OUT UINT32 *Control ); Parameters This A poin...
Page 243 - Unicode Collation Protocol; UNICODE_COLLATION Protocol; StriColl
Version 1.02 12/12/00 225 13 Unicode Collation Protocol This chapter defines the Unicode Collation protocol. This protocol is used to allow code running inthe boot services environment to perform lexical comparison functions on Unicode strings for givenlanguages. 13.1 UNICODE_COLLATION Protocol Summ...
Page 245 - INTN
Unicode Collation Protocol Version 1.02 12/12/00 227 13.1.1 UNICODE_COLLATION.StriColl() Summary Performs a case-insensitive comparison of two Null-terminated Unicode strings. Prototype INTN (EFIAPI *EFI_UNICODE_COLLATION_STRICOLL) ( IN UNICODE_COLLATION_INTERFACE *This, IN CHAR16 *s1, IN CHAR16 *s2...
Page 247 - Match any letter in the alphabet.
Unicode Collation Protocol Version 1.02 12/12/00 229 Examples patterns (for English): *.FW Matches all strings that end in “.FW” or “.fw” or“.Fw” or “.fW”. [a-z] Match any letter in the alphabet. [!@#$%^&*()] Match any one of these symbols. z Match the character ‘z’ or ‘Z’. D?.* Match the charac...
Page 248 - This functions walks through all the Unicode characters in
Extensible Firmware Interface Specification 230 12/12/00 Version 1.02 13.1.3 UNICODE_COLLATION.StrLwr() Summary Converts all the Unicode characters in a Null-terminated Unicode string to lower case Unicodecharacters. Prototype VOID (EFIAPI *EFI_UNICODE_COLLATION_STRLWR) ( IN UNICODE_COLLATION_INTERF...
Page 253 - PXE Base Code Protocol; Preboot Execution Environment (PXE) Specification
Version 1.02 12/12/00 235 14 PXE Base Code Protocol This chapter defines the Preboot Execution Environment (PXE) Base Code protocol, which is usedto access PXE-compatible devices for network access and network booting. More informationabout PXE can be found in the Preboot Execution Environment (PXE)...
Page 257 - PxeDiscover
PXE Base Code Protocol Version 1.02 12/12/00 239 ProxyOfferReceived This field is initialized to FALSE by the Start() function and set to TRUE when the Dhcp() function completes successfully and a proxy DHCP offer packet was received. When TRUE , the ProxyOffer packet field is valid. This field can ...
Page 259 - RouteTableEntries
PXE Base Code Protocol Version 1.02 12/12/00 241 RouteTableEntries The number of valid entries in the current route table. This fieldis reset to zero by the Start() function. RouteTable Array of route table entries. IcmpError ICMP error packet. This field is updated when an ICMP error isreceived and...
Page 260 - BootpSeconds
Extensible Firmware Interface Specification 242 12/12/00 Version 1.02 //******************************************************* // This section defines the data types for DHCP packets, ICMP// error packets, and TFTP error packets. All of these are byte// packed data structures. //*******************...
Page 264 - PXE Specification
Extensible Firmware Interface Specification 246 12/12/00 Version 1.02 Description The basic mechanisms and flow for remote booting in EFI are identical to the remote bootfunctionality described in detail in the PXE Specification . However, the actual execution environment, linkage, and calling conve...
Page 266 - MakeCallbacks
Extensible Firmware Interface Specification 248 12/12/00 Version 1.02 ToS Set to DEFAULT_ToS . DhcpCompleted Set to FALSE . ProxyOfferReceived Set to FALSE . StationIp Set to an address of all zeros. SubnetMask Set to a subnet mask of all zeros. DhcpDiscover Zero-filled. DhcpAck Zero-filled. ProxyOf...
Page 268 - Started
Extensible Firmware Interface Specification 250 12/12/00 Version 1.02 14.1.2 EFI_PXE_BASE_CODE.Stop() Summary Disables the use of the PXE Base Code Protocol functions. Prototype EFI_STATUS (EFIAPI *EFI_PXE_BASE_CODE_STOP) ( IN EFI_PXE_BASE_CODE *This ); Parameters This Pointer to the EFI_PXE_BASE_CO...
Page 273 - AcceptAnyResponse
PXE Base Code Protocol Version 1.02 12/12/00 255 //******************************************************* // EFI_PXE_BASE_CODE_DISCOVER_INFO //******************************************************* typedef struct { BOOLEAN UseMCast; BOOLEAN UseBCast; BOOLEAN UseUCast; BOOLEAN MustUseList; EFI_IP_A...
Page 276 - Info; for normal TFTP and MTFTP read file operation. Setting; will cause TFTP and MTFTP read file operations to
Extensible Firmware Interface Specification 258 12/12/00 Version 1.02 Info Pointer to the MTFTP information. This information is required to startor join a multicast TFTP session. It is also required to perform the “getfile size” and “read directory” operations of MTFTP. See "RelatedDefinitions&...
Page 282 - Table 14-2. Destination IP Filter Operation; DestIp; Table 14-3. Destination UDP Port Filter Operation; DestPort
Extensible Firmware Interface Specification 264 12/12/00 Version 1.02 Description This function reads a UDP packet from a network interface. The data contents are returned in (theoptional HeaderPtr and) BufferPtr , and the size of the buffer received is returned in BufferSize . If the input BufferSi...
Page 283 - SrcIp; Table 14-5. Source UDP Port Filter Operation; SrcPort
PXE Base Code Protocol Version 1.02 12/12/00 265 Table 14-4. Source IP Filter Operation OpFlagsANY_SRC_IP SrcIp Action 0 NULL Return EFI_INVALID_PARAMETER . 1 NULL Receive a packet sent from any IP address. 0 not NULL Receive a packet whose source IP address matches SrcIp . 1 not NULL Receive a pack...
Page 284 - PROMISCUOUS
Extensible Firmware Interface Specification 266 12/12/00 Version 1.02 14.1.8 EFI_PXE_BASE_CODE.SetIpFilter() Summary Updates the IP receive filters of a network device and enables software filtering. Prototype EFI_STATUS (EFIAPI *EFI_PXE_BASE_CODE_SET_IP_FILTER) ( IN EFI_PXE_BASE_CODE *This, IN EFI_...
Page 295 - Simple Network Protocol; UINT64
Version 1.02 12/12/00 277 15 Simple Network Protocol This chapter defines the Simple Network Protocol. This protocol provides a packet level interfaceto a network adapter. 15.1 EFI_SIMPLE_NETWORK Protocol Summary The EFI_SIMPLE_NETWORK protocol provides services to initialize a network interface, tr...
Page 297 - SIMPLE_NETWORK Protocol; // Note that the fields in this data structure are read-only and; ReceiveFilterSetting; MacAddressChangeable; MediaPresentSupported
SIMPLE_NETWORK Protocol Version 1.02 12/12/00 279 Related Definitions //******************************************************* // EFI_SIMPLE_NETWORK_MODE // // Note that the fields in this data structure are read-only and // are updated by the code that produces the EFI_SIMPLE_NETWORK // protocol f...
Page 298 - EfiSimpleNetworkStopped
Extensible Firmware Interface Specification 280 12/12/00 Version 1.02 State Reports the current state of the network interface (see EFI_SIMPLE_NETWORK_STATE below). When an EFI_SIMPLE_NETWORK driver has initialized a network interface, it is left in the EfiSimpleNetworkStopped state. HwAddressSize T...
Page 299 - MediaPresentSupported; Preboot Execution
SIMPLE_NETWORK Protocol Version 1.02 12/12/00 281 MediaPresentSupported TRUE if the presence of media can be determined; otherwise FALSE . If FALSE , MediaPresent cannot be used. MediaPresent TRUE if media are connected to the network interface;otherwise FALSE . This field is only valid immediately ...
Page 300 - Changes the state of a network interface from “stopped” “started”.
Extensible Firmware Interface Specification 282 12/12/00 Version 1.02 15.1.1 EFI_SIMPLE_NETWO R K.Start() Summary Changes the state of a network interface from “stopped” “started”. Prototype EFI_STATUS (EFIAPI *EFI_SIMPLE_NETWORK_START) ( IN EFI_SIMPLE_NETWORK *This ); Parameters This A pointer to t...
Page 301 - Changes the state of a network interface from “started” to “stopped”.; will be
SIMPLE_NETWORK Protocol Version 1.02 12/12/00 283 15.1.2 EFI_SIMPLE_NETWO R K.Stop() Summary Changes the state of a network interface from “started” to “stopped”. Prototype EFI_STATUS (EFIAPI *EFI_SIMPLE_NETWORK_STOP) ( IN EFI_SIMPLE_NETWORK *This ); Parameters This A pointer to the EFI_SIMPLE_NETWO...
Page 302 - ExtraRxBufferSize; ExtraTxBufferSize; is returned. If the allocation succeeds and the
Extensible Firmware Interface Specification 284 12/12/00 Version 1.02 15.1.3 EFI_SIMPLE_NETWO R K.Initialize() Summary Resets a network adapter and allocates the transmit and receive buffers required by the networkinterface; optionally, also requests allocation of additional transmit and receive buf...
Page 303 - . The transmit and receive queues are emptied and all
SIMPLE_NETWORK Protocol Version 1.02 12/12/00 285 15.1.4 EFI_SIMPLE_NETW O RK.Reset() Summary Resets a network adapter and re-initializes it with the parameters that were provided in the previouscall to Initialize() . Prototype EFI_STATUS (EFIAPI *EFI_SIMPLE_NETWORK_RESET) ( IN EFI_SIMPLE_NETWORK *T...
Page 304 - This function releases the memory buffers assigned in the
Extensible Firmware Interface Specification 286 12/12/00 Version 1.02 15.1.5 EFI_SIMPLE_NETWO R K.Shutdown() Summary Resets a network adapter and leaves it in a state that is safe for another driver to initialize. Prototype EFI_STATUS (EFIAPI *EFI_SIMPLE_NETWORK_SHUTDOWN) ( IN EFI_SIMPLE_NETWORK *Th...
Page 306 - ResetMCastFilter; MCastFilterCnt
Extensible Firmware Interface Specification 288 12/12/00 Version 1.02 If ResetMCastFilter is TRUE , then the multicast receive filter list on the network interface will be reset to the default multicast receive filter list. If ResetMCastFilter is FALSE , and this network interface allows the multica...
Page 309 - Number of valid frames received and copied into receive buffers.
SIMPLE_NETWORK Protocol Version 1.02 12/12/00 291 UINT64 RxDroppedFrames; UINT64 RxUnicastFrames; UINT64 RxBroadcastFrames; UINT64 RxMulticastFrames; UINT64 RxCrcErrorFrames; UINT64 RxTotalBytes; UINT64 TxTotalFrames; UINT64 TxGoodFrames; UINT64 TxUndersizeFrames; UINT64 TxOversizeFrames; UINT64 TxD...
Page 311 - Converts a multicast IP address to a multicast HW MAC address.; to; IP
SIMPLE_NETWORK Protocol Version 1.02 12/12/00 293 15.1.9 EFI_SIMPLE_NETWO R K.MCastIPtoMAC() Summary Converts a multicast IP address to a multicast HW MAC address. Prototype EFI_STATUS (EFIAPI *EFI_SIMPLE_NETWORK_MCAST_IP_TO_MAC) ( IN EFI_SIMPLE_NETWORK *This, IN BOOLEAN IPv6, IN EFI_IP_ADDRESS *IP,...
Page 315 - InterruptStatus; , the interrupt status will not be read. If; TxBuf
SIMPLE_NETWORK Protocol Version 1.02 12/12/00 297 Description This function gets the current interrupt and recycled transmit buffer status from the networkinterface. The interrupt status is returned as a bit mask in InterruptStatus . If InterruptStatus is NULL , the interrupt status will not be read...
Page 321 - Preboot; EfiNetworkInterfaceUndi
SIMPLE_NETWORK Protocol Version 1.02 12/12/00 303 16-bit UNDI and 32/64-bit S/W UNDI: Id contains the address of the first byte of the copy of the !PXE structure in the relocated UNDI code segment. See the Preboot Execution Environment (PXE) Specification and Appendix G. H/W UNDI: Id contains the ad...
Page 322 - Preboot Execution Environment
Extensible Firmware Interface Specification 304 12/12/00 Version 1.02 MajorVer Major version number. 16-bit UNDI: MajorVer comes from the third byte of the UNDIRev field in the UNDI ROM ID structure. Refer to the Preboot Execution Environment (PXE) Specification . 32/64-bit S/W UNDI and H/W UNDI: Ma...
Page 323 - File System Format; System Partition
Version 1.02 12/12/00 305 16 File System Format The file system supported by the Extensible Firmware Interface is based on the FAT file system.EFI defines a specific version of FAT that is explicitly documented and testable. Conformance tothe EFI specification and its associate reference documents i...
Page 324 - Names; EFI
Extensible Firmware Interface Specification 306 12/12/00 Version 1.02 16.1.1 File System Format The first block (sector) of a partition contains a data structure called the BIOS Parameter Block,BPB, that defines the type and location of FAT file system on the drive. The BPB contains a datastructure ...
Page 325 - loaders and applications will be stored in a sub directory below
File System Format Version 1.02 12/12/00 307 This directory contains EFI images that aide in recovery if the boot selections for the softwareinstalled on the EFI system partition are ever lost. Any additional EFI executables must be in subdirectories below the vendor sub directory. The following is ...
Page 326 - Partition Discovery; DISK; dl; Partition Table; Figure 16-1. Nesting of Legacy MBR Partition Records; Check for GUID Partition Table Headers.
Extensible Firmware Interface Specification 308 12/12/00 Version 1.02 16.2 Partition Discovery EFI requires the firmware to be able to parse legacy master boot records, the new GUID PartitionTable (GPT), and El Torito logical device volumes. The EFI firmware produces a logical BLOCK_IO device for ea...
Page 328 - Partition 1; LBAn; Primary Partition; First useable block
Extensible Firmware Interface Specification 310 12/12/00 Version 1.02 Partition Entry array is the PartitionEntrySize multiplied by NumberOfPartitionEntries. When aGUID Partition Entry is updated the PartitionEntryArrayCRC must be updated. When thePartitionEntryArrayCRC is updated the GUID Partition...
Page 329 - Check the GUID Partition Table Signature
File System Format Version 1.02 12/12/00 311 Table 16-1. GUID Partition Table Header Mnemonic ByteOffset ByteLength Description Signature 0 8 Identifies EFI-compatible partition table header.This value must contain the string “EFI PART”,0x5452415020494645. Revision 8 4 The specification revision num...
Page 330 - If the GUID Partition Table is the primary table, stored at LBA 1:
Extensible Firmware Interface Specification 312 12/12/00 Version 1.02 If the GUID Partition Table is the primary table, stored at LBA 1: • Check the AlternateLBA to see if it is a valid GUID Partition Table If the primary GUID Partition Table is corrupt: • Check the last LBA of the device to see if ...
Page 331 - . This will allow drivers and applications, including OS; Table 16-3. Defined GUID Partition Entry - Partition Type GUIDs; Bits
File System Format Version 1.02 12/12/00 313 The SizeOfPartitionEntry variable in the GUID Partition Table Header defines the size of a GUIDPartition Entry. The GUID Partition Entry starts in the first byte of the GUID Partition Entry andany unused space at the end of the defined partition entry is ...
Page 332 - DVD-ROM images formatted as required by the UDFTM 2.00 specification (
Extensible Firmware Interface Specification 314 12/12/00 Version 1.02 16.2.2 ISO-9660 and El Torito IS0-9660 is the industry standard low level format used on CD-ROM and DVD-ROM. CD-ROMformat is completely described by the “El Torito” Bootable CD-ROM Format SpecificationVersion 1.0. To boot from a C...
Page 333 - . This will allow drivers and applications, including; Table 16-6. Legacy Master Boot Record Partition Record
File System Format Version 1.02 12/12/00 315 Table 16-5. Legacy Master Boot Record Mnemonic ByteOffset ByteLength Description BootCode 0 440 Code used on legacy Intel architecture system to selecta partition record and load the first block (sector) of thepartition pointed to by the partition record....
Page 334 - Legacy Master Boot Record and GPT Partitions; Table 16-7. PMBR Entry to Precede a GUID Partition Table Header
Extensible Firmware Interface Specification 316 12/12/00 Version 1.02 Table 16-6. Legacy Master Boot Record Partition Record (continued) Mnemonic ByteOffset ByteLength Description End Track 7 1 End of partition in CHS address, not used by EFI firmware. Starting LBA 8 4 Starting LBA address of the pa...
Page 335 - Media Formats; Media; Zip; Drive; EFI code does not assume a fixed block size.
File System Format Version 1.02 12/12/00 317 16.3 Media Formats This section describes how booting from different types of removable media is handled. In generalthe rules are consistent regardless of a media’s physical type and whether it is removable or not. 16.3.1 Removable Media Removable media m...
Page 337 - The boot sequence for EFI consists of the following:; Firmware Boot Manager
Version 1.02 12/12/00 319 17 Boot Manager The EFI boot manager is a firmware policy engine that can be configured by modifyingarchitecturally defined global NVRAM variables. The boot manager will attempt to load EFIdrivers and EFI applications (including EFI OS boot loaders) in an order defined by t...
Page 339 - Descriptor
Boot Manager Version 1.02 12/12/00 321 and fixed media types. This search occurs when the device path of the boot image listed in any bootoption points directly to a SIMPLE_FILE_SYSTEM device and does not specify the exact file to load. The file discovery method is explained in “Boot Option Variable...
Page 340 - FilePathList; DataSize
Extensible Firmware Interface Specification 322 12/12/00 Version 1.02 FilePathList A packed array of EFI device paths. The first element of the array is anEFI device path that describes the device and location of the Image forthis load option. The FilePathList[0] is specific to the device type. Othe...
Page 341 - Globally-Defined Variables; is called. This means that these; Global Variables; Variable Name
Boot Manager Version 1.02 12/12/00 323 17.2 Globally-Defined Variables This section defines a set of variables that have architecturally defined meanings. In addition to thedefined data content, each such variable has an architecturally defined attribute that indicates whenthe data variable may be a...
Page 343 - Boot Option Variables Default Behavior
Boot Manager Version 1.02 12/12/00 325 DriverOrder list is used by the firmware’s boot manager as the default load order for EFI drivers that it should explicitly load. 17.3 Boot Option Variables Default Behavior The default state of globally-defined variables is firmware vendor specific. However th...
Page 344 - EFI Image Types; Architecture; FilePath
Extensible Firmware Interface Specification 326 12/12/00 Version 1.02 removable media device will point to a device that “speaks” the SIMPLE_FILE_SYSTEM protocol. The FilePath will not contain a file name or sub directories. The system firmware will attempt to boot from a removable media FilePath by...
Page 345 - PCI Expansion ROM; Standard PCI Expansion ROM Header; Table 18-1. Standard PCI Expansion ROM Header; Offset; x01 – Open Firmware standard for PCI
Version 1.02 12/12/00 327 18 PCI Expansion ROM The PCI Local Bus Specification defines how to discover expansion ROM code that comes from a ROM on a PCI Card. The expansion ROM can be executed to initialize a specific device or,possibly, to boot a system. PCI allows the ROM to contain several differ...
Page 346 - EFI PCI Expansion ROM Header; PCI Local Bus Specification
Extensible Firmware Interface Specification 328 12/12/00 Version 1.02 EFI will coordinate with a future revision of the PCI specification to allocate the code type of 0x03to represent EFI images. This code type will signify that EFI extensions are present in the standardPCI expansion ROM header. Tab...
Page 347 - Multiple Image Format Support; structure for the driver image to obtain the
PCI Expansion ROM Version 1.02 12/12/00 329 Table 18-3 defines the layout of an EFI PCI expansion ROM. Missing values will be supplied in alater version of the specification. Table 18-3. EFI PCI Expansion ROM Header Offset ByteLength Value Description 0x00 1 0x55 ROM Signature, byte 1 0x01 1 0xAA RO...
Page 349 - GUID and Time Formats; Wired for Management Baseline; EFI GUID Format; All EFI time is stored in the format described by Appendix J of the
Version 1.02 12/12/00 331 A GUID and Time Formats All EFI GUIDs (Globally Unique Identifiers) have the format described in Appendix J of the Wired for Management Baseline S pecification . This document references the format of the GUID, but implementers must reference the Wired for Management specif...
Page 351 - Console; EFI Scan Codes for SIMPLE_INPUT
Version 1.02 12/12/00 333 B Console The EFI console was designed so that it could map to common console devices. This appendixexplains how an EFI console could map to a VGA with PC AT 101/102, PCANSI, or ANSI X3.64consoles. B.1 SIMPLE_INPUT Table B-1 gives examples of how an EFI scan code can be map...
Page 352 - Table B-2 defines how the programmatic methods of the
Extensible Firmware Interface Specification 334 12/12/00 Version 1.02 Table B-1. EFI Scan Codes for SIMPLE_INPUT (continued) EFI Scan Code Description ANSI X3.64Codes PCANSICodes AT 101/102 KeyboardScan Codes 0x0e Function 4 CSI O x ESC [ O x 0x3e 0x0f Function 5 CSI O t ESC [ O t 0x3f 0x10 Function...
Page 355 - Device Path Examples; Example Computer System; SIO
Version 1.02 12/12/00 337 C Device Path Examples This appendix presents an example EFI Device Path and explains its relationship to the ACPI namespace. An example system design is presented along with its corresponding ACPI name space.These physical examples are mapped back to EFI Device Paths. C.1 ...
Page 356 - Legacy floppy; Figure C-2. Partial ACPI Name Space for Example System; Legacy Floppy; End Device Path
Extensible Firmware Interface Specification 338 12/12/00 Version 1.02 The remainder of this appendix describes how to construct a device path for three example devicesfrom the system in Figure C-1. The following is a list of the examples used: • Legacy floppy • IDE Disk • Secondary root PCI bus with...
Page 357 - Legacy Floppy Device Path; IDE Disk
Device Path Examples Version 1.02 12/12/00 339 Table C-1. Legacy Floppy Device Path ByteOffset ByteLength Data Description 0 1 0x02 Generic Device Path Header – Type ACPI Device Path 1 1 0x01 Sub type – ACPI Device Path 2 2 0x0C Length 4 4 0x41D0, 0x0A03 _HID PNP0A03 – 0x41D0 represents a compressed...
Page 358 - IDE Disk Device Path
Extensible Firmware Interface Specification 340 12/12/00 Version 1.02 The EFI Device Path for the PCI IDE controller would contain entries for the following things: • Root PCI Bridge. ACPI Device Path _HID PNP0A03, _UID 0. ACPI name space \_SB\PCI0 • PCI IDE controller. PCI Device Path with device a...
Page 359 - Secondary Root PCI Bus with PCI to PCI Bridge; Secondary Root PCI Bus with PCI to PCI Bridge Device Path
Device Path Examples Version 1.02 12/12/00 341 C.4 Secondary Root PCI Bus with PCI to PCI Bridge The secondary PCI host bridge materializes a second set of PCI buses into the system. The PCIbuses on the secondary PCI host bridge are totally independent of the PCI buses on the root PCIhost bridge. Th...
Page 360 - ACPI Terms
Extensible Firmware Interface Specification 342 12/12/00 Version 1.02 C.5 ACPI Terms Names in the ACPI name space that start with an underscore (“_”) are reserved by the ACPIspecification and have architectural meaning. All ACPI names in the name space are fourcharacters in length. The following fou...
Page 361 - EFI Device Path as a Name Space; from a handle. Not all the nodes in a Device Path will have a; Figure C-3. EFI Device Path Displayed As a Name Space
Device Path Examples Version 1.02 12/12/00 343 C.6 EFI Device Path as a Name Space Figure C-3 shows the EFI Device Path for the example system represented as a name space. TheDevice Path can be represented as a name space, but EFI does support manipulating the DevicePath as a name space. You can onl...
Page 363 - Status Codes; EFI interfaces return an; EFI_STATUS Codes Ranges
Version 1.02 12/12/00 345 D Status Codes EFI interfaces return an EFI_STATUS code. Tables D-2, D-3, and D-4 list these codes for success, errors, and warnings, respectively. Error codes also have their highest bit set, so all errorcodes have negative values. The range of status codes that have the h...
Page 365 - Alphabetic Function Lists; Functions Listed in Alphabetic Order; Function Name
Version 1.02 12/12/00 347 E Alphabetic Function Lists This appendix contains two tables that list all EFI functions alphabetically. Table E-1 lists thefunctions in pure alphabetic order. Functions that have the same name can be distinguished by theassociated service or protocol (column 2). For examp...
Page 372 - Functions Listed Alphabetically Within Service or Protocol; Service or Protocol
Extensible Firmware Interface Specification 354 12/12/00 Version 1.02 Table E-2. Functions Listed Alphabetically Within Service or Protocol Service or Protocol Function Function Description Block I/O Protocol FlushBlocks Flushes any cached blocks. ReadBlocks Reads the requested number of blocks from...
Page 377 - Glossary; Advanced Configuration and Power Interface Specification
Version 1.02 12/12/00 359 F Glossary _ADR A reserved name in ACPI name space. It refers to an address on a bus that has standard enumeration. An example would be PCI, where the enumeration method is described inthe PCI Local Bus specification. _CRS A reserved name in ACPI name space. It refers to th...
Page 378 - BIOS Boot Specification,
Extensible Firmware Interface Specification 360 12/12/00 Version 1.02 BIOS Boot Specification Device Path A Device Path that is used to point to boot legacy operating systems; it is based on the BIOS Boot Specification, Version 1.01. BIOS Parameter Block (BPB) The first block (sector) of a partition...
Page 381 - See
Glossary Version 1.02 12/12/00 363 DMTF See Desktop Management Task Force . Dynamic Host Configuration Protocol (DHCP) A protocol that is used to get information from a configuration server. DHCP is definedby the Desktop Management Task Force , not EFI. EFI Application Modular code that may be loade...
Page 383 - Intel Architecture Software
Glossary Version 1.02 12/12/00 365 GUID Partition Table Header The header in a GUID Partition Table . Among other things, it contains the number of partition entries in the table and the first and last blocks that can be used for the entries. GUID Partition Entry A data structure that characterizes ...
Page 384 - IA-64 Architecture Software Developer’s Manual
Extensible Firmware Interface Specification 366 12/12/00 Version 1.02 Intel Itanium Architecture A new Intel architecture that has 64-bit instruction capabilities, new performance-enhancing features, and support for the IA-32 instruction set. This architecture isdescribed in the IA-64 Architecture S...
Page 386 - HandleProtocol
Extensible Firmware Interface Specification 368 12/12/00 Version 1.02 NBP See Network Boot Program . Network Boot Program A remote boot image downloaded by a PXE client using the Trivial File Transfer Protocol or the Multicast Trivial File Transfer Protocol . Page Memory A set of contiguous pages. P...
Page 389 - and the associated
Glossary Version 1.02 12/12/00 371 System Partition A section of a block device that is treated as a logical whole. For a hard disk with alegacy partitioning scheme, it is a contiguous grouping of sectors whose starting sectorand size are defined by the Master Boot Record . For an EFI Hard Disk , it...
Page 390 - Wired for Management Baseline Specification
Extensible Firmware Interface Specification 372 12/12/00 Version 1.02 Trivial File Transport Protocol (TFTP) A protocol used to download a Network Boot Program from a TFTP server. Unicode An industry standard internationalized character set used for human readable messagedisplay. Unicode Collation P...
Page 391 - Definitions
Version 1.02 12/12/00 373 G 32/64-Bit UNDI Specification G.1 Introduction This appendix defines the 32/64-bit H/W and S/W Universal Network Driver Interfaces (UNDIs).These interfaces provide one method for writing a network driver; other implementations arepossible. NOTE This is the Beta-1 version o...
Page 392 - Specifications; Referenced Specification
Extensible Firmware Interface Specification 374 12/12/00 Version 1.02 Table G-1. Definitions (continued) Term Definition PXE Preboot Execution Environment The complete PXE specification covers three areas; the client, the network and the server. Client • Makes network devices into bootable devices. ...
Page 394 - OS Network Stacks; Figure G-1. Network Stacks with Three Classes of Drivers
Extensible Firmware Interface Specification 376 12/12/00 Version 1.02 Table G-2. Referenced Specification (continued) Acronym Protocol/Specification TCP Transmission Control Protocol TCPv4: http://www.ietf.org/rfc/rfc0793.txt TCPv6: ftp://ftp.ipv6.org/pub/rfc/rfc2147.txt Required reading for those i...
Page 395 - Driver Types: Pros and Cons; Driver; Pro
32/64-bit UNDI Specification Version 1.02 12/12/00 377 Table G-3. Driver Types: Pros and Cons Driver Pro Con Custom • Can be very fast and efficient. NIC vendor tunes driver to OS& device. • OS vendor does not have to write NIC driver. • New driver for each OS/architecture must be maintained by ...
Page 396 - A new architectural hardware interface has been added.; Major Minor
Extensible Firmware Interface Specification 378 12/12/00 Version 1.02 G.2 Overview There are three major design changes between this specification and the 16-bit UNDI in version 2.1of the PXE Specification: • A new architectural hardware interface has been added. • All UNDI commands use the same com...
Page 397 - !PXE Structure Field Definitions; Identifier
32/64-bit UNDI Specification Version 1.02 12/12/00 379 The !PXE structure for S/W UNDI can be loaded into system memory from one of three places;ROM on a NIC, system non-volatile storage, or external storage. Since there are no direct memoryor I/O ports available in the S/W UNDI !PXE structure, an i...
Page 401 - Issuing UNDI Commands; CDB
32/64-bit UNDI Specification Version 1.02 12/12/00 383 G.2.1.1 Issuing UNDI Commands How commands are written and status is checked varies a little depending on the type of UNDI(H/W or S/W) implementation being used. The command flowchart below is a high level diagramon how commands are written to b...
Page 402 - UNDI Command Format; Command Descriptor Block; Descriptions of the CDB fields are given in the table below.; UNDI CDB Field Definitions; Operation Code; Operation Flags
Extensible Firmware Interface Specification 384 12/12/00 Version 1.02 G.2.2 UNDI Command Format The format of the CDB is the same for all UNDI commands. Some of the commands do not use oralways require the use of all of the fields in the CDB. When fields are not used they must beinitialized to zero ...
Page 404 - Interface Number; Process Control; UNDI C Definitions; Macros; These macros are used for storage and communication portability.
Extensible Firmware Interface Specification 386 12/12/00 Version 1.02 Table G-5. UNDI CDB Field Definitions (continued) Identifier Description IFnum Interface Number This field is used to identify which network adapter (S/W UNDI) or network connector(H/W UNDI) this command is being sent to. If an in...
Page 408 - MSB
Extensible Firmware Interface Specification 390 12/12/00 Version 1.02 G.3.2 Miscellaneous Macros G.3.2.1 Miscellaneous #define PXE_CPBSIZE_NOT_USED 0 // zero #define PXE_DBSIZE_NOT_USED 0 // zero #define PXE_CPBADDR_NOT_USED (PXE_UINT64)0 // zero #define PXE_DBADDR_NOT_USED (PXE_UINT64)0 // zero G.3...
Page 410 - // Changed UNDI operational state from Started to Initialized.
Extensible Firmware Interface Specification 392 12/12/00 Version 1.02 G.3.4 Simple Types The PXE simple types are defined using one of the portability types from the previous section. G.3.4.1 PXE_BOOL Boolean (true/false) data type. For PXE zero is always false and non-zero is always true. typedef P...
Page 411 - // Change the UNDI operational state from Initialized to Started.
32/64-bit UNDI Specification Version 1.02 12/12/00 393 // Change the UNDI operational state from Initialized to Started. #define PXE_OPCODE_SHUTDOWN 0x0007 // Read & change state of external interrupt enables. #define PXE_OPCODE_INTERRUPT_ENABLES 0x0008 // Read & change state of packet recei...
Page 427 - All PXE structures must be byte packed.
32/64-bit UNDI Specification Version 1.02 12/12/00 409 G.3.5 Compound Types All PXE structures must be byte packed. G.3.5.1 PXE_HW_UNDI This section defines the C structures and #defines for the !PXE H/W UNDI interface. #pragma pack(1) typedef struct s_pxe_hw_undi { PXE_UINT32 Signature; // PXE_ROMI...
Page 429 - // Use these to clear pending external interrupts
32/64-bit UNDI Specification Version 1.02 12/12/00 411 // Use these to enable/disable receive filters. #define PXE_HWCMD_PROMISCUOUS_MULTICAST_RX_ENABLE 0x00001000 #define PXE_HWCMD_PROMISCUOUS_RX_ENABLE 0x00000800 #define PXE_HWCMD_BROADCAST_RX_ENABLE 0x00000400 #define PXE_HWCMD_MULTICAST_RX_ENABL...
Page 432 - PXE UNDI command descriptor block.
Extensible Firmware Interface Specification 414 12/12/00 Version 1.02 G.3.5.4 PXE_CDB PXE UNDI command descriptor block. #pragma pack(1) typedef struct s_pxe_cdb { PXE_OPCODE OpCode; PXE_OPFLAGS OpFlags; PXE_UINT16 CPBsize; PXE_UINT16 DBsize; PXE_UINT64 CPBaddr; PXE_UINT64 DBaddr; PXE_STATCODE StatC...
Page 434 - UNDI Commands; ) after command execution completes. Applications; bit is not set) or when a command returns an error status code.
Extensible Firmware Interface Specification 416 12/12/00 Version 1.02 G.4 UNDI Commands All 32/64-bit UNDI commands use the same basic command format, the CDB (CommandDescriptor Block). CDB fields that are not used by a particular command must be initialized tozero by the application/driver that is ...
Page 435 - Command Linking & Queuing; Linked CDBs; and a StatFlag of
32/64-bit UNDI Specification Version 1.02 12/12/00 417 G.4.1 Command Linking & Queuing When linking commands, the CDBs must be stored consecutively in system memory without anygaps in between. Do not set the Link bit in the last CDB in the list. The Link bit must be set in allother CDBs in the l...
Page 436 - Queued CDBs; When a command is queued a StatFlag of; State; Info and Initialize Commands.
Extensible Firmware Interface Specification 418 12/12/00 Version 1.02 Queued CDBs 0x00 0x1F 0x40 0x5F 0x20 0x3F CDB Set Queue bit. Set Link bit. CDB Do not setQueue bit. Set Link bit. CDB Do not setQueue bit.Do not set Link bit. Figure G-8. Queued CDBs When a command is queued a StatFlag of PXE_STAT...
Page 438 - Issuing the Command; CDB Field
Extensible Firmware Interface Specification 420 12/12/00 Version 1.02 G.4.3 Start This command is used to change the UNDI operational state from stopped to started. No otheroperational checks are made by this command. If this is a S/W UNDI, the Delay() and Virt2Phys()functions will not be called by ...
Page 439 - Preparing the CPB
32/64-bit UNDI Specification Version 1.02 12/12/00 421 Preparing the CPB The CPB for the S/W UNDI Start command (shown below) must be filled in and the size andaddress of the CPB must be given in the CDB. #pragma pack(1) typedef struct s_pxe_cpb_start { // PXE_VOID Delay(PXE_UINT64 microseconds); //...
Page 440 - Waiting for the Command to Execute; StatFlags; Checking Command Execution Results; StatCode
Extensible Firmware Interface Specification 422 12/12/00 Version 1.02 // This field can be set to zero if virtual and physical// addresses are equal. PXE_UINT64 Virt2Phys; PXE_UINT64 Mem_IO; } PXE_CPB_START; #pragma pack() #define PXE_DELAY_MILLISECOND 1000 #define PXE_DELAY_SECOND 1000000 #define P...
Page 443 - DB; // Minimum length of locked memory buffer that must be given to
32/64-bit UNDI Specification Version 1.02 12/12/00 425 DB #pragma pack(1) typedef struct s_pxe_db_get_init_info { // Minimum length of locked memory buffer that must be given to // the Initialize command. Giving UNDI more memory will// generally give better performance. // If MemoryRequired is zero,...
Page 444 - // Maximum number of multicast MAC addresses in the multicast
Extensible Firmware Interface Specification 426 12/12/00 Version 1.02 // Number of bytes in the NIC hardware (MAC) address. PXE_UINT16 HWaddrLen; // Maximum number of multicast MAC addresses in the multicast // MAC address filter list. PXE_UINT16 MCastFilterCnt; // Default number and size of transmi...
Page 445 - field. Until these bits change to
32/64-bit UNDI Specification Version 1.02 12/12/00 427 #define PXE_MAX_TXRX_UNIT_ETHER 1500 #define PXE_HWADDR_LEN_ETHER 0x0006 #define PXE_DUPLEX_ENABLE_FULL_SUPPORTED 1 #define PXE_DUPLEX_FORCE_FULL_SUPPORTED 2 #define PXE_LOOPBACK_INTERNAL_SUPPORTED 1 #define PXE_LOOPBACK_EXTERNAL_SUPPORTED 2 G.4...
Page 446 - field; // This is a copy of the PCI configuration space for this
Extensible Firmware Interface Specification 428 12/12/00 Version 1.02 G.4.6.3 Checking Command Execution Results After command execution completes, either successfully or not, the CDB.StatCode field contains the result of the command execution. StatCode Reason SUCCESS Command completed successfully....
Page 447 - // This is a copy of the PCC configuration space for this
32/64-bit UNDI Specification Version 1.02 12/12/00 429 typedef struct s_pxe_pcc_config_info { // This is the flag field for the PXE_DB_GET_CONFIG_INFO union. // For PCC bus devices, this field is set to PXE_BUSTYPE_PCC. PXE_UINT32 BusType; // This identifies the PCC network device that this UNDI// i...
Page 449 - If the; field returned in the; MemoryRequired; field is non-zero, the Initialize command does need a memory buffer.; // MemoryLength must be greater than or equal to MemoryRequired
32/64-bit UNDI Specification Version 1.02 12/12/00 431 Preparing the CPB If the MemoryRequired field returned in the PXE_DB_GET_INIT_INFO structure is zero, the Initialize command does not need to be given a memory buffer or even a CPB structure. If the MemoryRequired field is non-zero, the Initiali...
Page 455 - To read the current external interrupt enables settings set
32/64-bit UNDI Specification Version 1.02 12/12/00 437 G.4.10 Interrupt Enables The Interrupt Enables command can be used to read and/or change the current external interruptenable settings. Disabling an external interrupt enable prevents an external (hardware) interruptfrom being signaled by the ne...
Page 457 - To read the current receive filter settings set the
32/64-bit UNDI Specification Version 1.02 12/12/00 439 G.4.11 Receive Filters This command is used to read and change receive filters and, if supported, read and change themulticast MAC address filter list. G.4.11.1 Issuing the Command To issue a Receive Filters command, create a CDB and fill it in ...
Page 459 - The receive filter settings in CDB.StatFlags are:
32/64-bit UNDI Specification Version 1.02 12/12/00 441 G.4.11.3 Checking Command Execution Results After command execution completes, either successfully or not, the CDB.StatCode field contains the result of the command execution. StatCode Reason SUCCESS Command completed successfully. Check StatFla...
Page 460 - To change the current station MAC address the; // If supplied and supported, the current station MAC address
Extensible Firmware Interface Specification 442 12/12/00 Version 1.02 G.4.12 Station Address This command is used to get current station and broadcast MAC addresses and, if supported, tochange the current station MAC address. G.4.12.1 Issuing the Command To issue a Station Address command, create a ...
Page 461 - Before Using the DB
32/64-bit UNDI Specification Version 1.02 12/12/00 443 G.4.12.2 Waiting for the Command to Execute Monitor the upper two bits (14 & 15) in the CDB.StatFlags field. Until these bits change to report PXE_STATFLAGS_COMMAND_COMPLETE or PXE_STATFLAGS_COMMAND_FAILED , the command has not been executed...
Page 462 - To read the current statistics counters set the OpFlags field to:
Extensible Firmware Interface Specification 444 12/12/00 Version 1.02 G.4.13 Statistics This command is used to read and clear the NIC traffic statistics. Before using this command checkto see if statistics is supported in the !PXE.Implementation flags. G.4.13.1 Issuing the Command To issue a Statis...
Page 463 - // Bit field identifying what statistic data is collected by the
32/64-bit UNDI Specification Version 1.02 12/12/00 445 G.4.13.2 Waiting for the Command to Execute Monitor the upper two bits (14 & 15) in the CDB.StatFlags field. Until these bits change to report PXE_STATFLAGS_COMMAND_COMPLETE or PXE_STATFLAGS_COMMAND_FAILED , the command has not been executed...
Page 464 - // Number of valid broadcast frames received and not dropped.
Extensible Firmware Interface Specification 446 12/12/00 Version 1.02 PXE_UINT64 Data[64]; } PXE_DB_STATISTICS; // Total number of frames received. Includes frames with errors// and dropped frames. #define PXE_STATISTICS_RX_TOTAL_FRAMES 0x00 // Number of valid frames received and copied into receive...
Page 466 - // Multicast IP address to be converted to multicast MAC address.
Extensible Firmware Interface Specification 448 12/12/00 Version 1.02 G.4.14 MCast IP To MAC Translate a multicast IPv4 or IPv6 address to a multicast MAC address. G.4.14.1 Issuing the Command To issue a MCast IP To MAC command, create a CDB and fill it in as shows in the table below: CDB Field How ...
Page 469 - Sparse NvData CPB
32/64-bit UNDI Specification Version 1.02 12/12/00 451 Sparse NvData CPB typedef struct s_pxe_cpb_nvdata_sparse { // NvData item list. Only items in this list will be updated. struct { // Non-volatile storage address to be changed. PXE_UINT32 Addr; // Data item to write into above storage address. u...
Page 470 - Bulk NvData CPB; // When using bulk update, the size of the CPB structure must be
Extensible Firmware Interface Specification 452 12/12/00 Version 1.02 Bulk NvData CPB // When using bulk update, the size of the CPB structure must be // the same size as the non-volatile NIC storage. typedef union u_pxe_cpb_nvdata_bulk { // Array of byte-wide data items. PXE_UINT8 Byte[n]; // Array...
Page 472 - Status; Setting OpFlags
Extensible Firmware Interface Specification 454 12/12/00 Version 1.02 G.4.16 Get Status This command returns the current interrupt status and/or the transmitted buffer addresses. If thecurrent interrupt status is returned, pending interrupts will be acknowledged by this command.Transmitted buffer ad...
Page 473 - If the command completes successfully and the
32/64-bit UNDI Specification Version 1.02 12/12/00 455 G.4.16.3 Checking Command Execution Results After command execution completes, either successfully or not, the CDB.StatCode field contains the result of the command execution. StatCode Reason SUCCESS Command completed successfully. StatFlags and...
Page 474 - Using the DB; // Addresses of transmitted buffers that need to be recycled.; Header
Extensible Firmware Interface Specification 456 12/12/00 Version 1.02 Using the DB When reading the transmitted buffer addresses there should be room for at least one 64-bit addressin the DB. Once a complete transmitted buffer address is written into the DB, the address isremoved from the transmitte...
Page 475 - If multiple frames per command are supported (see
32/64-bit UNDI Specification Version 1.02 12/12/00 457 G.4.17.1 Issuing the Command To issue a Fill Header command, create a CDB and fill it in as shows in the table below: CDB Field How to initialize the CDB structure for a Fill Header command OpCode PXE_OPCODE_FILL_HEADER OpFlags Set as needed. CP...
Page 476 - Fragmented Frame
Extensible Firmware Interface Specification 458 12/12/00 Version 1.02 // Length of packet data in bytes (not including the media// header). PXE_UINT32 PacketLen; // Protocol type. This will be copied into the media header// without doing byte swapping. Protocol type numbers can be// obtained from th...
Page 478 - fragments into a local buffer before transmitting.
Extensible Firmware Interface Specification 460 12/12/00 Version 1.02 G.4.17.3 Checking Command Execution Results After command execution completes, either successfully or not, the CDB.StatCode field contains the result of the command execution. StatCode Reason SUCCESS Command completed successfully...
Page 479 - Check the
32/64-bit UNDI Specification Version 1.02 12/12/00 461 OpFlags Check the !PXE.Implementation flags to see if the network device support fragmented packets. Select one of the OpFlags below so the UNDI knows what type of CPB is being used. • PXE_OPFLAGS_TRANSMIT_WHOLE • PXE_OPFLAGS_TRANSMIT_FRAGMENTED...
Page 484 - UNDI as an EFI Runtime Driver; struct
Extensible Firmware Interface Specification 466 12/12/00 Version 1.02 // Protocol type from media header. PXE_PROTOCOL Protocol; // Length of media header in received frame. PXE_UINT16 MediaHeaderLen; // Type of receive frame. PXE_FRAME_TYPE Type; // Reserved, must be zero. PXE_UINT8 reserved[7]; } ...
Page 485 - // the length of this array is given in the NumberOfInterfaces field
32/64-bit UNDI Specification Version 1.02 12/12/00 467 } NII_entry[n]; // the length of this array is given in the NumberOfInterfaces field } UNDI_CONFIG_TABLE; Since there can only be one configuration table associated with any GUID and there can be morethan one UNDI loaded, every instance of UNDI ...
Page 487 - See also
Version 1.02 12/12/00 469 H Index _HID, 123 _UID, 123 A ACPI, 8 ACPI name space, 337, 342 ACPI Source Language, 117 Advanced Configuration and Power Interface specification, 8. See also related information Alphabetic Function Lists, 347 ANSI 3.64 terminals, and SIMPLE_TEXT_OUTPUT, 334 Application, E...