Intel Extensible Firmware Interface Specification Download Page 98

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

VariableNameSize

The size of the 

VariableName

 buffer.

VariableName

On input, supplies the last 

VariableName

 that was returned

by 

GetNextVariableName()

.  On output, returns the Null-

terminated Unicode string of the current variable.

VendorGuid

On input, supplies the last 

VendorGuid

 that was returned by

GetNextVariableName()

.  On output, returns the

VendorGuid

 of the current variable.  Type 

EFI_GUID

 is

defined in Section 3.3.1.

Description

GetNextVariableName()

 is called multiple times to retrieve the 

VariableName

 and

VendorGuid

 of all variables currently available in the system.  On each call to

GetNextVariableName()

 the previous results are passed into the interface, and on output the

interface returns the next variable name data.  When the entire variable list has been returned, the
error 

EFI_NOT_FOUND

 is returned.

Note that if 

EFI_BUFFER_TOO_SMALL

 is returned, the 

VariableName

 buffer was too small

for the next variable.  When such an error occurs, the 

VariableNameSize

 is updated to reflect

the size of buffer needed.  In all cases when calling 

GetNextVariableName()

 the

VariableNameSize

 must not exceed the actual buffer size that was allocated for

VariableName

.

To start the search, a Null-terminated string is passed in 

VariableName

; that is,

VariableName

 is a pointer to a Null Unicode character.  This is always done on the initial call to

GetNextVariableName()

.  When 

VariableName

 is a pointer to a Null Unicode character,

VendorGuid

 is ignored.  

GetNextVariableName()

 

cannot be used as a filter to return

variable names with a specific GUID.  Instead, the entire list of variables must be retrieved, and the
caller may act as a filter if it chooses.  Calls to 

SetVariable()

 between calls to

GetNextVariableName()

 may produce unpredictable results.

Summary of Contents for Extensible Firmware Interface

Page 1: ...Extensible Firmware Interface Specification Version 1 02 December 12 2000...

Page 2: ...fication Intel does not warrant or represent that such implementation s will not infringe such rights Designers must not rely on the absence or characteristics of any features or instructions marked r...

Page 3: ...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 4: ...Extensible Firmware Interface Specification iv 12 12 00 Version 1 02...

Page 5: ...upport 11 1 7 2 Supporting the EFI Specification on a Legacy Platform 11 1 8 Conventions Used in This Document 12 1 8 1 Data Structure Descriptions 12 1 8 2 Typographic Conventions 12 1 9 Guidelines f...

Page 6: ...rvices 42 3 2 1 AllocatePages 45 3 2 2 FreePages 48 3 2 3 GetMemoryMap 49 3 2 4 AllocatePool 53 3 2 5 FreePool 54 3 3 Protocol Handler Services 55 3 3 1 InstallProtocolInterface 57 3 3 2 UninstallProt...

Page 7: ...3 8 1 ResetSystem 96 3 8 2 SetWatchdogTimer 98 3 8 3 Stall 100 3 8 4 GetNextMonotonicCount 101 3 8 5 GetNextHighMonotonicCount 102 3 8 6 InstallConfigurationTable 103 4 EFI Image 4 1 LOADED_IMAGE Pro...

Page 8: ...e Path 125 5 3 4 5 USB Device Path 125 5 3 4 6 USB Class Device Path 126 5 3 4 7 I2O Device Path 126 5 3 4 8 MAC Address Device Path 126 5 3 4 9 IPv4 Device Path 127 5 3 4 10 IPv6 Device Path 127 5 3...

Page 9: ...er 150 7 Console I O Protocol 7 1 Console I O Overview 151 7 2 ConsoleIn Definition 152 7 3 SIMPLE_INPUT Protocol 154 7 3 1 SIMPLE_INPUT Reset 155 7 3 2 SIMPLE_INPUT ReadKeyStroke 156 7 4 ConsoleOut o...

Page 10: ...tocol 10 1 Simple File System Protocol 187 10 1 1 EFI_FILE_IO_INTERFACE OpenVolume 189 10 2 EFI_FILE Protocol 190 10 2 1 EFI_FILE Open 192 10 2 2 EFI_FILE Close 195 10 2 3 EFI_FILE Delete 196 10 2 4 E...

Page 11: ...1 5 UNICODE_COLLATION FatToStr 232 13 1 6 UNICODE_COLLATION StrToFat 233 14 PXE Base Code Protocol35 14 1 EFI_PXE_BASE_CODE Protocol 235 14 1 1 EFI_PXE_BASE_CODE Start 247 14 1 2 EFI_PXE_BASE_CODE St...

Page 12: ...astIPtoMAC 293 15 1 10 EFI_SIMPLE_NETWORK NvData 294 15 1 11 EFI_SIMPLE_NETWORK GetStatus 296 15 1 12 EFI_SIMPLE_NETWORK Transmit 298 15 1 13 EFI_SIMPLE_NETWORK Receive 300 15 2 NETWORK_INTERFACE_IDEN...

Page 13: ...re Boot Media 326 18 PCI Expansion ROM 18 1 Standard PCI Expansion ROM Header 327 18 2 EFI PCI Expansion ROM Header 328 18 3 Multiple Image Format Support 329 18 4 EFI PCI Expansion ROM Driver 329 A G...

Page 14: ...lity Macros 386 G 3 2 Miscellaneous Macros 390 G 3 3 Portability Types 390 G 3 4 Simple Types 392 G 3 5 Compound Types 409 G 4 UNDI Commands 416 G 4 1 Command Linking Queuing 417 G 4 2 Get State 418 G...

Page 15: ...System 337 C 2 Partial ACPI Name Space for Example System 338 C 3 EFI Device Path Displayed As a Name Space 343 G 1 Network Stacks with Three Classes of Drivers 376 G 2 PXE Structures for H W and S W...

Page 16: ...s 95 5 1 Generic Device Path Node Structure 119 5 3 Device Path End Structure 120 5 5 PCI Device Path 121 5 6 PCCARD Device Path 121 5 7 Memory Mapped Device Path 122 5 8 Vendor Defined Device Path 12...

Page 17: ...n 265 14 5 Source UDP Port Filter Operation 265 16 1 GUID Partition Table Header 311 16 2 GUID Partition Entry 312 16 3 Defined GUID Partition Entry Partition Type GUIDs 313 16 4 Defined GUID Partitio...

Page 18: ..._STATUS Error Codes High bit set 345 D 4 EFI_STATUS Warning Codes High bit clear 346 E 1 Functions Listed in Alphabetic Order 347 E 2 Functions Listed Alphabetically Within Service or Protocol 354 G 1...

Page 19: ...the OS by the platform and firmware Using this formal definition a shrink wrap OS intended to run on Intel architecture based platforms will be able to boot on a variety of system designs without furt...

Page 20: ...user while executing in the EFI boot services environment 8 Block I O Protocol Defines the Block I O protocol which is used to abstract mass storage devices to allow code running in the EFI boot servi...

Page 21: ...phabetically F Glossary Briefly describes terms defined or referenced by this specification G 32 64 Bit UNDI Specification This appendix defines the 32 64 bit H W and S W Universal Network Driver Inte...

Page 22: ...the space safely while adding to platform capability Defining a boot environment that delivers these attributes could be accomplished in many ways Indeed several alternatives perhaps viable from an ac...

Page 23: ...m in a modular way Such drivers may potentially be implemented using high level coding languages because of the calling conventions and environment defined in the specification This in turn may help t...

Page 24: ...anual http developer intel com design mmx manuals IA 64 Architecture Software Developer s Manual Volume 1 Application Architecture Rev 1 0 Order number 245317 Intel Corporation January 2000 Also avail...

Page 25: ...cs html RFC 791 Internet Protocol DARPA Internet Program Protocol IPv4 Specification September 1981 http www faqs org rfcs rfc791 html RFC 1700 J Reynolds J Postel Assigned Numbers ISI October 1994 RF...

Page 26: ...e current state of the art in the platform to OS interface ACPI fully defines the methodology that allows the OS to discover and configure all platform resources ACPI allows the description of non Plu...

Page 27: ...m design ia 64 1 6 EFI Design Overview The design of EFI is based on the following fundamental elements Reuse of existing table based interfaces In order to preserve investment in existing infrastruct...

Page 28: ...eve the OS loader image from the EFI System Partition The specification provides for a variety of mass storage device types including disk CD ROM and DVD as well as remote boot via a network Through t...

Page 29: ...n The EFI specification does not restrict a platform designer who chooses to support both the EFI specification and a more traditional PC AT boot infrastructure If such a legacy infrastructure is to b...

Page 30: ...ed to indicate actual code or a programming construct register This typeface is used to indicate a processor register 1 9 Guidelines for Use of the Term Extensible Firmware Interface The following rec...

Page 31: ...ction of any EFI OS loader from any partition on any boot medium that is supported by EFI boot services An EFI OS loader can support multiple options that can appear on the user interface It is also p...

Page 32: ...ection provides an overview of the services defined by EFI These include boot services and runtime services 2 2 1 EFI Services The purpose of the EFI interfaces is to define a common boot environment...

Page 33: ...I runtime services must be reserved and not used by the OS EFI runtime services memory is always available to an EFI function and will never be directly manipulated by the OS or its components EFI is...

Page 34: ...parameters with correct alignment If an unaligned pointer is passed to a function the results are unpredictable and the system may halt 3 It is the caller s responsibility to not pass in a NULL param...

Page 35: ...block address Type UINT64 EFI_TPL Task priority level Type UINTN EFI_MAC_ADDRESS 32 byte buffer containing a network Media Access Control address EFI_IPv4_ADDRESS 4 byte buffer An IPv4 internet proto...

Page 36: ...defined 128 KB or more of available stack space For an operating system to use any EFI runtime services it must Preserve all memory in the memory map marked as runtime code and runtime data Call the r...

Page 37: ...ssed to HandleProtocol If the device supports the requested protocol a pointer to the defined Protocol Interface structure is returned The Protocol Interface structure links the caller to the protocol...

Page 38: ...l Name Description BLOCK_IO Protocol interfaces for devices that support block I O style accesses DEVICE_IO Protocol interfaces for performing device I O DEVICE_PATH Provides the location of the devic...

Page 39: ...e present and the implementation must deliver the full semantics defined in the specification for all combinations of calls and parameters A system must provide the LOAD_FILE protocol or the SIMPLE_FI...

Page 40: ...ctions defined as part of the option and must deliver the full semantics defined for the services for all combinations of calls and parameters Table 2 6 Optional EFI Implementation Elements Element De...

Page 41: ...antic information contained in these sections need not be considered part of the formal definition of either required or optional elements of the specification The content of Appendix A is a set of de...

Page 42: ...Extensible Firmware Interface Specification 24 12 01 00 Version 1 02...

Page 43: ...on some platforms Protocols are created dynamically This chapter discusses the global functions and runtime functions subsequent chapters discuss the handle based EFI applications including OS loader...

Page 44: ...Timer and Task Priority Services The functions that make up the Event Timer and Task Priority Services are used during pre boot to create close signal and wait for events to set timers and to raise a...

Page 45: ...TION level Execution occurs at other levels as a direct result of the triggering of an event notification function this is typically caused by the signaling of an event During timer interrupts firmwar...

Page 46: ...is priority level Executing code can temporarily raise its priority level by calling the RaiseTPL function Doing this masks event notifications from code running at equal or lower priority levels unti...

Page 47: ...and attributes The define statements in Related Definitions can be used to specify an event s mode and attributes NotifyTpl The task priority level of event notifications See Section 3 1 7 NotifyFunc...

Page 48: ...naled after the call to ExitBootServices the event s data structure and notification function need to be allocated from runtime memory For more information see SetVirtualAddressMap Section 3 7 1 EVT_R...

Page 49: ...or each of the basic task priority levels defined in Section 3 1 TPL_APPLICATION TPL_CALLBACK and TPL_NOTIFY The functions in these queues are invoked in FIFO order starting with the highest priority...

Page 50: ...IT and EVT_NOTIFY_SIGNAL flags are exclusive If neither flag is specified the caller does not require any notification concerning the event and the NotifyTpl NotifyFunction and NotifyContext parameter...

Page 51: ...ers 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 closes it Once the event is closed the event...

Page 52: ...arameters Event The event to signal Type EFI_EVENT is defined in Section 3 1 1 Description The supplied Event is signaled and if the event has a signal notification function it is scheduled to be invo...

Page 53: ...signaled event Waiting on an event of type EVT_NOTIFY_SIGNAL is not permitted If any event in Event is of type EVT_NOTIFY_SIGNAL WaitForEvent returns EFI_INVALID_PARAMETER and sets Index to indicate w...

Page 54: ...TER is returned If Event is of type EFI_NOTIFY_WAIT there are three possibilities If Event is in the signaled state it is cleared and EFI_SUCCESS is returned If Event is not in the signaled state and...

Page 55: ...tions TriggerTime The number of 100ns units until the timer expires Related Definitions EFI_TIMER_DELAY typedef enum TimerCancel TimerPeriodic TimerRelative EFI_TIMER_DELAY TimerCancel The event s tim...

Page 56: ...cancels any previous time trigger setting for the event and sets the new trigger time for the event This function can only be used on events of type EVT_TIMER Status Codes Returned EFI_SUCCESS The ev...

