Deleted Added
sdiff udiff text old ( 77943 ) new ( 96893 )
full compact
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
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
36#define END_DEVICE_PATH_TYPE 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)))
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
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 */
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 ---