]>
Commit | Line | Data |
---|---|---|
3eb9473e | 1 | /*++\r |
2 | \r | |
f57387d5 HT |
3 | Copyright (c) 2004, Intel Corporation. All rights reserved.<BR>\r |
4 | This program and the accompanying materials \r | |
3eb9473e | 5 | are licensed and made available under the terms and conditions of the BSD License \r |
6 | which accompanies this distribution. The full text of the license may be found at \r | |
7 | http://opensource.org/licenses/bsd-license.php \r | |
8 | \r | |
9 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r | |
10 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r | |
11 | \r | |
12 | Module Name:\r | |
13 | \r | |
14 | DevicePath.h\r | |
15 | \r | |
16 | Abstract:\r | |
17 | \r | |
18 | The device path protocol as defined in EFI 1.0.\r | |
19 | \r | |
20 | The device path represents a programatic path to a device. It's the view\r | |
21 | from a software point of view. It also must persist from boot to boot, so \r | |
22 | it can not contain things like PCI bus numbers that change from boot to boot.\r | |
23 | \r | |
24 | \r | |
25 | --*/\r | |
26 | \r | |
27 | #ifndef _DEVICE_PATH_H_\r | |
28 | #define _DEVICE_PATH_H_\r | |
29 | \r | |
30 | //\r | |
31 | // Device Path protocol\r | |
32 | //\r | |
33 | #define EFI_DEVICE_PATH_PROTOCOL_GUID \\r | |
34 | { \\r | |
7ccf38a3 | 35 | 0x9576e91, 0x6d3f, 0x11d2, {0x8e, 0x39, 0x0, 0xa0, 0xc9, 0x69, 0x72, 0x3b} \\r |
3eb9473e | 36 | }\r |
37 | \r | |
88b6bcec | 38 | #pragma pack(1)\r |
3eb9473e | 39 | \r |
40 | typedef struct {\r | |
41 | UINT8 Type;\r | |
42 | UINT8 SubType;\r | |
43 | UINT8 Length[2];\r | |
44 | } EFI_DEVICE_PATH_PROTOCOL;\r | |
45 | \r | |
88b6bcec | 46 | #pragma pack()\r |
3eb9473e | 47 | \r |
48 | #define EFI_END_ENTIRE_DEVICE_PATH 0xff\r | |
49 | #define EFI_END_ENTIRE_DEVICE_PATH_SUBTYPE 0xff\r | |
50 | #define EFI_END_INSTANCE_DEVICE_PATH 0x01\r | |
51 | #define EFI_END_DEVICE_PATH_LENGTH (sizeof (EFI_DEVICE_PATH_PROTOCOL))\r | |
52 | \r | |
53 | #define EfiDevicePathNodeLength(a) (((a)->Length[0]) | ((a)->Length[1] << 8))\r | |
54 | #define EfiNextDevicePathNode(a) ((EFI_DEVICE_PATH_PROTOCOL *) (((UINT8 *) (a)) + EfiDevicePathNodeLength (a)))\r | |
55 | \r | |
56 | #define EfiDevicePathType(a) (((a)->Type) & 0x7f)\r | |
57 | #define EfiIsDevicePathEndType(a) (EfiDevicePathType (a) == 0x7f)\r | |
58 | \r | |
59 | #define EfiIsDevicePathEndSubType(a) ((a)->SubType == EFI_END_ENTIRE_DEVICE_PATH_SUBTYPE)\r | |
60 | #define EfiIsDevicePathEndInstanceSubType(a) ((a)->SubType == EFI_END_INSTANCE_DEVICE_PATH)\r | |
61 | \r | |
62 | #define EfiIsDevicePathEnd(a) (EfiIsDevicePathEndType (a) && EfiIsDevicePathEndSubType (a))\r | |
63 | #define EfiIsDevicePathEndInstance(a) (EfiIsDevicePathEndType (a) && EfiIsDevicePathEndInstanceSubType (a))\r | |
64 | \r | |
65 | extern EFI_GUID gEfiDevicePathProtocolGuid;\r | |
66 | \r | |
67 | #endif\r |