Page 57: ...TPL RaiseTPL IN EFI_TPL NewTpl Parameters NewTpl The new task priority level It must be greater than or equal to the current task priority level See Related Definitions Related Definitions EFI_TPL typ...

Page 58: ...ly use TPL_CALLBACK or TPL_NOTIFY for their notification functions Applications and drivers may also use TPL_NOTIFY to protect data structures in critical sections of code The caller must restore the...

Page 59: ...PL are matched with calls to RaiseTPL Note If OldTpl is above the current TPL level then the system behavior is indeterminate Additionally only TPL_APPLICATION TPL_CALLBACK TPL_NOTIFY and TPL_HIGH_LEV...

Page 60: ...onsequences 1 During pre boot all components including executing EFI images must cooperate with the firmware by allocating and freeing memory from the system with the functions AllocatePages AllocateP...

Page 61: ...of a loaded Runtime Services Driver EfiRuntimeServicesData The data portions of a loaded Runtime Services Driver and the default data allocation type used by a Runtime Services Driver to allocate poo...

Page 62: ...til ACPI is enabled Once ACPI is enabled the memory in this range is available for general use EfiACPIMemoryNVS This memory is to be preserved by the loader and OS in the working and ACPI S1 S3 states...

Page 63: ...aderCode EfiLoaderData EfiRuntimeServicesCode EfiRuntimeServicesData EfiBootServicesCode EfiBootServicesData EfiACPIReclaimMemory and EfiACPIMemoryNVS Normal allocations that is allocations by any EFI...

Page 64: ...ATE_TYPE EFI_MEMORY_TYPE These type values are discussed in Table 3 5 and Table 3 6 typedef enum EfiReservedMemoryType EfiLoaderCode EfiLoaderData EfiBootServicesCode EfiBootServicesData EfiRuntimeSer...

Page 65: ...of type EfiBootServicesData Runtime drivers should allocate memory and pool of type EfiRuntimeServicesData although such allocation can only be made during boot services time Allocation requests of T...

Page 66: ...ges to be freed Type EFI_PHYSICAL_ADDRESS is defined in Section 3 2 1 Pages The number of contiguous 4KB pages to free Description The FreePages function returns memory allocated by AllocatePages to t...

Page 67: ...d by the firmware if the buffer was large enough or the size of the buffer needed to contain the map if the buffer was too small MemoryMap A pointer to the buffer in which firmware places the current...

Page 68: ...te Attributes of the memory region See the following Memory Attribute Definitions Memory Attribute Definitions These types can be ORed together as needed define EFI_MEMORY_UC 0x0000000000000001 define...

Page 69: ...IRTUAL_ADDRESS typedef UINT64 EFI_VIRTUAL_ADDRESS Memory Descriptor Version Number define EFI_MEMORY_DESCRIPTOR_VERSION 1 Description The GetMemoryMap function returns a copy of the current memory map...

Page 70: ...to hardware innovation The structure of the EFI_MEMORY_DESCRIPTOR may be extended in the future but it will remain backwards compatible with the current definition Thus OS software must use the Descri...

Page 71: ...pointer to the allocated buffer if the call succeeds undefined otherwise Description The AllocatePool function allocates a memory region of Size bytes from memory of type PoolType and returns the addr...

Page 72: ...r Parameters Buffer Pointer to the buffer to free Description The FreePool function returns the memory specified by Buffer to the system On return the memory s type is EfiConventionalMemory The Buffer...

Page 73: ...dle to the device that is closest to the path As depicted in Figure 3 1 the firmware is responsible for maintaining a data base that shows which protocols are attached to each device handle The figure...

Page 74: ...y to add new protocol interfaces as new handles or to layer them on existing interfaces provides great flexibility Layering makes it possible to add a new protocol that builds on a device s basic prot...

Page 75: ...is added to the handle and the handle is returned unmodified The type EFI_HANDLE is defined in Related Definitions If Handle is not a valid handle then EFI_INVALID_PARAMETER is returned Protocol The n...

Page 76: ...cture pair on a device handle Installing a protocol interface allows other components to locate the Handle and the interfaces installed on it A protocol interface is always installed at the head of th...

Page 77: ...e used if a structure is not associated with Protocol Description The UninstallProtocolInterface function removes a protocol interface from the handle on which it was previously installed The Protocol...

Page 78: ...used if a structure is not associated with Protocol NewInterface A pointer to the new interface NULL can be used if a structure is not associated with Protocol Description The ReinstallProtocolInterfa...

Page 79: ...is to be signaled whenever a protocol interface is installed for Protocol by InstallProtocolInterface or ReinstallProtocolInterface Once Event has been signaled the LocateHandle function can be called...

Page 80: ...the protocol to search by This parameter is only valid if SearchType is ByProtocol Type EFI_GUID is defined in Section 3 3 1 SearchKey Specifies the search key This parameter is ignored if SearchType...

Page 81: ...ned Protocol is ignored for this search type ByProtocol All handles that support Protocol are returned SearchKey is ignored for this search type Description The LocateHandle function returns an array...

Page 82: ...d GUID See Wired For Management Baseline for a description of valid GUID values Interface Supplies the address where a pointer to the corresponding Protocol Interface is returned NULL will be returned...

Page 83: ...input a pointer to a pointer to the device path On output the device path pointer is modified to point to the remaining part of the device path that is when the function finds the closest handle it sp...

Page 84: ...target device driver may issue the request with its own device path and locate the interfaces to perform IO on its bus It can also be used with a device path that contains a file path to strip off the...

Page 85: ...in a single memory allocation and marked as EfiRuntimeServicesData Note that the memory only stays resident when booting an EFI compatible operating system Legacy operating systems will reuse the mem...

Page 86: ...is can be done with the LoadImage and StartImage interfaces Drivers may only load applications during the driver s initialization entry point Table 3 9 lists the functions that make up Image Services...

Page 87: ...is not NULL ParentImageHandle The caller s image handle Type EFI_HANDLE is defined in Section 3 3 1 This field is used to initialize the ParentHandle field of the LOADED_IMAGE protocol for the image t...

Page 88: ...File Protocol in Chapter 11 Regardless of the type of load memory to memory or file copy the function relocates the code in the image while loading it Once the image is loaded firmware creates and ret...

Page 89: ...hat the caller may use to further indicate the reason for the image s exit Description The StartImage function transfers control to the entry point of an image that was loaded by LoadImage The image m...

Page 90: ...is passed to that entry point If the image s unload function returns EFI_SUCCESS the image is unloaded otherwise the error returned by the image s unload function is returned to the caller The image...

Page 91: ...t needs This information is available through protocol interfaces However to access the protocol interfaces on ImageHandle requires access to boot services functions Therefore LoadImage passes to the...

Page 92: ...g optionally followed by additional binary data The string is a description that the caller may use to further indicate the reason for the image s exit ExitData is only valid if ExitStatus is somethin...

Page 93: ...ode otherwise the image stays resident in memory The driver must not return an error code if it has installed any protocol handlers or other active callouts into the system that have not or cannot be...

Page 94: ...it has the system s current memory map at the time it calls ExitBootServices This is done by passing in the current memory map s MapKey value as returned by GetMemoryMap Care must be taken to ensure t...

Page 95: ...implies that the EFI implementation on a platform must arrange it so that variables passed in for storage are retained and available for use each time the system boots at least until they are explici...

Page 96: ...rGuid A unique identifier for the vendor Type EFI_GUID is defined in Section 3 3 1 Attributes If not NULL a pointer to the memory location to return the attributes bitmask for the variable See Related...

Page 97: ...tribute set for runtime access will yield the EFI_NOT_FOUND error If the Data buffer is too small to hold the contents of the variable the error EFI_BUFFER_TOO_SMALL is returned and DataSize is set to...

Page 98: ...sults are passed into the interface and on output the interface returns the next variable name data When the entire variable list has been returned the error EFI_NOT_FOUND is returned Note that if EFI...

Page 99: ...GetVariable interface is used Status Codes Returned EFI_SUCCESS The function completed successfully EFI_NOT_FOUND The next variable was not found EFI_BUFFER_TOO_SMALL The VariableNameSize is too small...

Page 100: ...s the variable to be deleted Data The contents for the variable Description Variables are stored by the firmware and may maintain their values across power cycles Each vendor may create and manage its...

Page 101: ...Runtime access to a data variable implies boot service access Attributes that have EFI_VARIABLE_RUNTIME_ACCESS set must also have EFI_VARIABLE_BOOTSERVICE_ACCESS set The caller is responsible for fol...

Page 102: ...ardware time devices thereby relieving the need to access legacy hardware devices directly There is also a stalling function for use in the pre boot environment Table 3 11 lists the time services func...

Page 103: ...rent time Type EFI_TIME is defined in Related Definitions Capabilities An optional pointer to a buffer to receive the real time clock device s capabilities Type EFI_TIME_CAPABILITIES is defined in Rel...

Page 104: ...nn A battery backed real time clock device maintains the date and time TimeZone The time s offset in minutes from GMT If the value is EFI_UNSPECIFIED_TIMEZONE then the time is interpreted as a local t...

Page 105: ...hat the state below the Resolution level of the device is not cleared when the time is set Normal PC AT CMOS RTC devices set this value to FALSE Description The GetTime function returns a time that wa...

Page 106: ...SetTime function sets the real time clock device to the supplied time and records the current time zone and daylight savings time information The SetTime function is not allowed to loop based on the...

Page 107: ...Type EFI_TIME is defined in Section 3 6 1 Description The alarm clock time may be rounded from the set alarm clock time to be within the resolution of the alarm clock device The resolution of the ala...

Page 108: ...ince the alarm signal is latched the system will immediately wake up If the alarm fires while the system is off and there is insufficient power to power on the system the system is powered on when pow...

Page 109: ...cal mode then the operating system must use the services in this section to switch the EFI runtime services from flat physical addressing to virtual addressing Table 3 12 lists the virtual memory serv...

Page 110: ...e the component which called ExitBootServices This call changes the addresses of the runtime components of the EFI firmware to the new virtual addresses supplied in the VirtualMap The supplied Virtua...

Page 111: ...irtual address map has been applied EFI_UNSUPPORTED EFI firmware is not at runtime or the EFI firmware is already in virtual address mapped mode EFI_INVALID_PARAMETER DescriptorSize or DescriptorVersi...

Page 112: ...eration The ConvertPointer function updates the current pointer pointed to by Address to be the proper value for the new address map Only runtime components need to perform this operation The CreateEv...

Page 113: ...neous Services Functions Name Type Description ResetSystem Runtime Resets the entire platform SetWatchDogTimer Boot Resets and sets a watchdog timer used during boot services time Stall Boot Stalls th...

Page 114: ...f a normal operation the status code would be EFI_SUCCESS If the system reset is due to some type of failure the most appropriate EFI Status code would be used DataSize The size in bytes of ResetData...

Page 115: ...tem to its initial state This type of reset is asynchronous to system operation and operates without regard to cycle boundaries EfiResetCold is tantamount to a system power cycle Calling this interfac...

Page 116: ...icode string optionally followed by additional binary data The string is a description that the call may use to further indicate the reason to be logged with a watchdog event Description The SetWatchd...

Page 117: ...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...

Page 118: ...onds Parameters Microseconds The number of microseconds to stall execution Description The Stall function stalls execution on the processor for at least the requested number of microseconds Execution...

Page 119: ...was called The platform s monotonic counter is comprised of two parts the high 32 bits and the low 32 bits The low 32 bit value is volatile and is reset to zero on every system reset It is increased b...

Page 120: ...or whenever the low 32 bit count returned by GetNextMonoticCount overflows The GetNextMonotonicCount function is only available at boot services time If the operating system wishes to extend the platf...

Page 121: ...stem Table The list is stored as an array of GUID Pointer pairs The list must be allocated from pool memory with PoolType set to EfiRuntimeServicesData If Guid is not a valid GUID EFI_INVALID_PARAMETE...

Page 122: ...e is not enough memory to perform an add operation then EFI_OUT_OF_RESOURCES is returned Status Codes Returned EFI_SUCCESS The Guid Table pair was added updated or removed EFI_INVALID_PARAMETER Guid i...

Page 123: ...s EFI image headers applications OS loaders and drivers 4 1 LOADED_IMAGE Protocol This section provides a detailed description of the EFI_LOADED_IMAGE protocol Summary Can be used on any image handle...

Page 124: ...sion Defines the revision of the EFI_LOADED_IMAGE structure All future revisions will be backward compatible to the current revision ParentHandle Parent image s image handle NULL if the image is loade...

Page 125: ...E is defined in Chapter 3 ImageDataType The memory type that the data sections were loaded as Type EFI_MEMORY_TYPE is defined in Chapter 3 Unload Function that unloads the image See Section 4 1 1 Desc...

Page 126: ...EFI_STATUS EFIAPI EFI_UNLOAD_IMAGE IN EFI_HANDLE ImageHandle Parameters ImageHandle The handle to the image to unload Type EFI_HANDLE is defined in Chapter 3 Description The Unload function unloads an...

