david/ipxe
david
/
ipxe
Archived
1
0
Fork 0

[efi] Update to current EDK2 headers

Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
Michael Brown 2017-03-10 21:18:03 +00:00
parent afdebdc163
commit 0463ec32c7
14 changed files with 1233 additions and 44 deletions

View File

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

View File

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

View File

@ -6,7 +6,7 @@
environment. There are a set of base libraries in the Mde Package that can
be used to implement base modules.
Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR>
Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.<BR>
Portions copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
@ -65,6 +65,29 @@ VERIFY_SIZE_OF (UINT64, 8);
VERIFY_SIZE_OF (CHAR8, 1);
VERIFY_SIZE_OF (CHAR16, 2);
//
// The following three enum types are used to verify that the compiler
// configuration for enum types is compliant with Section 2.3.1 of the
// UEFI 2.3 Specification. These enum types and enum values are not
// intended to be used. A prefix of '__' is used avoid conflicts with
// other types.
//
typedef enum {
__VerifyUint8EnumValue = 0xff
} __VERIFY_UINT8_ENUM_SIZE;
typedef enum {
__VerifyUint16EnumValue = 0xffff
} __VERIFY_UINT16_ENUM_SIZE;
typedef enum {
__VerifyUint32EnumValue = 0xffffffff
} __VERIFY_UINT32_ENUM_SIZE;
VERIFY_SIZE_OF (__VERIFY_UINT8_ENUM_SIZE, 4);
VERIFY_SIZE_OF (__VERIFY_UINT16_ENUM_SIZE, 4);
VERIFY_SIZE_OF (__VERIFY_UINT32_ENUM_SIZE, 4);
//
// The Microsoft* C compiler can removed references to unreferenced data items
// if the /OPT:REF linker option is used. We defined a macro as this is a
@ -244,6 +267,20 @@ typedef struct {
UINT8 Data4[8];
} GUID;
///
/// 4-byte buffer. An IPv4 internet protocol address.
///
typedef struct {
UINT8 Addr[4];
} IPv4_ADDRESS;
///
/// 16-byte buffer. An IPv6 internet protocol address.
///
typedef struct {
UINT8 Addr[16];
} IPv6_ADDRESS;
//
// 8-bytes unsigned value that represents a physical system address.
//
@ -324,6 +361,11 @@ struct _LIST_ENTRY {
///
#define NULL ((VOID *) 0)
//
// Null character
//
#define CHAR_NULL 0x0000
///
/// Maximum values for common UEFI Data Types
///
@ -1213,5 +1255,18 @@ typedef UINTN RETURN_STATUS;
#define RETURN_ADDRESS(L) ((VOID *) 0)
#endif
/**
Return the number of elements in an array.
@param Array An object of array type. Array is only used as an argument to
the sizeof operator, therefore Array is never evaluated. The
caller is responsible for ensuring that Array's type is not
incomplete; that is, Array must have known constant size.
@return The number of elements in Array. The result has type UINTN.
**/
#define ARRAY_SIZE(Array) (sizeof (Array) / sizeof ((Array)[0]))
#endif

View File

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

View File

@ -1,8 +1,8 @@
/** @file
ACPI 5.1 definitions from the ACPI Specification Revision 5.1 July, 2014.
ACPI 5.1 definitions from the ACPI Specification Revision 5.1 Errata B January, 2016.
Copyright (c) 2014 Hewlett-Packard Development Company, L.P.<BR>
Copyright (c) 2014 - 2015, Intel Corporation. All rights reserved.<BR>
Copyright (c) 2014 - 2016, Intel Corporation. All rights reserved.<BR>
(C) Copyright 2015 Hewlett Packard Enterprise Development LP<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
@ -539,8 +539,8 @@ typedef struct {
///
/// GIC Version
///
#define EFI_ACPI_5_1_GIC_V2 0x01
#define EFI_ACPI_5_1_GIC_V2m 0x02
#define EFI_ACPI_5_1_GIC_V1 0x01
#define EFI_ACPI_5_1_GIC_V2 0x02
#define EFI_ACPI_5_1_GIC_V3 0x03
#define EFI_ACPI_5_1_GIC_V4 0x04

View File

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

View File

@ -7,7 +7,7 @@
PC Card Standard, 8.0
PCI Power Management Interface Specifiction, Revision 1.2
Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR>
Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.<BR>
Copyright (c) 2014 - 2015, Hewlett-Packard Development Company, L.P.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
@ -782,22 +782,12 @@ typedef struct {
///
} EFI_PCI_CAPABILITY_HOTPLUG;
#define DEVICE_ID_NOCARE 0xFFFF
#define PCI_ACPI_UNUSED 0
#define PCI_BAR_NOCHANGE 0
#define PCI_BAR_OLD_ALIGN 0xFFFFFFFFFFFFFFFFULL
#define PCI_BAR_EVEN_ALIGN 0xFFFFFFFFFFFFFFFEULL
#define PCI_BAR_SQUAD_ALIGN 0xFFFFFFFFFFFFFFFDULL
#define PCI_BAR_DQUAD_ALIGN 0xFFFFFFFFFFFFFFFCULL
#define PCI_BAR_IDX0 0x00
#define PCI_BAR_IDX1 0x01
#define PCI_BAR_IDX2 0x02
#define PCI_BAR_IDX3 0x03
#define PCI_BAR_IDX4 0x04
#define PCI_BAR_IDX5 0x05
#define PCI_BAR_ALL 0xFF
///
/// EFI PCI Option ROM definitions

View File

@ -1,7 +1,7 @@
/** @file
TCG EFI Platform Definition in TCG_EFI_Platform_1_20_Final
Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR>
Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@ -153,6 +153,7 @@ typedef struct tdEFI_HANDOFF_TABLE_POINTERS {
/// This structure serves as the header for measuring variables. The name of the
/// variable (in Unicode format) should immediately follow, then the variable
/// data.
/// This is defined in TCG EFI Platform Spec for TPM1.1 or 1.2 V1.22
///
typedef struct tdEFI_VARIABLE_DATA {
EFI_GUID VariableName;
@ -162,6 +163,22 @@ typedef struct tdEFI_VARIABLE_DATA {
INT8 VariableData[1]; ///< Driver or platform-specific data
} EFI_VARIABLE_DATA;
///
/// UEFI_VARIABLE_DATA
///
/// This structure serves as the header for measuring variables. The name of the
/// variable (in Unicode format) should immediately follow, then the variable
/// data.
/// This is defined in TCG PC Client Firmware Profile Spec 00.21
///
typedef struct tdUEFI_VARIABLE_DATA {
EFI_GUID VariableName;
UINT64 UnicodeNameLength;
UINT64 VariableDataLength;
CHAR16 UnicodeName[1];
INT8 VariableData[1]; ///< Driver or platform-specific data
} UEFI_VARIABLE_DATA;
//
// For TrEE1.0 compatibility
//
@ -190,6 +207,17 @@ typedef struct tdTCG_PCR_EVENT2 {
UINT8 Event[1];
} TCG_PCR_EVENT2;
//
// TCG PCR Event2 Header
// Follow TCG EFI Protocol Spec 5.2 Crypto Agile Log Entry Format
//
typedef struct tdTCG_PCR_EVENT2_HDR{
TCG_PCRINDEX PCRIndex;
TCG_EVENTTYPE EventType;
TPML_DIGEST_VALUES Digests;
UINT32 EventSize;
} TCG_PCR_EVENT2_HDR;
//
// Log Header Entry Data
//
@ -270,6 +298,33 @@ typedef struct {
//UINT8 vendorInfo[vendorInfoSize];
} TCG_EfiSpecIDEventStruct;
#define TCG_EfiStartupLocalityEvent_SIGNATURE "StartupLocality"
//
// PC Client PTP spec Table 8 Relationship between Locality and Locality Attribute
//
#define LOCALITY_0_INDICATOR 0x01
#define LOCALITY_1_INDICATOR 0x02
#define LOCALITY_2_INDICATOR 0x03
#define LOCALITY_3_INDICATOR 0x04
#define LOCALITY_4_INDICATOR 0x05
//
// Startup Locality Event
//
typedef struct tdTCG_EfiStartupLocalityEvent{
UINT8 Signature[16];
//
// The Locality Indicator which sent the TPM2_Startup command
//
UINT8 StartupLocality;
} TCG_EfiStartupLocalityEvent;
//
// Restore original structure alignment
//

File diff suppressed because it is too large Load Diff

View File

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

View File

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

View File

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

View File

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

View File

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