Deleted Added
full compact
efidevp.h (77943) efidevp.h (96893)
1/* $FreeBSD: head/sys/boot/efi/include/efidevp.h 77943 2001-06-09 16:49:51Z dfr $ */
1/* $FreeBSD: head/sys/boot/efi/include/efidevp.h 96893 2002-05-19 03:17:22Z marcel $ */
2#ifndef _DEVPATH_H
3#define _DEVPATH_H
4
5/*++
6
7Copyright (c) 1998 Intel Corporation
8
9Module Name:

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

15 Defines for parsing the EFI Device Path structures
16
17
18
19Revision History
20
21--*/
22
2#ifndef _DEVPATH_H
3#define _DEVPATH_H
4
5/*++
6
7Copyright (c) 1998 Intel Corporation
8
9Module Name:

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

15 Defines for parsing the EFI Device Path structures
16
17
18
19Revision History
20
21--*/
22
23//
24// Device Path structures - Section C
25//
23/*
24 * Device Path structures - Section C
25 */
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
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
36//#define END_DEVICE_PATH_TYPE 0xff
37#define END_DEVICE_PATH_TYPE 0x7f
36#define END_DEVICE_PATH_TYPE 0x7f
38//#define END_DEVICE_PATH_TYPE_UNPACKED 0x7f
39
40#define END_ENTIRE_DEVICE_PATH_SUBTYPE 0xff
41#define END_INSTANCE_DEVICE_PATH_SUBTYPE 0x01
42#define END_DEVICE_PATH_LENGTH (sizeof(EFI_DEVICE_PATH))
43
44
45#define DP_IS_END_TYPE(a)
46#define DP_IS_END_SUBTYPE(a) ( ((a)->SubType == END_ENTIRE_DEVICE_PATH_SUBTYPE )
47
48#define DevicePathType(a) ( ((a)->Type) & EFI_DP_TYPE_MASK )
49#define DevicePathSubType(a) ( (a)->SubType )
50#define DevicePathNodeLength(a) ( ((a)->Length[0]) | ((a)->Length[1] << 8) )
51#define NextDevicePathNode(a) ( (EFI_DEVICE_PATH *) ( ((UINT8 *) (a)) + DevicePathNodeLength(a)))
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)))
52//#define IsDevicePathEndType(a) ( DevicePathType(a) == END_DEVICE_PATH_TYPE_UNPACKED )
53#define IsDevicePathEndType(a) ( DevicePathType(a) == END_DEVICE_PATH_TYPE )
54#define IsDevicePathEndSubType(a) ( (a)->SubType == END_ENTIRE_DEVICE_PATH_SUBTYPE )
55#define IsDevicePathEnd(a) ( IsDevicePathEndType(a) && IsDevicePathEndSubType(a) )
56#define IsDevicePathUnpacked(a) ( (a)->Type & EFI_DP_TYPE_UNPACKED )
57
58
59#define SetDevicePathNodeLength(a,l) { \
60 (a)->Length[0] = (UINT8) (l); \

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

123
124#define ACPI_DP 0x01
125typedef struct _ACPI_HID_DEVICE_PATH {
126 EFI_DEVICE_PATH Header;
127 UINT32 HID;
128 UINT32 UID;
129} ACPI_HID_DEVICE_PATH;
130
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); \

--- 62 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
131//
132// EISA ID Macro
133// EISA ID Definition 32-bits
134// bits[15:0] - three character compressed ASCII EISA ID.
135// bits[31:16] - binary number
136// Compressed ASCII is 5 bits per character 0b00001 = 'A' 0b11010 = 'Z'
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 PNP_EISA_ID_CONST 0x41d0
139#define EISA_ID(_Name, _Num) ((UINT32) ((_Name) | (_Num) << 16))
140#define EISA_PNP_ID(_PNPId) (EISA_ID(PNP_EISA_ID_CONST, (_PNPId)))
141
142#define PNP_EISA_ID_MASK 0xffff
143#define EISA_ID_TO_NUM(_Id) ((_Id) >> 16)
144/*
145 *

--- 249 unchanged lines hidden ---
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)))
138
139#define PNP_EISA_ID_MASK 0xffff
140#define EISA_ID_TO_NUM(_Id) ((_Id) >> 16)
141/*
142 *

--- 249 unchanged lines hidden ---