Browse Source

[efi] Update to current EDK2 headers

Signed-off-by: Michael Brown <mcb30@ipxe.org>
tags/v1.20.1
Michael Brown 8 years ago
parent
commit
42e0c7e956
28 changed files with 12442 additions and 373 deletions
  1. 48
    1
      src/include/ipxe/efi/Base.h
  2. 10
    4
      src/include/ipxe/efi/Guid/SmBios.h
  3. 21
    1
      src/include/ipxe/efi/Ia32/ProcessorBind.h
  4. 547
    0
      src/include/ipxe/efi/IndustryStandard/Acpi20.h
  5. 731
    0
      src/include/ipxe/efi/IndustryStandard/Acpi30.h
  6. 1311
    0
      src/include/ipxe/efi/IndustryStandard/Acpi40.h
  7. 2121
    0
      src/include/ipxe/efi/IndustryStandard/Acpi50.h
  8. 2131
    0
      src/include/ipxe/efi/IndustryStandard/Acpi51.h
  9. 2335
    0
      src/include/ipxe/efi/IndustryStandard/Acpi60.h
  10. 49
    0
      src/include/ipxe/efi/IndustryStandard/Bluetooth.h
  11. 2
    1
      src/include/ipxe/efi/IndustryStandard/Pci22.h
  12. 1819
    0
      src/include/ipxe/efi/IndustryStandard/Tpm20.h
  13. 109
    1
      src/include/ipxe/efi/IndustryStandard/UefiTcgPlatform.h
  14. 27
    1
      src/include/ipxe/efi/IndustryStandard/Usb.h
  15. 428
    5
      src/include/ipxe/efi/Library/BaseLib.h
  16. 43
    19
      src/include/ipxe/efi/Pi/PiDxeCis.h
  17. 4
    4
      src/include/ipxe/efi/Pi/PiFirmwareFile.h
  18. 29
    2
      src/include/ipxe/efi/Pi/PiHob.h
  19. 15
    1
      src/include/ipxe/efi/Pi/PiMultiPhase.h
  20. 162
    11
      src/include/ipxe/efi/Protocol/DevicePath.h
  21. 2
    1
      src/include/ipxe/efi/Protocol/FormBrowser2.h
  22. 14
    3
      src/include/ipxe/efi/Protocol/SimpleTextOut.h
  23. 2
    8
      src/include/ipxe/efi/Protocol/TcgService.h
  24. 66
    3
      src/include/ipxe/efi/Protocol/Usb2HostController.h
  25. 12
    5
      src/include/ipxe/efi/Uefi/UefiInternalFormRepresentation.h
  26. 39
    1
      src/include/ipxe/efi/Uefi/UefiMultiPhase.h
  27. 342
    298
      src/include/ipxe/efi/Uefi/UefiSpec.h
  28. 23
    3
      src/include/ipxe/efi/X64/ProcessorBind.h

+ 48
- 1
src/include/ipxe/efi/Base.h View File

@@ -6,7 +6,7 @@
6 6
   environment. There are a set of base libraries in the Mde Package that can
7 7
   be used to implement base modules.
8 8
 
9
-Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.<BR>
9
+Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR>
10 10
 Portions copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>
11 11
 This program and the accompanying materials
12 12
 are licensed and made available under the terms and conditions of the BSD License
@@ -29,6 +29,12 @@ FILE_LICENCE ( BSD3 );
29 29
 //
30 30
 #include <ipxe/efi/ProcessorBind.h>
31 31
 
32
+#if defined(_MSC_EXTENSIONS)
33
+//
34
+// Disable warning when last field of data structure is a zero sized array.
35
+//
36
+#pragma warning ( disable : 4200 )
37
+#endif
32 38
 
33 39
 /**
34 40
   Verifies the storage size of a given data type.
@@ -1018,5 +1024,46 @@ typedef UINTN RETURN_STATUS;
1018 1024
 #define SIGNATURE_64(A, B, C, D, E, F, G, H) \
1019 1025
     (SIGNATURE_32 (A, B, C, D) | ((UINT64) (SIGNATURE_32 (E, F, G, H)) << 32))
1020 1026
 
1027
+#if defined(_MSC_EXTENSIONS) && !defined (MDE_CPU_EBC)
1028
+  #pragma intrinsic(_ReturnAddress)
1029
+  /**
1030
+    Get the return address of the calling funcation.
1031
+
1032
+    Based on intrinsic function _ReturnAddress that provides the address of
1033
+    the instruction in the calling function that will be executed after
1034
+    control returns to the caller.
1035
+
1036
+    @param L    Return Level.
1037
+
1038
+    @return The return address of the calling funcation or 0 if L != 0.
1039
+
1040
+  **/
1041
+  #define RETURN_ADDRESS(L)     ((L == 0) ? _ReturnAddress() : (VOID *) 0)
1042
+#elif defined(__GNUC__)
1043
+  void * __builtin_return_address (unsigned int level);
1044
+  /**
1045
+    Get the return address of the calling funcation.
1046
+
1047
+    Based on built-in Function __builtin_return_address that returns
1048
+    the return address of the current function, or of one of its callers.
1049
+
1050
+    @param L    Return Level.
1051
+
1052
+    @return The return address of the calling funcation.
1053
+
1054
+  **/
1055
+  #define RETURN_ADDRESS(L)     __builtin_return_address (L)
1056
+#else
1057
+  /**
1058
+    Get the return address of the calling funcation.
1059
+
1060
+    @param L    Return Level.
1061
+
1062
+    @return 0 as compilers don't support this feature.
1063
+
1064
+  **/
1065
+  #define RETURN_ADDRESS(L)     ((VOID *) 0)
1066
+#endif
1067
+
1021 1068
 #endif
1022 1069
 

+ 10
- 4
src/include/ipxe/efi/Guid/SmBios.h View File

@@ -1,11 +1,11 @@
1 1
 /** @file
2
-  GUIDs used to locate the SMBIOS tables in the UEFI 2.0 system table.
2
+  GUIDs used to locate the SMBIOS tables in the UEFI 2.5 system table.
3 3
 
4
-  This GUID in the system table is the only legal way to search for and
4
+  These GUIDs in the system table are the only legal ways to search for and
5 5
   locate the SMBIOS tables. Do not search the 0xF0000 segment to find SMBIOS
6 6
   tables.
7 7
 
8
-  Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR>
8
+  Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR>
9 9
   This program and the accompanying materials
10 10
   are licensed and made available under the terms and conditions of the BSD License
11 11
   which accompanies this distribution.  The full text of the license may be found at
@@ -15,7 +15,7 @@
15 15
   WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
16 16
 
17 17
   @par Revision Reference:
18
-  GUIDs defined in UEFI 2.0 spec.
18
+  GUIDs defined in UEFI 2.5 spec.
19 19
 
20 20
 **/
21 21
 
@@ -29,6 +29,12 @@ FILE_LICENCE ( BSD3 );
29 29
     0xeb9d2d31, 0x2d88, 0x11d3, {0x9a, 0x16, 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d } \
30 30
   }
31 31
 
32
+#define SMBIOS3_TABLE_GUID \
33
+  { \
34
+    0xf2fd1544, 0x9794, 0x4a2c, {0x99, 0x2e, 0xe5, 0xbb, 0xcf, 0x20, 0xe3, 0x94 } \
35
+  }
36
+
32 37
 extern EFI_GUID       gEfiSmbiosTableGuid;
38
+extern EFI_GUID       gEfiSmbios3TableGuid;
33 39
 
34 40
 #endif

+ 21
- 1
src/include/ipxe/efi/Ia32/ProcessorBind.h View File

