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:
Nigel Croxon 2016-08-18 08:42:11 -04:00
parent 7993cbcc72
commit 751cbce3f6
12 changed files with 486 additions and 393 deletions

View File

@ -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

View File

@ -13,20 +13,21 @@ Revision history:
2000-Feb-18 M(f)J GUID updated.
Structure order changed for machine word alignment.
Added StringId[4] to structure.
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.
@ -66,9 +67,12 @@ typedef struct {
// This is the network interface type and version number that will
// 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;
UINT8 IfNum; // interface number to be used with pxeid structure
} 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

View File

@ -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);

View File

@ -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
/*

View File

@ -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;

View File

@ -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);
///////////////////////////////////////////////////////////////////////////////
//
@ -165,160 +164,161 @@ typedef struct {
///////////////////////////////////////////////////////////////////////////////
//
typedef
EFI_STATUS
typedef
EFI_STATUS
(EFIAPI *EFI_SIMPLE_NETWORK_START) (
IN struct _EFI_SIMPLE_NETWORK *This
IN struct _EFI_SIMPLE_NETWORK_PROTOCOL *This
);
///////////////////////////////////////////////////////////////////////////////
//
typedef
EFI_STATUS
typedef
EFI_STATUS
(EFIAPI *EFI_SIMPLE_NETWORK_STOP) (
IN struct _EFI_SIMPLE_NETWORK *This
IN struct _EFI_SIMPLE_NETWORK_PROTOCOL *This
);
///////////////////////////////////////////////////////////////////////////////
//
typedef
EFI_STATUS
typedef
EFI_STATUS
(EFIAPI *EFI_SIMPLE_NETWORK_INITIALIZE) (
IN struct _EFI_SIMPLE_NETWORK *This,
IN UINTN ExtraRxBufferSize OPTIONAL,
IN UINTN ExtraTxBufferSize OPTIONAL
IN struct _EFI_SIMPLE_NETWORK_PROTOCOL *This,
IN UINTN ExtraRxBufferSize OPTIONAL,
IN UINTN ExtraTxBufferSize OPTIONAL
);
///////////////////////////////////////////////////////////////////////////////
//
typedef
EFI_STATUS
typedef
EFI_STATUS
(EFIAPI *EFI_SIMPLE_NETWORK_RESET) (
IN struct _EFI_SIMPLE_NETWORK *This,
IN BOOLEAN ExtendedVerification
IN struct _EFI_SIMPLE_NETWORK_PROTOCOL *This,
IN BOOLEAN ExtendedVerification
);
///////////////////////////////////////////////////////////////////////////////
//
typedef
EFI_STATUS
typedef
EFI_STATUS
(EFIAPI *EFI_SIMPLE_NETWORK_SHUTDOWN) (
IN struct _EFI_SIMPLE_NETWORK *This
IN struct _EFI_SIMPLE_NETWORK_PROTOCOL *This
);
///////////////////////////////////////////////////////////////////////////////
//
typedef
EFI_STATUS
typedef
EFI_STATUS
(EFIAPI *EFI_SIMPLE_NETWORK_RECEIVE_FILTERS) (
IN struct _EFI_SIMPLE_NETWORK *This,
IN UINT32 Enable,
IN UINT32 Disable,
IN BOOLEAN ResetMCastFilter,
IN UINTN MCastFilterCnt OPTIONAL,
IN EFI_MAC_ADDRESS *MCastFilter OPTIONAL
IN struct _EFI_SIMPLE_NETWORK_PROTOCOL *This,
IN UINT32 Enable,
IN UINT32 Disable,
IN BOOLEAN ResetMCastFilter,
IN UINTN MCastFilterCnt OPTIONAL,
IN EFI_MAC_ADDRESS *MCastFilter OPTIONAL
);
///////////////////////////////////////////////////////////////////////////////
//
typedef
EFI_STATUS
typedef
EFI_STATUS
(EFIAPI *EFI_SIMPLE_NETWORK_STATION_ADDRESS) (
IN struct _EFI_SIMPLE_NETWORK *This,
IN BOOLEAN Reset,
IN EFI_MAC_ADDRESS *New OPTIONAL
IN struct _EFI_SIMPLE_NETWORK_PROTOCOL *This,
IN BOOLEAN Reset,
IN EFI_MAC_ADDRESS *New OPTIONAL
);
///////////////////////////////////////////////////////////////////////////////
//
typedef
EFI_STATUS
typedef
EFI_STATUS
(EFIAPI *EFI_SIMPLE_NETWORK_STATISTICS) (
IN struct _EFI_SIMPLE_NETWORK *This,
IN BOOLEAN Reset,
IN OUT UINTN *StatisticsSize OPTIONAL,
OUT EFI_NETWORK_STATISTICS *StatisticsTable OPTIONAL
IN struct _EFI_SIMPLE_NETWORK_PROTOCOL *This,
IN BOOLEAN Reset,
IN OUT UINTN *StatisticsSize OPTIONAL,
OUT EFI_NETWORK_STATISTICS *StatisticsTable OPTIONAL
);
///////////////////////////////////////////////////////////////////////////////
//
typedef
EFI_STATUS
typedef
EFI_STATUS
(EFIAPI *EFI_SIMPLE_NETWORK_MCAST_IP_TO_MAC) (
IN struct _EFI_SIMPLE_NETWORK *This,
IN BOOLEAN IPv6,
IN EFI_IP_ADDRESS *IP,
OUT EFI_MAC_ADDRESS *MAC
IN struct _EFI_SIMPLE_NETWORK_PROTOCOL *This,
IN BOOLEAN IPv6,
IN EFI_IP_ADDRESS *IP,
OUT EFI_MAC_ADDRESS *MAC
);
///////////////////////////////////////////////////////////////////////////////
//
typedef
EFI_STATUS
typedef
EFI_STATUS
(EFIAPI *EFI_SIMPLE_NETWORK_NVDATA) (
IN struct _EFI_SIMPLE_NETWORK *This,
IN BOOLEAN ReadWrite,
IN UINTN Offset,
IN UINTN BufferSize,
IN OUT VOID *Buffer
IN struct _EFI_SIMPLE_NETWORK_PROTOCOL *This,
IN BOOLEAN ReadWrite,
IN UINTN Offset,
IN UINTN BufferSize,
IN OUT VOID *Buffer
);
///////////////////////////////////////////////////////////////////////////////
//
typedef
EFI_STATUS
typedef
EFI_STATUS
(EFIAPI *EFI_SIMPLE_NETWORK_GET_STATUS) (
IN struct _EFI_SIMPLE_NETWORK *This,
OUT UINT32 *InterruptStatus OPTIONAL,
OUT VOID **TxBuf OPTIONAL
IN struct _EFI_SIMPLE_NETWORK_PROTOCOL *This,
OUT UINT32 *InterruptStatus OPTIONAL,
OUT VOID **TxBuf OPTIONAL
);
///////////////////////////////////////////////////////////////////////////////
//
typedef
EFI_STATUS
typedef
EFI_STATUS
(EFIAPI *EFI_SIMPLE_NETWORK_TRANSMIT) (
IN struct _EFI_SIMPLE_NETWORK *This,
IN UINTN HeaderSize,
IN UINTN BufferSize,
IN VOID *Buffer,
IN EFI_MAC_ADDRESS *SrcAddr OPTIONAL,
IN EFI_MAC_ADDRESS *DestAddr OPTIONAL,
IN UINT16 *Protocol OPTIONAL
IN struct _EFI_SIMPLE_NETWORK_PROTOCOL *This,
IN UINTN HeaderSize,
IN UINTN BufferSize,
IN VOID *Buffer,
IN EFI_MAC_ADDRESS *SrcAddr OPTIONAL,
IN EFI_MAC_ADDRESS *DestAddr OPTIONAL,
IN UINT16 *Protocol OPTIONAL
);
///////////////////////////////////////////////////////////////////////////////
//
typedef
EFI_STATUS
typedef
EFI_STATUS
(EFIAPI *EFI_SIMPLE_NETWORK_RECEIVE) (
IN struct _EFI_SIMPLE_NETWORK *This,
OUT UINTN *HeaderSize OPTIONAL,
IN OUT UINTN *BufferSize,
OUT VOID *Buffer,
OUT EFI_MAC_ADDRESS *SrcAddr OPTIONAL,
OUT EFI_MAC_ADDRESS *DestAddr OPTIONAL,
OUT UINT16 *Protocol OPTIONAL
IN struct _EFI_SIMPLE_NETWORK_PROTOCOL *This,
OUT UINTN *HeaderSize OPTIONAL,
IN OUT UINTN *BufferSize,
OUT VOID *Buffer,
OUT EFI_MAC_ADDRESS *SrcAddr OPTIONAL,
OUT EFI_MAC_ADDRESS *DestAddr OPTIONAL,
OUT UINT16 *Protocol OPTIONAL
);
///////////////////////////////////////////////////////////////////////////////
//
#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 */