Page 127: ...ssed back with an EFI error code PE32 Subsystem type for EFI images define IMAGE_SUBSYSTEM_EFI_APPLICATION 10 define IMAGE_SUBSYSTEM_EFI_BOOT_SERVICE_DRIVER 11 define IMAGE_SUBSYSTEM_EFI_RUNTIME_DRIVE...

Page 128: ...is I O and memory mapped device registers must be accessed through the proper DEVICE_IO calls like those that an EFI driver would perform If the OS loader experiences a problem and cannot load its op...

Page 129: ...e s system table The system table contains the standard output and input handles plus pointers to the EFI_BOOT_SERVICES and EFI_RUNTIME_SERVICES tables The service tables contain the entry points in t...

Page 130: ...UINTN NumberOfTableEntries EFI_CONFIGURATION_TABLE ConfigurationTable EFI_SYSTEM_TABLE Standard EFI table header typedef struct _EFI_TABLE_HEADER UINT64 Signature UINT32 Revision UINT32 HeaderSize UI...

Page 131: ...es table and boot services table may increase over time It is very important to always use the HeaderSize field of the EFI_TABLE_HEADER to determine the size of these tables Example interface prototyp...

Page 132: ...uct _EFI_BOOT_SERVICES EFI_TABLE_HEADER Hdr Task Priority Services EFI_RAISE_TPL RaiseTPL EFI_RESTORE_TPL RestoreTPL Memory Services EFI_ALLOCATE_PAGES AllocatePages EFI_FREE_PAGES FreePages EFI_GET_M...

Page 133: ...SERVICES ExitBootServices Miscellaneous Services See note about InstallConfigurationTable under Protocol Handler Services above EFI_GET_NEXT_MONOTONIC_COUNT GetNextMonotonicCount EFI_STALL Stall EFI_S...

Page 134: ...EFI_HANDLE and out1 contains the address of the EFI_SYSTEM_TABLE The gp for the EFI Image will have been loaded from the plabel pointed to by the AddressOfEntryPoint in the image s header EFI_SYSTEM_T...

Page 135: ...Given this EFI defines its own name space called a Device Path A Device Path is designed to make maximum leverage of the ACPI name space One of the key structures in the Device Path defines the linkag...

Page 136: ...3b Protocol Interface Structure EFI_DEVICE_PATH DevicePath Parameters DevicePath A pointer to device path data The device path describes the location of the device the handle is for The size of the De...

Page 137: ...BIOS Boot Specification Device Path This Device Path is used to point to boot legacy operating systems it is based on the BIOS Boot Specification Version 1 01 End of Hardware Device Path Depending on...

Page 138: ...ces An example of this would be a handle that represents ConsoleOut and consists of both a VGA console and serial output console This handle would send the ConsoleOut stream to both VGA and serial con...

Page 139: ...The system configuration changes between reboots The PCI Device Path entry must be preceded by an ACPI Device Path entry that uniquely identifies the PCI root bus The programming of root PCI bridges i...

Page 140: ...Vendor_GUID for a Device Path The Vendor_GUID can then be used to define the contents on the n bytes that follow in the Vendor Device Path node Table 5 6 Vendor Defined Device Path Mnemonic Byte Offs...

Page 141: ...e objects with the same _HID value If no _UID exists in the APCI name space for a _HID the value of zero must be stored in the _UID field of the ACPI Device Path The ACPI Device Path is only used to d...

Page 142: ...Path Table 5 10 SCSI Device Path Mnemonic Byte Offset Byte Length Description Type 0 1 Type 3 Messaging Device Path Sub Type 1 1 Sub Type 2 SCSI Length 2 2 Length of this structure in bytes Length is...

Page 143: ...4 4 Reserved GUID 1 8 8 1394 Global Unique ID GUID 1 1 The usage of the term GUID is per the 1394 specification This is not the same as the EFI_GUID type defined in the EFI Specification 5 3 4 5 USB...

Page 144: ...A value of 0xFF will match any subclass code Device Protocol 10 1 The protocol code assigned by the USB IF A value of 0xFF will match any protocol code 5 3 4 7 I2O Device Path Table 5 15 I2O Device Pa...

Page 145: ...0 StaticIPAddress 18 1 0x00 The Source IP Address was assigned though DHCP 0x01 The Source IP Address is statically bound 5 3 4 10 IPv6 Device Path Table 5 18 IPv6 Device Path Mnemonic Byte Offset Byt...

Page 146: ...nemonic Byte Offset Byte Length Description Type 0 1 Type 3 Messaging Device Path Sub Type 1 1 Sub Type 14 UART Length 2 2 Length of this structure in bytes Length is 19 bytes Reserved 4 4 Reserved Ba...

Page 147: ...additional transport protocols define DEVICE_PATH_MESSAGING_PC_ANSI e0c14753 f9be 11d2 9a0c 0090273fc14d define DEVICE_PATH_MESSAGING_VT_100 DFA66065 B419 11d3 9A2D 0090273FC14D 5 3 5 Media Device Pa...

Page 148: ...n units of Logical Blocks Partition Signature 24 16 Signature unique to this partition MBR Type 40 1 MBR Type Unused values reserved 0x01 PC AT compatible MBR Partition Start and Partition Size come f...

Page 149: ...Path Sub Type 1 1 Sub Type 2 CD ROM El Torito Format Length 2 2 Length of this structure in bytes Length is 24 bytes Boot Entry 4 4 Boot Entry number from the Boot Catalog The Initial Default entry is...

Page 150: ...re of these nodes The complete path to a file can be found by concatenating all the File Path Media Device Path nodes This is typically used to describe the directory path in one node and the filename...

Page 151: ...ined by the BIOS Boot Specification Status Flag 6 2 Status Flags as defined by the BIOS Boot Specification Description String 8 n ASCIIZ string that describes the boot device to a user The length of t...

Page 152: ...in the ACPI name space has a _HID and is described by a _CRS Current Resource Setting then it should be described by an ACPI Device Path structure A _CRS implies that a device is not mapped by any ot...

Page 153: ...4 Hardware vs Messaging Device Path Rules Hardware Device Paths are used to define paths on buses that have a standard enumeration algorithm and that relate directly to the coherency domain of the sy...

Page 154: ...defines which partition is being abstracted The Media Device Path is also used to define the location of a file in a file system This Device Path is used to load files and to represent what file an i...

Page 155: ...ic system resources The DEVICE_IO protocol allows for future innovation of the platform It abstracts device specific code from the system memory map This allows system designers to greatly change the...

Page 156: ...USH Flush EFI_IO_FREE_BUFFER FreeBuffer EFI_DEVICE_IO_INTERFACE Parameters Mem Allows reads and writes to memory mapped I O space See Section 6 2 1 Io Allows reads and writes to I O space See Section...

Page 157: ...h of MyDevicePath EFI_DEVICE_IO_INTERFACE IoFncs EFI_DEVICE_PATH SearchPath SearchPath MyDevicePath Status LocateDevicePath DeviceIoProtocol Protocol GUID SearchPath Device Path SearchKey DevHandle Re...

Page 158: ...um IO_UINT8 0 IO_UINT16 1 IO_UINT32 2 IO_UINT64 3 EFI_IO_WIDTH EFI_DEVICE_IO typedef EFI_STATUS EFIAPI EFI_DEVICE_IO IN struct _EFI_DEVICE_IO_INTERFACE This IN EFI_IO_WIDTH Width IN UINT64 Address IN...

Page 159: ...Bytes moved is Width size Count starting at Address Buffer For read operations the destination buffer to store the results For write operations the source buffer to write data from Description The DEV...

Page 160: ...ction on the device Device 2 1 The device on the bus Bus 3 1 The bus Segment 4 1 The segment number Reserved 5 3 Must be zero Status Codes Returned EFI_SUCCESS The data was read from or written to the...

Page 161: ...l Type EFI_DEVICE_PATH is defined in Chapter 3 Description The DEVICE_IO PciDevicePath function provides an EFI Device Path for a PCI device with the given PCI configuration space address A Device Pat...

Page 162: ...FI_DEVICE_IO_INTERFACE instance Type EFI_DEVICE_IO_INTERFACE is defined in Section 6 2 Operation Indicates if the bus master is going to read or write to system memory Type EFI_IO_OPERATION_TYPE is de...

Page 163: ...or EfiBusMasterWrite is used and the range is unmapped to complete the operation If performing an EfiBusMasterRead operation all the data must be present in system memory before the Map is performed...

Page 164: ...EFI_DEVICE_IO_INTERFACE instance Type EFI_DEVICE_IO_INTERFACE is defined in Section 6 2 Mapping The mapping value returned from Map Description The Unmap function completes the Map operation and rele...

Page 165: ...memory to allocate EfiBootServicesData or EfiRuntimeServicesData Type EFI_MEMORY_TYPE is defined in Chapter 3 Pages The number of pages to allocate HostAddress A pointer to store the base address of t...

Page 166: ...there are not enough consecutive available pages below the requested address an error is returned Allocation requests of Type AllocateAddress will allocate the pages at the address supplied in the da...

Page 167: ...FLUSH IN EFI_DEVICE_IO_INTERFACE This Parameters This A pointer to the EFI_DEVICE_IO_INTERFACE instance Type EFI_DEVICE_IO_INTERFACE is defined in Section 6 2 Description The Flush function flushes an...

Page 168: ...r to the EFI_DEVICE_IO_INTERFACE Type EFI_DEVICE_IO_INTERFACE is defined in Section 6 2 Pages The number of pages to free HostAddress The base address of the range to free Type EFI_ PHYSICAL_ADDRESS i...

Page 169: ...ew The EFI console is built out of the SIMPLE_INPUT and SIMPLE_TEXT_OUTPUT protocols These two protocols implement a basic text based console that allows platform firmware EFI applications and EFI OS...

Page 170: ...space Moves cursor left one column If the cursor is at the left margin no action is taken TAB U 0x0009 Tab LF U 000A Linefeed Moves cursor to the next line CR U 000D Carriage Return Moves cursor to le...

Page 171: ...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 Fu...

Page 172: ...ure typedef struct _SIMPLE_INPUT_INTERFACE EFI_INPUT_RESET Reset EFI_INPUT_READ_KEY ReadKeyStroke EFI_EVENT WaitForKey SIMPLE_INPUT_INTERFACE Parameters Reset Reset the ConsoleIn device See Section 7...

Page 173: ...ription The Reset function resets the input device hardware As part of initialization process the firmware device will make a quick but reasonable attempt to verify that the device is functioning If t...

Page 174: ...n Related Definitions Related Definitions EFI_INPUT_KEY typedef struct UINT16 ScanCode CHAR16 UnicodeChar EFI_INPUT_KEY Description The ReadKeyStroke function reads the next keystroke from the input d...

Page 175: ...tructure typedef struct _SIMPLE_TEXT_OUTPUT_INTERFACE EFI_TEXT_RESET Reset EFI_TEXT_STRING OutputString EFI_TEXT_TEST_STRING TestString EFI_TEXT_QUERY_MODE QueryMode EFI_TEXT_SET_MODE SetMode EFI_TEXT...

Page 176: ...EXT_OUTPUT_MODE is defined in Related Definitions The following data values in the SIMPLE_TEXT_OUTPUT_MODE interface are read only and are changed by using the appropriate interface functions MaxMode...

Page 177: ...wed to contain any control codes other than those defined in Table 7 1 Positional cursor placement is done only via the SetCursorPosition function It is highly recommended that text output to the Stan...

Page 178: ...put device hardware The cursor position is set to 0 0 and the screen is cleared to the default background color for the output device As part of initialization process the firmware device will make a...

Page 179: ...the Unicode drawing characters defined in Related Definitions Related Definitions UNICODE DRAWING CHARACTERS define BOXDRAW_HORIZONTAL 0x2500 define BOXDRAW_VERTICAL 0x2502 define BOXDRAW_DOWN_RIGHT 0...

Page 180: ...ICAL_DOUBLE_LEFT 0x2562 define BOXDRAW_DOUBLE_VERTICAL_LEFT 0x2563 define BOXDRAW_DOWN_HORIZONTAL_DOUBLE 0x2564 define BOXDRAW_DOWN_DOUBLE_HORIZONTAL 0x2565 define BOXDRAW_DOUBLE_DOWN_HORIZONTAL 0x256...

Page 181: ...position and move the cursor right one column If this moves the cursor past the right edge of the display then the line should wrap to the beginning of the next line This is equivalent to inserting a...

Page 182: ...be output to the target device This function provides a way to know if the desired character set is present for rendering on the output device s This allows the installation procedure or EFI image to...

Page 183: ...the text output device for the request ModeNumber Description The QueryMode function returns information for an available text mode that the output device s supports It is required that all output de...

Page 184: ...instance Type SIMPLE_TEXT_OUTPUT_INTERFACE is defined in Section 7 5 ModeNumber The text mode to set Description The SetMode function sets the output device s to the requested mode On success the dev...

Page 185: ...n 7 5 Attribute The attribute to set Bits 0 3 are the foreground color and bits 4 6 are the background color All other bits are undefined and must be zero See Related Definitions Related Definitions A...

Page 186: ...ound background 4 Description The SetAttribute function sets the background and foreground colors for the OutputString and ClearScreen functions The color mask can be set even when the device is in an...

