Browse Source

[efi] Update to current EDK2 headers

Signed-off-by: Michael Brown <mcb30@ipxe.org>
tags/v1.20.1
Michael Brown 7 years ago
parent
commit
0463ec32c7

+ 6
- 0
src/include/ipxe/efi/AArch64/ProcessorBind.h View File

106
 ///
106
 ///
107
 #define CPU_STACK_ALIGNMENT  16
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
 // Modifier to ensure that all protocol member functions and EFI intrinsics
116
 // Modifier to ensure that all protocol member functions and EFI intrinsics
111
 // use the correct C calling convention. All protocol member functions and
117
 // use the correct C calling convention. All protocol member functions and

+ 6
- 0
src/include/ipxe/efi/Arm/ProcessorBind.h View File

112
 ///
112
 ///
113
 #define CPU_STACK_ALIGNMENT  sizeof(UINT64)
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
 // Modifier to ensure that all protocol member functions and EFI intrinsics
122
 // Modifier to ensure that all protocol member functions and EFI intrinsics
117
 // use the correct C calling convention. All protocol member functions and
123
 // use the correct C calling convention. All protocol member functions and

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

6
   environment. There are a set of base libraries in the Mde Package that can
6
   environment. There are a set of base libraries in the Mde Package that can
7
   be used to implement base modules.
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
 Portions copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>
10
 Portions copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>
11
 This program and the accompanying materials
11
 This program and the accompanying materials
12
 are licensed and made available under the terms and conditions of the BSD License
12
 are licensed and made available under the terms and conditions of the BSD License
65
 VERIFY_SIZE_OF (CHAR8, 1);
65
 VERIFY_SIZE_OF (CHAR8, 1);
66
 VERIFY_SIZE_OF (CHAR16, 2);
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
 // The Microsoft* C compiler can removed references to unreferenced data items
92
 // The Microsoft* C compiler can removed references to unreferenced data items
70
 //  if the /OPT:REF linker option is used. We defined a macro as this is a
93
 //  if the /OPT:REF linker option is used. We defined a macro as this is a
244
   UINT8   Data4[8];
267
   UINT8   Data4[8];
245
 } GUID;
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
 // 8-bytes unsigned value that represents a physical system address.
285
 // 8-bytes unsigned value that represents a physical system address.
249
 //
286
 //
324
 ///
361
 ///
325
 #define NULL  ((VOID *) 0)
362
 #define NULL  ((VOID *) 0)
326
 
363
 
364
+//
365
+// Null character
366
+//
367
+#define CHAR_NULL             0x0000
368
+
327
 ///
369
 ///
328
 /// Maximum values for common UEFI Data Types
370
 /// Maximum values for common UEFI Data Types
329
 ///
371
 ///
1213
   #define RETURN_ADDRESS(L)     ((VOID *) 0)
1255
   #define RETURN_ADDRESS(L)     ((VOID *) 0)
1214
 #endif
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
 #endif
1271
 #endif
1217
 
1272
 

+ 6
- 0
src/include/ipxe/efi/Ia32/ProcessorBind.h View File

259
 ///
259
 ///
260
 #define CPU_STACK_ALIGNMENT   sizeof(UINTN)
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
 // Modifier to ensure that all protocol member functions and EFI intrinsics
269
 // Modifier to ensure that all protocol member functions and EFI intrinsics
264
 // use the correct C calling convention. All protocol member functions and
270
 // use the correct C calling convention. All protocol member functions and

+ 4
- 4
src/include/ipxe/efi/IndustryStandard/Acpi51.h View File

