Update global protocol GUIDs definitions to match EDK2
This patch introduces the use of the EDK2 names for the global GUID variables, to allow for easier code conversion between EDK2 and gnu-efi. All the existing GUID global variables have also been aliased for backwards compatibility. The patch also completes some of the earlier work with regards to protocol struct definitions to also match the EDK2, with the following caveat: Because some of gnu-efi GUID macro definitions were declared with the name that the EDK2 uses for the protocol struct itself, we have to immediately deprecate the following GUID data aliases: EFI_NETWORK_INTERFACE_IDENTIFIER_PROTOCOL EFI_SIMPLE_NETWORK_PROTOCOL EFI_PCI_IO_PROTOCOL EFI_PXE_BASE_CODE_CALLBACK_PROTOCOL This means that existing code using one of the above will break on compilation. To mitigate this, explicit warnings have been placed at the location where a developer will look for breakage, detailing how they should amend their code. The KnownGuids short labels in guid.c were also updated/amended in a manner that should be a bit more consistent (though I have no idea what the EDK2 does here, since I haven't looked at the actual EDK2 source). Finally, besides clean up (typo, whitespaces, duplicate removal), we introduce the _GNU_EFI macro, in efi.h, to allow for conditional selection of specific gnu-efi API calls, in code that may be compiled with either EDK2 or gnu-efi. Signed-off-by: Pete Batard <pete@akeo.ie> Signed-off-by: Nigel Croxon <nigel.croxon@hpe.com>
This commit is contained in:
parent
7993cbcc72
commit
751cbce3f6
@ -16,6 +16,12 @@ Revision History
|
||||
|
||||
--*/
|
||||
|
||||
|
||||
// Add a predefined macro to detect usage of the library
|
||||
#ifndef _GNU_EFI
|
||||
#define _GNU_EFI
|
||||
#endif
|
||||
|
||||
//
|
||||
// Build flags on input
|
||||
// EFI32
|
||||
|
@ -17,16 +17,17 @@ Revision history:
|
||||
2000-Feb-14 M(f)J Genesis.
|
||||
--*/
|
||||
|
||||
#define EFI_NETWORK_INTERFACE_IDENTIFIER_PROTOCOL \
|
||||
#define EFI_NETWORK_INTERFACE_IDENTIFIER_PROTOCOL_GUID \
|
||||
{ 0xE18541CD, 0xF755, 0x4f73, {0x92, 0x8D, 0x64, 0x3C, 0x8A, 0x79, 0xB2, 0x29} }
|
||||
|
||||
#define EFI_NETWORK_INTERFACE_IDENTIFIER_INTERFACE_REVISION 0x00010000
|
||||
#define EFI_NETWORK_INTERFACE_IDENTIFIER_PROTOCOL_REVISION 0x00010000
|
||||
#define EFI_NETWORK_INTERFACE_IDENTIFIER_INTERFACE_REVISION EFI_NETWORK_INTERFACE_IDENTIFIER_PROTOCOL_REVISION
|
||||
|
||||
typedef enum {
|
||||
EfiNetworkInterfaceUndi = 1
|
||||
} EFI_NETWORK_INTERFACE_TYPE;
|
||||
|
||||
typedef struct {
|
||||
typedef struct _EFI_NETWORK_INTERFACE_IDENTIFIER_PROTOCOL {
|
||||
|
||||
UINT64 Revision;
|
||||
// Revision of the network interface identifier protocol interface.
|
||||
@ -67,8 +68,11 @@ typedef struct {
|
||||
// be placed into DHCP option 94 (client network interface identifier).
|
||||
BOOLEAN Ipv6Supported;
|
||||
UINT8 IfNum; // interface number to be used with pxeid structure
|
||||
} EFI_NETWORK_INTERFACE_IDENTIFIER_INTERFACE;
|
||||
} EFI_NETWORK_INTERFACE_IDENTIFIER_PROTOCOL, EFI_NETWORK_INTERFACE_IDENTIFIER_INTERFACE;
|
||||
|
||||
extern EFI_GUID NetworkInterfaceIdentifierProtocol;
|
||||
// Note: Because it conflicted with the EDK2 struct name, the
|
||||
// 'EFI_NETWORK_INTERFACE_IDENTIFIER_PROTOCOL' GUID definition,
|
||||
// from older versions of gnu-efi, is now obsoleted.
|
||||
// Use 'EFI_NETWORK_INTERFACE_IDENTIFIER_PROTOCOL_GUID' instead.
|
||||
|
||||
#endif // _EFI_NII_H
|
||||
|
@ -23,8 +23,9 @@ Revision History
|
||||
// Text output protocol
|
||||
//
|
||||
|
||||
#define SIMPLE_TEXT_OUTPUT_PROTOCOL \
|
||||
#define EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL_GUID \
|
||||
{ 0x387477c2, 0x69c7, 0x11d2, {0x8e, 0x39, 0x0, 0xa0, 0xc9, 0x69, 0x72, 0x3b} }
|
||||
#define SIMPLE_TEXT_OUTPUT_PROTOCOL EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL_GUID
|
||||
|
||||
INTERFACE_DECL(_SIMPLE_TEXT_OUTPUT_INTERFACE);
|
||||
|
||||
@ -231,8 +232,9 @@ typedef struct _SIMPLE_TEXT_OUTPUT_INTERFACE {
|
||||
// Text input protocol
|
||||
//
|
||||
|
||||
#define SIMPLE_TEXT_INPUT_PROTOCOL \
|
||||
#define EFI_SIMPLE_TEXT_INPUT_PROTOCOL_GUID \
|
||||
{ 0x387477c1, 0x69c7, 0x11d2, {0x8e, 0x39, 0x0, 0xa0, 0xc9, 0x69, 0x72, 0x3b} }
|
||||
#define SIMPLE_TEXT_INPUT_PROTOCOL EFI_SIMPLE_TEXT_INPUT_PROTOCOL_GUID
|
||||
|
||||
INTERFACE_DECL(_SIMPLE_INPUT_INTERFACE);
|
||||
|
||||
|
@ -345,29 +345,21 @@ typedef struct _UART_DEVICE_PATH {
|
||||
#define MSG_VENDOR_DP 0x0A
|
||||
/* Use VENDOR_DEVICE_PATH struct */
|
||||
|
||||
#define DEVICE_PATH_MESSAGING_PC_ANSI \
|
||||
{ 0xe0c14753, 0xf9be, 0x11d2, {0x9a, 0x0c, 0x00, 0x90, 0x27, 0x3f, 0xc1, 0x4d} }
|
||||
|
||||
#define DEVICE_PATH_MESSAGING_VT_100 \
|
||||
{ 0xdfa66065, 0xb419, 0x11d3, {0x9a, 0x2d, 0x00, 0x90, 0x27, 0x3f, 0xc1, 0x4d} }
|
||||
|
||||
#define DEVICE_PATH_MESSAGING_VT_100_PLUS \
|
||||
{ 0x7baec70b , 0x57e0 , 0x4c76 , { 0x8e , 0x87 , 0x2f , 0x9e , 0x28 , 0x08 , 0x83 , 0x43 } }
|
||||
|
||||
#define DEVICE_PATH_MESSAGING_VT_UTF8 \
|
||||
{ 0xad15a0d6 , 0x8bec , 0x4acf , { 0xa0 , 0x73 , 0xd0 , 0x1d , 0xe7 , 0x7e , 0x2d , 0x88 } }
|
||||
|
||||
#define EFI_PC_ANSI_GUID \
|
||||
{ 0xe0c14753 , 0xf9be , 0x11d2 , 0x9a , 0x0c , 0x00 , 0x90 , 0x27 , 0x3f , 0xc1 , 0x4d }
|
||||
{ 0xe0c14753, 0xf9be, 0x11d2, {0x9a, 0x0c, 0x00, 0x90, 0x27, 0x3f, 0xc1, 0x4d} }
|
||||
#define DEVICE_PATH_MESSAGING_PC_ANSI EFI_PC_ANSI_GUID
|
||||
|
||||
#define EFI_VT_100_GUID \
|
||||
{ 0xdfa66065 , 0xb419 , 0x11d3 , 0x9a , 0x2d , 0x00 , 0x90 , 0x27 , 0x3f , 0xc1 , 0x4d }
|
||||
{ 0xdfa66065, 0xb419, 0x11d3, {0x9a, 0x2d, 0x00, 0x90, 0x27, 0x3f, 0xc1, 0x4d} }
|
||||
#define DEVICE_PATH_MESSAGING_VT_100 EFI_VT_100_GUID
|
||||
|
||||
#define EFI_VT_100_PLUS_GUID \
|
||||
{ 0x7baec70b , 0x57e0 , 0x4c76 , 0x8e , 0x87 , 0x2f , 0x9e , 0x28 , 0x08 , 0x83 , 0x43 }
|
||||
{ 0x7baec70b, 0x57e0, 0x4c76, {0x8e, 0x87, 0x2f, 0x9e, 0x28, 0x08, 0x83, 0x43} }
|
||||
#define DEVICE_PATH_MESSAGING_VT_100_PLUS EFI_VT_100_PLUS_GUID
|
||||
|
||||
#define EFI_VT_UTF8_GUID \
|
||||
{ 0xad15a0d6 , 0x8bec , 0x4acf , 0xa0 , 0x73 , 0xd0 , 0x1d , 0xe7 , 0x7e , 0x2d , 0x88 }
|
||||
{ 0xad15a0d6, 0x8bec, 0x4acf, {0xa0, 0x73, 0xd0, 0x1d, 0xe7, 0x7e, 0x2d, 0x88} }
|
||||
#define DEVICE_PATH_MESSAGING_VT_UTF8 EFI_VT_UTF8_GUID
|
||||
|
||||
|
||||
/*
|
||||
|
117
inc/efilib.h
117
inc/efilib.h
@ -36,52 +36,93 @@ extern EFI_SYSTEM_TABLE *ST;
|
||||
extern EFI_BOOT_SERVICES *BS;
|
||||
extern EFI_RUNTIME_SERVICES *RT;
|
||||
|
||||
extern EFI_GUID DevicePathProtocol;
|
||||
extern EFI_GUID DevicePathToTextProtocol;
|
||||
extern EFI_GUID DevicePathFromTextProtocol;
|
||||
extern EFI_GUID LoadedImageProtocol;
|
||||
extern EFI_GUID TextInProtocol;
|
||||
extern EFI_GUID TextOutProtocol;
|
||||
extern EFI_GUID GraphicsOutputProtocol;
|
||||
extern EFI_GUID EdidDiscoveredProtocol;
|
||||
extern EFI_GUID EdidActiveProtocol;
|
||||
extern EFI_GUID EdidOverrideProtocol;
|
||||
extern EFI_GUID BlockIoProtocol;
|
||||
extern EFI_GUID BlockIo2Protocol;
|
||||
extern EFI_GUID DiskIoProtocol;
|
||||
extern EFI_GUID DiskIo2Protocol;
|
||||
extern EFI_GUID FileSystemProtocol;
|
||||
extern EFI_GUID LoadFileProtocol;
|
||||
extern EFI_GUID DeviceIoProtocol;
|
||||
extern EFI_GUID gEfiDevicePathProtocolGuid;
|
||||
#define DevicePathProtocol gEfiDevicePathProtocolGuid
|
||||
extern EFI_GUID gEfiDevicePathToTextProtocolGuid;
|
||||
#define DevicePathToTextProtocol gEfiDevicePathToTextProtocolGuid
|
||||
extern EFI_GUID gEfiDevicePathFromTextProtocolGuid;
|
||||
#define DevicePathFromTextProtocol gEfiDevicePathFromTextProtocolGuid
|
||||
extern EFI_GUID gEfiLoadedImageProtocolGuid;
|
||||
#define LoadedImageProtocol gEfiLoadedImageProtocolGuid
|
||||
extern EFI_GUID gEfiSimpleTextInProtocolGuid;
|
||||
#define TextInProtocol gEfiSimpleTextInProtocolGuid
|
||||
extern EFI_GUID gEfiSimpleTextOutProtocolGuid;
|
||||
#define TextOutProtocol gEfiSimpleTextOutProtocolGuid
|
||||
extern EFI_GUID gEfiGraphicsOutputProtocolGuid;
|
||||
#define GraphicsOutputProtocol gEfiGraphicsOutputProtocolGuid
|
||||
extern EFI_GUID gEfiEdidDiscoveredProtocolGuid;
|
||||
#define EdidDiscoveredProtocol gEfiEdidDiscoveredProtocolGuid
|
||||
extern EFI_GUID gEfiEdidActiveProtocolGuid;
|
||||
#define EdidActiveProtocol gEfiEdidActiveProtocolGuid
|
||||
extern EFI_GUID gEfiEdidOverrideProtocolGuid;
|
||||
#define EdidOverrideProtocol gEfiEdidOverrideProtocolGuid
|
||||
extern EFI_GUID gEfiBlockIoProtocolGuid;
|
||||
#define BlockIoProtocol gEfiBlockIoProtocolGuid
|
||||
extern EFI_GUID gEfiBlockIo2ProtocolGuid;
|
||||
#define BlockIo2Protocol gEfiBlockIo2ProtocolGuid
|
||||
extern EFI_GUID gEfiDiskIoProtocolGuid;
|
||||
#define DiskIoProtocol gEfiDiskIoProtocolGuid
|
||||
extern EFI_GUID gEfiDiskIo2ProtocolGuid;
|
||||
#define DiskIo2Protocol gEfiDiskIo2ProtocolGuid
|
||||
extern EFI_GUID gEfiSimpleFileSystemProtocolGuid;
|
||||
#define FileSystemProtocol gEfiSimpleFileSystemProtocolGuid
|
||||
extern EFI_GUID gEfiLoadFileProtocolGuid;
|
||||
#define LoadFileProtocol gEfiLoadFileProtocolGuid
|
||||
extern EFI_GUID gEfiDeviceIoProtocolGuid;
|
||||
#define DeviceIoProtocol gEfiDeviceIoProtocolGuid
|
||||
extern EFI_GUID VariableStoreProtocol;
|
||||
extern EFI_GUID LegacyBootProtocol;
|
||||
extern EFI_GUID UnicodeCollationProtocol;
|
||||
extern EFI_GUID SerialIoProtocol;
|
||||
extern EFI_GUID gEfiUnicodeCollationProtocolGuid;
|
||||
#define UnicodeCollationProtocol gEfiUnicodeCollationProtocolGuid
|
||||
extern EFI_GUID gEfiSerialIoProtocolGuid;
|
||||
#define SerialIoProtocol gEfiSerialIoProtocolGuid
|
||||
extern EFI_GUID VgaClassProtocol;
|
||||
extern EFI_GUID TextOutSpliterProtocol;
|
||||
extern EFI_GUID ErrorOutSpliterProtocol;
|
||||
extern EFI_GUID TextInSpliterProtocol;
|
||||
extern EFI_GUID SimpleNetworkProtocol;
|
||||
extern EFI_GUID PxeBaseCodeProtocol;
|
||||
extern EFI_GUID PxeCallbackProtocol;
|
||||
extern EFI_GUID NetworkInterfaceIdentifierProtocol;
|
||||
extern EFI_GUID UiProtocol;
|
||||
extern EFI_GUID gEfiSimpleNetworkProtocolGuid;
|
||||
#define SimpleNetworkProtocol gEfiSimpleNetworkProtocolGuid
|
||||
extern EFI_GUID gEfiPxeBaseCodeProtocolGuid;
|
||||
#define PxeBaseCodeProtocol gEfiPxeBaseCodeProtocolGuid
|
||||
extern EFI_GUID gEfiPxeBaseCodeCallbackProtocolGuid;
|
||||
#define PxeCallbackProtocol gEfiPxeBaseCodeCallbackProtocolGuid
|
||||
extern EFI_GUID gEfiNetworkInterfaceIdentifierProtocolGuid;
|
||||
#define NetworkInterfaceIdentifierProtocol gEfiNetworkInterfaceIdentifierProtocolGuid
|
||||
extern EFI_GUID gEFiUiInterfaceProtocolGuid;
|
||||
#define UiProtocol gEFiUiInterfaceProtocolGuid
|
||||
extern EFI_GUID InternalShellProtocol;
|
||||
extern EFI_GUID PciIoProtocol;
|
||||
extern EFI_GUID DriverBindingProtocol;
|
||||
extern EFI_GUID ComponentNameProtocol;
|
||||
extern EFI_GUID ComponentName2Protocol;
|
||||
extern EFI_GUID HashProtocol;
|
||||
extern EFI_GUID PlatformDriverOverrideProtocol;
|
||||
extern EFI_GUID BusSpecificDriverOverrideProtocol;
|
||||
extern EFI_GUID DriverFamilyOverrideProtocol;
|
||||
extern EFI_GUID gEfiPciIoProtocolGuid;
|
||||
#define PciIoProtocol gEfiPciIoProtocolGuid
|
||||
extern EFI_GUID gEfiDriverBindingProtocolGuid;
|
||||
#define DriverBindingProtocol gEfiDriverBindingProtocolGuid
|
||||
extern EFI_GUID gEfiComponentNameProtocolGuid;
|
||||
#define ComponentNameProtocol gEfiComponentNameProtocolGuid
|
||||
extern EFI_GUID gEfiComponentName2ProtocolGuid;
|
||||
#define ComponentName2Protocol gEfiComponentName2ProtocolGuid
|
||||
extern EFI_GUID gEfiHashProtocolGuid;
|
||||
#define HashProtocol gEfiHashProtocolGuid
|
||||
extern EFI_GUID gEfiPlatformDriverOverrideProtocolGuid;
|
||||
#define PlatformDriverOverrideProtocol gEfiPlatformDriverOverrideProtocolGuid
|
||||
extern EFI_GUID gEfiBusSpecificDriverOverrideProtocolGuid;
|
||||
#define BusSpecificDriverOverrideProtocol gEfiBusSpecificDriverOverrideProtocolGuid
|
||||
extern EFI_GUID gEfiDriverFamilyOverrideProtocolGuid;
|
||||
#define DriverFamilyOverrideProtocol gEfiDriverFamilyOverrideProtocolGuid
|
||||
|
||||
extern EFI_GUID gEfiGlobalVariableGuid;
|
||||
#define EfiGlobalVariable gEfiGlobalVariableGuid
|
||||
extern EFI_GUID gEfiFileInfoGuid;
|
||||
#define GenericFileInfo gEfiFileInfoGuid
|
||||
extern EFI_GUID gEfiFileSystemInfoGuid;
|
||||
#define FileSystemInfo gEfiFileSystemInfoGuid
|
||||
extern EFI_GUID gEfiFileSystemVolumeLabelInfoIdGuid;
|
||||
#define FileSystemVolumeLabelInfo gEfiFileSystemVolumeLabelInfoIdGuid
|
||||
extern EFI_GUID gEfiPcAnsiGuid;
|
||||
#define PcAnsiProtocol gEfiPcAnsiGuid
|
||||
extern EFI_GUID gEfiVT100Guid;
|
||||
#define Vt100Protocol gEfiVT100Guid
|
||||
extern EFI_GUID gEfiVT100PlusGuid;
|
||||
extern EFI_GUID gEfiVTUTF8Guid;
|
||||
|
||||
extern EFI_GUID EfiGlobalVariable;
|
||||
extern EFI_GUID GenericFileInfo;
|
||||
extern EFI_GUID FileSystemInfo;
|
||||
extern EFI_GUID FileSystemVolumeLabelInfo;
|
||||
extern EFI_GUID PcAnsiProtocol;
|
||||
extern EFI_GUID Vt100Protocol;
|
||||
extern EFI_GUID NullGuid;
|
||||
extern EFI_GUID UnknownDevice;
|
||||
|
||||
|
46
inc/efinet.h
46
inc/efinet.h
@ -20,11 +20,10 @@ Revision History
|
||||
// Simple Network Protocol
|
||||
//
|
||||
|
||||
#define EFI_SIMPLE_NETWORK_PROTOCOL \
|
||||
#define EFI_SIMPLE_NETWORK_PROTOCOL_GUID \
|
||||
{ 0xA19832B9, 0xAC25, 0x11D3, {0x9A, 0x2D, 0x00, 0x90, 0x27, 0x3F, 0xC1, 0x4D} }
|
||||
|
||||
|
||||
INTERFACE_DECL(_EFI_SIMPLE_NETWORK);
|
||||
INTERFACE_DECL(_EFI_SIMPLE_NETWORK_PROTOCOL);
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
@ -168,7 +167,7 @@ typedef struct {
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_SIMPLE_NETWORK_START) (
|
||||
IN struct _EFI_SIMPLE_NETWORK *This
|
||||
IN struct _EFI_SIMPLE_NETWORK_PROTOCOL *This
|
||||
);
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
@ -177,7 +176,7 @@ EFI_STATUS
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_SIMPLE_NETWORK_STOP) (
|
||||
IN struct _EFI_SIMPLE_NETWORK *This
|
||||
IN struct _EFI_SIMPLE_NETWORK_PROTOCOL *This
|
||||
);
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
@ -186,7 +185,7 @@ EFI_STATUS
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_SIMPLE_NETWORK_INITIALIZE) (
|
||||
IN struct _EFI_SIMPLE_NETWORK *This,
|
||||
IN struct _EFI_SIMPLE_NETWORK_PROTOCOL *This,
|
||||
IN UINTN ExtraRxBufferSize OPTIONAL,
|
||||
IN UINTN ExtraTxBufferSize OPTIONAL
|
||||
);
|
||||
@ -197,7 +196,7 @@ EFI_STATUS
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_SIMPLE_NETWORK_RESET) (
|
||||
IN struct _EFI_SIMPLE_NETWORK *This,
|
||||
IN struct _EFI_SIMPLE_NETWORK_PROTOCOL *This,
|
||||
IN BOOLEAN ExtendedVerification
|
||||
);
|
||||
|
||||
@ -207,7 +206,7 @@ EFI_STATUS
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_SIMPLE_NETWORK_SHUTDOWN) (
|
||||
IN struct _EFI_SIMPLE_NETWORK *This
|
||||
IN struct _EFI_SIMPLE_NETWORK_PROTOCOL *This
|
||||
);
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
@ -216,7 +215,7 @@ EFI_STATUS
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_SIMPLE_NETWORK_RECEIVE_FILTERS) (
|
||||
IN struct _EFI_SIMPLE_NETWORK *This,
|
||||
IN struct _EFI_SIMPLE_NETWORK_PROTOCOL *This,
|
||||
IN UINT32 Enable,
|
||||
IN UINT32 Disable,
|
||||
IN BOOLEAN ResetMCastFilter,
|
||||
@ -230,7 +229,7 @@ EFI_STATUS
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_SIMPLE_NETWORK_STATION_ADDRESS) (
|
||||
IN struct _EFI_SIMPLE_NETWORK *This,
|
||||
IN struct _EFI_SIMPLE_NETWORK_PROTOCOL *This,
|
||||
IN BOOLEAN Reset,
|
||||
IN EFI_MAC_ADDRESS *New OPTIONAL
|
||||
);
|
||||
@ -241,7 +240,7 @@ EFI_STATUS
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_SIMPLE_NETWORK_STATISTICS) (
|
||||
IN struct _EFI_SIMPLE_NETWORK *This,
|
||||
IN struct _EFI_SIMPLE_NETWORK_PROTOCOL *This,
|
||||
IN BOOLEAN Reset,
|
||||
IN OUT UINTN *StatisticsSize OPTIONAL,
|
||||
OUT EFI_NETWORK_STATISTICS *StatisticsTable OPTIONAL
|
||||
@ -253,7 +252,7 @@ EFI_STATUS
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_SIMPLE_NETWORK_MCAST_IP_TO_MAC) (
|
||||
IN struct _EFI_SIMPLE_NETWORK *This,
|
||||
IN struct _EFI_SIMPLE_NETWORK_PROTOCOL *This,
|
||||
IN BOOLEAN IPv6,
|
||||
IN EFI_IP_ADDRESS *IP,
|
||||
OUT EFI_MAC_ADDRESS *MAC
|
||||
@ -265,7 +264,7 @@ EFI_STATUS
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_SIMPLE_NETWORK_NVDATA) (
|
||||
IN struct _EFI_SIMPLE_NETWORK *This,
|
||||
IN struct _EFI_SIMPLE_NETWORK_PROTOCOL *This,
|
||||
IN BOOLEAN ReadWrite,
|
||||
IN UINTN Offset,
|
||||
IN UINTN BufferSize,
|
||||
@ -278,7 +277,7 @@ EFI_STATUS
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_SIMPLE_NETWORK_GET_STATUS) (
|
||||
IN struct _EFI_SIMPLE_NETWORK *This,
|
||||
IN struct _EFI_SIMPLE_NETWORK_PROTOCOL *This,
|
||||
OUT UINT32 *InterruptStatus OPTIONAL,
|
||||
OUT VOID **TxBuf OPTIONAL
|
||||
);
|
||||
@ -289,7 +288,7 @@ EFI_STATUS
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_SIMPLE_NETWORK_TRANSMIT) (
|
||||
IN struct _EFI_SIMPLE_NETWORK *This,
|
||||
IN struct _EFI_SIMPLE_NETWORK_PROTOCOL *This,
|
||||
IN UINTN HeaderSize,
|
||||
IN UINTN BufferSize,
|
||||
IN VOID *Buffer,
|
||||
@ -304,7 +303,7 @@ EFI_STATUS
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_SIMPLE_NETWORK_RECEIVE) (
|
||||
IN struct _EFI_SIMPLE_NETWORK *This,
|
||||
IN struct _EFI_SIMPLE_NETWORK_PROTOCOL *This,
|
||||
OUT UINTN *HeaderSize OPTIONAL,
|
||||
IN OUT UINTN *BufferSize,
|
||||
OUT VOID *Buffer,
|
||||
@ -316,9 +315,10 @@ EFI_STATUS
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
|
||||
#define EFI_SIMPLE_NETWORK_INTERFACE_REVISION 0x00010000
|
||||
#define EFI_SIMPLE_NETWORK_PROTOCOL_REVISION 0x00010000
|
||||
#define EFI_SIMPLE_NETWORK_INTERFACE_REVISION EFI_SIMPLE_NETWORK_PROTOCOL_REVISION
|
||||
|
||||
typedef struct _EFI_SIMPLE_NETWORK {
|
||||
typedef struct _EFI_SIMPLE_NETWORK_PROTOCOL {
|
||||
UINT64 Revision;
|
||||
EFI_SIMPLE_NETWORK_START Start;
|
||||
EFI_SIMPLE_NETWORK_STOP Stop;
|
||||
@ -335,6 +335,14 @@ typedef struct _EFI_SIMPLE_NETWORK {
|
||||
EFI_SIMPLE_NETWORK_RECEIVE Receive;
|
||||
EFI_EVENT WaitForPacket;
|
||||
EFI_SIMPLE_NETWORK_MODE *Mode;
|
||||
} EFI_SIMPLE_NETWORK;
|
||||
} EFI_SIMPLE_NETWORK_PROTOCOL;
|
||||
|
||||
// Note: Because it conflicted with the EDK2 struct name, the
|
||||
// 'EFI_SIMPLE_NETWORK_PROTOCOL' GUID definition, from older
|
||||
// versions of gnu-efi, is now obsoleted.
|
||||
// Use 'EFI_SIMPLE_NETWORK_PROTOCOL_GUID' instead.
|
||||
|
||||
typedef struct _EFI_SIMPLE_NETWORK_PROTOCOL _EFI_SIMPLE_NETWORK;
|
||||
typedef EFI_SIMPLE_NETWORK_PROTOCOL EFI_SIMPLE_NETWORK;
|
||||
|
||||
#endif /* _EFINET_H */
|
||||
|
@ -1,10 +1,10 @@
|
||||
#ifndef _EFI_PCI_IO_H
|
||||
#define _EFI_PCI_IO_H
|
||||
|
||||
#define EFI_PCI_IO_PROTOCOL \
|
||||
#define EFI_PCI_IO_PROTOCOL_GUID \
|
||||
{ 0x4cf5b200, 0x68b8, 0x4ca5, {0x9e, 0xec, 0xb2, 0x3e, 0x3f, 0x50, 0x02, 0x9a} }
|
||||
|
||||
INTERFACE_DECL(_EFI_PCI_IO);
|
||||
INTERFACE_DECL(_EFI_PCI_IO_PROTOCOL);
|
||||
|
||||
typedef enum {
|
||||
EfiPciIoWidthUint8,
|
||||
@ -27,7 +27,7 @@ typedef enum {
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_PCI_IO_PROTOCOL_POLL_IO_MEM) (
|
||||
IN struct _EFI_PCI_IO *This,
|
||||
IN struct _EFI_PCI_IO_PROTOCOL *This,
|
||||
IN EFI_PCI_IO_PROTOCOL_WIDTH Width,
|
||||
IN UINT8 BarIndex,
|
||||
IN UINT64 Offset,
|
||||
@ -40,7 +40,7 @@ EFI_STATUS
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_PCI_IO_PROTOCOL_IO_MEM) (
|
||||
IN struct _EFI_PCI_IO *This,
|
||||
IN struct _EFI_PCI_IO_PROTOCOL *This,
|
||||
IN EFI_PCI_IO_PROTOCOL_WIDTH Width,
|
||||
IN UINT8 BarIndex,
|
||||
IN UINT64 Offset,
|
||||
@ -56,7 +56,7 @@ typedef struct {
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_PCI_IO_PROTOCOL_CONFIG) (
|
||||
IN struct _EFI_PCI_IO *This,
|
||||
IN struct _EFI_PCI_IO_PROTOCOL *This,
|
||||
IN EFI_PCI_IO_PROTOCOL_WIDTH Width,
|
||||
IN UINT32 Offset,
|
||||
IN UINTN Count,
|
||||
@ -71,7 +71,7 @@ typedef struct {
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_PCI_IO_PROTOCOL_COPY_MEM) (
|
||||
IN struct _EFI_PCI_IO *This,
|
||||
IN struct _EFI_PCI_IO_PROTOCOL *This,
|
||||
IN EFI_PCI_IO_PROTOCOL_WIDTH Width,
|
||||
IN UINT8 DestBarIndex,
|
||||
IN UINT64 DestOffset,
|
||||
@ -90,7 +90,7 @@ typedef enum {
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_PCI_IO_PROTOCOL_MAP) (
|
||||
IN struct _EFI_PCI_IO *This,
|
||||
IN struct _EFI_PCI_IO_PROTOCOL *This,
|
||||
IN EFI_PCI_IO_PROTOCOL_OPERATION Operation,
|
||||
IN VOID *HostAddress,
|
||||
IN OUT UINTN *NumberOfBytes,
|
||||
@ -101,14 +101,14 @@ EFI_STATUS
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_PCI_IO_PROTOCOL_UNMAP) (
|
||||
IN struct _EFI_PCI_IO *This,
|
||||
IN struct _EFI_PCI_IO_PROTOCOL *This,
|
||||
IN VOID *Mapping
|
||||
);
|
||||
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_PCI_IO_PROTOCOL_ALLOCATE_BUFFER) (
|
||||
IN struct _EFI_PCI_IO *This,
|
||||
IN struct _EFI_PCI_IO_PROTOCOL *This,
|
||||
IN EFI_ALLOCATE_TYPE Type,
|
||||
IN EFI_MEMORY_TYPE MemoryType,
|
||||
IN UINTN Pages,
|
||||
@ -119,7 +119,7 @@ EFI_STATUS
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_PCI_IO_PROTOCOL_FREE_BUFFER) (
|
||||
IN struct _EFI_PCI_IO *This,
|
||||
IN struct _EFI_PCI_IO_PROTOCOL *This,
|
||||
IN UINTN Pages,
|
||||
IN VOID *HostAddress
|
||||
);
|
||||
@ -127,13 +127,13 @@ EFI_STATUS
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_PCI_IO_PROTOCOL_FLUSH) (
|
||||
IN struct _EFI_PCI_IO *This
|
||||
IN struct _EFI_PCI_IO_PROTOCOL *This
|
||||
);
|
||||
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_PCI_IO_PROTOCOL_GET_LOCATION) (
|
||||
IN struct _EFI_PCI_IO *This,
|
||||
IN struct _EFI_PCI_IO_PROTOCOL *This,
|
||||
OUT UINTN *SegmentNumber,
|
||||
OUT UINTN *BusNumber,
|
||||
OUT UINTN *DeviceNumber,
|
||||
@ -171,7 +171,7 @@ typedef enum {
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_PCI_IO_PROTOCOL_ATTRIBUTES) (
|
||||
IN struct _EFI_PCI_IO *This,
|
||||
IN struct _EFI_PCI_IO_PROTOCOL *This,
|
||||
IN EFI_PCI_IO_PROTOCOL_ATTRIBUTE_OPERATION Operation,
|
||||
IN UINT64 Attributes,
|
||||
OUT UINT64 *Result OPTIONAL
|
||||
@ -180,7 +180,7 @@ EFI_STATUS
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_PCI_IO_PROTOCOL_GET_BAR_ATTRIBUTES) (
|
||||
IN struct _EFI_PCI_IO *This,
|
||||
IN struct _EFI_PCI_IO_PROTOCOL *This,
|
||||
IN UINT8 BarIndex,
|
||||
OUT UINT64 *Supports OPTIONAL,
|
||||
OUT VOID **Resources OPTIONAL
|
||||
@ -189,14 +189,14 @@ EFI_STATUS
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_PCI_IO_PROTOCOL_SET_BAR_ATTRIBUTES) (
|
||||
IN struct _EFI_PCI_IO *This,
|
||||
IN struct _EFI_PCI_IO_PROTOCOL *This,
|
||||
IN UINT64 Attributes,
|
||||
IN UINT8 BarIndex,
|
||||
IN OUT UINT64 *Offset,
|
||||
IN OUT UINT64 *Length
|
||||
);
|
||||
|
||||
typedef struct _EFI_PCI_IO {
|
||||
typedef struct _EFI_PCI_IO_PROTOCOL {
|
||||
EFI_PCI_IO_PROTOCOL_POLL_IO_MEM PollMem;
|
||||
EFI_PCI_IO_PROTOCOL_POLL_IO_MEM PollIo;
|
||||
EFI_PCI_IO_PROTOCOL_ACCESS Mem;
|
||||
@ -214,6 +214,14 @@ typedef struct _EFI_PCI_IO {
|
||||
EFI_PCI_IO_PROTOCOL_SET_BAR_ATTRIBUTES SetBarAttributes;
|
||||
UINT64 RomSize;
|
||||
VOID *RomImage;
|
||||
} EFI_PCI_IO;
|
||||
} EFI_PCI_IO_PROTOCOL;
|
||||
|
||||
// Note: Because it conflicted with the EDK2 struct name, the
|
||||
// 'EFI_PCI_IO_PROTOCOL' GUID definition, from older versions
|
||||
// of gnu-efi, is now obsoleted.
|
||||
// Use 'EFI_PCI_IO_PROTOCOL_GUID' instead.
|
||||
|
||||
typedef struct _EFI_PCI_IO_PROTOCOL _EFI_PCI_IO;
|
||||
typedef EFI_PCI_IO_PROTOCOL EFI_PCI_IO;
|
||||
|
||||
#endif /* _EFI_PCI_IO_H */
|
||||
|
@ -23,10 +23,10 @@ Revision History
|
||||
// PXE Base Code protocol
|
||||
//
|
||||
|
||||
#define EFI_PXE_BASE_CODE_PROTOCOL \
|
||||
#define EFI_PXE_BASE_CODE_PROTOCOL_GUID \
|
||||
{ 0x03c4e603, 0xac28, 0x11d3, {0x9a, 0x2d, 0x00, 0x90, 0x27, 0x3f, 0xc1, 0x4d} }
|
||||
|
||||
INTERFACE_DECL(_EFI_PXE_BASE_CODE);
|
||||
INTERFACE_DECL(_EFI_PXE_BASE_CODE_PROTOCOL);
|
||||
|
||||
#define DEFAULT_TTL 4
|
||||
#define DEFAULT_ToS 0
|
||||
@ -264,27 +264,27 @@ typedef struct {
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_PXE_BASE_CODE_START) (
|
||||
IN struct _EFI_PXE_BASE_CODE *This,
|
||||
IN struct _EFI_PXE_BASE_CODE_PROTOCOL *This,
|
||||
IN BOOLEAN UseIpv6
|
||||
);
|
||||
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_PXE_BASE_CODE_STOP) (
|
||||
IN struct _EFI_PXE_BASE_CODE *This
|
||||
IN struct _EFI_PXE_BASE_CODE_PROTOCOL *This
|
||||
);
|
||||
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_PXE_BASE_CODE_DHCP) (
|
||||
IN struct _EFI_PXE_BASE_CODE *This,
|
||||
IN struct _EFI_PXE_BASE_CODE_PROTOCOL *This,
|
||||
IN BOOLEAN SortOffers
|
||||
);
|
||||
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_PXE_BASE_CODE_DISCOVER) (
|
||||
IN struct _EFI_PXE_BASE_CODE *This,
|
||||
IN struct _EFI_PXE_BASE_CODE_PROTOCOL *This,
|
||||
IN UINT16 Type,
|
||||
IN UINT16 *Layer,
|
||||
IN BOOLEAN UseBis,
|
||||
@ -294,7 +294,7 @@ EFI_STATUS
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_PXE_BASE_CODE_MTFTP) (
|
||||
IN struct _EFI_PXE_BASE_CODE *This,
|
||||
IN struct _EFI_PXE_BASE_CODE_PROTOCOL *This,
|
||||
IN EFI_PXE_BASE_CODE_TFTP_OPCODE Operation,
|
||||
IN OUT VOID *BufferPtr OPTIONAL,
|
||||
IN BOOLEAN Overwrite,
|
||||
@ -309,7 +309,7 @@ EFI_STATUS
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_PXE_BASE_CODE_UDP_WRITE) (
|
||||
IN struct _EFI_PXE_BASE_CODE *This,
|
||||
IN struct _EFI_PXE_BASE_CODE_PROTOCOL *This,
|
||||
IN UINT16 OpFlags,
|
||||
IN EFI_IP_ADDRESS *DestIp,
|
||||
IN EFI_PXE_BASE_CODE_UDP_PORT *DestPort,
|
||||
@ -325,7 +325,7 @@ EFI_STATUS
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_PXE_BASE_CODE_UDP_READ) (
|
||||
IN struct _EFI_PXE_BASE_CODE *This,
|
||||
IN struct _EFI_PXE_BASE_CODE_PROTOCOL *This,
|
||||
IN UINT16 OpFlags,
|
||||
IN OUT EFI_IP_ADDRESS *DestIp, OPTIONAL
|
||||
IN OUT EFI_PXE_BASE_CODE_UDP_PORT *DestPort, OPTIONAL
|
||||
@ -340,14 +340,14 @@ EFI_STATUS
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_PXE_BASE_CODE_SET_IP_FILTER) (
|
||||
IN struct _EFI_PXE_BASE_CODE *This,
|
||||
IN struct _EFI_PXE_BASE_CODE_PROTOCOL *This,
|
||||
IN EFI_PXE_BASE_CODE_IP_FILTER *NewFilter
|
||||
);
|
||||
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_PXE_BASE_CODE_ARP) (
|
||||
IN struct _EFI_PXE_BASE_CODE *This,
|
||||
IN struct _EFI_PXE_BASE_CODE_PROTOCOL *This,
|
||||
IN EFI_IP_ADDRESS *IpAddr,
|
||||
IN EFI_MAC_ADDRESS *MacAddr OPTIONAL
|
||||
);
|
||||
@ -355,7 +355,7 @@ EFI_STATUS
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_PXE_BASE_CODE_SET_PARAMETERS) (
|
||||
IN struct _EFI_PXE_BASE_CODE *This,
|
||||
IN struct _EFI_PXE_BASE_CODE_PROTOCOL *This,
|
||||
IN BOOLEAN *NewAutoArp, OPTIONAL
|
||||
IN BOOLEAN *NewSendGUID, OPTIONAL
|
||||
IN UINT8 *NewTTL, OPTIONAL
|
||||
@ -366,7 +366,7 @@ EFI_STATUS
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_PXE_BASE_CODE_SET_STATION_IP) (
|
||||
IN struct _EFI_PXE_BASE_CODE *This,
|
||||
IN struct _EFI_PXE_BASE_CODE_PROTOCOL *This,
|
||||
IN EFI_IP_ADDRESS *NewStationIp, OPTIONAL
|
||||
IN EFI_IP_ADDRESS *NewSubnetMask OPTIONAL
|
||||
);
|
||||
@ -374,7 +374,7 @@ EFI_STATUS
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_PXE_BASE_CODE_SET_PACKETS) (
|
||||
IN struct _EFI_PXE_BASE_CODE *This,
|
||||
IN struct _EFI_PXE_BASE_CODE_PROTOCOL *This,
|
||||
BOOLEAN *NewDhcpDiscoverValid, OPTIONAL
|
||||
BOOLEAN *NewDhcpAckReceived, OPTIONAL
|
||||
BOOLEAN *NewProxyOfferReceived, OPTIONAL
|
||||
@ -393,9 +393,10 @@ EFI_STATUS
|
||||
// PXE Base Code Protocol structure
|
||||
//
|
||||
|
||||
#define EFI_PXE_BASE_CODE_INTERFACE_REVISION 0x00010000
|
||||
#define EFI_PXE_BASE_CODE_PROTOCOL_REVISION 0x00010000
|
||||
#define EFI_PXE_BASE_CODE_INTERFACE_REVISION EFI_PXE_BASE_CODE_PROTOCOL_REVISION
|
||||
|
||||
typedef struct _EFI_PXE_BASE_CODE {
|
||||
typedef struct _EFI_PXE_BASE_CODE_PROTOCOL {
|
||||
UINT64 Revision;
|
||||
EFI_PXE_BASE_CODE_START Start;
|
||||
EFI_PXE_BASE_CODE_STOP Stop;
|
||||
@ -410,22 +411,31 @@ typedef struct _EFI_PXE_BASE_CODE {
|
||||
EFI_PXE_BASE_CODE_SET_STATION_IP SetStationIp;
|
||||
EFI_PXE_BASE_CODE_SET_PACKETS SetPackets;
|
||||
EFI_PXE_BASE_CODE_MODE *Mode;
|
||||
} EFI_PXE_BASE_CODE;
|
||||
} EFI_PXE_BASE_CODE_PROTOCOL;
|
||||
|
||||
// Note: Because it conflicted with the EDK2 struct name, the
|
||||
// 'EFI_PXE_BASE_CODE_PROTOCOL' GUID definition, from older
|
||||
// versions of gnu-efi, is now obsoleted.
|
||||
// Use 'EFI_PXE_BASE_CODE_PROTOCOL_GUID' instead.
|
||||
|
||||
typedef struct _EFI_PXE_BASE_CODE_PROTOCOL _EFI_PXE_BASE_CODE;
|
||||
typedef struct EFI_PXE_BASE_CODE_PROTOCOL EFI_PXE_BASE_CODE;
|
||||
|
||||
//
|
||||
// Call Back Definitions
|
||||
//
|
||||
|
||||
#define EFI_PXE_BASE_CODE_CALLBACK_PROTOCOL \
|
||||
#define EFI_PXE_BASE_CODE_CALLBACK_PROTOCOL_GUID \
|
||||
{ 0x245dca21, 0xfb7b, 0x11d3, {0x8f, 0x01, 0x00, 0xa0, 0xc9, 0x69, 0x72, 0x3b} }
|
||||
|
||||
//
|
||||
// Revision Number
|
||||
//
|
||||
|
||||
#define EFI_PXE_BASE_CODE_CALLBACK_INTERFACE_REVISION 0x00010000
|
||||
#define EFI_PXE_BASE_CODE_CALLBACK_PROTOCOL_REVISION 0x00010000
|
||||
#define EFI_PXE_BASE_CODE_CALLBACK_INTERFACE_REVISION EFI_PXE_BASE_CODE_CALLBACK_PROTOCOL_REVISION
|
||||
|
||||
INTERFACE_DECL(_EFI_PXE_BASE_CODE_CALLBACK);
|
||||
INTERFACE_DECL(_EFI_PXE_BASE_CODE_CALLBACK_PROTOCOL);
|
||||
|
||||
typedef enum {
|
||||
EFI_PXE_BASE_CODE_FUNCTION_FIRST,
|
||||
@ -449,16 +459,24 @@ typedef enum {
|
||||
typedef
|
||||
EFI_PXE_BASE_CODE_CALLBACK_STATUS
|
||||
(EFIAPI *EFI_PXE_CALLBACK) (
|
||||
IN struct _EFI_PXE_BASE_CODE_CALLBACK *This,
|
||||
IN struct _EFI_PXE_BASE_CODE_CALLBACK_PROTOCOL *This,
|
||||
IN EFI_PXE_BASE_CODE_FUNCTION Function,
|
||||
IN BOOLEAN Received,
|
||||
IN UINT32 PacketLen,
|
||||
IN EFI_PXE_BASE_CODE_PACKET *Packet OPTIONAL
|
||||
);
|
||||
|
||||
typedef struct _EFI_PXE_BASE_CODE_CALLBACK {
|
||||
typedef struct _EFI_PXE_BASE_CODE_CALLBACK_PROTOCOL {
|
||||
UINT64 Revision;
|
||||
EFI_PXE_CALLBACK Callback;
|
||||
} EFI_PXE_BASE_CODE_CALLBACK;
|
||||
} EFI_PXE_BASE_CODE_CALLBACK_PROTOCOL;
|
||||
|
||||
// Note: Because it conflicted with the EDK2 struct name, the
|
||||
// 'EFI_PXE_BASE_CODE_CALLBACK_PROTOCOL' GUID definition, from
|
||||
// older versions of gnu-efi, is now obsoleted.
|
||||
// Use 'EFI_PXE_BASE_CODE_CALLBACK_PROTOCOL_GUID' instead.
|
||||
|
||||
typedef struct _EFI_PXE_BASE_CODE_CALLBACK_PROTOCOL _EFI_PXE_BASE_CODE_CALLBACK;
|
||||
typedef EFI_PXE_BASE_CODE_CALLBACK_PROTOCOL EFI_PXE_BASE_CODE_CALLBACK;
|
||||
|
||||
#endif /* _EFIPXEBC_H */
|
||||
|
24
inc/efiser.h
24
inc/efiser.h
@ -21,10 +21,11 @@ Revision History
|
||||
// Serial protocol
|
||||
//
|
||||
|
||||
#define SERIAL_IO_PROTOCOL \
|
||||
#define EFI_SERIAL_IO_PROTOCOL_GUID \
|
||||
{ 0xBB25CF6F, 0xF1D4, 0x11D2, {0x9A, 0x0C, 0x00, 0x90, 0x27, 0x3F, 0xC1, 0xFD} }
|
||||
#define SERIAL_IO_PROTOCOL EFI_SERIAL_IO_PROTOCOL_GUID
|
||||
|
||||
INTERFACE_DECL(_SERIAL_IO_INTERFACE);
|
||||
INTERFACE_DECL(_EFI_SERIAL_IO_PROTOCOL);
|
||||
|
||||
typedef enum {
|
||||
DefaultParity,
|
||||
@ -57,13 +58,13 @@ typedef enum {
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_SERIAL_RESET) (
|
||||
IN struct _SERIAL_IO_INTERFACE *This
|
||||
IN struct _EFI_SERIAL_IO_PROTOCOL *This
|
||||
);
|
||||
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_SERIAL_SET_ATTRIBUTES) (
|
||||
IN struct _SERIAL_IO_INTERFACE *This,
|
||||
IN struct _EFI_SERIAL_IO_PROTOCOL *This,
|
||||
IN UINT64 BaudRate,
|
||||
IN UINT32 ReceiveFifoDepth,
|
||||
IN UINT32 Timeout,
|
||||
@ -75,21 +76,21 @@ EFI_STATUS
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_SERIAL_SET_CONTROL_BITS) (
|
||||
IN struct _SERIAL_IO_INTERFACE *This,
|
||||
IN struct _EFI_SERIAL_IO_PROTOCOL *This,
|
||||
IN UINT32 Control
|
||||
);
|
||||
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_SERIAL_GET_CONTROL_BITS) (
|
||||
IN struct _SERIAL_IO_INTERFACE *This,
|
||||
IN struct _EFI_SERIAL_IO_PROTOCOL *This,
|
||||
OUT UINT32 *Control
|
||||
);
|
||||
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_SERIAL_WRITE) (
|
||||
IN struct _SERIAL_IO_INTERFACE *This,
|
||||
IN struct _EFI_SERIAL_IO_PROTOCOL *This,
|
||||
IN OUT UINTN *BufferSize,
|
||||
IN VOID *Buffer
|
||||
);
|
||||
@ -97,7 +98,7 @@ EFI_STATUS
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_SERIAL_READ) (
|
||||
IN struct _SERIAL_IO_INTERFACE *This,
|
||||
IN struct _EFI_SERIAL_IO_PROTOCOL *This,
|
||||
IN OUT UINTN *BufferSize,
|
||||
OUT VOID *Buffer
|
||||
);
|
||||
@ -116,7 +117,7 @@ typedef struct {
|
||||
|
||||
#define SERIAL_IO_INTERFACE_REVISION 0x00010000
|
||||
|
||||
typedef struct _SERIAL_IO_INTERFACE {
|
||||
typedef struct _EFI_SERIAL_IO_PROTOCOL {
|
||||
UINT32 Revision;
|
||||
EFI_SERIAL_RESET Reset;
|
||||
EFI_SERIAL_SET_ATTRIBUTES SetAttributes;
|
||||
@ -126,7 +127,10 @@ typedef struct _SERIAL_IO_INTERFACE {
|
||||
EFI_SERIAL_READ Read;
|
||||
|
||||
SERIAL_IO_MODE *Mode;
|
||||
} SERIAL_IO_INTERFACE;
|
||||
} EFI_SERIAL_IO_PROTOCOL;
|
||||
|
||||
typedef struct _EFI_SERIAL_IO_PROTOCOL _SERIAL_IO_INTERFACE;
|
||||
typedef EFI_SERIAL_IO_PROTOCOL SERIAL_IO_INTERFACE;
|
||||
|
||||
#endif
|
||||
|
||||
|
12
inc/efiui.h
12
inc/efiui.h
@ -28,8 +28,9 @@ Revision History
|
||||
|
||||
--*/
|
||||
|
||||
#define EFI_UI_PROTOCOL \
|
||||
#define EFI_UI_INTERFACE_PROTOCOL_GUID \
|
||||
{ 0x32dd7981, 0x2d27, 0x11d4, {0xbc, 0x8b, 0x0, 0x80, 0xc7, 0x3c, 0x88, 0x81} }
|
||||
#define EFI_UI_PROTOCOL EFI_UI_INTERFACE_PROTOCOL_GUID
|
||||
|
||||
|
||||
typedef enum {
|
||||
@ -43,12 +44,15 @@ typedef struct {
|
||||
CHAR16 *UiString;
|
||||
} UI_STRING_ENTRY;
|
||||
|
||||
#define EFI_UI_VERSION 0x00010000
|
||||
#define EFI_UI_INTERFACE_PROTOCOL_VERSION 0x00010000
|
||||
#define EFI_UI_VERSION EFI_UI_INTERFACE_PROTOCOL_VERSION
|
||||
|
||||
typedef struct _UI_INTERFACE {
|
||||
typedef struct _EFI_UI_INTERFACE_PROTOCOL {
|
||||
UINT32 Version;
|
||||
UI_STRING_ENTRY *Entry;
|
||||
} UI_INTERFACE;
|
||||
} EFI_UI_INTERFACE_PROTOCOL;
|
||||
|
||||
typedef struct _EFI_UI_INTERFACE_PROTOCOL _UI_INTERFACE;
|
||||
typedef EFI_UI_INTERFACE_PROTOCOL UI_INTERFACE;
|
||||
|
||||
#endif
|
||||
|
78
lib/data.c
78
lib/data.c
@ -80,49 +80,49 @@ EFI_DEVICE_PATH EndInstanceDevicePath[] = {
|
||||
// EFI IDs
|
||||
//
|
||||
|
||||
EFI_GUID EfiGlobalVariable = EFI_GLOBAL_VARIABLE;
|
||||
EFI_GUID gEfiGlobalVariableGuid = EFI_GLOBAL_VARIABLE;
|
||||
EFI_GUID NullGuid = { 0,0,0,{0,0,0,0,0,0,0,0} };
|
||||
|
||||
//
|
||||
// Protocol IDs
|
||||
//
|
||||
|
||||
EFI_GUID DevicePathProtocol = EFI_DEVICE_PATH_PROTOCOL_GUID;
|
||||
EFI_GUID DevicePathToTextProtocol = EFI_DEVICE_PATH_TO_TEXT_PROTOCOL_GUID;
|
||||
EFI_GUID DevicePathFromTextProtocol = EFI_DEVICE_PATH_FROM_TEXT_PROTOCOL_GUID;
|
||||
EFI_GUID LoadedImageProtocol = EFI_LOADED_IMAGE_PROTOCOL_GUID;
|
||||
EFI_GUID TextInProtocol = SIMPLE_TEXT_INPUT_PROTOCOL;
|
||||
EFI_GUID TextOutProtocol = SIMPLE_TEXT_OUTPUT_PROTOCOL;
|
||||
EFI_GUID BlockIoProtocol = EFI_BLOCK_IO_PROTOCOL_GUID;
|
||||
EFI_GUID BlockIo2Protocol = EFI_BLOCK_IO_PROTOCOL_GUID;
|
||||
EFI_GUID DiskIoProtocol = EFI_DISK_IO_PROTOCOL_GUID;
|
||||
EFI_GUID DiskIo2Protocol = EFI_DISK_IO2_PROTOCOL_GUID;
|
||||
EFI_GUID FileSystemProtocol = EFI_SIMPLE_FILE_SYSTEM_PROTOCOL_GUID;
|
||||
EFI_GUID LoadFileProtocol = EFI_LOAD_FILE_PROTOCOL_GUID;
|
||||
EFI_GUID DeviceIoProtocol = EFI_DEVICE_IO_PROTOCOL_GUID;
|
||||
EFI_GUID UnicodeCollationProtocol = EFI_UNICODE_COLLATION_PROTOCOL_GUID;
|
||||
EFI_GUID SerialIoProtocol = SERIAL_IO_PROTOCOL;
|
||||
EFI_GUID SimpleNetworkProtocol = EFI_SIMPLE_NETWORK_PROTOCOL;
|
||||
EFI_GUID PxeBaseCodeProtocol = EFI_PXE_BASE_CODE_PROTOCOL;
|
||||
EFI_GUID PxeCallbackProtocol = EFI_PXE_BASE_CODE_CALLBACK_PROTOCOL;
|
||||
EFI_GUID NetworkInterfaceIdentifierProtocol = EFI_NETWORK_INTERFACE_IDENTIFIER_PROTOCOL;
|
||||
EFI_GUID UiProtocol = EFI_UI_PROTOCOL;
|
||||
EFI_GUID PciIoProtocol = EFI_PCI_IO_PROTOCOL;
|
||||
EFI_GUID DriverBindingProtocol = EFI_DRIVER_BINDING_PROTOCOL_GUID;
|
||||
EFI_GUID ComponentNameProtocol = EFI_COMPONENT_NAME_PROTOCOL_GUID;
|
||||
EFI_GUID ComponentName2Protocol = EFI_COMPONENT_NAME2_PROTOCOL_GUID;
|
||||
EFI_GUID HashProtocol = EFI_HASH_PROTOCOL_GUID;
|
||||
EFI_GUID PlatformDriverOverrideProtocol = EFI_PLATFORM_DRIVER_OVERRIDE_PROTOCOL_GUID;
|
||||
EFI_GUID BusSpecificDriverOverrideProtocol = EFI_BUS_SPECIFIC_DRIVER_OVERRIDE_PROTOCOL_GUID;
|
||||
EFI_GUID DriverFamilyOverrideProtocol = EFI_DRIVER_FAMILY_OVERRIDE_PROTOCOL_GUID;
|
||||
EFI_GUID gEfiDevicePathProtocolGuid = EFI_DEVICE_PATH_PROTOCOL_GUID;
|
||||
EFI_GUID gEfiDevicePathToTextProtocolGuid = EFI_DEVICE_PATH_TO_TEXT_PROTOCOL_GUID;
|
||||
EFI_GUID gEfiDevicePathFromTextProtocolGuid = EFI_DEVICE_PATH_FROM_TEXT_PROTOCOL_GUID;
|
||||
EFI_GUID gEfiLoadedImageProtocolGuid = EFI_LOADED_IMAGE_PROTOCOL_GUID;
|
||||
EFI_GUID gEfiSimpleTextInProtocolGuid = EFI_SIMPLE_TEXT_INPUT_PROTOCOL_GUID;
|
||||
EFI_GUID gEfiSimpleTextOutProtocolGuid = EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL_GUID;
|
||||
EFI_GUID gEfiBlockIoProtocolGuid = EFI_BLOCK_IO_PROTOCOL_GUID;
|
||||
EFI_GUID gEfiBlockIo2ProtocolGuid = EFI_BLOCK_IO2_PROTOCOL_GUID;
|
||||
EFI_GUID gEfiDiskIoProtocolGuid = EFI_DISK_IO_PROTOCOL_GUID;
|
||||
EFI_GUID gEfiDiskIo2ProtocolGuid = EFI_DISK_IO2_PROTOCOL_GUID;
|
||||
EFI_GUID gEfiSimpleFileSystemProtocolGuid = EFI_SIMPLE_FILE_SYSTEM_PROTOCOL_GUID;
|
||||
EFI_GUID gEfiLoadFileProtocolGuid = EFI_LOAD_FILE_PROTOCOL_GUID;
|
||||
EFI_GUID gEfiDeviceIoProtocolGuid = EFI_DEVICE_IO_PROTOCOL_GUID;
|
||||
EFI_GUID gEfiUnicodeCollationProtocolGuid = EFI_UNICODE_COLLATION_PROTOCOL_GUID;
|
||||
EFI_GUID gEfiSerialIoProtocolGuid = EFI_SERIAL_IO_PROTOCOL_GUID;
|
||||
EFI_GUID gEfiSimpleNetworkProtocolGuid = EFI_SIMPLE_NETWORK_PROTOCOL_GUID;
|
||||
EFI_GUID gEfiPxeBaseCodeProtocolGuid = EFI_PXE_BASE_CODE_PROTOCOL_GUID;
|
||||
EFI_GUID gEfiPxeBaseCodeCallbackProtocolGuid = EFI_PXE_BASE_CODE_CALLBACK_PROTOCOL_GUID;
|
||||
EFI_GUID gEfiNetworkInterfaceIdentifierProtocolGuid = EFI_NETWORK_INTERFACE_IDENTIFIER_PROTOCOL_GUID;
|
||||
EFI_GUID gEFiUiInterfaceProtocolGuid = EFI_UI_INTERFACE_PROTOCOL_GUID;
|
||||
EFI_GUID gEfiPciIoProtocolGuid = EFI_PCI_IO_PROTOCOL_GUID;
|
||||
EFI_GUID gEfiDriverBindingProtocolGuid = EFI_DRIVER_BINDING_PROTOCOL_GUID;
|
||||
EFI_GUID gEfiComponentNameProtocolGuid = EFI_COMPONENT_NAME_PROTOCOL_GUID;
|
||||
EFI_GUID gEfiComponentName2ProtocolGuid = EFI_COMPONENT_NAME2_PROTOCOL_GUID;
|
||||
EFI_GUID gEfiHashProtocolGuid = EFI_HASH_PROTOCOL_GUID;
|
||||
EFI_GUID gEfiPlatformDriverOverrideProtocolGuid = EFI_PLATFORM_DRIVER_OVERRIDE_PROTOCOL_GUID;
|
||||
EFI_GUID gEfiBusSpecificDriverOverrideProtocolGuid = EFI_BUS_SPECIFIC_DRIVER_OVERRIDE_PROTOCOL_GUID;
|
||||
EFI_GUID gEfiDriverFamilyOverrideProtocolGuid = EFI_DRIVER_FAMILY_OVERRIDE_PROTOCOL_GUID;
|
||||
|
||||
//
|
||||
// File system information IDs
|
||||
//
|
||||
|
||||
EFI_GUID GenericFileInfo = EFI_FILE_INFO_ID;
|
||||
EFI_GUID FileSystemInfo = EFI_FILE_SYSTEM_INFO_ID;
|
||||
EFI_GUID FileSystemVolumeLabelInfo = EFI_FILE_SYSTEM_VOLUME_LABEL_INFO_ID;
|
||||
EFI_GUID gEfiFileInfoGuid = EFI_FILE_INFO_ID;
|
||||
EFI_GUID gEfiFileSystemInfoGuid = EFI_FILE_SYSTEM_INFO_ID;
|
||||
EFI_GUID gEfiFileSystemVolumeLabelInfoIdGuid = EFI_FILE_SYSTEM_VOLUME_LABEL_INFO_ID;
|
||||
|
||||
//
|
||||
// Reference implementation public protocol IDs
|
||||
@ -137,18 +137,20 @@ EFI_GUID TextOutSpliterProtocol = TEXT_OUT_SPLITER_PROTOCOL;
|
||||
EFI_GUID ErrorOutSpliterProtocol = ERROR_OUT_SPLITER_PROTOCOL;
|
||||
EFI_GUID TextInSpliterProtocol = TEXT_IN_SPLITER_PROTOCOL;
|
||||
/* Added for GOP support */
|
||||
EFI_GUID GraphicsOutputProtocol = EFI_GRAPHICS_OUTPUT_PROTOCOL_GUID;
|
||||
EFI_GUID EdidDiscoveredProtocol = EFI_EDID_DISCOVERED_PROTOCOL_GUID;
|
||||
EFI_GUID EdidActiveProtocol = EFI_EDID_ACTIVE_PROTOCOL_GUID;
|
||||
EFI_GUID EdidOverrideProtocol = EFI_EDID_OVERRIDE_PROTOCOL_GUID;
|
||||
EFI_GUID gEfiGraphicsOutputProtocolGuid = EFI_GRAPHICS_OUTPUT_PROTOCOL_GUID;
|
||||
EFI_GUID gEfiEdidDiscoveredProtocolGuid = EFI_EDID_DISCOVERED_PROTOCOL_GUID;
|
||||
EFI_GUID gEfiEdidActiveProtocolGuid = EFI_EDID_ACTIVE_PROTOCOL_GUID;
|
||||
EFI_GUID gEfiEdidOverrideProtocolGuid = EFI_EDID_OVERRIDE_PROTOCOL_GUID;
|
||||
|
||||
EFI_GUID AdapterDebugProtocol = ADAPTER_DEBUG_PROTOCOL;
|
||||
|
||||
//
|
||||
// Device path media protocol IDs
|
||||
//
|
||||
EFI_GUID PcAnsiProtocol = DEVICE_PATH_MESSAGING_PC_ANSI;
|
||||
EFI_GUID Vt100Protocol = DEVICE_PATH_MESSAGING_VT_100;
|
||||
EFI_GUID gEfiPcAnsiGuid = EFI_PC_ANSI_GUID;
|
||||
EFI_GUID gEfiVT100Guid = EFI_VT_100_GUID;
|
||||
EFI_GUID gEfiVT100PlusGuid = EFI_VT_100_PLUS_GUID;
|
||||
EFI_GUID gEfiVTUTF8Guid = EFI_VT_UTF8_GUID;
|
||||
|
||||
//
|
||||
// EFI GPT Partition Type GUIDs
|
||||
|
56
lib/guid.c
56
lib/guid.c
@ -49,40 +49,44 @@ static struct {
|
||||
WCHAR *GuidName;
|
||||
} KnownGuids[] = {
|
||||
{ &NullGuid, L"G0" },
|
||||
{ &EfiGlobalVariable, L"Efi"},
|
||||
{ &gEfiGlobalVariableGuid, L"EfiVar" },
|
||||
|
||||
{ &VariableStoreProtocol, L"varstore"},
|
||||
{ &DevicePathProtocol, L"dpath"},
|
||||
{ &LoadedImageProtocol, L"image"},
|
||||
{ &TextInProtocol, L"txtin"},
|
||||
{ &TextOutProtocol, L"txtout"},
|
||||
{ &BlockIoProtocol, L"blkio"},
|
||||
{ &DiskIoProtocol, L"diskio"},
|
||||
{ &FileSystemProtocol, L"fs"},
|
||||
{ &LoadFileProtocol, L"load"},
|
||||
{ &DeviceIoProtocol, L"DevIo"},
|
||||
{ &VariableStoreProtocol, L"VarStore" },
|
||||
{ &gEfiDevicePathProtocolGuid, L"DevPath" },
|
||||
{ &gEfiLoadedImageProtocolGuid, L"LdImg" },
|
||||
{ &gEfiSimpleTextInProtocolGuid, L"TxtIn" },
|
||||
{ &gEfiSimpleTextOutProtocolGuid, L"TxtOut" },
|
||||
{ &gEfiBlockIoProtocolGuid, L"BlkIo" },
|
||||
{ &gEfiBlockIo2ProtocolGuid, L"BlkIo2" },
|
||||
{ &gEfiDiskIoProtocolGuid, L"DskIo" },
|
||||
{ &gEfiDiskIo2ProtocolGuid, L"DskIo2" },
|
||||
{ &gEfiSimpleFileSystemProtocolGuid, L"Fs" },
|
||||
{ &gEfiLoadFileProtocolGuid, L"LdFile" },
|
||||
{ &gEfiDeviceIoProtocolGuid, L"DevIo" },
|
||||
{ &gEfiComponentNameProtocolGuid, L"CName" },
|
||||
{ &gEfiComponentName2ProtocolGuid, L"CName2" },
|
||||
|
||||
{ &GenericFileInfo, L"GenFileInfo"},
|
||||
{ &FileSystemInfo, L"FileSysInfo"},
|
||||
{ &gEfiFileInfoGuid, L"FileInfo" },
|
||||
{ &gEfiFileSystemInfoGuid, L"FsInfo" },
|
||||
{ &gEfiFileSystemVolumeLabelInfoIdGuid, L"FsVolInfo" },
|
||||
|
||||
{ &UnicodeCollationProtocol, L"unicode"},
|
||||
{ &LegacyBootProtocol, L"LegacyBoot"},
|
||||
{ &SerialIoProtocol, L"serialio"},
|
||||
{ &VgaClassProtocol, L"vgaclass"},
|
||||
{ &SimpleNetworkProtocol, L"net"},
|
||||
{ &NetworkInterfaceIdentifierProtocol, L"nii"},
|
||||
{ &PxeBaseCodeProtocol, L"pxebc"},
|
||||
{ &PxeCallbackProtocol, L"pxecb"},
|
||||
|
||||
{ &VariableStoreProtocol, L"varstore"},
|
||||
{ &gEfiUnicodeCollationProtocolGuid, L"Unicode" },
|
||||
{ &LegacyBootProtocol, L"LegacyBoot" },
|
||||
{ &gEfiSerialIoProtocolGuid, L"SerIo" },
|
||||
{ &VgaClassProtocol, L"VgaClass"},
|
||||
{ &gEfiSimpleNetworkProtocolGuid, L"Net" },
|
||||
{ &gEfiNetworkInterfaceIdentifierProtocolGuid, L"Nii" },
|
||||
{ &gEfiPxeBaseCodeProtocolGuid, L"Pxe" },
|
||||
{ &gEfiPxeBaseCodeCallbackProtocolGuid, L"PxeCb" },
|
||||
|
||||
{ &TextOutSpliterProtocol, L"TxtOutSplit" },
|
||||
{ &ErrorOutSpliterProtocol, L"ErrOutSplit" },
|
||||
{ &TextInSpliterProtocol, L"TxtInSplit" },
|
||||
{ &PcAnsiProtocol, L"PcAnsi"},
|
||||
{ &Vt100Protocol, L"Vt100"},
|
||||
{ &UnknownDevice, L"Unknown Device"},
|
||||
{ &gEfiPcAnsiGuid, L"PcAnsi" },
|
||||
{ &gEfiVT100Guid, L"Vt100" },
|
||||
{ &gEfiVT100PlusGuid, L"Vt100Plus" },
|
||||
{ &gEfiVTUTF8Guid, L"VtUtf8" },
|
||||
{ &UnknownDevice, L"UnknownDev" },
|
||||
|
||||
{ &EfiPartTypeSystemPartitionGuid, L"ESP" },
|
||||
{ &EfiPartTypeLegacyMbrGuid, L"GPT MBR" },
|
||||
|
Loading…
Reference in New Issue
Block a user