Page 187: ...A pointer to the SIMPLE_TEXT_OUTPUT_INTERFACE instance Type SIMPLE_TEXT_OUTPUT_INTERFACE is defined in Section 7 5 Description The ClearScreen function clears the output device s display to the curren...

Page 188: ...E is defined in Section 7 5 Column Row The position to set the cursor to Must greater than or equal to zero and less than the number of columns and rows returned by QueryMode Description The SetCursor...

Page 189: ...TPUT_INTERFACE is defined in Section 7 5 Visible If TRUE the cursor is set to be visible If FALSE the cursor is set to be invisible Description The EnableCursor function makes the cursor visible or in...

Page 190: ...Extensible Firmware Interface Specification 172 12 12 00 Version 1 02...

Page 191: ...data at a block level from mass storage devices as well as to manage such devices in the EFI boot services environment 8 1 BLOCK_IO Protocol Summary This protocol provides control over block devices G...

Page 192: ...y and are updated by the code that produces the EFI_BLOCK_IO protocol functions MediaId The current media id If the media changes this value is changed RemovableMedia TRUE if the media is removable ot...

Page 193: ...BA Description The LogicalPartition is TRUE if the device handle is for a partition For media that have only one partition the value will always be TRUE For media that have multiple partitions this va...

Page 194: ...e Reset function resets the block device hardware As part of the initialization process the firmware device will make a quick but reasonable attempt to verify that the device is functioning If the Ext...

Page 195: ...l block address to read from on the device Type EFI_LBA is defined in Section 8 1 BufferSize The size of the Buffer in bytes This must be a multiple of the intrinsic block size of the device Buffer A...

Page 196: ...ted an error while attempting to perform the read operation EFI_NO_MEDIA There is no media in the device EFI_MEDIA_CHANGED The MediaId is not for the current media EFI_BAD_BUFFER_SIZE The BufferSize p...

Page 197: ...BA The starting logical block address to be written The caller is responsible for writing to only legitimate locations Type EFI_LBA is defined in Section 8 1 BufferSize The size in bytes of Buffer Thi...

Page 198: ...MEDIA There is no media in the device EFI_MEDIA_CHANGED The MediaId is not for the current media EFI_DEVICE_ERROR The device reported an error while attempting to perform the write operation EFI_BAD_B...

Page 199: ...vice All data written to the device prior to the flush must be physically written before returning EFI_SUCCESS from this function This would include any cached data the driver may have cached and cach...

Page 200: ...Extensible Firmware Interface Specification 182 12 12 00 Version 1 02...

Page 201: ...K_IO Protocol Summary This protocol is used to abstract Block I O interfaces GUID define DISK_IO_PROTOCOL CE345171 BA0B 11d2 8e4F 00a0c969723b Revision Number define EFI_DISK_IO_INTERFACE_REVISION 0x0...

Page 202: ...protocol on the device handle The firmware automatically adds a EFI_DISK_IO interface to any EFI_BLOCK_IO interface that is produced It also adds file system or logical block I O interfaces to any EFI...

Page 203: ...uffer for the data The caller is responsible for either having implicit or explicit ownership of the buffer Description The ReadDisk function reads the number of bytes specified by BufferSize from the...

Page 204: ...nter to the buffer containing the data to be written Description The WriteDisk function writes the number of bytes specified by BufferSize to the device All bytes are written or an error is returned I...

Page 205: ...ace for file type access to a device GUID define SIMPLE_FILE_SYSTEM_PROTOCOL 0964e5b22 6459 11d2 8e39 00a0c969723b Revision Number define EFI_FILE_IO_INTERFACE_REVISION 0x00010000 Protocol Interface S...

Page 206: ...otocol return an EFI_FILE_IO_INTERFACE The only function of this interface is to open a handle to the root directory of the file system on the volume Once opened all accesses to the volume are perform...

Page 207: ...ns The volume remains open until all the file handles to it are closed If the medium is changed while there are open file handles to the volume all file handles to the volume will return EFI_MEDIA_CHA...

Page 208: ...ion of the EFI_FILE interface The version specified by this specification is 0x00010000 Future versions are required to be backward compatible to version 1 0 Open Opens or creates a new file See Secti...

Page 209: ...system when needed The caller must Close the file handle to the root directory and any other opened file handles before exiting While there are open files on the device usage of underlying device prot...

Page 210: ...pen handle to a directory Type EFI_FILE is defined in Section 10 2 NewHandle A pointer to the location to return the opened handle for the new file Type EFI_FILE is defined in Section 10 2 FileName Th...

Page 211: ...and returns a NewHandle The FileName may include the following path modifiers If the filename starts with a the relative location is the root directory that This residues on otherwise separates name...

Page 212: ...has a different medium in it or the medium is no longer supported EFI_DEVICE_ERROR The device reported an error EFI_VOLUME_CORRUPTED The file system structures are corrupted EFI_WRITE_PROTECTED An at...

Page 213: ...ILE This Parameters This A pointer to the EFI_FILE instance that is the file handle to close Type EFI_FILE is defined in Section 10 2 Description The Close function closes a specified file handle All...

Page 214: ...e handle to the file to delete Type EFI_FILE is defined in Section 10 2 Description The Delete function closes and deletes a file In all cases the file handle is closed If the file cannot be deleted t...

Page 215: ...t position is increased by the number of bytes returned If This is a directory the function reads the directory entry at the file s current position and returns the entry in Buffer If the Buffer is no...

Page 216: ...es to the file at the current file position The current file position is advanced the actual number of bytes written which is returned in BufferSize Partial writes only occur when there has been a dat...

Page 217: ...he SetPosition function sets the current file position for the handle to the position supplied With the exception of seeking to position 1 only absolute positioning is supported and seeking past the e...

Page 218: ...ent position on Type EFI_FILE is defined in Section 10 2 Position The address to return the file s current position value Description The GetPosition function returns the current file position for the...

Page 219: ...uffer s type is indicated by InformationType Description The GetInfo function returns information of type InformationType for the requested file If the file does not support the requested information...

Page 220: ...lated GUID definitions BufferSize The size in bytes of Buffer Buffer A pointer to the data buffer to write The buffer s type is indicated by InformationType Description The SetInfo function sets infor...

Page 221: ...ush Type EFI_FILE is defined in Section 10 2 Description The Flush function flushes all modified data associated with a file to a device Status Codes Returned EFI_SUCCESS The data was flushed EFI_NO_M...

Page 222: ...FileName EFI_FILE_INFO File Attribute Bits define EFI_FILE_READ_ONLY 0x0000000000000001 define EFI_FILE_HIDDEN 0x0000000000000002 define EFI_FILE_SYSTEM 0x0000000000000004 define EFI_FILE_RESERVIED 0x...

Page 223: ...f SetInfo the following additional rules apply On directories the file size is determined by the contents of the directory and cannot be changed by setting FileSize On directories FileSize is ignored...

Page 224: ...ated Unicode VolumeLabel string ReadOnly TRUE if the volume only supports read access VolumeSize The number of bytes managed by the file system FreeSpace The number of available bytes for use by the f...

Page 225: ...edef struct CHAR16 VolumeLabel EFI_FILE_SYSTEM_VOLUME_LABEL Parameters VolumeLabel The Null terminated string that is the volume s label Description The EFI_FILE_SYSTEM_VOLUME_LABEL data structure is...

Page 226: ...Extensible Firmware Interface Specification 208 12 12 00 Version 1 02...

Page 227: ...ses the driver to load the requested file See Section 11 1 1 Description The EFI_LOAD_FILE protocol is a simple protocol used to obtain files from arbitrary devices When the firmware is attempting to...

Page 228: ...ath must match an exact file to be loaded BufferSize On input the size of Buffer in bytes On output with a return code of EFI_SUCCESS the amount of data transferred to Buffer On output with a return c...

Page 229: ...in the case of a network boot through the PXE Base Code protocol FilePath merely points to the root of the device and the firmware interprets this as wanting to boot from the first valid loader The f...

Page 230: ...Extensible Firmware Interface Specification 212 12 12 00 Version 1 02...

Page 231: ...Revision EFI_SERIAL_RESET Reset EFI_SERIAL_SET_ATTRIBUTES SetAttributes EFI_SERIAL_SET_CONTROL_BITS SetControl EFI_SERIAL_GET_CONTROL_BITS GetControl EFI_SERIAL_WRITE Write EFI_SERIAL_READ Read SERIA...

Page 232: ...nt Attributes UINT32 Timeout UINT64 BaudRate UINT32 ReceiveFifoDepth UINT32 DataBits UINT32 Parity UINT32 StopBits SERIAL_IO_MODE The data values in the SERIAL_IO_MODE are read only and are updated by...

Page 233: ...I_PARITY_TYPE EFI_STOP_BITS_TYPE typedef enum DefaultStopBits OneStopBit 1 stop bit OneFiveStopBits 1 5 stop bits TwoStopBits 2 stop bits EFI_STOP_BITS_TYPE Description The Serial I O protocol is used...

Page 234: ...low to monitor and assert the flow control signals The XON XOFF flow control algorithm can be implemented in software by inserting XON and XOFF characters into the serial data stream as required Speci...

Page 235: ...IAL_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 1 Description The Reset function resets the hardwa...

Page 236: ...The requested depth of the FIFO on the receive side of the serial interface A ReceiveFifoDepth value of 0 will use the device s default FIFO depth Timeout The requested time out for a single character...

Page 237: ...ted by the serial device an error will be returned The nearest baud rate supported by the serial device will be selected without exceeding the BaudRate parameter If the specified ReceiveFifoDepth is b...

Page 238: ..._SERIAL_CLEAR_TO_SEND 0x0010 define EFI_SERIAL_DATA_SET_READY 0x0020 define EFI_SERIAL_RING_INDICATE 0x0040 define EFI_SERIAL_CARRIER_DETECT 0x0080 define EFI_SERIAL_REQUEST_TO_SEND 0x0002 define EFI_...

Page 239: ...CK_ENABLE and HARDWARE_FLOW_CONTROL_ENABLE bits can be set with SetControl All the bits can be read with GetControl Status Codes Returned EFI_SUCCESS The new control bits were set on the serial device...

Page 240: ...EAR_TO_SEND 0x0010 define EFI_SERIAL_DATA_SET_READY 0x0020 define EFI_SERIAL_RING_INDICATE 0x0040 define EFI_SERIAL_CARRIER_DETECT 0x0080 define EFI_SERIAL_REQUEST_TO_SEND 0x0002 define EFI_SERIAL_DAT...

Page 241: ...fer On output the amount of data actually written Buffer The buffer of data to write Description The Write function writes the specified number of bytes to a serial device If a time out error occurs w...

Page 242: ...Buffer On output the amount of data returned in Buffer Buffer The buffer to return the data into Description The Read function reads a specified number of bytes from a serial device If a time out err...

Page 243: ...triColl EFI_UNICODE_COLLATION_METAIMATCH MetaiMatch EFI_UNICODE_STRLWR StrLwr EFI_UNICODE_STRUPR StrUpr EFI_UNICODE_FATTOSTR FatToStr EFI_UNICODE_STRTOFAT StrToFat CHAR8 SupportedLanguages UNICODE_COL...

Page 244: ...protocols may be present at one time Each protocol instance can support one or more language codes The language codes that are supported in the UNICODE_COLLATION interface is declared in SupportedLang...

Page 245: ...nated Unicode string Description The StriColl function performs a case insensitive comparison of two Null terminated Unicode strings This function performs a case insensitive comparison between the Un...

Page 246: ...nter to a Null terminated Unicode pattern string Description The MetaiMatch function performs a case insensitive comparison of a Null terminated Unicode pattern string and a Null terminated Unicode st...

Page 247: ...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 character D or d followed by any character followed by a follo...

Page 248: ...DE_COLLATION_STRLWR IN UNICODE_COLLATION_INTERFACE This IN OUT CHAR16 String Parameters This A pointer to the UNICODE_COLLATION_INTERFACE instance Type UNICODE_COLLATION_INTERFACE is defined in Sectio...

Page 249: ...TION_STRUPR IN UNICODE_COLLATION_INTERFACE This IN OUT CHAR16 String Parameters This A pointer to the UNICODE_COLLATION_INTERFACE instance Type UNICODE_COLLATION_INTERFACE is defined in Section 13 1 S...

Page 250: ...r to the UNICODE_COLLATION_INTERFACE instance Type UNICODE_COLLATION_INTERFACE is defined in Section 13 1 FatSize The size of the string Fat in bytes Fat A pointer to a Null terminated string that con...

Page 251: ...g FatSize The size of the string Fat in bytes Fat A pointer to a Null terminated string that contains an 8 3 file name using an OEM character set Description This function converts the first FatSize U...

Page 252: ...Extensible Firmware Interface Specification 234 12 12 00 Version 1 02...

Page 253: ...et level transactions The EFI_PXE_BASE_CODE handle also supports the LOAD_FILE protocol This provides a clean way to obtain control from the boot manager if the boot path is from the remote device GUI...

Page 254: ...DHCPv4 D O R A discover offer request acknowledge or DHCPv6 S A R R solicit advertise request reply sequence Discover Attempts to complete the PXE Boot Server and or boot image discovery sequence Mtft...