@@ -1,7 +1,7 @@
1 1
 /** @file
2 2
   Processor or Compiler specific defines and types for IA-32 architecture.
3 3
 
4
-Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.<BR>
4
+Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR>
5 5
 This program and the accompanying materials are licensed and made available under
6 6
 the terms and conditions of the BSD License that accompanies this distribution.
7 7
 The full text of the license may be found at
@@ -95,6 +95,26 @@ FILE_LICENCE ( BSD3 );
95 95
 //
96 96
 #pragma warning ( disable : 4206 )
97 97
 
98
+#if _MSC_VER == 1800
99
+
100
+//
101
+// Disable these warnings for VS2013.
102
+//
103
+
104
+//
105
+// This warning is for potentially uninitialized local variable, and it may cause false
106
+// positive issues in VS2013 build
107
+//
108
+#pragma warning ( disable : 4701 )
109
+
110
+//
111
+// This warning is for potentially uninitialized local pointer variable, and it may cause
112
+// false positive issues in VS2013 build
113
+//
114
+#pragma warning ( disable : 4703 )
115
+
116
+#endif
117
+
98 118
 #endif
99 119
 
100 120
 

+ 547
- 0
src/include/ipxe/efi/IndustryStandard/Acpi20.h View File

@@ -0,0 +1,547 @@
1
+/** @file
2
+  ACPI 2.0 definitions from the ACPI Specification, revision 2.0
3
+
4
+  Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>
5
+  This program and the accompanying materials
6
+  are licensed and made available under the terms and conditions of the BSD License
7
+  which accompanies this distribution.  The full text of the license may be found at
8
+  http://opensource.org/licenses/bsd-license.php
9
+
10
+  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11
+  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
12
+**/
13
+
14
+#ifndef _ACPI_2_0_H_
15
+#define _ACPI_2_0_H_
16
+
17
+FILE_LICENCE ( BSD3 );
18
+
19
+#include <ipxe/efi/IndustryStandard/Acpi10.h>
20
+
21
+//
22
+// Define for Desriptor
23
+//
24
+#define ACPI_LARGE_GENERIC_REGISTER_DESCRIPTOR_NAME          0x02
25
+
26
+#define ACPI_GENERIC_REGISTER_DESCRIPTOR          0x82
27
+
28
+//
29
+// Ensure proper structure formats
30
+//
31
+#pragma pack(1)
32
+
33
+///
34
+/// Generic Register Descriptor
35
+///
36
+typedef PACKED struct {
37
+  ACPI_LARGE_RESOURCE_HEADER    Header;
38
+  UINT8                         AddressSpaceId;
39
+  UINT8                         RegisterBitWidth;
40
+  UINT8                         RegisterBitOffset;
41
+  UINT8                         AddressSize;
42
+  UINT64                        RegisterAddress;
43
+} EFI_ACPI_GENERIC_REGISTER_DESCRIPTOR;
44
+
45
+#pragma pack()
46
+
47
+//
48
+// Ensure proper structure formats
49
+//
50
+#pragma pack(1)
51
+
52
+///
53
+/// ACPI 2.0 Generic Address Space definition
54
+///
55
+typedef struct {
56
+  UINT8   AddressSpaceId;
57
+  UINT8   RegisterBitWidth;
58
+  UINT8   RegisterBitOffset;
59
+  UINT8   Reserved;
60
+  UINT64  Address;
61
+} EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE;
62
+
63
+//
64
+// Generic Address Space Address IDs
65
+//
66
+#define EFI_ACPI_2_0_SYSTEM_MEMORY              0
67
+#define EFI_ACPI_2_0_SYSTEM_IO                  1
68
+#define EFI_ACPI_2_0_PCI_CONFIGURATION_SPACE    2
69
+#define EFI_ACPI_2_0_EMBEDDED_CONTROLLER        3
70
+#define EFI_ACPI_2_0_SMBUS                      4
71
+#define EFI_ACPI_2_0_FUNCTIONAL_FIXED_HARDWARE  0x7F
72
+
73
+//
74
+// ACPI 2.0 table structures
75
+//
76
+
77
+///
78
+/// Root System Description Pointer Structure
79
+///
80
+typedef struct {
81
+  UINT64  Signature;
82
+  UINT8   Checksum;
83
+  UINT8   OemId[6];
84
+  UINT8   Revision;
85
+  UINT32  RsdtAddress;
86
+  UINT32  Length;
87
+  UINT64  XsdtAddress;
88
+  UINT8   ExtendedChecksum;
89
+  UINT8   Reserved[3];
90
+} EFI_ACPI_2_0_ROOT_SYSTEM_DESCRIPTION_POINTER;
91
+
92
+///
93
+/// RSD_PTR Revision (as defined in ACPI 2.0 spec.)
94
+///
95
+#define EFI_ACPI_2_0_ROOT_SYSTEM_DESCRIPTION_POINTER_REVISION 0x02
96
+
97
+///
98
+/// Common table header, this prefaces all ACPI tables, including FACS, but
99
+/// excluding the RSD PTR structure
100
+///
101
+typedef struct {
102
+  UINT32  Signature;
103
+  UINT32  Length;
104
+} EFI_ACPI_2_0_COMMON_HEADER;
105
+
106
+//
107
+// Root System Description Table
108
+// No definition needed as it is a common description table header, the same with
109
+// EFI_ACPI_DESCRIPTION_HEADER, followed by a variable number of UINT32 table pointers.
110
+//
111
+
112
+///
113
+/// RSDT Revision (as defined in ACPI 2.0 spec.)
114
+///
115
+#define EFI_ACPI_2_0_ROOT_SYSTEM_DESCRIPTION_TABLE_REVISION 0x01
116
+
117
+//
118
+// Extended System Description Table
119
+// No definition needed as it is a common description table header, the same with
120
+// EFI_ACPI_DESCRIPTION_HEADER, followed by a variable number of UINT64 table pointers.
121
+//
122
+
123
+///
124
+/// XSDT Revision (as defined in ACPI 2.0 spec.)
125
+///
126
+#define EFI_ACPI_2_0_EXTENDED_SYSTEM_DESCRIPTION_TABLE_REVISION 0x01
127
+
128
+///
129
+/// Fixed ACPI Description Table Structure (FADT)
130
+///
131
+typedef struct {
132
+  EFI_ACPI_DESCRIPTION_HEADER             Header;
133
+  UINT32                                  FirmwareCtrl;
134
+  UINT32                                  Dsdt;
135
+  UINT8                                   Reserved0;
136
+  UINT8                                   PreferredPmProfile;
137
+  UINT16                                  SciInt;
138
+  UINT32                                  SmiCmd;
139
+  UINT8                                   AcpiEnable;
140
+  UINT8                                   AcpiDisable;
141
+  UINT8                                   S4BiosReq;
142
+  UINT8                                   PstateCnt;
143
+  UINT32                                  Pm1aEvtBlk;
144
+  UINT32                                  Pm1bEvtBlk;
145
+  UINT32                                  Pm1aCntBlk;
146
+  UINT32                                  Pm1bCntBlk;
147
+  UINT32                                  Pm2CntBlk;
148
+  UINT32                                  PmTmrBlk;
149
+  UINT32                                  Gpe0Blk;
150
+  UINT32                                  Gpe1Blk;
151
+  UINT8                                   Pm1EvtLen;
152
+  UINT8                                   Pm1CntLen;
153
+  UINT8                                   Pm2CntLen;
154
+  UINT8                                   PmTmrLen;
155
+  UINT8                                   Gpe0BlkLen;
156
+  UINT8                                   Gpe1BlkLen;
157
+  UINT8                                   Gpe1Base;
158
+  UINT8                                   CstCnt;
159
+  UINT16                                  PLvl2Lat;
160
+  UINT16                                  PLvl3Lat;
161
+  UINT16                                  FlushSize;
162
+  UINT16                                  FlushStride;
163
+  UINT8                                   DutyOffset;
164
+  UINT8                                   DutyWidth;
165
+  UINT8                                   DayAlrm;
166
+  UINT8                                   MonAlrm;
167
+  UINT8                                   Century;
168
+  UINT16                                  IaPcBootArch;
169
+  UINT8                                   Reserved1;
170
+  UINT32                                  Flags;
171
+  EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE  ResetReg;
172
+  UINT8                                   ResetValue;
173
+  UINT8                                   Reserved2[3];
174
+  UINT64                                  XFirmwareCtrl;
175
+  UINT64                                  XDsdt;
176
+  EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE  XPm1aEvtBlk;
177
+  EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE  XPm1bEvtBlk;
178
+  EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE  XPm1aCntBlk;
179
+  EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE  XPm1bCntBlk;
180
+  EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE  XPm2CntBlk;
181
+  EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE  XPmTmrBlk;
182
+  EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE  XGpe0Blk;
183
+  EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE  XGpe1Blk;
184
+} EFI_ACPI_2_0_FIXED_ACPI_DESCRIPTION_TABLE;
185
+
186
+///
187
+/// FADT Version (as defined in ACPI 2.0 spec.)
188
+///
189
+#define EFI_ACPI_2_0_FIXED_ACPI_DESCRIPTION_TABLE_REVISION  0x03
190
+
191
+//
192
+// Fixed ACPI Description Table Preferred Power Management Profile
193
+//
194
+#define EFI_ACPI_2_0_PM_PROFILE_UNSPECIFIED         0
195
+#define EFI_ACPI_2_0_PM_PROFILE_DESKTOP             1
196
+#define EFI_ACPI_2_0_PM_PROFILE_MOBILE              2
197
+#define EFI_ACPI_2_0_PM_PROFILE_WORKSTATION         3
198
+#define EFI_ACPI_2_0_PM_PROFILE_ENTERPRISE_SERVER   4
199
+#define EFI_ACPI_2_0_PM_PROFILE_SOHO_SERVER         5
200
+#define EFI_ACPI_2_0_PM_PROFILE_APPLIANCE_PC        6
201
+
202
+//
203
+// Fixed ACPI Description Table Boot Architecture Flags
204
+// All other bits are reserved and must be set to 0.
205
+//
206
+#define EFI_ACPI_2_0_LEGACY_DEVICES          BIT0
207
+#define EFI_ACPI_2_0_8042                    BIT1
208
+
209
+//
210
+// Fixed ACPI Description Table Fixed Feature Flags
211
+// All other bits are reserved and must be set to 0.
212
+//
213
+#define EFI_ACPI_2_0_WBINVD                  BIT0
214
+#define EFI_ACPI_2_0_WBINVD_FLUSH            BIT1
215
+#define EFI_ACPI_2_0_PROC_C1                 BIT2
216
+#define EFI_ACPI_2_0_P_LVL2_UP               BIT3
217
+#define EFI_ACPI_2_0_PWR_BUTTON              BIT4
218
+#define EFI_ACPI_2_0_SLP_BUTTON              BIT5
219
+#define EFI_ACPI_2_0_FIX_RTC                 BIT6
220
+#define EFI_ACPI_2_0_RTC_S4                  BIT7
221
+#define EFI_ACPI_2_0_TMR_VAL_EXT             BIT8
222
+#define EFI_ACPI_2_0_DCK_CAP                 BIT9
223
+#define EFI_ACPI_2_0_RESET_REG_SUP           BIT10
224
+#define EFI_ACPI_2_0_SEALED_CASE             BIT11
225
+#define EFI_ACPI_2_0_HEADLESS                BIT12
226
+#define EFI_ACPI_2_0_CPU_SW_SLP              BIT13
227
+
228
+///
229
+/// Firmware ACPI Control Structure
230
+///
231
+typedef struct {
232
+  UINT32  Signature;
233
+  UINT32  Length;
234
+  UINT32  HardwareSignature;
235
+  UINT32  FirmwareWakingVector;
236
+  UINT32  GlobalLock;
237
+  UINT32  Flags;
238
+  UINT64  XFirmwareWakingVector;
239
+  UINT8   Version;
240
+  UINT8   Reserved[31];
241
+} EFI_ACPI_2_0_FIRMWARE_ACPI_CONTROL_STRUCTURE;
242
+
243
+///
244
+/// FACS Version (as defined in ACPI 2.0 spec.)
245
+///
246
+#define EFI_ACPI_2_0_FIRMWARE_ACPI_CONTROL_STRUCTURE_VERSION  0x01
247
+
248
+///
249
+/// Firmware Control Structure Feature Flags
250
+/// All other bits are reserved and must be set to 0.
251
+///
252
+#define EFI_ACPI_2_0_S4BIOS_F        BIT0
253
+
254
+///
255
+/// Multiple APIC Description Table header definition.  The rest of the table
256
+/// must be defined in a platform specific manner.
257
+///
258
+typedef struct {
259
+  EFI_ACPI_DESCRIPTION_HEADER Header;
260
+  UINT32                      LocalApicAddress;
261
+  UINT32                      Flags;
262
+} EFI_ACPI_2_0_MULTIPLE_APIC_DESCRIPTION_TABLE_HEADER;
263
+
264
+///
265
+/// MADT Revision (as defined in ACPI 2.0 spec.)
266
+///
267
+#define EFI_ACPI_2_0_MULTIPLE_APIC_DESCRIPTION_TABLE_REVISION 0x01
268
+
269
+///
270
+/// Multiple APIC Flags
271
+/// All other bits are reserved and must be set to 0.
272
+///
273
+#define EFI_ACPI_2_0_PCAT_COMPAT          BIT0
274
+
275
+//
276
+// Multiple APIC Description Table APIC structure types
277
+// All other values between 0x09 an 0xFF are reserved and
278
+// will be ignored by OSPM.
279
+//
280
+#define EFI_ACPI_2_0_PROCESSOR_LOCAL_APIC           0x00
281
+#define EFI_ACPI_2_0_IO_APIC                        0x01
282
+#define EFI_ACPI_2_0_INTERRUPT_SOURCE_OVERRIDE      0x02
283
+#define EFI_ACPI_2_0_NON_MASKABLE_INTERRUPT_SOURCE  0x03
284
+#define EFI_ACPI_2_0_LOCAL_APIC_NMI                 0x04
285
+#define EFI_ACPI_2_0_LOCAL_APIC_ADDRESS_OVERRIDE    0x05
286
+#define EFI_ACPI_2_0_IO_SAPIC                       0x06
287
+#define EFI_ACPI_2_0_PROCESSOR_LOCAL_SAPIC          0x07
288
+#define EFI_ACPI_2_0_PLATFORM_INTERRUPT_SOURCES     0x08
289
+
290
+//
291
+// APIC Structure Definitions
292
+//
293
+
294
+///
295
+/// Processor Local APIC Structure Definition
296
+///
297
+typedef struct {
298
+  UINT8   Type;
299
+  UINT8   Length;
300
+  UINT8   AcpiProcessorId;
301
+  UINT8   ApicId;
302
+  UINT32  Flags;
303
+} EFI_ACPI_2_0_PROCESSOR_LOCAL_APIC_STRUCTURE;
304
+
305
+///
306
+/// Local APIC Flags.  All other bits are reserved and must be 0.
307
+///
308
+#define EFI_ACPI_2_0_LOCAL_APIC_ENABLED         BIT0
309
+
310
+///
311
+/// IO APIC Structure
312
+///
313
+typedef struct {
314
+  UINT8   Type;
315
+  UINT8   Length;
316
+  UINT8   IoApicId;
317
+  UINT8   Reserved;
318
+  UINT32  IoApicAddress;
319
+  UINT32  GlobalSystemInterruptBase;
320
+} EFI_ACPI_2_0_IO_APIC_STRUCTURE;
321
+
322
+///
323
+/// Interrupt Source Override Structure
324
+///
325
+typedef struct {
326
+  UINT8   Type;
327
+  UINT8   Length;
328
+  UINT8   Bus;
329
+  UINT8   Source;
330
+  UINT32  GlobalSystemInterrupt;
331
+  UINT16  Flags;
332
+} EFI_ACPI_2_0_INTERRUPT_SOURCE_OVERRIDE_STRUCTURE;
333
+
334
+///
335
+/// Non-Maskable Interrupt Source Structure
336
+///
337
+typedef struct {
338
+  UINT8   Type;
339
+  UINT8   Length;
340
+  UINT16  Flags;
341
+  UINT32  GlobalSystemInterrupt;
342
+} EFI_ACPI_2_0_NON_MASKABLE_INTERRUPT_SOURCE_STRUCTURE;
343
+
344
+///
345
+/// Local APIC NMI Structure
346
+///
347
+typedef struct {
348
+  UINT8   Type;
349
+  UINT8   Length;
350
+  UINT8   AcpiProcessorId;
351
+  UINT16  Flags;
352
+  UINT8   LocalApicLint;
353
+} EFI_ACPI_2_0_LOCAL_APIC_NMI_STRUCTURE;
354
+
355
+///
356
+/// Local APIC Address Override Structure
357
+///
358
+typedef struct {
359
+  UINT8   Type;
360
+  UINT8   Length;
361
+  UINT16  Reserved;
362
+  UINT64  LocalApicAddress;
363
+} EFI_ACPI_2_0_LOCAL_APIC_ADDRESS_OVERRIDE_STRUCTURE;
364
+
365
+///
366
+/// IO SAPIC Structure
367
+///
368
+typedef struct {
369
+  UINT8   Type;
370
+  UINT8   Length;
371
+  UINT8   IoApicId;
372
+  UINT8   Reserved;
373
+  UINT32  GlobalSystemInterruptBase;
374
+  UINT64  IoSapicAddress;
375
+} EFI_ACPI_2_0_IO_SAPIC_STRUCTURE;
376
+
377
+///
378
+/// Local SAPIC Structure
379
+///
380
+typedef struct {
381
+  UINT8   Type;
382
+  UINT8   Length;
383
+  UINT8   AcpiProcessorId;
384
+  UINT8   LocalSapicId;
385
+  UINT8   LocalSapicEid;
386
+  UINT8   Reserved[3];
387
+  UINT32  Flags;
388
+} EFI_ACPI_2_0_PROCESSOR_LOCAL_SAPIC_STRUCTURE;
389
+
390
+///
391
+/// Platform Interrupt Sources Structure
392
+///
393
+typedef struct {
394
+  UINT8   Type;
395
+  UINT8   Length;
396
+  UINT16  Flags;
397
+  UINT8   InterruptType;
398
+  UINT8   ProcessorId;
399
+  UINT8   ProcessorEid;
400
+  UINT8   IoSapicVector;
401
+  UINT32  GlobalSystemInterrupt;
402
+  UINT32  Reserved;
403
+} EFI_ACPI_2_0_PLATFORM_INTERRUPT_SOURCES_STRUCTURE;
404
+
405
+///
406
+/// Smart Battery Description Table (SBST)
407
+///
408
+typedef struct {
409
+  EFI_ACPI_DESCRIPTION_HEADER Header;
410
+  UINT32                      WarningEnergyLevel;
411
+  UINT32                      LowEnergyLevel;
412
+  UINT32                      CriticalEnergyLevel;
413
+} EFI_ACPI_2_0_SMART_BATTERY_DESCRIPTION_TABLE;
414
+
415
+///
416
+/// SBST Version (as defined in ACPI 2.0 spec.)
417
+///
418
+#define EFI_ACPI_2_0_SMART_BATTERY_DESCRIPTION_TABLE_REVISION 0x01
419
+
420
+///
421
+/// Embedded Controller Boot Resources Table (ECDT)
422
+/// The table is followed by a null terminated ASCII string that contains
423
+/// a fully qualified reference to the name space object.
424
+///
425
+typedef struct {
426
+  EFI_ACPI_DESCRIPTION_HEADER             Header;
427
+  EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE  EcControl;
428
+  EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE  EcData;
429
+  UINT32                                  Uid;
430
+  UINT8                                   GpeBit;
431
+} EFI_ACPI_2_0_EMBEDDED_CONTROLLER_BOOT_RESOURCES_TABLE;
432
+
433
+///
434
+/// ECDT Version (as defined in ACPI 2.0 spec.)
435
+///
436
+#define EFI_ACPI_2_0_EMBEDDED_CONTROLLER_BOOT_RESOURCES_TABLE_REVISION  0x01
437
+
438
+//
439
+// Known table signatures
440
+//
441
+
442
+///
443
+/// "RSD PTR " Root System Description Pointer
444
+///
445
+#define EFI_ACPI_2_0_ROOT_SYSTEM_DESCRIPTION_POINTER_SIGNATURE  SIGNATURE_64('R', 'S', 'D', ' ', 'P', 'T', 'R', ' ')
446
+
447
+///
448
+/// "SPIC" Multiple SAPIC Description Table
449
+///
450
+/// BUGBUG: Don't know where this came from except SR870BN4 uses it.
451
+/// #define EFI_ACPI_2_0_MULTIPLE_SAPIC_DESCRIPTION_TABLE_SIGNATURE 0x43495053
452
+///
453
+#define EFI_ACPI_2_0_MULTIPLE_SAPIC_DESCRIPTION_TABLE_SIGNATURE  SIGNATURE_32('A', 'P', 'I', 'C')
454
+
455
+///
456
+/// "BOOT" MS Simple Boot Spec
457
+///
458
+#define EFI_ACPI_2_0_SIMPLE_BOOT_FLAG_TABLE_SIGNATURE  SIGNATURE_32('B', 'O', 'O', 'T')
459
+
460
+///
461
+/// "DBGP" MS Bebug Port Spec
462
+///
463
+#define EFI_ACPI_2_0_DEBUG_PORT_TABLE_SIGNATURE  SIGNATURE_32('D', 'B', 'G', 'P')
464
+
465
+///
466
+/// "DSDT" Differentiated System Description Table
467
+///
468
+#define EFI_ACPI_2_0_DIFFERENTIATED_SYSTEM_DESCRIPTION_TABLE_SIGNATURE  SIGNATURE_32('D', 'S', 'D', 'T')
469
+
470
+///
471
+/// "ECDT" Embedded Controller Boot Resources Table
472
+///
473
+#define EFI_ACPI_2_0_EMBEDDED_CONTROLLER_BOOT_RESOURCES_TABLE_SIGNATURE  SIGNATURE_32('E', 'C', 'D', 'T')
474
+
475
+///
476
+/// "ETDT" Event Timer Description Table
477
+///
478
+#define EFI_ACPI_2_0_EVENT_TIMER_DESCRIPTION_TABLE_SIGNATURE  SIGNATURE_32('E', 'T', 'D', 'T')
479
+
480
+///
481
+/// "FACS" Firmware ACPI Control Structure
482
+///
483
+#define EFI_ACPI_2_0_FIRMWARE_ACPI_CONTROL_STRUCTURE_SIGNATURE  SIGNATURE_32('F', 'A', 'C', 'S')
484
+
485
+///
486
+/// "FACP" Fixed ACPI Description Table
487
+///
488
+#define EFI_ACPI_2_0_FIXED_ACPI_DESCRIPTION_TABLE_SIGNATURE  SIGNATURE_32('F', 'A', 'C', 'P')
489
+
490
+///
491
+/// "APIC" Multiple APIC Description Table
492
+///
493
+#define EFI_ACPI_2_0_MULTIPLE_APIC_DESCRIPTION_TABLE_SIGNATURE  SIGNATURE_32('A', 'P', 'I', 'C')
494
+
495
+///
496
+/// "PSDT" Persistent System Description Table
497
+///
498
+#define EFI_ACPI_2_0_PERSISTENT_SYSTEM_DESCRIPTION_TABLE_SIGNATURE  SIGNATURE_32('P', 'S', 'D', 'T')
499
+
500
+///
501
+/// "RSDT" Root System Description Table
502
+///
503
+#define EFI_ACPI_2_0_ROOT_SYSTEM_DESCRIPTION_TABLE_SIGNATURE  SIGNATURE_32('R', 'S', 'D', 'T')
504
+
505
+///
506
+/// "SBST" Smart Battery Specification Table
507
+///
508
+#define EFI_ACPI_2_0_SMART_BATTERY_SPECIFICATION_TABLE_SIGNATURE  SIGNATURE_32('S', 'B', 'S', 'T')
509
+
510
+///
511
+/// "SLIT" System Locality Information Table
512
+///
513
+#define EFI_ACPI_2_0_SYSTEM_LOCALITY_INFORMATION_TABLE_SIGNATURE  SIGNATURE_32('S', 'L', 'I', 'T')
514
+
515
+///
516
+/// "SPCR" Serial Port Concole Redirection Table
517
+///
518
+#define EFI_ACPI_2_0_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_SIGNATURE  SIGNATURE_32('S', 'P', 'C', 'R')
519
+
520
+///
521
+/// "SRAT" Static Resource Affinity Table
522
+///
523
+#define EFI_ACPI_2_0_STATIC_RESOURCE_AFFINITY_TABLE_SIGNATURE  SIGNATURE_32('S', 'R', 'A', 'T')
524
+
525
+///
526
+/// "SSDT" Secondary System Description Table
527
+///
528
+#define EFI_ACPI_2_0_SECONDARY_SYSTEM_DESCRIPTION_TABLE_SIGNATURE  SIGNATURE_32('S', 'S', 'D', 'T')
529
+
530
+///
531
+/// "SPMI" Server Platform Management Interface Table
532
+///
533
+#define EFI_ACPI_2_0_SERVER_PLATFORM_MANAGEMENT_INTERFACE_SIGNATURE  SIGNATURE_32('S', 'P', 'M', 'I')
534
+
535
+///
536
+/// "XSDT" Extended System Description Table
537
+///
538
+#define EFI_ACPI_2_0_EXTENDED_SYSTEM_DESCRIPTION_TABLE_SIGNATURE  SIGNATURE_32('X', 'S', 'D', 'T')
539
+
540
+///
541
+/// "MCFG" PCI Express Memory Mapped Configuration Space Base Address Description Table
542
+///
543
+#define EFI_ACPI_2_0_MEMORY_MAPPED_CONFIGURATION_BASE_ADDRESS_TABLE_SIGNATURE  SIGNATURE_32('M', 'C', 'F', 'G')
544
+
545
+#pragma pack()
546
+
547
+#endif

+ 731
- 0
src/include/ipxe/efi/IndustryStandard/Acpi30.h View File

