]>
Commit | Line | Data |
---|---|---|
1 | /** @file\r | |
2 | The device path protocol as defined in UEFI 2.0.\r | |
3 | \r | |
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 | |
7 | \r | |
8 | Copyright (c) 2006 - 2008, Intel Corporation \r | |
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 | |
13 | \r | |
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 | |
16 | \r | |
17 | **/\r | |
18 | \r | |
19 | #ifndef __EFI_DEVICE_PATH_PROTOCOL_H__\r | |
20 | #define __EFI_DEVICE_PATH_PROTOCOL_H__\r | |
21 | \r | |
22 | #include <Guid/PcAnsi.h>\r | |
23 | \r | |
24 | ///\r | |
25 | /// Device Path protocol\r | |
26 | ///\r | |
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 | |
31 | \r | |
32 | //\r | |
33 | // Protocol GUID defined in EFI1.1.\r | |
34 | // \r | |
35 | \r | |
36 | ///\r | |
37 | /// Device Path information\r | |
38 | ///\r | |
39 | #define DEVICE_PATH_PROTOCOL EFI_DEVICE_PATH_PROTOCOL_GUID\r | |
40 | \r | |
41 | #pragma pack(1)\r | |
42 | \r | |
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 | |
51 | typedef struct {\r | |
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 | |
58 | \r | |
59 | UINT8 SubType; ///< Varies by Type\r | |
60 | ///< 0xFF End Entire Device Path, or\r | |
61 | ///< 0x01 End This Instance of a Device Path and start a new\r | |
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 | |
67 | } EFI_DEVICE_PATH_PROTOCOL;\r | |
68 | \r | |
69 | ///\r | |
70 | /// For backward-compatible with EFI1.1.\r | |
71 | /// \r | |
72 | typedef EFI_DEVICE_PATH_PROTOCOL EFI_DEVICE_PATH;\r | |
73 | \r | |
74 | ///\r | |
75 | /// Hardware Device Paths\r | |
76 | ///\r | |
77 | #define HARDWARE_DEVICE_PATH 0x01\r | |
78 | \r | |
79 | ///\r | |
80 | /// PCI Device Path\r | |
81 | ///\r | |
82 | #define HW_PCI_DP 0x01\r | |
83 | typedef struct {\r | |
84 | EFI_DEVICE_PATH_PROTOCOL Header;\r | |
85 | ///\r | |
86 | /// PCI Function Number\r | |
87 | ///\r | |
88 | UINT8 Function;\r | |
89 | ///\r | |
90 | /// PCI Device Number\r | |
91 | ///\r | |
92 | UINT8 Device;\r | |
93 | } PCI_DEVICE_PATH;\r | |
94 | \r | |
95 | ///\r | |
96 | /// PCCARD Device Path\r | |
97 | ///\r | |
98 | #define HW_PCCARD_DP 0x02\r | |
99 | typedef struct {\r | |
100 | EFI_DEVICE_PATH_PROTOCOL Header;\r | |
101 | ///\r | |
102 | /// Function Number (0 = First Function)\r | |
103 | ///\r | |
104 | UINT8 FunctionNumber;\r | |
105 | } PCCARD_DEVICE_PATH;\r | |
106 | \r | |
107 | ///\r | |
108 | /// Memory Mapped Device Path\r | |
109 | ///\r | |
110 | #define HW_MEMMAP_DP 0x03\r | |
111 | typedef struct {\r | |
112 | EFI_DEVICE_PATH_PROTOCOL Header;\r | |
113 | ///\r | |
114 | /// EFI_MEMORY_TYPE\r | |
115 | ///\r | |
116 | UINT32 MemoryType;\r | |
117 | ///\r | |
118 | /// Starting Memory Address.\r | |
119 | ///\r | |
120 | EFI_PHYSICAL_ADDRESS StartingAddress;\r | |
121 | ///\r | |
122 | /// Ending Memory Address\r | |
123 | ///\r | |
124 | EFI_PHYSICAL_ADDRESS EndingAddress;\r | |
125 | } MEMMAP_DEVICE_PATH;\r | |
126 | \r | |
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 | |
132 | #define HW_VENDOR_DP 0x04\r | |
133 | typedef struct {\r | |
134 | EFI_DEVICE_PATH_PROTOCOL Header;\r | |
135 | ///\r | |
136 | /// Vendor-assigned GUID that defines the data that follows.\r | |
137 | ///\r | |
138 | EFI_GUID Guid;\r | |
139 | ///\r | |
140 | /// Vendor-defined variable size data.\r | |
141 | ///\r | |
142 | } VENDOR_DEVICE_PATH;\r | |
143 | \r | |
144 | ///\r | |
145 | /// Controller Device Path\r | |
146 | ///\r | |
147 | #define HW_CONTROLLER_DP 0x05\r | |
148 | typedef struct {\r | |
149 | EFI_DEVICE_PATH_PROTOCOL Header;\r | |
150 | ///\r | |
151 | /// Controller number.\r | |
152 | ///\r | |
153 | UINT32 ControllerNumber;\r | |
154 | } CONTROLLER_DEVICE_PATH;\r | |
155 | \r | |
156 | ///\r | |
157 | /// ACPI Device Paths\r | |
158 | ///\r | |
159 | #define ACPI_DEVICE_PATH 0x02\r | |
160 | \r | |
161 | ///\r | |
162 | /// ACPI Device Path\r | |
163 | ///\r | |
164 | #define ACPI_DP 0x01\r | |
165 | typedef struct {\r | |
166 | EFI_DEVICE_PATH_PROTOCOL Header;\r | |
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 | |
172 | UINT32 HID;\r | |
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 | |
180 | UINT32 UID;\r | |
181 | } ACPI_HID_DEVICE_PATH;\r | |
182 | \r | |
183 | ///\r | |
184 | /// Expanded ACPI Device Path.\r | |
185 | ///\r | |
186 | #define ACPI_EXTENDED_DP 0x02\r | |
187 | typedef struct {\r | |
188 | EFI_DEVICE_PATH_PROTOCOL Header;\r | |
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 | |
194 | UINT32 HID;\r | |
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 | |
200 | UINT32 UID;\r | |
201 | ///\r | |
202 |