1
 /** @file
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
   Copyright (c) 2014 Hewlett-Packard Development Company, L.P.<BR>
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
   (C) Copyright 2015 Hewlett Packard Enterprise Development LP<BR>
6
   (C) Copyright 2015 Hewlett Packard Enterprise Development LP<BR>
7
   This program and the accompanying materials
7
   This program and the accompanying materials
8
   are licensed and made available under the terms and conditions of the BSD License
8
   are licensed and made available under the terms and conditions of the BSD License
539
 ///
539
 ///
540
 /// GIC Version
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
 #define EFI_ACPI_5_1_GIC_V3                                   0x03
544
 #define EFI_ACPI_5_1_GIC_V3                                   0x03
545
 #define EFI_ACPI_5_1_GIC_V4                                   0x04
545
 #define EFI_ACPI_5_1_GIC_V4                                   0x04
546
 
546
 

+ 6
- 6
src/include/ipxe/efi/IndustryStandard/Acpi60.h View File

1
 /** @file
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
   (C) Copyright 2015-2016 Hewlett Packard Enterprise Development LP<BR>
5
   (C) Copyright 2015-2016 Hewlett Packard Enterprise Development LP<BR>
6
   This program and the accompanying materials
6
   This program and the accompanying materials
7
   are licensed and made available under the terms and conditions of the BSD License
7
   are licensed and made available under the terms and conditions of the BSD License
292
 } EFI_ACPI_6_0_MULTIPLE_APIC_DESCRIPTION_TABLE_HEADER;
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
 /// Multiple APIC Flags
300
 /// Multiple APIC Flags
2254
 #define EFI_ACPI_6_0_ISCSI_BOOT_FIRMWARE_TABLE_SIGNATURE  SIGNATURE_32('i', 'B', 'F', 'T')
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
 /// "IVRS" I/O Virtualization Reporting Structure
2262
 /// "IVRS" I/O Virtualization Reporting Structure

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

7
     PC Card Standard, 8.0
7
     PC Card Standard, 8.0
8
     PCI Power Management Interface Specifiction, Revision 1.2
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
   Copyright (c) 2014 - 2015, Hewlett-Packard Development Company, L.P.<BR>
11
   Copyright (c) 2014 - 2015, Hewlett-Packard Development Company, L.P.<BR>
12
   This program and the accompanying materials
12
   This program and the accompanying materials
13
   are licensed and made available under the terms and conditions of the BSD License
13
   are licensed and made available under the terms and conditions of the BSD License
782
   ///
782
   ///
783
 } EFI_PCI_CAPABILITY_HOTPLUG;
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
 #define PCI_BAR_IDX0        0x00
785
 #define PCI_BAR_IDX0        0x00
795
 #define PCI_BAR_IDX1        0x01
786
 #define PCI_BAR_IDX1        0x01
796
 #define PCI_BAR_IDX2        0x02
787
 #define PCI_BAR_IDX2        0x02
797
 #define PCI_BAR_IDX3        0x03
788
 #define PCI_BAR_IDX3        0x03
798
 #define PCI_BAR_IDX4        0x04
789
 #define PCI_BAR_IDX4        0x04
799
 #define PCI_BAR_IDX5        0x05
790
 #define PCI_BAR_IDX5        0x05
800
-#define PCI_BAR_ALL         0xFF
801
 
791
 
802
 ///
792
 ///
803
 /// EFI PCI Option ROM definitions
793
 /// EFI PCI Option ROM definitions

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

1
 /** @file
1
 /** @file
2
   TCG EFI Platform Definition in TCG_EFI_Platform_1_20_Final
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
   This program and the accompanying materials
5
   This program and the accompanying materials
6
   are licensed and made available under the terms and conditions of the BSD License
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
7
   which accompanies this distribution.  The full text of the license may be found at
153
 /// This structure serves as the header for measuring variables. The name of the
153
 /// This structure serves as the header for measuring variables. The name of the
154
 /// variable (in Unicode format) should immediately follow, then the variable
154
 /// variable (in Unicode format) should immediately follow, then the variable
155
 /// data.
155
 /// data.
156
+/// This is defined in TCG EFI Platform Spec for TPM1.1 or 1.2 V1.22
156
 ///
157
 ///
157
 typedef struct tdEFI_VARIABLE_DATA {
158
 typedef struct tdEFI_VARIABLE_DATA {
158
   EFI_GUID                          VariableName;
159
   EFI_GUID                          VariableName;
162
   INT8                              VariableData[1];  ///< Driver or platform-specific data
163
   INT8                              VariableData[1];  ///< Driver or platform-specific data
163
 } EFI_VARIABLE_DATA;
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
 // For TrEE1.0 compatibility
183
 // For TrEE1.0 compatibility
167
 //
184
 //
190
   UINT8               Event[1];
207
   UINT8               Event[1];
191
 } TCG_PCR_EVENT2;
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
 // Log Header Entry Data
222
 // Log Header Entry Data
195
 //
223
 //
270
 //UINT8               vendorInfo[vendorInfoSize];
298
 //UINT8               vendorInfo[vendorInfoSize];
271
 } TCG_EfiSpecIDEventStruct;
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
 // Restore original structure alignment
329
 // Restore original structure alignment
275
 //
330
 //

+ 1078
- 11
src/include/ipxe/efi/Library/BaseLib.h
File diff suppressed because it is too large
View File


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

216
 
216
 
217
   @param Handle               An array of EFI_HII_HANDLE instances returned.
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
                                 HandleBufferLength is updated with the actual length.
220
                                 HandleBufferLength is updated with the actual length.
221
   @retval EFI_BUFFER_TOO_SMALL  The HandleBufferLength parameter
221
   @retval EFI_BUFFER_TOO_SMALL  The HandleBufferLength parameter
222
                                 indicates that Handle is too
222
                                 indicates that Handle is too
275
 
275
 
276
   @retval EFI_OUT_OF_RESOURCES  BufferSize is too small to hold the package.
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
                                 current database.
279
                                 current database.
280
 
280
 
281
   @retval EFI_INVALID_PARAMETER BufferSize was NULL.
281
   @retval EFI_INVALID_PARAMETER BufferSize was NULL.

+ 0
- 1
src/include/ipxe/efi/Protocol/SimpleTextIn.h View File

48
 //
48
 //
49
 // Required unicode control chars
49
 // Required unicode control chars
50
 //
50
 //
51
-#define CHAR_NULL             0x0000
52
 #define CHAR_BACKSPACE        0x0008
51
 #define CHAR_BACKSPACE        0x0008
53
 #define CHAR_TAB              0x0009
52
 #define CHAR_TAB              0x0009
54
 #define CHAR_LINEFEED         0x000A
53
 #define CHAR_LINEFEED         0x000A

+ 3
- 7
src/include/ipxe/efi/Uefi/UefiBaseType.h View File

1
 /** @file
1
 /** @file
2
   Defines data types and constants introduced in UEFI.
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
 Portions copyright (c) 2011 - 2016, ARM Ltd. All rights reserved.<BR>
5
 Portions copyright (c) 2011 - 2016, ARM Ltd. All rights reserved.<BR>
6
 
6
 
7
 This program and the accompanying materials are licensed and made available under
7
 This program and the accompanying materials are licensed and made available under
89
 ///
89
 ///
90
 /// 4-byte buffer. An IPv4 internet protocol address.
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
 /// 16-byte buffer. An IPv6 internet protocol address.
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
 /// 32-byte buffer containing a network Media Access Control address.
100
 /// 32-byte buffer containing a network Media Access Control address.

+ 6
- 0
src/include/ipxe/efi/X64/ProcessorBind.h View File

273
 ///
273
 ///
274
 #define CPU_STACK_ALIGNMENT   16
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
 // Modifier to ensure that all protocol member functions and EFI intrinsics
283
 // Modifier to ensure that all protocol member functions and EFI intrinsics
278
 // use the correct C calling convention. All protocol member functions and
284
 // use the correct C calling convention. All protocol member functions and

+ 3
- 0
src/include/ipxe/efi/efi.h View File

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

Loading…
Cancel
Save