@@ -0,0 +1,731 @@
1
+/** @file
2
+  ACPI 3.0 definitions from the ACPI Specification Revision 3.0b October 10, 2006
3
+
4
+  Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>
5
+  This program and the accompanying materials
6
+  are licensed and made available under the terms and conditions of the BSD License
7
+  which accompanies this distribution.  The full text of the license may be found at
8
+  http://opensource.org/licenses/bsd-license.php
9
+
10
+  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11
+  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
12
+**/
13
+
14
+#ifndef _ACPI_3_0_H_
15
+#define _ACPI_3_0_H_
16
+
17
+FILE_LICENCE ( BSD3 );
18
+
19
+#include <ipxe/efi/IndustryStandard/Acpi20.h>
20
+
21
+//
22
+// Define for Desriptor
23
+//
24
+#define ACPI_LARGE_EXTENDED_ADDRESS_SPACE_DESCRIPTOR_NAME    0x0B
25
+
26
+#define ACPI_EXTENDED_ADDRESS_SPACE_DESCRIPTOR    0x8B
27
+
28
+//
29
+// Ensure proper structure formats
30
+//
31
+#pragma pack(1)
32
+
33
+///
34
+/// Extended Address Space Descriptor
35
+///
36
+typedef PACKED struct {
37
+  ACPI_LARGE_RESOURCE_HEADER    Header;
38
+  UINT8                         ResType;
39
+  UINT8                         GenFlag;
40
+  UINT8                         SpecificFlag;
41
+  UINT8                         RevisionId;
42
+  UINT8                         Reserved;
43
+  UINT64                        AddrSpaceGranularity;
44
+  UINT64                        AddrRangeMin;
45
+  UINT64                        AddrRangeMax;
46
+  UINT64                        AddrTranslationOffset;
47
+  UINT64                        AddrLen;
48
+  UINT64                        TypeSpecificAttribute;
49
+} EFI_ACPI_EXTENDED_ADDRESS_SPACE_DESCRIPTOR;
50
+
51
+#pragma pack()
52
+
53
+//
54
+// Memory Type Specific Flags
55
+//
56
+#define EFI_ACPI_MEMORY_TYPE_SPECIFIC_ATTRIBUTES_UC  0x0000000000000001
57
+#define EFI_ACPI_MEMORY_TYPE_SPECIFIC_ATTRIBUTES_WC  0x0000000000000002
58
+#define EFI_ACPI_MEMORY_TYPE_SPECIFIC_ATTRIBUTES_WT  0x0000000000000004
59
+#define EFI_ACPI_MEMORY_TYPE_SPECIFIC_ATTRIBUTES_WB  0x0000000000000008
60
+#define EFI_ACPI_MEMORY_TYPE_SPECIFIC_ATTRIBUTES_UCE 0x0000000000000010
61
+#define EFI_ACPI_MEMORY_TYPE_SPECIFIC_ATTRIBUTES_NV  0x0000000000008000
62
+
63
+//
64
+// Ensure proper structure formats
65
+//
66
+#pragma pack(1)
67
+
68
+///
69
+/// ACPI 3.0 Generic Address Space definition
70
+///
71
+typedef struct {
72
+  UINT8   AddressSpaceId;
73
+  UINT8   RegisterBitWidth;
74
+  UINT8   RegisterBitOffset;
75
+  UINT8   AccessSize;
76
+  UINT64  Address;
77
+} EFI_ACPI_3_0_GENERIC_ADDRESS_STRUCTURE;
78
+
79
+//
80
+// Generic Address Space Address IDs
81
+//
82
+#define EFI_ACPI_3_0_SYSTEM_MEMORY              0
83
+#define EFI_ACPI_3_0_SYSTEM_IO                  1
84
+#define EFI_ACPI_3_0_PCI_CONFIGURATION_SPACE    2
85
+#define EFI_ACPI_3_0_EMBEDDED_CONTROLLER        3
86
+#define EFI_ACPI_3_0_SMBUS                      4
87
+#define EFI_ACPI_3_0_FUNCTIONAL_FIXED_HARDWARE  0x7F
88
+
89
+//
90
+// Generic Address Space Access Sizes
91
+//
92
+#define EFI_ACPI_3_0_UNDEFINED  0
93
+#define EFI_ACPI_3_0_BYTE       1
94
+#define EFI_ACPI_3_0_WORD       2
95
+#define EFI_ACPI_3_0_DWORD      3
96
+#define EFI_ACPI_3_0_QWORD      4
97
+
98
+//
99
+// ACPI 3.0 table structures
100
+//
101
+
102
+///
103
+/// Root System Description Pointer Structure
104
+///
105
+typedef struct {
106
+  UINT64  Signature;
107
+  UINT8   Checksum;
108
+  UINT8   OemId[6];
109
+  UINT8   Revision;
110
+  UINT32  RsdtAddress;
111
+  UINT32  Length;
112
+  UINT64  XsdtAddress;
113
+  UINT8   ExtendedChecksum;
114
+  UINT8   Reserved[3];
115
+} EFI_ACPI_3_0_ROOT_SYSTEM_DESCRIPTION_POINTER;
116
+
117
+///
118
+/// RSD_PTR Revision (as defined in ACPI 3.0b spec.)
119
+///
120
+#define EFI_ACPI_3_0_ROOT_SYSTEM_DESCRIPTION_POINTER_REVISION 0x02  ///< ACPISpec (Revision 3.0b) says current value is 2
121
+
122
+///
123
+/// Common table header, this prefaces all ACPI tables, including FACS, but
124
+/// excluding the RSD PTR structure
125
+///
126
+typedef struct {
127
+  UINT32  Signature;
128
+  UINT32  Length;
129
+} EFI_ACPI_3_0_COMMON_HEADER;
130
+
131
+//
132
+// Root System Description Table
133
+// No definition needed as it is a common description table header, the same with
134
+// EFI_ACPI_DESCRIPTION_HEADER, followed by a variable number of UINT32 table pointers.
135
+//
136
+
137
+///
138
+/// RSDT Revision (as defined in ACPI 3.0 spec.)
139
+///
140
+#define EFI_ACPI_3_0_ROOT_SYSTEM_DESCRIPTION_TABLE_REVISION 0x01
141
+
142
+//
143
+// Extended System Description Table
144
+// No definition needed as it is a common description table header, the same with
145
+// EFI_ACPI_DESCRIPTION_HEADER, followed by a variable number of UINT64 table pointers.
146
+//
147
+
148
+///
149
+/// XSDT Revision (as defined in ACPI 3.0 spec.)
150
+///
151
+#define EFI_ACPI_3_0_EXTENDED_SYSTEM_DESCRIPTION_TABLE_REVISION 0x01
152
+
153
+///
154
+/// Fixed ACPI Description Table Structure (FADT)
155
+///
156
+typedef struct {
157
+  EFI_ACPI_DESCRIPTION_HEADER             Header;
158
+  UINT32                                  FirmwareCtrl;
159
+  UINT32                                  Dsdt;
160
+  UINT8                                   Reserved0;
161
+  UINT8                                   PreferredPmProfile;
162
+  UINT16                                  SciInt;
163
+  UINT32                                  SmiCmd;
164
+  UINT8                                   AcpiEnable;
165
+  UINT8                                   AcpiDisable;
166
+  UINT8                                   S4BiosReq;
167
+  UINT8                                   PstateCnt;
168
+  UINT32                                  Pm1aEvtBlk;
169
+  UINT32                                  Pm1bEvtBlk;
170
+  UINT32                                  Pm1aCntBlk;
171
+  UINT32                                  Pm1bCntBlk;
172
+  UINT32                                  Pm2CntBlk;
173
+  UINT32                                  PmTmrBlk;
174
+  UINT32                                  Gpe0Blk;
175
+  UINT32                                  Gpe1Blk;
176
+  UINT8                                   Pm1EvtLen;
177
+  UINT8                                   Pm1CntLen;
178
+  UINT8                                   Pm2CntLen;
179
+  UINT8                                   PmTmrLen;
180
+  UINT8                                   Gpe0BlkLen;
181
+  UINT8                                   Gpe1BlkLen;
182
+  UINT8                                   Gpe1Base;
183
+  UINT8                                   CstCnt;
184
+  UINT16                                  PLvl2Lat;
185
+  UINT16                                  PLvl3Lat;
186
+  UINT16                                  FlushSize;
187
+  UINT16                                  FlushStride;
188
+  UINT8                                   DutyOffset;
189
+  UINT8                                   DutyWidth;
190
+  UINT8                                   DayAlrm;
191
+  UINT8                                   MonAlrm;
192
+  UINT8                                   Century;
193
+  UINT16                                  IaPcBootArch;
194
+  UINT8                                   Reserved1;
195
+  UINT32                                  Flags;
196
+  EFI_ACPI_3_0_GENERIC_ADDRESS_STRUCTURE  ResetReg;
197
+  UINT8                                   ResetValue;
198
+  UINT8                                   Reserved2[3];
199
+  UINT64                                  XFirmwareCtrl;
200
+  UINT64                                  XDsdt;
201
+  EFI_ACPI_3_0_GENERIC_ADDRESS_STRUCTURE  XPm1aEvtBlk;
202
+  EFI_ACPI_3_0_GENERIC_ADDRESS_STRUCTURE  XPm1bEvtBlk;
203
+  EFI_ACPI_3_0_GENERIC_ADDRESS_STRUCTURE  XPm1aCntBlk;
204
+  EFI_ACPI_3_0_GENERIC_ADDRESS_STRUCTURE  XPm1bCntBlk;
205
+  EFI_ACPI_3_0_GENERIC_ADDRESS_STRUCTURE  XPm2CntBlk;
206
+  EFI_ACPI_3_0_GENERIC_ADDRESS_STRUCTURE  XPmTmrBlk;
207
+  EFI_ACPI_3_0_GENERIC_ADDRESS_STRUCTURE  XGpe0Blk;
208
+  EFI_ACPI_3_0_GENERIC_ADDRESS_STRUCTURE  XGpe1Blk;
209
+} EFI_ACPI_3_0_FIXED_ACPI_DESCRIPTION_TABLE;
210
+
211
+///
212
+/// FADT Version (as defined in ACPI 3.0 spec.)
213
+///
214
+#define EFI_ACPI_3_0_FIXED_ACPI_DESCRIPTION_TABLE_REVISION  0x04
215
+
216
+//
217
+// Fixed ACPI Description Table Preferred Power Management Profile
218
+//
219
+#define EFI_ACPI_3_0_PM_PROFILE_UNSPECIFIED         0
220
+#define EFI_ACPI_3_0_PM_PROFILE_DESKTOP             1
221
+#define EFI_ACPI_3_0_PM_PROFILE_MOBILE              2
222
+#define EFI_ACPI_3_0_PM_PROFILE_WORKSTATION         3
223
+#define EFI_ACPI_3_0_PM_PROFILE_ENTERPRISE_SERVER   4
224
+#define EFI_ACPI_3_0_PM_PROFILE_SOHO_SERVER         5
225
+#define EFI_ACPI_3_0_PM_PROFILE_APPLIANCE_PC        6
226
+#define EFI_ACPI_3_0_PM_PROFILE_PERFORMANCE_SERVER  7
227
+
228
+//
229
+// Fixed ACPI Description Table Boot Architecture Flags
230
+// All other bits are reserved and must be set to 0.
231
+//
232
+#define EFI_ACPI_3_0_LEGACY_DEVICES              BIT0
233
+#define EFI_ACPI_3_0_8042                        BIT1
234
+#define EFI_ACPI_3_0_VGA_NOT_PRESENT             BIT2
235
+#define EFI_ACPI_3_0_MSI_NOT_SUPPORTED           BIT3
236
+#define EFI_ACPI_3_0_PCIE_ASPM_CONTROLS          BIT4
237
+
238
+//
239
+// Fixed ACPI Description Table Fixed Feature Flags
240
+// All other bits are reserved and must be set to 0.
241
+//
242
+#define EFI_ACPI_3_0_WBINVD                                 BIT0
243
+#define EFI_ACPI_3_0_WBINVD_FLUSH                           BIT1
244
+#define EFI_ACPI_3_0_PROC_C1                                BIT2
245
+#define EFI_ACPI_3_0_P_LVL2_UP                              BIT3
246
+#define EFI_ACPI_3_0_PWR_BUTTON                             BIT4
247
+#define EFI_ACPI_3_0_SLP_BUTTON                             BIT5
248
+#define EFI_ACPI_3_0_FIX_RTC                                BIT6
249
+#define EFI_ACPI_3_0_RTC_S4                                 BIT7
250
+#define EFI_ACPI_3_0_TMR_VAL_EXT                            BIT8
251
+#define EFI_ACPI_3_0_DCK_CAP                                BIT9
252
+#define EFI_ACPI_3_0_RESET_REG_SUP                          BIT10
253
+#define EFI_ACPI_3_0_SEALED_CASE                            BIT11
254
+#define EFI_ACPI_3_0_HEADLESS                               BIT12
255
+#define EFI_ACPI_3_0_CPU_SW_SLP                             BIT13
256
+#define EFI_ACPI_3_0_PCI_EXP_WAK                            BIT14
257
+#define EFI_ACPI_3_0_USE_PLATFORM_CLOCK                     BIT15
258
+#define EFI_ACPI_3_0_S4_RTC_STS_VALID                       BIT16
259
+#define EFI_ACPI_3_0_REMOTE_POWER_ON_CAPABLE                BIT17
260
+#define EFI_ACPI_3_0_FORCE_APIC_CLUSTER_MODEL               BIT18
261
+#define EFI_ACPI_3_0_FORCE_APIC_PHYSICAL_DESTINATION_MODE   BIT19
262
+
263
+///
264
+/// Firmware ACPI Control Structure
265
+///
266
+typedef struct {
267
+  UINT32  Signature;
268
+  UINT32  Length;
269
+  UINT32  HardwareSignature;
270
+  UINT32  FirmwareWakingVector;
271
+  UINT32  GlobalLock;
272
+  UINT32  Flags;
273
+  UINT64  XFirmwareWakingVector;
274
+  UINT8   Version;
275
+  UINT8   Reserved[31];
276
+} EFI_ACPI_3_0_FIRMWARE_ACPI_CONTROL_STRUCTURE;
277
+
278
+///
279
+/// FACS Version (as defined in ACPI 3.0 spec.)
280
+///
281
+#define EFI_ACPI_3_0_FIRMWARE_ACPI_CONTROL_STRUCTURE_VERSION  0x01
282
+
283
+///
284
+/// Firmware Control Structure Feature Flags
285
+/// All other bits are reserved and must be set to 0.
286
+///
287
+#define EFI_ACPI_3_0_S4BIOS_F       BIT0
288
+
289
+//
290
+// Differentiated System Description Table,
291
+// Secondary System Description Table
292
+// and Persistent System Description Table,
293
+// no definition needed as they are common description table header, the same with
294
+// EFI_ACPI_DESCRIPTION_HEADER, followed by a definition block.
295
+//
296
+#define EFI_ACPI_3_0_DIFFERENTIATED_SYSTEM_DESCRIPTION_TABLE_REVISION   0x02
297
+#define EFI_ACPI_3_0_SECONDARY_SYSTEM_DESCRIPTION_TABLE_REVISION        0x02
298
+
299
+///
300
+/// Multiple APIC Description Table header definition.  The rest of the table
301
+/// must be defined in a platform specific manner.
302
+///
303
+typedef struct {
304
+  EFI_ACPI_DESCRIPTION_HEADER Header;
305
+  UINT32                      LocalApicAddress;
306
+  UINT32                      Flags;
307
+} EFI_ACPI_3_0_MULTIPLE_APIC_DESCRIPTION_TABLE_HEADER;
308
+
309
+///
310
+/// MADT Revision (as defined in ACPI 3.0 spec.)
311
+///
312
+#define EFI_ACPI_3_0_MULTIPLE_APIC_DESCRIPTION_TABLE_REVISION 0x02
313
+
314
+///
315
+/// Multiple APIC Flags
316
+/// All other bits are reserved and must be set to 0.
317
+///
318
+#define EFI_ACPI_3_0_PCAT_COMPAT         BIT0
319
+
320
+//
321
+// Multiple APIC Description Table APIC structure types
322
+// All other values between 0x09 an 0xFF are reserved and
323
+// will be ignored by OSPM.
324
+//
325
+#define EFI_ACPI_3_0_PROCESSOR_LOCAL_APIC           0x00
326
+#define EFI_ACPI_3_0_IO_APIC                        0x01
327
+#define EFI_ACPI_3_0_INTERRUPT_SOURCE_OVERRIDE      0x02
328
+#define EFI_ACPI_3_0_NON_MASKABLE_INTERRUPT_SOURCE  0x03
329
+#define EFI_ACPI_3_0_LOCAL_APIC_NMI                 0x04
330
+#define EFI_ACPI_3_0_LOCAL_APIC_ADDRESS_OVERRIDE    0x05
331
+#define EFI_ACPI_3_0_IO_SAPIC                       0x06
332
+#define EFI_ACPI_3_0_LOCAL_SAPIC                    0x07
333
+#define EFI_ACPI_3_0_PLATFORM_INTERRUPT_SOURCES     0x08
334
+
335
+//
336
+// APIC Structure Definitions
337
+//
338
+
339
+///
340
+/// Processor Local APIC Structure Definition
341
+///
342
+typedef struct {
343
+  UINT8   Type;
344
+  UINT8   Length;
345
+  UINT8   AcpiProcessorId;
346
+  UINT8   ApicId;
347
+  UINT32  Flags;
348
+} EFI_ACPI_3_0_PROCESSOR_LOCAL_APIC_STRUCTURE;
349
+
350
+///
351
+/// Local APIC Flags.  All other bits are reserved and must be 0.
352
+///
353
+#define EFI_ACPI_3_0_LOCAL_APIC_ENABLED        BIT0
354
+
355
+///
356
+/// IO APIC Structure
357
+///
358
+typedef struct {
359
+  UINT8   Type;
360
+  UINT8   Length;
361
+  UINT8   IoApicId;
362
+  UINT8   Reserved;
363
+  UINT32  IoApicAddress;
364
+  UINT32  GlobalSystemInterruptBase;
365
+} EFI_ACPI_3_0_IO_APIC_STRUCTURE;
366
+
367
+///
368
+/// Interrupt Source Override Structure
369
+///
370
+typedef struct {
371
+  UINT8   Type;
372
+  UINT8   Length;
373
+  UINT8   Bus;
374
+  UINT8   Source;
375
+  UINT32  GlobalSystemInterrupt;
376
+  UINT16  Flags;
377
+} EFI_ACPI_3_0_INTERRUPT_SOURCE_OVERRIDE_STRUCTURE;
378
+
379
+///
380
+/// Platform Interrupt Sources Structure Definition
381
+///
382
+typedef struct {
383
+  UINT8   Type;
384
+  UINT8   Length;
385
+  UINT16  Flags;
386
+  UINT8   InterruptType;
387
+  UINT8   ProcessorId;
388
+  UINT8   ProcessorEid;
389
+  UINT8   IoSapicVector;
390
+  UINT32  GlobalSystemInterrupt;
391
+  UINT32  PlatformInterruptSourceFlags;
392
+  UINT8   CpeiProcessorOverride;
393
+  UINT8   Reserved[31];
394
+} EFI_ACPI_3_0_PLATFORM_INTERRUPT_APIC_STRUCTURE;
395
+
396
+//
397
+// MPS INTI flags.
398
+// All other bits are reserved and must be set to 0.
399
+//
400
+#define EFI_ACPI_3_0_POLARITY      (3 << 0)
401
+#define EFI_ACPI_3_0_TRIGGER_MODE  (3 << 2)
402
+
403
+///
404
+/// Non-Maskable Interrupt Source Structure
405
+///
406
+typedef struct {
407
+  UINT8   Type;
408
+  UINT8   Length;
409
+  UINT16  Flags;
410
+  UINT32  GlobalSystemInterrupt;
411
+} EFI_ACPI_3_0_NON_MASKABLE_INTERRUPT_SOURCE_STRUCTURE;
412
+
413
+///
414
+/// Local APIC NMI Structure
415
+///
416
+typedef struct {
417
+  UINT8   Type;
418
+  UINT8   Length;
419
+  UINT8   AcpiProcessorId;
420
+  UINT16  Flags;
421
+  UINT8   LocalApicLint;
422
+} EFI_ACPI_3_0_LOCAL_APIC_NMI_STRUCTURE;
423
+
424
+///
425
+/// Local APIC Address Override Structure
426
+///
427
+typedef struct {
428
+  UINT8   Type;
429
+  UINT8   Length;
430
+  UINT16  Reserved;
431
+  UINT64  LocalApicAddress;
432
+} EFI_ACPI_3_0_LOCAL_APIC_ADDRESS_OVERRIDE_STRUCTURE;
433
+
434
+///
435
+/// IO SAPIC Structure
436
+///
437
+typedef struct {
438
+  UINT8   Type;
439
+  UINT8   Length;
440
+  UINT8   IoApicId;
441
+  UINT8   Reserved;
442
+  UINT32  GlobalSystemInterruptBase;
443
+  UINT64  IoSapicAddress;
444
+} EFI_ACPI_3_0_IO_SAPIC_STRUCTURE;
445
+
446
+///
447
+/// Local SAPIC Structure
448
+/// This struct followed by a null-terminated ASCII string - ACPI Processor UID String
449
+///
450
+typedef struct {
451
+  UINT8   Type;
452
+  UINT8   Length;
453
+  UINT8   AcpiProcessorId;
454
+  UINT8   LocalSapicId;
455
+  UINT8   LocalSapicEid;
456
+  UINT8   Reserved[3];
457
+  UINT32  Flags;
458
+  UINT32  ACPIProcessorUIDValue;
459
+} EFI_ACPI_3_0_PROCESSOR_LOCAL_SAPIC_STRUCTURE;
460
+
461
+///
462
+/// Platform Interrupt Sources Structure
463
+///
464
+typedef struct {
465
+  UINT8   Type;
466
+  UINT8   Length;
467
+  UINT16  Flags;
468
+  UINT8   InterruptType;
469
+  UINT8   ProcessorId;
470
+  UINT8   ProcessorEid;
471
+  UINT8   IoSapicVector;
472
+  UINT32  GlobalSystemInterrupt;
473
+  UINT32  PlatformInterruptSourceFlags;
474
+} EFI_ACPI_3_0_PLATFORM_INTERRUPT_SOURCES_STRUCTURE;
475
+
476
+///
477
+/// Platform Interrupt Source Flags.
478
+/// All other bits are reserved and must be set to 0.
479
+///
480
+#define EFI_ACPI_3_0_CPEI_PROCESSOR_OVERRIDE          BIT0
481
+
482
+///
483
+/// Smart Battery Description Table (SBST)
484
+///
485
+typedef struct {
486
+  EFI_ACPI_DESCRIPTION_HEADER Header;
487
+  UINT32                      WarningEnergyLevel;
488
+  UINT32                      LowEnergyLevel;
489
+  UINT32                      CriticalEnergyLevel;
490
+} EFI_ACPI_3_0_SMART_BATTERY_DESCRIPTION_TABLE;
491
+
492
+///
493
+/// SBST Version (as defined in ACPI 3.0 spec.)
494
+///
495
+#define EFI_ACPI_3_0_SMART_BATTERY_DESCRIPTION_TABLE_REVISION 0x01
496
+
497
+///
498
+/// Embedded Controller Boot Resources Table (ECDT)
499
+/// The table is followed by a null terminated ASCII string that contains
500
+/// a fully qualified reference to the name space object.
501
+///
502
+typedef struct {
503
+  EFI_ACPI_DESCRIPTION_HEADER             Header;
504
+  EFI_ACPI_3_0_GENERIC_ADDRESS_STRUCTURE  EcControl;
505
+  EFI_ACPI_3_0_GENERIC_ADDRESS_STRUCTURE  EcData;
506
+  UINT32                                  Uid;
507
+  UINT8                                   GpeBit;
508
+} EFI_ACPI_3_0_EMBEDDED_CONTROLLER_BOOT_RESOURCES_TABLE;
509
+
510
+///
511
+/// ECDT Version (as defined in ACPI 3.0 spec.)
512
+///
513
+#define EFI_ACPI_3_0_EMBEDDED_CONTROLLER_BOOT_RESOURCES_TABLE_REVISION  0x01
514
+
515
+///
516
+/// System Resource Affinity Table (SRAT.  The rest of the table
517
+/// must be defined in a platform specific manner.
518
+///
519
+typedef struct {
520
+  EFI_ACPI_DESCRIPTION_HEADER Header;
521
+  UINT32                      Reserved1;  ///< Must be set to 1
522
+  UINT64                      Reserved2;
523
+} EFI_ACPI_3_0_SYSTEM_RESOURCE_AFFINITY_TABLE_HEADER;
524
+
525
+///
526
+/// SRAT Version (as defined in ACPI 3.0 spec.)
527
+///
528
+#define EFI_ACPI_3_0_SYSTEM_RESOURCE_AFFINITY_TABLE_REVISION  0x02
529
+
530
+//
531
+// SRAT structure types.
532
+// All other values between 0x02 an 0xFF are reserved and
533
+// will be ignored by OSPM.
534
+//
535
+#define EFI_ACPI_3_0_PROCESSOR_LOCAL_APIC_SAPIC_AFFINITY  0x00
536
+#define EFI_ACPI_3_0_MEMORY_AFFINITY                      0x01
537
+
538
+///
539
+/// Processor Local APIC/SAPIC Affinity Structure Definition
540
+///
541
+typedef struct {
542
+  UINT8   Type;
543
+  UINT8   Length;
544
+  UINT8   ProximityDomain7To0;
545
+  UINT8   ApicId;
546
+  UINT32  Flags;
547
+  UINT8   LocalSapicEid;
548
+  UINT8   ProximityDomain31To8[3];
549
+  UINT8   Reserved[4];
550
+} EFI_ACPI_3_0_PROCESSOR_LOCAL_APIC_SAPIC_AFFINITY_STRUCTURE;
551
+
552
+///
553
+/// Local APIC/SAPIC Flags.  All other bits are reserved and must be 0.
554
+///
555
+#define EFI_ACPI_3_0_PROCESSOR_LOCAL_APIC_SAPIC_ENABLED (1 << 0)
556
+
557
+///
558
+/// Memory Affinity Structure Definition
559
+///
560
+typedef struct {
561
+  UINT8   Type;
562
+  UINT8   Length;
563
+  UINT32  ProximityDomain;
564
+  UINT16  Reserved1;
565
+  UINT32  AddressBaseLow;
566
+  UINT32  AddressBaseHigh;
567
+  UINT32  LengthLow;
568
+  UINT32  LengthHigh;
569
+  UINT32  Reserved2;
570
+  UINT32  Flags;
571
+  UINT64  Reserved3;
572
+} EFI_ACPI_3_0_MEMORY_AFFINITY_STRUCTURE;
573
+
574
+//
575
+// Memory Flags.  All other bits are reserved and must be 0.
576
+//
577
+#define EFI_ACPI_3_0_MEMORY_ENABLED       (1 << 0)
578
+#define EFI_ACPI_3_0_MEMORY_HOT_PLUGGABLE (1 << 1)
579
+#define EFI_ACPI_3_0_MEMORY_NONVOLATILE   (1 << 2)
580
+
581
+///
582
+/// System Locality Distance Information Table (SLIT).
583
+/// The rest of the table is a matrix.
584
+///
585
+typedef struct {
586
+  EFI_ACPI_DESCRIPTION_HEADER Header;
587
+  UINT64                      NumberOfSystemLocalities;
588
+} EFI_ACPI_3_0_SYSTEM_LOCALITY_DISTANCE_INFORMATION_TABLE_HEADER;
589
+
590
+///
591
+/// SLIT Version (as defined in ACPI 3.0 spec.)
592
+///
593
+#define EFI_ACPI_3_0_SYSTEM_LOCALITY_DISTANCE_INFORMATION_TABLE_REVISION  0x01
594
+
595
+//
596
+// Known table signatures
597
+//
598
+
599
+///
600
+/// "RSD PTR " Root System Description Pointer
601
+///
602
+#define EFI_ACPI_3_0_ROOT_SYSTEM_DESCRIPTION_POINTER_SIGNATURE  SIGNATURE_64('R', 'S', 'D', ' ', 'P', 'T', 'R', ' ')
603
+
604
+///
605
+/// "APIC" Multiple APIC Description Table
606
+///
607
+#define EFI_ACPI_3_0_MULTIPLE_APIC_DESCRIPTION_TABLE_SIGNATURE  SIGNATURE_32('A', 'P', 'I', 'C')
608
+
609
+///
610
+/// "DSDT" Differentiated System Description Table
611
+///
612
+#define EFI_ACPI_3_0_DIFFERENTIATED_SYSTEM_DESCRIPTION_TABLE_SIGNATURE  SIGNATURE_32('D', 'S', 'D', 'T')
613
+
614
+///
615
+/// "ECDT" Embedded Controller Boot Resources Table
616
+///
617
+#define EFI_ACPI_3_0_EMBEDDED_CONTROLLER_BOOT_RESOURCES_TABLE_SIGNATURE  SIGNATURE_32('E', 'C', 'D', 'T')
618
+
619
+///
620
+/// "FACP" Fixed ACPI Description Table
621
+///
622
+#define EFI_ACPI_3_0_FIXED_ACPI_DESCRIPTION_TABLE_SIGNATURE  SIGNATURE_32('F', 'A', 'C', 'P')
623
+
624
+///
625
+/// "FACS" Firmware ACPI Control Structure
626
+///
627
+#define EFI_ACPI_3_0_FIRMWARE_ACPI_CONTROL_STRUCTURE_SIGNATURE  SIGNATURE_32('F', 'A', 'C', 'S')
628
+
629
+///
630
+/// "PSDT" Persistent System Description Table
631
+///
632
+#define EFI_ACPI_3_0_PERSISTENT_SYSTEM_DESCRIPTION_TABLE_SIGNATURE  SIGNATURE_32('P', 'S', 'D', 'T')
633
+
634
+///
635
+/// "RSDT" Root System Description Table
636
+///
637
+#define EFI_ACPI_3_0_ROOT_SYSTEM_DESCRIPTION_TABLE_SIGNATURE  SIGNATURE_32('R', 'S', 'D', 'T')
638
+
639
+///
640
+/// "SBST" Smart Battery Specification Table
641
+///
642
+#define EFI_ACPI_3_0_SMART_BATTERY_SPECIFICATION_TABLE_SIGNATURE  SIGNATURE_32('S', 'B', 'S', 'T')
643
+
644
+///
645
+/// "SLIT" System Locality Information Table
646
+///
647
+#define EFI_ACPI_3_0_SYSTEM_LOCALITY_INFORMATION_TABLE_SIGNATURE  SIGNATURE_32('S', 'L', 'I', 'T')
648
+
649
+///
650
+/// "SRAT" System Resource Affinity Table
651
+///
652
+#define EFI_ACPI_3_0_SYSTEM_RESOURCE_AFFINITY_TABLE_SIGNATURE  SIGNATURE_32('S', 'R', 'A', 'T')
653
+
654
+///
655
+/// "SSDT" Secondary System Description Table
656
+///
657
+#define EFI_ACPI_3_0_SECONDARY_SYSTEM_DESCRIPTION_TABLE_SIGNATURE  SIGNATURE_32('S', 'S', 'D', 'T')
658
+
659
+///
660
+/// "XSDT" Extended System Description Table
661
+///
662
+#define EFI_ACPI_3_0_EXTENDED_SYSTEM_DESCRIPTION_TABLE_SIGNATURE  SIGNATURE_32('X', 'S', 'D', 'T')
663
+
664
+///
665
+/// "BOOT" MS Simple Boot Spec
666
+///
667
+#define EFI_ACPI_3_0_SIMPLE_BOOT_FLAG_TABLE_SIGNATURE  SIGNATURE_32('B', 'O', 'O', 'T')
668
+
669
+///
670
+/// "CPEP" Corrected Platform Error Polling Table
671
+///
672
+#define EFI_ACPI_3_0_CORRECTED_PLATFORM_ERROR_POLLING_TABLE_SIGNATURE  SIGNATURE_32('C', 'P', 'E', 'P')
673
+
674
+///
675
+/// "DBGP" MS Debug Port Spec
676
+///
677
+#define EFI_ACPI_3_0_DEBUG_PORT_TABLE_SIGNATURE  SIGNATURE_32('D', 'B', 'G', 'P')
678
+
679
+///
680
+/// "ETDT" Event Timer Description Table
681
+///
682
+#define EFI_ACPI_3_0_EVENT_TIMER_DESCRIPTION_TABLE_SIGNATURE  SIGNATURE_32('E', 'T', 'D', 'T')
683
+
684
+///
685
+/// "HPET" IA-PC High Precision Event Timer Table
686
+///
687
+#define EFI_ACPI_3_0_HIGH_PRECISION_EVENT_TIMER_TABLE_SIGNATURE  SIGNATURE_32('H', 'P', 'E', 'T')
688
+
689
+///
690
+/// "MCFG" PCI Express Memory Mapped Configuration Space Base Address Description Table
691
+///
692
+#define EFI_ACPI_3_0_PCI_EXPRESS_MEMORY_MAPPED_CONFIGURATION_SPACE_BASE_ADDRESS_DESCRIPTION_TABLE_SIGNATURE  SIGNATURE_32('M', 'C', 'F', 'G')
693
+
694
+///
695
+/// "SPCR" Serial Port Concole Redirection Table
696
+///
697
+#define EFI_ACPI_3_0_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_SIGNATURE  SIGNATURE_32('S', 'P', 'C', 'R')
698
+
699
+///
700
+/// "SPMI" Server Platform Management Interface Table
701
+///
702
+#define EFI_ACPI_3_0_SERVER_PLATFORM_MANAGEMENT_INTERFACE_TABLE_SIGNATURE  SIGNATURE_32('S', 'P', 'M', 'I')
703
+
704
+///
705
+/// "TCPA" Trusted Computing Platform Alliance Capabilities Table
706
+///
707
+#define EFI_ACPI_3_0_TRUSTED_COMPUTING_PLATFORM_ALLIANCE_CAPABILITIES_TABLE_SIGNATURE  SIGNATURE_32('T', 'C', 'P', 'A')
708
+
709
+///
710
+/// "WDRT" Watchdog Resource Table
711
+///
712
+#define EFI_ACPI_3_0_WATCHDOG_RESOURCE_TABLE_SIGNATURE  SIGNATURE_32('W', 'D', 'R', 'T')
713
+
714
+///
715
+/// "WDAT" Watchdog Action Table
716
+///
717
+#define EFI_ACPI_3_0_WATCHDOG_ACTION_TABLE_SIGNATURE  SIGNATURE_32('W', 'D', 'A', 'T')
718
+
719
+///
720
+/// "WSPT" Windows Specific Properties Table
721
+///
722
+#define EFI_ACPI_3_0_WINDOWS_SPECIFIC_PROPERTIES_TABLE_SIGNATURE  SIGNATURE_32('W', 'S', 'P', 'T')
723
+
724
+///
725
+/// "iBFT" iSCSI Boot Firmware Table
726
+///
727
+#define EFI_ACPI_3_0_ISCSI_BOOT_FIRMWARE_TABLE_SIGNATURE  SIGNATURE_32('i', 'B', 'F', 'T')
728
+
729
+#pragma pack()
730
+
731
+#endif