Page 255: ...BisSupported BOOLEAN BisDetected BOOLEAN AutoArp BOOLEAN SendGUID BOOLEAN DhcpDiscoverValid BOOLEAN DhcpAckReceivd BOOLEAN ProxyOfferReceived BOOLEAN PxeDiscoverValid BOOLEAN PxeReplyReceived BOOLEAN...

Page 256: ...n BisDetected TRUE if this device and the platform support Boot Integrity Services BIS This field is set by the Start function AutoArp TRUE for automatic ARP packet generation FALSE otherwise This fie...

Page 257: ...icates whether the IcmpError field has been updated This field is reset to FALSE by the Start Dhcp Discover Mtftp UdpRead UdpWrite and Arp functions If an ICMP error is received this field will be set...

Page 258: ...ffer packet This field is zero filled by the Start function and is set when the Dhcp function completes successfully The contents of this field can be replaced by the SetPackets function PxeDiscover C...

Page 259: ...illed by the Start function TftpError TFTP error packet This field is updated when a TFTP error is received and is undefined until the first TFTP error is received This field is zero filled by the Sta...

Page 260: ...otpHwType UINT8 BootpHwAddrLen UINT8 BootpGateHops UINT32 BootpIdent UINT16 BootpSeconds UINT16 BootpFlags UINT8 BootpCiAddr 4 UINT8 BootpYiAddr 4 UINT8 BootpSiAddr 4 UINT8 BootpGiAddr 4 UINT8 BootpHw...

Page 261: ...ErrorString 127 EFI_PXE_BASE_CODE_TFTP_ERROR This section defines the data types for IP receive filter settings define EFI_PXE_BASE_CODE_MAX_IPCNT 8 EFI_PXE_BASE_CODE_IP_FILTER typedef struct UINT8 F...

Page 262: ...SubnetMask EFI_IP_ADDRESS GwAddr EFI_PXE_BASE_CODE_ROUTE_ENTRY This section defines the types of filter operations that can be used with the UdpRead and UdpWrite functions define EFI_PXE_BASE_CODE_UDP...

Page 263: ...Ver 0x00 PXE 2 0 16 bit UNDI MajorVer 0x02 MinorVer 0x01 32 64 bit UNDI H W UNDI MajorVer 0x03 MinorVer 0x00 Client System Architecture 93 0x5D 2 0x02 Type 2 Type is a two byte network order field tha...

Page 264: ...use this information to provide default images if it does not have a specific boot profile for the client A handle that supports EFI_PXE_BASE_CODE protocol is required to support the LOAD_FILE protoc...

Page 265: ...TRUE then EFI_ALREADY_STARTED will be returned If UseIpv6 is TRUE then IPv6 formatted addresses will be used in this session If UseIpv6 is FALSE then IPv4 formatted addresses will be used in this ses...

Page 266: ...PxeDiscover Zero filled PxeReplyValid Set to FALSE PxeReply Zero filled PxeBisReplyValid Set to FALSE PxeBisReply Zero filled IpFilter Set the Filters field to 0 and the IpCnt field to 0 ArpCacheEntr...

Page 267: ...lid EFI_UNSUPPORTED UseIpv6 is TRUE but the Ipv6Supported field of the EFI_BASE_CODE_MODE structure is FALSE EFI_ALREADY_STARTED The PXE Base Code Protocol is already in the started state EFI_DEVICE_E...

Page 268: ...device All the resources allocated in Start are released the Started field of the EFI_PXE_BASE_CODE_MODE structure is set to FALSE and EFI_SUCCESS is returned If the Started field of the EFI_PXE_BASE...

Page 269: ...is returned and the DhcpCompleted ProxyOfferReceived StationIp SubnetMask DhcpDiscover DhcpAck and ProxyOffer fields of the EFI_PXE_BASE_CODE_MODE structure are filled in If SortOffers is TRUE then t...

Page 270: ...AMETER One of the parameters is not valid EFI_DEVICE_ERROR The network device encountered an error during this operation EFI_OUT_OF_RESOURCES Could not allocate enough memory to complete the DHCP Prot...

Page 271: ...Definitions Layer Pointer to the boot server layer number to discover which must be PXE_BOOT_LAYER_INITIAL when a new server type is being discovered This is the only layer type that will perform mul...

Page 272: ...I_PXE_BASE_CODE_BOOT_TYPE_HP_OPENVIEW 8 define EFI_PXE_BASE_CODE_BOOT_TYPE_ALTIRIS_9 9 define EFI_PXE_BASE_CODE_BOOT_TYPE_ALTIRIS_10 10 define EFI_PXE_BASE_CODE_BOOT_TYPE_ALTIRIS_11 11 define EFI_PXE_...

Page 273: ...t BOOLEAN UseBCast BOOLEAN UseUCast BOOLEAN MustUseList EFI_IP_ADDRESS ServerMCastIp UINT16 IpCnt EFI_PXE_BASE_CODE_SRVLIST SrvList IpCnt EFI_PXE_BASE_CODE_DISCOVER_INFO EFI_PXE_BASE_CODE_SRVLIST type...

Page 274: ...y Boot Server reply of that type will be accepted If the AcceptAnyResponse field is FALSE only responses from Boot Servers with matching IP addresses will be accepted This function can take at least 1...

Page 275: ...pointer to the data buffer Ignored for read file if DontUseBuffer is TRUE Overwrite Only used on write file operations TRUE if a file on a remote server can be overwritten BufferSize For read file and...

Page 276: ...ets are passed to the Callback Protocol which is responsible for storing them This field is only used by TFTP and MTFTP read file Related Definitions EFI_PXE_BASE_CODE_TFTP_OPCODE typedef enum EFI_PXE...

Page 277: ...data will be placed in the buffer specified by BufferPtr If BufferSize is too small to contain the entire downloaded file then EFI_BUFFER_TOO_SMALL will be returned and BufferSize will be set to zero...

Page 278: ...of the form d d d d for IP v4 TBD for IP v6 The final entry is itself null terminated so that the final information string is terminated with two null octets Status Codes Returned EFI_SUCCESS The TFT...

Page 279: ...s UDP write operation may be broken up across multiple packets DestIp The destination IP address DestPort The destination UDP port number GatewayIp The gateway IP address If DestIp is not in the same...

Page 280: ...occurs during the transmission of the packet then EFI_TIMEOUT will be returned If an ICMP error occurs during the transmission of the packet then the IcmpErrorReceived field is set to TRUE the IcmpEr...

Page 281: ...Ptr OPTIONAL IN OUT UINTN BufferSize IN VOID BufferPtr Parameters This Pointer to the EFI_PXE_BASE_CODE instance OpFlags The UDP operation flags DestIp The destination IP address DestPort The destinat...

Page 282: ...of UDP packet receive filtering will be performed The following tables summarize these receive filter operations Table 14 2 Destination IP Filter Operation OpFlags USE_FILTER OpFlags ANY_DEST_IP Dest...

Page 283: ...a packet sent from any UDP port 0 not NULL Receive a packet whose source UDP port matches SrcPort 1 not NULL Receive a packet sent from any UDP port and return the source UPD port in SrcPort Status C...

Page 284: ...dress unicast broadcast address logical address or addresses multicast or all promiscuous UdpRead does not modify the IP filter settings Dhcp Discover and Mtftp set the IP filter and return with the I...

Page 285: ...pecified by IpAddr is used to resolve a MAC address If the ARP protocol succeeds in resolving the specified address then the ArpCacheEntries and ArpCache fields of the EFI_PXE_BASE_CODE_MODE structure...

Page 286: ...NULL this parameter is ignored NewSendGUID If not NULL a pointer to a value that specifies whether to replace the current value of SendGUID TRUE to send the SystemGUID if there is one as the client ha...

Page 287: ...mappings that are available are those stored in the ArpCache of the EFI_PXE_BASE_CODE_MODE structure If there are not enough mappings in the ArpCache to perform a PXE Base Code Protocol service then t...

Page 288: ...ask will not be modified Description This function updates the station IP address and or subnet mask values of a network device The NewStationIp field is used to modify the network device s current IP...

Page 289: ...N EFI_PXE_BASE_CODE_PACKET NewPxeBisReply OPTIONAL Parameters This Pointer to the EFI_PXE_BASE_CODE instance NewDhcpDiscoverValid If not NULL a pointer to a value that specifies whether to replace the...

Page 290: ...fer Pointer to the new cached Proxy Offer packet NewPxeDiscover Pointer to the new cached PXE Discover packet NewPxeReply Pointer to the new cached PXE Reply packet NewPxeBisReply Pointer to the new c...

Page 291: ...UID define EFI_PXE_BASE_CODE_CALLBACK_PROTOCOL 245DCA21 FB7B 11d3 8F01 00A0C969723B Revision Number define EFI_PXE_BASE_CODE_CALLBACK_INTERFACE_REVISION 0x00010000 Protocol Interface Structure typedef...

Page 292: ...ketLen IN EFI_PXE_BASE_CODE_PACKET Packet OPTIONAL Parameters This Pointer to the EFI_PXE_BASE_CODE instance Function The PXE Base Code Protocol function that is waiting for an event Received TRUE if...

Page 293: ...E_FUNCTION_LAST EFI_PXE_BASE_CODE_FUNCTION Description This function is invoked when the PXE Base Code Protocol is about to transmit has received or is waiting to receive a packet Parameters Function...

Page 294: ...Extensible Firmware Interface Specification 276 12 12 00 Version 1 02...

Page 295: ...RFACE_REVISION 0x00010000 Protocol Interface Structure typedef struct _EFI_SIMPLE_NETWORK_ UINT64 Revision EFI_SIMPLE_NETWORK_START Start EFI_SIMPLE_NETWORK_STOP Stop EFI_SIMPLE_NETWORK_INITIALIZE Ini...

Page 296: ...itialize The memory buffers assigned in the Initialize call are released After this call only the Initialize or Stop calls may be used ReceiveFilters Enables and disables the receive filters for the n...

Page 297: ...t UINT32 State UINT32 HwAddressSize UINT32 MediaHeaderSize UINT32 MaxPacketSize UINT32 NvRamSize UINT32 NvRamAccessSize UINT32 ReceiveFilterMask UINT32 ReceiveFilterSetting UINT32 MaxMCastFilterCount...

Page 298: ...2 4 8 If the value is zero then no NVRAM devices are attached to the network interface ReceiveFilterMask The multicast receive filter settings supported by the network interface ReceiveFilterSetting...

Page 299: ...IVE_UNICAST 0x01 define EFI_SIMPLE_NETWORK_RECEIVE_MULTICAST 0x02 define EFI_SIMPLE_NETWORK_RECEIVE_BROADCAST 0x04 define EFI_SIMPLE_NETWORK_RECEIVE_PROMISCUOUS 0x08 define EFI_SIMPLE_NETWORK_RECEIVE_...

Page 300: ...stance Description This function starts a network interface If the network interface was successfully started then EFI_SUCCESS will be returned Status Codes Returned EFI_SUCCESS The network interface...

Page 301: ...an network interface This call is only valid if the network interface is in the started state If the network interface was successfully stopped then EFI_SUCCESS will be returned Status Codes Returned...

Page 302: ...xtraTxBufferSize The size in bytes of the extra transmit buffer space that the driver should allocate for the network interface Some network interfaces will not be able to use the extra buffer and the...

Page 303: ...it with the parameters that were provided in the previous call to Initialize The transmit and receive queues are emptied and all pending interrupts are cleared Receive filters the station address the...

Page 304: ...ng transmits and receives are lost and interrupts are cleared and disabled After this call only the Initialize and Stop calls may be used If the network interface was successfully shutdown then EFI_SU...

Page 305: ...is field is optional if ResetMCastFilter is TRUE MCastFilter A pointer to a list of new multicast receive filter HW MAC addresses This list will replace any existing multicast HW MAC address list This...

Page 306: ...E_NETWORK_MODE If the network interface does not allow the multicast receive filter list to be modified then EFI_INVALID_PARAMETER will be returned If the driver has not been initialized EFI_DEVICE_ER...

Page 307: ...set to the network interface s permanent address If Reset is FALSE and the network interface allows its station address to be modified then the current station address is changed to the address speci...

Page 308: ...MPLE_NETWORK instance Reset Set to TRUE to reset the statistics for the network interface StatisticsSize On input the size in bytes of StatisticsTable On output the size in bytes of the resulting tabl...

Page 309: ...the media This would be less than64 for ethernet RxOversizeFrames Number of frames longer than the maxminum length for the media This would be greater than 1500 for ethernet RxDroppedFrames Valid fra...

Page 310: ...hen a partial buffer of statistics is returned in StatisticsTable StatisticsSize is set to the size required to collect all the available statistics and EFI_BUFFER_TOO_SMALL is returned If StatisticsS...

Page 311: ...ulticast IP address that is to be converted to a multicast HW MAC address MAC The multicast HW MAC address that is to be generated from IP Description This function converts a multicast IP address to...

Page 312: ...ize Buffer A pointer to the data buffer Description This function performs read and write operations on the NVRAM device attached to a network interface If ReadWrite is TRUE a read operation is perfor...

Page 313: ...ess was performed EFI_NOT_STARTED The network interface has not been started EFI_INVALID_PARAMETER One or more of the parameters has an unsupported value EFI_DEVICE_ERROR The command could not be sent...

