]>
Commit | Line | Data |
---|---|---|
b205f267 | 1 | /** @file\r |
2 | GUID used to identify id for the caller who is initiating the Status Code.\r | |
3 | \r | |
6ce55357 | 4 | Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.<BR>\r |
9df063a0 | 5 | This program and the accompanying materials\r |
b205f267 | 6 | are licensed and made available under the terms and conditions of the BSD License\r |
7 | which accompanies this distribution. The full text of the license may be found at\r | |
8 | http://opensource.org/licenses/bsd-license.php\r | |
9 | \r | |
10 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r | |
11 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r | |
12 | \r | |
13 | @par Revision Reference:\r | |
14 | These GUIDs and structures are defined in UEFI Platform Initialization Specification 1.2 \r | |
15 | Volume 3: Shared Architectural Elements\r | |
16 | \r | |
17 | **/\r | |
18 | \r | |
19 | #ifndef __PI_STATUS_CODE_DATA_TYPE_ID_GUID_H__\r | |
20 | #define __PI_STATUS_CODE_DATA_TYPE_ID_GUID_H__\r | |
21 | \r | |
22 | #include <PiDxe.h>\r | |
23 | #include <Protocol/DebugSupport.h>\r | |
24 | \r | |
25 | ///\r | |
26 | /// Global ID for the EFI_STATUS_CODE_STRING structure\r | |
27 | ///\r | |
28 | #define EFI_STATUS_CODE_DATA_TYPE_STRING_GUID \\r | |
29 | { 0x92D11080, 0x496F, 0x4D95, { 0xBE, 0x7E, 0x03, 0x74, 0x88, 0x38, 0x2B, 0x0A } }\r | |
ad0ecbcf | 30 | \r |
b205f267 | 31 | typedef enum {\r |
32 | ///\r | |
33 | /// A NULL-terminated ASCII string.\r | |
34 | ///\r | |
35 | EfiStringAscii,\r | |
36 | ///\r | |
37 | /// A double NULL-terminated Unicode string.\r | |
38 | ///\r | |
39 | EfiStringUnicode,\r | |
40 | ///\r | |
41 | /// An EFI_STATUS_CODE_STRING_TOKEN representing the string. The actual \r | |
42 | /// string can be obtained by querying the HII Database\r | |
43 | ///\r | |
44 | EfiStringToken\r | |
45 | } EFI_STRING_TYPE;\r | |
46 | \r | |
47 | ///\r | |
48 | /// Specifies the format of the data in EFI_STATUS_CODE_STRING_DATA.String.\r | |
49 | ///\r | |
50 | typedef struct {\r | |
51 | ///\r | |
52 | /// The HII package list which contains the string. Handle is a dynamic value that may\r | |
53 | /// not be the same for different boots. Type EFI_HII_HANDLE is defined in\r | |
54 | /// EFI_HII_DATABASE_PROTOCOL.NewPackageList() in the UEFI Specification.\r | |
55 | ///\r | |
56 | EFI_HII_HANDLE Handle;\r | |
57 | ///\r | |
58 | /// When combined with Handle, the string token can be used to retrieve the string.\r | |
59 | /// Type EFI_STRING_ID is defined in EFI_IFR_OP_HEADER in the UEFI Specification.\r | |
60 | ///\r | |
61 | EFI_STRING_ID Token;\r | |
62 | } EFI_STATUS_CODE_STRING_TOKEN;\r | |
63 | \r | |
64 | typedef union {\r | |
65 | ///\r | |
66 | /// ASCII formatted string.\r | |
67 | ///\r | |
68 | CHAR8 *Ascii;\r | |
69 | ///\r | |
70 | /// Unicode formatted string.\r | |
71 | ///\r | |
72 | CHAR16 *Unicode;\r | |
73 | ///\r | |
74 | /// HII handle/token pair.\r | |
75 | ///\r | |
76 | EFI_STATUS_CODE_STRING_TOKEN Hii;\r | |
77 | } EFI_STATUS_CODE_STRING;\r | |
78 | \r | |
79 | ///\r | |
80 | /// This data type defines a string type of extended data. A string can accompany \r | |
81 | /// any status code. The string can provide additional information about the \r | |
82 | /// status code. The string can be ASCII, Unicode, or a Human Interface Infrastructure \r | |
83 | /// (HII) token/GUID pair.\r | |
84 | ///\r | |
85 | typedef struct {\r | |
86 | ///\r | |
87 | /// The data header identifying the data. DataHeader.HeaderSize should be\r | |
88 | /// sizeof (EFI_STATUS_CODE_DATA), DataHeader.Size should be\r | |
d1eff2f5 | 89 | /// sizeof (EFI_STATUS_CODE_STRING_DATA) - HeaderSize, and\r |
b205f267 | 90 | /// DataHeader.Type should be\r |
91 | /// EFI_STATUS_CODE_DATA_TYPE_STRING_GUID.\r | |
92 | /// \r | |
93 | EFI_STATUS_CODE_DATA DataHeader; \r | |
94 | ///\r | |
95 | /// Specifies the format of the data in String.\r | |
96 | ///\r | |
97 | EFI_STRING_TYPE StringType;\r | |
98 | ///\r | |
99 | /// A pointer to the extended data. The data follows the format specified by \r | |
100 | /// StringType.\r | |
101 | ///\r | |
102 | EFI_STATUS_CODE_STRING String;\r | |
103 | } EFI_STATUS_CODE_STRING_DATA;\r | |
104 | \r | |
b205f267 | 105 | extern EFI_GUID gEfiStatusCodeDataTypeStringGuid;\r |
106 | \r | |
107 | ///\r | |
108 | /// Global ID for the following structures:\r | |
109 | /// - EFI_DEVICE_PATH_EXTENDED_DATA\r | |
110 | /// - EFI_DEVICE_HANDLE_EXTENDED_DATA\r | |
111 | /// - EFI_RESOURCE_ALLOC_FAILURE_ERROR_DATA\r | |
112 | /// - EFI_COMPUTING_UNIT_VOLTAGE_ERROR_DATA\r | |
113 | /// - EFI_COMPUTING_UNIT_MICROCODE_UPDATE_ERROR_DATA\r | |
114 | /// - EFI_COMPUTING_UNIT_TIMER_EXPIRED_ERROR_DATA\r | |
115 | /// - EFI_HOST_PROCESSOR_MISMATCH_ERROR_DATA\r | |
116 | /// - EFI_MEMORY_RANGE_EXTENDED_DATA\r | |
117 | /// - EFI_DEBUG_ASSERT_DATA\r | |
118 | /// - EFI_STATUS_CODE_EXCEP_EXTENDED_DATA\r | |
119 | /// - EFI_STATUS_CODE_START_EXTENDED_DATA\r | |
120 | /// - EFI_LEGACY_OPROM_EXTENDED_DATA\r | |
121 | ///\r | |
122 | #define EFI_STATUS_CODE_SPECIFIC_DATA_GUID \\r | |
123 | { 0x335984bd, 0xe805, 0x409a, { 0xb8, 0xf8, 0xd2, 0x7e, 0xce, 0x5f, 0xf7, 0xa6 } }\r | |
124 | \r | |
b205f267 | 125 | ///\r |
126 | /// Extended data about the device path, which is used for many errors and \r | |
127 | /// progress codes to point to the device.\r | |
128 | ///\r | |
129 | /// The device path is used to point to the physical device in case there is more than one device\r | |
130 | /// belonging to the same subclass. For example, the system may contain two USB keyboards and one\r | |
131 | /// PS/2* keyboard. The driver that parses the status code can use the device path extended data to\r | |
132 | /// differentiate between the three. The index field is not useful in this case because there is no standard\r | |
133 | /// numbering convention. Device paths are preferred over using device handles because device handles\r | |
134 | /// for a given device can change from one boot to another and do not mean anything beyond Boot\r | |
135 | /// Services time. In certain cases, the bus driver may not create a device handle for a given device if it\r | |
136 | /// detects a critical error. In these cases, the device path extended data can be used to refer to the\r | |
137 | /// device, but there may not be any device handles with an instance of\r | |
138 | /// EFI_DEVICE_PATH_PROTOCOL that matches DevicePath. The variable device path structure\r | |
139 | /// is included in this structure to make it self sufficient.\r | |
140 | ///\r | |
141 | typedef struct {\r | |
142 | ///\r | |
143 | /// The data header identifying the data. DataHeader.HeaderSize should be\r | |
144 | /// sizeof (EFI_STATUS_CODE_DATA). DataHeader.Size should be the size\r | |
145 | /// of variable-length DevicePath, and DataHeader.Size is zero for a virtual\r | |
146 | /// device that does not have a device path. DataHeader.Type should be\r | |
147 | /// EFI_STATUS_CODE_SPECIFIC_DATA_GUID.\r | |
148 | ///\r | |
149 | EFI_STATUS_CODE_DATA DataHeader;\r | |
150 | ///\r | |
6ce55357 SQ |
151 | /// The device path to the controller or the hardware device. Note that this parameter is a \r |
152 | /// variable-length device path structure and not a pointer to such a structure. This structure is\r | |
153 | /// populated only if it is a physical device. For virtual devices, the Size field in DataHeader\r | |
154 | /// is set to zero and this field is not populated.\r | |
b205f267 | 155 | ///\r |
6ce55357 | 156 | // EFI_DEVICE_PATH_PROTOCOL DevicePath;\r |
b205f267 | 157 | } EFI_DEVICE_PATH_EXTENDED_DATA;\r |
158 | \r | |
159 | ///\r | |
160 | /// Device handle Extended Data. Used for many\r | |
161 | /// errors and progress codes to point to the device.\r | |
162 | ///\r | |
163 | /// The handle of the device with which the progress or error code is associated. The handle is\r | |
164 | /// guaranteed to be accurate only at the time the status code is reported. Handles are dynamic entities\r | |
165 | /// between boots, so handles cannot be considered to be valid if the system has reset subsequent to the\r | |
166 | /// status code being reported. Handles may be used to determine a wide variety of useful information\r | |
167 | /// about the source of the status code.\r | |
168 | ///\r | |
169 | typedef struct {\r | |
170 | ///\r | |
171 | /// The data header identifying the data. DataHeader.HeaderSize should be\r | |
172 | /// sizeof (EFI_STATUS_CODE_DATA), DataHeader.Size should be\r | |
173 | /// sizeof (EFI_DEVICE_HANDLE_EXTENDED_DATA) - HeaderSize, and\r | |
174 | /// DataHeader.Type should be EFI_STATUS_CODE_SPECIFIC_DATA_GUID.\r | |
175 | ///\r | |
176 | EFI_STATUS_CODE_DATA DataHeader;\r | |
177 | ///\r | |
178 | /// The device handle.\r | |
179 | ///\r | |
180 | EFI_HANDLE Handle;\r | |
181 | } EFI_DEVICE_HANDLE_EXTENDED_DATA;\r | |
182 | \r | |
183 | ///\r | |
184 | /// This structure defines extended data describing a PCI resource allocation error.\r | |
185 | ///\r | |
186 | /// @par Note: \r | |
187 | /// The following structure contains variable-length fields and cannot be defined as a C-style\r | |
188 | /// structure.\r | |
189 | ///\r | |
190 | /// This extended data conveys details for a PCI resource allocation failure error. See the PCI\r | |
191 | /// specification and the ACPI specification for details on PCI resource allocations and the format for\r | |
192 | /// resource descriptors. This error does not detail why the resource allocation failed. It may be due to a\r | |
193 | /// bad resource request or a lack of available resources to satisfy a valid request. The variable device\r | |
194 | /// path structure and the resource structures are included in this structure to make it self sufficient.\r | |
195 | ///\r | |
196 | typedef struct {\r | |
197 | ///\r | |
198 | /// The data header identifying the data. DataHeader.HeaderSize should be sizeof\r | |
199 | /// (EFI_STATUS_CODE_DATA), DataHeader.Size should be\r | |
200 | /// (DevicePathSize + DevicePathSize + DevicePathSize +\r | |
201 | /// sizeof(UINT32) + 3 * sizeof (UINT16) ), and DataHeader.Type\r | |
202 | /// should be EFI_STATUS_CODE_SPECIFIC_DATA_GUID.\r | |
203 | ///\r | |
204 | EFI_STATUS_CODE_DATA DataHeader;\r | |
205 | ///\r | |
206 | /// The PCI BAR. Applicable only for PCI devices. Ignored for all other devices.\r | |
207 | ///\r | |
208 | UINT32 Bar;\r | |
209 | ///\r | |
210 | /// DevicePathSize should be zero if it is a virtual device that is not associated with\r | |
211 | /// a device path. Otherwise, this parameter is the length of the variable-length\r | |
212 | /// DevicePath. \r | |
213 | ///\r | |
214 | UINT16 DevicePathSize;\r | |
215 | ///\r | |
216 | /// Represents the size the ReqRes parameter. ReqResSize should be zero if the\r | |
217 | /// requested resources are not provided as a part of extended data.\r | |
218 | ///\r | |
219 | UINT16 ReqResSize;\r | |
220 | ///\r | |
221 | /// Represents the size the AllocRes parameter. AllocResSize should be zero if the\r | |
222 | /// allocated resources are not provided as a part of extended data.\r | |
223 | ///\r | |
224 | UINT16 AllocResSize;\r | |
225 | ///\r | |
6ce55357 SQ |
226 | /// The device path to the controller or the hardware device that did not get the requested \r |
227 | /// resources. Note that this parameter is the variable-length device path structure and not \r | |
228 | /// a pointer to this structure. \r | |
b205f267 | 229 | ///\r |
6ce55357 | 230 | // EFI_DEVICE_PATH_PROTOCOL DevicePath;\r |
b205f267 | 231 | ///\r |
232 | /// The requested resources in the format of an ACPI 2.0 resource descriptor. This\r | |
233 | /// parameter is not a pointer; it is the complete resource descriptor.\r | |
234 | ///\r | |
6ce55357 | 235 |