EDK2 doxygen online documents - Firmware Encoding Index 1
EDK2 doxygen online documents - Firmware Encoding Index

MdePkg/Include/Uefi/UefiSpec.h

Go to the documentation of this file.
00001 
00019 #ifndef __UEFI_SPEC_H__
00020 #define __UEFI_SPEC_H__
00021 
00022 #include <Uefi/UefiMultiPhase.h>
00023 
00024 #include <Protocol/DevicePath.h>
00025 #include <Protocol/SimpleTextIn.h>
00026 #include <Protocol/SimpleTextInEx.h>
00027 #include <Protocol/SimpleTextOut.h>
00028 
00032 typedef enum {
00036   AllocateAnyPages,
00041   AllocateMaxAddress,
00045   AllocateAddress,
00049   MaxAllocateType
00050 } EFI_ALLOCATE_TYPE;
00051 
00052 //
00053 // Bit definitions for EFI_TIME.Daylight
00054 //
00055 #define EFI_TIME_ADJUST_DAYLIGHT  0x01
00056 #define EFI_TIME_IN_DAYLIGHT      0x02
00057 
00061 #define EFI_UNSPECIFIED_TIMEZONE  0x07FF
00062 
00063 //
00064 // Memory cacheability attributes
00065 //
00066 #define EFI_MEMORY_UC   0x0000000000000001ULL
00067 #define EFI_MEMORY_WC   0x0000000000000002ULL
00068 #define EFI_MEMORY_WT   0x0000000000000004ULL
00069 #define EFI_MEMORY_WB   0x0000000000000008ULL
00070 #define EFI_MEMORY_UCE  0x0000000000000010ULL
00071 //
00072 // Physical memory protection attributes
00073 //
00074 #define EFI_MEMORY_WP   0x0000000000001000ULL
00075 #define EFI_MEMORY_RP   0x0000000000002000ULL
00076 #define EFI_MEMORY_XP   0x0000000000004000ULL
00077 //
00078 // Runtime memory attribute
00079 //
00080 #define EFI_MEMORY_RUNTIME  0x8000000000000000ULL
00081 
00085 #define EFI_MEMORY_DESCRIPTOR_VERSION 1
00086 
00090 typedef struct {
00094   UINT32                Type;
00099   EFI_PHYSICAL_ADDRESS  PhysicalStart;
00104   EFI_VIRTUAL_ADDRESS   VirtualStart;
00108   UINT64                NumberOfPages;
00114   UINT64                Attribute;
00115 } EFI_MEMORY_DESCRIPTOR;
00116 
00135 typedef
00136 EFI_STATUS
00137 (EFIAPI *EFI_ALLOCATE_PAGES)(
00138   IN     EFI_ALLOCATE_TYPE            Type,
00139   IN     EFI_MEMORY_TYPE              MemoryType,
00140   IN     UINTN                        Pages,
00141   IN OUT EFI_PHYSICAL_ADDRESS         *Memory
00142   );
00143 
00156 typedef
00157 EFI_STATUS
00158 (EFIAPI *EFI_FREE_PAGES)(
00159   IN  EFI_PHYSICAL_ADDRESS         Memory,
00160   IN  UINTN                        Pages
00161   );
00162 
00188 typedef
00189 EFI_STATUS
00190 (EFIAPI *EFI_GET_MEMORY_MAP)(
00191   IN OUT UINTN                       *MemoryMapSize,
00192   IN OUT EFI_MEMORY_DESCRIPTOR       *MemoryMap,
00193   OUT    UINTN                       *MapKey,
00194   OUT    UINTN                       *DescriptorSize,
00195   OUT    UINT32                      *DescriptorVersion
00196   );
00197 
00211 typedef
00212 EFI_STATUS
00213 (EFIAPI *EFI_ALLOCATE_POOL)(
00214   IN  EFI_MEMORY_TYPE              PoolType,
00215   IN  UINTN                        Size,
00216   OUT VOID                         **Buffer
00217   );
00218 
00228 typedef
00229 EFI_STATUS
00230 (EFIAPI *EFI_FREE_POOL)(
00231   IN  VOID                         *Buffer
00232   );
00233 
00253 typedef
00254 EFI_STATUS
00255 (EFIAPI *EFI_SET_VIRTUAL_ADDRESS_MAP)(
00256   IN  UINTN                        MemoryMapSize,
00257   IN  UINTN                        DescriptorSize,
00258   IN  UINT32                       DescriptorVersion,
00259   IN  EFI_MEMORY_DESCRIPTOR        *VirtualMap
00260   );
00261 
00285 typedef
00286 EFI_STATUS
00287 (EFIAPI *EFI_CONNECT_CONTROLLER)(
00288   IN  EFI_HANDLE                    ControllerHandle,
00289   IN  EFI_HANDLE                    *DriverImageHandle,   OPTIONAL
00290   IN  EFI_DEVICE_PATH_PROTOCOL      *RemainingDevicePath, OPTIONAL
00291   IN  BOOLEAN                       Recursive
00292   );
00293 
00318 typedef
00319 EFI_STATUS
00320 (EFIAPI *EFI_DISCONNECT_CONTROLLER)(
00321   IN  EFI_HANDLE                     ControllerHandle,
00322   IN  EFI_HANDLE                     DriverImageHandle, OPTIONAL
00323   IN  EFI_HANDLE                     ChildHandle        OPTIONAL
00324   );
00325 
00326 
00327 
00328 //
00329 // ConvertPointer DebugDisposition type.
00330 //
00331 #define EFI_OPTIONAL_PTR     0x00000001
00332 
00348 typedef
00349 EFI_STATUS
00350 (EFIAPI *EFI_CONVERT_POINTER)(
00351   IN     UINTN                      DebugDisposition,
00352   IN OUT VOID                       **Address
00353   );
00354 
00355 
00356 //
00357 // These types can be ORed together as needed - for example,
00358 // EVT_TIMER might be Ored with EVT_NOTIFY_WAIT or
00359 // EVT_NOTIFY_SIGNAL.
00360 //
00361 #define EVT_TIMER                         0x80000000
00362 #define EVT_RUNTIME                       0x40000000
00363 #define EVT_NOTIFY_WAIT                   0x00000100
00364 #define EVT_NOTIFY_SIGNAL                 0x00000200
00365 
00366 #define EVT_SIGNAL_EXIT_BOOT_SERVICES     0x00000201
00367 #define EVT_SIGNAL_VIRTUAL_ADDRESS_CHANGE 0x60000202
00368 
00369 //
00370 // The event's NotifyContext pointer points to a runtime memory
00371 // address.
00372 // The event is deprecated in UEFI2.0 and later specifications.
00373 //
00374 #define EVT_RUNTIME_CONTEXT               0x20000000
00375 
00376 
00385 typedef
00386 VOID
00387 (EFIAPI *EFI_EVENT_NOTIFY)(
00388   IN  EFI_EVENT                Event,
00389   IN  VOID                     *Context
00390   );
00391 
00408 typedef
00409 EFI_STATUS
00410 (EFIAPI *EFI_CREATE_EVENT)(
00411   IN  UINT32                       Type,
00412   IN  EFI_TPL                      NotifyTpl,
00413   IN  EFI_EVENT_NOTIFY             NotifyFunction,
00414   IN  VOID                         *NotifyContext,
00415   OUT EFI_EVENT                    *Event
00416   );
00417 
00437 typedef
00438 EFI_STATUS
00439 (EFIAPI *EFI_CREATE_EVENT_EX)(
00440   IN       UINT32                 Type,
00441   IN       EFI_TPL                NotifyTpl,
00442   IN       EFI_EVENT_NOTIFY       NotifyFunction OPTIONAL,
00443   IN CONST VOID                   *NotifyContext OPTIONAL,
00444   IN CONST EFI_GUID               *EventGroup    OPTIONAL,
00445   OUT      EFI_EVENT              *Event
00446   );
00447 
00451 typedef enum {
00455   TimerCancel,
00459   TimerPeriodic,
00463   TimerRelative
00464 } EFI_TIMER_DELAY;
00465 
00482 typedef
00483 EFI_STATUS
00484 (EFIAPI *EFI_SET_TIMER)(
00485   IN  EFI_EVENT                Event,
00486   IN  EFI_TIMER_DELAY          Type,
00487   IN  UINT64                   TriggerTime
00488   );
00489 
00498 typedef
00499 EFI_STATUS
00500 (EFIAPI *EFI_SIGNAL_EVENT)(
00501   IN  EFI_EVENT                Event
00502   );
00503 
00518 typedef
00519 EFI_STATUS
00520 (EFIAPI *EFI_WAIT_FOR_EVENT)(
00521   IN  UINTN                    NumberOfEvents,
00522   IN  EFI_EVENT                *Event,
00523   OUT UINTN                    *Index
00524   );
00525 
00534 typedef
00535 EFI_STATUS
00536 (EFIAPI *EFI_CLOSE_EVENT)(
00537   IN EFI_EVENT                Event
00538   );
00539 
00550 typedef
00551 EFI_STATUS
00552 (EFIAPI *EFI_CHECK_EVENT)(
00553   IN EFI_EVENT                Event
00554   );
00555 
00556 
00557 //
00558 // Task priority level
00559 //
00560 #define TPL_APPLICATION       4
00561 #define TPL_CALLBACK          8
00562 #define TPL_NOTIFY            16
00563 #define TPL_HIGH_LEVEL        31
00564 
00565 
00574 typedef
00575 EFI_TPL
00576 (EFIAPI *EFI_RAISE_TPL)(
00577   IN EFI_TPL      NewTpl
00578   );
00579 
00586 typedef
00587 VOID
00588 (EFIAPI *EFI_RESTORE_TPL)(
00589   IN EFI_TPL      OldTpl
00590   );
00591 
00615 typedef
00616 EFI_STATUS
00617 (EFIAPI *EFI_GET_VARIABLE)(
00618   IN     CHAR16                      *VariableName,
00619   IN     EFI_GUID                    *VendorGuid,
00620   OUT    UINT32                      *Attributes,    OPTIONAL
00621   IN OUT UINTN                       *DataSize,
00622   OUT    VOID                        *Data
00623   );
00624 
00645 typedef
00646 EFI_STATUS
00647 (EFIAPI *EFI_GET_NEXT_VARIABLE_NAME)(
00648   IN OUT UINTN                    *VariableNameSize,
00649   IN OUT CHAR16                   *VariableName,
00650   IN OUT EFI_GUID                 *VendorGuid
00651   );
00652 
00681 typedef
00682 EFI_STATUS
00683 (EFIAPI *EFI_SET_VARIABLE)(
00684   IN  CHAR16                       *VariableName,
00685   IN  EFI_GUID                     *VendorGuid,
00686   IN  UINT32                       Attributes,
00687   IN  UINTN                        DataSize,
00688   IN  VOID                         *Data
00689   );
00690 
00691 
00696 typedef struct {
00703   UINT32    Resolution;
00710   UINT32    Accuracy;
00718   BOOLEAN   SetsToZero;
00719 } EFI_TIME_CAPABILITIES;
00720 
00734 typedef
00735 EFI_STATUS
00736 (EFIAPI *EFI_GET_TIME)(
00737   OUT  EFI_TIME                    *Time,
00738   OUT  EFI_TIME_CAPABILITIES       *Capabilities OPTIONAL
00739   );
00740 
00751 typedef
00752 EFI_STATUS
00753 (EFIAPI *EFI_SET_TIME)(
00754   IN  EFI_TIME                     *Time
00755   );
00756 
00772 typedef
00773 EFI_STATUS
00774 (EFIAPI *EFI_GET_WAKEUP_TIME)(
00775   OUT BOOLEAN                     *Enabled,
00776   OUT BOOLEAN                     *Pending,
00777   OUT EFI_TIME                    *Time
00778   );
00779 
00794 typedef
00795 EFI_STATUS
00796 (EFIAPI *EFI_SET_WAKEUP_TIME)(
00797   IN  BOOLEAN                      Enable,
00798   IN  EFI_TIME                     *Time   OPTIONAL
00799   );
00800 
00831 typedef
00832 EFI_STATUS
00833 (EFIAPI *EFI_IMAGE_LOAD)(
00834   IN  BOOLEAN                      BootPolicy,
00835   IN  EFI_HANDLE                   ParentImageHandle,
00836   IN  EFI_DEVICE_PATH_PROTOCOL     *DevicePath,
00837   IN  VOID                         *SourceBuffer OPTIONAL,
00838   IN  UINTN                        SourceSize,
00839   OUT EFI_HANDLE                   *ImageHandle
00840   );
00841 
00855 typedef
00856 EFI_STATUS
00857 (EFIAPI *EFI_IMAGE_START)(
00858   IN  EFI_HANDLE                  ImageHandle,
00859   OUT UINTN                       *ExitDataSize,
00860   OUT CHAR16                      **ExitData    OPTIONAL
00861   );
00862 
00883 typedef
00884 EFI_STATUS
00885 (EFIAPI *EFI_EXIT)(
00886   IN  EFI_HANDLE                   ImageHandle,
00887   IN  EFI_STATUS                   ExitStatus,
00888   IN  UINTN                        ExitDataSize,
00889   IN  CHAR16                       *ExitData     OPTIONAL
00890   );
00891 
00901 typedef
00902 EFI_STATUS
00903 (EFIAPI *EFI_IMAGE_UNLOAD)(
00904   IN  EFI_HANDLE                   ImageHandle
00905   );
00906 
00917 typedef
00918 EFI_STATUS
00919 (EFIAPI *EFI_EXIT_BOOT_SERVICES)(
00920   IN  EFI_HANDLE                   ImageHandle,
00921   IN  UINTN                        MapKey
00922   );
00923 
00933 typedef
00934 EFI_STATUS
00935 (EFIAPI *EFI_STALL)(
00936   IN  UINTN                    Microseconds
00937   );
00938 
00955 typedef
00956 EFI_STATUS
00957 (EFIAPI *EFI_SET_WATCHDOG_TIMER)(
00958   IN UINTN                    Timeout,
00959   IN UINT64                   WatchdogCode,
00960   IN UINTN                    DataSize,
00961   IN CHAR16                   *WatchdogData OPTIONAL
00962   );
00963 
00967 typedef enum {
00974   EfiResetCold,
00980   EfiResetWarm,
00986   EfiResetShutdown
00987 } EFI_RESET_TYPE;
00988 
01000 typedef
01001 VOID
01002 (EFIAPI *EFI_RESET_SYSTEM)(
01003   IN EFI_RESET_TYPE           ResetType,
01004   IN EFI_STATUS               ResetStatus,
01005   IN UINTN                    DataSize,
01006   IN VOID                     *ResetData OPTIONAL
01007   );
01008 
01019 typedef
01020 EFI_STATUS
01021 (EFIAPI *EFI_GET_NEXT_MONOTONIC_COUNT)(
01022   OUT UINT64                  *Count
01023   );
01024 
01035 typedef
01036 EFI_STATUS
01037 (EFIAPI *EFI_GET_NEXT_HIGH_MONO_COUNT)(
01038   OUT UINT32                  *HighCount
01039   );
01040 
01056 typedef
01057 EFI_STATUS
01058 (EFIAPI *EFI_CALCULATE_CRC32)(
01059   IN  VOID                              *Data,
01060   IN  UINTN                             DataSize,
01061   OUT UINT32                            *Crc32
01062   );
01063 
01072 typedef
01073 VOID
01074 (EFIAPI *EFI_COPY_MEM)(
01075   IN VOID     *Destination,
01076   IN VOID     *Source,
01077   IN UINTN    Length
01078   );
01079 
01088 typedef
01089 VOID
01090 (EFIAPI *EFI_SET_MEM)(
01091   IN VOID     *Buffer,
01092   IN UINTN    Size,
01093   IN UINT8    Value
01094   );
01095 
01099 typedef enum {
01103   EFI_NATIVE_INTERFACE
01104 } EFI_INTERFACE_TYPE;
01105 
01126 typedef
01127 EFI_STATUS
01128 (EFIAPI *EFI_INSTALL_PROTOCOL_INTERFACE)(
01129   IN OUT EFI_HANDLE               *Handle,
01130   IN     EFI_GUID                 *Protocol,
01131   IN     EFI_INTERFACE_TYPE       InterfaceType,
01132   IN     VOID                     *Interface
01133   );
01134 
01149 typedef
01150 EFI_STATUS
01151 (EFIAPI *EFI_INSTALL_MULTIPLE_PROTOCOL_INTERFACES)(
01152   IN OUT EFI_HANDLE           *Handle,
01153   ...
01154   );
01155 
01174 typedef
01175 EFI_STATUS
01176 (EFIAPI *EFI_REINSTALL_PROTOCOL_INTERFACE)(
01177   IN EFI_HANDLE               Handle,
01178   IN EFI_GUID                 *Protocol,
01179   IN VOID                     *OldInterface,
01180   IN VOID                     *NewInterface
01181   );
01182 
01200 typedef
01201 EFI_STATUS
01202 (EFIAPI *EFI_UNINSTALL_PROTOCOL_INTERFACE)(
01203   IN EFI_HANDLE               Handle,
01204   IN EFI_GUID                 *Protocol,
01205   IN VOID                     *Interface
01206   );
01207 
01219 typedef
01220 EFI_STATUS
01221 (EFIAPI *EFI_UNINSTALL_MULTIPLE_PROTOCOL_INTERFACES)(
01222   IN EFI_HANDLE           Handle,
01223   ...
01224   );
01225 
01241 typedef
01242 EFI_STATUS
01243 (EFIAPI *EFI_HANDLE_PROTOCOL)(
01244   IN  EFI_HANDLE               Handle,
01245   IN  EFI_GUID                 *Protocol,
01246   OUT VOID                     **Interface
01247   );
01248 
01249 #define EFI_OPEN_PROTOCOL_BY_HANDLE_PROTOCOL  0x00000001
01250 #define EFI_OPEN_PROTOCOL_GET_PROTOCOL        0x00000002
01251 #define EFI_OPEN_PROTOCOL_TEST_PROTOCOL       0x00000004
01252 #define EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER 0x00000008
01253 #define EFI_OPEN_PROTOCOL_BY_DRIVER           0x00000010
01254 #define EFI_OPEN_PROTOCOL_EXCLUSIVE           0x00000020
01255 
01283 typedef
01284 EFI_STATUS
01285 (EFIAPI *EFI_OPEN_PROTOCOL)(
01286   IN  EFI_HANDLE                Handle,
01287   IN  EFI_GUID                  *Protocol,
01288   OUT VOID                      **Interface, OPTIONAL
01289   IN  EFI_HANDLE                AgentHandle,
01290   IN  EFI_HANDLE                ControllerHandle,
01291   IN  UINT32                    Attributes
01292   );
01293 
01294 
01316 typedef
01317 EFI_STATUS
01318 (EFIAPI *EFI_CLOSE_PROTOCOL)(
01319   IN EFI_HANDLE               Handle,
01320   IN EFI_GUID                 *Protocol,
01321   IN EFI_HANDLE               AgentHandle,
01322   IN EFI_HANDLE               ControllerHandle
01323   );
01324 
01328 typedef struct {
01329   EFI_HANDLE  AgentHandle;
01330   EFI_HANDLE  ControllerHandle;
01331   UINT32      Attributes;
01332   UINT32      OpenCount;
01333 } EFI_OPEN_PROTOCOL_INFORMATION_ENTRY;
01334 
01350 typedef
01351 EFI_STATUS
01352 (EFIAPI *EFI_OPEN_PROTOCOL_INFORMATION)(
01353   IN  EFI_HANDLE                          Handle,
01354   IN  EFI_GUID                            *Protocol,
01355   OUT EFI_OPEN_PROTOCOL_INFORMATION_ENTRY **EntryBuffer,
01356   OUT UINTN                               *EntryCount
01357   );
01358 
01380 typedef
01381 EFI_STATUS
01382 (EFIAPI *EFI_PROTOCOLS_PER_HANDLE)(
01383   IN  EFI_HANDLE      Handle,
01384   OUT EFI_GUID        ***ProtocolBuffer,
01385   OUT UINTN           *ProtocolBufferCount
01386   );
01387 
01403 typedef
01404 EFI_STATUS
01405 (EFIAPI *EFI_REGISTER_PROTOCOL_NOTIFY)(
01406   IN  EFI_GUID                 *Protocol,
01407   IN  EFI_EVENT                Event,
01408   OUT VOID                     **Registration
01409   );
01410 
01414 typedef enum {
01418   AllHandles,
01422   ByRegisterNotify,
01427   ByProtocol
01428 } EFI_LOCATE_SEARCH_TYPE;
01429 
01452 typedef
01453 EFI_STATUS
01454 (EFIAPI *EFI_LOCATE_HANDLE)(
01455   IN     EFI_LOCATE_SEARCH_TYPE   SearchType,
01456   IN     EFI_GUID                 *Protocol,    OPTIONAL
01457   IN     VOID                     *SearchKey,   OPTIONAL
01458   IN OUT UINTN                    *BufferSize,
01459   OUT    EFI_HANDLE               *Buffer
01460   );
01461 
01478 typedef
01479 EFI_STATUS
01480 (EFIAPI *EFI_LOCATE_DEVICE_PATH)(
01481   IN     EFI_GUID                         *Protocol,
01482   IN OUT EFI_DEVICE_PATH_PROTOCOL         **DevicePath,
01483   OUT    EFI_HANDLE                       *Device
01484   );
01485 
01499 typedef
01500 EFI_STATUS
01501 (EFIAPI *EFI_INSTALL_CONFIGURATION_TABLE)(
01502   IN EFI_GUID                 *Guid,
01503   IN VOID                     *Table
01504   );
01505 
01525 typedef
01526 EFI_STATUS
01527 (EFIAPI *EFI_LOCATE_HANDLE_BUFFER)(
01528   IN     EFI_LOCATE_SEARCH_TYPE       SearchType,
01529   IN     EFI_GUID                     *Protocol,      OPTIONAL
01530   IN     VOID                         *SearchKey,     OPTIONAL
01531   IN OUT UINTN                        *NoHandles,
01532   OUT    EFI_HANDLE                   **Buffer
01533   );
01534 
01551 typedef
01552 EFI_STATUS
01553 (EFIAPI *EFI_LOCATE_PROTOCOL)(
01554   IN  EFI_GUID  *Protocol,
01555   IN  VOID      *Registration, OPTIONAL
01556   OUT VOID      **Interface
01557   );
01558 
01562 typedef struct {
01566   UINT64                  Length;
01567   union {
01572     EFI_PHYSICAL_ADDRESS  DataBlock;
01579     EFI_PHYSICAL_ADDRESS  ContinuationPointer;
01580   } Union;
01581 } EFI_CAPSULE_BLOCK_DESCRIPTOR;
01582 
01586 typedef struct {
01590   EFI_GUID          CapsuleGuid;
01596   UINT32            HeaderSize;
01602   UINT32            Flags;
01606   UINT32            CapsuleImageSize;
01607 } EFI_CAPSULE_HEADER;
01608 
01614 typedef struct {
01618   UINT32   CapsuleArrayNumber;
01622   VOID*    CapsulePtr[1];
01623 } EFI_CAPSULE_TABLE;
01624 
01625 #define CAPSULE_FLAGS_PERSIST_ACROSS_RESET          0x00010000
01626 #define CAPSULE_FLAGS_POPULATE_SYSTEM_TABLE         0x00020000
01627 #define CAPSULE_FLAGS_INITIATE_RESET                0x00040000
01628 
01655 typedef
01656 EFI_STATUS
01657 (EFIAPI *EFI_UPDATE_CAPSULE)(
01658   IN EFI_CAPSULE_HEADER     **CapsuleHeaderArray,
01659   IN UINTN                  CapsuleCount,
01660   IN EFI_PHYSICAL_ADDRESS   ScatterGatherList   OPTIONAL
01661   );
01662 
01682 typedef
01683 EFI_STATUS
01684 (EFIAPI *EFI_QUERY_CAPSULE_CAPABILITIES)(
01685   IN  EFI_CAPSULE_HEADER     **CapsuleHeaderArray,
01686   IN  UINTN                  CapsuleCount,
01687   OUT UINT64                 *MaximumCapsuleSize,
01688   OUT EFI_RESET_TYPE         *ResetType
01689   );
01690 
01713 typedef
01714 EFI_STATUS
01715 (EFIAPI *EFI_QUERY_VARIABLE_INFO)(
01716   IN  UINT32            Attributes,
01717   OUT UINT64            *MaximumVariableStorageSize,
01718   OUT UINT64            *RemainingVariableStorageSize,
01719   OUT UINT64            *MaximumVariableSize
01720   );
01721 
01722 
01723 //
01724 // EFI Runtime Services Table
01725 //
01726 #define EFI_SYSTEM_TABLE_SIGNATURE      SIGNATURE_64 ('I','B','I',' ','S','Y','S','T')
01727 #define EFI_2_31_SYSTEM_TABLE_REVISION  ((2 << 16) | (31))
01728 #define EFI_2_30_SYSTEM_TABLE_REVISION  ((2 << 16) | (30))
01729 #define EFI_2_20_SYSTEM_TABLE_REVISION  ((2 << 16) | (20))
01730 #define EFI_2_10_SYSTEM_TABLE_REVISION  ((2 << 16) | (10))
01731 #define EFI_2_00_SYSTEM_TABLE_REVISION  ((2 << 16) | (00))
01732 #define EFI_1_10_SYSTEM_TABLE_REVISION  ((1 << 16) | (10))
01733 #define EFI_1_02_SYSTEM_TABLE_REVISION  ((1 << 16) | (02))
01734 #define EFI_SYSTEM_TABLE_REVISION       EFI_2_31_SYSTEM_TABLE_REVISION
01735 
01736 #define EFI_RUNTIME_SERVICES_SIGNATURE  SIGNATURE_64 ('R','U','N','T','S','E','R','V')
01737 #define EFI_RUNTIME_SERVICES_REVISION   EFI_2_31_SYSTEM_TABLE_REVISION
01738 
01742 typedef struct {
01746   EFI_TABLE_HEADER                Hdr;
01747 
01748   //
01749   // Time Services
01750   //
01751   EFI_GET_TIME                    GetTime;
01752   EFI_SET_TIME                    SetTime;
01753   EFI_GET_WAKEUP_TIME             GetWakeupTime;
01754   EFI_SET_WAKEUP_TIME             SetWakeupTime;
01755 
01756   //
01757   // Virtual Memory Services
01758   //
01759   EFI_SET_VIRTUAL_ADDRESS_MAP     SetVirtualAddressMap;
01760   EFI_CONVERT_POINTER             ConvertPointer;
01761 
01762   //
01763   // Variable Services
01764   //
01765   EFI_GET_VARIABLE                GetVariable;
01766   EFI_GET_NEXT_VARIABLE_NAME      GetNextVariableName;
01767   EFI_SET_VARIABLE                SetVariable;
01768 
01769   //
01770   // Miscellaneous Services
01771   //
01772   EFI_GET_NEXT_HIGH_MONO_COUNT    GetNextHighMonotonicCount;
01773   EFI_RESET_SYSTEM                ResetSystem;
01774 
01775   //
01776   // UEFI 2.0 Capsule Services
01777   //
01778   EFI_UPDATE_CAPSULE              UpdateCapsule;
01779   EFI_QUERY_CAPSULE_CAPABILITIES  QueryCapsuleCapabilities;
01780 
01781   //
01782   // Miscellaneous UEFI 2.0 Service
01783   //
01784   EFI_QUERY_VARIABLE_INFO         QueryVariableInfo;
01785 } EFI_RUNTIME_SERVICES;
01786 
01787 
01788 #define EFI_BOOT_SERVICES_SIGNATURE   SIGNATURE_64 ('B','O','O','T','S','E','R','V')
01789 #define EFI_BOOT_SERVICES_REVISION    EFI_2_31_SYSTEM_TABLE_REVISION
01790 
01794 typedef struct {
01798   EFI_TABLE_HEADER                Hdr;
01799 
01800   //
01801   // Task Priority Services
01802   //
01803   EFI_RAISE_TPL                   RaiseTPL;
01804   EFI_RESTORE_TPL                 RestoreTPL;
01805 
01806   //
01807   // Memory Services
01808   //
01809   EFI_ALLOCATE_PAGES              AllocatePages;
01810   EFI_FREE_PAGES                  FreePages;
01811   EFI_GET_MEMORY_MAP              GetMemoryMap;
01812   EFI_ALLOCATE_POOL               AllocatePool;
01813   EFI_FREE_POOL                   FreePool;
01814 
01815   //
01816   // Event & Timer Services
01817   //
01818   EFI_CREATE_EVENT                  CreateEvent;
01819   EFI_SET_TIMER                     SetTimer;
01820   EFI_WAIT_FOR_EVENT                WaitForEvent;
01821   EFI_SIGNAL_EVENT                  SignalEvent;
01822   EFI_CLOSE_EVENT                   CloseEvent;
01823   EFI_CHECK_EVENT                   CheckEvent;
01824 
01825   //
01826   // Protocol Handler Services
01827   //
01828   EFI_INSTALL_PROTOCOL_INTERFACE    InstallProtocolInterface;
01829   EFI_REINSTALL_PROTOCOL_INTERFACE  ReinstallProtocolInterface;
01830   EFI_UNINSTALL_PROTOCOL_INTERFACE  UninstallProtocolInterface;
01831   EFI_HANDLE_PROTOCOL               HandleProtocol;
01832   VOID                              *Reserved;
01833   EFI_REGISTER_PROTOCOL_NOTIFY      RegisterProtocolNotify;
01834   EFI_LOCATE_HANDLE                 LocateHandle;
01835   EFI_LOCATE_DEVICE_PATH            LocateDevicePath;
01836   EFI_INSTALL_CONFIGURATION_TABLE   InstallConfigurationTable;
01837 
01838   //
01839   // Image Services
01840   //
01841   EFI_IMAGE_LOAD                    LoadImage;
01842   EFI_IMAGE_START                   StartImage;
01843   EFI_EXIT                          Exit;
01844   EFI_IMAGE_UNLOAD                  UnloadImage;
01845   EFI_EXIT_BOOT_SERVICES            ExitBootServices;
01846 
01847   //
01848   // Miscellaneous Services
01849   //
01850   EFI_GET_NEXT_MONOTONIC_COUNT      GetNextMonotonicCount;
01851   EFI_STALL                         Stall;
01852   EFI_SET_WATCHDOG_TIMER            SetWatchdogTimer;
01853 
01854   //
01855   // DriverSupport Services
01856   //
01857   EFI_CONNECT_CONTROLLER            ConnectController;
01858   EFI_DISCONNECT_CONTROLLER         DisconnectController;
01859 
01860   //
01861   // Open and Close Protocol Services
01862   //
01863   EFI_OPEN_PROTOCOL                 OpenProtocol;
01864   EFI_CLOSE_PROTOCOL                CloseProtocol;
01865   EFI_OPEN_PROTOCOL_INFORMATION     OpenProtocolInformation;
01866 
01867   //
01868   // Library Services
01869   //
01870   EFI_PROTOCOLS_PER_HANDLE          ProtocolsPerHandle;
01871   EFI_LOCATE_HANDLE_BUFFER          LocateHandleBuffer;
01872   EFI_LOCATE_PROTOCOL               LocateProtocol;
01873   EFI_INSTALL_MULTIPLE_PROTOCOL_INTERFACES    InstallMultipleProtocolInterfaces;
01874   EFI_UNINSTALL_MULTIPLE_PROTOCOL_INTERFACES  UninstallMultipleProtocolInterfaces;
01875 
01876   //
01877   // 32-bit CRC Services
01878   //
01879   EFI_CALCULATE_CRC32               CalculateCrc32;
01880 
01881   //
01882   // Miscellaneous Services
01883   //
01884   EFI_COPY_MEM                      CopyMem;
01885   EFI_SET_MEM                       SetMem;
01886   EFI_CREATE_EVENT_EX               CreateEventEx;
01887 } EFI_BOOT_SERVICES;
01888 
01893 typedef struct {
01897   EFI_GUID                          VendorGuid;
01901   VOID                              *VendorTable;
01902 } EFI_CONFIGURATION_TABLE;
01903 
01907 typedef struct {
01911   EFI_TABLE_HEADER                  Hdr;
01916   CHAR16                            *FirmwareVendor;
01921   UINT32                            FirmwareRevision;
01926   EFI_HANDLE                        ConsoleInHandle;
01931   EFI_SIMPLE_TEXT_INPUT_PROTOCOL    *ConIn;
01935   EFI_HANDLE                        ConsoleOutHandle;
01940   EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL   *ConOut;
01945   EFI_HANDLE                        StandardErrorHandle;
01950   EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL   *StdErr;
01954   EFI_RUNTIME_SERVICES              *RuntimeServices;
01958   EFI_BOOT_SERVICES                 *BootServices;
01962   UINTN                             NumberOfTableEntries;
01967   EFI_CONFIGURATION_TABLE           *ConfigurationTable;
01968 } EFI_SYSTEM_TABLE;
01969 
01981 typedef
01982 EFI_STATUS
01983 (EFIAPI *EFI_IMAGE_ENTRY_POINT)(
01984   IN  EFI_HANDLE                   ImageHandle,
01985   IN  EFI_SYSTEM_TABLE             *SystemTable
01986   );
01987 
01988 //
01989 // EFI Load Options Attributes
01990 //
01991 #define LOAD_OPTION_ACTIVE            0x00000001
01992 #define LOAD_OPTION_FORCE_RECONNECT   0x00000002
01993 #define LOAD_OPTION_HIDDEN            0x00000008
01994 #define LOAD_OPTION_CATEGORY          0x00001F00
01995 
01996 #define LOAD_OPTION_CATEGORY_BOOT     0x00000000
01997 #define LOAD_OPTION_CATEGORY_APP      0x00000100
01998 
01999 #define EFI_BOOT_OPTION_SUPPORT_KEY   0x00000001
02000 #define EFI_BOOT_OPTION_SUPPORT_APP   0x00000002
02001 #define EFI_BOOT_OPTION_SUPPORT_COUNT 0x00000300
02002 
02006 typedef union {
02007   struct {
02011     UINT32  Revision        : 8;
02015     UINT32  ShiftPressed    : 1;
02019     UINT32  ControlPressed  : 1;
02023     UINT32  AltPressed      : 1;
02027     UINT32  LogoPressed     : 1;
02031     UINT32  MenuPressed     : 1;
02035     UINT32  SysReqPressed    : 1;
02036     UINT32  Reserved        : 16;
02042     UINT32  InputKeyCount   : 2;
02043   } Options;
02044   UINT32  PackedValue;
02045 } EFI_BOOT_KEY_DATA;
02046 
02050 typedef struct {
02054   EFI_BOOT_KEY_DATA  KeyData;
02060   UINT32             BootOptionCrc;
02065   UINT16             BootOption;
02071   //EFI_INPUT_KEY      Keys[];
02072 } EFI_KEY_OPTION;
02073 
02074 //
02075 // EFI File location to boot from on removable media devices
02076 //
02077 #define EFI_REMOVABLE_MEDIA_FILE_NAME_IA32    L"\\EFI\\BOOT\\BOOTIA32.EFI"
02078 #define EFI_REMOVABLE_MEDIA_FILE_NAME_IA64    L"\\EFI\\BOOT\\BOOTIA64.EFI"
02079 #define EFI_REMOVABLE_MEDIA_FILE_NAME_X64     L"\\EFI\\BOOT\\BOOTX64.EFI"
02080 #define EFI_REMOVABLE_MEDIA_FILE_NAME_ARM     L"\\EFI\\BOOT\\BOOTARM.EFI"
02081 
02082 #if   defined (MDE_CPU_IA32)
02083   #define EFI_REMOVABLE_MEDIA_FILE_NAME   EFI_REMOVABLE_MEDIA_FILE_NAME_IA32
02084 #elif defined (MDE_CPU_IPF)
02085   #define EFI_REMOVABLE_MEDIA_FILE_NAME   EFI_REMOVABLE_MEDIA_FILE_NAME_IA64
02086 #elif defined (MDE_CPU_X64)
02087   #define EFI_REMOVABLE_MEDIA_FILE_NAME   EFI_REMOVABLE_MEDIA_FILE_NAME_X64
02088 #elif defined (MDE_CPU_EBC)
02089 #elif defined (MDE_CPU_ARM)
02090   #define EFI_REMOVABLE_MEDIA_FILE_NAME   EFI_REMOVABLE_MEDIA_FILE_NAME_ARM
02091 #else
02092   #error Unknown Processor Type
02093 #endif
02094 
02095 #include <Uefi/UefiPxe.h>
02096 #include <Uefi/UefiGpt.h>
02097 #include <Uefi/UefiInternalFormRepresentation.h>
02098 
02099 #endif
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Defines