diff options
author | gikidy <gikidy@6f19259b-4bc3-4df7-8a09-765794883524> | 2011-08-19 02:54:24 +0000 |
---|---|---|
committer | gikidy <gikidy@6f19259b-4bc3-4df7-8a09-765794883524> | 2011-08-19 02:54:24 +0000 |
commit | d4b3293bb332de87d1855dc8c03e4307a6384e7e (patch) | |
tree | aba81b1675269cb6c8b7c1ec8130a1f014f55968 /BaseTools/Source/C | |
parent | 3e5cfe98e9cd56d107c5ad5c1fe2efdc271804f2 (diff) | |
download | edk2-platforms-d4b3293bb332de87d1855dc8c03e4307a6384e7e.tar.xz |
Clean up MdeModuleHii.h to remove HII_VENDOR_DEVICE_PATH and remove DevicePath.h file.
Signed-off-by: gikidy
Reviewed-by: lgao4
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12174 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'BaseTools/Source/C')
-rw-r--r-- | BaseTools/Source/C/Include/Common/MdeModuleHii.h | 161 | ||||
-rw-r--r-- | BaseTools/Source/C/Include/Protocol/DevicePath.h | 548 |
2 files changed, 115 insertions, 594 deletions
diff --git a/BaseTools/Source/C/Include/Common/MdeModuleHii.h b/BaseTools/Source/C/Include/Common/MdeModuleHii.h index 8b42061d71..b756fef2c3 100644 --- a/BaseTools/Source/C/Include/Common/MdeModuleHii.h +++ b/BaseTools/Source/C/Include/Common/MdeModuleHii.h @@ -1,7 +1,7 @@ /** @file
EDK II specific HII relative definition.
- Copyright (c) 2006 - 2007, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials are licensed and made available
under the terms and conditions of the BSD License which accompanies this
@@ -22,51 +22,45 @@ #define WIDE_CHAR 0xFFF1
#define NON_BREAKING_CHAR 0xFFF2
-#define GLYPH_WIDTH EFI_GLYPH_WIDTH
-#define GLYPH_HEIGHT EFI_GLYPH_HEIGHT
-
-//
-// State defined for password statemachine
-//
+///
+/// State defined for password statemachine .
+///
#define BROWSER_STATE_VALIDATE_PASSWORD 0
#define BROWSER_STATE_SET_PASSWORD 1
-
-//
-// Tiano Implementation specific Device Path definition.
-//
-#pragma pack(1)
-typedef struct {
- VENDOR_DEVICE_PATH VendorDevicePath;
- UINT32 Reserved;
- UINT64 UniqueId;
-} HII_VENDOR_DEVICE_PATH_NODE;
-#pragma pack()
-
-typedef struct {
- HII_VENDOR_DEVICE_PATH_NODE Node;
- EFI_DEVICE_PATH_PROTOCOL End;
-} HII_VENDOR_DEVICE_PATH;
-
-
-//
-// GUIDed opcodes defined for Tiano
-//
+///
+/// GUIDed opcodes defined for EDKII implementation.
+///
#define EFI_IFR_TIANO_GUID \
{ 0xf0b1735, 0x87a0, 0x4193, {0xb2, 0x66, 0x53, 0x8c, 0x38, 0xaf, 0x48, 0xce} }
#pragma pack(1)
+///
+/// EDKII implementation extension opcodes, new extension can be added here later.
+///
#define EFI_IFR_EXTEND_OP_LABEL 0x0
#define EFI_IFR_EXTEND_OP_BANNER 0x1
#define EFI_IFR_EXTEND_OP_TIMEOUT 0x2
#define EFI_IFR_EXTEND_OP_CLASS 0x3
#define EFI_IFR_EXTEND_OP_SUBCLASS 0x4
+///
+/// Label opcode.
+///
typedef struct _EFI_IFR_GUID_LABEL {
EFI_IFR_OP_HEADER Header;
+ ///
+ /// EFI_IFR_TIANO_GUID.
+ ///
EFI_GUID Guid;
+ ///
+ /// EFI_IFR_EXTEND_OP_LABEL.
+ ///
UINT8 ExtendOpCode;
+ ///
+ /// Label Number.
+ ///
UINT16 Number;
} EFI_IFR_GUID_LABEL;
@@ -74,20 +68,38 @@ typedef struct _EFI_IFR_GUID_LABEL { #define EFI_IFR_BANNER_ALIGN_CENTER 1
#define EFI_IFR_BANNER_ALIGN_RIGHT 2
+///
+/// Banner opcode.
+///
typedef struct _EFI_IFR_GUID_BANNER {
EFI_IFR_OP_HEADER Header;
+ ///
+ /// EFI_IFR_TIANO_GUID.
+ ///
EFI_GUID Guid;
- UINT8 ExtendOpCode; // Extended opcode is EFI_IFR_EXTEND_OP_BANNER
- EFI_STRING_ID Title; // The string token for the banner title
- UINT16 LineNumber; // 1-based line number
- UINT8 Alignment; // left, center, or right-aligned
+ ///
+ /// EFI_IFR_EXTEND_OP_BANNER
+ ///
+ UINT8 ExtendOpCode;
+ EFI_STRING_ID Title; ///< The string token for the banner title.
+ UINT16 LineNumber; ///< 1-based line number.
+ UINT8 Alignment; ///< left, center, or right-aligned.
} EFI_IFR_GUID_BANNER;
+///
+/// Timeout opcode.
+///
typedef struct _EFI_IFR_GUID_TIMEOUT {
EFI_IFR_OP_HEADER Header;
+ ///
+ /// EFI_IFR_TIANO_GUID.
+ ///
EFI_GUID Guid;
+ ///
+ /// EFI_IFR_EXTEND_OP_TIMEOUT.
+ ///
UINT8 ExtendOpCode;
- UINT16 TimeOut;
+ UINT16 TimeOut; ///< TimeOut Value.
} EFI_IFR_GUID_TIMEOUT;
#define EFI_NON_DEVICE_CLASS 0x00
@@ -98,11 +110,20 @@ typedef struct _EFI_IFR_GUID_TIMEOUT { #define EFI_ON_BOARD_DEVICE_CLASS 0x10
#define EFI_OTHER_DEVICE_CLASS 0x20
+///
+/// Device Class opcode.
+///
typedef struct _EFI_IFR_GUID_CLASS {
EFI_IFR_OP_HEADER Header;
+ ///
+ /// EFI_IFR_TIANO_GUID.
+ ///
EFI_GUID Guid;
+ ///
+ /// EFI_IFR_EXTEND_OP_CLASS.
+ ///
UINT8 ExtendOpCode;
- UINT16 Class;
+ UINT16 Class; ///< Device Class from the above.
} EFI_IFR_GUID_CLASS;
#define EFI_SETUP_APPLICATION_SUBCLASS 0x00
@@ -110,45 +131,93 @@ typedef struct _EFI_IFR_GUID_CLASS { #define EFI_FRONT_PAGE_SUBCLASS 0x02
#define EFI_SINGLE_USE_SUBCLASS 0x03
+///
+/// SubClass opcode
+///
typedef struct _EFI_IFR_GUID_SUBCLASS {
EFI_IFR_OP_HEADER Header;
+ ///
+ /// EFI_IFR_TIANO_GUID.
+ ///
EFI_GUID Guid;
+ ///
+ /// EFI_IFR_EXTEND_OP_SUBCLASS.
+ ///
UINT8 ExtendOpCode;
- UINT16 SubClass;
+ UINT16 SubClass; ///< Sub Class type from the above.
} EFI_IFR_GUID_SUBCLASS;
-//
-// GUIDed opcodes defined for Tiano
-//
+///
+/// GUIDed opcodes support for framework vfr.
+///
#define EFI_IFR_FRAMEWORK_GUID \
{ 0x31ca5d1a, 0xd511, 0x4931, { 0xb7, 0x82, 0xae, 0x6b, 0x2b, 0x17, 0x8c, 0xd7 } }
+///
+/// Two extended opcodes are added, and new extensions can be added here later.
+/// One is for framework OneOf question Option Key value;
+/// another is for framework vareqval.
+///
#define EFI_IFR_EXTEND_OP_OPTIONKEY 0x0
#define EFI_IFR_EXTEND_OP_VAREQNAME 0x1
-//
-// Store the framework vfr option key value
-//
+
+///
+/// Store the framework vfr option key value.
+///
typedef struct _EFI_IFR_GUID_OPTIONKEY {
EFI_IFR_OP_HEADER Header;
+ ///
+ /// EFI_IFR_FRAMEWORK_GUID.
+ ///
EFI_GUID Guid;
+ ///
+ /// EFI_IFR_EXTEND_OP_OPTIONKEY.
+ ///
UINT8 ExtendOpCode;
+ ///
+ /// OneOf Questiond ID binded by OneOf Option.
+ ///
EFI_QUESTION_ID QuestionId;
+ ///
+ /// The OneOf Option Value.
+ ///
EFI_IFR_TYPE_VALUE OptionValue;
- EFI_QUESTION_ID KeyValue;
+ ///
+ /// The Framework OneOf Option Key Value.
+ ///
+ UINT16 KeyValue;
} EFI_IFR_GUID_OPTIONKEY;
-//
-// Store the framework vfr vareqval name number
-//
+///
+/// Store the framework vfr vareqval name number.
+///
typedef struct _EFI_IFR_GUID_VAREQNAME {
EFI_IFR_OP_HEADER Header;
+ ///
+ /// EFI_IFR_FRAMEWORK_GUID.
+ ///
EFI_GUID Guid;
+ ///
+ /// EFI_IFR_EXTEND_OP_VAREQNAME.
+ ///
UINT8 ExtendOpCode;
+ ///
+ /// Question ID of the Numeric Opcode created.
+ ///
EFI_QUESTION_ID QuestionId;
- EFI_STRING_ID NameId;
+ ///
+ /// For vareqval (0x100), NameId is 0x100.
+ /// This value will convert to a Unicode String following this rule;
+ /// sprintf(StringBuffer, "%d", NameId) .
+ /// The the Unicode String will be used as a EFI Variable Name.
+ ///
+ UINT16 NameId;
} EFI_IFR_GUID_VAREQNAME;
#pragma pack()
+extern EFI_GUID gEfiIfrTianoGuid;
+extern EFI_GUID gEfiIfrFrameworkGuid;
+
#endif
diff --git a/BaseTools/Source/C/Include/Protocol/DevicePath.h b/BaseTools/Source/C/Include/Protocol/DevicePath.h deleted file mode 100644 index 9fc8cb1aff..0000000000 --- a/BaseTools/Source/C/Include/Protocol/DevicePath.h +++ /dev/null @@ -1,548 +0,0 @@ -/** @file
- The device path protocol as defined in UEFI 2.0.
-
- The device path represents a programatic path to a device. It's the view
- from a software point of view. It also must persist from boot to boot, so
- it can not contain things like PCI bus numbers that change from boot to boot.
-
- Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>
-
- This program and the accompanying materials are licensed and made available
- under the terms and conditions of the BSD License which accompanies this
- distribution. The full text of the license may be found at:
- http://opensource.org/licenses/bsd-license.php
-
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
- WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-
- File Name: DevicePath.h
-
-**/
-
-#ifndef __EFI_DEVICE_PATH_PROTOCOL_H__
-#define __EFI_DEVICE_PATH_PROTOCOL_H__
-
-#include <Guid/PcAnsi.h>
-
-//
-// Device Path protocol
-//
-#define EFI_DEVICE_PATH_PROTOCOL_GUID \
- { \
- 0x9576e91, 0x6d3f, 0x11d2, {0x8e, 0x39, 0x0, 0xa0, 0xc9, 0x69, 0x72, 0x3b } \
- }
-
-//
-// Protocol GUID defined in EFI1.1.
-//
-
-//
-// Device Path information
-//
-#define DEVICE_PATH_PROTOCOL EFI_DEVICE_PATH_PROTOCOL_GUID
-
-#pragma pack(1)
-
-typedef struct {
- UINT8 Type;
- UINT8 SubType;
- UINT8 Length[2];
-} EFI_DEVICE_PATH_PROTOCOL;
-
-//
-// For backward-compatible with EFI1.1.
-//
-typedef EFI_DEVICE_PATH_PROTOCOL EFI_DEVICE_PATH;
-
-//
-// Hardware Device Paths
-//
-#define HARDWARE_DEVICE_PATH 0x01
-
-#define HW_PCI_DP 0x01
-typedef struct {
- EFI_DEVICE_PATH_PROTOCOL Header;
- UINT8 Function;
- UINT8 Device;
-} PCI_DEVICE_PATH;
-
-#define HW_PCCARD_DP 0x02
-typedef struct {
- EFI_DEVICE_PATH_PROTOCOL Header;
- UINT8 FunctionNumber;
-} PCCARD_DEVICE_PATH;
-
-#define HW_MEMMAP_DP 0x03
-typedef struct {
- EFI_DEVICE_PATH_PROTOCOL Header;
- UINT32 MemoryType;
- EFI_PHYSICAL_ADDRESS StartingAddress;
- EFI_PHYSICAL_ADDRESS EndingAddress;
-} MEMMAP_DEVICE_PATH;
-
-#define HW_VENDOR_DP 0x04
-typedef struct {
- EFI_DEVICE_PATH_PROTOCOL Header;
- EFI_GUID Guid;
-} VENDOR_DEVICE_PATH;
-
-#define HW_CONTROLLER_DP 0x05
-typedef struct {
- EFI_DEVICE_PATH_PROTOCOL Header;
- UINT32 ControllerNumber;
-} CONTROLLER_DEVICE_PATH;
-
-//
-// ACPI Device Paths
-//
-#define ACPI_DEVICE_PATH 0x02
-
-#define ACPI_DP 0x01
-typedef struct {
- EFI_DEVICE_PATH_PROTOCOL Header;
- UINT32 HID;
- UINT32 UID;
-} ACPI_HID_DEVICE_PATH;
-
-#define ACPI_EXTENDED_DP 0x02
-typedef struct {
- EFI_DEVICE_PATH_PROTOCOL Header;
- UINT32 HID;
- UINT32 UID;
- UINT32 CID;
- //
- // Optional variable length _HIDSTR
- // Optional variable length _UIDSTR
- //
-} ACPI_EXTENDED_HID_DEVICE_PATH;
-
-//
-// EISA ID Macro
-// EISA ID Definition 32-bits
-// bits[15:0] - three character compressed ASCII EISA ID.
-// bits[31:16] - binary number
-// Compressed ASCII is 5 bits per character 0b00001 = 'A' 0b11010 = 'Z'
-//
-#define PNP_EISA_ID_CONST 0x41d0
-#define EISA_ID(_Name, _Num) ((UINT32) ((_Name) | (_Num) << 16))
-#define EISA_PNP_ID(_PNPId) (EISA_ID(PNP_EISA_ID_CONST, (_PNPId)))
-#define EFI_PNP_ID(_PNPId) (EISA_ID(PNP_EISA_ID_CONST, (_PNPId)))
-
-#define PNP_EISA_ID_MASK 0xffff
-#define EISA_ID_TO_NUM(_Id) ((_Id) >> 16)
-
-
-#define ACPI_ADR_DP 0x03
-typedef struct {
- EFI_DEVICE_PATH_PROTOCOL Header;
- UINT32 ADR;
-} ACPI_ADR_DEVICE_PATH;
-
-
-//
-// Messaging Device Paths
-//
-#define MESSAGING_DEVICE_PATH 0x03
-
-#define MSG_ATAPI_DP 0x01
-typedef struct {
- EFI_DEVICE_PATH_PROTOCOL Header;
- UINT8 PrimarySecondary;
- UINT8 SlaveMaster;
- UINT16 Lun;
-} ATAPI_DEVICE_PATH;
-
-#define MSG_SCSI_DP 0x02
-typedef struct {
- EFI_DEVICE_PATH_PROTOCOL Header;
- UINT16 Pun;
- UINT16 Lun;
-} SCSI_DEVICE_PATH;
-
-#define MSG_FIBRECHANNEL_DP 0x03
-typedef struct {
- EFI_DEVICE_PATH_PROTOCOL Header;
- UINT32 Reserved;
- UINT64 WWN;
- UINT64 Lun;
-} FIBRECHANNEL_DEVICE_PATH;
-
-#define MSG_1394_DP 0x04
-typedef struct {
- EFI_DEVICE_PATH_PROTOCOL Header;
- UINT32 Reserved;
- UINT64 Guid;
-} F1394_DEVICE_PATH;
-
-#define MSG_USB_DP 0x05
-typedef struct {
- EFI_DEVICE_PATH_PROTOCOL Header;
- UINT8 ParentPortNumber;
- UINT8 InterfaceNumber;
-} USB_DEVICE_PATH;
-
-#define MSG_USB_CLASS_DP 0x0f
-typedef struct {
- EFI_DEVICE_PATH_PROTOCOL Header;
- UINT16 VendorId;
- UINT16 ProductId;
- UINT8 DeviceClass;
- UINT8 DeviceSubClass;
- UINT8 DeviceProtocol;
-} USB_CLASS_DEVICE_PATH;
-
-#define MSG_USB_WWID_DP 0x10
-typedef struct {
- EFI_DEVICE_PATH_PROTOCOL Header;
- UINT16 InterfaceNumber;
- UINT16 VendorId;
- UINT16 ProductId;
- // CHAR16 SerialNumber[...];
-} USB_WWID_DEVICE_PATH;
-
-
-#define MSG_DEVICE_LOGICAL_UNIT_DP 0x11
-typedef struct {
- EFI_DEVICE_PATH_PROTOCOL Header;
- UINT8 Lun;
-} DEVICE_LOGICAL_UNIT_DEVICE_PATH;
-
-#define MSG_SATA_DP 0x12
-typedef struct {
- EFI_DEVICE_PATH_PROTOCOL Header;
- UINT16 HBAPortNumber;
- UINT16 PortMultiplierPortNumber;
- UINT16 Lun;
-} SATA_DEVICE_PATH;
-
-#define MSG_I2O_DP 0x06
-typedef struct {
- EFI_DEVICE_PATH_PROTOCOL Header;
- UINT32 Tid;
-} I2O_DEVICE_PATH;
-
-#define MSG_MAC_ADDR_DP 0x0b
-typedef struct {
- EFI_DEVICE_PATH_PROTOCOL Header;
- EFI_MAC_ADDRESS MacAddress;
- UINT8 IfType;
-} MAC_ADDR_DEVICE_PATH;
-
-#define MSG_IPv4_DP 0x0c
-typedef struct {
- EFI_DEVICE_PATH_PROTOCOL Header;
- EFI_IPv4_ADDRESS LocalIpAddress;
- EFI_IPv4_ADDRESS RemoteIpAddress;
- UINT16 LocalPort;
- UINT16 RemotePort;
- UINT16 Protocol;
- BOOLEAN StaticIpAddress;
-} IPv4_DEVICE_PATH;
-
-#define MSG_IPv6_DP 0x0d
-typedef struct {
- EFI_DEVICE_PATH_PROTOCOL Header;
- EFI_IPv6_ADDRESS LocalIpAddress;
- EFI_IPv6_ADDRESS RemoteIpAddress;
- UINT16 LocalPort;
- UINT16 RemotePort;
- UINT16 Protocol;
- BOOLEAN StaticIpAddress;
-} IPv6_DEVICE_PATH;
-
-#define MSG_INFINIBAND_DP 0x09
-typedef struct {
- EFI_DEVICE_PATH_PROTOCOL Header;
- UINT32 ResourceFlags;
- UINT8 PortGid[16];
- UINT64 ServiceId;
- UINT64 TargetPortId;
- UINT64 DeviceId;
-} INFINIBAND_DEVICE_PATH;
-
-#define INFINIBAND_RESOURCE_FLAG_IOC_SERVICE 0x01
-#define INFINIBAND_RESOURCE_FLAG_EXTENDED_BOOT_ENVIRONMENT 0x02
-#define INFINIBAND_RESOURCE_FLAG_CONSOLE_PROTOCOL 0x04
-#define INFINIBAND_RESOURCE_FLAG_STORAGE_PROTOCOL 0x08
-#define INFINIBAND_RESOURCE_FLAG_NETWORK_PROTOCOL 0x10
-
-#define MSG_UART_DP 0x0e
-typedef struct {
- EFI_DEVICE_PATH_PROTOCOL Header;
- UINT32 Reserved;
- UINT64 BaudRate;
- UINT8 DataBits;
- UINT8 Parity;
- UINT8 StopBits;
-} UART_DEVICE_PATH;
-
-//
-// Use VENDOR_DEVICE_PATH struct
-//
-#define MSG_VENDOR_DP 0x0a
-typedef VENDOR_DEVICE_PATH VENDOR_DEFINED_DEVICE_PATH;
-
-#define DEVICE_PATH_MESSAGING_PC_ANSI EFI_PC_ANSI_GUID
-#define DEVICE_PATH_MESSAGING_VT_100 EFI_VT_100_GUID
-#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
-
-typedef struct {
- EFI_DEVICE_PATH_PROTOCOL Header;
- EFI_GUID Guid;
- UINT32 FlowControlMap;
-} UART_FLOW_CONTROL_DEVICE_PATH;
-
-#define DEVICE_PATH_MESSAGING_SAS EFI_SAS_DEVICE_PATH_GUID
-
-typedef struct {
- EFI_DEVICE_PATH_PROTOCOL Header;
- EFI_GUID Guid;
- UINT32 Reserved;
- UINT64 SasAddress;
- UINT64 Lun;
- UINT16 DeviceTopology;
- UINT16 RelativeTargetPort;
-} SAS_DEVICE_PATH;
-
-#define MSG_ISCSI_DP 0x13
-typedef struct {
- EFI_DEVICE_PATH_PROTOCOL Header;
- UINT16 NetworkProtocol;
- UINT16 LoginOption;
- UINT64 Lun;
- UINT16 TargetPortalGroupTag;
- // CHAR8 iSCSI Target Name
-} ISCSI_DEVICE_PATH;
-
-#define ISCSI_LOGIN_OPTION_NO_HEADER_DIGEST 0x0000
-#define ISCSI_LOGIN_OPTION_HEADER_DIGEST_USING_CRC32C 0x0002
-#define ISCSI_LOGIN_OPTION_NO_DATA_DIGEST 0x0000
-#define ISCSI_LOGIN_OPTION_DATA_DIGEST_USING_CRC32C 0x0008
-#define ISCSI_LOGIN_OPTION_AUTHMETHOD_CHAP 0x0000
-#define ISCSI_LOGIN_OPTION_AUTHMETHOD_NON 0x1000
-#define ISCSI_LOGIN_OPTION_CHAP_BI 0x0000
-#define ISCSI_LOGIN_OPTION_CHAP_UNI 0x2000
-
-//
-// Media Device Path
-//
-#define MEDIA_DEVICE_PATH 0x04
-
-#define MEDIA_HARDDRIVE_DP 0x01
-typedef struct {
- EFI_DEVICE_PATH_PROTOCOL Header;
- UINT32 PartitionNumber;
- UINT64 PartitionStart;
- UINT64 PartitionSize;
- UINT8 Signature[16];
- UINT8 MBRType;
- UINT8 SignatureType;
-} HARDDRIVE_DEVICE_PATH;
-
-#define MBR_TYPE_PCAT 0x01
-#define MBR_TYPE_EFI_PARTITION_TABLE_HEADER 0x02
-
-#define SIGNATURE_TYPE_MBR 0x01
-#define SIGNATURE_TYPE_GUID 0x02
-
-#define MEDIA_CDROM_DP 0x02
-typedef struct {
- EFI_DEVICE_PATH_PROTOCOL Header;
- UINT32 BootEntry;
- UINT64 PartitionStart;
- UINT64 PartitionSize;
-} CDROM_DEVICE_PATH;
-
-//
-// Use VENDOR_DEVICE_PATH struct
-//
-#define MEDIA_VENDOR_DP 0x03
-
-#define MEDIA_FILEPATH_DP 0x04
-typedef struct {
- EFI_DEVICE_PATH_PROTOCOL Header;
- CHAR16 PathName[1];
-} FILEPATH_DEVICE_PATH;
-
-#define SIZE_OF_FILEPATH_DEVICE_PATH EFI_FIELD_OFFSET(FILEPATH_DEVICE_PATH,PathName)
-
-#define MEDIA_PROTOCOL_DP 0x05
-typedef struct {
- EFI_DEVICE_PATH_PROTOCOL Header;
- EFI_GUID Protocol;
-} MEDIA_PROTOCOL_DEVICE_PATH;
-
-
-#define MEDIA_PIWG_FW_VOL_DP 0x7
-typedef struct {
- EFI_DEVICE_PATH_PROTOCOL Header;
- EFI_GUID FvName;
-} MEDIA_FW_VOL_DEVICE_PATH;
-
-
-#define MEDIA_PIWG_FW_FILE_DP 0x6
-typedef struct {
- EFI_DEVICE_PATH_PROTOCOL Header;
- EFI_GUID FvFileName;
-} MEDIA_FW_VOL_FILEPATH_DEVICE_PATH;
-
-//
-// BBS Device Path
-//
-#define BBS_DEVICE_PATH 0x05
-#define BBS_BBS_DP 0x01
-typedef struct {
- EFI_DEVICE_PATH_PROTOCOL Header;
- UINT16 DeviceType;
- UINT16 StatusFlag;
- CHAR8 String[1];
-} BBS_BBS_DEVICE_PATH;
-
-//
-// DeviceType definitions - from BBS specification
-//
-#define BBS_TYPE_FLOPPY 0x01
-#define BBS_TYPE_HARDDRIVE 0x02
-#define BBS_TYPE_CDROM 0x03
-#define BBS_TYPE_PCMCIA 0x04
-#define BBS_TYPE_USB 0x05
-#define BBS_TYPE_EMBEDDED_NETWORK 0x06
-#define BBS_TYPE_BEV 0x80
-#define BBS_TYPE_UNKNOWN 0xFF
-
-
-//
-// Union of all possible Device Paths and pointers to Device Paths
-//
-
-typedef union {
- EFI_DEVICE_PATH_PROTOCOL DevPath;
- PCI_DEVICE_PATH Pci;
- PCCARD_DEVICE_PATH PcCard;
- MEMMAP_DEVICE_PATH MemMap;
- VENDOR_DEVICE_PATH Vendor;
-
- CONTROLLER_DEVICE_PATH Controller;
- ACPI_HID_DEVICE_PATH Acpi;
-
- ATAPI_DEVICE_PATH Atapi;
- SCSI_DEVICE_PATH Scsi;
- ISCSI_DEVICE_PATH Iscsi;
- FIBRECHANNEL_DEVICE_PATH FibreChannel;
-
- F1394_DEVICE_PATH F1394;
- USB_DEVICE_PATH Usb;
- SATA_DEVICE_PATH Sata;
- USB_CLASS_DEVICE_PATH UsbClass;
- I2O_DEVICE_PATH I2O;
- MAC_ADDR_DEVICE_PATH MacAddr;
- IPv4_DEVICE_PATH Ipv4;
- IPv6_DEVICE_PATH Ipv6;
- INFINIBAND_DEVICE_PATH InfiniBand;
- UART_DEVICE_PATH Uart;
-
- HARDDRIVE_DEVICE_PATH HardDrive;
- CDROM_DEVICE_PATH CD;
-
- FILEPATH_DEVICE_PATH FilePath;
- MEDIA_PROTOCOL_DEVICE_PATH MediaProtocol;
-
- BBS_BBS_DEVICE_PATH Bbs;
-} EFI_DEV_PATH;
-
-
-
-typedef union {
- EFI_DEVICE_PATH_PROTOCOL *DevPath;
- PCI_DEVICE_PATH *Pci;
- PCCARD_DEVICE_PATH *PcCard;
- MEMMAP_DEVICE_PATH *MemMap;
- VENDOR_DEVICE_PATH *Vendor;
-
- CONTROLLER_DEVICE_PATH *Controller;
- ACPI_HID_DEVICE_PATH *Acpi;
- ACPI_EXTENDED_HID_DEVICE_PATH *ExtendedAcpi;
-
- ATAPI_DEVICE_PATH *Atapi;
- SCSI_DEVICE_PATH *Scsi;
- FIBRECHANNEL_DEVICE_PATH *FibreChannel;
-
- F1394_DEVICE_PATH *F1394;
- USB_DEVICE_PATH *Usb;
- SATA_DEVICE_PATH *Sata;
- USB_CLASS_DEVICE_PATH *UsbClass;
- I2O_DEVICE_PATH *I2O;
- MAC_ADDR_DEVICE_PATH *MacAddr;
- IPv4_DEVICE_PATH *Ipv4;
- IPv6_DEVICE_PATH *Ipv6;
- INFINIBAND_DEVICE_PATH *InfiniBand;
- UART_DEVICE_PATH *Uart;
-
- HARDDRIVE_DEVICE_PATH *HardDrive;
- CDROM_DEVICE_PATH *CD;
-
- FILEPATH_DEVICE_PATH *FilePath;
- MEDIA_PROTOCOL_DEVICE_PATH *MediaProtocol;
-
- BBS_BBS_DEVICE_PATH *Bbs;
- UINT8 *Raw;
-} EFI_DEV_PATH_PTR;
-
-#pragma pack()
-
-#define EFI_DP_TYPE_MASK 0x7F
-#define EFI_DP_TYPE_UNPACKED 0x80
-#define END_DEVICE_PATH_TYPE 0x7f
-
-#define EFI_END_ENTIRE_DEVICE_PATH 0xff
-#define EFI_END_ENTIRE_DEVICE_PATH_SUBTYPE 0xff
-#define EFI_END_INSTANCE_DEVICE_PATH 0x01
-#define END_ENTIRE_DEVICE_PATH_SUBTYPE EFI_END_ENTIRE_DEVICE_PATH_SUBTYPE
-#define END_INSTANCE_DEVICE_PATH_SUBTYPE EFI_END_INSTANCE_DEVICE_PATH
-
-#define EFI_END_DEVICE_PATH_LENGTH (sizeof (EFI_DEVICE_PATH_PROTOCOL))
-#define END_DEVICE_PATH_LENGTH EFI_END_DEVICE_PATH_LENGTH
-
-#define DP_IS_END_TYPE(a)
-#define DP_IS_END_SUBTYPE(a) (((a)->SubType == END_ENTIRE_DEVICE_PATH_SUBTYPE)
-#define DevicePathSubType(a) ((a)->SubType)
-#define IsDevicePathUnpacked(a) ((a)->Type & EFI_DP_TYPE_UNPACKED)
-
-#define EfiDevicePathNodeLength(a) (((a)->Length[0]) | ((a)->Length[1] << 8))
-#define DevicePathNodeLength(a) (EfiDevicePathNodeLength(a))
-#define EfiNextDevicePathNode(a) ((EFI_DEVICE_PATH_PROTOCOL *) (((UINT8 *) (a)) + EfiDevicePathNodeLength (a)))
-#define NextDevicePathNode(a) (EfiNextDevicePathNode(a))
-
-#define EfiDevicePathType(a) (((a)->Type) & EFI_DP_TYPE_MASK)
-#define DevicePathType(a) (EfiDevicePathType(a))
-#define EfiIsDevicePathEndType(a) (EfiDevicePathType (a) == END_DEVICE_PATH_TYPE)
-#define IsDevicePathEndType(a) (EfiIsDevicePathEndType(a))
-
-
-#define EfiIsDevicePathEndSubType(a) ((a)->SubType == EFI_END_ENTIRE_DEVICE_PATH_SUBTYPE)
-#define IsDevicePathEndSubType(a) (EfiIsDevicePathEndSubType(a))
-#define EfiIsDevicePathEndInstanceSubType(a) ((a)->SubType == EFI_END_INSTANCE_DEVICE_PATH)
-
-#define EfiIsDevicePathEnd(a) (EfiIsDevicePathEndType (a) && EfiIsDevicePathEndSubType (a))
-#define IsDevicePathEnd(a) (EfiIsDevicePathEnd(a))
-#define EfiIsDevicePathEndInstance(a) (EfiIsDevicePathEndType (a) && EfiIsDevicePathEndInstanceSubType (a))
-
-
-#define SetDevicePathNodeLength(a,l) { \
- (a)->Length[0] = (UINT8) (l); \
- (a)->Length[1] = (UINT8) ((l) >> 8); \
- }
-
-#define SetDevicePathEndNode(a) { \
- (a)->Type = END_DEVICE_PATH_TYPE; \
- (a)->SubType = END_ENTIRE_DEVICE_PATH_SUBTYPE; \
- (a)->Length[0] = sizeof(EFI_DEVICE_PATH_PROTOCOL); \
- (a)->Length[1] = 0; \
- }
-
-extern EFI_GUID gEfiDevicePathProtocolGuid;
-
-#endif
|