+ 1311
- 0
src/include/ipxe/efi/IndustryStandard/Acpi40.h
File diff suppressed because it is too large
View File


+ 2121
- 0
src/include/ipxe/efi/IndustryStandard/Acpi50.h
File diff suppressed because it is too large
View File


+ 2131
- 0
src/include/ipxe/efi/IndustryStandard/Acpi51.h
File diff suppressed because it is too large
View File


+ 2335
- 0
src/include/ipxe/efi/IndustryStandard/Acpi60.h
File diff suppressed because it is too large
View File


+ 49
- 0
src/include/ipxe/efi/IndustryStandard/Bluetooth.h View File

@@ -0,0 +1,49 @@
1
+/** @file
2
+  This file contains the Bluetooth definitions that are consumed by drivers.
3
+  These definitions are from Bluetooth Core Specification Version 4.0 June, 2010
4
+
5
+  Copyright (c) 2015, Intel Corporation. All rights reserved.<BR>
6
+  This program and the accompanying materials
7
+  are licensed and made available under the terms and conditions of the BSD License
8
+  which accompanies this distribution.  The full text of the license may be found at
9
+  http://opensource.org/licenses/bsd-license.php
10
+
11
+  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
12
+  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
13
+
14
+**/
15
+
16
+#ifndef _BLUETOOTH_H_
17
+#define _BLUETOOTH_H_
18
+
19
+FILE_LICENCE ( BSD3 );
20
+
21
+#pragma pack(1)
22
+
23
+///
24
+/// BLUETOOTH_ADDRESS
25
+///
26
+typedef struct {
27
+  ///
28
+  /// 48bit Bluetooth device address.
29
+  ///
30
+  UINT8      Address[6];
31
+} BLUETOOTH_ADDRESS;
32
+
33
+///
34
+/// BLUETOOTH_CLASS_OF_DEVICE. See Bluetooth specification for detail.
35
+///
36
+typedef struct {
37
+  UINT8      FormatType:2;
38
+  UINT8      MinorDeviceClass: 6;
39
+  UINT16     MajorDeviceClass: 5;
40
+  UINT16     MajorServiceClass:11;
41
+} BLUETOOTH_CLASS_OF_DEVICE;
42
+
43
+#pragma pack()
44
+
45
+#define BLUETOOTH_HCI_COMMAND_LOCAL_READABLE_NAME_MAX_SIZE    248
46
+
47
+#define BLUETOOTH_HCI_LINK_KEY_SIZE                           16
48
+
49
+#endif

+ 2
- 1
src/include/ipxe/efi/IndustryStandard/Pci22.h View File

@@ -9,7 +9,7 @@
9 9
 
10 10
 
11 11
   Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR>
12
-  Copyright (c) 2014, Hewlett-Packard Development Company, L.P.<BR>
12
+  Copyright (c) 2014 - 2105, Hewlett-Packard Development Company, L.P.<BR>
13 13
   This program and the accompanying materials
14 14
   are licensed and made available under the terms and conditions of the BSD License
15 15
   which accompanies this distribution.  The full text of the license may be found at
