Deleted Added
full compact
efidevp.h (96893) efidevp.h (163898)
1/* $FreeBSD: head/sys/boot/efi/include/efidevp.h 96893 2002-05-19 03:17:22Z marcel $ */
1/* $FreeBSD: head/sys/boot/efi/include/efidevp.h 163898 2006-11-02 02:42:48Z marcel $ */
2#ifndef _DEVPATH_H
3#define _DEVPATH_H
4
5/*++
6
2#ifndef _DEVPATH_H
3#define _DEVPATH_H
4
5/*++
6
7Copyright (c) 1998 Intel Corporation
7Copyright (c) 1999 - 2002 Intel Corporation. All rights reserved
8This software and associated documentation (if any) is furnished
9under a license and may only be used or copied in accordance
10with the terms of the license. Except as permitted by such
11license, no part of this software or documentation may be
12reproduced, stored in a retrieval system, or transmitted in any
13form or by any means without the express written consent of
14Intel Corporation.
8
9Module Name:
10
11 devpath.h
12
13Abstract:
14
15 Defines for parsing the EFI Device Path structures
16
17
18
19Revision History
20
21--*/
22
15
16Module Name:
17
18 devpath.h
19
20Abstract:
21
22 Defines for parsing the EFI Device Path structures
23
24
25
26Revision History
27
28--*/
29
23/*
24 * Device Path structures - Section C
25 */
30//
31// Device Path structures - Section C
32//
26
27typedef struct _EFI_DEVICE_PATH {
28 UINT8 Type;
29 UINT8 SubType;
30 UINT8 Length[2];
31} EFI_DEVICE_PATH;
32
33#define EFI_DP_TYPE_MASK 0x7F
34#define EFI_DP_TYPE_UNPACKED 0x80
35
33
34typedef struct _EFI_DEVICE_PATH {
35 UINT8 Type;
36 UINT8 SubType;
37 UINT8 Length[2];
38} EFI_DEVICE_PATH;
39
40#define EFI_DP_TYPE_MASK 0x7F
41#define EFI_DP_TYPE_UNPACKED 0x80
42
43//#define END_DEVICE_PATH_TYPE 0xff
36#define END_DEVICE_PATH_TYPE 0x7f
44#define END_DEVICE_PATH_TYPE 0x7f
45//#define END_DEVICE_PATH_TYPE_UNPACKED 0x7f
37
38#define END_ENTIRE_DEVICE_PATH_SUBTYPE 0xff
39#define END_INSTANCE_DEVICE_PATH_SUBTYPE 0x01
40#define END_DEVICE_PATH_LENGTH (sizeof(EFI_DEVICE_PATH))
41
42
43#define DP_IS_END_TYPE(a)
44#define DP_IS_END_SUBTYPE(a) ( ((a)->SubType == END_ENTIRE_DEVICE_PATH_SUBTYPE )
45
46#define DevicePathType(a) ( ((a)->Type) & EFI_DP_TYPE_MASK )
47#define DevicePathSubType(a) ( (a)->SubType )
48#define DevicePathNodeLength(a) ( ((a)->Length[0]) | ((a)->Length[1] << 8) )
49#define NextDevicePathNode(a) ( (EFI_DEVICE_PATH *) ( ((UINT8 *) (a)) + DevicePathNodeLength(a)))
46
47#define END_ENTIRE_DEVICE_PATH_SUBTYPE 0xff
48#define END_INSTANCE_DEVICE_PATH_SUBTYPE 0x01
49#define END_DEVICE_PATH_LENGTH (sizeof(EFI_DEVICE_PATH))
50
51
52#define DP_IS_END_TYPE(a)
53#define DP_IS_END_SUBTYPE(a) ( ((a)->SubType == END_ENTIRE_DEVICE_PATH_SUBTYPE )
54
55#define DevicePathType(a) ( ((a)->Type) & EFI_DP_TYPE_MASK )
56#define DevicePathSubType(a) ( (a)->SubType )
57#define DevicePathNodeLength(a) ( ((a)->Length[0]) | ((a)->Length[1] << 8) )
58#define NextDevicePathNode(a) ( (EFI_DEVICE_PATH *) ( ((UINT8 *) (a)) + DevicePathNodeLength(a)))
59//#define IsDevicePathEndType(a) ( DevicePathType(a) == END_DEVICE_PATH_TYPE_UNPACKED )
50#define IsDevicePathEndType(a) ( DevicePathType(a) == END_DEVICE_PATH_TYPE )
51#define IsDevicePathEndSubType(a) ( (a)->SubType == END_ENTIRE_DEVICE_PATH_SUBTYPE )
52#define IsDevicePathEnd(a) ( IsDevicePathEndType(a) && IsDevicePathEndSubType(a) )
53#define IsDevicePathUnpacked(a) ( (a)->Type & EFI_DP_TYPE_UNPACKED )
54
55
56#define SetDevicePathNodeLength(a,l) { \
57 (a)->Length[0] = (UINT8) (l); \

