Преглед на файлове

[efi] Update to current EDK2 headers

Signed-off-by: Michael Brown <mcb30@ipxe.org>
tags/v1.20.1
Michael Brown преди 7 години
родител
ревизия
0463ec32c7

+ 6
- 0
src/include/ipxe/efi/AArch64/ProcessorBind.h Целия файл

@@ -106,6 +106,12 @@ typedef INT64   INTN;
106 106
 ///
107 107
 #define CPU_STACK_ALIGNMENT  16
108 108
 
109
+///
110
+/// Page allocation granularity for AARCH64
111
+///
112
+#define DEFAULT_PAGE_ALLOCATION_GRANULARITY   (0x1000)
113
+#define RUNTIME_PAGE_ALLOCATION_GRANULARITY   (0x10000)
114
+
109 115
 //
110 116
 // Modifier to ensure that all protocol member functions and EFI intrinsics
111 117
 // use the correct C calling convention. All protocol member functions and

+ 6
- 0
src/include/ipxe/efi/Arm/ProcessorBind.h Целия файл

@@ -112,6 +112,12 @@ typedef INT32   INTN;
112 112
 ///
113 113
 #define CPU_STACK_ALIGNMENT  sizeof(UINT64)
114 114
 
115
+///
116
+/// Page allocation granularity for ARM
117
+///
118
+#define DEFAULT_PAGE_ALLOCATION_GRANULARITY   (0x1000)
119
+#define RUNTIME_PAGE_ALLOCATION_GRANULARITY   (0x1000)
120
+
115 121
 //
116 122
 // Modifier to ensure that all protocol member functions and EFI intrinsics
117 123
 // use the correct C calling convention. All protocol member functions and

+ 56
- 1
src/include/ipxe/efi/Base.h Целия файл

@@ -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 - 2016, Intel Corporation. All rights reserved.<BR>
9
+Copyright (c) 2006 - 2017, 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
@@ -65,6 +65,29 @@ VERIFY_SIZE_OF (UINT64, 8);
65 65
 VERIFY_SIZE_OF (CHAR8, 1);
66 66
 VERIFY_SIZE_OF (CHAR16, 2);
67 67
 
68
+//
69
+// The following three enum types are used to verify that the compiler
70
+// configuration for enum types is compliant with Section 2.3.1 of the
71
+// UEFI 2.3 Specification. These enum types and enum values are not
72
+// intended to be used. A prefix of '__' is used avoid conflicts with
73
+// other types.
74
+//
75
+typedef enum {
76
+  __VerifyUint8EnumValue = 0xff
77
+} __VERIFY_UINT8_ENUM_SIZE;
78
+
79
+typedef enum {
80
+  __VerifyUint16EnumValue = 0xffff
81
+} __VERIFY_UINT16_ENUM_SIZE;
82
+
83
+typedef enum {
84
+  __VerifyUint32EnumValue = 0xffffffff
85
+} __VERIFY_UINT32_ENUM_SIZE;
86
+
87
+VERIFY_SIZE_OF (__VERIFY_UINT8_ENUM_SIZE, 4);
88
+VERIFY_SIZE_OF (__VERIFY_UINT16_ENUM_SIZE, 4);
89
+VERIFY_SIZE_OF (__VERIFY_UINT32_ENUM_SIZE, 4);
90
+
68 91
 //
69 92
 // The Microsoft* C compiler can removed references to unreferenced data items
70 93
 //  if the /OPT:REF linker option is used. We defined a macro as this is a
@@ -244,6 +267,20 @@ typedef struct {
244 267
   UINT8   Data4[8];
245 268
 } GUID;
246 269
 
270
+///
271
+/// 4-byte buffer. An IPv4 internet protocol address.
272
+///
273
+typedef struct {
274
+  UINT8 Addr[4];
275
+} IPv4_ADDRESS;
276
+
277
+///
278
+/// 16-byte buffer. An IPv6 internet protocol address.
279
+///
280
+typedef struct {
281
+  UINT8 Addr[16];
282
+} IPv6_ADDRESS;
283
+
247 284
 //