@@ -554,6 +554,7 @@ typedef struct {
554 554
 #define PCI_BRIDGE_PRIMARY_BUS_REGISTER_OFFSET      0x18
555 555
 #define PCI_BRIDGE_SECONDARY_BUS_REGISTER_OFFSET    0x19
556 556
 #define PCI_BRIDGE_SUBORDINATE_BUS_REGISTER_OFFSET  0x1a
557
+#define PCI_BRIDGE_SECONDARY_LATENCY_TIMER_OFFSET   0x1b
557 558
 #define PCI_BRIDGE_STATUS_REGISTER_OFFSET           0x1E
558 559
 #define PCI_BRIDGE_CONTROL_REGISTER_OFFSET          0x3E
559 560
 

+ 1819
- 0
src/include/ipxe/efi/IndustryStandard/Tpm20.h
File diff suppressed because it is too large
View File


+ 109
- 1
src/include/ipxe/efi/IndustryStandard/UefiTcgPlatform.h View File

@@ -1,7 +1,7 @@
1 1
 /** @file
2 2
   TCG EFI Platform Definition in TCG_EFI_Platform_1_20_Final
3 3
 
4
-  Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR>
4
+  Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR>
5 5
   This program and the accompanying materials
6 6
   are licensed and made available under the terms and conditions of the BSD License
7 7
   which accompanies this distribution.  The full text of the license may be found at
@@ -18,12 +18,14 @@
18 18
 FILE_LICENCE ( BSD3 );
19 19
 
20 20
 #include <ipxe/efi/IndustryStandard/Tpm12.h>
21
+#include <ipxe/efi/IndustryStandard/Tpm20.h>
21 22
 #include <ipxe/efi/Uefi.h>
22 23
 
23 24
 //
24 25
 // Standard event types
25 26
 //
26 27
 #define EV_POST_CODE                ((TCG_EVENTTYPE) 0x00000001)
28
+#define EV_NO_ACTION                ((TCG_EVENTTYPE) 0x00000003)
27 29
 #define EV_SEPARATOR                ((TCG_EVENTTYPE) 0x00000004)
28 30
 #define EV_S_CRTM_CONTENTS          ((TCG_EVENTTYPE) 0x00000007)
29 31
 #define EV_S_CRTM_VERSION           ((TCG_EVENTTYPE) 0x00000008)
@@ -43,6 +45,7 @@ FILE_LICENCE ( BSD3 );
43 45
 #define EV_EFI_ACTION                       (EV_EFI_EVENT_BASE + 7)
44 46
 #define EV_EFI_PLATFORM_FIRMWARE_BLOB       (EV_EFI_EVENT_BASE + 8)
45 47
 #define EV_EFI_HANDOFF_TABLES               (EV_EFI_EVENT_BASE + 9)
48
+#define EV_EFI_VARIABLE_AUTHORITY           (EV_EFI_EVENT_BASE + 0xE0)
46 49
 
47 50
 #define EFI_CALLING_EFI_APPLICATION         \
48 51
   "Calling EFI Application from Boot Option"
@@ -74,6 +77,9 @@ FILE_LICENCE ( BSD3 );
74 77
 #define EV_POSTCODE_INFO_OPROM        "Embedded Option ROM"
75 78
 #define OPROM_LEN                     (sizeof(EV_POSTCODE_INFO_OPROM) - 1)
76 79
 
80
+#define FIRMWARE_DEBUGGER_EVENT_STRING      "UEFI Debug Mode"
81
+#define FIRMWARE_DEBUGGER_EVENT_STRING_LEN  (sizeof(FIRMWARE_DEBUGGER_EVENT_STRING) - 1)
82
+
77 83
 //
78 84
 // Set structure alignment to 1-byte
79 85
 //
@@ -156,12 +162,114 @@ typedef struct tdEFI_VARIABLE_DATA {
156 162
   INT8                              VariableData[1];  ///< Driver or platform-specific data
157 163
 } EFI_VARIABLE_DATA;
158 164
 
165
+//
166
+// For TrEE1.0 compatibility
167
+//
168
+typedef struct {
169
+  EFI_GUID                          VariableName;
170
+  UINT64                            UnicodeNameLength;   // The TCG Definition used UINTN
171
+  UINT64                            VariableDataLength;  // The TCG Definition used UINTN
172
+  CHAR16                            UnicodeName[1];
173
+  INT8                              VariableData[1];
174
+} EFI_VARIABLE_DATA_TREE;
175
+
159 176
 typedef struct tdEFI_GPT_DATA {
160 177
   EFI_PARTITION_TABLE_HEADER  EfiPartitionHeader;
161 178
   UINTN                       NumberOfPartitions;
162 179
   EFI_PARTITION_ENTRY         Partitions[1];
163 180
 } EFI_GPT_DATA;
164 181
 
182
+//
183
+// Crypto Agile Log Entry Format
184
+//
185
+typedef struct tdTCG_PCR_EVENT2 {
186
+  TCG_PCRINDEX        PCRIndex;
187
+  TCG_EVENTTYPE       EventType;
188
+  TPML_DIGEST_VALUES  Digest;
189
+  UINT32              EventSize;
190
+  UINT8               Event[1];
191
+} TCG_PCR_EVENT2;
192
+
193
+//
194
+// Log Header Entry Data
195
+//
196
+typedef struct {
197
+  //
198
+  // TCG defined hashing algorithm ID.
199
+  //
200
+  UINT16              algorithmId;
201
+  //
202
+  // The size of the digest for the respective hashing algorithm.
203
+  //
204
+  UINT16              digestSize;
205
+} TCG_EfiSpecIdEventAlgorithmSize;
206
+
207
+#define TCG_EfiSpecIDEventStruct_SIGNATURE_02 "Spec ID Event02"
208
+#define TCG_EfiSpecIDEventStruct_SIGNATURE_03 "Spec ID Event03"
209
+
210
+#define TCG_EfiSpecIDEventStruct_SPEC_VERSION_MAJOR_TPM12   1
211
+#define TCG_EfiSpecIDEventStruct_SPEC_VERSION_MINOR_TPM12   2
212
+#define TCG_EfiSpecIDEventStruct_SPEC_ERRATA_TPM12          2
213
+
214
+#define TCG_EfiSpecIDEventStruct_SPEC_VERSION_MAJOR_TPM2   2
215
+#define TCG_EfiSpecIDEventStruct_SPEC_VERSION_MINOR_TPM2   0
216
+#define TCG_EfiSpecIDEventStruct_SPEC_ERRATA_TPM2          0
217
+
218
+typedef struct {
219
+  UINT8               signature[16];
220
+  //
221
+  // The value for the Platform Class.
222
+  // The enumeration is defined in the TCG ACPI Specification Client Common Header.
223
+  //
224
+  UINT32              platformClass;
225
+  //
226
+  // The TCG EFI Platform Specification minor version number this BIOS supports.
227
+  // Any BIOS supporting version (1.22) MUST set this value to 02h.
228
+  // Any BIOS supporting version (2.0) SHALL set this value to 0x00.
229
+  //
230
+  UINT8               specVersionMinor;
231
+  //
232
+  // The TCG EFI Platform Specification major version number this BIOS supports.
233
+  // Any BIOS supporting version (1.22) MUST set this value to 01h.
234
+  // Any BIOS supporting version (2.0) SHALL set this value to 0x02.
235
+  //
236
+  UINT8               specVersionMajor;
237
+  //
238
+  // The TCG EFI Platform Specification errata for this specification this BIOS supports.
239
+  // Any BIOS supporting version and errata (1.22) MUST set this value to 02h.
240
+  // Any BIOS supporting version and errata (2.0) SHALL set this value to 0x00.
241
+  //
242
+  UINT8               specErrata;
243
+  //
244
+  // Specifies the size of the UINTN fields used in various data structures used in this specification.
245
+  // 0x01 indicates UINT32 and 0x02 indicates UINT64.
246
+  //
247
+  UINT8               uintnSize;
248
+  //
249
+  // This field is added in "Spec ID Event03".
250
+  // The number of hashing algorithms used in this event log (except the first event).
251
+  // All events in this event log use all hashing algorithms defined here.
252
+  //
253
+//UINT32              numberOfAlgorithms;
254
+  //
255
+  // This field is added in "Spec ID Event03".
256
+  // An array of size numberOfAlgorithms of value pairs.
257
+  //
258
+//TCG_EfiSpecIdEventAlgorithmSize digestSize[numberOfAlgorithms];
259
+  //
260
+  // Size in bytes of the VendorInfo field.
261
+  // Maximum value SHALL be FFh bytes.
262
+  //
263
+//UINT8               vendorInfoSize;
264
+  //
265
+  // Provided for use by the BIOS implementer.
266
+  // The value might be used, for example, to provide more detailed information about the specific BIOS such as BIOS revision numbers, etc.
267
+  // The values within this field are not standardized and are implementer-specific.
268
+  // Platform-specific or -unique information SHALL NOT be provided in this field.
269
+  //
270
+//UINT8               vendorInfo[vendorInfoSize];
271
+} TCG_EfiSpecIDEventStruct;
272
+
165 273
 //
166 274
 // Restore original structure alignment
167 275
 //

+ 27
- 1
src/include/ipxe/efi/IndustryStandard/Usb.h View File

@@ -1,7 +1,7 @@
1 1
 /** @file
2 2
   Support for USB 2.0 standard.
3 3
 
4
-  Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>
4
+  Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>
5 5
   This program and the accompanying materials
6 6
   are licensed and made available under the terms and conditions of the BSD License
7 7
   which accompanies this distribution.  The full text of the license may be found at
@@ -17,6 +17,32 @@
17 17
 
18 18
 FILE_LICENCE ( BSD3 );
19 19
 
20
+//
21
+// Subset of Class and Subclass definitions from USB Specs
22
+//
23
+
24
+//
25
+// Usb mass storage class code
26
+//
27
+#define USB_MASS_STORE_CLASS    0x08
28
+
29
+//
30
+// Usb mass storage subclass code, specify the command set used.
31
+//
32
+#define USB_MASS_STORE_RBC      0x01 ///< Reduced Block Commands
33
+#define USB_MASS_STORE_8020I    0x02 ///< SFF-8020i, typically a CD/DVD device
34
+#define USB_MASS_STORE_QIC      0x03 ///< Typically a tape device
35
+#define USB_MASS_STORE_UFI      0x04 ///< Typically a floppy disk driver device
36
+#define USB_MASS_STORE_8070I    0x05 ///< SFF-8070i, typically a floppy disk driver device.
37
+#define USB_MASS_STORE_SCSI     0x06 ///< SCSI transparent command set
38
+
39
+//
40
+// Usb mass storage protocol code, specify the transport protocol
41
+//
42
+#define USB_MASS_STORE_CBI0     0x00 ///< CBI protocol with command completion interrupt
43
+#define USB_MASS_STORE_CBI1     0x01 ///< CBI protocol without command completion interrupt
44
+#define USB_MASS_STORE_BOT      0x50 ///< Bulk-Only Transport
45
+
20 46
 //
21 47
 // Standard device request and request type
22 48
 // USB 2.0 spec, Section 9.4

+ 428
- 5
src/include/ipxe/efi/Library/BaseLib.h View File

@@ -1,8 +1,8 @@
1 1
 /** @file
2 2
   Provides string functions, linked list functions, math functions, synchronization
3
-  functions, and CPU architecture-specific functions.
3
+  functions, file path functions, and CPU architecture-specific functions.
4 4
 
5
-Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.<BR>
5
+Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR>
6 6
 Portions copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>
7 7
 This program and the accompanying materials
8 8
 are licensed and made available under the terms and conditions of the BSD License
@@ -185,7 +185,321 @@ typedef struct {
185 185
 // String Services
186 186
 //
187 187
 
188
+
188 189
 /**
190
+  Returns the length of a Null-terminated Unicode string.
191
+
192
+  If String is not aligned on a 16-bit boundary, then ASSERT().
193
+
194
+  @param  String   A pointer to a Null-terminated Unicode string.
195
+  @param  MaxSize  The maximum number of Destination Unicode
196
+                   char, including terminating null char.
197
+
198
+  @retval 0        If String is NULL.
199
+  @retval MaxSize  If there is no null character in the first MaxSize characters of String.
200
+  @return The number of characters that percede the terminating null character.
201
+
202
+**/
203
+UINTN
204
+EFIAPI
205
+StrnLenS (
206
+  IN CONST CHAR16              *String,
207
+  IN UINTN                     MaxSize
208
+  );
209
+
210
+/**
211
+  Copies the string pointed to by Source (including the terminating null char)
212
+  to the array pointed to by Destination.
213
+
214
+  If Destination is not aligned on a 16-bit boundary, then ASSERT().
215
+  If Source is not aligned on a 16-bit boundary, then ASSERT().
216
+  If an error would be returned, then the function will also ASSERT().
217
+
218
+  @param  Destination              A pointer to a Null-terminated Unicode string.
219
+  @param  DestMax                  The maximum number of Destination Unicode
220
+                                   char, including terminating null char.
221
+  @param  Source                   A pointer to a Null-terminated Unicode string.
222
+
223
+  @retval RETURN_SUCCESS           String is copied.
224
+  @retval RETURN_BUFFER_TOO_SMALL  If DestMax is NOT greater than StrLen(Source).
225
+  @retval RETURN_INVALID_PARAMETER If Destination is NULL.
226
+                                   If Source is NULL.
227
+                                   If PcdMaximumUnicodeStringLength is not zero,
228
+                                    and DestMax is greater than
229
+                                    PcdMaximumUnicodeStringLength.
230
+                                   If DestMax is 0.
231
+  @retval RETURN_ACCESS_DENIED     If Source and Destination overlap.
232
+**/
233
+RETURN_STATUS
234
+EFIAPI
235
+StrCpyS (
236
+  OUT CHAR16       *Destination,
237
+  IN  UINTN        DestMax,
238
+  IN  CONST CHAR16 *Source
239
+  );
240
+
241
+/**
242
+  Copies not more than Length successive char from the string pointed to by
243
+  Source to the array pointed to by Destination. If no null char is copied from
244
+  Source, then Destination[Length] is always set to null.
245
+
246
+  If Length > 0 and Destination is not aligned on a 16-bit boundary, then ASSERT().
247
+  If Length > 0 and Source is not aligned on a 16-bit boundary, then ASSERT().
248
+  If an error would be returned, then the function will also ASSERT().
249
+
250
+  @param  Destination              A pointer to a Null-terminated Unicode string.
251
+  @param  DestMax                  The maximum number of Destination Unicode
252
+                                   char, including terminating null char.
253
+  @param  Source                   A pointer to a Null-terminated Unicode string.
254
+  @param  Length                   The maximum number of Unicode characters to copy.
255
+
256
+  @retval RETURN_SUCCESS           String is copied.
257
+  @retval RETURN_BUFFER_TOO_SMALL  If DestMax is NOT greater than
258
+                                   MIN(StrLen(Source), Length).
259
+  @retval RETURN_INVALID_PARAMETER If Destination is NULL.
260
+                                   If Source is NULL.
261
+                                   If PcdMaximumUnicodeStringLength is not zero,
262
+                                    and DestMax is greater than
263
+                                    PcdMaximumUnicodeStringLength.
264
+                                   If DestMax is 0.
265
+  @retval RETURN_ACCESS_DENIED     If Source and Destination overlap.
266
+**/
267
+RETURN_STATUS
268
+EFIAPI
269
+StrnCpyS (
270
+  OUT CHAR16       *Destination,
271
+  IN  UINTN        DestMax,
272
+  IN  CONST CHAR16 *Source,
273
+  IN  UINTN        Length
274
+  );
275
+
276
+/**
277
+  Appends a copy of the string pointed to by Source (including the terminating
278
+  null char) to the end of the string pointed to by Destination.
279
+
280
+  If Destination is not aligned on a 16-bit boundary, then ASSERT().
281
+  If Source is not aligned on a 16-bit boundary, then ASSERT().
282
+  If an error would be returned, then the function will also ASSERT().
283
+
284
+  @param  Destination              A pointer to a Null-terminated Unicode string.
285
+  @param  DestMax                  The maximum number of Destination Unicode
286
+                                   char, including terminating null char.
287
+  @param  Source                   A pointer to a Null-terminated Unicode string.
288
+
289
+  @retval RETURN_SUCCESS           String is appended.
290
+  @retval RETURN_BAD_BUFFER_SIZE   If DestMax is NOT greater than
291
+                                   StrLen(Destination).
292
+  @retval RETURN_BUFFER_TOO_SMALL  If (DestMax - StrLen(Destination)) is NOT
293
+                                   greater than StrLen(Source).
294
+  @retval RETURN_INVALID_PARAMETER If Destination is NULL.
295
+                                   If Source is NULL.
296
+                                   If PcdMaximumUnicodeStringLength is not zero,
297
+                                    and DestMax is greater than
298
+                                    PcdMaximumUnicodeStringLength.
299
+                                   If DestMax is 0.
300
+  @retval RETURN_ACCESS_DENIED     If Source and Destination overlap.
301
+**/
302
+RETURN_STATUS
303
+EFIAPI
304
+StrCatS (
305
+  IN OUT CHAR16       *Destination,
306
+  IN     UINTN        DestMax,
307
+  IN     CONST CHAR16 *Source
308
+  );
309
+
310
+/**
311
+  Appends not more than Length successive char from the string pointed to by
312
+  Source to the end of the string pointed to by Destination. If no null char is
313
+  copied from Source, then Destination[StrLen(Destination) + Length] is always
314
+  set to null.
315
+
316
+  If Destination is not aligned on a 16-bit boundary, then ASSERT().
317
+  If Source is not aligned on a 16-bit boundary, then ASSERT().
318
+  If an error would be returned, then the function will also ASSERT().
319
+
320
+  @param  Destination              A pointer to a Null-terminated Unicode string.
321
+  @param  DestMax                  The maximum number of Destination Unicode
322
+                                   char, including terminating null char.
323
+  @param  Source                   A pointer to a Null-terminated Unicode string.
324
+  @param  Length                   The maximum number of Unicode characters to copy.
325
+
326
+  @retval RETURN_SUCCESS           String is appended.
327
+  @retval RETURN_BAD_BUFFER_SIZE   If DestMax is NOT greater than
328
+                                   StrLen(Destination).
329
+  @retval RETURN_BUFFER_TOO_SMALL  If (DestMax - StrLen(Destination)) is NOT
330
+                                   greater than MIN(StrLen(Source), Length).
331
+  @retval RETURN_INVALID_PARAMETER If Destination is NULL.
332
+                                   If Source is NULL.
333
+                                   If PcdMaximumUnicodeStringLength is not zero,
334
+                                    and DestMax is greater than
335
+                                    PcdMaximumUnicodeStringLength.
336
+                                   If DestMax is 0.
337
+  @retval RETURN_ACCESS_DENIED     If Source and Destination overlap.
338
+**/
339
+RETURN_STATUS
340
+EFIAPI
341
+StrnCatS (
342
+  IN OUT CHAR16       *Destination,
343
+  IN     UINTN        DestMax,
344
+  IN     CONST CHAR16 *Source,
345
+  IN     UINTN        Length
346
+  );
347
+
348
+/**
349
+  Returns the length of a Null-terminated Ascii string.
350
+
351
+  @param  String   A pointer to a Null-terminated Ascii string.
352
+  @param  MaxSize  The maximum number of Destination Ascii
353
+                   char, including terminating null char.
354
+
355
+  @retval 0        If String is NULL.
356
+  @retval MaxSize  If there is no null character in the first MaxSize characters of String.
357
+  @return The number of characters that percede the terminating null character.
358
+
359
+**/
360
+UINTN
361
+EFIAPI
362
+AsciiStrnLenS (
363
+  IN CONST CHAR8               *String,
364
+  IN UINTN                     MaxSize
365
+  );
366
+
367
+/**
368
+  Copies the string pointed to by Source (including the terminating null char)
369
+  to the array pointed to by Destination.
370
+
371
+  If an error would be returned, then the function will also ASSERT().
372
+
373
+  @param  Destination              A pointer to a Null-terminated Ascii string.
374
+  @param  DestMax                  The maximum number of Destination Ascii
375
+                                   char, including terminating null char.
376
+  @param  Source                   A pointer to a Null-terminated Ascii string.
377
+
378
+  @retval RETURN_SUCCESS           String is copied.
379
+  @retval RETURN_BUFFER_TOO_SMALL  If DestMax is NOT greater than StrLen(Source).
380
+  @retval RETURN_INVALID_PARAMETER If Destination is NULL.
381
+                                   If Source is NULL.
382
+                                   If PcdMaximumAsciiStringLength is not zero,
383
+                                    and DestMax is greater than
384
+                                    PcdMaximumAsciiStringLength.
385
+                                   If DestMax is 0.
386
+  @retval RETURN_ACCESS_DENIED     If Source and Destination overlap.
387
+**/
388
+RETURN_STATUS
389
+EFIAPI
390
+AsciiStrCpyS (
391
+  OUT CHAR8        *Destination,
392
+  IN  UINTN        DestMax,
393
+  IN  CONST CHAR8  *Source
394
+  );
395
+
396
+/**
397
+  Copies not more than Length successive char from the string pointed to by
398
+  Source to the array pointed to by Destination. If no null char is copied from
399
+  Source, then Destination[Length] is always set to null.
400
+
401
+  If an error would be returned, then the function will also ASSERT().
402
+
403
+  @param  Destination              A pointer to a Null-terminated Ascii string.
404
+  @param  DestMax                  The maximum number of Destination Ascii
405
+                                   char, including terminating null char.
406
+  @param  Source                   A pointer to a Null-terminated Ascii string.
407
+  @param  Length                   The maximum number of Ascii characters to copy.
408
+
409
+  @retval RETURN_SUCCESS           String is copied.
410
+  @retval RETURN_BUFFER_TOO_SMALL  If DestMax is NOT greater than
411
+                                   MIN(StrLen(Source), Length).
412
+  @retval RETURN_INVALID_PARAMETER If Destination is NULL.
413
+                                   If Source is NULL.
414
+                                   If PcdMaximumAsciiStringLength is not zero,
415
+                                    and DestMax is greater than
416
+                                    PcdMaximumAsciiStringLength.
417
+                                   If DestMax is 0.
418
+  @retval RETURN_ACCESS_DENIED     If Source and Destination overlap.
419
+**/
420
+RETURN_STATUS
421
+EFIAPI
422
+AsciiStrnCpyS (
423
+  OUT CHAR8        *Destination,
424
+  IN  UINTN        DestMax,
425
+  IN  CONST CHAR8  *Source,
426
+  IN  UINTN        Length
427
+  );
428
+
429
+/**
430
+  Appends a copy of the string pointed to by Source (including the terminating
431
+  null char) to the end of the string pointed to by Destination.
432
+
433
+  If an error would be returned, then the function will also ASSERT().
434
+
435
+  @param  Destination              A pointer to a Null-terminated Ascii string.
436
+  @param  DestMax                  The maximum number of Destination Ascii
437
+                                   char, including terminating null char.
438
+  @param  Source                   A pointer to a Null-terminated Ascii string.
439
+
440
+  @retval RETURN_SUCCESS           String is appended.
441
+  @retval RETURN_BAD_BUFFER_SIZE   If DestMax is NOT greater than
442
+                                   StrLen(Destination).
443
+  @retval RETURN_BUFFER_TOO_SMALL  If (DestMax - StrLen(Destination)) is NOT
444
+                                   greater than StrLen(Source).
445
+  @retval RETURN_INVALID_PARAMETER If Destination is NULL.
446
+                                   If Source is NULL.
447
+                                   If PcdMaximumAsciiStringLength is not zero,
448
+                                    and DestMax is greater than
449
+                                    PcdMaximumAsciiStringLength.
450
+                                   If DestMax is 0.
451
+  @retval RETURN_ACCESS_DENIED     If Source and Destination overlap.
452
+**/
453
+RETURN_STATUS
454
+EFIAPI
455
+AsciiStrCatS (
456
+  IN OUT CHAR8        *Destination,
457
+  IN     UINTN        DestMax,
458
+  IN     CONST CHAR8  *Source
459
+  );
460
+
461
+/**
462
+  Appends not more than Length successive char from the string pointed to by
463
+  Source to the end of the string pointed to by Destination. If no null char is
464
+  copied from Source, then Destination[StrLen(Destination) + Length] is always
465
+  set to null.
466
+
467
+  If an error would be returned, then the function will also ASSERT().
468
+
469
+  @param  Destination              A pointer to a Null-terminated Ascii string.
470
+  @param  DestMax                  The maximum number of Destination Ascii
471
+                                   char, including terminating null char.
472
+  @param  Source                   A pointer to a Null-terminated Ascii string.
473
+  @param  Length                   The maximum number of Ascii characters to copy.
474
+
475
+  @retval RETURN_SUCCESS           String is appended.
476
+  @retval RETURN_BAD_BUFFER_SIZE   If DestMax is NOT greater than
477
+                                   StrLen(Destination).
478
+  @retval RETURN_BUFFER_TOO_SMALL  If (DestMax - StrLen(Destination)) is NOT
479
+                                   greater than MIN(StrLen(Source), Length).
480
+  @retval RETURN_INVALID_PARAMETER If Destination is NULL.
481
+                                   If Source is NULL.
482
+                                   If PcdMaximumAsciiStringLength is not zero,
483
+                                    and DestMax is greater than
484
+                                    PcdMaximumAsciiStringLength.
485
+                                   If DestMax is 0.
486
+  @retval RETURN_ACCESS_DENIED     If Source and Destination overlap.
487
+**/
488
+RETURN_STATUS
489
+EFIAPI
490
+AsciiStrnCatS (
491
+  IN OUT CHAR8        *Destination,
492
+  IN     UINTN        DestMax,
493
+  IN     CONST CHAR8  *Source,
494
+  IN     UINTN        Length
495
+  );
496
+
497
+
498
+#ifndef DISABLE_NEW_DEPRECATED_INTERFACES
499
+
500
+/**
501
+  [ATTENTION] This function is deprecated for security reason.
502
+
189 503
   Copies one Null-terminated Unicode string to another Null-terminated Unicode
190 504
   string and returns the new Unicode string.
191 505
 
@@ -217,6 +531,8 @@ StrCpy (
217 531
 
218 532
 
219 533
 /**
534
+  [ATTENTION] This function is deprecated for security reason.
535
+
220 536
   Copies up to a specified length from one Null-terminated Unicode string to
221 537
   another Null-terminated Unicode string and returns the new Unicode string.
222 538
 
@@ -253,7 +569,7 @@ StrnCpy (
253 569
   IN      CONST CHAR16              *Source,
254 570
   IN      UINTN                     Length
255 571
   );
256
-
572
+#endif
257 573
 
258 574
 /**
259 575
   Returns the length of a Null-terminated Unicode string.
@@ -381,7 +697,11 @@ StrnCmp (
381 697
   );
382 698
 
383 699
 
700
+#ifndef DISABLE_NEW_DEPRECATED_INTERFACES
701
+
384 702
 /**
703
+  [ATTENTION] This function is deprecated for security reason.
704
+
385 705
   Concatenates one Null-terminated Unicode string to another Null-terminated
386 706
   Unicode string, and returns the concatenated Unicode string.
387 707
 
@@ -422,6 +742,8 @@ StrCat (
422 742
 
423 743
 
424 744
 /**
745
+  [ATTENTION] This function is deprecated for security reason.
746
+
425 747
   Concatenates up to a specified length one Null-terminated Unicode to the end
426 748
   of another Null-terminated Unicode string, and returns the concatenated
427 749
   Unicode string.
@@ -466,6 +788,7 @@ StrnCat (
466 788
   IN      CONST CHAR16              *Source,
467 789
   IN      UINTN                     Length
468 790
   );
791
+#endif
469 792
 
470 793
 /**
471 794
   Returns the first occurrence of a Null-terminated Unicode sub-string
@@ -704,7 +1027,11 @@ UnicodeStrToAsciiStr (
704 1027
   );
705 1028
 
706 1029
 
1030
+#ifndef DISABLE_NEW_DEPRECATED_INTERFACES
1031
+
707 1032
 /**
1033
+  [ATTENTION] This function is deprecated for security reason.
1034
+
708 1035
   Copies one Null-terminated ASCII string to another Null-terminated ASCII
709 1036
   string and returns the new ASCII string.
710 1037
 
@@ -734,6 +1061,8 @@ AsciiStrCpy (
734 1061
 
735 1062
 
736 1063
 /**
1064
+  [ATTENTION] This function is deprecated for security reason.
1065
+
737 1066
   Copies up to a specified length one Null-terminated ASCII string to another
738 1067
   Null-terminated ASCII string and returns the new ASCII string.
739 1068
 
@@ -767,7 +1096,7 @@ AsciiStrnCpy (
767 1096
   IN      CONST CHAR8               *Source,
768 1097
   IN      UINTN                     Length
769 1098
   );
770
-
1099
+#endif
771 1100
 
772 1101
 /**
773 1102
   Returns the length of a Null-terminated ASCII string.
@@ -927,7 +1256,11 @@ AsciiStrnCmp (
927 1256
   );
928 1257
 
929 1258
 
1259
+#ifndef DISABLE_NEW_DEPRECATED_INTERFACES
1260
+
930 1261
 /**
1262
+  [ATTENTION] This function is deprecated for security reason.
1263
+
931 1264
   Concatenates one Null-terminated ASCII string to another Null-terminated
932 1265
   ASCII string, and returns the concatenated ASCII string.
933 1266
 
@@ -963,6 +1296,8 @@ AsciiStrCat (
963 1296
 
964 1297
 
965 1298
 /**
1299
+  [ATTENTION] This function is deprecated for security reason.
1300
+
966 1301
   Concatenates up to a specified length one Null-terminated ASCII string to
967 1302
   the end of another Null-terminated ASCII string, and returns the
968 1303
   concatenated ASCII string.
@@ -1005,7 +1340,7 @@ AsciiStrnCat (
1005 1340
   IN      CONST CHAR8               *Source,
1006 1341
   IN      UINTN                     Length
1007 1342
   );
1008
-
1343
+#endif
1009 1344
 
1010 1345
 /**
1011 1346
   Returns the first occurrence of a Null-terminated ASCII sub-string
@@ -1270,6 +1605,43 @@ BcdToDecimal8 (
1270 1605
   IN      UINT8                     Value
1271 1606
   );
1272 1607
 
1608
+//
1609
+//  File Path Manipulation Functions
1610
+//
1611
+
1612
+/**
1613
+  Removes the last directory or file entry in a path by changing the last
1614
+  L'\' to a CHAR_NULL.
1615
+
1616
+  @param[in, out] Path    The pointer to the path to modify.
1617
+
1618
+  @retval FALSE     Nothing was found to remove.
1619
+  @retval TRUE      A directory or file was removed.
1620
+**/
1621
+BOOLEAN
1622
+EFIAPI
1623
+PathRemoveLastItem(
1624
+  IN OUT CHAR16 *Path
1625
+  );
1626
+
1627
+/**
1628
+  Function to clean up paths.
1629
+    - Single periods in the path are removed.
1630
+    - Double periods in the path are removed along with a single parent directory.
1631
+    - Forward slashes L'/' are converted to backward slashes L'\'.
1632
+
1633
+  This will be done inline and the existing buffer may be larger than required
1634
+  upon completion.
1635
+
1636
+  @param[in] Path       The pointer to the string containing the path.
1637
+
1638
+  @return       Returns Path, otherwise returns NULL to indicate that an error has occured.
1639
+**/
1640
+CHAR16*
1641
+EFIAPI
1642
+PathCleanUpDirectories(
1643
+  IN CHAR16 *Path
1644
+  );
1273 1645
 
1274 1646
 //
1275 1647
 // Linked List Functions and Macros
@@ -7277,6 +7649,57 @@ AsmPrepareAndThunk16 (
7277 7649
   IN OUT  THUNK_CONTEXT             *ThunkContext
7278 7650
   );
7279 7651
 
7652
+/**
7653
+  Generates a 16-bit random number through RDRAND instruction.
7654
+
7655
+  if Rand is NULL, then ASSERT().
7656
+
7657
+  @param[out]  Rand     Buffer pointer to store the random result.
7658
+
7659
+  @retval TRUE          RDRAND call was successful.
7660
+  @retval FALSE         Failed attempts to call RDRAND.
7661
+
7662
+ **/
7663
+BOOLEAN
7664
+EFIAPI
7665
+AsmRdRand16 (
7666
+  OUT     UINT16                    *Rand
7667
+  );
7668
+
7669
+/**
7670
+  Generates a 32-bit random number through RDRAND instruction.
7671
+
7672
+  if Rand is NULL, then ASSERT().
7673
+
7674
+  @param[out]  Rand     Buffer pointer to store the random result.
7675
+
7676
+  @retval TRUE          RDRAND call was successful.
7677
+  @retval FALSE         Failed attempts to call RDRAND.
7678
+
7679
+**/
7680
+BOOLEAN
7681
+EFIAPI
7682
+AsmRdRand32 (
7683
+  OUT     UINT32                    *Rand
7684
+  );
7685
+
7686
+/**
7687
+  Generates a 64-bit random number through RDRAND instruction.
7688
+
7689
+  if Rand is NULL, then ASSERT().
7690
+
7691
+  @param[out]  Rand     Buffer pointer to store the random result.
7692
+
7693
+  @retval TRUE          RDRAND call was successful.
7694
+  @retval FALSE         Failed attempts to call RDRAND.
7695
+
7696
+**/
7697
+BOOLEAN
7698
+EFIAPI
7699
+AsmRdRand64  (
7700
+  OUT     UINT64                    *Rand
7701
+  );
7702
+
7280 7703
 #endif
7281 7704
 #endif
7282 7705
 

+ 43
- 19
src/include/ipxe/efi/Pi/PiDxeCis.h View File

@@ -1,7 +1,7 @@
1 1
 /** @file
2 2
   Include file matches things in PI.
3 3
 
4
-Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.<BR>
4
+Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR>
5 5
 This program and the accompanying materials are licensed and made available under
6 6
 the terms and conditions of the BSD License that accompanies this distribution.
7 7
 The full text of the license may be found at
@@ -11,7 +11,7 @@ THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 11
 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
12 12
 
13 13
   @par Revision Reference:
14
-  PI Version 1.2
14
+  PI Version 1.4
15 15
 
16 16
 **/
17 17
 
@@ -50,6 +50,16 @@ typedef enum {
50 50
   /// access I/O devices in the platform.
51 51
   ///
52 52
   EfiGcdMemoryTypeMemoryMappedIo,
53
+  ///
54
+  /// A memory region that is visible to the boot processor.
55
+  /// This memory supports byte-addressable non-volatility.
56
+  ///
57
+  EfiGcdMemoryTypePersistentMemory,
58
+  ///
59
+  /// A memory region that provides higher reliability relative to other memory in the
60
+  /// system. If all memory has the same reliability, then this bit is not used.
61
+  ///
62
+  EfiGcdMemoryTypeMoreReliable,
53 63
   EfiGcdMemoryTypeMaximum
54 64
 } EFI_GCD_MEMORY_TYPE;
55 65
 
@@ -367,7 +377,7 @@ EFI_STATUS
367 377
                                 resource range specified by BaseAddress and Length.
368 378
   @retval EFI_UNSUPPORTED       The bit mask of attributes is not support for the memory resource
369 379
                                 range specified by BaseAddress and Length.
370
-  @retval EFI_ACCESS_DEFINED    The attributes for the memory resource range specified by
380
+  @retval EFI_ACCESS_DENIED     The attributes for the memory resource range specified by
371 381
                                 BaseAddress and Length cannot be modified.
372 382
   @retval EFI_OUT_OF_RESOURCES  There are not enough system resources to modify the attributes of
373 383
                                 the memory resource range.
@@ -382,6 +392,31 @@ EFI_STATUS
382 392
   IN UINT64                       Attributes
383 393
   );