--- 19 unchanged lines hidden (view full) ---

77 EFI_DEVICE_PATH Header;
78 UINT8 Function;
79 UINT8 Device;
80} PCI_DEVICE_PATH;
81
82#define HW_PCCARD_DP 0x02
83typedef struct _PCCARD_DEVICE_PATH {
84 EFI_DEVICE_PATH Header;
60#define IsDevicePathEndType(a) ( DevicePathType(a) == END_DEVICE_PATH_TYPE )
61#define IsDevicePathEndSubType(a) ( (a)->SubType == END_ENTIRE_DEVICE_PATH_SUBTYPE )
62#define IsDevicePathEnd(a) ( IsDevicePathEndType(a) && IsDevicePathEndSubType(a) )
63#define IsDevicePathUnpacked(a) ( (a)->Type & EFI_DP_TYPE_UNPACKED )
64
65
66#define SetDevicePathNodeLength(a,l) { \
67 (a)->Length[0] = (UINT8) (l); \

--- 19 unchanged lines hidden (view full) ---

87 EFI_DEVICE_PATH Header;
88 UINT8 Function;
89 UINT8 Device;
90} PCI_DEVICE_PATH;
91
92#define HW_PCCARD_DP 0x02
93typedef struct _PCCARD_DEVICE_PATH {
94 EFI_DEVICE_PATH Header;
85 UINT8 SocketNumber;
95 UINT8 FunctionNumber;
86} PCCARD_DEVICE_PATH;
87
88#define HW_MEMMAP_DP 0x03
89typedef struct _MEMMAP_DEVICE_PATH {
90 EFI_DEVICE_PATH Header;
91 UINT32 MemoryType;
92 EFI_PHYSICAL_ADDRESS StartingAddress;
93 EFI_PHYSICAL_ADDRESS EndingAddress;

--- 26 unchanged lines hidden (view full) ---

120
121#define ACPI_DP 0x01
122typedef struct _ACPI_HID_DEVICE_PATH {
123 EFI_DEVICE_PATH Header;
124 UINT32 HID;
125 UINT32 UID;
126} ACPI_HID_DEVICE_PATH;
127
96} PCCARD_DEVICE_PATH;
97
98#define HW_MEMMAP_DP 0x03
99typedef struct _MEMMAP_DEVICE_PATH {
100 EFI_DEVICE_PATH Header;
101 UINT32 MemoryType;
102 EFI_PHYSICAL_ADDRESS StartingAddress;
103 EFI_PHYSICAL_ADDRESS EndingAddress;

--- 26 unchanged lines hidden (view full) ---

130
131#define ACPI_DP 0x01
132typedef struct _ACPI_HID_DEVICE_PATH {
133 EFI_DEVICE_PATH Header;
134 UINT32 HID;
135 UINT32 UID;
136} ACPI_HID_DEVICE_PATH;
137
128/*
129 * EISA ID Macro
130 * EISA ID Definition 32-bits
131 * bits[15:0] - three character compressed ASCII EISA ID.
132 * bits[31:16] - binary number
133 * Compressed ASCII is 5 bits per character 0b00001 = 'A' 0b11010 = 'Z'
134 */
138#define ACPI_EXTENDED_DP 0x02
139typedef struct _ACPI_EXTENDED_HID_DEVICE_PATH {
140 EFI_DEVICE_PATH Header;
141 UINT32 HID;
142 UINT32 UID;
143 UINT32 CID;
144} ACPI_EXTENDED_HID_DEVICE_PATH;
145
146//
147// EISA ID Macro
148// EISA ID Definition 32-bits
149// bits[15:0] - three character compressed ASCII EISA ID.
150// bits[31:16] - binary number
151// Compressed ASCII is 5 bits per character 0b00001 = 'A' 0b11010 = 'Z'
152//
135#define PNP_EISA_ID_CONST 0x41d0
136#define EISA_ID(_Name, _Num) ((UINT32) ((_Name) | (_Num) << 16))
137#define EISA_PNP_ID(_PNPId) (EISA_ID(PNP_EISA_ID_CONST, (_PNPId)))
153#define PNP_EISA_ID_CONST 0x41d0
154#define EISA_ID(_Name, _Num) ((UINT32) ((_Name) | (_Num) << 16))
155#define EISA_PNP_ID(_PNPId) (EISA_ID(PNP_EISA_ID_CONST, (_PNPId)))
156#define EFI_PNP_ID(_PNPId) (EISA_ID(PNP_EISA_ID_CONST, (_PNPId)))
138
139#define PNP_EISA_ID_MASK 0xffff
140#define EISA_ID_TO_NUM(_Id) ((_Id) >> 16)
141/*
142 *
143 */
144#define MESSAGING_DEVICE_PATH 0x03
145

--- 24 unchanged lines hidden (view full) ---

170typedef struct _F1394_DEVICE_PATH {
171 EFI_DEVICE_PATH Header;
172 UINT32 Reserved;
173 UINT64 Guid;
174} F1394_DEVICE_PATH;
175
176#define MSG_USB_DP 0x05
177typedef struct _USB_DEVICE_PATH {
157
158#define PNP_EISA_ID_MASK 0xffff
159#define EISA_ID_TO_NUM(_Id) ((_Id) >> 16)
160/*
161 *
162 */
163#define MESSAGING_DEVICE_PATH 0x03
164

--- 24 unchanged lines hidden (view full) ---

189typedef struct _F1394_DEVICE_PATH {
190 EFI_DEVICE_PATH Header;
191 UINT32 Reserved;
192 UINT64 Guid;
193} F1394_DEVICE_PATH;
194
195#define MSG_USB_DP 0x05
196typedef struct _USB_DEVICE_PATH {
178 EFI_DEVICE_PATH Header;
179 UINT8 Port;
180 UINT8 Endpoint;
197 EFI_DEVICE_PATH Header;
198 UINT8 ParentPortNumber;
199 UINT8 InterfaceNumber;
181} USB_DEVICE_PATH;
182
183#define MSG_USB_CLASS_DP 0x0F
184typedef struct _USB_CLASS_DEVICE_PATH {
185 EFI_DEVICE_PATH Header;
186 UINT16 VendorId;
187 UINT16 ProductId;
188 UINT8 DeviceClass;
200} USB_DEVICE_PATH;
201
202#define MSG_USB_CLASS_DP 0x0F
203typedef struct _USB_CLASS_DEVICE_PATH {
204 EFI_DEVICE_PATH Header;
205 UINT16 VendorId;
206 UINT16 ProductId;
207 UINT8 DeviceClass;
189 UINT8 DeviceSubclass;
208 UINT8 DeviceSubClass;
190 UINT8 DeviceProtocol;
191} USB_CLASS_DEVICE_PATH;
192
193#define MSG_I2O_DP 0x06
194typedef struct _I2O_DEVICE_PATH {
195 EFI_DEVICE_PATH Header;
196 UINT32 Tid;
197} I2O_DEVICE_PATH;

--- 24 unchanged lines hidden (view full) ---

222 UINT16 LocalPort;
223 UINT16 RemotePort;
224 UINT16 Protocol;
225 BOOLEAN StaticIpAddress;
226} IPv6_DEVICE_PATH;
227
228#define MSG_INFINIBAND_DP 0x09
229typedef struct _INFINIBAND_DEVICE_PATH {
209 UINT8 DeviceProtocol;
210} USB_CLASS_DEVICE_PATH;
211
212#define MSG_I2O_DP 0x06
213typedef struct _I2O_DEVICE_PATH {
214 EFI_DEVICE_PATH Header;
215 UINT32 Tid;
216} I2O_DEVICE_PATH;

--- 24 unchanged lines hidden (view full) ---

241 UINT16 LocalPort;
242 UINT16 RemotePort;
243 UINT16 Protocol;
244 BOOLEAN StaticIpAddress;
245} IPv6_DEVICE_PATH;
246
247#define MSG_INFINIBAND_DP 0x09
248typedef struct _INFINIBAND_DEVICE_PATH {
230 EFI_DEVICE_PATH Header;
231 UINT32 Reserved;
232 UINT64 NodeGuid;
233 UINT64 IocGuid;
234 UINT64 DeviceId;
249 EFI_DEVICE_PATH Header;
250 UINT32 ResourceFlags;
251 UINT8 PortGid[16];
252 UINT64 ServiceId;
253 UINT64 TargetPortId;
254 UINT64 DeviceId;
235} INFINIBAND_DEVICE_PATH;
236
255} INFINIBAND_DEVICE_PATH;
256
257#define INFINIBAND_RESOURCE_FLAG_IOC_SERVICE 0x01
258#define INFINIBAND_RESOURCE_FLAG_EXTENDED_BOOT_ENVIRONMENT 0x02
259#define INFINIBAND_RESOURCE_FLAG_CONSOLE_PROTOCOL 0x04
260#define INFINIBAND_RESOURCE_FLAG_STORAGE_PROTOCOL 0x08
261#define INFINIBAND_RESOURCE_FLAG_NETWORK_PROTOCOL 0x10
262
237#define MSG_UART_DP 0x0e
238typedef struct _UART_DEVICE_PATH {
239 EFI_DEVICE_PATH Header;
240 UINT32 Reserved;
241 UINT64 BaudRate;
242 UINT8 DataBits;
243 UINT8 Parity;
244 UINT8 StopBits;
245} UART_DEVICE_PATH;
246
247#define MSG_VENDOR_DP 0x0A
248/* Use VENDOR_DEVICE_PATH struct */
249
250#define DEVICE_PATH_MESSAGING_PC_ANSI \
251 { 0xe0c14753, 0xf9be, 0x11d2, 0x9a, 0x0c, 0x00, 0x90, 0x27, 0x3f, 0xc1, 0x4d }
252
253#define DEVICE_PATH_MESSAGING_VT_100 \
254 { 0xdfa66065, 0xb419, 0x11d3, 0x9a, 0x2d, 0x00, 0x90, 0x27, 0x3f, 0xc1, 0x4d }
255
263#define MSG_UART_DP 0x0e
264typedef struct _UART_DEVICE_PATH {
265 EFI_DEVICE_PATH Header;
266 UINT32 Reserved;
267 UINT64 BaudRate;
268 UINT8 DataBits;
269 UINT8 Parity;
270 UINT8 StopBits;
271} UART_DEVICE_PATH;
272
273#define MSG_VENDOR_DP 0x0A
274/* Use VENDOR_DEVICE_PATH struct */
275
276#define DEVICE_PATH_MESSAGING_PC_ANSI \
277 { 0xe0c14753, 0xf9be, 0x11d2, 0x9a, 0x0c, 0x00, 0x90, 0x27, 0x3f, 0xc1, 0x4d }
278
279#define DEVICE_PATH_MESSAGING_VT_100 \
280 { 0xdfa66065, 0xb419, 0x11d3, 0x9a, 0x2d, 0x00, 0x90, 0x27, 0x3f, 0xc1, 0x4d }
281
282#define DEVICE_PATH_MESSAGING_VT_100_PLUS \
283 { 0x7baec70b, 0x57e0, 0x4c76, 0x8e, 0x87, 0x2f, 0x9e, 0x28, 0x08, 0x83, 0x43 }
284
285#define DEVICE_PATH_MESSAGING_VT_UTF8 \
286 { 0xad15a0d6, 0x8bec, 0x4acf, 0xa0, 0x73, 0xd0, 0x1d, 0xe7, 0x7e, 0x2d, 0x88 }
256
257
258#define MEDIA_DEVICE_PATH 0x04
259
260#define MEDIA_HARDDRIVE_DP 0x01
261typedef struct _HARDDRIVE_DEVICE_PATH {
262 EFI_DEVICE_PATH Header;
263 UINT32 PartitionNumber;

--- 93 unchanged lines hidden (view full) ---

357 EFI_DEVICE_PATH *DevPath;
358 PCI_DEVICE_PATH *Pci;
359 PCCARD_DEVICE_PATH *PcCard;
360 MEMMAP_DEVICE_PATH *MemMap;
361 VENDOR_DEVICE_PATH *Vendor;
362 UNKNOWN_DEVICE_VENDOR_DEVICE_PATH *UnknownVendor;
363 CONTROLLER_DEVICE_PATH *Controller;
364 ACPI_HID_DEVICE_PATH *Acpi;
287
288
289#define MEDIA_DEVICE_PATH 0x04
290
291#define MEDIA_HARDDRIVE_DP 0x01
292typedef struct _HARDDRIVE_DEVICE_PATH {
293 EFI_DEVICE_PATH Header;
294 UINT32 PartitionNumber;

--- 93 unchanged lines hidden (view full) ---

388 EFI_DEVICE_PATH *DevPath;
389 PCI_DEVICE_PATH *Pci;
390 PCCARD_DEVICE_PATH *PcCard;
391 MEMMAP_DEVICE_PATH *MemMap;
392 VENDOR_DEVICE_PATH *Vendor;
393 UNKNOWN_DEVICE_VENDOR_DEVICE_PATH *UnknownVendor;
394 CONTROLLER_DEVICE_PATH *Controller;
395 ACPI_HID_DEVICE_PATH *Acpi;
396 ACPI_EXTENDED_HID_DEVICE_PATH *ExtendedAcpi;
365
366 ATAPI_DEVICE_PATH *Atapi;
367 SCSI_DEVICE_PATH *Scsi;
368 FIBRECHANNEL_DEVICE_PATH *FibreChannel;
369
370 F1394_DEVICE_PATH *F1394;
371 USB_DEVICE_PATH *Usb;
372 USB_CLASS_DEVICE_PATH *UsbClass;

--- 19 unchanged lines hidden ---
397
398 ATAPI_DEVICE_PATH *Atapi;
399 SCSI_DEVICE_PATH *Scsi;
400 FIBRECHANNEL_DEVICE_PATH *FibreChannel;
401
402 F1394_DEVICE_PATH *F1394;
403 USB_DEVICE_PATH *Usb;
404 USB_CLASS_DEVICE_PATH *UsbClass;

--- 19 unchanged lines hidden ---