Commit | Line | Data |
---|---|---|
d1f95000 | 1 | /** @file\r |
8a7d75b0 | 2 | The device path protocol as defined in UEFI 2.0.\r |
959ccb23 | 3 | \r |
d1f95000 | 4 | The device path represents a programatic path to a device. It's the view\r |
5 | from a software point of view. It also must persist from boot to boot, so \r | |
6 | it can not contain things like PCI bus numbers that change from boot to boot.\r | |
959ccb23 | 7 | \r |
4ca9b6c4 | 8 | Copyright (c) 2006 - 2008, Intel Corporation \r |
d1f95000 | 9 | All rights reserved. This program and the accompanying materials \r |
10 | are licensed and made available under the terms and conditions of the BSD License \r | |
11 | which accompanies this distribution. The full text of the license may be found at \r | |
12 | http://opensource.org/licenses/bsd-license.php \r | |
959ccb23 | 13 | \r |
d1f95000 | 14 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r |
15 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r | |
959ccb23 | 16 | \r |
959ccb23 | 17 | **/\r |
18 | \r | |
d1f95000 | 19 | #ifndef __EFI_DEVICE_PATH_PROTOCOL_H__\r |
20 | #define __EFI_DEVICE_PATH_PROTOCOL_H__\r | |
21 | \r | |
b25e8149 | 22 | #include <Guid/PcAnsi.h>\r |
23 | \r | |
99e8ed21 | 24 | ///\r |
25 | /// Device Path protocol\r | |
26 | ///\r | |
d1f95000 | 27 | #define EFI_DEVICE_PATH_PROTOCOL_GUID \\r |
28 | { \\r | |
29 | 0x9576e91, 0x6d3f, 0x11d2, {0x8e, 0x39, 0x0, 0xa0, 0xc9, 0x69, 0x72, 0x3b } \\r | |
30 | }\r | |
959ccb23 | 31 | \r |
a6508c05 | 32 | //\r |
33 | // Protocol GUID defined in EFI1.1.\r | |
34 | // \r | |
35 | \r | |
99e8ed21 | 36 | ///\r |
37 | /// Device Path information\r | |
38 | ///\r | |
a6508c05 | 39 | #define DEVICE_PATH_PROTOCOL EFI_DEVICE_PATH_PROTOCOL_GUID\r |
959ccb23 | 40 | \r |
41 | #pragma pack(1)\r | |
42 | \r | |
2d824143 | 43 | /**\r |
44 | This protocol can be used on any device handle to obtain generic path/location \r | |
45 | information concerning the physical device or logical device. If the handle does \r | |
46 | not logically map to a physical device, the handle may not necessarily support \r | |
47 | the device path protocol. The device path describes the location of the device \r | |
48 | the handle is for. The size of the Device Path can be determined from the structures \r | |
49 | that make up the Device Path.\r | |
50 | **/\r | |
d1f95000 | 51 | typedef struct {\r |
842a119d | 52 | UINT8 Type; ///< 0x01 Hardware Device Path\r |
53 | ///< 0x02 ACPI Device Path\r | |
54 | ///< 0x03 Messaging Device Path\r | |
55 | ///< 0x04 Media Device Path\r | |
56 | ///< 0x05 BIOS Boot Specification Device Path\r | |
57 | ///< 0x7F End of Hardware Device Path\r | |
2d824143 | 58 | \r |
59 | UINT8 SubType; ///< Varies by Type\r | |
842a119d | 60 | ///< 0xFF End Entire Device Path, or\r |
61 | ///< 0x01 End This Instance of a Device Path and start a new\r | |
2d824143 | 62 | ///< Device Path\r |
63 | \r | |
64 | UINT8 Length[2]; ///< Specific Device Path data. Type and Sub-Type define\r | |
65 | ///< type of data. Size of data is included in Length.\r | |
66 | \r | |
d1f95000 | 67 | } EFI_DEVICE_PATH_PROTOCOL;\r |
68 | \r | |
99e8ed21 | 69 | ///\r |
70 | /// For backward-compatible with EFI1.1.\r | |
71 | /// \r | |
a6508c05 | 72 | typedef EFI_DEVICE_PATH_PROTOCOL EFI_DEVICE_PATH;\r |
73 | \r | |
99e8ed21 | 74 | ///\r |
75 | /// Hardware Device Paths\r | |
76 | ///\r | |
959ccb23 | 77 | #define HARDWARE_DEVICE_PATH 0x01\r |
78 | \r | |
f1004231 LG |
79 | ///\r |
80 | /// PCI Device Path\r | |
81 | ///\r | |
959ccb23 | 82 | #define HW_PCI_DP 0x01\r |
83 | typedef struct {\r | |
84 | EFI_DEVICE_PATH_PROTOCOL Header;\r | |
f1004231 LG |
85 | ///\r |
86 | /// PCI Function Number\r | |
87 | ///\r | |
959ccb23 | 88 | UINT8 Function;\r |
f1004231 LG |
89 | ///\r |
90 | /// PCI Device Number\r | |
91 | ///\r | |
959ccb23 | 92 | UINT8 Device;\r |
93 | } PCI_DEVICE_PATH;\r | |
94 | \r | |
f1004231 LG |
95 | ///\r |
96 | /// PCCARD Device Path\r | |
97 | ///\r | |
959ccb23 | 98 | #define HW_PCCARD_DP 0x02\r |
99 | typedef struct {\r | |
100 | EFI_DEVICE_PATH_PROTOCOL Header;\r | |
f1004231 LG |
101 | ///\r |
102 | /// Function Number (0 = First Function)\r | |
103 | ///\r | |
959ccb23 | 104 | UINT8 FunctionNumber;\r |
105 | } PCCARD_DEVICE_PATH;\r | |
106 | \r | |
f1004231 LG |
107 | ///\r |
108 | /// Memory Mapped Device Path\r | |
109 | ///\r | |
959ccb23 | 110 | #define HW_MEMMAP_DP 0x03\r |
111 | typedef struct {\r | |
112 | EFI_DEVICE_PATH_PROTOCOL Header;\r | |
f1004231 LG |
113 | ///\r |
114 | /// EFI_MEMORY_TYPE\r | |
115 | ///\r | |
959ccb23 | 116 | UINT32 MemoryType;\r |
f1004231 LG |
117 | ///\r |
118 | /// Starting Memory Address.\r | |
119 | ///\r | |
959ccb23 | 120 | EFI_PHYSICAL_ADDRESS StartingAddress;\r |
f1004231 LG |
121 | ///\r |
122 | /// Ending Memory Address\r | |
123 | ///\r | |
959ccb23 | 124 | EFI_PHYSICAL_ADDRESS EndingAddress;\r |
125 | } MEMMAP_DEVICE_PATH;\r | |
126 | \r | |
f1004231 LG |
127 | ///\r |
128 | /// The Vendor Device Path allows the creation of vendor-defined Device Paths. A vendor must\r | |
129 | /// allocate a Vendor GUID for a Device Path. The Vendor GUID can then be used to define the\r | |
130 | /// contents on the n bytes that follow in the Vendor Device Path node.\r | |
131 | ///\r | |
959ccb23 | 132 | #define HW_VENDOR_DP 0x04\r |
133 | typedef struct {\r | |
134 | EFI_DEVICE_PATH_PROTOCOL Header;\r | |
f1004231 LG |
135 | ///\r |
136 | /// Vendor-assigned GUID that defines the data that follows.\r | |
137 | ///\r | |
959ccb23 | 138 | EFI_GUID Guid;\r |
f1004231 LG |
139 | ///\r |
140 | /// Vendor-defined variable size data.\r | |
141 | ///\r | |
959ccb23 | 142 | } VENDOR_DEVICE_PATH;\r |
143 | \r | |
f1004231 LG |
144 | ///\r |
145 | /// Controller Device Path\r | |
146 | ///\r | |
959ccb23 | 147 | #define HW_CONTROLLER_DP 0x05\r |
148 | typedef struct {\r | |
149 | EFI_DEVICE_PATH_PROTOCOL Header;\r | |
f1004231 LG |
150 | ///\r |
151 | /// Controller number.\r | |
152 | ///\r | |
959ccb23 | 153 | UINT32 ControllerNumber;\r |
154 | } CONTROLLER_DEVICE_PATH;\r | |
155 | \r | |
99e8ed21 | 156 | ///\r |
157 | /// ACPI Device Paths\r | |
158 | ///\r | |
959ccb23 | 159 | #define ACPI_DEVICE_PATH 0x02\r |
160 | \r | |
f1004231 LG |
161 | ///\r |
162 | /// ACPI Device Path\r | |
163 | ///\r | |
959ccb23 | 164 | #define ACPI_DP 0x01\r |
165 | typedef struct {\r | |
166 | EFI_DEVICE_PATH_PROTOCOL Header;\r | |
f1004231 LG |
167 | ///\r |
168 | /// Device's PnP hardware ID stored in a numeric 32-bit\r | |
169 | /// compressed EISA-type ID. This value must match the\r | |
170 | /// corresponding _HID in the ACPI name space.\r | |
171 | ///\r | |
959ccb23 | 172 | UINT32 HID;\r |
f1004231 LG |
173 | ///\r |
174 | /// Unique ID that is required by ACPI if two devices have the\r | |
175 | /// same _HID. This value must also match the corresponding\r | |
176 | /// _UID/_HID pair in the ACPI name space. Only the 32-bit\r | |
177 | /// numeric value type of _UID is supported; thus strings must\r | |
178 | /// not be used for the _UID in the ACPI name space.\r | |
179 | ///\r | |
959ccb23 | 180 | UINT32 UID;\r |
181 | } ACPI_HID_DEVICE_PATH;\r | |
182 | \r | |
f1004231 LG |
183 | ///\r |
184 | /// Expanded ACPI Device Path.\r | |
185 | ///\r | |
959ccb23 | 186 | #define ACPI_EXTENDED_DP 0x02\r |
187 | typedef struct {\r | |
188 | EFI_DEVICE_PATH_PROTOCOL Header;\r | |
f1004231 LG |
189 | ///\r |
190 | /// Device's PnP hardware ID stored in a numeric 32-bit\r | |
191 | /// compressed EISA-type ID. This value must match the\r | |
192 | /// corresponding _HID in the ACPI name space.\r | |
193 | ///\r | |
959ccb23 | 194 | UINT32 HID;\r |
f1004231 LG |
195 | ///\r |
196 | /// Unique ID that is required by ACPI if two devices have the\r | |
197 | /// same _HID. This value must also match the corresponding\r | |
198 | /// _UID/_HID pair in the ACPI name space.\r | |
199 | ///\r | |
959ccb23 | 200 | UINT32 UID;\r |
f1004231 LG |
201 | ///\r |
202 |