384 394
 
395
+/**
396
+  Modifies the capabilities for a memory region in the global coherency domain of the
397
+  processor.
398
+
399
+  @param  BaseAddress      The physical address that is the start address of a memory region.
400
+  @param  Length           The size in bytes of the memory region.
401
+  @param  Capabilities     The bit mask of capabilities that the memory region supports.
402
+
403
+  @retval EFI_SUCCESS           The capabilities were set for the memory region.
404
+  @retval EFI_INVALID_PARAMETER Length is zero.
405
+  @retval EFI_UNSUPPORTED       The capabilities specified by Capabilities do not include the
406
+                                memory region attributes currently in use.
407
+  @retval EFI_ACCESS_DENIED     The capabilities for the memory resource range specified by
408
+                                BaseAddress and Length cannot be modified.
409
+  @retval EFI_OUT_OF_RESOURCES  There are not enough system resources to modify the capabilities
410
+                                of the memory resource range.
411
+**/
412
+typedef
413
+EFI_STATUS
414
+(EFIAPI *EFI_SET_MEMORY_SPACE_CAPABILITIES) (
415
+  IN EFI_PHYSICAL_ADDRESS  BaseAddress,
416
+  IN UINT64                Length,
417
+  IN UINT64                Capabilities
418
+  );
419
+
385 420
 /**
386 421
   Returns a map of the memory resources in the global coherency domain of the
387 422
   processor.
@@ -659,7 +694,7 @@ EFI_STATUS
659 694
 //
660 695
 #define DXE_SERVICES_SIGNATURE            0x565245535f455844ULL
661 696
 #define DXE_SPECIFICATION_MAJOR_REVISION  1
662
-#define DXE_SPECIFICATION_MINOR_REVISION  30
697
+#define DXE_SPECIFICATION_MINOR_REVISION  40
663 698
 #define DXE_SERVICES_REVISION             ((DXE_SPECIFICATION_MAJOR_REVISION<<16) | (DXE_SPECIFICATION_MINOR_REVISION))
664 699
 
665 700
 typedef struct {
@@ -696,23 +731,12 @@ typedef struct {
696 731
   // Service to process a single firmware volume found in a capsule
697 732
   //
698 733
   EFI_PROCESS_FIRMWARE_VOLUME     ProcessFirmwareVolume;
734
+  //
735
+  // Extensions to Global Coherency Domain Services
736
+  //
737
+  EFI_SET_MEMORY_SPACE_CAPABILITIES SetMemorySpaceCapabilities;
699 738
 } DXE_SERVICES;
700 739
 
701 740
 typedef DXE_SERVICES EFI_DXE_SERVICES;
702 741
 
703
-
704
-/**
705
-  The function prototype for invoking a function on an Application Processor.
706
-
707
-  This definition is used by the UEFI MP Serices Protocol, and the
708
-  PI SMM System Table.
709
-
710
-  @param[in,out] Buffer  The pointer to private data buffer.
711
-**/
712
-typedef
713
-VOID
714
-(EFIAPI *EFI_AP_PROCEDURE)(
715
-  IN OUT VOID  *Buffer
716
-  );
717
-
718 742
 #endif

+ 4
- 4
src/include/ipxe/efi/Pi/PiFirmwareFile.h View File

@@ -1,7 +1,7 @@
1 1
 /** @file
2 2
   The firmware file related definitions in PI.
3 3
 
4
-Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>
4
+Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR>
5 5
 This program and the accompanying materials are licensed and made available under
6 6
 the terms and conditions of the BSD License that accompanies this distribution.
7 7
 The full text of the license may be found at
@@ -11,7 +11,7 @@ THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 11
 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
12 12
 
13 13
   @par Revision Reference:
14
-  PI Version 1.2.
14
+  PI Version 1.4.
15 15
 
16 16
 **/
17 17
 
@@ -175,7 +175,7 @@ typedef struct {
175 175
   /// If FFS_ATTRIB_LARGE_FILE is set in Attributes, then ExtendedSize exists and Size must be set to zero.
176 176
   /// If FFS_ATTRIB_LARGE_FILE is not set then EFI_FFS_FILE_HEADER is used.
177 177
   ///
178
-  UINT32                    ExtendedSize;
178
+  UINT64                    ExtendedSize;
179 179
 } EFI_FFS_FILE_HEADER2;
180 180
 
181 181
 #define IS_FFS_FILE2(FfsFileHeaderPtr) \
