From 9319d2c2066a3798d1e2b6d29486d933896cbdb0 Mon Sep 17 00:00:00 2001 From: lgao4 Date: Mon, 8 Dec 2008 14:48:27 +0000 Subject: Add comments for most of enum data type. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@6924 6f19259b-4bc3-4df7-8a09-765794883524 --- MdePkg/Include/Pi/PiMultiPhase.h | 13 +- MdePkg/Include/Ppi/Security2.h | 9 ++ MdePkg/Include/Ppi/Smbus2.h | 2 +- MdePkg/Include/Protocol/Arp.h | 4 +- MdePkg/Include/Protocol/Cpu.h | 6 + MdePkg/Include/Protocol/DebugSupport.h | 46 +++---- MdePkg/Include/Protocol/DeviceIo.h | 3 + MdePkg/Include/Protocol/DevicePath.h | 143 +++++++++++++-------- MdePkg/Include/Protocol/DriverConfiguration2.h | 16 +++ MdePkg/Include/Protocol/DriverDiagnostics.h | 11 ++ .../Include/Protocol/NetworkInterfaceIdentifier.h | 4 - MdePkg/Include/Protocol/PciIo.h | 4 +- MdePkg/Include/Protocol/PciRootBridgeIo.h | 34 +++++ MdePkg/Include/Protocol/PxeBaseCode.h | 34 +++-- MdePkg/Include/Protocol/PxeBaseCodeCallBack.h | 6 + MdePkg/Include/Protocol/SerialIo.h | 6 +- MdePkg/Include/Protocol/SimpleNetwork.h | 5 + MdePkg/Include/Protocol/Tcp4.h | 3 + MdePkg/Include/Protocol/UgaDraw.h | 6 +- MdePkg/Include/Protocol/UgaIo.h | 12 +- MdePkg/Include/Protocol/Usb2HostController.h | 32 +++-- .../Include/Uefi/UefiInternalFormRepresentation.h | 4 +- 22 files changed, 282 insertions(+), 121 deletions(-) (limited to 'MdePkg/Include') diff --git a/MdePkg/Include/Pi/PiMultiPhase.h b/MdePkg/Include/Pi/PiMultiPhase.h index bbba442..4f008ce 100644 --- a/MdePkg/Include/Pi/PiMultiPhase.h +++ b/MdePkg/Include/Pi/PiMultiPhase.h @@ -92,9 +92,16 @@ typedef struct { } EFI_STATUS_CODE_DATA; -// -// Bit values for Authentication Status -// +/// +/// Bit values for Authentication Status +/// +/// xx00 Image was not signed. +/// xxx1 Platform security policy override. Assumes same meaning as 0010 (the image was signed, the +/// signature was tested, and the signature passed authentication test). +/// 0010 Image was signed, the signature was tested, and the signature passed authentication test. +/// 0110 Image was signed and the signature was not tested. +/// 1010 Image was signed, the signature was tested, and the signature failed the authentication test. +/// #define EFI_AUTH_STATUS_PLATFORM_OVERRIDE 0x01 #define EFI_AUTH_STATUS_IMAGE_SIGNED 0x02 #define EFI_AUTH_STATUS_NOT_TESTED 0x04 diff --git a/MdePkg/Include/Ppi/Security2.h b/MdePkg/Include/Ppi/Security2.h index c48f970..8c9eb90 100644 --- a/MdePkg/Include/Ppi/Security2.h +++ b/MdePkg/Include/Ppi/Security2.h @@ -47,6 +47,15 @@ typedef struct _EFI_PEI_SECURITY2_PPI EFI_PEI_SECURITY2_PPI; @param This Interface pointer that implements the particular EFI_PEI_SECURITY2_PPI instance. @param AuthenticationStatus Authentication status of the file. + xx00 Image was not signed. + xxx1 Platform security policy override. + Assumes same meaning as 0010 (the image was signed, the + signature was tested, and the signature passed authentication test). + 0010 Image was signed, the signature was tested, + and the signature passed authentication test. + 0110 Image was signed and the signature was not tested. + 1010 Image was signed, the signature was tested, + and the signature failed the authentication test. @param FvHandle Handle of the volume in which the file resides. This allows different policies depending on different firmware volumes. diff --git a/MdePkg/Include/Ppi/Smbus2.h b/MdePkg/Include/Ppi/Smbus2.h index bced188..21778ae 100644 --- a/MdePkg/Include/Ppi/Smbus2.h +++ b/MdePkg/Include/Ppi/Smbus2.h @@ -34,7 +34,7 @@ typedef struct _EFI_PEI_SMBUS2_PPI EFI_PEI_SMBUS2_PPI; typedef UINTN EFI_SMBUS_DEVICE_COMMAND; -/* +/** Executes an SMBus operation to an SMBus controller. Returns when either the command has been executed or an error is encountered in doing the operation. diff --git a/MdePkg/Include/Protocol/Arp.h b/MdePkg/Include/Protocol/Arp.h index 0cc4560..f4fe49e 100644 --- a/MdePkg/Include/Protocol/Arp.h +++ b/MdePkg/Include/Protocol/Arp.h @@ -78,7 +78,7 @@ typedef struct { /// /// 16-bit protocol type number in host byte order. /// - UINT16 SwAddressType; ///< Host byte order + UINT16 SwAddressType; /// /// Length in bytes of the station's protocol address to register. @@ -91,7 +91,7 @@ typedef struct { /// StationAddress points to the first byte of this station's IP /// address stored in network byte order. /// - VOID *StationAddress; ///< Network byte order + VOID *StationAddress; /// /// The timeout value in 100-ns units that is associated with each diff --git a/MdePkg/Include/Protocol/Cpu.h b/MdePkg/Include/Protocol/Cpu.h index 1f3a3c1..edb63fd 100644 --- a/MdePkg/Include/Protocol/Cpu.h +++ b/MdePkg/Include/Protocol/Cpu.h @@ -24,6 +24,9 @@ typedef struct _EFI_CPU_ARCH_PROTOCOL EFI_CPU_ARCH_PROTOCOL; +/// +/// The type of flush operation +/// typedef enum { EfiCpuFlushTypeWriteBackInvalidate, EfiCpuFlushTypeWriteBack, @@ -31,6 +34,9 @@ typedef enum { EfiCpuMaxFlushType } EFI_CPU_FLUSH_TYPE; +/// +/// The type of processor INIT. +/// typedef enum { EfiCpuInit, EfiCpuMaxInitType diff --git a/MdePkg/Include/Protocol/DebugSupport.h b/MdePkg/Include/Protocol/DebugSupport.h index f29f2a6..b59ca4d 100644 --- a/MdePkg/Include/Protocol/DebugSupport.h +++ b/MdePkg/Include/Protocol/DebugSupport.h @@ -33,13 +33,14 @@ typedef struct _EFI_DEBUG_SUPPORT_PROTOCOL EFI_DEBUG_SUPPORT_PROTOCOL; } /// -/// Debug Support definitions +/// Processor exception to be hooked. +/// All exception types for IA32, X64, Itanium and EBC processors are defined. /// typedef INTN EFI_EXCEPTION_TYPE; -// -// IA-32 processor exception types -// +/// +/// IA-32 processor exception types +/// #define EXCEPT_IA32_DIVIDE_ERROR 0 #define EXCEPT_IA32_DEBUG 1 #define EXCEPT_IA32_NMI 2 @@ -59,9 +60,6 @@ typedef INTN EFI_EXCEPTION_TYPE; #define EXCEPT_IA32_SIMD 19 /// -/// IA-32 processor context definition -/// -/// /// FXSAVE_STATE /// FP / MMX / XMM registers (see fxrstor instruction definition) /// @@ -95,6 +93,9 @@ typedef struct { UINT8 Reserved11[14 * 16]; } EFI_FX_SAVE_STATE_IA32; +/// +/// IA-32 processor context definition +/// typedef struct { UINT32 ExceptionData; EFI_FX_SAVE_STATE_IA32 FxSaveState; @@ -131,9 +132,9 @@ typedef struct { UINT32 Eax; } EFI_SYSTEM_CONTEXT_IA32; -// -// x64 processor exception types -// +/// +/// x64 processor exception types +/// #define EXCEPT_X64_DIVIDE_ERROR 0 #define EXCEPT_X64_DEBUG 1 #define EXCEPT_X64_NMI 2 @@ -153,8 +154,6 @@ typedef struct { #define EXCEPT_X64_SIMD 19 /// -/// x64 processor context definition -/// /// FXSAVE_STATE /// FP / MMX / XMM registers (see fxrstor instruction definition) /// @@ -188,6 +187,9 @@ typedef struct { UINT8 Reserved11[14 * 16]; } EFI_FX_SAVE_STATE_X64; +/// +/// x64 processor context definition +/// typedef struct { UINT64 ExceptionData; EFI_FX_SAVE_STATE_X64 FxSaveState; @@ -233,9 +235,9 @@ typedef struct { UINT64 R15; } EFI_SYSTEM_CONTEXT_X64; -// -// IPF processor exception types -// +/// +/// Itanium Processor Family Exception types +/// #define EXCEPT_IPF_VHTP_TRANSLATION 0 #define EXCEPT_IPF_INSTRUCTION_TLB 1 #define EXCEPT_IPF_DATA_TLB 2 @@ -434,20 +436,20 @@ typedef struct { } EFI_SYSTEM_CONTEXT_IPF; -// -// EBC processor exception types -// +/// +/// EBC processor exception types +/// #define EXCEPT_EBC_UNDEFINED 0 #define EXCEPT_EBC_DIVIDE_ERROR 1 #define EXCEPT_EBC_DEBUG 2 #define EXCEPT_EBC_BREAKPOINT 3 #define EXCEPT_EBC_OVERFLOW 4 -#define EXCEPT_EBC_INVALID_OPCODE 5 // opcode out of range +#define EXCEPT_EBC_INVALID_OPCODE 5 /// opcode out of range #define EXCEPT_EBC_STACK_FAULT 6 #define EXCEPT_EBC_ALIGNMENT_CHECK 7 -#define EXCEPT_EBC_INSTRUCTION_ENCODING 8 // malformed instruction -#define EXCEPT_EBC_BAD_BREAK 9 // BREAK 0 or undefined BREAK -#define EXCEPT_EBC_STEP 10 // to support debug stepping +#define EXCEPT_EBC_INSTRUCTION_ENCODING 8 /// malformed instruction +#define EXCEPT_EBC_BAD_BREAK 9 /// BREAK 0 or undefined BREAK +#define EXCEPT_EBC_STEP 10 /// to support debug stepping /// /// For coding convenience, define the maximum valid EBC exception. /// diff --git a/MdePkg/Include/Protocol/DeviceIo.h b/MdePkg/Include/Protocol/DeviceIo.h index 6ed81ed..24939d8 100644 --- a/MdePkg/Include/Protocol/DeviceIo.h +++ b/MdePkg/Include/Protocol/DeviceIo.h @@ -35,6 +35,9 @@ typedef struct _EFI_DEVICE_IO_PROTOCOL EFI_DEVICE_IO_PROTOCOL; /// typedef EFI_DEVICE_IO_PROTOCOL EFI_DEVICE_IO_INTERFACE; +/// +/// Device IO Access Width +/// typedef enum { IO_UINT8 = 0, IO_UINT16 = 1, diff --git a/MdePkg/Include/Protocol/DevicePath.h b/MdePkg/Include/Protocol/DevicePath.h index 53890a6..b5ce737 100644 --- a/MdePkg/Include/Protocol/DevicePath.h +++ b/MdePkg/Include/Protocol/DevicePath.h @@ -29,12 +29,8 @@ 0x9576e91, 0x6d3f, 0x11d2, {0x8e, 0x39, 0x0, 0xa0, 0xc9, 0x69, 0x72, 0x3b } \ } -// -// Protocol GUID defined in EFI1.1. -// - /// -/// Device Path information +/// Device Path guid definition for backward-compatible with EFI1.1. /// #define DEVICE_PATH_PROTOCOL EFI_DEVICE_PATH_PROTOCOL_GUID @@ -67,7 +63,7 @@ typedef struct { } EFI_DEVICE_PATH_PROTOCOL; /// -/// For backward-compatible with EFI1.1. +/// Device Path protocol definition for backward-compatible with EFI1.1. /// typedef EFI_DEVICE_PATH_PROTOCOL EFI_DEVICE_PATH; @@ -113,9 +109,13 @@ typedef struct { } PCCARD_DEVICE_PATH; /// -/// Memory Mapped Device Path +/// Memory Mapped Device Path SubType /// #define HW_MEMMAP_DP 0x03 + +/// +/// Memory Mapped Device Path +/// typedef struct { EFI_DEVICE_PATH_PROTOCOL Header; /// @@ -133,11 +133,15 @@ typedef struct { } MEMMAP_DEVICE_PATH; /// +/// Hardware Vendor Device Path SubType +/// +#define HW_VENDOR_DP 0x04 + +/// /// The Vendor Device Path allows the creation of vendor-defined Device Paths. A vendor must /// allocate a Vendor GUID for a Device Path. The Vendor GUID can then be used to define the /// contents on the n bytes that follow in the Vendor Device Path node. /// -#define HW_VENDOR_DP 0x04 typedef struct { EFI_DEVICE_PATH_PROTOCOL Header; /// @@ -150,9 +154,13 @@ typedef struct { } VENDOR_DEVICE_PATH; /// -/// Controller Device Path +/// Controller Device Path SubType /// #define HW_CONTROLLER_DP 0x05 + +/// +/// Controller Device Path +/// typedef struct { EFI_DEVICE_PATH_PROTOCOL Header; /// @@ -162,12 +170,12 @@ typedef struct { } CONTROLLER_DEVICE_PATH; /// -/// ACPI Device Paths +/// ACPI Device Paths /// #define ACPI_DEVICE_PATH 0x02 /// -/// ACPI Device Path +/// ACPI Device Path SubType /// #define ACPI_DP 0x01 typedef struct { @@ -189,7 +197,7 @@ typedef struct { } ACPI_HID_DEVICE_PATH; /// -/// Expanded ACPI Device Path. +/// Expanded ACPI Device Path SubType /// #define ACPI_EXTENDED_DP 0x02 typedef struct { @@ -235,13 +243,16 @@ typedef struct { #define PNP_EISA_ID_MASK 0xffff #define EISA_ID_TO_NUM(_Id) ((_Id) >> 16) +/// +/// ACPI _ADR Device Path SubType +/// +#define ACPI_ADR_DP 0x03 /// /// The _ADR device path is used to contain video output device attributes to support the Graphics /// Output Protocol. The device path can contain multiple _ADR entries if multiple video output /// devices are displaying the same output. /// -#define ACPI_ADR_DP 0x03 typedef struct { EFI_DEVICE_PATH_PROTOCOL Header; /// @@ -250,9 +261,9 @@ typedef struct { /// least one _ADR value is required. /// UINT32 ADR; - /// - /// This device path may optionally contain more than one _ADR entry. - /// + // + // This device path may optionally contain more than one _ADR entry. + // } ACPI_ADR_DEVICE_PATH; #define ACPI_ADR_DISPLAY_TYPE_OTHER 0 @@ -280,7 +291,7 @@ typedef struct { #define MESSAGING_DEVICE_PATH 0x03 /// -/// ATAPI Device Path +/// ATAPI Device Path SubType /// #define MSG_ATAPI_DP 0x01 typedef struct { @@ -300,7 +311,7 @@ typedef struct { } ATAPI_DEVICE_PATH; /// -/// SCSI Device Path +/// SCSI Device Path SubType /// #define MSG_SCSI_DP 0x02 typedef struct { @@ -316,7 +327,7 @@ typedef struct { } SCSI_DEVICE_PATH; /// -/// Fibre Channel +/// Fibre Channel SubType /// #define MSG_FIBRECHANNEL_DP 0x03 typedef struct { @@ -336,7 +347,7 @@ typedef struct { } FIBRECHANNEL_DEVICE_PATH; /// -/// 1394 Device Path +/// 1394 Device Path SubType /// #define MSG_1394_DP 0x04 typedef struct { @@ -352,7 +363,7 @@ typedef struct { } F1394_DEVICE_PATH; /// -/// USB Device Path +/// USB Device Path SubType /// #define MSG_USB_DP 0x05 typedef struct { @@ -368,7 +379,7 @@ typedef struct { } USB_DEVICE_PATH; /// -/// USB Class Device Path +/// USB Class Device Path SubType /// #define MSG_USB_CLASS_DP 0x0f typedef struct { @@ -401,10 +412,13 @@ typedef struct { } USB_CLASS_DEVICE_PATH; /// -/// This device path describes a USB device using its serial number. -/// USB WWID Device Path +/// USB WWID Device Path SubType /// #define MSG_USB_WWID_DP 0x10 + +/// +/// This device path describes a USB device using its serial number. +/// typedef struct { EFI_DEVICE_PATH_PROTOCOL Header; /// @@ -429,7 +443,7 @@ typedef struct { } USB_WWID_DEVICE_PATH; /// -/// Device Logical Unit +/// Device Logical Unit SubType /// #define MSG_DEVICE_LOGICAL_UNIT_DP 0x11 typedef struct { @@ -441,7 +455,7 @@ typedef struct { } DEVICE_LOGICAL_UNIT_DEVICE_PATH; /// -/// SATA Device Path +/// SATA Device Path SubType /// #define MSG_SATA_DP 0x12 typedef struct { @@ -464,7 +478,7 @@ typedef struct { } SATA_DEVICE_PATH; /// -/// I2O Device Path +/// I2O Device Path SubType /// #define MSG_I2O_DP 0x06 typedef struct { @@ -476,7 +490,7 @@ typedef struct { } I2O_DEVICE_PATH; /// -/// MAC Address Device Path +/// MAC Address Device Path SubType /// #define MSG_MAC_ADDR_DP 0x0b typedef struct { @@ -492,7 +506,7 @@ typedef struct { } MAC_ADDR_DEVICE_PATH; /// -/// IPv4 Device Path +/// IPv4 Device Path SubType /// #define MSG_IPv4_DP 0x0c typedef struct { @@ -525,7 +539,7 @@ typedef struct { } IPv4_DEVICE_PATH; /// -/// IPv6 Device Path +/// IPv6 Device Path SubType /// #define MSG_IPv6_DP 0x0d typedef struct { @@ -558,7 +572,7 @@ typedef struct { } IPv6_DEVICE_PATH; /// -/// InfiniBand Device Path +/// InfiniBand Device Path SubType /// #define MSG_INFINIBAND_DP 0x09 typedef struct { @@ -599,7 +613,7 @@ typedef struct { #define INFINIBAND_RESOURCE_FLAG_NETWORK_PROTOCOL 0x10 /// -/// UART Device Path +/// UART Device Path SubType /// #define MSG_UART_DP 0x0e typedef struct { @@ -649,15 +663,16 @@ typedef VENDOR_DEVICE_PATH VENDOR_DEFINED_DEVICE_PATH; #define DEVICE_PATH_MESSAGING_VT_100_PLUS EFI_VT_100_PLUS_GUID #define DEVICE_PATH_MESSAGING_VT_UTF8 EFI_VT_UTF8_GUID +#define DEVICE_PATH_MESSAGING_UART_FLOW_CONTROL EFI_UART_DEVICE_PATH_GUID + /// /// A new device path node is defined to declare flow control characteristics. /// UART Flow Control Messaging Device Path /// -#define DEVICE_PATH_MESSAGING_UART_FLOW_CONTROL EFI_UART_DEVICE_PATH_GUID typedef struct { EFI_DEVICE_PATH_PROTOCOL Header; /// - /// DEVICE_PATH_MESSAGING_UART_FLOW_CONTROL + /// DEVICE_PATH_MESSAGING_UART_FLOW_CONTROL GUID /// EFI_GUID Guid; /// @@ -669,14 +684,14 @@ typedef struct { UINT32 FlowControlMap; } UART_FLOW_CONTROL_DEVICE_PATH; +#define DEVICE_PATH_MESSAGING_SAS EFI_SAS_DEVICE_PATH_GUID /// /// Serial Attached SCSI (SAS) devices. /// -#define DEVICE_PATH_MESSAGING_SAS EFI_SAS_DEVICE_PATH_GUID typedef struct { EFI_DEVICE_PATH_PROTOCOL Header; /// - /// DEVICE_PATH_MESSAGING_SAS + /// DEVICE_PATH_MESSAGING_SAS GUID /// EFI_GUID Guid; /// @@ -702,7 +717,7 @@ typedef struct { } SAS_DEVICE_PATH; /// -/// iSCSI Device Path Node (Base Information) +/// iSCSI Device Path SubType /// #define MSG_ISCSI_DP 0x13 typedef struct { @@ -746,10 +761,13 @@ typedef struct { #define MEDIA_DEVICE_PATH 0x04 /// -/// The Hard Drive Media Device Path is used to represent a partition on a hard drive. -/// Hard Drive Media Device Path +/// Hard Drive Media Device Path SubType /// #define MEDIA_HARDDRIVE_DP 0x01 + +/// +/// The Hard Drive Media Device Path is used to represent a partition on a hard drive. +/// typedef struct { EFI_DEVICE_PATH_PROTOCOL Header; /// @@ -795,10 +813,13 @@ typedef struct { #define SIGNATURE_TYPE_GUID 0x02 /// -/// The CD-ROM Media Device Path is used to define a system partition that exists on a CD-ROM. -/// CD-ROM Media Device Path +/// CD-ROM Media Device Path SubType /// #define MEDIA_CDROM_DP 0x02 + +/// +/// The CD-ROM Media Device Path is used to define a system partition that exists on a CD-ROM. +/// typedef struct { EFI_DEVICE_PATH_PROTOCOL Header; /// @@ -815,13 +836,13 @@ typedef struct { UINT64 PartitionSize; } CDROM_DEVICE_PATH; -/// -/// Use VENDOR_DEVICE_PATH struct -/// -#define MEDIA_VENDOR_DP 0x03 +// +// Use VENDOR_DEVICE_PATH struct +// +#define MEDIA_VENDOR_DP 0x03 /// Media vendor device path subtype /// -/// File Path Media Device Path +/// File Path Media Device Path SubType /// #define MEDIA_FILEPATH_DP 0x04 typedef struct { @@ -835,11 +856,15 @@ typedef struct { #define SIZE_OF_FILEPATH_DEVICE_PATH EFI_FIELD_OFFSET(FILEPATH_DEVICE_PATH,PathName) /// +/// Media Protocol Device Path SubType +/// +#define MEDIA_PROTOCOL_DP 0x05 + +/// /// The Media Protocol Device Path is used to denote the protocol that is being /// used in a device path at the location of the path specified. /// Many protocols are inherent to the style of device path. /// -#define MEDIA_PROTOCOL_DP 0x05 typedef struct { EFI_DEVICE_PATH_PROTOCOL Header; /// @@ -849,10 +874,13 @@ typedef struct { } MEDIA_PROTOCOL_DEVICE_PATH; /// -/// This type is used by systems implementing the UEFI PI Specification 1.0 to describe a firmware volume. -/// PIWG Firmware Volume Device Path. +/// PIWG Firmware Volume Device Path SubType /// #define MEDIA_PIWG_FW_VOL_DP 0x7 + +/// +/// This device path is used by systems implementing the UEFI PI Specification 1.0 to describe a firmware volume. +/// typedef struct { EFI_DEVICE_PATH_PROTOCOL Header; /// @@ -862,10 +890,13 @@ typedef struct { } MEDIA_FW_VOL_DEVICE_PATH; /// -/// This type is used by systems implementing the UEFI PI Specification 1.0 to describe a firmware file. -/// PIWG Firmware Volume Device Path +/// PIWG Firmware Volume Device Path SubType /// #define MEDIA_PIWG_FW_FILE_DP 0x6 + +/// +/// This device path is used by systems implementing the UEFI PI Specification 1.0 to describe a firmware file. +/// typedef struct { EFI_DEVICE_PATH_PROTOCOL Header; /// @@ -875,11 +906,18 @@ typedef struct { } MEDIA_FW_VOL_FILEPATH_DEVICE_PATH; /// -/// This Device Path is used to describe the booting of non-EFI-aware operating systems. /// BIOS Boot Specification Device Path /// #define BBS_DEVICE_PATH 0x05 + +/// +/// BIOS Boot Specification Device Path SubType +/// #define BBS_BBS_DP 0x01 + +/// +/// This Device Path is used to describe the booting of non-EFI-aware operating systems. +/// typedef struct { EFI_DEVICE_PATH_PROTOCOL Header; /// @@ -912,7 +950,6 @@ typedef struct { /// /// Union of all possible Device Paths and pointers to Device Paths /// - typedef union { EFI_DEVICE_PATH_PROTOCOL DevPath; PCI_DEVICE_PATH Pci; diff --git a/MdePkg/Include/Protocol/DriverConfiguration2.h b/MdePkg/Include/Protocol/DriverConfiguration2.h index e159743..360b02b 100644 --- a/MdePkg/Include/Protocol/DriverConfiguration2.h +++ b/MdePkg/Include/Protocol/DriverConfiguration2.h @@ -26,9 +26,25 @@ typedef struct _EFI_DRIVER_CONFIGURATION2_PROTOCOL EFI_DRIVER_CONFIGURATION2_PROTOCOL; typedef enum { + /// + /// The controller is still in a usable state. No actions + /// are required before this controller can be used again. + /// EfiDriverConfigurationActionNone = 0, + /// + /// The driver has detected that the controller is not in a + /// usable state, and it needs to be stopped. + /// EfiDriverConfigurationActionStopController = 1, + /// + /// This controller needs to be stopped and restarted + /// before it can be used again. + /// EfiDriverConfigurationActionRestartController = 2, + /// + /// A configuration change has been made that requires the platform to be restarted before + /// the controller can be used again. + /// EfiDriverConfigurationActionRestartPlatform = 3, EfiDriverConfigurationActionMaximum } EFI_DRIVER_CONFIGURATION_ACTION_REQUIRED; diff --git a/MdePkg/Include/Protocol/DriverDiagnostics.h b/MdePkg/Include/Protocol/DriverDiagnostics.h index 4c62f42..f3683f3 100644 --- a/MdePkg/Include/Protocol/DriverDiagnostics.h +++ b/MdePkg/Include/Protocol/DriverDiagnostics.h @@ -26,8 +26,19 @@ typedef struct _EFI_DRIVER_DIAGNOSTICS_PROTOCOL EFI_DRIVER_DIAGNOSTICS_PROTOCOL; typedef enum { + /// + /// Performs standard diagnostics on the controller. + /// EfiDriverDiagnosticTypeStandard = 0, + /// + /// This is an optional diagnostic type that performs diagnostics on the controller that may + /// take an extended amount of time to execute. + /// EfiDriverDiagnosticTypeExtended = 1, + /// + /// This is an optional diagnostic type that performs diagnostics on the controller that are + /// suitable for a manufacturing and test environment. + /// EfiDriverDiagnosticTypeManufacturing= 2, EfiDriverDiagnosticTypeMaximum } EFI_DRIVER_DIAGNOSTIC_TYPE; diff --git a/MdePkg/Include/Protocol/NetworkInterfaceIdentifier.h b/MdePkg/Include/Protocol/NetworkInterfaceIdentifier.h index 1299069..cebed6e 100644 --- a/MdePkg/Include/Protocol/NetworkInterfaceIdentifier.h +++ b/MdePkg/Include/Protocol/NetworkInterfaceIdentifier.h @@ -39,10 +39,6 @@ typedef struct _EFI_NETWORK_INTERFACE_IDENTIFIER_PROTOCOL EFI_NETWORK_INTERFACE /// typedef EFI_NETWORK_INTERFACE_IDENTIFIER_PROTOCOL EFI_NETWORK_INTERFACE_IDENTIFIER_INTERFACE; -typedef enum { - EfiNetworkInterfaceUndi = 1 -} EFI_NETWORK_PROTOCOL_TYPE; - /// /// An optional protocol that is used to describe details about the software /// layer that is used to produce the Simple Network Protocol. diff --git a/MdePkg/Include/Protocol/PciIo.h b/MdePkg/Include/Protocol/PciIo.h index b233f32..0aaa718 100644 --- a/MdePkg/Include/Protocol/PciIo.h +++ b/MdePkg/Include/Protocol/PciIo.h @@ -27,7 +27,9 @@ typedef struct _EFI_PCI_IO_PROTOCOL EFI_PCI_IO_PROTOCOL; /// -/// Prototypes for the PCI I/O Protocol +/// ******************************************************* +/// EFI_PCI_IO_PROTOCOL_WIDTH +/// ******************************************************* /// typedef enum { EfiPciIoWidthUint8 = 0, diff --git a/MdePkg/Include/Protocol/PciRootBridgeIo.h b/MdePkg/Include/Protocol/PciRootBridgeIo.h index 4435ae5..a563f94 100644 --- a/MdePkg/Include/Protocol/PciRootBridgeIo.h +++ b/MdePkg/Include/Protocol/PciRootBridgeIo.h @@ -26,6 +26,11 @@ typedef struct _EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL; +/// +/// ******************************************************* +/// EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_WIDTH +/// ******************************************************* +/// typedef enum { EfiPciWidthUint8, EfiPciWidthUint16, @@ -42,12 +47,41 @@ typedef enum { EfiPciWidthMaximum } EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_WIDTH; +/// +/// ******************************************************* +/// EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_OPERATION +/// ******************************************************* +/// typedef enum { + /// + /// A read operation from system memory by a bus master that is not capable of producing + /// PCI dual address cycles. + /// EfiPciOperationBusMasterRead, + /// + /// A write operation from system memory by a bus master that is not capable of producing + /// PCI dual address cycles. + /// EfiPciOperationBusMasterWrite, + /// + /// Provides both read and write access to system memory by both the processor and a bus + /// master that is not capable of producing PCI dual address cycles. + /// EfiPciOperationBusMasterCommonBuffer, + /// + /// A read operation from system memory by a bus master that is capable of producing PCI + /// dual address cycles. + /// EfiPciOperationBusMasterRead64, + /// + /// A write operation to system memory by a bus master that is capable of producing PCI + /// dual address cycles. + /// EfiPciOperationBusMasterWrite64, + /// + /// Provides both read and write access to system memory by both the processor and a bus + /// master that is capable of producing PCI dual address cycles. + /// EfiPciOperationBusMasterCommonBuffer64, EfiPciOperationMaximum } EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_OPERATION; diff --git a/MdePkg/Include/Protocol/PxeBaseCode.h b/MdePkg/Include/Protocol/PxeBaseCode.h index afc0b66..4085726 100644 --- a/MdePkg/Include/Protocol/PxeBaseCode.h +++ b/MdePkg/Include/Protocol/PxeBaseCode.h @@ -68,6 +68,9 @@ typedef struct { /// #define EFI_PXE_BASE_CODE_MAX_IPCNT 8 +/// +/// IP Receive Filter structure +/// typedef struct { UINT8 Filters; UINT8 IpCnt; @@ -81,13 +84,16 @@ typedef struct { #define EFI_PXE_BASE_CODE_IP_FILTER_PROMISCUOUS_MULTICAST 0x0008 /// -/// ARP Cache definitions +/// ARP cache entries /// typedef struct { EFI_IP_ADDRESS IpAddr; EFI_MAC_ADDRESS MacAddr; } EFI_PXE_BASE_CODE_ARP_ENTRY; +/// +/// ARP route table entries +/// typedef struct { EFI_IP_ADDRESS IpAddr; EFI_IP_ADDRESS SubnetMask; @@ -160,7 +166,7 @@ typedef struct { } EFI_PXE_BASE_CODE_DISCOVER_INFO; /// -/// Mtftp() definitions +/// TFTP opcode definitions /// typedef enum { EFI_PXE_BASE_CODE_TFTP_FIRST, @@ -174,6 +180,11 @@ typedef enum { EFI_PXE_BASE_CODE_MTFTP_LAST } EFI_PXE_BASE_CODE_TFTP_OPCODE; +/// +/// MTFTP information. This information is required +/// to start or join a multicast TFTP session. It is also required to +/// perform the "get file size" and "read directory" operations of MTFTP. +/// typedef struct { EFI_IP_ADDRESS MCastIp; EFI_PXE_BASE_CODE_UDP_PORT CPort; @@ -183,7 +194,7 @@ typedef struct { } EFI_PXE_BASE_CODE_MTFTP_INFO; /// -/// Packet definitions +/// DHCPV4 Packet structure /// typedef struct { UINT8 BootpOpcode; @@ -204,22 +215,29 @@ typedef struct { UINT8 DhcpOptions[56]; } EFI_PXE_BASE_CODE_DHCPV4_PACKET; +/// +/// Packet structure +/// typedef union { UINT8 Raw[1472]; EFI_PXE_BASE_CODE_DHCPV4_PACKET Dhcpv4; - - /// - /// EFI_PXE_BASE_CODE_DHCPV6_PACKET Dhcpv6; - /// + // + // EFI_PXE_BASE_CODE_DHCPV6_PACKET Dhcpv6; + // } EFI_PXE_BASE_CODE_PACKET; - // // PXE Base Code Mode structure // #define EFI_PXE_BASE_CODE_MAX_ARP_ENTRIES 8 #define EFI_PXE_BASE_CODE_MAX_ROUTE_ENTRIES 8 +/// +/// EFI_PXE_BASE_CODE_MODE +/// The data values in this structure are read-only and +/// are updated by the code that produces the +/// EFI_PXE_BASE_CODE_PROTOCOL functions. +/// typedef struct { BOOLEAN Started; BOOLEAN Ipv6Available; diff --git a/MdePkg/Include/Protocol/PxeBaseCodeCallBack.h b/MdePkg/Include/Protocol/PxeBaseCodeCallBack.h index 8fe8f0b..f8267d8 100644 --- a/MdePkg/Include/Protocol/PxeBaseCodeCallBack.h +++ b/MdePkg/Include/Protocol/PxeBaseCodeCallBack.h @@ -46,6 +46,9 @@ 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; +/// +/// Event type list for PXE Base Code Protocol function +/// typedef enum { EFI_PXE_BASE_CODE_FUNCTION_FIRST, EFI_PXE_BASE_CODE_FUNCTION_DHCP, @@ -58,6 +61,9 @@ typedef enum { EFI_PXE_BASE_CODE_PXE_FUNCTION_LAST } EFI_PXE_BASE_CODE_FUNCTION; +/// +/// Callback status type +/// typedef enum { EFI_PXE_BASE_CODE_CALLBACK_STATUS_FIRST, EFI_PXE_BASE_CODE_CALLBACK_STATUS_CONTINUE, diff --git a/MdePkg/Include/Protocol/SerialIo.h b/MdePkg/Include/Protocol/SerialIo.h index 4af00fc..32415ca 100644 --- a/MdePkg/Include/Protocol/SerialIo.h +++ b/MdePkg/Include/Protocol/SerialIo.h @@ -37,7 +37,8 @@ typedef struct _EFI_SERIAL_IO_PROTOCOL EFI_SERIAL_IO_PROTOCOL; typedef EFI_SERIAL_IO_PROTOCOL SERIAL_IO_INTERFACE; /// -/// Serial IO Data structures +/// Parity type that is computed or checked as each character is transmitted or received. If the +/// device does not support parity, the value is the default parity value. /// typedef enum { DefaultParity, @@ -48,6 +49,9 @@ typedef enum { SpaceParity } EFI_PARITY_TYPE; +/// +/// Stop bits type +/// typedef enum { DefaultStopBits, OneStopBit, diff --git a/MdePkg/Include/Protocol/SimpleNetwork.h b/MdePkg/Include/Protocol/SimpleNetwork.h index 48033d8..252c5bd 100644 --- a/MdePkg/Include/Protocol/SimpleNetwork.h +++ b/MdePkg/Include/Protocol/SimpleNetwork.h @@ -119,6 +119,11 @@ typedef struct { } EFI_NETWORK_STATISTICS; +/// +/// State of the network interface +/// When an EFI_SIMPLE_NETWORK_PROTOCOL driver initializes a +/// network interface, the network interface is left in the EfiSimpleNetworkStopped state. +/// typedef enum { EfiSimpleNetworkStopped, EfiSimpleNetworkStarted, diff --git a/MdePkg/Include/Protocol/Tcp4.h b/MdePkg/Include/Protocol/Tcp4.h index c1230f1..d750fe9 100644 --- a/MdePkg/Include/Protocol/Tcp4.h +++ b/MdePkg/Include/Protocol/Tcp4.h @@ -92,6 +92,9 @@ typedef struct { EFI_TCP4_OPTION *ControlOption; } EFI_TCP4_CONFIG_DATA; +/// +/// TCP4 connnection state +/// typedef enum { Tcp4StateClosed = 0, Tcp4StateListen = 1, diff --git a/MdePkg/Include/Protocol/UgaDraw.h b/MdePkg/Include/Protocol/UgaDraw.h index b29a620..5dd8fe8 100644 --- a/MdePkg/Include/Protocol/UgaDraw.h +++ b/MdePkg/Include/Protocol/UgaDraw.h @@ -84,9 +84,9 @@ typedef union { UINT32 Raw; } EFI_UGA_PIXEL_UNION; -/** - Enumration value for actions of Blt operations. - **/ +/// +/// Enumration value for actions of Blt operations. +/// typedef enum { EfiUgaVideoFill, ///< Write data from the BltBuffer pixel (SourceX, SourceY) ///< directly to every pixel of the video display rectangle diff --git a/MdePkg/Include/Protocol/UgaIo.h b/MdePkg/Include/Protocol/UgaIo.h index e0fa68a..0c4d54d 100644 --- a/MdePkg/Include/Protocol/UgaIo.h +++ b/MdePkg/Include/Protocol/UgaIo.h @@ -30,8 +30,7 @@ typedef enum { UgaDtOutputController, UgaDtOutputPort, UgaDtOther -} -UGA_DEVICE_TYPE, *PUGA_DEVICE_TYPE; +} UGA_DEVICE_TYPE, *PUGA_DEVICE_TYPE; typedef UINT32 UGA_DEVICE_ID, *PUGA_DEVICE_ID; @@ -40,8 +39,7 @@ typedef struct { UGA_DEVICE_ID deviceId; UINT32 ui32DeviceContextSize; UINT32 ui32SharedContextSize; -} -UGA_DEVICE_DATA, *PUGA_DEVICE_DATA; +} UGA_DEVICE_DATA, *PUGA_DEVICE_DATA; typedef struct _UGA_DEVICE { VOID *pvDeviceContext; @@ -51,8 +49,7 @@ typedef struct _UGA_DEVICE { VOID *pvBusIoServices; VOID *pvStdIoServices; UGA_DEVICE_DATA deviceData; -} -UGA_DEVICE, *PUGA_DEVICE; +} UGA_DEVICE, *PUGA_DEVICE; typedef enum { UgaIoGetVersion = 1, @@ -78,8 +75,7 @@ typedef enum { UgaIoGetDevicePropertySize, UgaIoGetDeviceProperty, UgaIoBtPrivateInterface -} -UGA_IO_REQUEST_CODE, *PUGA_IO_REQUEST_CODE; +} UGA_IO_REQUEST_CODE, *PUGA_IO_REQUEST_CODE; typedef struct { IN UGA_IO_REQUEST_CODE ioRequestCode; diff --git a/MdePkg/Include/Protocol/Usb2HostController.h b/MdePkg/Include/Protocol/Usb2HostController.h index 84c40a0..6687e32 100644 --- a/MdePkg/Include/Protocol/Usb2HostController.h +++ b/MdePkg/Include/Protocol/Usb2HostController.h @@ -33,13 +33,13 @@ typedef struct _EFI_USB2_HC_PROTOCOL EFI_USB2_HC_PROTOCOL; typedef struct { - UINT16 PortStatus; - UINT16 PortChangeStatus; + UINT16 PortStatus; /// Contains current port status bitmap. + UINT16 PortChangeStatus; /// Contains current port status change bitmap. } EFI_USB_PORT_STATUS; -// -// Constant value for Port Status & Port Change Status -// +/// +/// EFI_USB_PORT_STATUS.PortStatus bit definition +/// #define USB_PORT_STAT_CONNECTION 0x0001 #define USB_PORT_STAT_ENABLE 0x0002 #define USB_PORT_STAT_SUSPEND 0x0004 @@ -50,6 +50,9 @@ typedef struct { #define USB_PORT_STAT_HIGH_SPEED 0x0400 #define USB_PORT_STAT_OWNER 0x0800 +/// +/// EFI_USB_PORT_STATUS.PortChangeStatus bit definition +/// #define USB_PORT_STAT_C_CONNECTION 0x0001 #define USB_PORT_STAT_C_ENABLE 0x0002 #define USB_PORT_STAT_C_SUSPEND 0x0004 @@ -57,9 +60,11 @@ typedef struct { #define USB_PORT_STAT_C_RESET 0x0010 -// -// Usb port features -// +/// +/// Usb port features value +/// Each value indicates its bit index in the port status and status change bitmaps, +/// if combines these two bitmaps into a 32-bit bitmap. +/// typedef enum { EfiUsbPortEnable = 1, EfiUsbPortSuspend = 2, @@ -73,14 +78,13 @@ typedef enum { EfiUsbPortResetChange = 20 } EFI_USB_PORT_FEATURE; - -#define EFI_USB_SPEED_FULL 0x0000 // 12 Mb/s, USB 1.1 OHCI and UHCI HC. -#define EFI_USB_SPEED_LOW 0x0001 // 1 Mb/s, USB 1.1 OHCI and UHCI HC. -#define EFI_USB_SPEED_HIGH 0x0002 // 480 Mb/s, USB 2.0 EHCI HC. +#define EFI_USB_SPEED_FULL 0x0000 /// 12 Mb/s, USB 1.1 OHCI and UHCI HC. +#define EFI_USB_SPEED_LOW 0x0001 /// 1 Mb/s, USB 1.1 OHCI and UHCI HC. +#define EFI_USB_SPEED_HIGH 0x0002 /// 480 Mb/s, USB 2.0 EHCI HC. typedef struct { - UINT8 TranslatorHubAddress; - UINT8 TranslatorPortNumber; + UINT8 TranslatorHubAddress; /// device address + UINT8 TranslatorPortNumber; /// the port number of the hub that device is connected to. } EFI_USB2_HC_TRANSACTION_TRANSLATOR; // diff --git a/MdePkg/Include/Uefi/UefiInternalFormRepresentation.h b/MdePkg/Include/Uefi/UefiInternalFormRepresentation.h index a26ac8d..46f693c 100644 --- a/MdePkg/Include/Uefi/UefiInternalFormRepresentation.h +++ b/MdePkg/Include/Uefi/UefiInternalFormRepresentation.h @@ -1362,10 +1362,12 @@ typedef struct _EFI_IFR_SPAN { // // Definitions for Keyboard Package -// Section 27.3.9 // Releated definitions are in Section of EFI_HII_DATABASE_PROTOCOL // +/// +/// Each enumeration values maps a physical key on a keyboard. +/// typedef enum { EfiKeyLCtrl, EfiKeyA0, -- cgit v1.1