Page 314: ...l be read from the device When the interrupt status is read it will also be cleared Clearing the transmit interrupt does not empty the recycled transmit buffer array TxBuf Recycled transmit buffer add...

Page 315: ...Buf then the buffer has been successfully transmitted and the status for that buffer is cleared If the status of the network interface is successfully collected EFI_SUCCESS will be returned If the dri...

Page 316: ...parameters must not be NULL BufferSize The size in bytes of the entire packet media header and data to be transmitted through the network interface Buffer A pointer to the packet media header followe...

Page 317: ...ork interface and EFI_SUCCESS will be returned GetStatus can be used to determine when the packet has actually been transmitted The contents of the Buffer must not be modified until the packet has act...

Page 318: ...etwork interface If this parameter is NULL then the media header size will not be returned BufferSize On entry the size in bytes of Buffer On exit the size in bytes of the packet that was received on...

Page 319: ...d If BufferSize is smaller than the received packet then the size of the receive packet will be placed in BufferSize and EFI_BUFFER_TOO_SMALL will be returned If the driver has not been initialized EF...

Page 320: ...e PXE structure is defined in the 32 64 bit UNDI Specification in Appendix G GUID define EFI_NETWORK_INTERFACE_IDENTIFIER_PROTOCOL E18541CD F755 4f73 928D 643C8A79B229 Revision Number define EFI_NETWO...

Page 321: ...n upper memory 32 64 bit S W UNDI ImageAddr is the address of the un relocated S W UNDI image H W UNDI ImageAddr contains zero ImageSize Size of un relocated network interface image 16 bit UNDI ImageS...

Page 322: ...on Environment PXE Specification 32 64 bit S W UNDI and H W UNDI MinorVer comes from the Minor field in the PXE structure See Appendix G Ipv6Supported TRUE if the network interface supports IPv6 other...

Page 323: ...em and file image format visit the web site from which this document was obtained 16 1 System Partition A System Partition is a partition in the conventional sense of a partition on a legacy Intel arc...

Page 324: ...FAT 8 3 file names are always stored as upper case ASCII characters LFN can either be stored as ASCII or Unicode and are stored case sensitive The string that was used to open or create the file is st...

Page 325: ...chine type short name EFI For removable media devices there must be only one EFI system partition and that partition must contain an EFI defined directory in the root directory The directory will be n...

Page 326: ...lock of the partition See Figure 16 1 DISK Partition Partition Partition Partition BLOCK_IO H dl Partition Table Partition Table Pointers to partitions Pointers to partitions Figure 16 1 Nesting of Le...

Page 327: ...s size may increase in the future it can not span more than one block on the device Two GUID Partition Table Header structures are stored on the device the primary and the backup The primary GUID Par...

Page 328: ...array must be located after the primary GUID Partition Table Header and end before the FirstUsableLBA The backup GUID Partition Entry array must be located after the LastUsableLBA and end before the b...

Page 329: ...on Entry LastUsableLBA 48 8 The last usable logical block that may be contained in a GUID Partition Entry DiskGUID 56 16 GUID that can be used to uniquely identify the disk PartitionEntryLBA 72 8 The...

Page 330: ...ion Table is corrupted this block device is defined as not having a valid GUID Partition Header The primary and backup GUID Partition Tables must be valid before an attempt is made to grow the size of...

Page 331: ...es to partitions The firmware must add the PartitionTypeGuid to the handle of every active GPT partition using InstallProtocolInterface This will allow drivers and applications including OS loaders to...

Page 332: ...ROM DVD ROM images formatted as required by the UDF 2 00 specification OSTA Universal Disk Format Specification Revision 2 00 can be booted by EFI EFI supports booting from an ISO 9660 file system th...

Page 333: ...ware The operating system indicator value of 0xEF defines a partition that contains an EFI file system The other values of the system indicator are not defined by this specification If an MBR partitio...

Page 334: ...tition Table disks a Protective MBR PMBR in the first LBA of the disk precedes the GUID Partition Table Header to maintain compatibility with existing tools that do not understand GPT partition struct...

Page 335: ...uters The diskette contains only a single partition that complies to the EFI file system type For diskettes to be bootable under EFI it must be built in accordance with the rules layed out in Section...

Page 336: ...Boot Manager uses the Load File Protocol to perform a LoadFile on the network device This uses the PXE Base Code Protocol to perform DHCP and Discovery This may result in a list of possible boot serv...

Page 337: ...to the hardware device and to a file on that hardware device that contains the EFI image to be loaded The variable might also contain paths to the OS partition and directory along with other configura...

Page 338: ...nager may perform automatic maintenance of the database variables For example it may remove unreferenced load option variables any unparseable or unloadable load option variables and rewrite any order...

Page 339: ...ive media device path is compared with the UniqueMBRSignature in the Legacy Master Boot Record see Table 16 4 in Chapter 16 If a signature match is made then the partition number must also be matched...

Page 340: ...tural boundary before it is used OptionalData The remaining bytes in the load option variable are a binary data buffer that is passed to the loaded image If the field is zero bytes long a Null pointer...

Page 341: ..._VARIABLE 8BE4DF61 93CA 11d2 AA0D 00E098032B8C To prevent name collisions with possible future globally defined variables other internal firmware data variables that are not defined here must be saved...

Page 342: ...s allowed to automatically replace the value s as needed to provide a console for the system The ConInDev ConOutDev and ErrOutDev variables each contain an EFI_DEVICE_PATH descriptor that defines all...

Page 343: ...ons 17 4 Boot Mechanisms EFI can boot from a device using the SIMPLE_FILE_SYSTEM protocol or the LOAD_FILE protocol A device that supports the SIMPLE_FILE_SYSTEM protocol must materialize a file syste...

Page 344: ...LOAD_FILE protocol The remainder of the FilePath will contain information that is specific to the device EFI firmware passes this device specific data to the loaded image but does not use it to load...

Page 345: ...fic PCI Expansion ROM Header The EFI expansion ROM header contains information about the image and a pointer to the start of the image 18 1 Standard PCI Expansion ROM Header All PCI expansion ROMs sta...

Page 346: ...Specification It also contains the offset to the EFI driver image header The offset to the EFI driver image header follows the same rules as the offset to the PCI data structure in the PCI Local Bus...

Page 347: ...types IA 32 image type Itanium based image type and intermediate byte stream image type The IA 32 and Itanium based image type represent 32 bit and 64 bit native Intel architecture processor code tha...

Page 348: ...Extensible Firmware Interface Specification 330 12 01 00 Version 1 01...

Page 349: ...The low field of the clock sequence Node 10 6 The spatially unique node identifier This can be based on any IEEE 802 address obtained from a network card If no network card exists in the system a cry...

Page 350: ...Extensible Firmware Interface Specification 332 12 12 00 Version 1 02...

Page 351: ...to represent the same subset of console support required by EFI ANSI X3 64 uses a single character escape sequence CSI ASCII character 0x9B ANSI X3 64 can optionally use the same two character escape...

Page 352: ...ame type of operations can be supported via a PC AT type INT 10h interface Table B 2 Control Sequences that Can Be Used to Implement SIMPLE_TEXT_OUTPUT PCANSI Codes ANSI X3 64 Codes Description ESC 2...

Page 353: ...dard 6429 ESC 43 m CSI 43 m Yellow background compliant with ISO Standard 6429 ESC 44 m CSI 44 m Blue background compliant with ISO Standard 6429 ESC 45 m CSI 45 m Magenta background compliant with IS...

Page 354: ...Extensible Firmware Interface Specification 336 12 12 00 Version 1 02...

Page 355: ...it connects to a root PCI host bridge chip and a secondary root PCI host bridge chip The secondary PCI host bridge chip produces a PCI bus that contains a PCI to PCI bridge The root PCI host bridge p...

Page 356: ...2 Key Device Object 1 Data Object Example Platform Reference MAST Master IDE Device _AD R M aster 0 Slave 1 Figure C 2 Partial ACPI Name Space for Example System C 2 Legacy Floppy The legacy floppy c...

Page 357: ...1F 1 0xFF Sub type End Device Path 20 2 0x04 Length C 3 IDE Disk The IDE Disk controller is a PCI device that is contained in a function of the root PCI host bridge The root PCI host bridge is a mult...

Page 358: ...Offset Byte Length 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 comp...

Page 359: ...hings Root PCI Bridge ACPI Device Path _HID PNP0A03 _UID 1 ACPI name space _SB PCI1 PCI to PCI Bridge PCI Device Path with device and function of the PCI Bridge ACPI name space _SB PCI1 PCI to PCI bri...

Page 360: ...rce setting of a device A _CRS is required for devices that are not enumerated in a standard fashion _CRS is how ACPI converts non standard devices into plug and play devices _HID Represents a device...

Page 361: ...the DEVICE_PATH_INTERFACE from a handle Not all the nodes in a Device Path will have a handle PCI Device Dev Func Message ATA Primary Maste ACPI Legacy Floppy _HID PNP0303 _UID 0 Media Hard Drive Part...

Page 362: ...Extensible Firmware Interface Specification 344 12 12 00 Version 1 02...

Page 363: ...Range IA 64 Range Description 0x00000000 0x3fffffff 0x0000000000000000 0x3fffffffffffffff Success and warning codes reserved for use by EFI See Tables D 2 and D 4 for valid values in this range 0x4000...

Page 364: ...6 The server was not found or did not respond to the request EFI_NO_MAPPING 17 A mapping to a device does not exist EFI_TIMEOUT 18 The timeout time expired EFI_NOT_STARTED 19 The protocol has not been...

Page 365: ...llocates memory pages of a particular type AllocatePool Boot Services Memory Allocation Services Allocates pool of a particular type Arp PXE Base Code Protocol Uses the ARP protocol to resolve a MAC a...

Page 366: ...the device FlushBlocks Block I O Protocol Flushes any cached blocks FreeBuffer Device I O Protocol Frees pages that were allocated with AllocateBuffer FreePages Boot Services Memory Allocation Service...

Page 367: ...rvices Miscellaneous Services Adds updates or removes a configuration table from the EFI System Table InstallProtocolInterface Boot Services Protocol Handler Services Adds a protocol interface to an e...

Page 368: ...tocol Reads from PCI Configuration Space Pci Write Device I O Protocol Writes to PCI Configuration Space PciDevicePath Device I O Protocol Provides an EFI Device Path for a PCI device with the given P...

Page 369: ...task priority level SetAttribute Simple Text Output Protocol Sets the foreground and background color of the text that is output SetAttributes Serial I O Protocol Sets communication parameters for a s...

Page 370: ...col Resets the network adapter and leaves it in a state safe for another driver to initialize SignalEvent Boot Services Event Services Signals an event Stall Boot Services Miscellaneous Services Stall...

Page 371: ...code string Transmit Simple Network Protocol Places a packet in the transmit queue of the network interface UdpRead PXE Base Code Protocol Reads a UDP packet from a network interface UdpWrite PXE Base...

Page 372: ...ed pool GetMemoryMap Returns the current boot services memory map and memory map key GetNextMonotonicCount Returns a monotonically increasing count for the platform HandleProtocol Queries the list of...

Page 373: ...access host memory for DMA Mem Read Reads from memory on a bus Mem Write Writes to memory on a bus Pci Read Reads from PCI Configuration Space Pci Write Writes to PCI Configuration Space PciDevicePat...

Page 374: ...E Base Code Protocol SetStationIp Updates the station IP address and or subnet mask values Start Enables the use of PXE Base Code Protocol functions Stop Disables the use of PXE Base Code Protocol fun...

Page 375: ...ize Resets the network adapter and allocates the transmit and receive buffers required by the network interface also optionally allows space for additional transmit and receive buffers to be allocated...

Page 376: ...put SetCursorPosition Sets the current cursor position SetMode Sets the current mode of the output device TestString Tests to see if the ConsoleOut device supports this Unicode string Unicode Collatio...

Page 377: ...is a serial number style ID that does not change across reboots If a system contains more than one device that reports the same _HID each device must have a unique _UID The _UID only needs to be uniqu...

Page 378: ...document such code is generally expected to be able to enumerate and handle transfers of control to the available OS loaders as well as EFI applications and drivers on a given system The boot manager...

Page 379: ...ed information intended for the system administrator It has two parts a Simple Input Protocol that is used to obtain input from the ConsoleIn device and a Simple Text Output Protocol that is used to c...

Page 380: ...Boot Specification Device Path and End Of Hardware Device Path Device Path Instance When an EFI Handle represents multiple devices it is possible for a device path to contain multiple device paths An...

Page 381: ...the firmware via protocol interfaces Drivers may provide device support during the boot process or they may provide platform services It is important not to confuse drivers in this specification with...

Page 382: ...ectory Also called the EFI File Handle Protocol File System Protocol A protocol that is used during boot services to obtain file based access to a device It has two parts a Simple File System Protocol...

Page 383: ...in a file system that complies with this specification Images may be drivers applications or OS loaders Also called an EFI Image Image Handle A handle for a loaded image image handles support the loa...

Page 384: ...ress while the high order byte is at the highest address See Big Endian Load File Protocol A protocol that is used during boot services to find and load other modules of code Loaded Image A file conta...