248 285
 // 8-bytes unsigned value that represents a physical system address.
249 286
 //
@@ -324,6 +361,11 @@ struct _LIST_ENTRY {
324 361
 ///
325 362
 #define NULL  ((VOID *) 0)
326 363
 
364
+//
365
+// Null character
366
+//
367
+#define CHAR_NULL             0x0000
368
+
327 369
 ///
328 370
 /// Maximum values for common UEFI Data Types
329 371
 ///
@@ -1213,5 +1255,18 @@ typedef UINTN RETURN_STATUS;
1213 1255
   #define RETURN_ADDRESS(L)     ((VOID *) 0)
1214 1256
 #endif
1215 1257
 
1258
+/**
1259
+  Return the number of elements in an array.
1260
+
1261
+  @param  Array  An object of array type. Array is only used as an argument to
1262
+                 the sizeof operator, therefore Array is never evaluated. The
1263
+                 caller is responsible for ensuring that Array's type is not
1264
+                 incomplete; that is, Array must have known constant size.
1265
+
1266
+  @return The number of elements in Array. The result has type UINTN.
1267
+
1268
+**/
1269
+#define ARRAY_SIZE(Array) (sizeof (Array) / sizeof ((Array)[0]))
1270
+
1216 1271
 #endif
1217 1272
 

+ 6
- 0
src/include/ipxe/efi/Ia32/ProcessorBind.h Целия файл

@@ -259,6 +259,12 @@ typedef INT32   INTN;
259 259
 ///
260 260
 #define CPU_STACK_ALIGNMENT   sizeof(UINTN)
261 261
 
262
+///
263
+/// Page allocation granularity for IA-32.
264
+///
265
+#define DEFAULT_PAGE_ALLOCATION_GRANULARITY   (0x1000)
266
+#define RUNTIME_PAGE_ALLOCATION_GRANULARITY   (0x1000)
267
+
262 268
 //
263 269
 // Modifier to ensure that all protocol member functions and EFI intrinsics
264 270
 // use the correct C calling convention. All protocol member functions and

+ 4
- 4
src/include/ipxe/efi/IndustryStandard/Acpi51.h Целия файл

@@ -1,8 +1,8 @@
1 1
 /** @file
2
-  ACPI 5.1 definitions from the ACPI Specification Revision 5.1 July, 2014.
2
+  ACPI 5.1 definitions from the ACPI Specification Revision 5.1 Errata B January, 2016.
3 3
 
4 4
   Copyright (c) 2014 Hewlett-Packard Development Company, L.P.<BR>
5
-  Copyright (c) 2014 - 2015, Intel Corporation. All rights reserved.<BR>
5
+  Copyright (c) 2014 - 2016, Intel Corporation. All rights reserved.<BR>
6 6
   (C) Copyright 2015 Hewlett Packard Enterprise Development LP<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
@@ -539,8 +539,8 @@ typedef struct {
539 539
 ///
540 540
 /// GIC Version
541 541
 ///
542
-#define EFI_ACPI_5_1_GIC_V2                                   0x01
543
-#define EFI_ACPI_5_1_GIC_V2m                                  0x02
542
+#define EFI_ACPI_5_1_GIC_V1                                   0x01
543
+#define EFI_ACPI_5_1_GIC_V2                                   0x02
544 544
 #define EFI_ACPI_5_1_GIC_V3                                   0x03
545 545
 #define EFI_ACPI_5_1_GIC_V4                                   0x04
546 546
 

+ 6
- 6
src/include/ipxe/efi/IndustryStandard/Acpi60.h Целия файл

@@ -1,7 +1,7 @@
1 1
 /** @file
2
-  ACPI 6.0 definitions from the ACPI Specification Revision 6.0 April, 2015.
2
+  ACPI 6.0 definitions from the ACPI Specification Revision 6.0 Errata A January, 2016.
3 3
 
4
-  Copyright (c) 2015 - 2016, Intel Corporation. All rights reserved.<BR>
4
+  Copyright (c) 2015 - 2017, Intel Corporation. All rights reserved.<BR>
5 5
   (C) Copyright 2015-2016 Hewlett Packard Enterprise Development LP<BR>
6 6
   This program and the accompanying materials
7 7
   are licensed and made available under the terms and conditions of the BSD License
@@ -292,9 +292,9 @@ typedef struct {
292 292
 } EFI_ACPI_6_0_MULTIPLE_APIC_DESCRIPTION_TABLE_HEADER;
293 293
 
294 294
 ///
295
-/// MADT Revision (as defined in ACPI 6.0 spec.)
295
+/// MADT Revision (as defined in ACPI 6.0 Errata A spec.)
296 296
 ///
297
-#define EFI_ACPI_6_0_MULTIPLE_APIC_DESCRIPTION_TABLE_REVISION 0x03
297
+#define EFI_ACPI_6_0_MULTIPLE_APIC_DESCRIPTION_TABLE_REVISION 0x04
298 298
 
299 299
 ///
300 300
 /// Multiple APIC Flags
@@ -2254,9 +2254,9 @@ typedef struct {
2254 2254
 #define EFI_ACPI_6_0_ISCSI_BOOT_FIRMWARE_TABLE_SIGNATURE  SIGNATURE_32('i', 'B', 'F', 'T')
2255 2255
 
2256 2256
 ///
2257
-/// "IORT" Interrupt Source Override
2257
+/// "IORT" I/O Remapping Table
2258 2258
 ///
2259
-#define EFI_ACPI_6_0_INTERRUPT_SOURCE_OVERRIDE_SIGNATURE  SIGNATURE_32('I', 'O', 'R', 'T')
2259
+#define EFI_ACPI_6_0_IO_REMAPPING_TABLE_SIGNATURE  SIGNATURE_32('I', 'O', 'R', 'T')
2260 2260
 
2261 2261
 ///
2262 2262
 /// "IVRS" I/O Virtualization Reporting Structure

+ 1
- 11
src/include/ipxe/efi/IndustryStandard/Pci22.h Целия файл

@@ -7,7 +7,7 @@
7 7
     PC Card Standard, 8.0
8 8
     PCI Power Management Interface Specifiction, Revision 1.2
9 9
 
10
-  Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR>
10
+  Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.<BR>
11 11
   Copyright (c) 2014 - 2015, Hewlett-Packard Development Company, L.P.<BR>
12 12
   This program and the accompanying materials
13 13
   are licensed and made available under the terms and conditions of the BSD License
@@ -782,22 +782,12 @@ typedef struct {
782 782
   ///
783 783
 } EFI_PCI_CAPABILITY_HOTPLUG;
784 784
 
785
-#define DEVICE_ID_NOCARE    0xFFFF
786
-
787
-#define PCI_ACPI_UNUSED     0
788
-#define PCI_BAR_NOCHANGE    0
789
-#define PCI_BAR_OLD_ALIGN   0xFFFFFFFFFFFFFFFFULL
790
-#define PCI_BAR_EVEN_ALIGN  0xFFFFFFFFFFFFFFFEULL
791
-#define PCI_BAR_SQUAD_ALIGN 0xFFFFFFFFFFFFFFFDULL
792
-#define PCI_BAR_DQUAD_ALIGN 0xFFFFFFFFFFFFFFFCULL
793
-
794 785
 #define PCI_BAR_IDX0        0x00
795 786
 #define PCI_BAR_IDX1        0x01
796 787
 #define PCI_BAR_IDX2        0x02
797 788
 #define PCI_BAR_IDX3        0x03
798 789
 #define PCI_BAR_IDX4        0x04
799 790
 #define PCI_BAR_IDX5        0x05
800
-#define PCI_BAR_ALL         0xFF
801 791
 
802 792
 ///
803 793
 /// EFI PCI Option ROM definitions

+ 56
- 1
src/include/ipxe/efi/IndustryStandard/UefiTcgPlatform.h Целия файл

@@ -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 - 2015, Intel Corporation. All rights reserved.<BR>
4
+  Copyright (c) 2006 - 2017, 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
@@ -153,6 +153,7 @@ typedef struct tdEFI_HANDOFF_TABLE_POINTERS {
153 153
 /// This structure serves as the header for measuring variables. The name of the
154 154
 /// variable (in Unicode format) should immediately follow, then the variable
155 155
 /// data.
156
+/// This is defined in TCG EFI Platform Spec for TPM1.1 or 1.2 V1.22
156 157
 ///
157 158
 typedef struct tdEFI_VARIABLE_DATA {
158 159
   EFI_GUID                          VariableName;
@@ -162,6 +163,22 @@ typedef struct tdEFI_VARIABLE_DATA {
162 163
   INT8                              VariableData[1];  ///< Driver or platform-specific data
163 164
 } EFI_VARIABLE_DATA;
164 165
 
166
+///
167
+/// UEFI_VARIABLE_DATA
168
+///
169
+/// This structure serves as the header for measuring variables. The name of the
170
+/// variable (in Unicode format) should immediately follow, then the variable
171
+/// data.
172
+/// This is defined in TCG PC Client Firmware Profile Spec 00.21
173
+///
174
+typedef struct tdUEFI_VARIABLE_DATA {
175
+  EFI_GUID                          VariableName;
176
+  UINT64                            UnicodeNameLength;
177
+  UINT64                            VariableDataLength;
178
+  CHAR16                            UnicodeName[1];
179
+  INT8                              VariableData[1];  ///< Driver or platform-specific data
180
+} UEFI_VARIABLE_DATA;
181
+
165 182
 //
166 183
 // For TrEE1.0 compatibility
167 184
 //
@@ -190,6 +207,17 @@ typedef struct tdTCG_PCR_EVENT2 {
190 207
   UINT8               Event[1];
191 208
 } TCG_PCR_EVENT2;
192 209
 
210
+//
211
+// TCG PCR Event2 Header
212
+// Follow TCG EFI Protocol Spec 5.2 Crypto Agile Log Entry Format
213
+//
214
+typedef struct tdTCG_PCR_EVENT2_HDR{
215
+  TCG_PCRINDEX        PCRIndex;
216
+  TCG_EVENTTYPE       EventType;
217
+  TPML_DIGEST_VALUES  Digests;
218
+  UINT32              EventSize;
219
+} TCG_PCR_EVENT2_HDR;
220
+
193 221
 //
194 222
 // Log Header Entry Data
195 223
 //
@@ -270,6 +298,33 @@ typedef struct {
270 298
 //UINT8               vendorInfo[vendorInfoSize];
271 299
 } TCG_EfiSpecIDEventStruct;
272 300
 
301
+
302
+
303
+#define TCG_EfiStartupLocalityEvent_SIGNATURE      "StartupLocality"
304
+
305
+
306
+//
307
+// PC Client PTP spec Table 8 Relationship between Locality and Locality Attribute
308
+//
309
+#define LOCALITY_0_INDICATOR        0x01
310
+#define LOCALITY_1_INDICATOR        0x02
311
+#define LOCALITY_2_INDICATOR        0x03
312
+#define LOCALITY_3_INDICATOR        0x04
313
+#define LOCALITY_4_INDICATOR        0x05
314
+
315
+
316
+//
317
+// Startup Locality Event
318
+//
319
+typedef struct tdTCG_EfiStartupLocalityEvent{
320
+  UINT8       Signature[16];
321
+  //
322
+  // The Locality Indicator which sent the TPM2_Startup command
323
+  //
324
+  UINT8       StartupLocality;
325
+} TCG_EfiStartupLocalityEvent;
326
+
327
+
273 328
 //
274 329
 // Restore original structure alignment
275 330
 //

+ 1078
- 11
src/include/ipxe/efi/Library/BaseLib.h
Файловите разлики са ограничени, защото са твърде много
Целия файл


+ 2
- 2
src/include/ipxe/efi/Protocol/HiiDatabase.h Целия файл

@@ -216,7 +216,7 @@ EFI_STATUS
216 216
 
217 217
   @param Handle               An array of EFI_HII_HANDLE instances returned.
218 218
 
219
-  @retval EFI_SUCCESS           The matching handles are outputed successfully.
219
+  @retval EFI_SUCCESS           The matching handles are outputted successfully.
220 220
                                 HandleBufferLength is updated with the actual length.
221 221
   @retval EFI_BUFFER_TOO_SMALL  The HandleBufferLength parameter
222 222
                                 indicates that Handle is too
@@ -275,7 +275,7 @@ EFI_STATUS
275 275
 
276 276
   @retval EFI_OUT_OF_RESOURCES  BufferSize is too small to hold the package.
277 277
 
278
-  @retval EFI_NOT_FOUND         The specifiecd Handle could not be found in the
278
+  @retval EFI_NOT_FOUND         The specified Handle could not be found in the
279 279
                                 current database.
280 280
 
281 281
   @retval EFI_INVALID_PARAMETER BufferSize was NULL.

+ 0
- 1
src/include/ipxe/efi/Protocol/SimpleTextIn.h Целия файл

@@ -48,7 +48,6 @@ typedef struct {
48 48
 //
49 49
 // Required unicode control chars
50 50
 //
51
-#define CHAR_NULL             0x0000
52 51
 #define CHAR_BACKSPACE        0x0008
53 52
 #define CHAR_TAB              0x0009
54 53
 #define CHAR_LINEFEED         0x000A

+ 3
- 7
src/include/ipxe/efi/Uefi/UefiBaseType.h Целия файл

@@ -1,7 +1,7 @@
1 1
 /** @file
2 2
   Defines data types and constants introduced in UEFI.
3 3
 
4
-Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR>
4
+Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.<BR>
5 5
 Portions copyright (c) 2011 - 2016, ARM Ltd. All rights reserved.<BR>
6 6
 
7 7
 This program and the accompanying materials are licensed and made available under
@@ -89,16 +89,12 @@ typedef struct {
89 89
 ///
90 90
 /// 4-byte buffer. An IPv4 internet protocol address.
91 91
 ///
92
-typedef struct {
93
-  UINT8 Addr[4];
94
-} EFI_IPv4_ADDRESS;
92
+typedef IPv4_ADDRESS EFI_IPv4_ADDRESS;
95 93
 
96 94
 ///
97 95
 /// 16-byte buffer. An IPv6 internet protocol address.
98 96
 ///
99
-typedef struct {
100
-  UINT8 Addr[16];
101
-} EFI_IPv6_ADDRESS;
97
+typedef IPv6_ADDRESS EFI_IPv6_ADDRESS;
102 98
 
103 99
 ///
104 100
 /// 32-byte buffer containing a network Media Access Control address.

+ 6
- 0
src/include/ipxe/efi/X64/ProcessorBind.h Целия файл

@@ -273,6 +273,12 @@ typedef INT64   INTN;
273 273
 ///
274 274
 #define CPU_STACK_ALIGNMENT   16
275 275
 
276
+///
277
+/// Page allocation granularity for x64
278
+///
279
+#define DEFAULT_PAGE_ALLOCATION_GRANULARITY   (0x1000)
280
+#define RUNTIME_PAGE_ALLOCATION_GRANULARITY   (0x1000)
281
+
276 282
 //
277 283
 // Modifier to ensure that all protocol member functions and EFI intrinsics
278 284
 // use the correct C calling convention. All protocol member functions and

+ 3
- 0
src/include/ipxe/efi/efi.h Целия файл

@@ -26,6 +26,9 @@ FILE_LICENCE ( GPL2_OR_LATER );
26 26
 /* EFI headers rudely redefine NULL */
27 27
 #undef NULL
28 28
 
29
+/* EFI headers redefine ARRAY_SIZE */
30
+#undef ARRAY_SIZE
31
+
29 32
 /* EFI headers expect ICC to define __GNUC__ */
30 33
 #if defined ( __ICC ) && ! defined ( __GNUC__ )
31 34
 #define __GNUC__ 1

Loading…
Отказ
Запис