@@ -185,7 +185,7 @@ typedef struct {
185 185
     ((UINT32) (*((UINT32 *) ((EFI_FFS_FILE_HEADER *) (UINTN) FfsFileHeaderPtr)->Size) & 0x00ffffff))
186 186
 
187 187
 #define FFS_FILE2_SIZE(FfsFileHeaderPtr) \
188
-    (((EFI_FFS_FILE_HEADER2 *) (UINTN) FfsFileHeaderPtr)->ExtendedSize)
188
+    ((UINT32) (((EFI_FFS_FILE_HEADER2 *) (UINTN) FfsFileHeaderPtr)->ExtendedSize))
189 189
 
190 190
 typedef UINT8 EFI_SECTION_TYPE;
191 191
 

+ 29
- 2
src/include/ipxe/efi/Pi/PiHob.h View File

@@ -1,7 +1,7 @@
1 1
 /** @file
2 2
   HOB related definitions in PI.
3 3
 
4
-Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>
4
+Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR>
5 5
 This program and the accompanying materials are licensed and made available under
6 6
 the terms and conditions of the BSD License that accompanies this distribution.
7 7
 The full text of the license may be found at
@@ -11,7 +11,7 @@ THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 11
 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
12 12
 
13 13
   @par Revision Reference:
14
-  PI Version 1.0
14
+  PI Version 1.4
15 15
 
16 16
 **/
17 17
 
@@ -257,8 +257,16 @@ typedef UINT32 EFI_RESOURCE_ATTRIBUTE_TYPE;
257 257
 #define EFI_RESOURCE_ATTRIBUTE_INITIALIZED              0x00000002
258 258
 #define EFI_RESOURCE_ATTRIBUTE_TESTED                   0x00000004
259 259
 #define EFI_RESOURCE_ATTRIBUTE_READ_PROTECTED           0x00000080
260
+//
261
+// This is typically used as memory cacheability attribute today.
262
+// NOTE: Since PI spec 1.4, please use EFI_RESOURCE_ATTRIBUTE_READ_ONLY_PROTECTED
263
+// as Physical write protected attribute, and EFI_RESOURCE_ATTRIBUTE_WRITE_PROTECTED
264
+// means Memory cacheability attribute: The memory supports being programmed with
265
+// a writeprotected cacheable attribute.
266
+//
260 267
 #define EFI_RESOURCE_ATTRIBUTE_WRITE_PROTECTED          0x00000100
261 268
 #define EFI_RESOURCE_ATTRIBUTE_EXECUTION_PROTECTED      0x00000200
269
+#define EFI_RESOURCE_ATTRIBUTE_PERSISTENT               0x00800000
262 270
 //
263 271
 // The rest of the attributes are used to describe capabilities
264 272
 //
@@ -275,8 +283,27 @@ typedef UINT32 EFI_RESOURCE_ATTRIBUTE_TYPE;
275 283
 #define EFI_RESOURCE_ATTRIBUTE_64_BIT_IO                0x00010000
276 284
 #define EFI_RESOURCE_ATTRIBUTE_UNCACHED_EXPORTED        0x00020000
277 285
 #define EFI_RESOURCE_ATTRIBUTE_READ_PROTECTABLE         0x00100000
286
+//
287
+// This is typically used as memory cacheability attribute today.
288
+// NOTE: Since PI spec 1.4, please use EFI_RESOURCE_ATTRIBUTE_READ_ONLY_PROTECTABLE
289
+// as Memory capability attribute: The memory supports being protected from processor
290
+// writes, and EFI_RESOURCE_ATTRIBUTE_WRITE_PROTEC TABLE means Memory cacheability attribute:
291
+// The memory supports being programmed with a writeprotected cacheable attribute.
292
+//
278 293
 #define EFI_RESOURCE_ATTRIBUTE_WRITE_PROTECTABLE        0x00200000
279 294
 #define EFI_RESOURCE_ATTRIBUTE_EXECUTION_PROTECTABLE    0x00400000
295
+#define EFI_RESOURCE_ATTRIBUTE_PERSISTABLE              0x01000000
296
+
297
+#define EFI_RESOURCE_ATTRIBUTE_READ_ONLY_PROTECTED      0x00040000
298
+#define EFI_RESOURCE_ATTRIBUTE_READ_ONLY_PROTECTABLE    0x00800000
299
+
300
+//
301
+// Physical memory relative reliability attribute. This
302
+// memory provides higher reliability relative to other
303
+// memory in the system. If all memory has the same
304
+// reliability, then this bit is not used.
305
+//
306
+#define EFI_RESOURCE_ATTRIBUTE_MORE_RELIABLE            0x02000000
280 307
 
281 308
 ///
282 309
 /// Describes the resource properties of all fixed,

+ 15
- 1
src/include/ipxe/efi/Pi/PiMultiPhase.h View File

@@ -1,7 +1,7 @@
1 1
 /** @file
2 2
   Include file matches things in PI for multiple module types.
3 3
 
4
-Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.<BR>
4
+Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR>
5 5
 This program and the accompanying materials are licensed and made available under
6 6
 the terms and conditions of the BSD License that accompanies this distribution.
7 7
 The full text of the license may be found at
@@ -164,4 +164,18 @@ typedef struct {
164 164
   CHAR8             *PcdName;
165 165
 } EFI_PCD_INFO;
166 166
 
167
+/**
168
+  The function prototype for invoking a function on an Application Processor.
169
+
170
+  This definition is used by the UEFI MP Serices Protocol, and the
171
+  PI SMM System Table.
172
+
173
+  @param[in,out] Buffer  The pointer to private data buffer.
174
+**/
175
+typedef
176
+VOID
177
+(EFIAPI *EFI_AP_PROCEDURE)(
178
+  IN OUT VOID  *Buffer
179
+  );
180
+
167 181
 #endif

+ 162
- 11
src/include/ipxe/efi/Protocol/DevicePath.h View File

@@ -5,7 +5,7 @@
5 5
   from a software point of view. The path must persist from boot to boot, so
6 6
   it can not contain things like PCI bus numbers that change from boot to boot.
7 7
 
8
-Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.<BR>
8
+Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR>
9 9
 This program and the accompanying materials are licensed and made available under
10 10
 the terms and conditions of the BSD License that accompanies this distribution.
11 11
 The full text of the license may be found at
@@ -22,6 +22,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
22 22
 FILE_LICENCE ( BSD3 );
23 23
 
24 24
 #include <ipxe/efi/Guid/PcAnsi.h>
25
+#include <ipxe/efi/IndustryStandard/Bluetooth.h>
26
+#include <ipxe/efi/IndustryStandard/Acpi60.h>
25 27
 
26 28
 ///
27 29
 /// Device Path protocol.
@@ -171,6 +173,26 @@ typedef struct {
171 173
   UINT32                          ControllerNumber;
172 174
 } CONTROLLER_DEVICE_PATH;
173 175
 
176
+///
177
+/// BMC Device Path SubType.
178
+///
179
+#define HW_BMC_DP                 0x06
180
+
181
+///
182
+/// BMC Device Path.
183
+///
184
+typedef struct {
185
+  EFI_DEVICE_PATH_PROTOCOL        Header;
186
+  ///
187
+  /// Interface Type.
188
+  ///
189
+  UINT8                           InterfaceType;
190
+  ///
191
+  /// Base Address.
192
+  ///
193
+  UINT8                           BaseAddress[8];
194
+} BMC_DEVICE_PATH;
195
+
174 196
 ///
175 197
 /// ACPI Device Paths.
176 198
 ///
@@ -275,14 +297,14 @@ typedef struct {
275 297
 #define ACPI_ADR_DISPLAY_TYPE_INTERNAL_DIGITAL  4
276 298
 
277 299
 #define ACPI_DISPLAY_ADR(_DeviceIdScheme, _HeadId, _NonVgaOutput, _BiosCanDetect, _VendorInfo, _Type, _Port, _Index) \
278
-          ((UINT32)( (((_DeviceIdScheme) & 0x1) << 31) |  \
279
-                      (((_HeadId)         & 0x7) << 18) |  \
280
-                      (((_NonVgaOutput)   & 0x1) << 17) |  \
281
-                      (((_BiosCanDetect)  & 0x1) << 16) |  \
282
-                      (((_VendorInfo)     & 0xf) << 12) |  \
283
-                      (((_Type)           & 0xf) << 8)  |  \
284
-                      (((_Port)           & 0xf) << 4)  |  \
285
-                       ((_Index)          & 0xf) ))
300
+          ((UINT32)(  ((UINT32)((_DeviceIdScheme) & 0x1) << 31) |  \
301
+                      (((_HeadId)                 & 0x7) << 18) |  \
302
+                      (((_NonVgaOutput)           & 0x1) << 17) |  \
303
+                      (((_BiosCanDetect)          & 0x1) << 16) |  \
304
+                      (((_VendorInfo)             & 0xf) << 12) |  \
305
+                      (((_Type)                   & 0xf) << 8)  |  \
306
+                      (((_Port)                   & 0xf) << 4)  |  \
307
+                       ((_Index)                  & 0xf) ))
286 308
 
287 309
 ///
288 310
 /// Messaging Device Paths.
@@ -797,6 +819,43 @@ typedef struct {
797 819
   UINT64                          NamespaceUuid;
798 820
 } NVME_NAMESPACE_DEVICE_PATH;
799 821
 
822
+///
823
+/// Uniform Resource Identifiers (URI) Device Path SubType
824
+///
825
+#define MSG_URI_DP                0x18
826
+typedef struct {
827
+  EFI_DEVICE_PATH_PROTOCOL        Header;
828
+  ///
829
+  /// Instance of the URI pursuant to RFC 3986.
830
+  ///
831
+  CHAR8                           Uri[];
832
+} URI_DEVICE_PATH;
833
+
834
+///
835
+/// Universal Flash Storage (UFS) Device Path SubType.
836
+///
837
+#define MSG_UFS_DP                0x19
838
+typedef struct {
839
+  EFI_DEVICE_PATH_PROTOCOL        Header;
840
+  ///
841
+  /// Target ID on the UFS bus (PUN).
842
+  ///
843
+  UINT8                           Pun;
844
+  ///
845
+  /// Logical Unit Number (LUN).
846
+  ///
847
+  UINT8                           Lun;
848
+} UFS_DEVICE_PATH;
849
+
850
+///
851
+/// SD (Secure Digital) Device Path SubType.
852
+///
853
+#define MSG_SD_DP                 0x1A
854
+typedef struct {
855
+  EFI_DEVICE_PATH_PROTOCOL        Header;
856
+  UINT8                           SlotNumber;
857
+} SD_DEVICE_PATH;
858
+
800 859
 ///
801 860
 /// iSCSI Device Path SubType
802 861
 ///
@@ -848,6 +907,30 @@ typedef struct {
848 907
   UINT16                          VlanId;
849 908
 } VLAN_DEVICE_PATH;
850 909
 
910
+///
911
+/// Bluetooth Device Path SubType.
912
+///
913
+#define MSG_BLUETOOTH_DP     0x1b
914
+typedef struct {
915
+  EFI_DEVICE_PATH_PROTOCOL        Header;
916
+  ///
917
+  /// 48bit Bluetooth device address.
918
+  ///
919
+  BLUETOOTH_ADDRESS               BD_ADDR;
920
+} BLUETOOTH_DEVICE_PATH;
921
+
922
+///
923
+/// Wi-Fi Device Path SubType.
924
+///
925
+#define MSG_WIFI_DP               0x1C
926
+typedef struct {
927
+  EFI_DEVICE_PATH_PROTOCOL        Header;
928
+  ///
929
+  /// Service set identifier. A 32-byte octets string.
930
+  ///
931
+  UINT8                           SSId[32];
932
+} WIFI_DEVICE_PATH;
933
+
851 934
 //
852 935
 // Media Device Path
853 936
 //
@@ -1016,6 +1099,62 @@ typedef struct {
1016 1099
   UINT64                    EndingOffset;
1017 1100
 } MEDIA_RELATIVE_OFFSET_RANGE_DEVICE_PATH;
1018 1101
 
1102
+///
1103
+/// This GUID defines a RAM Disk supporting a raw disk format in volatile memory.
1104
+///
1105
+#define EFI_VIRTUAL_DISK_GUID               EFI_ACPI_6_0_NFIT_GUID_RAM_DISK_SUPPORTING_VIRTUAL_DISK_REGION_VOLATILE
1106
+
1107
+extern  EFI_GUID                            gEfiVirtualDiskGuid;
1108
+
1109
+///
1110
+/// This GUID defines a RAM Disk supporting an ISO image in volatile memory.
1111
+///
1112
+#define EFI_VIRTUAL_CD_GUID                 EFI_ACPI_6_0_NFIT_GUID_RAM_DISK_SUPPORTING_VIRTUAL_CD_REGION_VOLATILE
1113
+
1114
+extern  EFI_GUID                            gEfiVirtualCdGuid;
1115
+
1116
+///
1117
+/// This GUID defines a RAM Disk supporting a raw disk format in persistent memory.
1118
+///
1119
+#define EFI_PERSISTENT_VIRTUAL_DISK_GUID    EFI_ACPI_6_0_NFIT_GUID_RAM_DISK_SUPPORTING_VIRTUAL_DISK_REGION_PERSISTENT
1120
+
1121
+extern  EFI_GUID                            gEfiPersistentVirtualDiskGuid;
1122
+
1123
+///
1124
+/// This GUID defines a RAM Disk supporting an ISO image in persistent memory.
1125
+///
1126
+#define EFI_PERSISTENT_VIRTUAL_CD_GUID      EFI_ACPI_6_0_NFIT_GUID_RAM_DISK_SUPPORTING_VIRTUAL_CD_REGION_PERSISTENT
1127
+
1128
+extern  EFI_GUID                            gEfiPersistentVirtualCdGuid;
1129
+
1130
+///
1131
+/// Media ram disk device path.
1132
+///
1133
+#define MEDIA_RAM_DISK_DP         0x09
1134
+
1135
+///
1136
+/// Used to describe the ram disk device path.
1137
+///
1138
+typedef struct {
1139
+  EFI_DEVICE_PATH_PROTOCOL        Header;
1140
+  ///
1141
+  /// Starting Memory Address.
1142
+  ///
1143
+  UINT32                          StartingAddr[2];
1144
+  ///
1145
+  /// Ending Memory Address.
1146
+  ///
1147
+  UINT32                          EndingAddr[2];
1148
+  ///
1149
+  /// GUID that defines the type of the RAM Disk.
1150
+  ///
1151
+  EFI_GUID                        TypeGuid;
1152
+  ///
1153
+  /// RAM Diskinstance number, if supported. The default value is zero.
1154
+  ///
1155
+  UINT16                          Instance;
1156
+} MEDIA_RAM_DISK_DEVICE_PATH;
1157
+
1019 1158
 ///
1020 1159
 /// BIOS Boot Specification Device Path.
1021 1160
 ///
@@ -1069,6 +1208,7 @@ typedef union {
1069 1208
   VENDOR_DEVICE_PATH                         Vendor;
1070 1209
 
1071 1210
   CONTROLLER_DEVICE_PATH                     Controller;
1211
+  BMC_DEVICE_PATH                            Bmc;
1072 1212
   ACPI_HID_DEVICE_PATH                       Acpi;
1073 1213
   ACPI_EXTENDED_HID_DEVICE_PATH              ExtendedAcpi;
1074 1214
   ACPI_ADR_DEVICE_PATH                       AcpiAdr;
@@ -1096,6 +1236,11 @@ typedef union {
1096 1236
   SAS_DEVICE_PATH                            Sas;
1097 1237
   SASEX_DEVICE_PATH                          SasEx;
1098 1238
   NVME_NAMESPACE_DEVICE_PATH                 NvmeNamespace;
1239
+  URI_DEVICE_PATH                            Uri;
1240
+  BLUETOOTH_DEVICE_PATH                      Bluetooth;
1241
+  WIFI_DEVICE_PATH                           WiFi;
1242
+  UFS_DEVICE_PATH                            Ufs;
1243
+  SD_DEVICE_PATH                             Sd;
1099 1244
   HARDDRIVE_DEVICE_PATH                      HardDrive;
1100 1245
   CDROM_DEVICE_PATH                          CD;
1101 1246
 
@@ -1105,7 +1250,7 @@ typedef union {
1105 1250
   MEDIA_FW_VOL_DEVICE_PATH                   FirmwareVolume;
1106 1251
   MEDIA_FW_VOL_FILEPATH_DEVICE_PATH          FirmwareFile;
1107 1252
   MEDIA_RELATIVE_OFFSET_RANGE_DEVICE_PATH    Offset;
1108
-
1253
+  MEDIA_RAM_DISK_DEVICE_PATH                 RamDisk;
1109 1254
   BBS_BBS_DEVICE_PATH                        Bbs;
1110 1255
 } EFI_DEV_PATH;
1111 1256
 
@@ -1119,6 +1264,7 @@ typedef union {
1119 1264
   VENDOR_DEVICE_PATH                         *Vendor;
1120 1265
 
1121 1266
   CONTROLLER_DEVICE_PATH                     *Controller;
1267
+  BMC_DEVICE_PATH                            *Bmc;
1122 1268
   ACPI_HID_DEVICE_PATH                       *Acpi;
1123 1269
   ACPI_EXTENDED_HID_DEVICE_PATH              *ExtendedAcpi;
1124 1270
   ACPI_ADR_DEVICE_PATH                       *AcpiAdr;
@@ -1146,6 +1292,11 @@ typedef union {
1146 1292
   SAS_DEVICE_PATH                            *Sas;
1147 1293
   SASEX_DEVICE_PATH                          *SasEx;
1148 1294
   NVME_NAMESPACE_DEVICE_PATH                 *NvmeNamespace;
1295
+  URI_DEVICE_PATH                            *Uri;
1296
+  BLUETOOTH_DEVICE_PATH                      *Bluetooth;
1297
+  WIFI_DEVICE_PATH                           *WiFi;
1298
+  UFS_DEVICE_PATH                            *Ufs;
1299
+  SD_DEVICE_PATH                             *Sd;
1149 1300
   HARDDRIVE_DEVICE_PATH                      *HardDrive;
1150 1301
   CDROM_DEVICE_PATH                          *CD;
1151 1302
 
@@ -1155,7 +1306,7 @@ typedef union {
1155 1306
   MEDIA_FW_VOL_DEVICE_PATH                   *FirmwareVolume;
1156 1307
   MEDIA_FW_VOL_FILEPATH_DEVICE_PATH          *FirmwareFile;
1157 1308
   MEDIA_RELATIVE_OFFSET_RANGE_DEVICE_PATH    *Offset;
1158
-
1309
+  MEDIA_RAM_DISK_DEVICE_PATH                 *RamDisk;
1159 1310
   BBS_BBS_DEVICE_PATH                        *Bbs;
1160 1311
   UINT8                                      *Raw;
1161 1312
 } EFI_DEV_PATH_PTR;

+ 2
- 1
src/include/ipxe/efi/Protocol/FormBrowser2.h View File

@@ -4,7 +4,7 @@
4 4
   The EFI_FORM_BROWSER2_PROTOCOL is the interface to call for drivers to
5 5
   leverage the EFI configuration driver interface.
6 6
 
7
-Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>
7
+Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR>
8 8
 This program and the accompanying materials are licensed and made available under
9 9
 the terms and conditions of the BSD License that accompanies this distribution.
10 10
 The full text of the license may be found at
@@ -65,6 +65,7 @@ typedef UINTN EFI_BROWSER_ACTION_REQUEST;
65 65
 #define EFI_BROWSER_ACTION_REQUEST_FORM_DISCARD_EXIT 5
66 66
 #define EFI_BROWSER_ACTION_REQUEST_FORM_APPLY        6
67 67
 #define EFI_BROWSER_ACTION_REQUEST_FORM_DISCARD      7
68
+#define EFI_BROWSER_ACTION_REQUEST_RECONNECT         8
68 69
 
69 70
 
70 71
 /**

+ 14
- 3
src/include/ipxe/efi/Protocol/SimpleTextOut.h View File

@@ -6,7 +6,7 @@
6 6
   a single hardware device or a virtual device that is an aggregation
7 7
   of multiple physical devices.
8 8
 
9
-Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
9
+Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR>
10 10
 This program and the accompanying materials are licensed and made available under
11 11
 the terms and conditions of the BSD License that accompanies this distribution.
12 12
 The full text of the license may be found at
@@ -117,7 +117,7 @@ typedef EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL   SIMPLE_TEXT_OUTPUT_INTERFACE;
117 117
 #define EFI_BROWN                 (EFI_GREEN | EFI_RED)
118 118
 #define EFI_LIGHTGRAY             (EFI_BLUE | EFI_GREEN | EFI_RED)
119 119
 #define EFI_BRIGHT                0x08
120
-#define EFI_DARKGRAY              (EFI_BRIGHT)
120
+#define EFI_DARKGRAY              (EFI_BLACK | EFI_BRIGHT)
121 121
 #define EFI_LIGHTBLUE             (EFI_BLUE | EFI_BRIGHT)
122 122
 #define EFI_LIGHTGREEN            (EFI_GREEN | EFI_BRIGHT)
123 123
 #define EFI_LIGHTCYAN             (EFI_CYAN | EFI_BRIGHT)
@@ -126,7 +126,18 @@ typedef EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL   SIMPLE_TEXT_OUTPUT_INTERFACE;
126 126
 #define EFI_YELLOW                (EFI_BROWN | EFI_BRIGHT)
127 127
 #define EFI_WHITE                 (EFI_BLUE | EFI_GREEN | EFI_RED | EFI_BRIGHT)
128 128
 
129
-#define EFI_TEXT_ATTR(f, b)       ((f) | ((b) << 4))
129
+//
130
+// Macro to accept color values in their raw form to create
131
+// a value that represents both a foreground and background
132
+// color in a single byte.
133
+// For Foreground, and EFI_* value is valid from EFI_BLACK(0x00) to
134
+// EFI_WHITE (0x0F).
135
+// For Background, only EFI_BLACK, EFI_BLUE, EFI_GREEN, EFI_CYAN,
136
+// EFI_RED, EFI_MAGENTA, EFI_BROWN, and EFI_LIGHTGRAY are acceptable
137
+//
138
+// Do not use EFI_BACKGROUND_xxx values with this macro.
139
+//
140
+#define EFI_TEXT_ATTR(Foreground,Background) ((Foreground) | ((Background) << 4))
130 141
 
131 142
 #define EFI_BACKGROUND_BLACK      0x00
132 143
 #define EFI_BACKGROUND_BLUE       0x10

+ 2
- 8
src/include/ipxe/efi/Protocol/TcgService.h View File

@@ -1,8 +1,8 @@
1 1
 /** @file
2
-  TCG Service Protocol as defined in TCG_EFI_Protocol_1_20_Final
2
+  TCG Service Protocol as defined in TCG_EFI_Protocol_1_22_Final
3 3
   See http://trustedcomputinggroup.org for the latest specification
4 4
 
5
-Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>
5
+Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.<BR>
6 6
 This program and the accompanying materials are licensed and made available under
7 7
 the terms and conditions of the BSD License that accompanies this distribution.
8 8
 The full text of the license may be found at
@@ -44,12 +44,6 @@ typedef struct _TCG_EFI_BOOT_SERVICE_CAPABILITY {
44 44
 
45 45
 typedef UINT32   TCG_ALGORITHM_ID;
46 46
 
47
-///
48
-/// Note:
49
-///   Status codes returned for functions of EFI_TCG_PROTOCOL do not exactly match
50
-///   those defined in the TCG EFI Protocol 1.20 Final Specification.
51
-///
52
-
53 47
 /**
54 48
   This service provides EFI protocol capability information, state information
55 49
   about the TPM, and Event Log state information.

+ 66
- 3
src/include/ipxe/efi/Protocol/Usb2HostController.h View File

@@ -4,7 +4,7 @@
4 4
   running in the EFI boot services environment, to perform data transactions over
5 5
   a USB bus. In addition, it provides an abstraction for the root hub of the USB bus.
6 6
 
7
-  Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>
7
+  Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR>
8 8
   This program and the accompanying materials
9 9
   are licensed and made available under the terms and conditions of the BSD License
10 10
   which accompanies this distribution.  The full text of the license may be found at
@@ -415,11 +415,42 @@ EFI_STATUS
415 415
 /**
416 416
   Submits isochronous transfer to an isochronous endpoint of a USB device.
417 417
 
418
+  This function is used to submit isochronous transfer to a target endpoint of a USB device.
419
+  The target endpoint is specified by DeviceAddressand EndpointAddress. Isochronous transfers are
420
+  used when working with isochronous date. It provides periodic, continuous communication between
421
+  the host and a device. Isochronous transfers can beused only by full-speed, high-speed, and
422
+  super-speed devices.
423
+
424
+  High-speed isochronous transfers can be performed using multiple data buffers. The number of
425
+  buffers that are actually prepared for the transfer is specified by DataBuffersNumber. For
426
+  full-speed isochronous transfers this value is ignored.
427
+
428
+  Data represents a list of pointers to the data buffers. For full-speed isochronous transfers
429
+  only the data pointed by Data[0]shall be used. For high-speed isochronous transfers and for
430
+  the split transactions depending on DataLengththere several data buffers canbe used. For the
431
+  high-speed isochronous transfers the total number of buffers must not exceed EFI_USB_MAX_ISO_BUFFER_NUM.
432
+
433
+  For split transactions performed on full-speed device by high-speed host controller the total
434
+  number of buffers is limited to EFI_USB_MAX_ISO_BUFFER_NUM1.
435
+  If the isochronous transfer is successful, then EFI_SUCCESSis returned. The isochronous transfer
436
+  is designed to be completed within one USB frame time, if it cannot be completed, EFI_TIMEOUT
437
+  is returned. If an error other than timeout occurs during the USB transfer, then EFI_DEVICE_ERROR
438
+  is returned and the detailed status code will be returned in TransferResult.
439
+
440
+  EFI_INVALID_PARAMETERis returned if one of the following conditionsis satisfied:
441
+    - Data is NULL.
442
+    - DataLength is 0.
443
+    - DeviceSpeed is not one of the supported values listed above.
444
+    - MaximumPacketLength is invalid. MaximumPacketLength must be 1023 or less for full-speed devices,
445
+      and 1024 or less for high-speed and super-speed devices.
446
+    - TransferResult is NULL.
447
+
418 448
   @param  This                  A pointer to the EFI_USB2_HC_PROTOCOL instance.
419 449
   @param  DeviceAddress         Represents the address of the target device on the USB.
420 450
   @param  EndPointAddress       The combination of an endpoint number and an endpoint direction of the
421 451
                                 target USB device.
422
-  @param  DeviceSpeed           Indicates device speed.
452
+  @param  DeviceSpeed           Indicates device speed. The supported values are EFI_USB_SPEED_FULL,
453
+                                EFI_USB_SPEED_HIGH, or EFI_USB_SPEED_SUPER.
423 454
   @param  MaximumPacketLength   Indicates the maximum packet size the target endpoint is capable of
424 455
                                 sending or receiving.
425 456
   @param  DataBuffersNumber     Number of data buffers prepared for the transfer.
@@ -456,11 +487,43 @@ EFI_STATUS
456 487
 /**
457 488
   Submits nonblocking isochronous transfer to an isochronous endpoint of a USB device.
458 489
 
490
+  This is an asynchronous type of USB isochronous transfer. If the caller submits a USB
491
+  isochronous transfer request through this function, this function will return immediately.
492
+
493
+  When the isochronous transfer completes, the IsochronousCallbackfunction will be triggered,
494
+  the caller can know the transfer results. If the transfer is successful, the caller can get
495
+  the data received or sent in this callback function.
496
+
497
+  The target endpoint is specified by DeviceAddressand EndpointAddress. Isochronous transfers
498
+  are used when working with isochronous date. It provides periodic, continuous communication
499
+  between the host and a device. Isochronous transfers can be used only by full-speed, high-speed,
500
+  and super-speed devices.
501
+
502
+  High-speed isochronous transfers can be performed using multiple data buffers. The number of
503
+  buffers that are actually prepared for the transfer is specified by DataBuffersNumber. For
504
+  full-speed isochronous transfers this value is ignored.
505
+
506
+  Data represents a list of pointers to the data buffers. For full-speed isochronous transfers
507
+  only the data pointed by Data[0] shall be used. For high-speed isochronous transfers and for
508
+  the split transactions depending on DataLength there several data buffers can be used. For
509
+  the high-speed isochronous transfers the total number of buffers must not exceed EFI_USB_MAX_ISO_BUFFER_NUM.
510
+
511
+  For split transactions performed on full-speed device by high-speed host controller the total
512
+  number of buffers is limited to EFI_USB_MAX_ISO_BUFFER_NUM1.
513
+
514
+  EFI_INVALID_PARAMETER is returned if one of the following conditionsis satisfied:
515
+    - Data is NULL.
516
+    - DataLength is 0.
517
+    - DeviceSpeed is not one of the supported values listed above.
518
+    - MaximumPacketLength is invalid. MaximumPacketLength must be 1023 or less for full-speed
519
+      devices and 1024 or less for high-speed and super-speed devices.
520
+
459 521
   @param  This                  A pointer to the EFI_USB2_HC_PROTOCOL instance.
460 522
   @param  DeviceAddress         Represents the address of the target device on the USB.
461 523
   @param  EndPointAddress       The combination of an endpoint number and an endpoint direction of the
462 524
                                 target USB device.
463
-  @param  DeviceSpeed           Indicates device speed.
525
+  @param  DeviceSpeed           Indicates device speed. The supported values are EFI_USB_SPEED_FULL,
526
+                                EFI_USB_SPEED_HIGH, or EFI_USB_SPEED_SUPER.
464 527
   @param  MaximumPacketLength   Indicates the maximum packet size the target endpoint is capable of
465 528
                                 sending or receiving.
466 529
   @param  DataBuffersNumber     Number of data buffers prepared for the transfer.

+ 12
- 5
src/include/ipxe/efi/Uefi/UefiInternalFormRepresentation.h View File

@@ -3,7 +3,7 @@
3 3
   IFR is primarily consumed by the EFI presentation engine, and produced by EFI
4 4
   internal application and drivers as well as all add-in card option-ROM drivers
5 5
 
6
-Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.<BR>
6
+Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR>
7 7
 This program and the accompanying materials are licensed and made available under
8 8
 the terms and conditions of the BSD License that accompanies this distribution.
9 9
 The full text of the license may be found at
@@ -782,6 +782,7 @@ typedef union {
782 782
 #define EFI_IFR_MODAL_TAG_OP           0x61
783 783
 #define EFI_IFR_REFRESH_ID_OP          0x62
784 784
 #define EFI_IFR_WARNING_IF_OP          0x63
785
+#define EFI_IFR_MATCH2_OP              0x64
785 786
 
786 787
 //
787 788
 // Definitions of IFR Standard Headers
@@ -813,10 +814,11 @@ typedef struct _EFI_IFR_QUESTION_HEADER {
813 814
 //
814 815
 // Flag values of EFI_IFR_QUESTION_HEADER
815 816
 //
816
-#define EFI_IFR_FLAG_READ_ONLY         0x01
817
-#define EFI_IFR_FLAG_CALLBACK          0x04
818
-#define EFI_IFR_FLAG_RESET_REQUIRED    0x10
819
-#define EFI_IFR_FLAG_OPTIONS_ONLY      0x80
817
+#define EFI_IFR_FLAG_READ_ONLY          0x01
818
+#define EFI_IFR_FLAG_CALLBACK           0x04
819
+#define EFI_IFR_FLAG_RESET_REQUIRED     0x10
820
+#define EFI_IFR_FLAG_RECONNECT_REQUIRED 0x40
821
+#define EFI_IFR_FLAG_OPTIONS_ONLY       0x80
820 822
 
821 823
 //
822 824
 // Definition for Opcode Reference
@@ -1401,6 +1403,11 @@ typedef struct _EFI_IFR_MATCH {
1401 1403
   EFI_IFR_OP_HEADER        Header;
1402 1404
 } EFI_IFR_MATCH;
1403 1405
 
1406
+typedef struct _EFI_IFR_MATCH2 {
1407
+  EFI_IFR_OP_HEADER        Header;
1408
+  EFI_GUID                 SyntaxType;
1409
+} EFI_IFR_MATCH2;
1410
+
1404 1411
 typedef struct _EFI_IFR_MULTIPLY {
1405 1412
   EFI_IFR_OP_HEADER        Header;
1406 1413
 } EFI_IFR_MULTIPLY;

+ 39
- 1
src/include/ipxe/efi/Uefi/UefiMultiPhase.h View File

@@ -1,7 +1,7 @@
1 1
 /** @file
2 2
   This includes some definitions introduced in UEFI that will be used in both PEI and DXE phases.
3 3
 
4
-Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>
4
+Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR>
5 5
 This program and the accompanying materials are licensed and made available under
6 6
 the terms and conditions of the BSD License that accompanies this distribution.
7 7
 The full text of the license may be found at
@@ -84,9 +84,47 @@ typedef enum {
84 84
   /// Address space reserved by the firmware for code that is part of the processor.
85 85
   ///
86 86
   EfiPalCode,
87
+  ///
88
+  /// A memory region that operates as EfiConventionalMemory,
89
+  /// however it happens to also support byte-addressable non-volatility.
90
+  ///
91
+  EfiPersistentMemory,
87 92
   EfiMaxMemoryType
88 93
 } EFI_MEMORY_TYPE;
89 94
 
95
+///
96
+/// Enumeration of reset types.
97
+///
98
+typedef enum {
99
+  ///
100
+  /// Used to induce a system-wide reset. This sets all circuitry within the
101
+  /// system to its initial state.  This type of reset is asynchronous to system
102
+  /// operation and operates withgout regard to cycle boundaries.  EfiColdReset
103
+  /// is tantamount to a system power cycle.
104
+  ///
105
+  EfiResetCold,
106
+  ///
107
+  /// Used to induce a system-wide initialization. The processors are set to their
108
+  /// initial state, and pending cycles are not corrupted.  If the system does
109
+  /// not support this reset type, then an EfiResetCold must be performed.
110
+  ///
111
+  EfiResetWarm,
112
+  ///
113
+  /// Used to induce an entry into a power state equivalent to the ACPI G2/S5 or G3
114
+  /// state.  If the system does not support this reset type, then when the system
115
+  /// is rebooted, it should exhibit the EfiResetCold attributes.
116
+  ///
117
+  EfiResetShutdown,
118
+  ///
119
+  /// Used to induce a system-wide reset. The exact type of the reset is defined by
120
+  /// the EFI_GUID that follows the Null-terminated Unicode string passed into
121
+  /// ResetData. If the platform does not recognize the EFI_GUID in ResetData the
122
+  /// platform must pick a supported reset type to perform. The platform may
123
+  /// optionally log the parameters from any non-normal reset that occurs.
124
+  ///
125
+  EfiResetPlatformSpecific
126
+} EFI_RESET_TYPE;
127
+
90 128
 ///
91 129
 /// Data structure that precedes all of the standard EFI table types.
92 130
 ///

+ 342
- 298
src/include/ipxe/efi/Uefi/UefiSpec.h
File diff suppressed because it is too large
View File


+ 23
- 3
src/include/ipxe/efi/X64/ProcessorBind.h View File

@@ -1,7 +1,7 @@
1 1
 /** @file
2 2
   Processor or Compiler specific defines and types x64 (Intel 64, AMD64).
3 3
 
4
-  Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.<BR>
4
+  Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR>
5 5
   This program and the accompanying materials
6 6
   are licensed and made available under the terms and conditions of the BSD License
7 7
   which accompanies this distribution.  The full text of the license may be found at
@@ -96,6 +96,26 @@ FILE_LICENCE ( BSD3 );
96 96
 //
97 97
 #pragma warning ( disable : 4206 )
98 98
 
99
+#if _MSC_VER == 1800
100
+
101
+//
102
+// Disable these warnings for VS2013.
103
+//
104
+
105
+//
106
+// This warning is for potentially uninitialized local variable, and it may cause false
107
+// positive issues in VS2013 build
108
+//
109
+#pragma warning ( disable : 4701 )
110
+
111
+//
112
+// This warning is for potentially uninitialized local pointer variable, and it may cause
113
+// false positive issues in VS2013 build
114
+//
115
+#pragma warning ( disable : 4703 )
116
+
117
+#endif
118
+
99 119
 #endif
100 120
 
101 121
 
@@ -251,12 +271,12 @@ typedef INT64   INTN;
251 271
   ///
252 272
 #elif defined(_MSC_EXTENSIONS)
253 273
   ///
254
-  /// Microsoft* compiler specific method for EFIAPI calling convension
274
+  /// Microsoft* compiler specific method for EFIAPI calling convention.
255 275
   ///
256 276
   #define EFIAPI __cdecl
257 277
 #elif defined(__GNUC__)
258 278
   ///
259
-  /// Define the standard calling convention reguardless of optimization level.
279
+  /// Define the standard calling convention regardless of optimization level.
260 280
   /// The GCC support assumes a GCC compiler that supports the EFI ABI. The EFI
261 281
   /// ABI is much closer to the x64 Microsoft* ABI than standard x64 (x86-64)
262 282
   /// GCC ABI. Thus a standard x64 (x86-64) GCC compiler can not be used for

Loading…
Cancel
Save