Page 385: ...emory Type One of the memory types defined by EFI for use by the firmware and EFI applications Among others there are types for boot services code boot services data runtime services code and runtime...

Page 386: ...page or extend across multiple pages Pool memory is allocated by AllocatePool and returned by FreePool Preboot Execution Environment PXE A means by which agents can be loaded remotely onto systems to...

Page 387: ...a Simple Network Protocol to perform packet level transactions and may be used by the firmware s boot manager to support booting from remote locations Also called the EFI PXE Base Code Protocol Runti...

Page 388: ...ne of two protocols that make up the Console I O Protocol SMBIOS See System Management BIOS StandardError The device handle that corresponds to the device used to display error messages to the user fr...

Page 389: ...the first block sector of the partition for compatibility code System Table Table that contains the standard input and output handles for an EFI application as well as pointers to the boot services a...

Page 390: ...ports and input devices on a single bus USB See Universal Serial Bus Variable Services The set of functions used to manage variables Includes GetVariable SetVariable and GetNextVariableName Virtual M...

Page 391: ...le device for remote boot services A typical NBP examines the machine it is running on to try to determine if the machine is capable of running the next layer OS or application If the machine is not c...

Page 392: ...rovided in the PXE SDK software development kit have the ability to take plug in modules PIMs These PIMs are used to change enhance the capabilities of the proxyDHCP and Bootservers UNDI Universal Net...

Page 393: ...ttp www ietf org rfc rfc2463 txt Required reading for those implementing the BC protocol IETF Internet Engineering Task Force http www ietf org This is a good starting point for obtaining electronic c...

Page 394: ...fM Wired for Management ftp download intel com ial wfm baseline pdf Recommended reading for those implementing the BC protocol or PXE Bootservers G 1 3 OS Network Stacks This is a simplified overview...

Page 395: ...e of the OS environment OS vendor can tune the universal protocol driver for best OS performance NIC vendor only has to write one driver per CPU architecture Slightly slower than Custom or H W UNDI be...

Page 396: ...erved BusType s EntryPoint bus More BusType s 0x10 Signature Len Fudge Rev IFcnt Major Minor Implemenation Status Command CDBaddr reserved reserved Major Minor reserved Figure G 2 PXE Structures for H...

Page 397: ...e third and E in the last This field must be aligned on a 16 byte boundary the last address byte must be zero Len Varies Number of PXE structure bytes to checksum When computing the checksum of this s...

Page 398: ...ess settable 1 or not settable 0 Bit 0x09 Statistics supported 1 or not supported 0 Bit 0x0A 0x0B NvData not available 0 read only 1 sparse write supported 2 bulk write supported 3 Bit 0x0C Multiple f...

Page 399: ...x1F 0x1E UNDI state Stopped 0 Started 1 Initialized 2 Busy 3 Command Varies Use to execute commands clear interrupt status and enable disable receive levels This is a read write port Read reflects the...

Page 400: ...DB on the stack and then call the UNDI API entry point When control is returned to the protocol driver the protocol driver must remove the address of the CDB from the stack reserved Zero Reserved for...

Page 401: ...al address of first CDB to CDBaddr register Step 3 H W UNDI Initiate command execution write to UNDI Command port Step 4 H W UNDI Wait for completion status Can be polled in separate thread or interru...

Page 402: ...tatFlags Control Figure G 4 UNDI Command Descriptor Block CDB Descriptions of the CDB fields are given in the table below Table G 5 UNDI CDB Field Definitions Identifier Description OpCode Operation C...

Page 403: ...E_INVALID_CDB will be returned DBaddr Data Block Address For H W UNDI this field must be the physical address of the DB structure For S W UNDI this field must be the virtual address of the DB structur...

Page 404: ...in the list 0 Bit 0x01 Queue command if busy 1 fail if busy 0 G 3 UNDI C Definitions The definitions in this section are used to aid in the portability and readability of the example 32 64 bit S W UND...

Page 405: ...16 PXE_UINT32 b 0xFF 8 PXE_UINT32 a 0xFF else define PXE_BUSTYPE a b c d PXE_UINT32 a 0xFF 24 PXE_UINT32 b 0xFF 16 PXE_UINT32 c 0xFF 8 PXE_UINT32 f 0xFF endif UNDI ROM ID and devive ID signature defi...

Page 406: ...ine PXE_SWAP_UINT16 n PXE_UINT16 n 0x00FF 8 PXE_UINT16 n 0xFF00 8 else define PXE_SWAP_UINT16 n n endif G 3 1 5 PXE_SWAP_UINT32 This macro swaps bytes in a 32 bit word ifdef PXE_INTEL_ORDER define PXE...

Page 407: ...F00000000 8 PXE_UINT64 n 0x0000FF0000000000 24 PXE_UINT64 n 0x00FF000000000000 40 PXE_UINT64 n 0xFF00000000000000 56 else define PXE_SWAP_UINT64 n n endif endif PXE_UINT64_SUPPORT This macro swaps byt...

Page 408: ...eration All of the portability typedefs define little endian Intel format storage The least significant byte is stored in the lowest memory address and the most significant byte is stored in the highe...

Page 409: ...edef unsigned short PXE_UINT16 G 3 3 6 PXE_UINT32 Unsigned 32 bit integer typedef unsigned PXE_UINT32 G 3 3 7 PXE_UINT64 Unsigned 64 bit integer if PXE_UINT64_SUPPORT 0 typedef unsigned long PXE_UINT6...

Page 410: ...ere are no BC OpCodes BC protocol functions are discussed later in this document typedef PXE_UINT16 PXE_OPCODE Return UNDI operational state define PXE_OPCODE_GET_STATE 0x0000 Change UNDI operational...

Page 411: ...CODE_STATION_ADDRESS 0x000A Read traffic statistics define PXE_OPCODE_STATISTICS 0x000B Convert multicast IP address to multicast MAC address define PXE_OPCODE_MCAST_IP_TO_MAC 0x000C Read or change no...

Page 412: ...394 12 12 00 Version 1 02 G 3 4 3 PXE_OPFLAGS typedef PXE_UINT16 PXE_OPFLAGS define PXE_OPFLAGS_NOT_USED 0x0000 UNDI Get State No OpFlags UNDI Start No OpFlags UNDI Stop No OpFlags UNDI Get Init Info...

Page 413: ...e PXE_OPFLAGS_RESET_DISABLE_INTERRUPTS 0x0001 define PXE_OPFLAGS_RESET_DISABLE_FILTERS 0x0002 UNDI Shutdown No OpFlags UNDI Interrupt Enables Select whether to enable or disable external interrupt sig...

Page 414: ...error packet has been transmitted define PXE_OPFLAGS_INTERRUPT_TRANSMIT 0x0002 Enable command interrupts An external interrupt will be generated when command execution stops define PXE_OPFLAGS_INTERR...

Page 415: ...ET_MCAST_LIST 0x2000 Enable unicast packet receiving Packets sent to the current station MAC address will be received define PXE_OPFLAGS_RECEIVE_FILTER_UNICAST 0x0001 Enable broadcast packet receiving...

Page 416: ...VE_FILTER_ALL_MULTICAST 0x0010 UNDI Station Address define PXE_OPFLAGS_STATION_ADDRESS_READ 0x0000 define PXE_OPFLAGS_STATION_ADDRESS_WRITE 0x0000 define PXE_OPFLAGS_STATION_ADDRESS_RESET 0x0001 UNDI...

Page 417: ...e disabled define PXE_OPFLAGS_GET_INTERRUPT_STATUS 0x0001 Return list of transmitted buffers for recycling Transmit buffers must not be changed or unallocated until they have recycled After issuing a...

Page 418: ...define PXE_OPFLAGS_TRANSMIT_OPMASK 0x0002 define PXE_OPFLAGS_TRANSMIT_FRAGMENTED 0x0002 define PXE_OPFLAGS_TRANSMIT_WHOLE 0x0000 UNDI Receive No OpFlags G 3 4 4 PXE_STATFLAGS typedef PXE_UINT16 PXE_ST...

Page 419: ...e PXE_STATFLAGS_GET_STATE_STARTED 0x0001 define PXE_STATFLAGS_GET_STATE_STOPPED 0x0000 UNDI Start No additional StatFlags UNDI Get Init Info define PXE_STATFLAGS_CABLE_DETECT_MASK 0x0001 define PXE_ST...

Page 420: ...rrupts are enabled define PXE_STATFLAGS_INTERRUPT_COMMAND 0x0004 UNDI Receive Filters If set unicast packets will be received define PXE_STATFLAGS_RECEIVE_FILTER_UNICAST 0x0001 If set broadcast packet...

Page 421: ...CAST 0x0010 UNDI Station Address No additional StatFlags UNDI Statistics No additional StatFlags UNDI MCast IP to MAC No additional StatFlags UNDI NvData No additional StatFlags UNDI Get Status Use to...

Page 422: ...one software interrupt occurred define PXE_STATFLAGS_GET_STATUS_SOFTWARE 0x0008 This flag is set if the transmitted buffer queue is empty This flag will be set if all transmitted buffer addresses get...

Page 423: ...fine PXE_STATCODE_ALREADY_STARTED 0x0005 define PXE_STATCODE_NOT_STARTED 0x0006 define PXE_STATCODE_NOT_SHUTDOWN 0x0007 define PXE_STATCODE_ALREADY_INITIALIZED 0x0008 define PXE_STATCODE_NOT_INITIALIZ...

Page 424: ...this command for later execution if the UNDI is busy and it supports command queuing If queuing is not supported a PXE_STATCODE_INVALID_CONTROL error is returned If the queue is full a PXE_STATCODE_CD...

Page 425: ...UOUS 0x04 define PXE_FRAME_TYPE_PROMISCUOUS_MULTICAST 0x05 G 3 4 9 PXE_IPV4 This storage type is always big endian network order not little endian Intel order typedef PXE_UINT32 PXE_IPV4 G 3 4 10 PXE_...

Page 426: ...PXE_UINT8 PXE_IFTYPE This information is from the ARP section of RFC 1700 1 Ethernet 10Mb 2 Experimental Ethernet 3Mb 3 Amateur Radio AX 25 4 Proteon ProNET Token Ring 5 Chaos 6 IEEE 802 Networks 7 A...

Page 427: ...PXE_UINT8 Fudge makes 8 bit cksum equal zero PXE_UINT8 Rev PXE_ROMID_REV PXE_UINT8 IFcnt physical connector count PXE_UINT8 MajorVer PXE_ROMID_MAJORVER PXE_UINT8 MinorVer PXE_ROMID_MINORVER PXE_UINT16...

Page 428: ...nterrupts define PXE_HWSTAT_SOFTWARE_INT_ENABLED 0x00000080 define PXE_HWSTAT_TX_COMPLETE_INT_ENABLED 0x00000040 define PXE_HWSTAT_PACKET_RX_INT_ENABLED 0x00000020 define PXE_HWSTAT_CMD_COMPLETE_INT_E...

Page 429: ..._CMD_COMPLETE_INT_ENABLE 0x00000010 Use these to clear pending external interrupts define PXE_HWCMD_CLEAR_SOFTWARE_INT 0x00000008 define PXE_HWCMD_CLEAR_TX_COMPLETE_INT 0x00000004 define PXE_HWCMD_CLE...

Page 430: ...th H W and S W UNDI types pragma pack 1 typedef union u_pxe_undi PXE_HW_UNDI hw PXE_SW_UNDI sw PXE_UNDI pragma pack Signature of PXE structure define PXE_ROMID_SIGNATURE PXE_BUSTYPE P X E PXE structur...

Page 431: ...XE_ROMID_IMP_NVDATA_READ_ONLY 0x00000400 define PXE_ROMID_IMP_NVDATA_NOT_AVAILABLE 0x00000000 define PXE_ROMID_IMP_STATISTICS_SUPPORTED 0x00000200 define PXE_ROMID_IMP_STATION_ADDR_SETTABLE 0x00000100...

Page 432: ...AGS OpFlags PXE_UINT16 CPBsize PXE_UINT16 DBsize PXE_UINT64 CPBaddr PXE_UINT64 DBaddr PXE_STATCODE StatCode PXE_STATFLAGS StatFlags PXE_UINT16 IFnum PXE_CONTROL Control PXE_CDB pragma pack G 3 5 5 PXE...

Page 433: ...ypedef union pxe_device PCI and PC Card NICs are both identified using bus device and function numbers For PC Card this may require PC Card services to be loaded in the BIOS or preboot environment str...

Page 434: ...tarted and Initialized shows the transitions between the states and which UNDI commands are valid in each state Stopped Initialized Started Start Stop Shutdown Initialize Valid Commands Get State Star...

Page 435: ...the State bits in the Status field in the PXE structure will be set to Busy 3 When H W or S W UNDI is executing commands and a new command is issued a StatCode of PXE_STATCODE_BUSY and a StatFlag of...

Page 436: ...that was added to the command queue will be run G 4 2 Get State This command is used to determine the operational state of the UNDI An UNDI has three possible operational states Stopped A stopped UNDI...

Page 437: ...been executed by the UNDI StatFlags Reason COMMAND_COMPLETE Command completed successfully StatFlags contain operational state COMMAND_FAILED Command failed StatCode field contains error code COMMAND...