View File

@ -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,25 +27,25 @@ typedef enum {
typedef
EFI_STATUS
(EFIAPI *EFI_PCI_IO_PROTOCOL_POLL_IO_MEM) (
IN struct _EFI_PCI_IO *This,
IN EFI_PCI_IO_PROTOCOL_WIDTH Width,
IN UINT8 BarIndex,
IN UINT64 Offset,
IN UINT64 Mask,
IN UINT64 Value,
IN UINT64 Delay,
OUT UINT64 *Result
IN struct _EFI_PCI_IO_PROTOCOL *This,
IN EFI_PCI_IO_PROTOCOL_WIDTH Width,
IN UINT8 BarIndex,
IN UINT64 Offset,
IN UINT64 Mask,
IN UINT64 Value,
IN UINT64 Delay,
OUT UINT64 *Result
);
typedef
EFI_STATUS
(EFIAPI *EFI_PCI_IO_PROTOCOL_IO_MEM) (
IN struct _EFI_PCI_IO *This,
IN EFI_PCI_IO_PROTOCOL_WIDTH Width,
IN UINT8 BarIndex,
IN UINT64 Offset,
IN UINTN Count,
IN OUT VOID *Buffer
IN struct _EFI_PCI_IO_PROTOCOL *This,
IN EFI_PCI_IO_PROTOCOL_WIDTH Width,
IN UINT8 BarIndex,
IN UINT64 Offset,
IN UINTN Count,
IN OUT VOID *Buffer
);
typedef struct {
@ -56,11 +56,11 @@ typedef struct {
typedef
EFI_STATUS
(EFIAPI *EFI_PCI_IO_PROTOCOL_CONFIG) (
IN struct _EFI_PCI_IO *This,
IN EFI_PCI_IO_PROTOCOL_WIDTH Width,
IN UINT32 Offset,
IN UINTN Count,
IN OUT VOID *Buffer
IN struct _EFI_PCI_IO_PROTOCOL *This,
IN EFI_PCI_IO_PROTOCOL_WIDTH Width,
IN UINT32 Offset,
IN UINTN Count,
IN OUT VOID *Buffer
);
typedef struct {
@ -71,13 +71,13 @@ typedef struct {
typedef
EFI_STATUS
(EFIAPI *EFI_PCI_IO_PROTOCOL_COPY_MEM) (
IN struct _EFI_PCI_IO *This,
IN EFI_PCI_IO_PROTOCOL_WIDTH Width,
IN UINT8 DestBarIndex,
IN UINT64 DestOffset,
IN UINT8 SrcBarIndex,
IN UINT64 SrcOffset,
IN UINTN Count
IN struct _EFI_PCI_IO_PROTOCOL *This,
IN EFI_PCI_IO_PROTOCOL_WIDTH Width,
IN UINT8 DestBarIndex,
IN UINT64 DestOffset,
IN UINT8 SrcBarIndex,
IN UINT64 SrcOffset,
IN UINTN Count
);
typedef enum {
@ -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,43 +101,43 @@ EFI_STATUS
typedef
EFI_STATUS
(EFIAPI *EFI_PCI_IO_PROTOCOL_UNMAP) (
IN struct _EFI_PCI_IO *This,
IN VOID *Mapping
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 EFI_ALLOCATE_TYPE Type,
IN EFI_MEMORY_TYPE MemoryType,
IN UINTN Pages,
OUT VOID **HostAddress,
IN UINT64 Attributes
IN struct _EFI_PCI_IO_PROTOCOL *This,
IN EFI_ALLOCATE_TYPE Type,
IN EFI_MEMORY_TYPE MemoryType,
IN UINTN Pages,
OUT VOID **HostAddress,
IN UINT64 Attributes
);
typedef
EFI_STATUS
(EFIAPI *EFI_PCI_IO_PROTOCOL_FREE_BUFFER) (
IN struct _EFI_PCI_IO *This,
IN UINTN Pages,
IN VOID *HostAddress
IN struct _EFI_PCI_IO_PROTOCOL *This,
IN UINTN Pages,
IN VOID *HostAddress
);
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,
OUT UINTN *SegmentNumber,
OUT UINTN *BusNumber,
OUT UINTN *DeviceNumber,
OUT UINTN *FunctionNumber
IN struct _EFI_PCI_IO_PROTOCOL *This,
OUT UINTN *SegmentNumber,
OUT UINTN *BusNumber,
OUT UINTN *DeviceNumber,
OUT UINTN *FunctionNumber
);
#define EFI_PCI_IO_ATTRIBUTE_ISA_IO 0x0002
@ -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,23 +180,23 @@ EFI_STATUS
typedef
EFI_STATUS
(EFIAPI *EFI_PCI_IO_PROTOCOL_GET_BAR_ATTRIBUTES) (
IN struct _EFI_PCI_IO *This,
IN UINT8 BarIndex,
OUT UINT64 *Supports OPTIONAL,
OUT VOID **Resources OPTIONAL
IN struct _EFI_PCI_IO_PROTOCOL *This,
IN UINT8 BarIndex,
OUT UINT64 *Supports OPTIONAL,
OUT VOID **Resources OPTIONAL
);
typedef
EFI_STATUS
(EFIAPI *EFI_PCI_IO_PROTOCOL_SET_BAR_ATTRIBUTES) (
IN struct _EFI_PCI_IO *This,
IN UINT64 Attributes,
IN UINT8 BarIndex,
IN OUT UINT64 *Offset,
IN OUT UINT64 *Length
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 */

View File

@ -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
@ -144,7 +144,7 @@ typedef struct {
// Discover() definitions
//
#define EFI_PXE_BASE_CODE_BOOT_TYPE_BOOTSTRAP 0
#define EFI_PXE_BASE_CODE_BOOT_TYPE_BOOTSTRAP 0
#define EFI_PXE_BASE_CODE_BOOT_TYPE_MS_WINNT_RIS 1
#define EFI_PXE_BASE_CODE_BOOT_TYPE_INTEL_LCM 2
#define EFI_PXE_BASE_CODE_BOOT_TYPE_DOSUNDI 3
@ -264,27 +264,27 @@ typedef struct {
typedef
EFI_STATUS
(EFIAPI *EFI_PXE_BASE_CODE_START) (
IN struct _EFI_PXE_BASE_CODE *This,
IN BOOLEAN UseIpv6
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 BOOLEAN SortOffers
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,108 +294,109 @@ EFI_STATUS
typedef
EFI_STATUS
(EFIAPI *EFI_PXE_BASE_CODE_MTFTP) (
IN struct _EFI_PXE_BASE_CODE *This,
IN EFI_PXE_BASE_CODE_TFTP_OPCODE Operation,
IN OUT VOID *BufferPtr OPTIONAL,
IN BOOLEAN Overwrite,
IN OUT UINT64 *BufferSize,
IN UINTN *BlockSize OPTIONAL,
IN EFI_IP_ADDRESS *ServerIp,
IN UINT8 *Filename,
IN EFI_PXE_BASE_CODE_MTFTP_INFO *Info OPTIONAL,
IN BOOLEAN DontUseBuffer
IN struct _EFI_PXE_BASE_CODE_PROTOCOL *This,
IN EFI_PXE_BASE_CODE_TFTP_OPCODE Operation,
IN OUT VOID *BufferPtr OPTIONAL,
IN BOOLEAN Overwrite,
IN OUT UINT64 *BufferSize,
IN UINTN *BlockSize OPTIONAL,
IN EFI_IP_ADDRESS *ServerIp,
IN UINT8 *Filename,
IN EFI_PXE_BASE_CODE_MTFTP_INFO *Info OPTIONAL,
IN BOOLEAN DontUseBuffer
);
typedef
EFI_STATUS
(EFIAPI *EFI_PXE_BASE_CODE_UDP_WRITE) (
IN struct _EFI_PXE_BASE_CODE *This,
IN UINT16 OpFlags,
IN EFI_IP_ADDRESS *DestIp,
IN EFI_PXE_BASE_CODE_UDP_PORT *DestPort,
IN EFI_IP_ADDRESS *GatewayIp, OPTIONAL
IN EFI_IP_ADDRESS *SrcIp, OPTIONAL
IN OUT EFI_PXE_BASE_CODE_UDP_PORT *SrcPort, OPTIONAL
IN UINTN *HeaderSize, OPTIONAL
IN VOID *HeaderPtr, OPTIONAL
IN UINTN *BufferSize,
IN VOID *BufferPtr
IN struct _EFI_PXE_BASE_CODE_PROTOCOL *This,
IN UINT16 OpFlags,
IN EFI_IP_ADDRESS *DestIp,
IN EFI_PXE_BASE_CODE_UDP_PORT *DestPort,
IN EFI_IP_ADDRESS *GatewayIp, OPTIONAL
IN EFI_IP_ADDRESS *SrcIp, OPTIONAL
IN OUT EFI_PXE_BASE_CODE_UDP_PORT *SrcPort, OPTIONAL
IN UINTN *HeaderSize, OPTIONAL
IN VOID *HeaderPtr, OPTIONAL
IN UINTN *BufferSize,
IN VOID *BufferPtr
);
typedef
EFI_STATUS
(EFIAPI *EFI_PXE_BASE_CODE_UDP_READ) (
IN struct _EFI_PXE_BASE_CODE *This,
IN UINT16 OpFlags,
IN OUT EFI_IP_ADDRESS *DestIp, OPTIONAL
IN OUT EFI_PXE_BASE_CODE_UDP_PORT *DestPort, OPTIONAL
IN OUT EFI_IP_ADDRESS *SrcIp, OPTIONAL
IN OUT EFI_PXE_BASE_CODE_UDP_PORT *SrcPort, OPTIONAL
IN UINTN *HeaderSize, OPTIONAL
IN VOID *HeaderPtr, OPTIONAL
IN OUT UINTN *BufferSize,
IN VOID *BufferPtr
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
IN OUT EFI_IP_ADDRESS *SrcIp, OPTIONAL
IN OUT EFI_PXE_BASE_CODE_UDP_PORT *SrcPort, OPTIONAL
IN UINTN *HeaderSize, OPTIONAL
IN VOID *HeaderPtr, OPTIONAL
IN OUT UINTN *BufferSize,
IN VOID *BufferPtr
);
typedef
EFI_STATUS
(EFIAPI *EFI_PXE_BASE_CODE_SET_IP_FILTER) (
IN struct _EFI_PXE_BASE_CODE *This,
IN EFI_PXE_BASE_CODE_IP_FILTER *NewFilter
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 EFI_IP_ADDRESS *IpAddr,
IN EFI_MAC_ADDRESS *MacAddr OPTIONAL
IN struct _EFI_PXE_BASE_CODE_PROTOCOL *This,
IN EFI_IP_ADDRESS *IpAddr,
IN EFI_MAC_ADDRESS *MacAddr OPTIONAL
);
typedef
EFI_STATUS
(EFIAPI *EFI_PXE_BASE_CODE_SET_PARAMETERS) (
IN struct _EFI_PXE_BASE_CODE *This,
IN BOOLEAN *NewAutoArp, OPTIONAL
IN BOOLEAN *NewSendGUID, OPTIONAL
IN UINT8 *NewTTL, OPTIONAL
IN UINT8 *NewToS, OPTIONAL
IN BOOLEAN *NewMakeCallback OPTIONAL
IN struct _EFI_PXE_BASE_CODE_PROTOCOL *This,
IN BOOLEAN *NewAutoArp, OPTIONAL
IN BOOLEAN *NewSendGUID, OPTIONAL
IN UINT8 *NewTTL, OPTIONAL
IN UINT8 *NewToS, OPTIONAL
IN BOOLEAN *NewMakeCallback OPTIONAL
);
typedef
EFI_STATUS
(EFIAPI *EFI_PXE_BASE_CODE_SET_STATION_IP) (
IN struct _EFI_PXE_BASE_CODE *This,
IN EFI_IP_ADDRESS *NewStationIp, OPTIONAL
IN EFI_IP_ADDRESS *NewSubnetMask OPTIONAL
IN struct _EFI_PXE_BASE_CODE_PROTOCOL *This,
IN EFI_IP_ADDRESS *NewStationIp, OPTIONAL
IN EFI_IP_ADDRESS *NewSubnetMask OPTIONAL
);
typedef
EFI_STATUS
(EFIAPI *EFI_PXE_BASE_CODE_SET_PACKETS) (
IN struct _EFI_PXE_BASE_CODE *This,
BOOLEAN *NewDhcpDiscoverValid, OPTIONAL
BOOLEAN *NewDhcpAckReceived, OPTIONAL
BOOLEAN *NewProxyOfferReceived, OPTIONAL
BOOLEAN *NewPxeDiscoverValid, OPTIONAL
BOOLEAN *NewPxeReplyReceived, OPTIONAL
BOOLEAN *NewPxeBisReplyReceived,OPTIONAL
IN EFI_PXE_BASE_CODE_PACKET *NewDhcpDiscover, OPTIONAL
IN EFI_PXE_BASE_CODE_PACKET *NewDhcpAck, OPTIONAL
IN EFI_PXE_BASE_CODE_PACKET *NewProxyOffer, OPTIONAL
IN EFI_PXE_BASE_CODE_PACKET *NewPxeDiscover, OPTIONAL
IN EFI_PXE_BASE_CODE_PACKET *NewPxeReply, OPTIONAL
IN EFI_PXE_BASE_CODE_PACKET *NewPxeBisReply OPTIONAL
IN struct _EFI_PXE_BASE_CODE_PROTOCOL *This,
BOOLEAN *NewDhcpDiscoverValid, OPTIONAL
BOOLEAN *NewDhcpAckReceived, OPTIONAL
BOOLEAN *NewProxyOfferReceived, OPTIONAL
BOOLEAN *NewPxeDiscoverValid, OPTIONAL
BOOLEAN *NewPxeReplyReceived, OPTIONAL
BOOLEAN *NewPxeBisReplyReceived,OPTIONAL
IN EFI_PXE_BASE_CODE_PACKET *NewDhcpDiscover, OPTIONAL
IN EFI_PXE_BASE_CODE_PACKET *NewDhcpAck, OPTIONAL
IN EFI_PXE_BASE_CODE_PACKET *NewProxyOffer, OPTIONAL
IN EFI_PXE_BASE_CODE_PACKET *NewPxeDiscover, OPTIONAL
IN EFI_PXE_BASE_CODE_PACKET *NewPxeReply, OPTIONAL
IN EFI_PXE_BASE_CODE_PACKET *NewPxeBisReply OPTIONAL
);
//
// 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,
@ -447,18 +457,26 @@ typedef enum {
} EFI_PXE_BASE_CODE_CALLBACK_STATUS;
typedef
EFI_PXE_BASE_CODE_CALLBACK_STATUS
EFI_PXE_BASE_CODE_CALLBACK_STATUS
(EFIAPI *EFI_PXE_CALLBACK) (
IN struct _EFI_PXE_BASE_CODE_CALLBACK *This,
IN EFI_PXE_BASE_CODE_FUNCTION Function,
IN BOOLEAN Received,
IN UINT32 PacketLen,
IN EFI_PXE_BASE_CODE_PACKET *Packet OPTIONAL
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 */

View File

@ -21,14 +21,15 @@ 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,
NoParity,
DefaultParity,
NoParity,
EvenParity,
OddParity,
MarkParity,
@ -36,7 +37,7 @@ typedef enum {
} EFI_PARITY_TYPE;
typedef enum {
DefaultStopBits,
DefaultStopBits,
OneStopBit, // 1 stop bit
OneFiveStopBits, // 1.5 stop bits
TwoStopBits // 2 stop bits
@ -57,49 +58,49 @@ 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 UINT64 BaudRate,
IN UINT32 ReceiveFifoDepth,
IN UINT32 Timeout,
IN EFI_PARITY_TYPE Parity,
IN UINT8 DataBits,
IN EFI_STOP_BITS_TYPE StopBits
IN struct _EFI_SERIAL_IO_PROTOCOL *This,
IN UINT64 BaudRate,
IN UINT32 ReceiveFifoDepth,
IN UINT32 Timeout,
IN EFI_PARITY_TYPE Parity,
IN UINT8 DataBits,
IN EFI_STOP_BITS_TYPE StopBits
);
typedef
EFI_STATUS
(EFIAPI *EFI_SERIAL_SET_CONTROL_BITS) (
IN struct _SERIAL_IO_INTERFACE *This,
IN UINT32 Control
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,
OUT UINT32 *Control
IN struct _EFI_SERIAL_IO_PROTOCOL *This,
OUT UINT32 *Control
);
typedef
EFI_STATUS
(EFIAPI *EFI_SERIAL_WRITE) (
IN struct _SERIAL_IO_INTERFACE *This,
IN OUT UINTN *BufferSize,
IN VOID *Buffer
IN struct _EFI_SERIAL_IO_PROTOCOL *This,
IN OUT UINTN *BufferSize,
IN VOID *Buffer
);
typedef
EFI_STATUS
(EFIAPI *EFI_SERIAL_READ) (
IN struct _SERIAL_IO_INTERFACE *This,
IN OUT UINTN *BufferSize,
OUT VOID *Buffer
IN struct _EFI_SERIAL_IO_PROTOCOL *This,
IN OUT UINTN *BufferSize,
OUT VOID *Buffer
);
typedef struct {
@ -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

View File

@ -8,19 +8,19 @@ Copyright (c) 200 Intel Corporation
Module Name:
EfiUi.h
Abstract:
Abstract:
Protocol used to build User Interface (UI) stuff.
This protocol is just data. It is a multi dimentional array.
For each string there is an array of UI_STRING_ENTRY. Each string
is for a different language translation of the same string. The list
is terminated by a NULL UiString. There can be any number of
is for a different language translation of the same string. The list
is terminated by a NULL UiString. There can be any number of
UI_STRING_ENTRY arrays. A NULL array terminates the list. A NULL array
entry contains all zeros.
entry contains all zeros.
Thus the shortest possible EFI_UI_PROTOCOL has three UI_STRING_ENTRY.
The String, it's NULL terminator, and the NULL terminator for the entire
The String, it's NULL terminator, and the NULL terminator for the entire
thing.
@ -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

View File

@ -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

View File

@ -48,50 +48,54 @@ static struct {
EFI_GUID *Guid;
WCHAR *GuidName;
} KnownGuids[] = {
{ &NullGuid, L"G0"},
{ &EfiGlobalVariable, L"Efi"},
{ &NullGuid, L"G0" },
{ &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"},
{ &gEfiUnicodeCollationProtocolGuid, L"Unicode" },
{ &LegacyBootProtocol, L"LegacyBoot" },
{ &gEfiSerialIoProtocolGuid, L"SerIo" },
{ &VgaClassProtocol, L"VgaClass"},
{ &gEfiSimpleNetworkProtocolGuid, L"Net" },
{ &gEfiNetworkInterfaceIdentifierProtocolGuid, L"Nii" },
{ &gEfiPxeBaseCodeProtocolGuid, L"Pxe" },
{ &gEfiPxeBaseCodeCallbackProtocolGuid, L"PxeCb" },
{ &VariableStoreProtocol, L"varstore"},
{ &LegacyBootProtocol, L"LegacyBoot"},
{ &VgaClassProtocol, L"VgaClass"},
{ &TextOutSpliterProtocol, L"TxtOutSplit"},
{ &ErrorOutSpliterProtocol, L"ErrOutSplit"},
{ &TextInSpliterProtocol, L"TxtInSplit"},
{ &PcAnsiProtocol, L"PcAnsi"},
{ &Vt100Protocol, L"Vt100"},
{ &UnknownDevice, L"Unknown Device"},
{ &TextOutSpliterProtocol, L"TxtOutSplit" },
{ &ErrorOutSpliterProtocol, L"ErrOutSplit" },
{ &TextInSpliterProtocol, L"TxtInSplit" },
{ &gEfiPcAnsiGuid, L"PcAnsi" },
{ &gEfiVT100Guid, L"Vt100" },
{ &gEfiVT100PlusGuid, L"Vt100Plus" },
{ &gEfiVTUTF8Guid, L"VtUtf8" },
{ &UnknownDevice, L"UnknownDev" },
{ &EfiPartTypeSystemPartitionGuid, L"ESP"},
{ &EfiPartTypeLegacyMbrGuid, L"GPT MBR"},
{ &EfiPartTypeSystemPartitionGuid, L"ESP" },
{ &EfiPartTypeLegacyMbrGuid, L"GPT MBR" },
{ &ShellInterfaceProtocol, L"ShellInt"},
{ &SEnvId, L"SEnv"},
{ &SProtId, L"ShellProtId"},
{ &SMapId, L"ShellDevPathMap"},
{ &SAliasId, L"ShellAlias"},
{ &ShellInterfaceProtocol, L"ShellInt" },
{ &SEnvId, L"SEnv" },
{ &SProtId, L"ShellProtId" },
{ &SMapId, L"ShellDevPathMap" },
{ &SAliasId, L"ShellAlias" },
{ NULL }
};
@ -160,7 +164,7 @@ GuidToString (
//
SPrint (Buffer, 0, L"%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x",
Guid->Data1,
Guid->Data1,
Guid->Data2,
Guid->Data3,
Guid->Data4[0],