IntelメーカーExtensible Firmware Interfaceの使用説明書/サービス説明書
ページ先へ移動 of 494
Extensible Firmware Interface Specification Version 1.02 December 12, 2000.
Extensible Firmwar e Interface Specifi cation ii 12/12/00 Version 1.02 THIS S PECIFIC ATION IS PR OVIDED "AS IS" W ITH NO WARR ANTIES WH ATSOE VER, INC LUDIN G AN Y WAR RANT Y OF MERCHANTABI LITY, FITNES S FOR ANY PART ICULAR PURPOSE, OR ANY WA RRANTY OTHERWI SE ARISING OUT OF ANY PROPO SAL, SPECIF ICAT ION OR SAM PLE.
Version 1.02 12/12/00 iii Revision History Revision Revision Histor y Date 1.01 Original Is sue. 12/01/00 1.02 Update for l egal and tra demarking r equirements .
Extensible Firmwar e Interface Specifi cation iv 12/12/00 Version 1.02.
Version 1.02 12/12/00 v T able of Content s 1 Introduction 1.1 Overview .................................................................................................... 2 1.2 Goals ..................................................................
Extensible Firmwar e Interface Specifi cation vi 12/12/00 Version 1.02 3 Services 3.1 Event, Timer, and Task Priority Services ................................................. 26 3.1.1 CreateEvent() ...................................................
Contents Version 1.02 12/12/00 vii 3.5 Variable Services ..................................................................................... 77 3.5.1 GetVariable() ................................................................................... 78 3.
Extensible Firmwar e Interface Specifi cation viii 12/12/00 Version 1.02 5.3 Device Path Nodes ................................................................................ 119 5.3.1 Generic Device Pa th Structures .................................
Contents Version 1.02 12/12/00 ix 5.4.4 Hardware vs. Messagin g Device Path Rules ................................. 135 5.4.5 Media Device Pat h Rules .............................................................. 136 5.4.6 Other Rules ...............
Extensible Firmwar e Interface Specifi cation x 12/12/00 Version 1.02 8 Block I/O Protocol 8.1 BLOCK_IO Protocol............................................................................... 173 8.1.1 EFI_BLOCK_IO.Rese t() ...........................
Contents Version 1.02 12/12/00 xi 12 Serial I/O Proto col 12.1 SERIAL_IO Protocol .............................................................................. 213 12.1.1 SERIAL_IO.Reset() .............................................................
Extensible Firmwar e Interface Specifi cation xii 12/12/00 Version 1.02 15 Simple Net work Protocol 15.1 EFI_SIMPLE_NETWORK Protoc ol........................................................ 277 15.1.1 EFI_SIMP LE_NETWORK.Start() ......................
Contents Version 1.02 12/12/00 xiii 17 Boot Manager 17.1 Firmwar e Boot Manager ........................................................................ 319 17.2 Globally-Defined Variables ..............................................................
Extensible Firmwar e Interface Specifi cation xiv 12/12/ 00 Version 1.02 G 32/64-Bit UNDI Sp ecification G.1 Introduction ............................................................................................ 373 G.1.1 Definitions ..............
Contents Version 1.02 12/12/00 xv G.4.18 Transmit......................................................................................... 460 G.4.19 Receive.......................................................................................... 464 G.
Extensible Firmwar e Interface Specifi cation xvi 12/12/ 00 Version 1.02 3-3. TPL Usage ............................................................................................... 27 3-5. TPL Restrictions ..........................................
Contents Version 1.02 12/12/00 xvii 5-25. CD-ROM Media Device Path ................................................................. 131 5-26. Vendor-Defined Medi a Device Pat h....................................................... 131 5-27. File Path Media D evice Path .
Extensible Firmwar e Interface Specifi cation xviii 12/12/00 Version 1.02 D-1. EFI_STATUS Codes Ranges ................................................................ 345 D-2. EFI_STATUS Succ ess Codes (High bit clear) ...............................
Version 1.02 12/12/00 1 1 Introduction This Extensib le Firm ware In terface (h ereafter known as EFI) Speci fication d escribes an interf ace between th e operating system (OS ) and the pl atform f irmware.
Extensible Firmware Interface Specifi cation 2 12/12/00 Version 1.02 1.1 Overview This specif icatio n is organiz ed as fol lows: Table 1-1. Organization of EFI Spec ification Chapter/Appendix Description 1. Introduction Provides an ov erview of th e EFI Specific ation.
Introduction Version 1.02 12/12/00 3 Table 1-1. Organization of EFI Spec ification (cont inued) Chapter/Appendix Description 15. Sim ple Network Protoc ol Defines the Sim ple Network Protocol, whic h provides a packet lev el interface to a network dev ice.
Extensible Firmware Interface Specifi cation 4 12/12/00 Version 1.02 • Abstract ion of the OS from t he firmw are . The sp ecification defines in terfa ces to pla tform capabilit ies.
Introduction Version 1.02 12/12/00 5 • Compatibil ity by des ign . The de sign of the system pa rtition stru ctures also p reserves a ll the structu res that are curren tly used in the “ PC-AT ” boot envi ronment.
Extensible Firmware Interface Specifi cation 6 12/12/00 Version 1.02 1.4 Related In formatio n The follow ing publica tions an d sources of informati on may be use ful to you o r are refe rred to by this spec ific atio n: • ACPI Implementers’ Guide , Intel Corpor ation, Mic rosoft Corp oratio n, Toshiba Corpo ration, version 0.
Introduction Version 1.02 12/12/00 7 • Microso ft Extensible Fi rmware Initia tive FAT32 File Sy stem Specif ication , Versi on 1.03, Microsoft Corporation , December 6, 2000 • OSTA U niversa l Disk Form at Speci fication , Revis ion 2.00, Optical S torage Technology Association, 1 998, http:/ /www2.
Extensible Firmware Interface Specifi cation 8 12/12/00 Version 1.02 1.5 Prerequisite Spec ifications In genera l, this sp ecification requir es that fu nctional ity defined in a numbe r of other ex isting specifica tions be present on a syste m that imp lements th is speci fication.
Introduction Version 1.02 12/12/00 9 1.5.3 Additional Consider ations for Ita nium ™ -based Plat forms Any infor mation or s ervic e that is a vailab le via It anium-ba sed firmw are arch itectu re speci fications supercedes an y require ment in the comm on IA-32 an d Itanium -based spec ificat ions liste d above.
Extensible Firmware Interface Specifi cation 10 12/12/00 Version 1.02 Figure 1-1 shows the princ ipal compon ents of EFI a nd their r elationsh ip to platform hardware and OS softw are.
Introduction Version 1.02 12/12/00 11 1.7 Migrati on Require ments Migration requir ements cove r the tr ansition p eriod from i nitia l imple menta tion of thi s spec ification to a futu re time wh en all pla tforms an d operating systems impleme nt to this specific ation.
Extensible Firmware Interface Specifi cation 12 12/12/00 Version 1.02 1.8 Conventions Used in Thi s Document This docu ment uses typogra phic an d illust rative conv entions des cribed belo w. 1.8.1 Data Structure Desc riptions The Intel ar chitectu re proces sors of t he IA-32 family a re “ little endia n ” machin es.
Version 1.02 12/12/00 13 2 Overview EFI allows the extension o f platform firmware b y loadin g EFI driver an d EFI app lication images. When EFI drive rs and EFI app lications are lo aded they hav e access to all EFI d efined runti me and boot service s.
Extensible Firmware Interface Specifi cation 14 12/12/00 Version 1.02 2.1 Boot Manager EFI contains a boot manager that allows the loading of EFI app lications ( including OS 1s t stage loader) or EF I drive rs from a ny file on a n EFI defined file sys tem or th rough the use o f an EFI defined im age loading servic e.
Overview Version 1.02 12/12/00 15 Interface s added by this spec ification are divid ed into the follow ing categ ories and a re deta iled lat er in this document: • Runtime ser vices • Boot serv .
Extensible Firmware Interface Specifi cation 16 12/12/00 Version 1.02 2.3 Calling Conventions Unless oth erwise sta ted, all func tions de fined in th e EFI spec ificat ion are cal led through p ointer s in common, arc hitectural ly defined, cal ling conv entions fo und in C compi lers.
Overview Version 1.02 12/12/00 17 Table 2-2. Common EFI Data Types (cont inued) Mnemonic Description UINT64 8 byte unsi gned value. CHAR8 1 byte Char acter. CHAR16 2 byte Char acter. Unles s otherwise spec ified all s trings are s tored i n the UTF-16 encoding format as defined by Unicode 2 .
Extensible Firmware Interface Specifi cation 18 12/12/00 Version 1.02 2.3.2 IA-32 Platforms All function s are cal led with the C lang uage cal ling conventio n. The genera l-purpos e registers that are vola tile acro ss functi on calls a re eax , ec x , and edx .
Overview Version 1.02 12/12/00 19 The EFI Image may invok e both SAL and EFI p rocedures. On ce in virtu al mode, th e EFI OS must switch back to physica l mode to c all any boo t services. If SetVirtualAddressMap() has been used, then runtime serv ice calls are made in vir tual mode.
Extensible Firmware Interface Specifi cation 20 12/12/00 Version 1.02 The follow ing C code fragm ent illustrate s the us e of protoco ls: // There is a global “EffectsDevice” structure. This // structure contains information pertinent to the device.
Overview Version 1.02 12/12/00 21 2.5 Requirements This docu ment is an a rchitect ural spec ificatio n. As such, car e has been tak en to spe cify architect ure in way s that al low maximu m flexib ility in imple mentati on.
Extensible Firmware Interface Specifi cation 22 12/12/00 Version 1.02 Table 2-5. Required EFI Implementation Elements (continu ed) Element Description SIMPLE_INPUT protoc ol Protoc ol interfac es for devic es that support s imple c onsole sty le text input.
Overview Version 1.02 12/12/00 23 2.5.3 Appendixes The conten t of Append ixes B, C, D, E of this sp ecifica tion is la rgely int ended as info rmation al. In other word s, semant ic inform ation cont ained in th ese sec tions need no t be cons idered par t of the formal de finition o f either requir ed or option al ele ments of the spec ification.
Extensible Firmware Interface Specifi cation 24 12/01/00 Version 1.02.
Version 1.02 12/12/00 25 3 Services This chap ter discus ses the fund amental s ervic es that are present in an EFI-co mplian t system. Th e service s are defined by inter face func tions that may be used b y code run ning in the EFI environmen t.
Extensible Firmware Interface Specifi cation 26 12/12/00 Version 1.02 The rest o f this chap ter discu sses in dividual f unction s. Global boo t services functions fall int o these catego ries : • Event, Timer, and Task Prio rity Servi ces (Sect ion 3.
Services Version 1.02 12/12/00 27 Execution in the boot ser vices e nvironmen t occurs at differen t task prior ity lev els, or TPLs. The boot serv ices envi ronment expo ses only th ree of these leve.
Extensible Firmware Interface Specifi cation 28 12/12/00 Version 1.02 Table 3-2 . TPL Usag e (cont inued) Task Priority Le vel Usage (Firmware Int errupts) This level is internal to t he firmw are. It is the level at whic h internal interrupts occur. Code ru nning at this level in terrupts c ode running at the TPL_NOTIFY level (or lower levels).
Services Version 1.02 12/12/00 29 3.1.1 CreateEvent() Summary Creates a n event. Prototype EFI_STATUS CreateEvent ( IN UINT32 Type, IN EFI_TPL NotifyTpl, IN EFI_EVENT_NOTIFY NotifyFunction, IN VOID * NotifyContext, OUT EFI_EVENT *Event ); Parameters Type The type of event to c reate an d its mode and attr ibutes.
Extensible Firmware Interface Specifi cation 30 12/12/00 Version 1.02 Related Definitions //******************************************************* // EFI_EVENT //*************************************.
Services Version 1.02 12/12/00 31 EVT_SIGNAL_VIRTUAL_ADDRESS_CHANGE The event is to be n otified by th e syste m when SetVirtualAddressMap() is perfo rmed.
Extensible Firmware Interface Specifi cation 32 12/12/00 Version 1.02 can ’ t clean up on behalf o f driv ers that h ave been loaded into the syste m. The driver s have to do that them selves by creating a n event w hose type is EVT_SIGNAL_EXIT_BOOT_SERVICES and whose notifi cation func tion is a function wit hin the dr iver itself.
Services Version 1.02 12/12/00 33 3.1.2 CloseEvent() Summary Closes an even t. Prototype EFI_STATUS CloseEvent ( IN EFI_EVENT Event ); Parameters Event The event to close. Type EFI_EVENT is d efined in Sec tion 3.1.1. Description The CloseEvent() function r emoves the calle r ’ s referen ce to th e event and c loses it.
Extensible Firmware Interface Specifi cation 34 12/12/00 Version 1.02 3.1.3 SignalEvent() Summary Signals an event. Prototype EFI_STATUS SignalEvent ( IN EFI_EVENT Event ); Parameters Event The event to signal. Type EFI_EVENT i s defin ed in Sectio n 3.
Services Version 1.02 12/12/00 35 3.1.4 WaitForEvent() Summary Stops execut ion until an event i s signaled. Prototype EFI_STATUS WaitForEvent ( IN UINTN NumberOfEvents, IN EFI_EVENT *Event, OUT UINTN *Index ); Parameters NumberOfEvents The number of events in the Event array.
Extensible Firmware Interface Specifi cation 36 12/12/00 Version 1.02 3.1.5 CheckEvent() Summary Checks whe ther an even t is in the signa led state. Prototype EFI_STATUS CheckEvent ( IN EFI_EVENT Event ); Parameters Event The event to check. Type EFI_EVENT i s defined in Section 3.
Services Version 1.02 12/12/00 37 3.1.6 SetTimer() Summary Sets the type of ti mer and the trigg er time for a t imer even t. Prototype EFI_STATUS SetTimer ( IN EFI_EVENT Event, IN EFI_TIMER_DELAY Type, IN UINT64 TriggerTime ); Parameters Event The timer e vent th at is to be signaled a t the sp ecified time.
Extensible Firmware Interface Specifi cation 38 12/12/00 Version 1.02 Description The SetTimer() function c ancels any p revious time trigg er setti ng for the ev ent, and sets the new trigger time for the even t. This func tion can only be used o n events of type EVT_TIMER .
Services Version 1.02 12/12/00 39 3.1.7 RaiseTPL() Summary Raises a task ’ s p riority level a nd returns its prev ious lev el. Prototype EFI_TPL RaiseTPL ( IN EFI_TPL NewTpl ); Parameters NewTpl The new task p rior ity level. It mu st be grea ter tha n or equal t o the current ta sk prio rity leve l.
Extensible Firmware Interface Specifi cation 40 12/12/00 Version 1.02 Description The RaiseTPL() function raises the prior ity of the currently exec uting task and return s its previous prior ity level. Only three task prio rity leve ls are expo sed outs ide of the firmware d uring EFI boot services executio n.
Services Version 1.02 12/12/00 41 3.1.8 RestoreTPL() Summary Restores a task ’ s prio rity leve l to its p revious value. Prototype VOID RestoreTPL ( IN EFI_TPL OldTpl ) Parameters OldTpl The previou s task prio rity lev el to res tore (the valu e from a p revious, matching ca ll to RaiseTPL() ).
Extensible Firmware Interface Specifi cation 42 12/12/00 Version 1.02 3.2 Memory Allocat ion Services The functions that make up Memory A llocat ion Serv ices are us ed during pr e-boot to alloca te and free memo ry, and t o obtain th e syste m ’ s memory map.
Services Version 1.02 12/12/00 43 Table 3-5 . Memory Typ e Usag e Before E xitBootSe rvices() Mnemonic Description EfiReservedM emoryTy pe Not used. EfiLoaderCod e The code portions of a loade d EFI applic ation. (Note th at EFI OS loaders are EFI applicatio ns.
Extensible Firmware Interface Specifi cation 44 12/12/00 Version 1.02 Table 3-6. Memory Type Usage After ExitBootServic es() Mnemonic Description EfiReservedM emoryTy pe N ot used. EfiLoaderCod e The Loader and/or OS may use this mem ory as they see fit.
Services Version 1.02 12/12/00 45 3.2.1 AllocatePages() Summary Allocate s memo ry pages f rom the sys tem. Prototype EFI_STATUS AllocatePages( IN EFI_ALLOCATE_TYPE Type, IN EFI_MEMORY_TYPE MemoryType, IN UINTN Pages, IN OUT EFI_PHYSICAL_ADDRESS * Memory ); Parameters Type The type of al location to perform.
Extensible Firmware Interface Specifi cation 46 12/12/00 Version 1.02 Related Definitions //******************************************************* //EFI_ALLOCATE_TYPE //******************************************************* // These types are discussed in the “ Description ” section below.
Services Version 1.02 12/12/00 47 Description The AllocatePages() function a lloca tes the requ ested nu mber of pag es and retu rns a po inter to the ba se address o f the page r ange in the location r eferenced b y Memory . The func tion scans the memory map to loc ate free p ages.
Extensible Firmware Interface Specifi cation 48 12/12/00 Version 1.02 3.2.2 FreePages() Summary Frees memo ry pages. Prototype EFI_STATUS FreePages ( IN EFI_PHYSICAL_ADDRESS Memory, IN UINTN Pages ); Parameters Memory The base physic al address of the p ages to be f reed.
Services Version 1.02 12/12/00 49 3.2.3 GetMemoryM ap() Summary Returns t he curr ent memo ry map. Prototype EFI_STATUS GetMemoryMap ( IN OUT UINTN *MemoryMapSize, IN OUT EFI_MEMORY_DESCRIPTOR *Memory.
Extensible Firmware Interface Specifi cation 50 12/12/00 Version 1.02 Related Definitions //******************************************************* //EFI_MEMORY_DESCRIPTOR //**************************.
Services Version 1.02 12/12/00 51 EFI_MEMORY_WB Memory cach eabil ity attr ibute: Me mory regi on is cachea ble with “ write back ” policy. Reads and writes that hit in the cache d o not propagate to main me mory. Dirty data is wri tten back to m ain memory when a new ca che line i s allo cated.
Extensible Firmware Interface Specifi cation 52 12/12/00 Version 1.02 The GetMemoryMap() function a lso return s the s ize and rev ision numbe r of the EFI_MEMORY_DESCRIPTOR . The DescriptorSize re prese nts the si ze in byt es o f an EFI_MEMORY_DESCRIPTOR array elem ent retur ned in MemoryMap .
Services Version 1.02 12/12/00 53 3.2.4 AllocatePool() Summary Allocate s pool memory. Prototype EFI_STATUS AllocatePool ( IN EFI_MEMORY_TYPE PoolType, IN UINTN Size, OUT VOID **Buffer ); Parameters PoolType The type of pool to alloca te.
Extensible Firmware Interface Specifi cation 54 12/12/00 Version 1.02 3.2.5 FreePool() Summary Returns poo l memory to the syste m. Prototype EFI_STATUS FreePool ( IN VOID *Buffer ); Parameters Buffer Pointer to the buff er to free. Description The FreePool() funct ion returns the memo ry spec ified by Buffer to the system .
Services Version 1.02 12/12/00 55 3.3 Protocol Handler Servi ces In the ab stract, a p rotocol con sists of a 128 -bit guaran teed un ique identi fier (GUID) and a Protoco l Interface structur e. The struc ture contains the functi ons and inst ance data t hat are use d to acc ess a device.
Extensible Firmware Interface Specifi cation 56 12/12/00 Version 1.02 Device Handle First Handle GUID Interf ace GUID Interf ace GUID Interface GUID Interface Protocol Interf ace Instance Data Protoco.
Services Version 1.02 12/12/00 57 3.3.1 InstallProtocolInterfa ce() Summary Installs a protocol interfac e on a device h andle. If the handle doe s not ex ist, it is c reated and ad ded to the lis t of handles in the sys tem.
Extensible Firmware Interface Specifi cation 58 12/12/00 Version 1.02 Related Definitions //******************************************************* //EFI_HANDLE //*************************************.
Services Version 1.02 12/12/00 59 3.3.2 UninstallProtocolInt erface() Summary Removes a p rotoco l interf ace from a device h andle. Prototype EFI_STATUS UninstallProtocolInterface ( IN EFI_HANDLE Handle, IN EFI_GUID *Protocol, IN VOID *Interface ); Parameters Handle The handle o n which the int erface wa s instal led.
Extensible Firmware Interface Specifi cation 60 12/12/00 Version 1.02 3.3.3 ReinstallProtocolInte rface() Summary Reinstalls a protocol inter face on a dev ice handle.
Services Version 1.02 12/12/00 61 3.3.4 RegisterProtocolNot ify() Summary Creates a n event tha t is to be s ignaled whenever an interf ace is ins talled fo r a spec ified pro tocol.
Extensible Firmware Interface Specifi cation 62 12/12/00 Version 1.02 3.3.5 LocateHandle( ) Summary Returns an array of ha ndles that supp ort a spec ified p rotocol.
Services Version 1.02 12/12/00 63 Related Definitions //******************************************************* // EFI_LOCATE_SEARCH_TYPE //******************************************************* type.
Extensible Firmware Interface Specifi cation 64 12/12/00 Version 1.02 3.3.6 HandleProtocol() Summary Queries a handle to determ ine if it support s a specified protoco l. Prototype EFI_STATUS HandleProtocol ( IN EFI_HANDLE Handle, IN EFI_GUID *Protocol, OUT VOID **Interface ); Parameters Handle The handle b eing queri ed.
Services Version 1.02 12/12/00 65 3.3.7 LocateDevicePath() Summary Locates the h andle to a devi ce on the d evice path that suppor ts the specified protocol. Prototype EFI_STATUS LocateDevicePath ( IN EFI_GUID *Protocol, IN OUT EFI_DEVICE_PATH **DevicePath, OUT EFI_HANDLE *Device ); Parameters Protocol The protocol to search fo r.
Extensible Firmware Interface Specifi cation 66 12/12/00 Version 1.02 Description The LocateDevicePath() function l ocates al l devices on DevicePath tha t support Protocol and retu rns the hand le to th e device th at is c losest to DevicePath . DevicePath is advanced over the device pa th nodes that were matched.
Services Version 1.02 12/12/00 67 3.4 Image Services Three types o f images c an be loaded: EFI Application s, EFI Boot S ervices Dri vers, and EFI Runtime Serv ices Drive rs.
Extensible Firmware Interface Specifi cation 68 12/12/00 Version 1.02 Most imag es are load ed by the boot manager. W hen an EFI applicat ion or drive r is instal led, the installa tion pro cedure reg isters i tself w ith the boo t manag er for load ing.
Services Version 1.02 12/12/00 69 3.4.1 LoadImage() Summary Loads an EFI image into memory. Prototype EFI_STATUS LoadImage ( IN BOOLEAN BootPolicy, IN EFI_HANDLE ParentImageHandle, IN EFI_DEVICE_PATH .
Extensible Firmware Interface Specifi cation 70 12/12/00 Version 1.02 Description The LoadImage() function loads an EF I image in to memor y and return s a hand le to th e image.
Services Version 1.02 12/12/00 71 3.4.2 StartImage() Summary Transfers cont rol to a loaded image ’ s en try po int. Prototype EFI_STATUS StartImage ( IN EFI_HANDLE ImageHandle, OUT UINTN *ExitDataSize, OUT CHAR16 **ExitData OPTIONAL ); Parameters ImageHandle Handle of im age to be st arted.
Extensible Firmware Interface Specifi cation 72 12/12/00 Version 1.02 3.4.3 UnloadImage() Summary Unloads an image. Prototype EFI_STATUS UnloadImage ( IN EFI_HANDLE ImageHandle ); Parameters ImageHandle Handle that i dentifie s the ima ge to be u nloaded.
Services Version 1.02 12/12/00 73 3.4.4 EFI_IMAGE_ENTRY_ POINT Summary This is the d eclara tion of an EFI i mage entry point. Th is can be th e entry point to an EF I applicatio n, an EFI boo t serv ice drive r, or an EFI run time dr iver.
Extensible Firmware Interface Specifi cation 74 12/12/00 Version 1.02 3.4.5 Exit() Summary Termina tes the cu rrent ly loaded E FI image a nd retu rns contro l to boo t services.
Services Version 1.02 12/12/00 75 When an EFI application ex its, f irmware frees the memory used to hold the i mage. The fi rmware also frees its refe rences to the ImageHandle and th e handle itself. B efore e xiting, th e appli cation is responsi ble fo r freeing a ny resource s it allo cated.
Extensible Firmware Interface Specifi cation 76 12/12/00 Version 1.02 3.4.6 ExitBootServices() Summary Terminate s all boot s ervic es. Prototype EFI_STATUS ExitBootServices ( IN EFI_HANDLE ImageHandle, IN UINTN MapKey ); Parameters ImageHandle Handle that i dentifie s the ex iting i mage.
Services Version 1.02 12/12/00 77 3.5 Variable Services Variable s are defi ned as key/va lue pairs that consi st of iden tifying in form ation plus attribut es (the key) and arbi trary dat a (the valu e).
Extensible Firmware Interface Specifi cation 78 12/12/00 Version 1.02 3.5.1 GetVariable() Summary Returns the va lue of a variable. Prototype EFI_STATUS GetVariable ( IN CHAR16 *VariableName, IN EFI_G.
Services Version 1.02 12/12/00 79 Description Each vendor may create and manage its own variab les with out the ri sk of name c onflicts by using a unique VendorGuid . When a variab le is set its Attributes are sup plied to indi cate how the data variable shou ld be stored and maintaine d by the system.
Extensible Firmware Interface Specifi cation 80 12/12/00 Version 1.02 3.5.2 GetNextVariableNam e() Summary Enumerates the cur rent variabl e names. Prototype EFI_STATUS GetNextVariableName ( IN OUT UINTN *VariableNameSize, IN OUT CHAR16 *VariableName, IN OUT EFI_GUID *VendorGuid ); Parameters VariableNameSize The size of th e VariableName buffe r.
Services Version 1.02 12/12/00 81 Once ExitBootServices() is per formed, va riables th at are on ly visible during boot s ervices will no l onger be re turned. To o btain the d ata con tents or a ttribute for a va riable re turned by GetNextVariableName(), the GetVariable() inte rface is u sed.
Extensible Firmware Interface Specifi cation 82 12/12/00 Version 1.02 3.5.3 SetVariable() Summary Sets the v alue of a va riable. Prototype EFI_STATUS SetVariable ( IN CHAR16 *VariableName, IN EFI_GUI.
Services Version 1.02 12/12/00 83 EFI_VARIABLE_NON_VOLATILE variable s are sto red in fixed hardware th at has a limite d storage capa city; so metimes a severely limite d capacity. Software shou ld only u se a non-vol atile variable when absolutely necessary.
Extensible Firmware Interface Specifi cation 84 12/12/00 Version 1.02 3.6 Time Serv ices This section contains f unction definitions for tim e-relate d function s that are typica lly nee ded by operating sy stems at runtime to access un derlying ha rdware tha t manages t ime inform ation and service s.
Services Version 1.02 12/12/00 85 3.6.1 GetTime() Summary Returns th e current time and d ate in formation, and the ti me-keep ing capabil ities of the h ardware platfo rm.
Extensible Firmware Interface Specifi cation 86 12/12/00 Version 1.02 //******************************************************* // Bit Definitions for EFI_TIME.
Services Version 1.02 12/12/00 87 //******************************************************* // EFI_TIME_CAPABILITIES //******************************************************* // This provides the capabilities of the // real time clock device as exposed through the EFI interfaces.
Extensible Firmware Interface Specifi cation 88 12/12/00 Version 1.02 3.6.2 SetTime() Summary Sets the current lo cal tim e and date i nform ation. Prototype EFI_STATUS SetTime ( IN EFI_TIME *Time ); Parameters Time A pointer to the current time. Type EFI_TIME is defined in Section 3.
Services Version 1.02 12/12/00 89 3.6.3 GetWakeupTime() Summary Returns the cu rrent w akeup alar m clock set ting. Prototype EFI_STATUS GetWakeupTime ( OUT BOOLEAN *Enabled, OUT BOOLEAN *Pending, OUT EFI_TIME *Time ); Parameters Enabled Indicates if the ala rm is currentl y enable d or disabl ed.
Extensible Firmware Interface Specifi cation 90 12/12/00 Version 1.02 3.6.4 SetWakeupTime() Summary Sets the sys tem wakeup a larm cloc k time. Prototype EFI_STATUS SetWakeupTime ( IN BOOLEAN Enable, IN EFI_TIME *Time OPTIONAL ); Parameters Enable Enable or d isable th e wakeup alar m.
Services Version 1.02 12/12/00 91 3.7 Virtual Memory Servic es This section contains f unction definitions for th e virtual me mory su pport tha t may be opt ionally used by an op erating system at runtime.
Extensible Firmware Interface Specifi cation 92 12/12/00 Version 1.02 3.7.1 SetVirtualAddressM ap() Summary Changes the run time addr essing mod e of EFI firmwa re from phy sical to vir tual.
Services Version 1.02 12/12/00 93 A virtual add ress map may only b e applied on e time. Once th e runt ime system i s in virt ual mode, calls to this fun ction return EFI_UNSUPPORTED . Status Codes Return ed EFI_SUCCESS The virtual a ddress map has been appl ied.
Extensible Firmware Interface Specifi cation 94 12/12/00 Version 1.02 3.7.2 ConvertPointer() Summary Determ ines the new virtual add ress th at is to b e used on s ubsequent m emory acce sses.
Services Version 1.02 12/12/00 95 3.8 Miscellaneous Serv ices This section contains the remain ing fun ction defi nitions fo r service s not defin ed elsewh ere but which are requ ired to complete th e defin ition of the EFI environme nt. Table 3-13 l ist s the Miscellan eous Servic es Functions.
Extensible Firmware Interface Specifi cation 96 12/12/00 Version 1.02 3.8.1 ResetSystem() Summary Resets th e enti re platfo rm. Prototype VOID ResetSystem ( IN EFI_RESET_TYPE ResetType, IN EFI_STATUS ResetStatus, IN UINTN DataSize, IN CHAR16 *ResetData OPTIONAL ); Parameters ResetType The type of reset to p erform.
Services Version 1.02 12/12/00 97 Description The ResetSystem() function r esets the entire pl atform, inc luding all p rocessors a nd devices, and reboots the sys tem. Calling this inte rface w ith ResetType of EfiResetCold causes a syst em-wid e rese t.
Extensible Firmware Interface Specifi cation 98 12/12/00 Version 1.02 3.8.2 SetWatchdogTimer() Summary Sets the syste m ’ s watchdog timer. Prototype EFI_STATUS SetWatchdogTimer ( IN UINTN Timeout, .
Services Version 1.02 12/12/00 99 Status Codes Return ed EFI_SUCCESS The timeout has been set. EFI_INVALID_PARAMETER The supp lied WatchdogCode is inv alid. EFI_UNSUP PORTED Th e system does not have a watchd og timer. EFI_DEVICE_ERRO R The watch dog t imer could not be pr ogrammed due t o a hardware error.
Extensible Firmware Interface Specifi cation 100 12/12/00 Version 1.02 3.8.3 Stall() Summary Induces a fine-gra ined stall. Prototype EFI_STATUS Stall ( IN UINTN Microseconds ) Parameters Microseconds The number of micro seconds to s tall exec ution.
Services Version 1.02 12/12/00 101 3.8.4 GetNextMonoton icCount() Summary Returns a monotonica lly incre asing count for the pl atform. Prototype EFI_STATUS GetNextMonotonicCount ( OUT UINT64 *Count ); Parameters Count Pointer to returne d value.
Extensible Firmware Interface Specifi cation 102 12/12/00 Version 1.02 3.8.5 GetNextHighMonotoni cCount() Summary Returns the ne xt high 3 2 bits of the platfo rm ’ s monotoni c counter. Prototype EFI_STATUS GetNextHighMonotonicCount ( OUT UINT32 *HighCount ); Parameters HighCount Pointer to returne d value.
Services Version 1.02 12/12/00 103 3.8.6 InstallConfigurationT able() Summary Adds, updates, or remov es a configu ration tab le entry from the EFI System Tab le. Prototype EFI_STATUS InstallConfigurationTable ( IN EFI_GUID *Guid, IN VOID *Table ); Parameters Guid A pointer to the GUID for the entry to add, update, or remove.
Extensible Firmware Interface Specifi cation 104 12/12/00 Version 1.02 If an add, modify, or re move ope ration is com pleted, then EFI_SUCCESS is returned. Note: If the re is n ot enough me mory t o perfo rm an add ope ration , then EFI_OUT_OF_RESOURCES is returned.
Version 1.02 12/12/00 105 4 EFI Image This chap ter defines EFI image s, a class o f files that con tain execut able code. W e begin by describ ing the EFI_LOADED_IMAGE protocol, and the n discuss EFI image head ers, applicat ions, OS loaders, and driv ers.
Extensible Firmware Interface Specifi cation 106 12/12/00 Version 1.02 Protocol Interface Structu re typedef struct { UINT32 Revision ; EFI_HANDLE ParentHandle ; EFI_SYSTEM_TABLE *SystemTable ; // Sou.
EFI Image Version 1.02 12/12/00 107 LoadOptions A pointer to the image ’ s binary lo ad options. ImageBase The base addres s at whi ch the imag e was loaded. ImageSize The size in bytes of the loaded imag e. ImageCodeType The memory type tha t the code sect ions wer e loaded as.
Extensible Firmware Interface Specifi cation 108 12/12/00 Version 1.02 4.1.1 LOADED_IMAGE.Unl oad() Summary Unloads an image fro m memory . Prototype typedef EFI_STATUS (EFIAPI *EFI_UNLOAD_IMAGE) ( IN EFI_HANDLE ImageHandle, ); Parameters ImageHandle The handle to the image to unload.
EFI Image Version 1.02 12/12/00 109 4.2 EFI Image Header EFI Images a re a class o f files d efined by EFI tha t conta in executab le code. The most disting uishing fe ature o f EFI Image s is that the firs t set o f bytes in the EF I Imag e file con tains an image heade r that defines th e encoding of the execut able image.
Extensible Firmware Interface Specifi cation 110 12/12/00 Version 1.02 4.3 EFI Applicati ons Applications are loaded by the boo t manager in the EF I firmwa re, or by othe r applica tions.
EFI Image Version 1.02 12/12/00 111 When the b oot manage r loads a driver, the image h andle may be used to loc ate the “ load opti ons ” for the d river. The load options are those op tions tha t were stored in the LoadOptions field of the EFI_LOADED_IMAGE informati on for the driver.
Extensible Firmware Interface Specifi cation 112 12/12/00 Version 1.02 // // EFI System Table // #define EFI_SYSTEM_TABLE_SIGNATURE 0x5453595320494249 #define EFI_SYSTEM_TABLE_REVISION (1<<16) |.
EFI Image Version 1.02 12/12/00 113 typedef struct_EFI_CONFIGURATION_TABLE { EFI_GUID VendorGuid; VOID *VendorTable; } EFI_CONFIGURATION_TABLE; The EFI system table con tains point ers to the runtime and boot serv ices tabl es. The defin ition s for these table s are shown in the fo llowing code fragm ents.
Extensible Firmware Interface Specifi cation 114 12/12/00 Version 1.02 EFI_GET_VARIABLE GetVariable; EFI_GET_NEXT_VARIABLE_NAME GetNextVariableName; EFI_SET_VARIABLE SetVariable; // // Miscellaneous S.
EFI Image Version 1.02 12/12/00 115 EFI_INSTALL_PROTOCOL_INTERFACE InstallProtocolInterface; EFI_REINSTALL_PROTOCOL_INTERFACE ReinstallProtocolInterface; EFI_UNINSTALL_PROTOCOL_INTERFACE UninstallProt.
Extensible Firmware Interface Specifi cation 116 12/12/00 Version 1.02 4.5.1.2 Handoff Stat e, Itanium-ba sed Operat ing Systems EFI uses the s tandard P 64 C calling conventions that are defi ned for It anium-bas ed operati ng systems. Figur e 4-2 shows t he stack a fter ImageEntryPoint has b een called on Itanium-bas ed systems.
Version 1.02 12/12/00 117 5 Device Path Protocol This chap ter contain s the defi nition of the devi ce path pro tocol and th e infor mation needed to construct an d manage dev ice paths in the EFI env ironment.
Extensible Firmware Interface Specifi cation 118 12/12/00 Version 1.02 5.2 EFI_DEVICE_PATH Pr otocol This section provide s a detail ed descrip tion of the EFI_DEVICE_PATH protocol. Summary Can be used on any d evice handl e to obtain g eneric pa th/location i nformat ion concern ing the physical dev ice or logi cal device.
Device Path Protoc ol Version 1.02 12/12/00 119 5.3 Device Path Nodes There are six majo r types of Dev ice Path node s: • Hardware De vice Path . Thi s Device Path defines how a device is attached t o the re source domain of a system, wher e resource domain is simply th e share d memory, memory mapped I/O, and I /O space o f the syste m.
Extensible Firmware Interface Specifi cation 120 12/12/00 Version 1.02 A Device Path is a seri es of gener ic Device Path node s. The firs t Device Path node star ts at byte offset zer o of the D evice Path. Th e next Device P ath node sta rts at th e end of the previou s Device Path node.
Device Path Protoc ol Version 1.02 12/12/00 121 5.3.2.1 PCI Device Path The Device Pa th for PC I defines the p ath to the PCI con figurati on space addr ess for a PCI device. There is o ne PCI Device Pat h entry fo r each devic e and fun ction numb er that de fines the pa th from the root PC I bus to the device.
Extensible Firmware Interface Specifi cation 122 12/12/00 Version 1.02 5.3.2.3 Memory Mapped Device Path Table 5-5. Memory Mapped Device P ath Mnemonic Byte Offset Byte Length Description Type 0 1 Type 1 – Hardware Device Path Sub-Type 1 1 Sub-Type 3 – Mem ory Mapped Length 2 2 Length of this s tructure in by tes.
Device Path Protoc ol Version 1.02 12/12/00 123 5.3.3 ACPI Device Path This Device Pat h contains ACPI D evice ID s that rep resent a device ’ s P lug and P lay Hardware ID and its corresp onding unique p ersisten t ID. The ACPI IDs a re stored in the ACPI _H ID and _UID device ident ification ob jects tha t are asso ciated with a device.
Extensible Firmware Interface Specifi cation 124 12/12/00 Version 1.02 5.3.4.1 ATAPI Device Path Table 5-9. ATAPI Devi ce Path Mnemonic Byte Offset Byte Length Description Type 0 1 Type 3 – Messagi ng Devi ce Pat h Sub-Type 1 1 Sub-Type 1 – ATAPI Length 2 2 Length of this s tructure in by tes.
Device Path Protoc ol Version 1.02 12/12/00 125 5.3.4.4 1394 Device Path Table 5-1 2. 1394 Dev ice Path Mnemonic Byte Offset Byte Length Description Type 0 1 Type 3 – Messagi ng Devi ce Pat h Sub-Type 1 1 Sub-Type 4 – 13 94 Length 2 2 Length of this s tructure in by tes.
Extensible Firmware Interface Specifi cation 126 12/12/00 Version 1.02 5.3.4.6 USB Class Device Path Table 5-1 4. USB Clas s Device Pat h Mnemonic Byte Offset Byte Length Description Type 0 1 Type 3 - Mess aging Devic e Path Sub-Type 1 1 Sub-Type 15 - USB Class Length 2 2 Length of this structure in bytes.
Device Path Protoc ol Version 1.02 12/12/00 127 5.3.4.9 IPv4 Device Path Table 5-1 7. IPv4 Dev ice Pat h Mnemonic Byte Offset Byte Length Description Type 0 1 Type 3 – Messagi ng Devi ce Pat h Sub-Type 1 1 Sub-Type 12 – IPv4 Length 2 2 Length of this s tructure in by tes.
Extensible Firmware Interface Specifi cation 128 12/12/00 Version 1.02 5.3.4.11 InfiniBand † Devi ce Path Table 5-19. InfiniBand † Device Pat h Mnemonic Byte Offset Byte Length Description Type 0 .
Device Path Protoc ol Version 1.02 12/12/00 129 5.3.4.13 Vendor-Defined Messagin g Device P ath Table 5-21. Vendor-Defined Me ssaging Devi ce Path Mnemonic Byte Offset Byte Length Description Type 0 1 Type 3 – Messagi ng Devi ce Pat h Sub-Type 1 1 Sub-Type 10 – Vendor Length 2 2 Length of this s tructure in by tes.
Extensible Firmware Interface Specifi cation 130 12/12/00 Version 1.02 Table 5-2 2. Hard D rive Medi a Device P ath Mnemonic Byte Offset Byte Length Description Type 0 1 Type 4 – Media De vice P ath Sub-Type 1 1 Sub-Type 1 – Hard Drive Length 2 2 Length of this s tructure in by tes.
Device Path Protoc ol Version 1.02 12/12/00 131 5.3.5.2 CD-ROM Media Device P ath The CD-ROM Media Dev ice Path is u sed to d efine a syste m partition that exis ts on a CD-ROM. The CD-ROM is assu med to conta in an ISO -9660 file syst em and fol low the CD-ROM “ El Torito ” format.
Extensible Firmware Interface Specifi cation 132 12/12/00 Version 1.02 5.3.5.4 File Path Media Device P ath Table 5-2 5. File Path Media De vice Path Mnemonic Byte Offset Byte Length Description Type 0 1 Type 4 – Media De vice P ath. Sub-Type 1 1 Sub-Type 4 – Fi le Path.
Device Path Protoc ol Version 1.02 12/12/00 133 5.3.6 BIOS Boot Specifica tion Device Path This Device Pat h is used to d escribe the booting o f non-EFI-aware op erating sy stems. This Dev ice Path is based on the IPL and BCV table entry d ata structu res defined in Appendix A of the BIOS Boot Specifi cation .
Extensible Firmware Interface Specifi cation 134 12/12/00 Version 1.02 Device Path structu re in the s tream. Any fu ture ad ditions t o the Device Pa th struc ture types wi ll always star t with the cu rrent standa rd heade r.
Device Path Protoc ol Version 1.02 12/12/00 135 5.4.3 Rules with ACPI _AD R If a dev ice in the AC PI name sp ace can b e comp letely desc ribed by a _A DR ob ject then i t will ma p to an EFI ACPI, Ha rdware, or Mess age Device Pat h structure. A _ADR me thod imp lies a bus wi th a standard en umeratio n algorit hm.
Extensible Firmware Interface Specifi cation 136 12/12/00 Version 1.02 5.4.5 Media Device Path R ules The Media D evice Path i s used to de fine the lo cation of infor mation on a med ium. Hard Dr ives are subdivided in to parti tions by the MBR and a Medi a Device Path is used to de fine which pa rtition is being used.
Version 1.02 12/12/00 137 6 Device I/O Protocol This chap ter defines th e Device I/O protoco l. This protocol is used by code, typi cally driv ers, running in th e EFI boot services e nvironmen t to access memory a nd I/O.
Extensible Firmwar e Interface Specifi cation 138 12/12/00 Version 1.02 6.2 DEVICE_IO Protocol Summary Provides the b asic Mem ory, I/O, and PCI inte rfaces that are used to abstrac t accesses to devices.
Device I/O Pr otocol Version 1.02 12/12/00 139 Description The DEVICE_IO protoco l provides the basic Memory, I /O, and PCI in terfaces that a re used to abstract a ccesses to devices.
Extensible Firmwar e Interface Specifi cation 140 12/12/00 Version 1.02 Related Definitions //******************************************************* // EFI_IO_WIDTH //********************************.
Device I/O Pr otocol Version 1.02 12/12/00 141 6.2.1 DEVICE_IO.Mem(), .I o(), and .Pc i() Summary Enable a d river to ac cess dev ice regis ters in th e appropri ate memo ry or I /O space.
Extensible Firmwar e Interface Specifi cation 142 12/12/00 Version 1.02 Table 6-1. PCI Address Mnemonic Byte Offset Byte Length Description Register 0 1 The register n umber on the function. Function 1 1 The function on the dev ice. Device 2 1 T he de vice o n the bu s.
Device I/O Pr otocol Version 1.02 12/12/00 143 6.2.2 DEVICE_IO.PciDev icePath() Summary Provides an EFI D evice Pa th for a PC I device wi th the given PC I config uration sp ace address.
Extensible Firmwar e Interface Specifi cation 144 12/12/00 Version 1.02 6.2.3 DEVICE_IO.Map() Summary Provides the d evice sp ecific a ddresses ne eded to a ccess syst em memo ry.
Device I/O Pr otocol Version 1.02 12/12/00 145 Related Definitions //******************************************************* // EFI_IO_OPERATION_TYPE //************************************************.
Extensible Firmwar e Interface Specifi cation 146 12/12/00 Version 1.02 6.2.4 DEVICE_IO.Unmap() Summary Complete s the Map() op eration and releases any corresp onding resou rces.
Device I/O Pr otocol Version 1.02 12/12/00 147 6.2.5 DEVICE_IO.Allocate Buffer() Summary Allocate s pages that are su itable fo r an EFIBusMasterCommonBuffer map ping.
Extensible Firmwar e Interface Specifi cation 148 12/12/00 Version 1.02 Allocation reque sts of Type AllocateMaxAddress will allocat e any avail able range o f pages that sati sfies the reques t that are below or e qual to the value po inted to by HostAddress on input.
Device I/O Pr otocol Version 1.02 12/12/00 149 6.2.6 DEVICE_IO.Flush() Summary Flushes an y posted w rite data to the device. Prototype typedef EFI_STATUS (EFIAPI *EFI_IO_FLUSH) ( IN EFI_DEVICE_IO_INTERFACE *This ); Parameters This A pointer to the EFI_DEVICE_IO_INTERFACE instance.
Extensible Firmwar e Interface Specifi cation 150 12/12/00 Version 1.02 6.2.7 DEVICE_IO.FreeBuff er() Summary Frees pages t hat were allocated with AllocateBuffer() .
Version 1.02 12/12/00 151 7 Console I/O Protocol This chap ter defines th e Console I/O protoco l. This protocol is used to h andle input and outpu t of text-based informa tion in tended for the system user durin g the ope ration of code in t he EFI boo t service s environment.
Extensible Firmwar e Interface Specifi cation 152 12/12/00 Version 1.02 7.2 ConsoleIn Definiti on The SIMPLE_INPUT protoco l defines an i nput strea m that con tains Unicod e characte rs and require d EFI scan code s. Only the con trol c haracters de fined in Table 7-1 hav e meaning in the Unicode inp ut or outpu t stream s.
Console I/O Protocol Version 1.02 12/12/00 153 Table 7-2. EFI Scan Cod es for SIMPLE_IN PUT_INTERF ACE ( 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.
Extensible Firmwar e Interface Specifi cation 154 12/12/00 Version 1.02 7.3 SIMPLE_INPUT Pr otocol Summary This protoco l is used to obtain inpu t fro m the ConsoleIn device.
Console I/O Protocol Version 1.02 12/12/00 155 7.3.1 SIMPLE_INPUT.Rese t() Summary Resets the in put dev ice hardware. Prototype EFI_STATUS (EFIAPI *EFI_INPUT_RESET) ( IN SIMPLE_INPUT_INTERFACE *This, IN BOOLEAN ExtendedVerification ); Parameters This A pointer to the SIMPLE_INPUT_INTERFACE instance.
Extensible Firmwar e Interface Specifi cation 156 12/12/00 Version 1.02 7.3.2 SIMPLE_INPUT.Read KeyStroke Summary Reads the n ext keystro ke from the i nput device. Prototype EFI_STATUS (EFIAPI *EFI_INPUT_READ_KEY) ( IN SIMPLE_INPUT_INTERFACE *This , OUT EFI_INPUT_KEY *Key ); Parameters This A pointer to the SIMPLE_INPUT_INTERFACE instance.
Console I/O Protocol Version 1.02 12/12/00 157 7.4 ConsoleOut or Standar dError The SIMPLE_TEXT_OUTPUT protoco l must imp lement th e same Unicod e code pag es as the SIMPLE_INPUT protocol. The protoco l must al so support t he Unicode con trol ch aracters defined in Tab le 7-1.
Extensible Firmwar e Interface Specifi cation 158 12/12/00 Version 1.02 SetAttribute Sets the for eground and ba ckground colo r of the te xt tha t is output. See Section 7.5.6. ClearScreen Clears the s creen with th e currently set backg round color.
Console I/O Protocol Version 1.02 12/12/00 159 Description The SIMPLE_TEXT_OUTPUT protoco l is used to con trol text-based output d evices. It is the minimum requi red protoco l for any hand le supp lied as the ConsoleOut or StandardError device. In add ition, the minimu m supported text mode o f such devi ces is at least 80 x 25 characters .
Extensible Firmwar e Interface Specifi cation 160 12/12/00 Version 1.02 7.5.1 SIMPLE_TEXT_OUT PUT.Reset() Summary Resets the t ext output d evice hardwa re. Prototype EFI_STATUS (EFIAPI *EFI_TEXT_RESET) ( IN SIMPLE_TEXT_OUTPUT_INTERFACE *This, IN BOOLEAN ExtendedVerification ); Parameters This A pointer to the SIMPLE_TEXT_OUTPUT_INTERFACE instance.
Console I/O Protocol Version 1.02 12/12/00 161 7.5.2 SIMPLE_TEXT_OUT PUT.Output String() Summary Writes a Un icode stri ng to the out put device. Prototype EFI_STATUS (EFIAPI *EFI_TEXT_STRING) ( IN SIMPLE_TEXT_OUTPUT_INTERFACE *This, IN CHAR16 *String ); Parameters This A pointer to the SIMPLE_TEXT_OUTPUT_INTERFACE instance.
Extensible Firmwar e Interface Specifi cation 162 12/12/00 Version 1.02 #define BOXDRAW_DOWN_LEFT_DOUBLE 0x2555 #define BOXDRAW_DOWN_DOUBLE_LEFT 0x2556 #define BOXDRAW_DOUBLE_DOWN_LEFT 0x2557 #define .
Console I/O Protocol Version 1.02 12/12/00 163 //******************************************************* // EFI Required Arrow shapes //******************************************************* #define ARROW_UP 0x2191 #define ARROW_DOWN 0x2193 Description The OutputString() function wr ites a Unicod e string to t he outpu t device.
Extensible Firmwar e Interface Specifi cation 164 12/12/00 Version 1.02 7.5.3 SIMPLE_TEXT_OUT PUT.TestStr ing() Summary Verifies th at all ch aracte rs in a Unico de string can be output to the target dev ice.
Console I/O Protocol Version 1.02 12/12/00 165 7.5.4 SIMPLE_TEXT_OUT PUT.Query Mode() Summary Returns info rmation for an av ailable t ext mode t hat the out put device (s) support s.
Extensible Firmwar e Interface Specifi cation 166 12/12/00 Version 1.02 7.5.5 SIMPLE_TEXT_OUT PUT.SetMod e() Summary Sets the output devi ce(s) to a specified mod e.
Console I/O Protocol Version 1.02 12/12/00 167 7.5.6 SIMPLE_TEXT_OUT PUT.SetAttri bute() Summary Sets the backgroun d and foreground colors for the OutputString() and ClearScreen() function s.
Extensible Firmwar e Interface Specifi cation 168 12/12/00 Version 1.02 #define EFI_BACKGROUND_BLACK 0x00 #define EFI_BACKGROUND_BLUE 0x10 #define EFI_BACKGROUND_GREEN 0x20 #define EFI_BACKGROUND_CYAN.
Console I/O Protocol Version 1.02 12/12/00 169 7.5.7 SIMPLE_TEXT_OUT PUT.ClearS creen() Summary Clears the ou tput dev ice(s) displ ay to th e current ly selected ba ckground co lor. Prototype EFI_STATUS (EFIAPI *EFI_TEXT_CLEAR_SCREEN) ( IN SIMPLE_TEXT_OUTPUT_INTERFACE *This ); Parameters This A pointer to the SIMPLE_TEXT_OUTPUT_INTERFACE instance.
Extensible Firmwar e Interface Specifi cation 170 12/12/00 Version 1.02 7.5.8 SIMPLE_TEXT_OUT PUT.SetCur sorPosition() Summary Sets the current coo rdinates o f the c ursor po sition.
Console I/O Protocol Version 1.02 12/12/00 171 7.5.9 SIMPLE_TEXT_OUT PUT.Enable Cursor() Summary Makes th e cursor vi sible or i nvisible. Prototype EFI_STATUS (EFIAPI *EFI_TEXT_ENABLE_CURSOR) ( IN SIMPLE_TEXT_OUTPUT_INTERFACE *This, IN BOOLEAN Visible ); Parameters This A pointer to the SIMPLE_TEXT_OUTPUT_INTERFACE instance.
Extensible Firmwar e Interface Specifi cation 172 12/12/00 Version 1.02.
Version 1.02 12/12/00 173 8 Block I/O Protocol This chap ter defines th e Block I /O protocol. T his pro tocol is u sed to abst ract mass storage dev ices to allow code running in the EFI boot services environmen t to acces s them w ithout sp ecific knowledge of th e type of device or c ontroller th at man ages the dev ice.
Extensible Firmwar e Interface Specifi cation 174 12/12/00 Version 1.02 Parameters Revision The revision to which the block IO inte rface adheres. All fu ture revisions must be backwards co mpatib le. If a fu ture vers ion is not back wards c ompatibl e it is not th e same GUID.
Block I/O Protocol Version 1.02 12/12/00 175 Related Definitions //******************************************************* // EFI_BLOCK_IO_MEDIA //*****************************************************.
Extensible Firmwar e Interface Specifi cation 176 12/12/00 Version 1.02 8.1.1 EFI_BLOCK_IO.Rese t() Summary Resets the bl ock device ha rdware. Prototype EFI_STATUS (EFIAPI *EFI_BLOCK_RESET) ( IN EFI_BLOCK_IO *This, IN BOOLEAN ExtendedVerification ); Parameters This Indicates a pointer to th e calling context.
Block I/O Protocol Version 1.02 12/12/00 177 8.1.2 EFI_BLOCK_IO.Read Blocks() Summary Reads the requested number of blocks from the device. Prototype EFI_STATUS (EFIAPI *EFI_BLOCK_READ) ( IN EFI_BLOCK_IO *This, IN UINT32 MediaId, IN EFI_LBA LBA, IN UINTN BufferSize, OUT VOID *Buffer ); Parameters This Indicates a pointer to th e calling context.
Extensible Firmwar e Interface Specifi cation 178 12/12/00 Version 1.02 Status Codes Return ed EFI_SUCCESS The data was re ad correctly from the devic e. EFI_DEVICE_ERRO R The dev ice reported an err or while at tempting to perf orm the read operation.
Block I/O Protocol Version 1.02 12/12/00 179 8.1.3 EFI_BLOCK_IO.Writ eBlocks() Summary Wr ites a spe cifi ed num ber of bl ocks to the de vic e. Prototype EFI_STATUS (EFIAPI *EFI_BLOCK_WRITE) ( IN EFI.
Extensible Firmwar e Interface Specifi cation 180 12/12/00 Version 1.02 Status Codes Return ed EFI_SUCCESS The data were writt en correctly to the dev ice. EFI_WRITE_PROTECTED The device cannot be written to . EFI_NO_MED IA There is no medi a in the dev ice.
Block I/O Protocol Version 1.02 12/12/00 181 8.1.4 BLOCK_IO.FlushBlo cks() Summary Flushes all mod ified data to a physical block devic e. Prototype EFI_STATUS (EFIAPI *EFI_BLOCK_FLUSH) ( IN EFI_BLOCK_IO *This ); Parameters This Indicates a pointer to th e calling context.
Extensible Firmwar e Interface Specifi cation 182 12/12/00 Version 1.02.
Version 1.02 12/12/00 183 9 Disk I/O Protocol This chap ter defines th e Disk I/O pro tocol. This protoco l is used to abs tract the bl ock accesse s of the Block I/O p rotocol to a more gene ral offse t-length p rotocol.
Extensible Firmwar e Interface Specifi cation 184 12/12/00 Version 1.02 Description The EFI_DISK_IO prot oc ol is use d to cont rol blo ck I /O int erf ace s. The disk I/O funct ions allow I/O ope rations that need not be on the unde rlying dev ice’s block boundaries or alignmen t requ irements.
Disk I/O Protocol Version 1.02 12/12/00 185 9.1.1 EFI_DISK_IO.ReadD isk() Summary Reads a spe cified nu mber of byte s fro m a device. Prototype EFI_STATUS (EFIAPI *EFI_DISK_READ) ( IN EFI_DISK_IO *This, IN UINT32 MediaId, IN UINT64 Offset, IN UINTN BufferSize, OUT VOID *Buffer ); Parameters This Indicates a pointer to th e calling context.
Extensible Firmwar e Interface Specifi cation 186 12/12/00 Version 1.02 9.1.2 EFI_DISK_IO.WriteD isk() Summary Writes a s pecified n umber o f bytes to a device.
Version 1.02 12/12/00 187 10 File System Protocol This chap ter defines th e File Sy stem pro tocol. This p rotocol allows code running in the EF I boot service s environment to obta in file ba sed acc ess to a dev ice.
Extensible Firmwar e Interface Specifi cation 188 12/12/00 Version 1.02 Description The Simple Fi le System protocol p rovides a m inimal interface fo r file-ty pe acce ss to a devi ce. This protocol is only supp orted on so me devic es. Devices th at support the Simpl e File Syst em pro tocol retu rn an EFI_FILE_IO_INTERFACE .
File System Protocol Version 1.02 12/12/00 189 10.1.1 EFI_FILE_IO_INTERF ACE.Open Volume() Summary Opens the root d irectory on a volume. Prototype typedef EFI_STATUS (EFIAPI *EFI_VOLUME_OPEN) ( IN EFI_FILE_IO_INTERFACE *This, OUT EFI_FILE **Root ); Parameters This A pointer to the volu me to open th e root d irectory of.
Extensible Firmwar e Interface Specifi cation 190 12/12/00 Version 1.02 10.2 EFI_FILE Pr otocol Summary Provides file based acc ess to supported file systems.
File System Protocol Version 1.02 12/12/00 191 Description The EFI_FILE provide s file IO acce ss to su pported file systems. An EFI_FILE provides access to a file ’ s or di rec tor y ’ s contents, and is also a referen ce to a locatio n in the di rectory tree of the fi le system in which the file resides.
Extensible Firmwar e Interface Specifi cation 192 12/12/00 Version 1.02 10.2.1 EFI_FILE.Open() Summary Opens a n ew file relativ e to the source fi le ’ s l ocatio n.
File System Protocol Version 1.02 12/12/00 193 Related Definitions //******************************************************* // Open Modes //******************************************************* #de.
Extensible Firmwar e Interface Specifi cation 194 12/12/00 Version 1.02 Status Codes Return ed EFI_SUCCESS The file was o pened. EFI_NOT_FOUN D The specifi ed file cou ld not be fo und on the d evice. EFI_NO_MEDIA The devic e has no medium . EFI_MEDIA_CH ANGED The device has a d ifferent med ium in it or the m edium is no longer suppor ted.
File System Protocol Version 1.02 12/12/00 195 10.2.2 EFI_FILE.Close() Summary Closes a spec ified file handle. Prototype EFI_STATUS (EFIAPI *EFI_FILE_CLOSE) ( IN EFI_FILE *This ); Parameters This A pointer to the EFI_FILE instance that is the file hand le to close.
Extensible Firmwar e Interface Specifi cation 196 12/12/00 Version 1.02 10.2.3 EFI_FILE.Delete() Summary Closes and d eletes a file. Prototype EFI_STATUS (EFIAPI *EFI_FILE_DELETE) ( IN EFI_FILE *This ); Parameters This A pointer to the EFI_FILE instance th at is the h andle t o the fil e to delete.
File System Protocol Version 1.02 12/12/00 197 10.2.4 EFI_FILE.Read() Summary Reads data from a file . Prototype EFI_STATUS (EFIAPI *EFI_FILE_READ) ( IN EFI_FILE *This, IN OUT UINTN *BufferSize, OUT VOID *Buffer ); Parameters This A pointer to the EFI_FILE instance th at is the file hand le to re ad data from.
Extensible Firmwar e Interface Specifi cation 198 12/12/00 Version 1.02 10.2.5 EFI_FILE.Write() Summary Writes da ta to a fi le. EFI_STATUS (EFIAPI *EFI_FILE_WRITE) ( IN EFI_FILE *This, IN OUT UINTN *BufferSize, IN VOID *Buffer ); Parameters This A pointer to the EFI_FILE instance that is the file hand le to write data to.
File System Protocol Version 1.02 12/12/00 199 10.2.6 EFI_FILE.Set Position() Summary Sets a file ’ s cur rent position. Prototype EFI_STATUS (EFIAPI *EFI_FILE_SET_POSITION) ( IN EFI_FILE *This, IN UINT64 Position ); Parameters This A pointer to the EFI_FILE instance that is the he file handle to set the requested pos ition on.
Extensible Firmwar e Interface Specifi cation 200 12/12/00 Version 1.02 10.2.7 EFI_FILE.Get Position() Summary Return s a file ’ s current position. Prototype EFI_STATUS (EFIAPI *EFI_GET_POSITION) (.
File System Protocol Version 1.02 12/12/00 201 10.2.8 EFI_FILE.GetInfo() Summary Returns in format ion about a f ile. Prototype EFI_STATUS (EFIAPI *EFI_FILE_GET_INFO) ( IN EFI_FILE *This, IN EFI_GUID .
Extensible Firmwar e Interface Specifi cation 202 12/12/00 Version 1.02 10.2.9 EFI_FILE.SetInfo() Summary Sets infor mation about a file. Prototype EFI_STATUS (EFIAPI *EFI_FILE_SET_INFO) ( IN EFI_FILE.
File System Protocol Version 1.02 12/12/00 203 10.2.10 EFI_FILE.Flush() Summary Flushes a ll modif ied data ass ociated wi th a file to a device. Prototype EFI_STATUS (EFIAPI *EFI_FILE_FLUSH) ( IN EFI_FILE *This ); Parameters This A pointer to the EFI_FILE instance that is the file hand le to flush.
Extensible Firmwar e Interface Specifi cation 204 12/12/00 Version 1.02 10.2.11 EFI_FILE_INFO Summary Provides a GUID and a data str ucture tha t can be used w ith EFI_FILE.
File System Protocol Version 1.02 12/12/00 205 ModificationTime The ti me when th e file ’ s con tents w ere last modified. Attribute The attribu te bits fo r the file . See “ Relat ed Definition s ” . FileName The Null-terminat ed Unicode na me of the f ile.
Extensible Firmwar e Interface Specifi cation 206 12/12/00 Version 1.02 10.2.12 EFI_FILE_SYSTEM_ INFO Summary Provides a GUID and a data str ucture tha t can be used w ith EFI_FILE.GetInfo() to get informat ion abou t the system volume, and EFI_FILE.SetInfo() to se t the sy stem v olume ’ s volume label.
File System Protocol Version 1.02 12/12/00 207 10.2.13 EFI_FILE_SYSTEM_ VOLUME_L ABEL Summary Provides a GUID and a data str ucture tha t can be used w ith EFI_FILE.GetInfo() or EFI_FILE.SetInfo() to get or set informa tion abou t the sys tem ’ s vol um e l abel .
Extensible Firmwar e Interface Specifi cation 208 12/12/00 Version 1.02.
Version 1.02 12/12/00 209 11 Load File Protocol This chap ter defines th e Load Fi le protocol. This protoc ol is desi gned to all ow code running in the EFI boot se rvices env ironment to find and load other modules of c ode. 11.1 LOAD_FILE Protocol Summary Is used to ob tain file s from ar bitrary d evices.
Extensible Firmwar e Interface Specifi cation 210 12/12/00 Version 1.02 11.1.1 LOAD_FILE.LoadFile () Summary Causes the drive r to load a spec ified file.
Load File Protocol Version 1.02 12/12/00 211 If BootPolicy is FALSE the FilePath must match an e xact file t o be load ed. If no such file exists, EFI_NOT_FOUND is retu rned. If BootPolicy is FALSE , and an at tempt is b eing m ade to perform a network boo t throug h the PXE Base Code p rotocol, EFI_UNSUPPORTED is returned.
Extensible Firmwar e Interface Specifi cation 212 12/12/00 Version 1.02.
Version 1.02 12/12/00 213 12 Serial I/O Protocol This chap ter defines th e Seria l I/O protocol. This protoc ol is u sed to abst ract byte st ream dev ices. 12.1 SERIAL_IO Protocol Summary This protoco l is used to communic ate with any type of char acter-ba sed I/O devi ce.
Extensible Firmwar e Interface Specifi cation 214 12/12/00 Version 1.02 SetControl Set the cont rol bits on a serial d evice. These includ e Request to Send and Data T erminal R eady. GetControl Read the stat us of the con trol b its on a seria l device.
Serial I/O Protocol Version 1.02 12/12/00 215 Parity If applicab le, this is the EFI_PARITY_TYPE that is computed or checked as each charac ter is t ransmit ted or rece ived. If t he device does not su pport pari ty the valu e is th e defau lt parity value.
Extensible Firmwar e Interface Specifi cation 216 12/12/00 Version 1.02 The default a ttributes fo r all UART-style serial de vice inte rfaces ar e: 115,200 baud, a 1 byte receive F IFO, a 1,000,000 m icrosecond ti meout p er charac ter, no pari ty, 8 data b its, and 1 stop bit.
Serial I/O Protocol Version 1.02 12/12/00 217 12.1.1 SERIAL_IO.Reset() Summary Resets th e serial d evice. Prototype EFI_STATUS (EFIAPI *EFI_SERIAL_RESET) ( IN SERIAL_IO_INTERFACE *This ); Parameters This A pointer to the SERIAL_IO_INTERFACE instance.
Extensible Firmwar e Interface Specifi cation 218 12/12/00 Version 1.02 12.1.2 SERIAL_IO.SetAttrib utes() Summary Sets the b aud rate, rece ive FIFO dep th, transmi t/receive t ime out, pa rity, data bits, and s top bits on a serial dev ice.
Serial I/O Protocol Version 1.02 12/12/00 219 Description The SetAttributes() funct ion sets th e baud rate, r eceive-FI FO depth, tran smit/r eceive ti me out, parity, d ata bits, and stop bi ts on a seri al device. The contro ller for a serial de vice is p rogramme d with th e specifi ed attrib utes.
Extensible Firmwar e Interface Specifi cation 220 12/12/00 Version 1.02 12.1.3 SERIAL_IO.SetContr ol() Summary Sets the cont rol bits o n a seri al device. Prototype EFI_STATUS (EFIAPI *EFI_SERIAL_SET_CONTROL) ( IN SERIAL_IO_INTERFACE *This, IN UINT32 Control ); Parameters This A pointer to the SERIAL_IO_INTERFACE instance.
Serial I/O Protocol Version 1.02 12/12/00 221 Only th e REQUEST_TO_SEND , DATA_TERMINAL_READY , HARDWARE_LOOPBACK_ENABLE , SOFTWARE_LOOPBACK_ENABLE , and HARDWARE_FLOW_CONTROL_ENABLE bits can be set with SetControl() . A ll the b its can be read w ith GetControl() .
Extensible Firmwar e Interface Specifi cation 222 12/12/00 Version 1.02 12.1.4 SERIAL_IO.GetContr ol() Summary Retrieves t he status o f the cont rol bits on a serial d evice. Prototype EFI_STATUS (EFIAPI *EFI_SERIAL_GET_CONTROL) ( IN SERIAL_IO_INTERFACE *This, OUT UINT32 *Control ); Parameters This A pointer to the SERIAL_IO_INTERFACE instance.
Serial I/O Protocol Version 1.02 12/12/00 223 12.1.5 SERIAL_IO.Write() Summary Writes da ta to a ser ial device. Prototype EFI_STATUS (EFIAPI *EFI_SERIAL_WRITE) ( IN SERIAL_IO_INTERFACE *This, IN OUT UINTN *BufferSize, IN VOID *Buffer ); Parameters This A pointer to the SERIAL_IO_INTERFACE instance.
Extensible Firmwar e Interface Specifi cation 224 12/12/00 Version 1.02 12.1.6 SERIAL_IO.Read() Summary Reads data from a se rial de vice. Prototype EFI_STATUS (EFIAPI *EFI_SERIAL_READ) ( IN SERIAL_IO_INTERFACE *This, IN OUT UINTN *BufferSize, OUT VOID *Buffer ); Parameters This A pointer to the SERIAL_IO_INTERFACE instance.
Version 1.02 12/12/00 225 13 Unicode Collation Protocol This chap ter defines th e Unicode Coll ation prot ocol. This proto col is used to allow code running in the boot s ervices en viron ment to per form lex ical compa rison func tions on Unico de string s for given languages.
Extensible Firmwar e Interface Specifi cation 226 12/12/00 Version 1.02 StrUpr Converts all the Unicode cha racters in a Null-t erminated Unicode stri ng to upper ca se Unicod e characte rs. See Section 13.1.4 . FatToStr Converts an 8.3 FAT fi le name usi ng an OEM ch aracter set to a Null-term inated Unico de string.
Unicode Collation Protocol Version 1.02 12/12/00 227 13.1.1 UNICODE_COLLATI ON.StriColl() Summary Performs a case-inse nsitive co mpar ison of tw o Null-term inated U nicode st rings.
Extensible Firmwar e Interface Specifi cation 228 12/12/00 Version 1.02 13.1.2 UNICODE_COLLATI ON.MetaiMat ch() Summary Performs a case-inse nsitive co mparison of a Null-t erminat ed Unicode pat tern string and a Nu ll- terminated Uni code stri ng.
Unicode Collation Protocol Version 1.02 12/12/00 229 Examples pa tterns (fo r English ): *.FW Matches al l strings tha t end in “ .FW ” or “ .fw ” or “ .Fw ” or “ .fW ” . [a-z] Match any lett er in the a lphabet. [!@#$%^ &*()] Match a ny on e of the se sy mbol s.
Extensible Firmwar e Interface Specifi cation 230 12/12/00 Version 1.02 13.1.3 UNICODE_COLLATI ON.StrLwr() Summary Converts all the Unicode cha racters in a Null-ter minated Unicod e string to lower case Un icode characters .
Unicode Collation Protocol Version 1.02 12/12/00 231 13.1.4 UNICODE_COLLATI ON.StrUpr() Summary Converts all the Unicode cha racters in a Null-ter minated Un icode string t o upper case Un icode characters .
Extensible Firmwar e Interface Specifi cation 232 12/12/00 Version 1.02 13.1.5 UNICODE_COLLATI ON.FatToStr() Summary Converts an 8.3 FAT f ile name in a n OEM char acter set to a Null-term inated Unicod e string.
Unicode Collation Protocol Version 1.02 12/12/00 233 13.1.6 UNICODE_COLLATI ON.StrToFat() Summary Converts a Null -terminat ed Unicode strin g to leg al charac ters in a FAT fil ename usin g an OEM character set.
Extensible Firmwar e Interface Specifi cation 234 12/12/00 Version 1.02.
Version 1.02 12/12/00 235 14 PXE Base Code Protocol This chap ter defines th e Preboot Exec ution Env ironment (PXE) Ba se Code pro tocol, which is used to access PXE-co mpat ible devices f or network ac cess and netwo rk booting.
Extensible Firmwar e Interface Specifi cation 236 12/12/00 Version 1.02 Parameters Revision The re visi on of the EFI_PXE_BASE_CODE Protocol. All future revisions must be backw ards co mpatib le. If a f uture version is no t backwa rds compat ible it is no t the same GUID.
PXE Base Code Protocol Version 1.02 12/12/00 237 Related Definitions //******************************************************* // Maximum ARP and Route Entries //**************************************.
Extensible Firmwar e Interface Specifi cation 238 12/12/00 Version 1.02 EFI_PXE_BASE_CODE_ARP_ENTRY ArpCache[ EFI_PXE_BASE_CODE_MAX_ARP_ENTRIES ]; UINT32 RouteTableEntries; EFI_PXE_BASE_CODE_ROUTE_ENT.
PXE Base Code Protocol Version 1.02 12/12/00 239 ProxyOfferReceived This field is ini tialized to FALSE by t he Start() function and set to TRUE when th e Dhcp() function c omple tes succes sfully and a proxy DHCP offe r packet was received. W hen TRUE , the ProxyOffer packet field is va lid.
Extensible Firmwar e Interface Specifi cation 240 12/12/00 Version 1.02 StationIp The device ’ s curren t IP addr ess. This f ield is in itializ ed to a z ero address by Start() . This field is se t when th e Dhcp() function co mpletes su ccessf ully.
PXE Base Code Protocol Version 1.02 12/12/00 241 RouteTableEntries The number of v alid entr ies in the curren t route table . This fie ld is reset t o zero by the Start() f uncti on. RouteTable Array of rout e table en tries. IcmpError ICMP error pa cket.
Extensible Firmwar e Interface Specifi cation 242 12/12/00 Version 1.02 //******************************************************* // This section defines the data types for DHCP packets, ICMP // error packets, and TFTP error packets. All of these are byte // packed data structures.
PXE Base Code Protocol Version 1.02 12/12/00 243 //******************************************************* // EFI_PXE_BASE_CODE_ICMP_ERROR //******************************************************* typ.
Extensible Firmwar e Interface Specifi cation 244 12/12/00 Version 1.02 //******************************************************* // This section defines the data types for ARP cache entries, // and route table entries.
PXE Base Code Protocol Version 1.02 12/12/00 245 //******************************************************* // The following table defines values for the PXE DHCP and // Bootserver Discover packet tags that are specific to the EFI // environment.
Extensible Firmwar e Interface Specifi cation 246 12/12/00 Version 1.02 Description The basic me chanis ms and flow fo r remote booting in EF I are i dentical to the remote boo t function ality descr ibed in detail in the PXE Specification .
PXE Base Code Protocol Version 1.02 12/12/00 247 14.1.1 EFI_PXE_BASE_CO DE.Start() Summary Enables the us e of the PXE Base Co de Protocol functions. Prototype EFI_STATUS (EFIAPI *EFI_PXE_BASE_CODE_START) ( IN EFI_PXE_BASE_CODE *This, IN BOOLEAN UseIpv6 ); Parameters This Pointer to the EFI_PXE_BASE_CODE insta nce.
Extensible Firmwar e Interface Specifi cation 248 12/12/00 Version 1.02 ToS Set to DEFAULT_ToS . DhcpCompleted Set to FALSE . ProxyOfferReceived Set to FALSE . StationIp Set to an addr ess of all zeros. SubnetMask Set to a subne t mask of a ll ze ros.
PXE Base Code Protocol Version 1.02 12/12/00 249 Status Codes Return ed EFI_SUCCESS The PXE Base Code Protocol was starte d. EFI_INVALID_PARAMETER One of the par ameters is not valid. EFI_UNSUPPORTED UseIpv6 is TRUE , but the Ipv6Supported f ield of the EFI_BASE_CODE_MODE struct ure is FALSE .
Extensible Firmwar e Interface Specifi cation 250 12/12/00 Version 1.02 14.1.2 EFI_PXE_BASE_CO DE.Stop() Summary Disables the use of the PXE Bas e Code Protoco l functions. Prototype EFI_STATUS (EFIAPI *EFI_PXE_BASE_CODE_STOP) ( IN EFI_PXE_BASE_CODE *This ); Parameters This Pointer to the EFI_PXE_BASE_CODE insta nce.
PXE Base Code Protocol Version 1.02 12/12/00 251 14.1.3 EFI_PXE_BASE_CO DE.Dhcp() Summary Attempts t o complet e a DHCPv4 D.O.R.A. (discov er / offer / r equest / a cknowledg e) or DHCPv6 S.
Extensible Firmwar e Interface Specifi cation 252 12/12/00 Version 1.02 Status Codes Return ed EFI_SUCCESS Valid DHCP has comp leted. EFI_NOT_STARTED The PXE Base Code Pro tocol is i n the stopped s tate. EFI_INVALID_PARAMETER One of the par ameters is not valid.
PXE Base Code Protocol Version 1.02 12/12/00 253 14.1.4 EFI_PXE_BASE_CO DE.Discov er() Summary Attempts t o complet e the PXE Boot Serv er and/or b oot im age discov ery sequence.
Extensible Firmwar e Interface Specifi cation 254 12/12/00 Version 1.02 Related Definitions //******************************************************* // Bootstrap Types //*****************************.
PXE Base Code Protocol Version 1.02 12/12/00 255 //******************************************************* // EFI_PXE_BASE_CODE_DISCOVER_INFO //******************************************************* .
Extensible Firmwar e Interface Specifi cation 256 12/12/00 Version 1.02 Description This func tion attem pts to comple te the PXE Boo t Server and /or boo t imag e discovery sequ ence.
PXE Base Code Protocol Version 1.02 12/12/00 257 14.1.5 EFI_PXE_BASE_CO DE.Mtftp() Summary Used to perfo rm TFTP and M TFTP serv ices. Prototype EFI_STATUS (EFIAPI *EFI_PXE_BASE_CODE_MTFTP) ( IN EFI_P.
Extensible Firmwar e Interface Specifi cation 258 12/12/00 Version 1.02 Info Pointer to the MTFTP informa tion. This information is requ ired to start or join a multic ast TFTP ses sion. It is a lso requir ed to pe rform th e “ get file size ” and “ read d irecto ry ” ope rations of MTFTP.
PXE Base Code Protocol Version 1.02 12/12/00 259 MCastIp File mult icast IP addre ss. This is the IP address to whic h the server will send th e requested file. CPort Client multicas t listen ing port. Th is is th e UDP por t to whic h the server will send th e requested file.
Extensible Firmwar e Interface Specifi cation 260 12/12/00 Version 1.02 The format o f the da ta return ed from a TFTP read direct ory opera tion i s a null-te rminat ed filena me followed by a nu ll-ter minate d info rmation s tring, of the form “ siz e year-mo nth-day hour:minu te:second ” (i.
PXE Base Code Protocol Version 1.02 12/12/00 261 14.1.6 EFI_PXE_BASE_CO DE.UdpWrit e() Summary Writes a UD P pack et to the ne twork int erface. Prototype EFI_STATUS (EFIAPI *EFI_PXE_BASE_CODE_UDP_WRI.
Extensible Firmwar e Interface Specifi cation 262 12/12/00 Version 1.02 HeaderPtr If HeaderSize is no t NULL , a pointe r to a he ader to be p repended to the data at BufferPtr . BufferSize A pointer to the size of the data a t BufferPtr . BufferPtr A pointer to the data to be w ritten.
PXE Base Code Protocol Version 1.02 12/12/00 263 14.1.7 EFI_PXE_BASE_CO DE.UdpRea d() Summary Reads a UDP packet f rom the ne twork in terfa ce. Prototype EFI_STATUS (EFIAPI *EFI_PXE_BASE_CODE_UDP_REA.
Extensible Firmwar e Interface Specifi cation 264 12/12/00 Version 1.02 Description This functio n reads a UDP pack et from a netwo rk interface . The dat a contents a re return ed in (the optional HeaderPtr and ) BufferPtr , and the si ze of the bu ffer r eceived is retur ned in BufferSize .
PXE Base Code Protocol Version 1.02 12/12/00 265 Table 14-4. Sourc e IP Filter Op eration OpFlags ANY_SRC_IP SrcIp Action 0 NULL Re turn EFI_INVALID_PARAMETER . 1 NULL Receive a pac ket sent fr om any IP addres s. 0 not NULL Receiv e a packet whos e source IP address matches SrcIp .
Extensible Firmwar e Interface Specifi cation 266 12/12/00 Version 1.02 14.1.8 EFI_PXE_BASE_CO DE.SetIpFil ter() Summary Updates th e IP receiv e filters o f a network dev ice and enab les sof tware filterin g.
PXE Base Code Protocol Version 1.02 12/12/00 267 14.1.9 EFI_PXE_BASE_CO DE.Arp() Summary Uses the ARP protoc ol to reso lve a MAC ad dress. Prototype EFI_STATUS (EFIAPI *EFI_PXE_BASE_CODE_ARP) ( IN EFI_PXE_BASE_CODE *This, IN EFI_IP_ADDRESS *IpAddr, IN EFI_MAC_ADDRESS *MacAddr OPTIONAL ); Parameters This Pointer to the EFI_PXE_BASE_CODE insta nce.
Extensible Firmwar e Interface Specifi cation 268 12/12/00 Version 1.02 14.1.10 EFI_PXE_BASE_CO DE.SetPar ameters() Summary Updates th e paramet ers that affect th e operation of the PXE Base Cod e Protoco l.
PXE Base Code Protocol Version 1.02 12/12/00 269 Description This functio n sets p arameter s that af fect the o peration of the PXE Base Code P rotocol. The parame ter speci fied by NewAutoArp is used to con trol the g eneration of ARP protocol packets.
Extensible Firmwar e Interface Specifi cation 270 12/12/00 Version 1.02 14.1.11 EFI_PXE_BASE_CO DE.SetStat ionIp() Summary Updates th e station IP ad dress a nd/or subne t mask value s of a n etwork devic e.
PXE Base Code Protocol Version 1.02 12/12/00 271 14.1.12 EFI_PXE_BASE_CO DE.SetPac kets() Summary Updates th e contents o f the c ached DHC P and Discov er packets.
Extensible Firmwar e Interface Specifi cation 272 12/12/00 Version 1.02 NewPxeBisReplyReceived If not NULL , a pointer to a value tha t specif ies wheth er to replace the curren t value of PxeBisReplyReceived field. If NULL , this para meter is ignored.
PXE Base Code Protocol Version 1.02 12/12/00 273 14.2 EFI_PXE_BASE_CODE_CALLBACK Protocol Summary This is a spe cific ins tance of th e PXE Base Code Call back Pro tocol that is invoked when the PXE Base Code Protoco l is about to transm it, has recei ved, or is wai ting to rece ive a packet.
Extensible Firmwar e Interface Specifi cation 274 12/12/00 Version 1.02 14.2.1 EFI_PXE_BASE_CO DE_CALLB ACK.Callback() Summary Callback function th at is invok ed when the PXE Base Code Proto col is abou t to tr ansmit, has received, or is waiting to rec eive a packe t.
PXE Base Code Protocol Version 1.02 12/12/00 275 Related Definitions //******************************************************* // EFI_PXE_BASE_CODE_CALLBACK_STATUS //**********************************.
Extensible Firmwar e Interface Specifi cation 276 12/12/00 Version 1.02.
Version 1.02 12/12/00 277 15 Simple Network Protocol This chap ter defines th e Simp le Network Pro tocol. This p rotocol pro vides a p acket level int erface to a netwo rk adapt er.
Extensible Firmwar e Interface Specifi cation 278 12/12/00 Version 1.02 Parameters Revision Revision of th e EFI_SIMPLE_NETWORK Protocol. All futu re revis ions must be backwa rds co mpatible. If a fu ture vers ion is not ba ckwards compatibl e it is no t the sa me GUID .
SIMPLE_NETWORK Protocol Version 1.02 12/12/00 279 Related Definitions //******************************************************* // EFI_SIMPLE_NETWORK_MODE // // Note that the fields in this data structure are read-only and // are updated by the code that produces the EFI_SIMPLE_NETWORK // protocol functions.
Extensible Firmwar e Interface Specifi cation 280 12/12/00 Version 1.02 State Reports t he current state of t he netw ork inte rface (se e EFI_SIMPLE_NETWORK_STATE below). When an EFI_SIMPLE_NETWORK driver has i nitiali zed a network interface, it is left in the EfiSimpleNetworkStopped stat e.
SIMPLE_NETWORK Protocol Version 1.02 12/12/00 281 MediaPresentSupported TRUE if the p resence of media can b e determ ined; o therwise FALSE . If FALSE , MediaPresent cannot be used. MediaPresent TRUE if med ia are connecte d to the network int erface;othe rwise FALSE .
Extensible Firmwar e Interface Specifi cation 282 12/12/00 Version 1.02 15.1.1 EFI_SIMPLE_NETWO R K . S tart() Summary Changes the state of a network interface from “ stopped ” “ sta rted ” . Prototype EFI_STATUS (EFIAPI *EFI_SIMPLE_NETWORK_START) ( IN EFI_SIMPLE_NETWORK *This ); Parameters This A pointer to the EFI_SIMPLE_NETWORK instance.
SIMPLE_NETWORK Protocol Version 1.02 12/12/00 283 15.1.2 EFI_SIMPLE_NETWO R K . S top() Summary Changes the state of a network interfac e from “ st arte d ” to “ stopp ed ” . Prototype EFI_STATUS (EFIAPI *EFI_SIMPLE_NETWORK_STOP) ( IN EFI_SIMPLE_NETWORK *This ); Parameters This A pointer to the EFI_SIMPLE_NETWORK instance.
Extensible Firmwar e Interface Specifi cation 284 12/12/00 Version 1.02 15.1.3 EFI_SIMPLE_NETWO R K . I nitializ e() Summary Resets a netwo rk adapter an d allo cates the trans mit and recei ve buffers requir ed by the netwo rk interface ; optio nally, als o reques ts alloca tion of add itional transmit and receiv e buffe rs.
SIMPLE_NETWORK Protocol Version 1.02 12/12/00 285 15.1.4 EFI_SIMPLE_NETW O R K . Reset() Summary Resets a n etwork ad apter an d re-initi alizes i t with th e parame ters that w ere p rovided in the prev ious call to Initialize() .
Extensible Firmwar e Interface Specifi cation 286 12/12/00 Version 1.02 15.1.5 EFI_SIMPLE_NETWO R K . S hutdo wn() Summary Resets a netwo rk adapter an d leave s it in a sta te that is sa fe for another drive r to in itialize.
SIMPLE_NETWORK Protocol Version 1.02 12/12/00 287 15.1.6 EFI_SIMPLE_NETWO R K . R eceiv eFilters() Summary Manages the mu lticast rec eive fil ters of a network inte rface.
Extensible Firmwar e Interface Specifi cation 288 12/12/00 Version 1.02 If ResetMCastFilter is TRUE , then the mu lticast rec eive filter li st on the network interface will be r eset to the defau lt mu lticast receiv e filter list.
SIMPLE_NETWORK Protocol Version 1.02 12/12/00 289 15.1.7 EFI_SIMPLE_NETWO R K . S tation Address() Summary Modifies o r resets the curren t station address, if supported.
Extensible Firmwar e Interface Specifi cation 290 12/12/00 Version 1.02 15.1.8 EFI_SIMPLE_NETWO R K . S tatisti cs() Summary Resets or collects the stat istics on a network interfac e.
SIMPLE_NETWORK Protocol Version 1.02 12/12/00 291 UINT64 RxDroppedFrames; UINT64 RxUnicastFrames; UINT64 RxBroadcastFrames; UINT64 RxMulticastFrames; UINT64 RxCrcErrorFrames; UINT64 RxTotalBytes; UINT.
Extensible Firmwar e Interface Specifi cation 292 12/12/00 Version 1.02 TxOversizeFrames Number of frames longe r than the maxminu m length for the media. This wou ld be gr eater than 1500 for eth ernet. TxDroppedFrames Valid fram es that were dropped b ecause rec eive buffe rs were full.
SIMPLE_NETWORK Protocol Version 1.02 12/12/00 293 15.1.9 EFI_SIMPLE_NETWO R K . M CastI PtoMAC() Summary Converts a mu lticast IP addre ss to a mu lticast HW MAC address.
Extensible Firmwar e Interface Specifi cation 294 12/12/00 Version 1.02 15.1.10 EFI_SIMPLE_NETWO R K .N vData () Summary Performs r ead and write ope ration s on the NVRAM devi ce attached to a network interface.
SIMPLE_NETWORK Protocol Version 1.02 12/12/00 295 Status Codes Return ed EFI_SUCCESS The NVRAM ac cess was performed. EFI_NOT_STARTED The network interfac e has not been s tarted. EFI_INVALID_PARAMETER One or m ore of the par ameters has an unsupporte d value.
Extensible Firmwar e Interface Specifi cation 296 12/12/00 Version 1.02 15.1.11 EFI_SIMPLE_NETWO R K .G etStat us() Summary Reads the cu rrent inte rrupt s tatus and recyc led trans mit buff er status from a ne twork in terface.
SIMPLE_NETWORK Protocol Version 1.02 12/12/00 297 Description This func tion ge ts the curr ent in terrupt an d recyc led trans mit buffe r status from the netwo rk interface. The int errupt statu s is re turned as a bit mask i n InterruptStatus . If InterruptStatus is NULL , the inte rrupt st atus will no t be read.
Extensible Firmwar e Interface Specifi cation 298 12/12/00 Version 1.02 15.1.12 EFI_SIMPLE_NETWO R K .T rans mit() Summary Places a p acket in t he transm it queue of a network interfac e.
SIMPLE_NETWORK Protocol Version 1.02 12/12/00 299 Description This functio n place s the packet specifie d by Header and Buffer on the transmi t queue. If HeaderSize is non-zero a nd HeaderSize is not equ al to This->Mode- >MediaHeaderSize , then EFI_INVALID_PARAMETER will be r eturned.
Extensible Firmwar e Interface Specifi cation 300 12/12/00 Version 1.02 15.1.13 EFI_SIMPLE_NETWO R K .R eceiv e() Summary Receives a packet from a ne twork int erface.
SIMPLE_NETWORK Protocol Version 1.02 12/12/00 301 Description This functio n retr ieves on e packet from the re ceive queue o f a netwo rk interf ace. If the re are no packets on th e rece ive queue, then EFI_NOT_READY will be returned.
Extensible Firmwar e Interface Specifi cation 302 12/12/00 Version 1.02 15.2 NETWORK_INTERFACE_IDENTIFI ER Protocol Summary This is an optional p rotocol th at is u sed to desc ribe de tails abou t the softwa re lay er that i s used to produce the Si mple Network P rotoco l.
SIMPLE_NETWORK Protocol Version 1.02 12/12/00 303 16-bit UNDI and 32/64-bi t S/W UNDI: Id contains th e addres s of the f irst byte o f the copy of the !PXE structure i n the r elocated UNDI code segment. See the Preboot Execution E nvironmen t (PXE) Sp ecification and Appendix G.
Extensible Firmwar e Interface Specifi cation 304 12/12/00 Version 1.02 MajorVer Major ve rsion nu mber. 16-bit UNDI: MajorVer comes fro m the th ird byte o f the UNDIRev field in the UNDI ROM ID structu re. Refe r to th e Preboot Executi on Environment (PXE) Specification .
Version 1.02 12/12/00 305 16 File System Format The file sys tem suppor ted by the Ext ensible Fir mware Inter face is based o n the FAT f ile syste m.
Extensible Firmwar e Interface Specifi cation 306 12/12/00 Version 1.02 16.1.1 File System Format The first b lock (secto r) of a partition co ntains a data st ructure ca lled th e BIOS Parame ter Block, BPB, that define s the type an d location of FAT fi le system on the driv e.
File System F ormat Version 1.02 12/12/00 307 This direct ory contain s EFI image s that aid e in rec overy if th e boot sel ections fo r the so ftware installed on the EFI sys tem part ition are ever lost. Any addition al EFI execut ables mus t be in sub directori es below the v endor sub di rectory.
Extensible Firmwar e Interface Specifi cation 308 12/12/00 Version 1.02 16.2 Partition D iscovery EFI requi res the fi rmware to be ab le to pars e legacy master bo ot records , the new GUID Pa rtitio n Table (GPT), and El Torito log ical devic e volumes.
File System F ormat Version 1.02 12/12/00 309 EFI supports t he nesting o f legacy MBR par titions, by al lowing any leg acy MBR parti tion to contain mo re legacy MBR pa rtition s. This is accompl ished by suppo rting the same pa rtition discovery al gorithm o n every logical block d evice.
Extensible Firmwar e Interface Specifi cation 310 12/12/00 Version 1.02 Partition En try array is the P artitionEnt rySize mu ltiplied b y NumberO fPartitionEntri es.
File System F ormat Version 1.02 12/12/00 311 Table 16-1. GUID Partition Table Header Mnemonic Byte Offset Byte Length Description Signature 0 8 Identifies EFI-compat ible partiti on table he ader. This value mus t contain t he string “EFI PAR T”, 0x545241502 049464 5.
Extensible Firmwar e Interface Specifi cation 312 12/12/00 Version 1.02 If the GUID Part ition Tabl e is the pr imary ta ble, stored at LBA 1: • Check the A lterna teLBA to see if it is a valid GUID.
File System F ormat Version 1.02 12/12/00 313 The SizeOfPa rtitionEn try variab le in the G UID Part ition Tabl e Header d efines th e size of a G UID Partition E ntry.
Extensible Firmwar e Interface Specifi cation 314 12/12/00 Version 1.02 16.2.2 ISO-9660 and El Torito IS0-9660 is the industry standard low level format used on CD-ROM and DVD-ROM. CD-ROM format is co mpletely d escrib ed by the “ El T orito ” Bootable CD-ROM Fo rmat S pecificatio n Version 1.
File System F ormat Version 1.02 12/12/00 315 Table 16- 5. Legacy Master Boo t Reco rd Mnemonic Byte Offset Byte Length Description BootCode 0 440 Code us ed on legac y Intel arc hitecture system to sel ect a partition rec ord and loa d the first b lock (sec tor) of the partition poi nted to by th e partit ion record.
Extensible Firmwar e Interface Specifi cation 316 12/12/00 Version 1.02 Table 16- 6. Legacy Master Bo ot Reco rd Pa rtition Reco rd (c ontinu ed) Mnemonic Byte Offset Byte Length Description End Track 7 1 End of partition in CH S address , not used by EFI firmware.
File System F ormat Version 1.02 12/12/00 317 16.3 Media Formats This section descr ibes how booting from diffe rent types of removab le media is handled. In general the rules a re cons istent reg ardle ss of a med ia ’ s physical typ e and whether it is removab le or not.
Extensible Firmwar e Interface Specifi cation 318 12/12/00 Version 1.02 16.3.4 CD-ROM and DVD-RO M A CD-ROM or DVD-ROM may contain multiple partitions as defined Sec tions 16.1 and 16.2 an d in the “ El To ri to ” specifica tion. EFI code does not assume a fixed block size.
Version 1.02 12/12/00 319 17 Boot Manager The EFI boot manager i s a firmware po licy engin e that c an be config ured by modifying architect urally de fined globa l NVRAM variable s. The boot ma nager will attempt to load EF I drivers and EF I appli cations (inc luding EFI OS boo t loade rs) in an or der defined by the globa l NVRAM variables.
Extensible Firmwar e Interface Specifi cation 320 12/12/00 Version 1.02 Programma tic inte ractio n with the boo t mana ger is acco mplished through g lobally defin ed variables. On initial ization the bo ot man ager reads the valu es which compri se al l of the published load options among the EFI environ ment var iables.
Boot Manager Version 1.02 12/12/00 321 and fixed media types. This sea rch occurs when the device path of the boot image list ed in any boot option point s directly to a SIMPLE_FILE_SYSTEM device and do es not s pecify the exact file to load.
Extensible Firmwar e Interface Specifi cation 322 12/12/00 Version 1.02 FilePathList A packed array o f EFI dev ice paths. The first e lement of the array is an EFI device pat h that d escrib es the devi ce and loca tion of the Image for this load op tion.
Boot Manager Version 1.02 12/12/00 323 17.2 Globally-Defined Vari ables This section defines a set of v ariables that have a rchitectu rally defined mean ings. In a ddition to the defined data conten t, each such va riable ha s an archite ctural ly defined a ttribute t hat indi cates when the data var iable may be acce ssed.
Extensible Firmwar e Interface Specifi cation 324 12/12/00 Version 1.02 The LangCodes variable c ontains an array o f 3-characte r (8-bi t ASCII chara cters) ISO-639-2 language c odes tha t the firmware c an support. A t init ializat ion time the firmw are computes th e suppor ted language s and creat es this da ta variable.
Boot Manager Version 1.02 12/12/00 325 DriverOrder list is us ed by the firmware ’ s boot manager as the de fault load o rder fo r EFI drivers that it should exp licitly load. 17.3 Boot Option Variables Default Behavior The default s tate of globa lly-defin ed variabl es is fir mware vendo r specific.
Extensible Firmwar e Interface Specifi cation 326 12/12/00 Version 1.02 removable media devi ce will point to a device that “ speak s ” the SIMPLE_FILE_SYSTEM protocol.
Version 1.02 12/12/00 327 18 PCI Exp ansion ROM The PCI Local Bu s Specificat ion defines how to discove r expans ion ROM code th at comes f rom a ROM on a PCI Card. The expansion RO M can be ex ecuted to initialize a specific dev ice or, possibly, to b oot a sy stem.
Extensible Firmwar e Interface Specifi cation 328 12/12/00 Version 1.02 EFI will coord inate with a future r evision of the PCI spe cification to alloca te the code type of 0x03 to represen t EFI image s. This code type will s ignify tha t EFI extensions are pre sent in th e standard PCI expansion ROM h eader.
PCI Expansion ROM Version 1.02 12/12/00 329 Table 18-3 defi nes the layo ut o f an EFI PCI expa nsion ROM. Missi ng values wi ll be suppl ied in a later version of the spec ifica tion.
Extensible Firmwar e Interface Specifi cation 330 12/01/00 Version 1.01.
Version 1.02 12/12/00 331 A GUID and Time Formats All EFI GUIDs (G lobally Unique Id entifiers) have the fo rmat desc ribed in Appen dix J of the Wired for Management Base line S pe cificat ion .
Extensible Firmwar e Interface Specifi cation 332 12/12/00 Version 1.02.
Version 1.02 12/12/00 333 B Console The EFI console wa s designed so that it c ould ma p to commo n console dev ices. This a ppendix explains how an EFI conso le could map to a VGA with PC AT 101/102, PCANSI, o r ANSI X3.64 consoles. B.1 SIMPLE_I NPUT Table B-1 g ives examples of how an EFI scan code can be mapped to ANSI X3.
Extensible Firmwar e Interface Specifi cation 334 12/12/00 Version 1.02 Table B-1. EFI S can Codes f or SIM PLE_INPUT ( contin ued) EFI Scan Code Description ANSI X3.
Console Version 1.02 12/12/00 335 Table B-2. Control Sequ ences th at Can Be Used to Implem ent SIMPLE_TEX T_OUTPUT (continued) PCANSI Codes ANSI X3.64 Codes Description ESC [ 41 m CSI 41 m Red background, c ompliant wit h ISO Standar d 6429. ESC [ 42 m CSI 42 m Green backgrou nd, compliant w ith ISO Standar d 6429.
Extensible Firmwar e Interface Specifi cation 336 12/12/00 Version 1.02.
Version 1.02 12/12/00 337 C Device Path Examples This appendix p resents an example EFI De vice Path and explains its rela tionship t o the ACPI name space. An exa mple sys tem design is p resented a long with its correspo nding A CPI name space. These physica l examples are mapped back to EF I Device Path s.
Extensible Firmwar e Interface Specifi cation 338 12/12/00 Version 1.02 The remainde r of th is appen dix descri bes how to construct a device pat h for t hree examp le devices from the sy stem in Figure C-1.
Device Path Ex amples Version 1.02 12/12/00 339 Table C-1. Legacy Fl oppy De vice Path Byte Offset Byte Length Data Description 0 1 0x02 Gener ic Device Pat h Header – Ty pe ACPI Device Path 1 1 0x0.
Extensible Firmwar e Interface Specifi cation 340 12/12/00 Version 1.02 The EFI Dev ice Pat h for th e PCI ID E control ler would c ontain ent ries for the fo llowing thing s: • Root PCI Bridg e. ACPI Devic e Path _HID PNP0A 03, _UID 0. A CPI name sp ace _SB PCI0 • PCI IDE control ler.
Device Path Ex amples Version 1.02 12/12/00 341 C.4 Secondar y Root PCI Bus with PCI to PCI Bridge The secondary PCI host bridge materi alizes a s econd set of PCI buses in to the sy stem. Th e PCI buses on th e secondary PC I host b ridge are totally indepe ndent of the PCI buses on the root PC I host bridge.
Extensible Firmwar e Interface Specifi cation 342 12/12/00 Version 1.02 C.5 ACPI Terms Names in the ACP I name spac e that sta rt with an undersco re ( “ _ ” ) ar e reserved by the AC PI specifica tion and have archi tectural meanin g. All AC PI name s in the na me space ar e four characters in length.
Device Path Ex amples Version 1.02 12/12/00 343 C.6 EFI Device Path as a Name Space Figure C-3 show s the EF I Device P ath for th e example s ystem rep resented a s a name sp ace. The Device Path can be repr esented as a name s pace, but EFI d oes suppo rt man ipulating the Device Path as a nam e space.
Extensible Firmwar e Interface Specifi cation 344 12/12/00 Version 1.02.
Version 1.02 12/12/00 345 D Stat us C odes EFI in terfaces return an EFI_STATUS code. Ta bles D-2, D-3, a nd D-4 list these codes for success, err ors, and wa rnings, re spectiv ely. Error codes a lso have the ir highest bit set, s o all erro r codes have nega tive va lues.
Extensible Firmware Interface Specifi cation 346 12/12/00 Version 1.02 Table D-3. E FI_STATUS Error Codes (High bit set) (continu ed) Mnemonic Value Description EFI_NOT_READY 6 There is no data p ending upon return. EFI_DEVICE_ERRO R 7 The physic al device repor ted an err or while attem pting the operation.
Version 1.02 12/12/00 347 E Alphabetic Function Lists This append ix contain s two tables tha t list a ll EFI f unction s alphabet ically. Tab le E-1 lis ts the functions i n pure alphab etic order. Fun ctions tha t have the sam e name can b e distingu ished by the associated service or protocol (column 2).
Extensible Firmware Interface Specifi cation 348 12/12/00 Version 1.02 Table E-1. Functions Listed in Alphabetic Order (con tinued) Function Name Service or Protocol Sub-Service Function Descript ion EFI_PXE_BASE_CODE_CAL LBACK PXE Base Code Protocol Callback func tion that is invok ed when the PXE Base Cod e Protocol is wai ting for an ev ent.
Alphabetic Function L ists Version 1.02 12/12/00 349 Table E-1. Functions Listed in Alphabetic Order (con tinued) Function Name Service or Protocol Sub-Service Function Descript ion GetTime Runtime Services Time Servic es Returns the curr ent time and dat e, and the time-k eeping c apabilities of the platform .
Extensible Firmware Interface Specifi cation 350 12/12/00 Version 1.02 Table E-1. Functions Listed in Alphabetic Order (con tinued) Function Name Service or Protocol Sub-Service Function Descript ion MetaiMatc h Unicode Collat ion Protocol Performs a c ase insensitiv e comparis on between a U nicode pattern string and a Unicode string.
Alphabetic Function L ists Version 1.02 12/12/00 351 Table E-1. Functions Listed in Alphabetic Order (con tinued) Function Name Service or Protocol Sub-Service Function Descript ion ReinstallPr otocolInterf ace Boot Services Protocol Handler Services Replaces a pr otocol interface.
Extensible Firmware Interface Specifi cation 352 12/12/00 Version 1.02 Table E-1. Functions Listed in Alphabetic Order (con tinued) Function Name Service or Protocol Sub-Service Function Descript ion SetTime Runtime Serv ices Time Services Sets the c urrent local time and date information.
Alphabetic Function L ists Version 1.02 12/12/00 353 Table E-1. Functions Listed in Alphabetic Order (con tinued) Function Name Service or Protocol Sub-Service Function Descript ion StrLwr Unicode Col lation Protocol Converts all t he Unico de characters in a Null-term inated Unicode strin g to lower c ase Unicode charac ters.
Extensible Firmware Interface Specifi cation 354 12/12/00 Version 1.02 Table E-2. Functions Listed Alphabetically Within Service or Protocol Service or Prot ocol Function Function Description Block I/O Protoc ol FlushBloc ks Flushes any cached b lo cks.
Alphabetic Function L ists Version 1.02 12/12/00 355 Table E-2. Functions Listed Alphabetically Within Service or Protocol (continued) Service or Prot ocol Function Function Description Boot Services (cont.) Stall Stalls the proces sor. StartImage Function to trans fer control to the Image ’ s entry point.
Extensible Firmware Interface Specifi cation 356 12/12/00 Version 1.02 Table E-2. Functions Listed Alphabetically Within Service or Protocol (continued) Service or Prot ocol Function Function Description PXE Base Code Protocol Arp Uses the ARP protoc ol to resolv e a MAC addres s.
Alphabetic Function L ists Version 1.02 12/12/00 357 Table E-2. Functions Listed Alphabetically Within Service or Protocol (continued) Service or Prot ocol Function Function Description Serial I/O Protoc ol GetControl Reads the stat us of the c ontrol bits on a serial device.
Extensible Firmware Interface Specifi cation 358 12/12/00 Version 1.02 Table E-2. Functions Listed Alphabetically Within Service or Protocol (continued) Service or Prot ocol Function Function Description Simple Text Out put Protocol ClearScreen Clears the screen w ith the curren tly set bac kground colo r.
Version 1.02 12/12/00 359 F Glossary _ADR A reserved nam e in ACPI name spac e. It ref ers to an ad dress on a bus that h as standar d enumerati on. An exam ple would be PCI , where the enum eratio n method is de scribed in the PCI Local Bus spec ificat ion.
Extensible Firmware Interface Specifi cation 360 12/12/00 Version 1.02 BIOS Boot Specifica tion Device Pa th A Device Path that is use d to point to boot legacy opera ting system s; it is b ased on the BIOS Boot Specif ication, Versi on 1.01. BIOS Paramet er Block (BPB) The firs t block (se ctor) of a part ition.
Glossary Version 1.02 12/12/00 361 Boot Services Ti me The period of tim e between p latform initialization a nd the c all to ExitBootServices() . During th is tim e, EFI driv ers and applica tions are loaded iterativ ely and the sy stem boots from an ord ered lis t of EFI OS loade rs.
Extensible Firmware Interface Specifi cation 362 12/12/00 Version 1.02 Desktop Management Task F orce (DMTF ) The DMTF is a standards org anizat ion compri sed of com panies from all areas o f the computer i ndustry. I ts purpose is to crea te the stan dards and in frastruc ture for c ost- effectiv e manag ement of PC syst ems.
Glossary Version 1.02 12/12/00 363 DMTF See Desktop M anagement Task Force . Dynamic Host Con figuration P rotocol (DHCP) A protocol that is us ed to get i nform ation from a config uration se rver. DHCP is defined by the Desktop Mana gement Task Force , not EFI .
Extensible Firmware Interface Specifi cation 364 12/12/00 Version 1.02 Event An EFI data stru cture tha t describ es an “ ev ent ” — for example, t he expira tion of a timer. Event Servi ces The set of functions used to m anage events. I ncludes CheckEvent() , CreateEvent() , CloseEvent() , SignalEvent() , and WaitForEvent() .
Glossary Version 1.02 12/12/00 365 GUID Pa rtition Ta ble Hea der Th e head er in a GUID Pa rtition Tab le . Among other things, it c ontains th e number of partition entries in the tab le and th e first and l ast block s that can be used fo r the entr ies.
Extensible Firmware Interface Specifi cation 366 12/12/00 Version 1.02 Intel I tanium Arch itecture A new Intel arc hitectur e that has 6 4-bit ins truction capabiliti es, new perform ance- enhancing features, and support for the I A-32 inst ruction se t.
Glossary Version 1.02 12/12/00 367 MCA See Machin e Check Abort . Media Devi ce Path A Device Path that is use d to descr ibe the por tion of a medium that is be ing abstracte d by a boot serv ice. For example, a Media Device Pa th could def ine which par tition on a hard drive was being used.
Extensible Firmware Interface Specifi cation 368 12/12/00 Version 1.02 NBP See Network Boot Program . Network Boot Program A remote boot imag e downloaded by a PXE client using the Triv ial File Trans fer Protocol or the Mult icast T rivial File T rans fer Protoco l .
Glossary Version 1.02 12/12/00 369 Protocol Hand ler Services The set of functions used to m anipulate ha ndles, prot ocols, and pr otocol in terfaces. Includes InstallProtocolInterface() , UninstallProtocolInterface() , ReInstallProtocolInterface() , HandleProtocol() , RegisterProtocolNotify() , LocateHandle() ,and LocateDevicePath() .
Extensible Firmware Interface Specifi cation 370 12/12/00 Version 1.02 Simple F ile System Protocol A component of the File Syst em Pr oto col . It prov ides a m inim al interfa ce for file- type access to a d evice. Simple In put Protocol A protocol that is us ed to obta in input from the ConsoleIn d evice.
Glossary Version 1.02 12/12/00 371 Sys tem P artit ion A section of a block device that is treat ed as a log ical whole. Fo r a hard disk with a legacy partition ing scheme, i t is a cont iguous groupi ng of secto rs whose start ing sector and size are defined by the Master Boot Record .
Extensible Firmware Interface Specifi cation 372 12/12/00 Version 1.02 Trivial F ile T ransport P rotocol (TFTP) A protocol used to downlo ad a Netw ork Boot P rogr am from a TFTP se rver. Unicode An industry standard internationa lized character set used fo r human re adable m essage display .
Version 1.02 12/12/00 373 G 32/64-Bit UNDI Specification G.1 Introduction This appendix defi nes the 32/64-bit H/W and S/W Universal Net work Driver Int erfaces (UNDIs) . These inter faces provi de one metho d for writ ing a network d river; o ther implem entations are possible.
Extensible Firmwar e Interface Specifi cation 374 12/12/00 Version 1.02 Table G-1. Definitions (continued) Term Definition PXE Preboot Execution Environm ent The complet e PXE specificat ion covers thre e areas; the c lient, the network and t he server.
32/64-bit UNDI Specification Version 1.02 12/12/00 375 Table G- 2. Referenced Specifi cation ( continu ed) Acronym Protocol/Specification BOOTP Bootstrap Protocol – http://www.ietf.org/rfc/rfc0951.txt - This refer ence is included for backward co mpatibili ty.
Extensible Firmwar e Interface Specifi cation 376 12/12/00 Version 1.02 Table G- 2. Referenced Specifi cation ( continu ed) Acronym Protocol/Specification TCP Transmission Control Protoc ol TCPv4: http://www.ietf.org/rfc/rfc0793.txt TCPv6: ftp://ftp.i pv6.
32/64-bit UNDI Specification Version 1.02 12/12/00 377 Table G-3. Driver Ty pes: Pros and Cons Driver Pro Con Custom • Can be very fas t and effic ient. NIC vendor tu nes driver t o OS & device. • OS v endor does not h ave to write NIC driver.
Extensible Firmwar e Interface Specifi cation 378 12/12/00 Version 1.02 G.2 Overview There are three major design changes between this specific ation and the 16-bit UNDI in versi on 2.1 of the PX E Specif ication: • A new arch itectur al hardware interfac e has been adde d.
32/64-bit UNDI Specification Version 1.02 12/12/00 379 The !PXE str ucture for S/W UNDI ca n be loaded into system memory fr om one of three places; ROM on a NIC, syste m non-volatil e storage, o r external storage.
Extensible Firmwar e Interface Specifi cation 380 12/12/00 Version 1.02 Table G-4. !PXE Structure Field Definitions (continued) Identifier Value Description Implementat ion Varies Ident ifies type of UNDI (S/W or H/W, 32 b it or 64 bit) a nd what f eatures hav e been imp lemented.
32/64-bit UNDI Specification Version 1.02 12/12/00 381 Table G-4. !PXE Structure Field Definitions (continued) Identifier Value Description Status Varies UNDI operation, com mand and interrupt stat us fla gs. This is a re ad-only port. Undefine d status bits must be s et to zero.
Extensible Firmwar e Interface Specifi cation 382 12/12/00 Version 1.02 Table G-4. !PXE Structure Field Definitions (continued) Identifier Value Description S/W UNDI Fields EntryPoint Varies S/W UNDI API entry p oint addr ess. This is either a v irtual addres s or an offset from the start of the !PXE struc ture.
32/64-bit UNDI Specification Version 1.02 12/12/00 383 G.2.1.1 Issuing UNDI Commands How comman ds are written and st atus is checked var ies a little depending on the type of UNDI (H/W or S /W) implement ation being used. The com mand flowch art below is a h igh level d iagram on how commands are written to both H/W and S/W UNDI.
Extensible Firmwar e Interface Specifi cation 384 12/12/00 Version 1.02 G.2.2 UNDI Command Format The format of the CDB i s the same for all UNDI commands. Some of the c ommands do not use or always requ ire the use o f all of th e fields in t he CDB.
32/64-bit UNDI Specification Version 1.02 12/12/00 385 Table G-5. UNDI CDB Field Definitions (cont inued) Identifier Description CPBsize Command P arameter B lock Size This field s hould be s et to a num ber that is e qual to the number of by tes that w ill be read from CPB struc ture during com mand executi on.
Extensible Firmwar e Interface Specifi cation 386 12/12/00 Version 1.02 Table G-5. UNDI CDB Field Definitions (cont inued) Identifier Description IFnum Interface Number This field is used to identify which network adapter (S/W UNDI) or network connector (H/W UNDI) this comm and is being s ent to.
32/64-bit UNDI Specification Version 1.02 12/12/00 387 G.3.1.3 PXE_BUSTYPE Used to conv ert a 4-cha racter A SCII id entifier to a 32-bit uns igned in teger.
Extensible Firmwar e Interface Specifi cation 388 12/12/00 Version 1.02 G.3.1.4 PXE_SWAP_UINT16 This macro sw aps byte s in a 16 -bit word. #ifdef PXE_INTEL_ORDER # define PXE_SWAP_UINT16(n) ((((PXE_UINT16)(n) & 0x00FF) << 8) | (((PXE_UINT16)(n) & 0xFF00) >> 8)) #else # define PXE_SWAP_UINT16(n) (n) #endif G.
32/64-bit UNDI Specification Version 1.02 12/12/00 389 G.3.1.6 PXE_SWAP_UINT64 This macro sw aps byte s in a 64 -bit word fo r compile rs tha t support 64 -bit words.
Extensible Firmwar e Interface Specifi cation 390 12/12/00 Version 1.02 G.3.2 Miscellaneous Macros G.3.2.1 Miscellaneous #define PXE_CPBSIZE_NOT_USED 0 // zero #define PXE_DBSIZE_NOT_USED 0 // zero #define PXE_CPBADDR_NOT_USED (PXE_UINT64)0 // zero #define PXE_DBADDR_NOT_USED (PXE_UINT64)0 // zero G.
32/64-bit UNDI Specification Version 1.02 12/12/00 391 G.3.3.3 PXE_VOID The void type doe s not alloc ate stor age. This typ e is used onl y to protot ype function s that do no t return a ny inform ation and/o r do not tak e any param eters. typedef void PXE_VOID; G.
Extensible Firmwar e Interface Specifi cation 392 12/12/00 Version 1.02 G.3.4 Simple Types The PXE simple types are de fined us ing one o f the porta bility types from the previou s section. G.3.4.1 PXE_BOOL Boolean (true /false) dat a type. For PXE ze ro is a lways false and non-zero is always true.
32/64-bit UNDI Specification Version 1.02 12/12/00 393 // Change the UNDI operational state from Initialized to Started. #define PXE_OPCODE_SHUTDOWN 0x0007 // Read & change state of external interrupt enables. #define PXE_OPCODE_INTERRUPT_ENABLES 0x0008 // Read & change state of packet receive filters.
Extensible Firmwar e Interface Specifi cation 394 12/12/00 Version 1.02 G.3.4.3 PXE_OPFLAGS typedef PXE_UINT16 PXE_OPFLAGS; #define PXE_OPFLAGS_NOT_USED 0x0000 //**************************************.
32/64-bit UNDI Specification Version 1.02 12/12/00 395 //******************************************************* // UNDI Initialize //******************************************************* #define PX.
Extensible Firmwar e Interface Specifi cation 396 12/12/00 Version 1.02 // Enable receive interrupts. An external interrupt will be // generated after a complete non-error packet has been received. #define PXE_OPFLAGS_INTERRUPT_RECEIVE 0x0001 // Enable transmit interrupts.
32/64-bit UNDI Specification Version 1.02 12/12/00 397 #define PXE_OPFLAGS_RECEIVE_FILTER_OPMASK 0xC000 #define PXE_OPFLAGS_RECEIVE_FILTER_ENABLE 0x8000 #define PXE_OPFLAGS_RECEIVE_FILTER_DISABLE 0x40.
Extensible Firmwar e Interface Specifi cation 398 12/12/00 Version 1.02 // Enable promiscuous packet receiving. All packets will be // received. #define PXE_OPFLAGS_RECEIVE_FILTER_PROMISCUOUS 0x0008 // Enable promiscuous multicast packet receiving. All multicast // packets will be received.
32/64-bit UNDI Specification Version 1.02 12/12/00 399 // UNDI NvData //******************************************************* // Select the type of non-volatile data operation.
Extensible Firmwar e Interface Specifi cation 400 12/12/00 Version 1.02 // UNDI Transmit //******************************************************* // S/W UNDI only. Return after the packet has been transmitted. // A transmit complete interrupt will still be generated and the // transmit buffer will have to be recycled.
32/64-bit UNDI Specification Version 1.02 12/12/00 401 #define PXE_STATFLAGS_COMMAND_QUEUED 0x4000 //******************************************************* // UNDI Get State //***********************.
Extensible Firmwar e Interface Specifi cation 402 12/12/00 Version 1.02 //******************************************************* // UNDI Shutdown //***************************************************.
32/64-bit UNDI Specification Version 1.02 12/12/00 403 // If set, all multicast packets will be received. #define PXE_STATFLAGS_RECEIVE_FILTER_ALL_MULTICAST 0x0010 //**********************************.
Extensible Firmwar e Interface Specifi cation 404 12/12/00 Version 1.02 // If set, at least one receive interrupt occurred. #define PXE_STATFLAGS_GET_STATUS_RECEIVE 0x0001 // If set, at least one transmit interrupt occurred. #define PXE_STATFLAGS_GET_STATUS_TRANSMIT 0x0002 // If set, at least one command interrupt occurred.
32/64-bit UNDI Specification Version 1.02 12/12/00 405 G.3.4.5 PXE_STATCODE typedef PXE_UINT16 PXE_STATCODE; #define PXE_STATCODE_INITIALIZE 0x0000 //******************************************************* // Common StatCodes returned by all UNDI commands, UNDI protocol // functions and BC protocol functions.
Extensible Firmwar e Interface Specifi cation 406 12/12/00 Version 1.02 G.3.4.6 PXE_IFNUM typedef PXE_UINT16 PXE_IFNUM; // This interface number must be passed to the S/W UNDI Start // command.
32/64-bit UNDI Specification Version 1.02 12/12/00 407 G.3.4.8 PXE_FRAME_TYPE typedef PXE_UINT8 PXE_FRAME_TYPE; #define PXE_FRAME_TYPE_NONE 0x00 #define PXE_FRAME_TYPE_UNICAST 0x01 #define PXE_FRAME_T.
Extensible Firmwar e Interface Specifi cation 408 12/12/00 Version 1.02 G.3.4.12 PXE_IFTYPE The interfa ce type is returned by the Get I nitiali zation In formatio n command a nd is used by the BC DHCP protocol func tion. This f ield is also u sed for th e low order 8-bi ts of th e H/W type f ield in ARP packets.
32/64-bit UNDI Specification Version 1.02 12/12/00 409 G.3.5 Compound Types All PXE s tructu res must b e byte p acked. G.3.5.1 PXE_HW_UND I This sect ion defines t he C structures and #defines for the ! PXE H/W UNDI interfa ce.
Extensible Firmwar e Interface Specifi cation 410 12/12/00 Version 1.02 // If set, last command failed #define PXE_HWSTAT_COMMAND_FAILED 0x20000000 // If set, identifies enabled receive filters #defin.
32/64-bit UNDI Specification Version 1.02 12/12/00 411 // Use these to enable/disable receive filters. #define PXE_HWCMD_PROMISCUOUS_MULTICAST_RX_ENABLE 0x00001000 #define PXE_HWCMD_PROMISCUOUS_RX_ENA.
Extensible Firmwar e Interface Specifi cation 412 12/12/00 Version 1.02 PXE_UINT64 EntryPoint; // API entry point PXE_UINT8 reserved2[3]; // zero, not used PXE_UINT8 BusCnt; // number of bustypes supported PXE_UINT32 BusType[1]; // list of supported bustypes } PXE_SW_UNDI; #pragma pack() G.
32/64-bit UNDI Specification Version 1.02 12/12/00 413 #define PXE_ROMID_IMP_64BIT_DEVICE 0x00010000 #define PXE_ROMID_IMP_FRAG_SUPPORTED 0x00008000 #define PXE_ROMID_IMP_CMD_LINK_SUPPORTED 0x00004000.
Extensible Firmwar e Interface Specifi cation 414 12/12/00 Version 1.02 G.3.5.4 PXE_CDB PXE UNDI comma nd descriptor block. #pragma pack(1) typedef struct s_pxe_cdb { PXE_OPCODE OpCode; PXE_OPFLAGS Op.
32/64-bit UNDI Specification Version 1.02 12/12/00 415 G.3.5.6 PXE_DEVICE This typedef is used to identif y the network device that is being used by the UNDI.
Extensible Firmwar e Interface Specifi cation 416 12/12/00 Version 1.02 G.4 UNDI Commands All 32/64-bit UNDI commands use the same basic command format, the CDB (Command Descriptor B lock). CDB field s that are not used by a pa rticular c ommand mu st be in itial ized to zero by th e applica tion/drive r that i s issuing th e command.
32/64-bit UNDI Specification Version 1.02 12/12/00 417 G.4.1 Command Linking & Queu ing When linking co mmands, the CDBs must be stored consecu tively in system me mory without any gaps in betw een. Do no t set th e Link bit in the las t CDB in the list.
Extensible Firmwar e Interface Specifi cation 418 12/12/00 Version 1.02 Queue d CDBs 0x00 0x1F 0x40 0x5F 0x20 0x3F CDB Set Queue bit. Set Link bit. CDB Do not set Queue bit.
32/64-bit UNDI Specification Version 1.02 12/12/00 419 G.4.2.1 Issuing th e Command To issue a Get S tate com mand, create a CDB and f ill it in as shows i n the table be low: CDB Field How to initial.
Extensible Firmwar e Interface Specifi cation 420 12/12/00 Version 1.02 G.4.3 Start This comma nd is used to change the UNDI oper ational stat e from stopped to star ted. No other operational ch ecks are made by this command. If t his is a S/W UNDI, the Dela y() and Virt2Phys() function s will n ot be call ed by th is command .
32/64-bit UNDI Specification Version 1.02 12/12/00 421 Preparing the CPB The CPB for the S/W UNDI Start command (shown below) must be filled in and the size and address of t he CPB must be given in the CDB.
Extensible Firmwar e Interface Specifi cation 422 12/12/00 Version 1.02 // This field can be set to zero if virtual and physical // addresses are equal.
32/64-bit UNDI Specification Version 1.02 12/12/00 423 G.4.4.1 Issuing th e Command To issue a S top command, c reate a CDB and fil l it in as shows in the tab le below : CDB Field How to initialize t.
Extensible Firmwar e Interface Specifi cation 424 12/12/00 Version 1.02 G.4.5.1 Issuing th e Command To issue a Get Init Info c ommand, c reate a CDB and f ill it in as shows in the table below: CDB F.
32/64-bit UNDI Specification Version 1.02 12/12/00 425 DB #pragma pack(1) typedef struct s_pxe_db_get_init_info { // Minimum length of locked memory buffer that must be given to // the Initialize command. Giving UNDI more memory will // generally give better performance.
Extensible Firmwar e Interface Specifi cation 426 12/12/00 Version 1.02 // Number of bytes in the NIC hardware (MAC) address. PXE_UINT16 HWaddrLen; // Maximum number of multicast MAC addresses in the multicast // MAC address filter list.
32/64-bit UNDI Specification Version 1.02 12/12/00 427 #define PXE_MAX_TXRX_UNIT_ETHER 1500 #define PXE_HWADDR_LEN_ETHER 0x0006 #define PXE_DUPLEX_ENABLE_FULL_SUPPORTED 1 #define PXE_DUPLEX_FORCE_FULL_SUPPORTED 2 #define PXE_LOOPBACK_INTERNAL_SUPPORTED 1 #define PXE_LOOPBACK_EXTERNAL_SUPPORTED 2 G.
Extensible Firmwar e Interface Specifi cation 428 12/12/00 Version 1.02 G.4.6.3 Checking Com mand Exe cution Results After co mmand execu tion comp letes, either suc cessfully or not, the CDB.StatCode field contains th e result o f the comm and execut ion.
32/64-bit UNDI Specification Version 1.02 12/12/00 429 typedef struct s_pxe_pcc_config_info { // This is the flag field for the PXE_DB_GET_CONFIG_INFO union. // For PCC bus devices, this field is set to PXE_BUSTYPE_PCC. PXE_UINT32 BusType; // This identifies the PCC network device that this UNDI // interface is bound to.
Extensible Firmwar e Interface Specifi cation 430 12/12/00 Version 1.02 G.4.7 Initialize This comma nd resets the network adapter a nd initializes UNDI using the parame ters supplied in the CPB. Th e Initia lize co mmand must be issued bef ore the network a dapter can be setup to trans mit and receive p ackets.
32/64-bit UNDI Specification Version 1.02 12/12/00 431 Preparing the CPB If the MemoryRequired field retu rned in the PXE_DB_GET_INIT_INFO structur e is zero, t he Initial ize command doe s not need to be given a m emory buf fer or even a CPB structure.
Extensible Firmwar e Interface Specifi cation 432 12/12/00 Version 1.02 // The following configuration parameters are optional and must // be zero to use the default values.
32/64-bit UNDI Specification Version 1.02 12/12/00 433 G.4.7.3 Checking Com mand Exe cution Results After co mmand execu tion comp letes, either suc cessfully or not, the CDB.StatCode field contains th e result o f the comm and execut ion. StatCode Reason SUCCESS Command c ompleted succes sfully.
Extensible Firmwar e Interface Specifi cation 434 12/12/00 Version 1.02 G.4.8 Reset This comma nd resets the network a dapter and re-initi alizes th e UNDI with the s ame parameters provided in t he Initia lize comman d. The trans mit and re ceive queue s are emptied and any pe nding interrupt s are clea red.
32/64-bit UNDI Specification Version 1.02 12/12/00 435 G.4.8.3 Checking Com mand Exe cution Results After co mmand execu tion comp letes, either suc cessfully or not, the CDB.StatCode field contains th e result o f the comm and execut ion. StatCode Reason SUCCESS Command c ompleted succes sfully.
Extensible Firmwar e Interface Specifi cation 436 12/12/00 Version 1.02 G.4.9.1 Issuing th e Command To issue a S hutdown comma nd, cre ate a CDB and fi ll it in a s shown in the table b elow: CDB Fie.
32/64-bit UNDI Specification Version 1.02 12/12/00 437 G.4.10 Interrupt Enables The Interrup t Enable s command can be use d to read and /or cha nge the cur rent ex ternal in terrupt enable sett ings.
Extensible Firmwar e Interface Specifi cation 438 12/12/00 Version 1.02 G.4.10.2 Waiting for the Command t o Execute Monitor th e upper two bits (14 & 15 ) in the CDB.StatFlags field. Unt il these bi ts chan ge to report PXE_STATFLAGS_COMMAND_COMPLETE or PXE_STATFLAGS_COMMAND_FAILED , the comma nd has not been executed by the UNDI.
32/64-bit UNDI Specification Version 1.02 12/12/00 439 G.4.11 Receive Filters This comman d is used to read and change rece ive filt ers and, if support ed, read and ch ange the multicas t MAC a ddress fi lter li st.
Extensible Firmwar e Interface Specifi cation 440 12/12/00 Version 1.02 Preparing the CPB The receive f ilter CPB is used to change th e contents mult icast MAC address f ilter lis t. To leave the multicas t MAC address filter li st unchanged, set the CDB.
32/64-bit UNDI Specification Version 1.02 12/12/00 441 G.4.11.3 Checking Command Exe cution Resul ts After co mmand execu tion comp letes, either suc cessfully or not, the CDB.StatCode field contains th e result o f the comm and execut ion. StatCode Reason SUCCESS Command com pleted succes sfully.
Extensible Firmwar e Interface Specifi cation 442 12/12/00 Version 1.02 G.4.12 Station Address This comman d is used to get curren t station and broad cast MAC addr esses and, i f supported, to change the cur rent s tation MA C address.
32/64-bit UNDI Specification Version 1.02 12/12/00 443 G.4.12.2 Waiting for the Command t o Execute Monitor th e upper two bits (14 & 15 ) in the CDB.StatFlags field. Unt il these bi ts chan ge to report PXE_STATFLAGS_COMMAND_COMPLETE or PXE_STATFLAGS_COMMAND_FAILED , the comma nd has not been executed by the UNDI.
Extensible Firmwar e Interface Specifi cation 444 12/12/00 Version 1.02 G.4.13 Statistics This comman d is used to read and clear the N IC traffi c statisti cs. Before us ing this co mmand chec k to see if s tatisti cs is suppo rted in the !PXE.Implementation flags .
32/64-bit UNDI Specification Version 1.02 12/12/00 445 G.4.13.2 Waiting for the Command t o Execute Monitor th e upper two bits (14 & 15 ) in the CDB.StatFlags field. Unt il these bi ts chan ge to report PXE_STATFLAGS_COMMAND_COMPLETE or PXE_STATFLAGS_COMMAND_FAILED , the comma nd has not been executed by the UNDI.
Extensible Firmwar e Interface Specifi cation 446 12/12/00 Version 1.02 PXE_UINT64 Data[64]; } PXE_DB_STATISTICS; // Total number of frames received. Includes frames with errors // and dropped frames. #define PXE_STATISTICS_RX_TOTAL_FRAMES 0x00 // Number of valid frames received and copied into receive // buffers.
32/64-bit UNDI Specification Version 1.02 12/12/00 447 // Transmit statistics. #define PXE_STATISTICS_TX_TOTAL_FRAMES 0x0A #define PXE_STATISTICS_TX_GOOD_FRAMES 0x0B #define PXE_STATISTICS_TX_UNDERSIZ.
Extensible Firmwar e Interface Specifi cation 448 12/12/00 Version 1.02 G.4.14 MCast IP To M AC Translate a multica st IPv4 o r IPv6 addre ss to a mul ticast MAC address.
32/64-bit UNDI Specification Version 1.02 12/12/00 449 G.4.14.2 Waiting for the Command t o Execute Monitor th e upper two bits (14 & 15 ) in the CDB.StatFlags field. Unt il these bi ts chan ge to report PXE_STATFLAGS_COMMAND_COMPLETE or PXE_STATFLAGS_COMMAND_FAILED , the comma nd has not been executed by the UNDI.
Extensible Firmwar e Interface Specifi cation 450 12/12/00 Version 1.02 G.4.15.1 Issuing the Command To issue a NvData command, c reate a CDB and f ill it in a s shows in the table below : CDB Field How to initialize the CDB structure for a NvData command OpCode PXE_OPCODE_NVDATA OpFlags Set as needed.
32/64-bit UNDI Specification Version 1.02 12/12/00 451 Sparse NvData CPB typedef struct s_pxe_cpb_nvdata_sparse { // NvData item list. Only items in this list will be updated. struct { // Non-volatile storage address to be changed. PXE_UINT32 Addr; // Data item to write into above storage address.
Extensible Firmwar e Interface Specifi cation 452 12/12/00 Version 1.02 Bulk NvData CPB // When using bulk update, the size of the CPB structure must be // the same size as the non-volatile NIC storage. typedef union u_pxe_cpb_nvdata_bulk { // Array of byte-wide data items.
32/64-bit UNDI Specification Version 1.02 12/12/00 453 G.4.15.3 Checking Command Exe cution Resul ts After co mmand execu tion comp letes, e ither suc cessfully or not, the CDB.StatCode field contains th e result o f the comm and execut ion. StatCode Reason SUCCESS Comm and completed suc cessfully .
Extensible Firmwar e Interface Specifi cation 454 12/12/00 Version 1.02 G.4.16 Get Status This comman d retu rns the cu rrent in terrupt s tatus and/ or the tra nsmitt ed buffe r addresse s. If the current in terrupt s tatus is returne d, pending in terrupts wi ll be acknow ledged by this com mand.
32/64-bit UNDI Specification Version 1.02 12/12/00 455 G.4.16.3 Checking Command Exe cution Resul ts After co mmand execu tion comp letes, either suc cessfully or not, the CDB.StatCode field contains th e result o f the comm and execut ion. StatCode Reason SUCCESS Com mand completed s uccess fully.
Extensible Firmwar e Interface Specifi cation 456 12/12/00 Version 1.02 Using the DB When read ing the tr ansmitte d buffer a ddresse s there sho uld be ro om for at least one 64-bit address in the DB . Once a co mplete transm itted buffer addres s is writt en into the D B, the address is removed from the tr ansmitte d buffer queue.
32/64-bit UNDI Specification Version 1.02 12/12/00 457 G.4.17.1 Issuing the Command To issue a F ill Header co mmand, crea te a CDB and fi ll it in as show s in the table below : CDB Field How to initialize t he CDB structure for a Fill Header command OpCode PXE_OPCODE_FILL_HEADER OpFlags Set as needed.
Extensible Firmwar e Interface Specifi cation 458 12/12/00 Version 1.02 // Length of packet data in bytes (not including the media // header). PXE_UINT32 PacketLen; // Protocol type. This will be copied into the media header // without doing byte swapping.
32/64-bit UNDI Specification Version 1.02 12/12/00 459 // Number of packet fragment descriptors. PXE_UINT16 FragCnt; // Reserved, must be set to zero. PXE_UINT16 reserved; // Array of packet fragment descriptors. The first byte of the // media header is the first byte of the first fragment.
Extensible Firmwar e Interface Specifi cation 460 12/12/00 Version 1.02 G.4.17.3 Checking Command Exe cution Resul ts After co mmand execu tion comp letes, either suc cessfully or not, the CDB.StatCode field contains th e result o f the comm and execut ion.
32/64-bit UNDI Specification Version 1.02 12/12/00 461 OpFlags Check the !PXE.Implementation flag s to see if the ne twork device s upport frag mente d packets.
Extensible Firmwar e Interface Specifi cation 462 12/12/00 Version 1.02 Fragmented Frame #pragma pack(1) typedef struct s_pxe_cpb_transmit_fragments { // Length of packet data in bytes (not including the media // header). PXE_UINT32 FrameLen; // Length of the media header in bytes.
32/64-bit UNDI Specification Version 1.02 12/12/00 463 G.4.18.2 Waiting for the Command t o Execute Monitor th e upper two bits (14 & 15 ) in the CDB.StatFlags field. Unt il these bi ts chan ge to report PXE_STATFLAGS_COMMAND_COMPLETE or PXE_STATFLAGS_COMMAND_FAILED , the comma nd has not been executed by the UNDI.
Extensible Firmwar e Interface Specifi cation 464 12/12/00 Version 1.02 G.4.19 Receive When the n etwork adapt er has received a frame, this com mand is used to copy the frame into driver/app lication storag e. Once a fra me has been co pied, it i s removed from the receive queue.
32/64-bit UNDI Specification Version 1.02 12/12/00 465 G.4.19.2 Waiting for the Command t o Execute Monitor th e upper two bits (14 & 15 ) in the CDB.StatFlags field. Until these bits change to report PXE_STATFLAGS_COMMAND_COMPLETE or PXE_STATFLAGS_COMMAND_FAILED , the comma nd has not been executed by the UNDI.
Extensible Firmwar e Interface Specifi cation 466 12/12/00 Version 1.02 // Protocol type from media header. PXE_PROTOCOL Protocol; // Length of media header in received frame. PXE_UINT16 MediaHeaderLen; // Type of receive frame. PXE_FRAME_TYPE Type; // Reserved, must be zero.
32/64-bit UNDI Specification Version 1.02 12/12/00 467 } NII_en try[n]; // the length o f this array is g iven in the N umbe rOfInterf aces fie ld } UNDI_CONFIG_TABLE; Since there can only b e one con.
Extensible Firmwar e Interface Specifi cation 468 12/12/00 Version 1.02.
Version 1.02 12/12/00 469 H Index _HID, 123 _UID, 123 A ACPI, 8 ACPI name space, 337 , 342 ACPI S ource Lang uage , 117 Adva nced C onf igur ati on and P ower Inte rfa ce specification, 8. See also rel ated information Alphab etic Fun ction Lists, 34 7 ANSI 3.
Extensible Firmwar e Interface Specifi cation 470 12/12/00 Version 1.02 Device I/O Pr otoc ol, 137 Functi ons Alloca te Buff er ( ), 147, 150 Flush (), 149 Io(), 141 Map(), 144 Mem(), 141 Pci(), 141 P.
Index Version 1.02 12/12/00 471 EFI Directory Structure, 30 6 EFI D river , 11 0, 30 5 EFI D river , def init ion of, 36 3 EFI Fi le, def init ion of, 3 63 EFI I mage , 105, 109, 305 EFI Image ha ndof.
Extensible Firmwar e Interface Specifi cation 472 12/12/00 Version 1.02 Image Services (cont.) StartI mage( ), 71 UnloadImage(), 7 2 over view, 67 images, loading, 13 implementation requireme nts gene.
Index Version 1.02 12/12/00 473 PCANSI term inals, and SIMPLE_TEXT_OUTPUT, 3 34 PCI Ex pansi on ROM , 32 7 driver fo r EFI, 329 image types, 329 PCI Ex pansi on ROM Hea der EFI, 328 standa rd, 32 7 PE32+ image fo rmat, 109 plug a nd pla y opt io n ROMs and boot se rvice s, 14 PMBR.
Extensible Firmwar e Interface Specifi cation 474 12/12/00 Version 1.02 Simple F ile S ystem Pr otoc ol, 18 7 functi ons OpenVolume(), 189 GUID, 187 Interface Structure, 187 Revisi on N umbe r, 187 Si.
Index Version 1.02 12/12/00 475 U UNDI Specification, 32/64-Bit, 373 Unic ode Coll ation Pr otoc ol, 225 Functi ons FatToStr(), 2 32 MetaiMatch(), 228 StriCo ll(), 227 StrLwr(), 23 0 StrToF at(), 233 .
Extensible Firmwar e Interface Specifi cation 476 12/12/00 Version 1.02.
デバイスIntel Extensible Firmware Interfaceの購入後に(又は購入する前であっても)重要なポイントは、説明書をよく読むことです。その単純な理由はいくつかあります:
Intel Extensible Firmware Interfaceをまだ購入していないなら、この製品の基本情報を理解する良い機会です。まずは上にある説明書の最初のページをご覧ください。そこにはIntel Extensible Firmware Interfaceの技術情報の概要が記載されているはずです。デバイスがあなたのニーズを満たすかどうかは、ここで確認しましょう。Intel Extensible Firmware Interfaceの取扱説明書の次のページをよく読むことにより、製品の全機能やその取り扱いに関する情報を知ることができます。Intel Extensible Firmware Interfaceで得られた情報は、きっとあなたの購入の決断を手助けしてくれることでしょう。
Intel Extensible Firmware Interfaceを既にお持ちだが、まだ読んでいない場合は、上記の理由によりそれを行うべきです。そうすることにより機能を適切に使用しているか、又はIntel Extensible Firmware Interfaceの不適切な取り扱いによりその寿命を短くする危険を犯していないかどうかを知ることができます。
ですが、ユーザガイドが果たす重要な役割の一つは、Intel Extensible Firmware Interfaceに関する問題の解決を支援することです。そこにはほとんどの場合、トラブルシューティング、すなわちIntel Extensible Firmware Interfaceデバイスで最もよく起こりうる故障・不良とそれらの対処法についてのアドバイスを見つけることができるはずです。たとえ問題を解決できなかった場合でも、説明書にはカスタマー・サービスセンター又は最寄りのサービスセンターへの問い合わせ先等、次の対処法についての指示があるはずです。