Page 438: ...SED CPBsize PXE_CPBSIZE_NOT_USED DBsize PXE_DBSIZE_NOT_USED CPBaddr PXE_CPBADDR_NOT_USED DBaddr PXE_DBADDR_NOT_USED StatCode PXE_STATCODE_INITIALIZE StatFlags PXE_STATFLAGS_INITIALIZE IFnum A valid in...

Page 439: ...readed multi processor access to critical code sections when programming or accessing the network device To this end a blocking service is needed by the UNDI When UNDI needs a block it will call Block...

Page 440: ...by the UNDI StatFlags Reason COMMAND_COMPLETE Command completed successfully UNDI is now started COMMAND_FAILED Command failed StatCode field contains error code COMMAND_QUEUED Command has been queued...

Page 441: ...d has not been executed by the UNDI StatFlags Reason COMMAND_COMPLETE Command completed successfully UNDI is now stopped COMMAND_FAILED Command failed StatCode field contains error code COMMAND_QUEUED...

Page 442: ..._COMMAND_FAILED the command has not been executed by the UNDI StatFlags Reason COMMAND_COMPLETE Command completed successfully DB can be used COMMAND_FAILED Command failed StatCode field contains erro...

Page 443: ...XE_UINT32 MemoryRequired Maximum frame data length for Tx Rx excluding the media header PXE_UINT32 FrameDataLen Supported link speeds are in units of mega bits Common ethernet values are 10 100 and 10...

Page 444: ...tion will come out of the memory buffer given to the Initialize command If MemoryRequired is zero this allocation will come out of memory on the NIC PXE_UINT16 TxBufCnt PXE_UINT16 TxBufSize PXE_UINT16...

Page 445: ...OPCODE_GET_CONFIG_INFO OpFlags PXE_OPFLAGS_NOT_USED CPBsize PXE_CPBSIZE_NOT_USED DBsize sizeof PXE_DB_CONFIG_INFO CPBaddr PXE_CPBADDR_NOT_USED DBaddr Address of a PXE_DB_CONFIG_INFO structure StatCode...

Page 446: ...nds Try again later QUEUE_FULL Command queue is full Try again later NOT_STARTED The UNDI is not started DB pragma pack 1 typedef struct s_pxe_pci_config_info This is the flag field for the PXE_DB_GET...

Page 447: ...identifies the PCC network device that this UNDI interface is bound to PXE_UINT16 Bus PXE_UINT8 Device PXE_UINT8 Function This is a copy of the PCC configuration space for this network device union P...

Page 448: ...ocessing Initializing the network device will take up to four seconds for most network devices and in some extreme cases usually poor cables up to twenty seconds G 4 7 1 Issuing the Command To issue a...

Page 449: ...4 MemoryAddr MemoryLength must be greater than or equal to MemoryRequired returned by the Get Init Info command PXE_UINT32 MemoryLength Desired link speed in Mbit sec Common ethernet values are 10 100...

Page 450: ...CK_INTERNAL 1 define LOOPBACK_EXTERNAL 2 G 4 7 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_...

Page 451: ...E The network device could not be initialized NVDATA_FAILURE The non volatile storage could not be read StatFlags Check the StatFlags to see if there is an active connection to this network device If...

Page 452: ...IZE_NOT_USED CPBaddr PXE_CPBSIZE_NOT_USED DBaddr PXE_DBSIZE_NOT_USED StatCode PXE_STATCODE_INITIALIZE StatFlags PXE_STATFLAGS_INITIALIZE IFnum A valid interface number from zero to PXE IFcnt Control S...

Page 453: ...VICE_FAILURE The network device could not be initialized NVDATA_FAILURE The non volatile storage is not valid StatFlags Check the StatFlags to see if there is an active connection to this network devi...

Page 454: ...nge to report PXE_STATFLAGS_COMMAND_COMPLETE or PXE_STATFLAGS_COMMAND_FAILED the command has not been executed by the UNDI StatFlags Reason COMMAND_COMPLETE Command completed successfully UNDI and net...

Page 455: ...OT_USED DBsize PXE_DBSIZE_NOT_USED CPBaddr PXE_CPBADDR_NOT_USED DBaddr PXE_DBADDR_NOT_USED StatCode PXE_STATCODE_INITIALIZE StatFlags PXE_STATFLAGS_INITIALIZE IFnum A valid interface number from zero...

Page 456: ...Command completed successfully Check StatFlags INVALID_CDB One of the CDB fields was not set correctly BUSY UNDI is already processing commands Try again later QUEUE_FULL Command queue is full Try ag...

Page 457: ...cture StatCode PXE_STATCODE_INITIALIZE StatFlags PXE_STATFLAGS_INITIALIZE IFnum A valid interface number from zero to PXE IFcnt Control Set as needed OpFlags To read the current receive filter setting...

Page 458: ...C address filter list typedef struct s_pxe_cpb_receive_filters List of multicast MAC addresses This list if present will replace the existing multicast MAC address filter list PXE_MAC_ADDR MCastList n...

Page 459: ...AST PXE_STATFLAGS_RECEIVE_FILTER_BROADCAST PXE_STATFLAGS_RECEIVE_FILTER_FILTERED_MULTICAST PXE_STATFLAGS_RECEIVE_FILTER_PROMISCUOUS PXE_STATFLAGS_RECEIVE_FILTER_ALL_MULTICAST Unsupported receive filte...

Page 460: ...of PXE_DB_STATION_ADDRESS structure StatCode PXE_STATCODE_INITIALIZE StatFlags PXE_STATFLAGS_INITIALIZE IFnum A valid interface number from zero to PXE IFcnt Control Set as needed OpFlags To read cur...

Page 461: ...and execution StatCode Reason SUCCESS Command completed successfully INVALID_CDB One of the CDB fields was not set correctly INVALID_CPB One of the CPB fields was not set correctly BUSY UNDI is alread...

Page 462: ...o initialize the CDB structure for a Statistics command OpCode PXE_OPCODE_STATISTICS OpFlags Set as needed CPBsize PXE_CPBSIZE_NOT_USED DBsize sizeof PXE_DB_STATISTICS CPBaddr PXE_CPBADDR_NOT_USED DBa...

Page 463: ...r successfully or not the CDB StatCode field contains the result of the command execution StatCode Reason SUCCESS Command completed successfully DB is written INVALID_CDB One of the CDB fields was not...

Page 464: ...the media This would be 1500 for ethernet define PXE_STATISTICS_RX_OVERSIZE_FRAMES 0x03 Valid frames that were dropped because receive buffers were full define PXE_STATISTICS_RX_DROPPED_FRAMES 0x04 N...

Page 465: ...efine PXE_STATISTICS_TX_DROPPED_FRAMES 0x0E define PXE_STATISTICS_TX_UNICAST_FRAMES 0x0F define PXE_STATISTICS_TX_BROADCAST_FRAMES 0x10 define PXE_STATISTICS_TX_MULTICAST_FRAMES 0x11 define PXE_STATIS...

Page 466: ...re Dbaddr Address of PXE_DB_MCAST_IP_TO_MAC structure StatCode PXE_STATCODE_INITIALIZE StatFlags PXE_STATFLAGS_INITIALIZE Ifnum A valid interface number from zero to PXE IFcnt Control Set as needed Op...

Page 467: ...her successfully or not the CDB StatCode field contains the result of the command execution StatCode Reason SUCCESS Command completed successfully DB is written INVALID_CDB One of the CDB fields was n...

Page 468: ...Code PXE_STATCODE_INITIALIZE StatFlags PXE_STATFLAGS_INITIALIZE Ifnum A valid interface number from zero to PXE IFcnt Control Set as needed Preparing the CPB There are two types of non volatile data C...

Page 469: ...uct 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 uni...

Page 470: ...INT32 Dword n PXE_CPB_NVDATA_BULK G 4 15 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_COMPLE...

Page 471: ...ields was not set correctly BUSY UNDI is already processing commands Try again later QUEUE_FULL Command queue is full Try again later NOT_STARTED The UNDI is not started NOT_INITIALIZED The UNDI is no...

Page 472: ...zeof PXE_DB_GET_STATUS CPBaddr PXE_CPBADDR_NOT_USED DBaddr Address of PXE_DB_GET_STATUS structure StatCode PXE_STATCODE_INITIALIZE StatFlags PXE_STATFLAGS_INITIALIZE IFnum A valid interface number fro...

Page 473: ...in the CDB the current interrupt status is returned in the CDB StatFlags field and any pending interrupts will have been cleared PXE_STATFLAGS_GET_STATUS_RECEIVE PXE_STATFLAGS_GET_STATUS_TRANSMIT PXE_...

Page 474: ...fer queue If the transmitted buffer queue is full attempts to use the Transmit command will fail pragma pack 1 typedef struct s_pxe_db_get_status Length of next receive frame header data If this is ze...

Page 475: ...IFcnt Control Set as needed OpFlags Select one of the OpFlags below so the UNDI knows what type of CPB is being used PXE_OPFLAGS_FILL_HEADER_WHOLE PXE_OPFLAGS_FILL_HEADER_FRAGMENTED Preparing the CPB...

Page 476: ...PXE_PROTOCOL_ETHERNET_IP 0x0800 define PXE_PROTOCOL_ETHERNET_ARP 0x0806 Fragmented Frame pragma pack 1 typedef struct s_pxe_cpb_fill_header_fragmented Source and destination MAC addresses These will b...

Page 477: ...d must be set to zero PXE_UINT32 reserved FragDesc n PXE_CPB_FILL_HEADER_FRAGMENTED pragma pack G 4 17 2 Waiting for the Command to Execute Monitor the upper two bits 14 15 in the CDB StatFlags field...

Page 478: ...plete interrupt is generated if interrupts are disabled the transmit interrupt status is still set and can be checked using the Get Status command Some UNDI implementations and network adapters suppor...

Page 479: ...sed with H W UNDI PXE_OPFLAGS_TRANSMIT_BLOCK PXE_OPFLAGS_TRANSMIT_DONT_BLOCK Preparing the CPB If multiple frames per command are supported see PXE Implementation flags multiple CPBs can be packed tog...

Page 480: ...of the media header in bytes PXE_UINT16 MediaheaderLen Number of packet fragment descriptors PXE_UINT16 FragCnt Array of frame fragment descriptors The first byte of the first fragment is also the fir...

Page 481: ...E Command has been not executed or queued G 4 18 3 Checking Command Execution Results After command execution completes either successfully or not the CDB StatCode field contains the result of the com...

Page 482: ...structure StatCode PXE_STATCODE_INITIALIZE StatFlags PXE_STATFLAGS_INITIALIZE IFnum A valid interface number from zero to PXE IFcnt Control Set as needed Preparing the CPB If multiple frames per comma...

Page 483: ...StatCode Reason SUCCESS Command completed successfully Frames received and DB is written INVALID_CDB One of the CDB fields was not set correctly INVALID_CPB One of the CPB fields was not set correctly...

Page 484: ...I appended with the NIC s MAC address If the UNDI drives more than one NIC device it must install one set of NII and device path protocols for each device it controls UNDI must be compiled as a runtim...

Page 485: ...guration tables and if there are any it must traverse though the list of all UNDI configuration tables using the nextlink and install itself as the nextlink of the last table in the list The universal...

Page 486: ...Extensible Firmware Interface Specification 468 12 12 00 Version 1 02...

Page 487: ...ia boot 320 EFI_LOAD_OPTION descriptor 321 Boot Manager definition of 360 boot mechanisms 325 boot order list 319 boot process illustration of 13 overview 13 boot sequence 319 Boot Services 25 global...

Page 488: ...Boot Specification 133 CD ROM Media 131 File Path Media 132 hard drive 129 Media Protocol 132 Vendor Defined Media 131 Device Path messaging 123 1394 125 ATAPI 124 FibreChannel 124 I2 O 126 InfiniBand...

Page 489: ..._INFO 204 Flush 203 GetInfo 201 GetPosition 200 Open 192 Read 197 SetInfo 202 SetPosition 199 Write 198 Interface Structure 190 Revision Number 190 file names 306 file system format 305 306 File Syste...

Page 490: ...functions Unload 108 GUID 105 Interface Stucture 106 Revision Number 105 logical block address 308 long file names 306 M Master Boot Record 129 305 MBR 314 See Master Boot Record See Master Boot Recor...

Page 491: ...HandleProtocol 64 InstallProtocolInterface 57 LocateDevicePath 65 LocateHandle 62 RegisterProtocolNotify 61 ReinstallProtocolInterface 60 UninstallProtocolInterface 59 overview 55 Protocol Handler de...

Page 492: ...ursor 171 OutputString 161 Querymode 165 Reset 160 SetAttribute 167 SetCursorPosition 170 Setmode 166 TestString 164 GUID 157 Interface Structure 157 SIMPLE_TEXT_OUTPUT protocol implementation 333 spe...

Page 493: ...2 Unicode definition of 372 V Variable Services function list 77 functions GetNextVariableName 80 GetVariable 78 SetVariable 82 overview 77 variables global 323 non volatile 323 Virtual Memory Service...

Page 494: ...Extensible Firmware Interface Specification 476 12 12 00 Version 1 02...

Reviews: