MdePkg: Apply uncrustify changes
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3737 Apply uncrustify changes to .c/.h files in the MdePkg package Cc: Andrew Fish <afish@apple.com> Cc: Leif Lindholm <leif@nuviainc.com> Cc: Michael D Kinney <michael.d.kinney@intel.com> Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
This commit is contained in:
committed by
mergify[bot]
parent
1436aea4d5
commit
2f88bd3a12
@@ -13,11 +13,10 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
|
||||
|
||||
#pragma pack(1)
|
||||
typedef struct {
|
||||
EFI_ACPI_DESCRIPTION_HEADER Header;
|
||||
GUID Identifier;
|
||||
UINT16 DataOffset;
|
||||
EFI_ACPI_DESCRIPTION_HEADER Header;
|
||||
GUID Identifier;
|
||||
UINT16 DataOffset;
|
||||
} EFI_ACPI_DATA_TABLE;
|
||||
#pragma pack()
|
||||
|
||||
#endif
|
||||
|
||||
|
@@ -21,37 +21,37 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
|
||||
///
|
||||
/// 128-bit buffer containing a unique identifier value.
|
||||
///
|
||||
typedef GUID EFI_GUID;
|
||||
typedef GUID EFI_GUID;
|
||||
///
|
||||
/// Function return status for EFI API.
|
||||
///
|
||||
typedef RETURN_STATUS EFI_STATUS;
|
||||
typedef RETURN_STATUS EFI_STATUS;
|
||||
///
|
||||
/// A collection of related interfaces.
|
||||
///
|
||||
typedef VOID *EFI_HANDLE;
|
||||
typedef VOID *EFI_HANDLE;
|
||||
///
|
||||
/// Handle to an event structure.
|
||||
///
|
||||
typedef VOID *EFI_EVENT;
|
||||
typedef VOID *EFI_EVENT;
|
||||
///
|
||||
/// Task priority level.
|
||||
///
|
||||
typedef UINTN EFI_TPL;
|
||||
typedef UINTN EFI_TPL;
|
||||
///
|
||||
/// Logical block address.
|
||||
///
|
||||
typedef UINT64 EFI_LBA;
|
||||
typedef UINT64 EFI_LBA;
|
||||
|
||||
///
|
||||
/// 64-bit physical memory address.
|
||||
///
|
||||
typedef UINT64 EFI_PHYSICAL_ADDRESS;
|
||||
typedef UINT64 EFI_PHYSICAL_ADDRESS;
|
||||
|
||||
///
|
||||
/// 64-bit virtual memory address.
|
||||
///
|
||||
typedef UINT64 EFI_VIRTUAL_ADDRESS;
|
||||
typedef UINT64 EFI_VIRTUAL_ADDRESS;
|
||||
|
||||
///
|
||||
/// EFI Time Abstraction:
|
||||
@@ -65,20 +65,19 @@ typedef UINT64 EFI_VIRTUAL_ADDRESS;
|
||||
/// TimeZone: -1440 to 1440 or 2047
|
||||
///
|
||||
typedef struct {
|
||||
UINT16 Year;
|
||||
UINT8 Month;
|
||||
UINT8 Day;
|
||||
UINT8 Hour;
|
||||
UINT8 Minute;
|
||||
UINT8 Second;
|
||||
UINT8 Pad1;
|
||||
UINT32 Nanosecond;
|
||||
INT16 TimeZone;
|
||||
UINT8 Daylight;
|
||||
UINT8 Pad2;
|
||||
UINT16 Year;
|
||||
UINT8 Month;
|
||||
UINT8 Day;
|
||||
UINT8 Hour;
|
||||
UINT8 Minute;
|
||||
UINT8 Second;
|
||||
UINT8 Pad1;
|
||||
UINT32 Nanosecond;
|
||||
INT16 TimeZone;
|
||||
UINT8 Daylight;
|
||||
UINT8 Pad2;
|
||||
} EFI_TIME;
|
||||
|
||||
|
||||
///
|
||||
/// 4-byte buffer. An IPv4 internet protocol address.
|
||||
///
|
||||
@@ -93,7 +92,7 @@ typedef IPv6_ADDRESS EFI_IPv6_ADDRESS;
|
||||
/// 32-byte buffer containing a network Media Access Control address.
|
||||
///
|
||||
typedef struct {
|
||||
UINT8 Addr[32];
|
||||
UINT8 Addr[32];
|
||||
} EFI_MAC_ADDRESS;
|
||||
|
||||
///
|
||||
@@ -101,12 +100,11 @@ typedef struct {
|
||||
/// An IPv4 or IPv6 internet protocol address.
|
||||
///
|
||||
typedef union {
|
||||
UINT32 Addr[4];
|
||||
EFI_IPv4_ADDRESS v4;
|
||||
EFI_IPv6_ADDRESS v6;
|
||||
UINT32 Addr[4];
|
||||
EFI_IPv4_ADDRESS v4;
|
||||
EFI_IPv6_ADDRESS v6;
|
||||
} EFI_IP_ADDRESS;
|
||||
|
||||
|
||||
///
|
||||
/// Enumeration of EFI_STATUS.
|
||||
///@{
|
||||
@@ -144,20 +142,20 @@ typedef union {
|
||||
#define EFI_COMPROMISED_DATA RETURN_COMPROMISED_DATA
|
||||
#define EFI_HTTP_ERROR RETURN_HTTP_ERROR
|
||||
|
||||
#define EFI_WARN_UNKNOWN_GLYPH RETURN_WARN_UNKNOWN_GLYPH
|
||||
#define EFI_WARN_DELETE_FAILURE RETURN_WARN_DELETE_FAILURE
|
||||
#define EFI_WARN_WRITE_FAILURE RETURN_WARN_WRITE_FAILURE
|
||||
#define EFI_WARN_BUFFER_TOO_SMALL RETURN_WARN_BUFFER_TOO_SMALL
|
||||
#define EFI_WARN_STALE_DATA RETURN_WARN_STALE_DATA
|
||||
#define EFI_WARN_FILE_SYSTEM RETURN_WARN_FILE_SYSTEM
|
||||
#define EFI_WARN_UNKNOWN_GLYPH RETURN_WARN_UNKNOWN_GLYPH
|
||||
#define EFI_WARN_DELETE_FAILURE RETURN_WARN_DELETE_FAILURE
|
||||
#define EFI_WARN_WRITE_FAILURE RETURN_WARN_WRITE_FAILURE
|
||||
#define EFI_WARN_BUFFER_TOO_SMALL RETURN_WARN_BUFFER_TOO_SMALL
|
||||
#define EFI_WARN_STALE_DATA RETURN_WARN_STALE_DATA
|
||||
#define EFI_WARN_FILE_SYSTEM RETURN_WARN_FILE_SYSTEM
|
||||
///@}
|
||||
|
||||
///
|
||||
/// Define macro to encode the status code.
|
||||
///
|
||||
#define EFIERR(_a) ENCODE_ERROR(_a)
|
||||
#define EFIERR(_a) ENCODE_ERROR(_a)
|
||||
|
||||
#define EFI_ERROR(A) RETURN_ERROR(A)
|
||||
#define EFI_ERROR(A) RETURN_ERROR(A)
|
||||
|
||||
///
|
||||
/// ICMP error definitions
|
||||
@@ -171,9 +169,9 @@ typedef union {
|
||||
///
|
||||
/// Tcp connection status definitions
|
||||
///@{
|
||||
#define EFI_CONNECTION_FIN EFIERR(104)
|
||||
#define EFI_CONNECTION_RESET EFIERR(105)
|
||||
#define EFI_CONNECTION_REFUSED EFIERR(106)
|
||||
#define EFI_CONNECTION_FIN EFIERR(104)
|
||||
#define EFI_CONNECTION_RESET EFIERR(105)
|
||||
#define EFI_CONNECTION_REFUSED EFIERR(106)
|
||||
///@}
|
||||
|
||||
//
|
||||
@@ -181,9 +179,9 @@ typedef union {
|
||||
// 4KB. This should in no way be confused with the page size of the processor.
|
||||
// An EFI_PAGE is just the quanta of memory in EFI.
|
||||
//
|
||||
#define EFI_PAGE_SIZE SIZE_4KB
|
||||
#define EFI_PAGE_MASK 0xFFF
|
||||
#define EFI_PAGE_SHIFT 12
|
||||
#define EFI_PAGE_SIZE SIZE_4KB
|
||||
#define EFI_PAGE_MASK 0xFFF
|
||||
#define EFI_PAGE_SHIFT 12
|
||||
|
||||
/**
|
||||
Macro that converts a size, in bytes, to a number of EFI_PAGESs.
|
||||
@@ -214,22 +212,22 @@ typedef union {
|
||||
///
|
||||
/// PE32+ Machine type for IA32 UEFI images.
|
||||
///
|
||||
#define EFI_IMAGE_MACHINE_IA32 0x014C
|
||||
#define EFI_IMAGE_MACHINE_IA32 0x014C
|
||||
|
||||
///
|
||||
/// PE32+ Machine type for IA64 UEFI images.
|
||||
///
|
||||
#define EFI_IMAGE_MACHINE_IA64 0x0200
|
||||
#define EFI_IMAGE_MACHINE_IA64 0x0200
|
||||
|
||||
///
|
||||
/// PE32+ Machine type for EBC UEFI images.
|
||||
///
|
||||
#define EFI_IMAGE_MACHINE_EBC 0x0EBC
|
||||
#define EFI_IMAGE_MACHINE_EBC 0x0EBC
|
||||
|
||||
///
|
||||
/// PE32+ Machine type for X64 UEFI images.
|
||||
///
|
||||
#define EFI_IMAGE_MACHINE_X64 0x8664
|
||||
#define EFI_IMAGE_MACHINE_X64 0x8664
|
||||
|
||||
///
|
||||
/// PE32+ Machine type for ARM mixed ARM and Thumb/Thumb2 images.
|
||||
@@ -248,64 +246,64 @@ typedef union {
|
||||
#define EFI_IMAGE_MACHINE_RISCV64 0x5064
|
||||
#define EFI_IMAGE_MACHINE_RISCV128 0x5128
|
||||
|
||||
#if !defined(EFI_IMAGE_MACHINE_TYPE_VALUE) && !defined(EFI_IMAGE_MACHINE_CROSS_TYPE_VALUE)
|
||||
#if defined (MDE_CPU_IA32)
|
||||
#if !defined (EFI_IMAGE_MACHINE_TYPE_VALUE) && !defined (EFI_IMAGE_MACHINE_CROSS_TYPE_VALUE)
|
||||
#if defined (MDE_CPU_IA32)
|
||||
|
||||
#define EFI_IMAGE_MACHINE_TYPE_SUPPORTED(Machine) \
|
||||
((Machine) == EFI_IMAGE_MACHINE_IA32)
|
||||
|
||||
#define EFI_IMAGE_MACHINE_CROSS_TYPE_SUPPORTED(Machine) ((Machine) == EFI_IMAGE_MACHINE_X64)
|
||||
#define EFI_IMAGE_MACHINE_CROSS_TYPE_SUPPORTED(Machine) ((Machine) == EFI_IMAGE_MACHINE_X64)
|
||||
|
||||
#elif defined (MDE_CPU_X64)
|
||||
#elif defined (MDE_CPU_X64)
|
||||
|
||||
#define EFI_IMAGE_MACHINE_TYPE_SUPPORTED(Machine) \
|
||||
((Machine) == EFI_IMAGE_MACHINE_X64)
|
||||
|
||||
#define EFI_IMAGE_MACHINE_CROSS_TYPE_SUPPORTED(Machine) ((Machine) == EFI_IMAGE_MACHINE_IA32)
|
||||
#define EFI_IMAGE_MACHINE_CROSS_TYPE_SUPPORTED(Machine) ((Machine) == EFI_IMAGE_MACHINE_IA32)
|
||||
|
||||
#elif defined (MDE_CPU_ARM)
|
||||
#elif defined (MDE_CPU_ARM)
|
||||
|
||||
#define EFI_IMAGE_MACHINE_TYPE_SUPPORTED(Machine) ((Machine) == EFI_IMAGE_MACHINE_ARMTHUMB_MIXED)
|
||||
#define EFI_IMAGE_MACHINE_TYPE_SUPPORTED(Machine) ((Machine) == EFI_IMAGE_MACHINE_ARMTHUMB_MIXED)
|
||||
|
||||
#define EFI_IMAGE_MACHINE_CROSS_TYPE_SUPPORTED(Machine) (FALSE)
|
||||
#define EFI_IMAGE_MACHINE_CROSS_TYPE_SUPPORTED(Machine) (FALSE)
|
||||
|
||||
#elif defined (MDE_CPU_AARCH64)
|
||||
#elif defined (MDE_CPU_AARCH64)
|
||||
|
||||
#define EFI_IMAGE_MACHINE_TYPE_SUPPORTED(Machine) \
|
||||
((Machine) == EFI_IMAGE_MACHINE_AARCH64)
|
||||
|
||||
#define EFI_IMAGE_MACHINE_CROSS_TYPE_SUPPORTED(Machine) (FALSE)
|
||||
#define EFI_IMAGE_MACHINE_CROSS_TYPE_SUPPORTED(Machine) (FALSE)
|
||||
|
||||
#elif defined (MDE_CPU_RISCV64)
|
||||
#elif defined (MDE_CPU_RISCV64)
|
||||
#define EFI_IMAGE_MACHINE_TYPE_SUPPORTED(Machine) \
|
||||
((Machine) == EFI_IMAGE_MACHINE_RISCV64)
|
||||
|
||||
#define EFI_IMAGE_MACHINE_CROSS_TYPE_SUPPORTED(Machine) (FALSE)
|
||||
#define EFI_IMAGE_MACHINE_CROSS_TYPE_SUPPORTED(Machine) (FALSE)
|
||||
|
||||
#elif defined (MDE_CPU_EBC)
|
||||
#elif defined (MDE_CPU_EBC)
|
||||
|
||||
///
|
||||
/// This is just to make sure you can cross compile with the EBC compiler.
|
||||
/// It does not make sense to have a PE loader coded in EBC.
|
||||
///
|
||||
#define EFI_IMAGE_MACHINE_TYPE_SUPPORTED(Machine) ((Machine) == EFI_IMAGE_MACHINE_EBC)
|
||||
#define EFI_IMAGE_MACHINE_TYPE_SUPPORTED(Machine) ((Machine) == EFI_IMAGE_MACHINE_EBC)
|
||||
|
||||
#define EFI_IMAGE_MACHINE_CROSS_TYPE_SUPPORTED(Machine) (FALSE)
|
||||
#define EFI_IMAGE_MACHINE_CROSS_TYPE_SUPPORTED(Machine) (FALSE)
|
||||
|
||||
#else
|
||||
#error Unknown Processor Type
|
||||
#endif
|
||||
#else
|
||||
#error Unknown Processor Type
|
||||
#endif
|
||||
#else
|
||||
#if defined (EFI_IMAGE_MACHINE_TYPE_VALUE)
|
||||
#define EFI_IMAGE_MACHINE_TYPE_SUPPORTED(Machine) ((Machine) == EFI_IMAGE_MACHINE_TYPE_VALUE)
|
||||
#else
|
||||
#define EFI_IMAGE_MACHINE_TYPE_SUPPORTED(Machine) (FALSE)
|
||||
#endif
|
||||
#if defined (EFI_IMAGE_MACHINE_CROSS_TYPE_VALUE)
|
||||
#define EFI_IMAGE_MACHINE_CROSS_TYPE_SUPPORTED(Machine) ((Machine) == EFI_IMAGE_MACHINE_CROSS_TYPE_VALUE)
|
||||
#else
|
||||
#define EFI_IMAGE_MACHINE_CROSS_TYPE_SUPPORTED(Machine) (FALSE)
|
||||
#endif
|
||||
#if defined (EFI_IMAGE_MACHINE_TYPE_VALUE)
|
||||
#define EFI_IMAGE_MACHINE_TYPE_SUPPORTED(Machine) ((Machine) == EFI_IMAGE_MACHINE_TYPE_VALUE)
|
||||
#else
|
||||
#define EFI_IMAGE_MACHINE_TYPE_SUPPORTED(Machine) (FALSE)
|
||||
#endif
|
||||
#if defined (EFI_IMAGE_MACHINE_CROSS_TYPE_VALUE)
|
||||
#define EFI_IMAGE_MACHINE_CROSS_TYPE_SUPPORTED(Machine) ((Machine) == EFI_IMAGE_MACHINE_CROSS_TYPE_VALUE)
|
||||
#else
|
||||
#define EFI_IMAGE_MACHINE_CROSS_TYPE_SUPPORTED(Machine) (FALSE)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
@@ -13,15 +13,15 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
|
||||
/// The primary GUID Partition Table Header must be
|
||||
/// located in LBA 1 (i.e., the second logical block).
|
||||
///
|
||||
#define PRIMARY_PART_HEADER_LBA 1
|
||||
#define PRIMARY_PART_HEADER_LBA 1
|
||||
///
|
||||
/// EFI Partition Table Signature: "EFI PART".
|
||||
///
|
||||
#define EFI_PTAB_HEADER_ID SIGNATURE_64 ('E','F','I',' ','P','A','R','T')
|
||||
#define EFI_PTAB_HEADER_ID SIGNATURE_64 ('E','F','I',' ','P','A','R','T')
|
||||
///
|
||||
/// Minimum bytes reserve for EFI entry array buffer.
|
||||
///
|
||||
#define EFI_GPT_PART_ENTRY_MIN_SIZE 16384
|
||||
#define EFI_GPT_PART_ENTRY_MIN_SIZE 16384
|
||||
|
||||
#pragma pack(1)
|
||||
|
||||
@@ -33,51 +33,51 @@ typedef struct {
|
||||
/// The table header for the GPT partition Table.
|
||||
/// This header contains EFI_PTAB_HEADER_ID.
|
||||
///
|
||||
EFI_TABLE_HEADER Header;
|
||||
EFI_TABLE_HEADER Header;
|
||||
///
|
||||
/// The LBA that contains this data structure.
|
||||
///
|
||||
EFI_LBA MyLBA;
|
||||
EFI_LBA MyLBA;
|
||||
///
|
||||
/// LBA address of the alternate GUID Partition Table Header.
|
||||
///
|
||||
EFI_LBA AlternateLBA;
|
||||
EFI_LBA AlternateLBA;
|
||||
///
|
||||
/// The first usable logical block that may be used
|
||||
/// by a partition described by a GUID Partition Entry.
|
||||
///
|
||||
EFI_LBA FirstUsableLBA;
|
||||
EFI_LBA FirstUsableLBA;
|
||||
///
|
||||
/// The last usable logical block that may be used
|
||||
/// by a partition described by a GUID Partition Entry.
|
||||
///
|
||||
EFI_LBA LastUsableLBA;
|
||||
EFI_LBA LastUsableLBA;
|
||||
///
|
||||
/// GUID that can be used to uniquely identify the disk.
|
||||
///
|
||||
EFI_GUID DiskGUID;
|
||||
EFI_GUID DiskGUID;
|
||||
///
|
||||
/// The starting LBA of the GUID Partition Entry array.
|
||||
///
|
||||
EFI_LBA PartitionEntryLBA;
|
||||
EFI_LBA PartitionEntryLBA;
|
||||
///
|
||||
/// The number of Partition Entries in the GUID Partition Entry array.
|
||||
///
|
||||
UINT32 NumberOfPartitionEntries;
|
||||
UINT32 NumberOfPartitionEntries;
|
||||
///
|
||||
/// The size, in bytes, of each the GUID Partition
|
||||
/// Entry structures in the GUID Partition Entry
|
||||
/// array. This field shall be set to a value of 128 x 2^n where n is
|
||||
/// an integer greater than or equal to zero (e.g., 128, 256, 512, etc.).
|
||||
///
|
||||
UINT32 SizeOfPartitionEntry;
|
||||
UINT32 SizeOfPartitionEntry;
|
||||
///
|
||||
/// The CRC32 of the GUID Partition Entry array.
|
||||
/// Starts at PartitionEntryLBA and is
|
||||
/// computed over a byte length of
|
||||
/// NumberOfPartitionEntries * SizeOfPartitionEntry.
|
||||
///
|
||||
UINT32 PartitionEntryArrayCRC32;
|
||||
UINT32 PartitionEntryArrayCRC32;
|
||||
} EFI_PARTITION_TABLE_HEADER;
|
||||
|
||||
///
|
||||
@@ -88,21 +88,21 @@ typedef struct {
|
||||
/// Unique ID that defines the purpose and type of this Partition. A value of
|
||||
/// zero defines that this partition entry is not being used.
|
||||
///
|
||||
EFI_GUID PartitionTypeGUID;
|
||||
EFI_GUID PartitionTypeGUID;
|
||||
///
|
||||
/// GUID that is unique for every partition entry. Every partition ever
|
||||
/// created will have a unique GUID.
|
||||
/// This GUID must be assigned when the GUID Partition Entry is created.
|
||||
///
|
||||
EFI_GUID UniquePartitionGUID;
|
||||
EFI_GUID UniquePartitionGUID;
|
||||
///
|
||||
/// Starting LBA of the partition defined by this entry
|
||||
///
|
||||
EFI_LBA StartingLBA;
|
||||
EFI_LBA StartingLBA;
|
||||
///
|
||||
/// Ending LBA of the partition defined by this entry.
|
||||
///
|
||||
EFI_LBA EndingLBA;
|
||||
EFI_LBA EndingLBA;
|
||||
///
|
||||
/// Attribute bits, all bits reserved by UEFI
|
||||
/// Bit 0: If this bit is set, the partition is required for the platform to function. The owner/creator of the
|
||||
@@ -135,5 +135,3 @@ typedef struct {
|
||||
|
||||
#pragma pack()
|
||||
#endif
|
||||
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
@@ -12,26 +12,26 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
|
||||
///
|
||||
/// Attributes of variable.
|
||||
///
|
||||
#define EFI_VARIABLE_NON_VOLATILE 0x00000001
|
||||
#define EFI_VARIABLE_BOOTSERVICE_ACCESS 0x00000002
|
||||
#define EFI_VARIABLE_RUNTIME_ACCESS 0x00000004
|
||||
#define EFI_VARIABLE_NON_VOLATILE 0x00000001
|
||||
#define EFI_VARIABLE_BOOTSERVICE_ACCESS 0x00000002
|
||||
#define EFI_VARIABLE_RUNTIME_ACCESS 0x00000004
|
||||
///
|
||||
/// This attribute is identified by the mnemonic 'HR'
|
||||
/// elsewhere in this specification.
|
||||
///
|
||||
#define EFI_VARIABLE_HARDWARE_ERROR_RECORD 0x00000008
|
||||
#define EFI_VARIABLE_HARDWARE_ERROR_RECORD 0x00000008
|
||||
///
|
||||
/// Attributes of Authenticated Variable
|
||||
///
|
||||
#define EFI_VARIABLE_TIME_BASED_AUTHENTICATED_WRITE_ACCESS 0x00000020
|
||||
#define EFI_VARIABLE_APPEND_WRITE 0x00000040
|
||||
#define EFI_VARIABLE_TIME_BASED_AUTHENTICATED_WRITE_ACCESS 0x00000020
|
||||
#define EFI_VARIABLE_APPEND_WRITE 0x00000040
|
||||
///
|
||||
/// NOTE: EFI_VARIABLE_AUTHENTICATED_WRITE_ACCESS is deprecated and should be considered reserved.
|
||||
///
|
||||
#define EFI_VARIABLE_AUTHENTICATED_WRITE_ACCESS 0x00000010
|
||||
#define EFI_VARIABLE_AUTHENTICATED_WRITE_ACCESS 0x00000010
|
||||
|
||||
#ifndef VFRCOMPILE
|
||||
#include <Guid/WinCertificate.h>
|
||||
#include <Guid/WinCertificate.h>
|
||||
///
|
||||
/// Enumeration of memory types introduced in UEFI.
|
||||
///
|
||||
@@ -148,27 +148,27 @@ typedef struct {
|
||||
/// Unique signatures have been generated for the EFI System Table,
|
||||
/// the EFI Boot Services Table, and the EFI Runtime Services Table.
|
||||
///
|
||||
UINT64 Signature;
|
||||
UINT64 Signature;
|
||||
///
|
||||
/// The revision of the EFI Specification to which this table
|
||||
/// conforms. The upper 16 bits of this field contain the major
|
||||
/// revision value, and the lower 16 bits contain the minor revision
|
||||
/// value. The minor revision values are limited to the range of 00..99.
|
||||
///
|
||||
UINT32 Revision;
|
||||
UINT32 Revision;
|
||||
///
|
||||
/// The size, in bytes, of the entire table including the EFI_TABLE_HEADER.
|
||||
///
|
||||
UINT32 HeaderSize;
|
||||
UINT32 HeaderSize;
|
||||
///
|
||||
/// The 32-bit CRC for the entire table. This value is computed by
|
||||
/// setting this field to 0, and computing the 32-bit CRC for HeaderSize bytes.
|
||||
///
|
||||
UINT32 CRC32;
|
||||
UINT32 CRC32;
|
||||
///
|
||||
/// Reserved field that must be set to 0.
|
||||
///
|
||||
UINT32 Reserved;
|
||||
UINT32 Reserved;
|
||||
} EFI_TABLE_HEADER;
|
||||
|
||||
///
|
||||
@@ -193,7 +193,7 @@ typedef struct {
|
||||
/// replay. Incremented during each
|
||||
/// "Write" access.
|
||||
///
|
||||
UINT64 MonotonicCount;
|
||||
UINT64 MonotonicCount;
|
||||
///
|
||||
/// Provides the authorization for the variable
|
||||
/// access. It is a signature across the
|
||||
@@ -202,7 +202,7 @@ typedef struct {
|
||||
/// associated with a public key that has been
|
||||
/// provisioned via the key exchange.
|
||||
///
|
||||
WIN_CERTIFICATE_UEFI_GUID AuthInfo;
|
||||
WIN_CERTIFICATE_UEFI_GUID AuthInfo;
|
||||
} EFI_VARIABLE_AUTHENTICATION;
|
||||
|
||||
///
|
||||
@@ -218,12 +218,12 @@ typedef struct {
|
||||
/// For the TimeStamp value, components Pad1, Nanosecond, TimeZone, Daylight and
|
||||
/// Pad2 shall be set to 0. This means that the time shall always be expressed in GMT.
|
||||
///
|
||||
EFI_TIME TimeStamp;
|
||||
EFI_TIME TimeStamp;
|
||||
///
|
||||
/// Only a CertType of EFI_CERT_TYPE_PKCS7_GUID is accepted.
|
||||
///
|
||||
WIN_CERTIFICATE_UEFI_GUID AuthInfo;
|
||||
} EFI_VARIABLE_AUTHENTICATION_2;
|
||||
WIN_CERTIFICATE_UEFI_GUID AuthInfo;
|
||||
} EFI_VARIABLE_AUTHENTICATION_2;
|
||||
#endif // VFRCOMPILE
|
||||
|
||||
#endif
|
||||
|
File diff suppressed because it is too large
Load Diff
@@ -59,31 +59,31 @@ typedef enum {
|
||||
//
|
||||
// Memory cacheability attributes
|
||||
//
|
||||
#define EFI_MEMORY_UC 0x0000000000000001ULL
|
||||
#define EFI_MEMORY_WC 0x0000000000000002ULL
|
||||
#define EFI_MEMORY_WT 0x0000000000000004ULL
|
||||
#define EFI_MEMORY_WB 0x0000000000000008ULL
|
||||
#define EFI_MEMORY_UCE 0x0000000000000010ULL
|
||||
#define EFI_MEMORY_UC 0x0000000000000001ULL
|
||||
#define EFI_MEMORY_WC 0x0000000000000002ULL
|
||||
#define EFI_MEMORY_WT 0x0000000000000004ULL
|
||||
#define EFI_MEMORY_WB 0x0000000000000008ULL
|
||||
#define EFI_MEMORY_UCE 0x0000000000000010ULL
|
||||
//
|
||||
// Physical memory protection attributes
|
||||
//
|
||||
// Note: UEFI spec 2.5 and following: use EFI_MEMORY_RO as write-protected physical memory
|
||||
// protection attribute. Also, EFI_MEMORY_WP means cacheability attribute.
|
||||
//
|
||||
#define EFI_MEMORY_WP 0x0000000000001000ULL
|
||||
#define EFI_MEMORY_RP 0x0000000000002000ULL
|
||||
#define EFI_MEMORY_XP 0x0000000000004000ULL
|
||||
#define EFI_MEMORY_RO 0x0000000000020000ULL
|
||||
#define EFI_MEMORY_WP 0x0000000000001000ULL
|
||||
#define EFI_MEMORY_RP 0x0000000000002000ULL
|
||||
#define EFI_MEMORY_XP 0x0000000000004000ULL
|
||||
#define EFI_MEMORY_RO 0x0000000000020000ULL
|
||||
//
|
||||
// Physical memory persistence attribute.
|
||||
// The memory region supports byte-addressable non-volatility.
|
||||
//
|
||||
#define EFI_MEMORY_NV 0x0000000000008000ULL
|
||||
#define EFI_MEMORY_NV 0x0000000000008000ULL
|
||||
//
|
||||
// The memory region provides higher reliability relative to other memory in the system.
|
||||
// If all memory has the same reliability, then this bit is not used.
|
||||
//
|
||||
#define EFI_MEMORY_MORE_RELIABLE 0x0000000000010000ULL
|
||||
#define EFI_MEMORY_MORE_RELIABLE 0x0000000000010000ULL
|
||||
|
||||
//
|
||||
// Note: UEFI spec 2.8 and following:
|
||||
@@ -93,7 +93,7 @@ typedef enum {
|
||||
// The SPM attribute serves as a hint to the OS to avoid allocating this
|
||||
// memory for core OS data or code that can not be relocated.
|
||||
//
|
||||
#define EFI_MEMORY_SP 0x0000000000040000ULL
|
||||
#define EFI_MEMORY_SP 0x0000000000040000ULL
|
||||
//
|
||||
// If this flag is set, the memory region is capable of being
|
||||
// protected with the CPU's memory cryptographic
|
||||
@@ -102,24 +102,24 @@ typedef enum {
|
||||
// cryptographic capabilities or the CPU does not support CPU
|
||||
// memory cryptographic capabilities.
|
||||
//
|
||||
#define EFI_MEMORY_CPU_CRYPTO 0x0000000000080000ULL
|
||||
#define EFI_MEMORY_CPU_CRYPTO 0x0000000000080000ULL
|
||||
|
||||
//
|
||||
// Runtime memory attribute
|
||||
//
|
||||
#define EFI_MEMORY_RUNTIME 0x8000000000000000ULL
|
||||
#define EFI_MEMORY_RUNTIME 0x8000000000000000ULL
|
||||
|
||||
//
|
||||
// Attributes bitmasks, grouped by type
|
||||
//
|
||||
#define EFI_CACHE_ATTRIBUTE_MASK (EFI_MEMORY_UC | EFI_MEMORY_WC | EFI_MEMORY_WT | EFI_MEMORY_WB | EFI_MEMORY_UCE | EFI_MEMORY_WP)
|
||||
#define EFI_MEMORY_ACCESS_MASK (EFI_MEMORY_RP | EFI_MEMORY_XP | EFI_MEMORY_RO)
|
||||
#define EFI_MEMORY_ATTRIBUTE_MASK (EFI_MEMORY_ACCESS_MASK | EFI_MEMORY_SP | EFI_MEMORY_CPU_CRYPTO)
|
||||
#define EFI_CACHE_ATTRIBUTE_MASK (EFI_MEMORY_UC | EFI_MEMORY_WC | EFI_MEMORY_WT | EFI_MEMORY_WB | EFI_MEMORY_UCE | EFI_MEMORY_WP)
|
||||
#define EFI_MEMORY_ACCESS_MASK (EFI_MEMORY_RP | EFI_MEMORY_XP | EFI_MEMORY_RO)
|
||||
#define EFI_MEMORY_ATTRIBUTE_MASK (EFI_MEMORY_ACCESS_MASK | EFI_MEMORY_SP | EFI_MEMORY_CPU_CRYPTO)
|
||||
|
||||
///
|
||||
/// Memory descriptor version number.
|
||||
///
|
||||
#define EFI_MEMORY_DESCRIPTOR_VERSION 1
|
||||
#define EFI_MEMORY_DESCRIPTOR_VERSION 1
|
||||
|
||||
///
|
||||
/// Definition of an EFI memory descriptor.
|
||||
@@ -130,32 +130,32 @@ typedef struct {
|
||||
/// Type EFI_MEMORY_TYPE is defined in the
|
||||
/// AllocatePages() function description.
|
||||
///
|
||||
UINT32 Type;
|
||||
UINT32 Type;
|
||||
///
|
||||
/// Physical address of the first byte in the memory region. PhysicalStart must be
|
||||
/// aligned on a 4 KiB boundary, and must not be above 0xfffffffffffff000. Type
|
||||
/// EFI_PHYSICAL_ADDRESS is defined in the AllocatePages() function description
|
||||
///
|
||||
EFI_PHYSICAL_ADDRESS PhysicalStart;
|
||||
EFI_PHYSICAL_ADDRESS PhysicalStart;
|
||||
///
|
||||
/// Virtual address of the first byte in the memory region.
|
||||
/// VirtualStart must be aligned on a 4 KiB boundary,
|
||||
/// and must not be above 0xfffffffffffff000.
|
||||
///
|
||||
EFI_VIRTUAL_ADDRESS VirtualStart;
|
||||
EFI_VIRTUAL_ADDRESS VirtualStart;
|
||||
///
|
||||
/// NumberOfPagesNumber of 4 KiB pages in the memory region.
|
||||
/// NumberOfPages must not be 0, and must not be any value
|
||||
/// that would represent a memory page with a start address,
|
||||
/// either physical or virtual, above 0xfffffffffffff000.
|
||||
///
|
||||
UINT64 NumberOfPages;
|
||||
UINT64 NumberOfPages;
|
||||
///
|
||||
/// Attributes of the memory region that describe the bit mask of capabilities
|
||||
/// for that memory region, and not necessarily the current settings for that
|
||||
/// memory region.
|
||||
///
|
||||
UINT64 Attribute;
|
||||
UINT64 Attribute;
|
||||
} EFI_MEMORY_DESCRIPTOR;
|
||||
|
||||
/**
|
||||
@@ -381,12 +381,10 @@ EFI_STATUS
|
||||
IN EFI_HANDLE ChildHandle OPTIONAL
|
||||
);
|
||||
|
||||
|
||||
|
||||
//
|
||||
// ConvertPointer DebugDisposition type.
|
||||
//
|
||||
#define EFI_OPTIONAL_PTR 0x00000001
|
||||
#define EFI_OPTIONAL_PTR 0x00000001
|
||||
|
||||
/**
|
||||
Determines the new virtual address that is to be used on subsequent memory accesses.
|
||||
@@ -410,27 +408,25 @@ EFI_STATUS
|
||||
IN OUT VOID **Address
|
||||
);
|
||||
|
||||
|
||||
//
|
||||
// These types can be ORed together as needed - for example,
|
||||
// EVT_TIMER might be Ored with EVT_NOTIFY_WAIT or
|
||||
// EVT_NOTIFY_SIGNAL.
|
||||
//
|
||||
#define EVT_TIMER 0x80000000
|
||||
#define EVT_RUNTIME 0x40000000
|
||||
#define EVT_NOTIFY_WAIT 0x00000100
|
||||
#define EVT_NOTIFY_SIGNAL 0x00000200
|
||||
#define EVT_TIMER 0x80000000
|
||||
#define EVT_RUNTIME 0x40000000
|
||||
#define EVT_NOTIFY_WAIT 0x00000100
|
||||
#define EVT_NOTIFY_SIGNAL 0x00000200
|
||||
|
||||
#define EVT_SIGNAL_EXIT_BOOT_SERVICES 0x00000201
|
||||
#define EVT_SIGNAL_VIRTUAL_ADDRESS_CHANGE 0x60000202
|
||||
#define EVT_SIGNAL_EXIT_BOOT_SERVICES 0x00000201
|
||||
#define EVT_SIGNAL_VIRTUAL_ADDRESS_CHANGE 0x60000202
|
||||
|
||||
//
|
||||
// The event's NotifyContext pointer points to a runtime memory
|
||||
// address.
|
||||
// The event is deprecated in UEFI2.0 and later specifications.
|
||||
//
|
||||
#define EVT_RUNTIME_CONTEXT 0x20000000
|
||||
|
||||
#define EVT_RUNTIME_CONTEXT 0x20000000
|
||||
|
||||
/**
|
||||
Invoke a notification event
|
||||
@@ -611,15 +607,13 @@ EFI_STATUS
|
||||
IN EFI_EVENT Event
|
||||
);
|
||||
|
||||
|
||||
//
|
||||
// Task priority level
|
||||
//
|
||||
#define TPL_APPLICATION 4
|
||||
#define TPL_CALLBACK 8
|
||||
#define TPL_NOTIFY 16
|
||||
#define TPL_HIGH_LEVEL 31
|
||||
|
||||
#define TPL_APPLICATION 4
|
||||
#define TPL_CALLBACK 8
|
||||
#define TPL_NOTIFY 16
|
||||
#define TPL_HIGH_LEVEL 31
|
||||
|
||||
/**
|
||||
Raises a task's priority level and returns its previous level.
|
||||
@@ -759,7 +753,6 @@ EFI_STATUS
|
||||
IN VOID *Data
|
||||
);
|
||||
|
||||
|
||||
///
|
||||
/// This provides the capabilities of the
|
||||
/// real time clock device as exposed through the EFI interfaces.
|
||||
@@ -771,14 +764,14 @@ typedef struct {
|
||||
/// value would be 1 Hz, or 1, to indicate that the device only reports
|
||||
/// the time to the resolution of 1 second.
|
||||
///
|
||||
UINT32 Resolution;
|
||||
UINT32 Resolution;
|
||||
///
|
||||
/// Provides the timekeeping accuracy of the real-time clock in an
|
||||
/// error rate of 1E-6 parts per million. For a clock with an accuracy
|
||||
/// of 50 parts per million, the value in this field would be
|
||||
/// 50,000,000.
|
||||
///
|
||||
UINT32 Accuracy;
|
||||
UINT32 Accuracy;
|
||||
///
|
||||
/// A TRUE indicates that a time set operation clears the device's
|
||||
/// time below the Resolution reporting level. A FALSE
|
||||
@@ -786,7 +779,7 @@ typedef struct {
|
||||
/// device is not cleared when the time is set. Normal PC-AT CMOS
|
||||
/// RTC devices set this value to FALSE.
|
||||
///
|
||||
BOOLEAN SetsToZero;
|
||||
BOOLEAN SetsToZero;
|
||||
} EFI_TIME_CAPABILITIES;
|
||||
|
||||
/**
|
||||
@@ -1299,12 +1292,12 @@ EFI_STATUS
|
||||
OUT VOID **Interface
|
||||
);
|
||||
|
||||
#define EFI_OPEN_PROTOCOL_BY_HANDLE_PROTOCOL 0x00000001
|
||||
#define EFI_OPEN_PROTOCOL_GET_PROTOCOL 0x00000002
|
||||
#define EFI_OPEN_PROTOCOL_TEST_PROTOCOL 0x00000004
|
||||
#define EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER 0x00000008
|
||||
#define EFI_OPEN_PROTOCOL_BY_DRIVER 0x00000010
|
||||
#define EFI_OPEN_PROTOCOL_EXCLUSIVE 0x00000020
|
||||
#define EFI_OPEN_PROTOCOL_BY_HANDLE_PROTOCOL 0x00000001
|
||||
#define EFI_OPEN_PROTOCOL_GET_PROTOCOL 0x00000002
|
||||
#define EFI_OPEN_PROTOCOL_TEST_PROTOCOL 0x00000004
|
||||
#define EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER 0x00000008
|
||||
#define EFI_OPEN_PROTOCOL_BY_DRIVER 0x00000010
|
||||
#define EFI_OPEN_PROTOCOL_EXCLUSIVE 0x00000020
|
||||
|
||||
/**
|
||||
Queries a handle to determine if it supports a specified protocol. If the protocol is supported by the
|
||||
@@ -1344,7 +1337,6 @@ EFI_STATUS
|
||||
IN UINT32 Attributes
|
||||
);
|
||||
|
||||
|
||||
/**
|
||||
Closes a protocol on a handle that was opened using OpenProtocol().
|
||||
|
||||
@@ -1379,10 +1371,10 @@ EFI_STATUS
|
||||
/// EFI Oprn Protocol Information Entry
|
||||
///
|
||||
typedef struct {
|
||||
EFI_HANDLE AgentHandle;
|
||||
EFI_HANDLE ControllerHandle;
|
||||
UINT32 Attributes;
|
||||
UINT32 OpenCount;
|
||||
EFI_HANDLE AgentHandle;
|
||||
EFI_HANDLE ControllerHandle;
|
||||
UINT32 Attributes;
|
||||
UINT32 OpenCount;
|
||||
} EFI_OPEN_PROTOCOL_INFORMATION_ENTRY;
|
||||
|
||||
/**
|
||||
@@ -1617,20 +1609,20 @@ typedef struct {
|
||||
///
|
||||
/// Length in bytes of the data pointed to by DataBlock/ContinuationPointer.
|
||||
///
|
||||
UINT64 Length;
|
||||
UINT64 Length;
|
||||
union {
|
||||
///
|
||||
/// Physical address of the data block. This member of the union is
|
||||
/// used if Length is not equal to zero.
|
||||
///
|
||||
EFI_PHYSICAL_ADDRESS DataBlock;
|
||||
EFI_PHYSICAL_ADDRESS DataBlock;
|
||||
///
|
||||
/// Physical address of another block of
|
||||
/// EFI_CAPSULE_BLOCK_DESCRIPTOR structures. This
|
||||
/// member of the union is used if Length is equal to zero. If
|
||||
/// ContinuationPointer is zero this entry represents the end of the list.
|
||||
///
|
||||
EFI_PHYSICAL_ADDRESS ContinuationPointer;
|
||||
EFI_PHYSICAL_ADDRESS ContinuationPointer;
|
||||
} Union;
|
||||
} EFI_CAPSULE_BLOCK_DESCRIPTOR;
|
||||
|
||||
@@ -1641,23 +1633,23 @@ typedef struct {
|
||||
///
|
||||
/// A GUID that defines the contents of a capsule.
|
||||
///
|
||||
EFI_GUID CapsuleGuid;
|
||||
EFI_GUID CapsuleGuid;
|
||||
///
|
||||
/// The size of the capsule header. This may be larger than the size of
|
||||
/// the EFI_CAPSULE_HEADER since CapsuleGuid may imply
|
||||
/// extended header entries
|
||||
///
|
||||
UINT32 HeaderSize;
|
||||
UINT32 HeaderSize;
|
||||
///
|
||||
/// Bit-mapped list describing the capsule attributes. The Flag values
|
||||
/// of 0x0000 - 0xFFFF are defined by CapsuleGuid. Flag values
|
||||
/// of 0x10000 - 0xFFFFFFFF are defined by this specification
|
||||
///
|
||||
UINT32 Flags;
|
||||
UINT32 Flags;
|
||||
///
|
||||
/// Size in bytes of the capsule.
|
||||
///
|
||||
UINT32 CapsuleImageSize;
|
||||
UINT32 CapsuleImageSize;
|
||||
} EFI_CAPSULE_HEADER;
|
||||
|
||||
///
|
||||
@@ -1669,16 +1661,16 @@ typedef struct {
|
||||
///
|
||||
/// the size of the array of capsules.
|
||||
///
|
||||
UINT32 CapsuleArrayNumber;
|
||||
UINT32 CapsuleArrayNumber;
|
||||
///
|
||||
/// Point to an array of capsules that contain the same CapsuleGuid value.
|
||||
///
|
||||
VOID* CapsulePtr[1];
|
||||
VOID *CapsulePtr[1];
|
||||
} EFI_CAPSULE_TABLE;
|
||||
|
||||
#define CAPSULE_FLAGS_PERSIST_ACROSS_RESET 0x00010000
|
||||
#define CAPSULE_FLAGS_POPULATE_SYSTEM_TABLE 0x00020000
|
||||
#define CAPSULE_FLAGS_INITIATE_RESET 0x00040000
|
||||
#define CAPSULE_FLAGS_PERSIST_ACROSS_RESET 0x00010000
|
||||
#define CAPSULE_FLAGS_POPULATE_SYSTEM_TABLE 0x00020000
|
||||
#define CAPSULE_FLAGS_INITIATE_RESET 0x00040000
|
||||
|
||||
/**
|
||||
Passes capsules to the firmware with both virtual and physical mapping. Depending on the intended
|
||||
@@ -1821,50 +1813,49 @@ typedef struct {
|
||||
///
|
||||
/// The table header for the EFI Runtime Services Table.
|
||||
///
|
||||
EFI_TABLE_HEADER Hdr;
|
||||
EFI_TABLE_HEADER Hdr;
|
||||
|
||||
//
|
||||
// Time Services
|
||||
//
|
||||
EFI_GET_TIME GetTime;
|
||||
EFI_SET_TIME SetTime;
|
||||
EFI_GET_WAKEUP_TIME GetWakeupTime;
|
||||
EFI_SET_WAKEUP_TIME SetWakeupTime;
|
||||
EFI_GET_TIME GetTime;
|
||||
EFI_SET_TIME SetTime;
|
||||
EFI_GET_WAKEUP_TIME GetWakeupTime;
|
||||
EFI_SET_WAKEUP_TIME SetWakeupTime;
|
||||
|
||||
//
|
||||
// Virtual Memory Services
|
||||
//
|
||||
EFI_SET_VIRTUAL_ADDRESS_MAP SetVirtualAddressMap;
|
||||
EFI_CONVERT_POINTER ConvertPointer;
|
||||
EFI_SET_VIRTUAL_ADDRESS_MAP SetVirtualAddressMap;
|
||||
EFI_CONVERT_POINTER ConvertPointer;
|
||||
|
||||
//
|
||||
// Variable Services
|
||||
//
|
||||
EFI_GET_VARIABLE GetVariable;
|
||||
EFI_GET_NEXT_VARIABLE_NAME GetNextVariableName;
|
||||
EFI_SET_VARIABLE SetVariable;
|
||||
EFI_GET_VARIABLE GetVariable;
|
||||
EFI_GET_NEXT_VARIABLE_NAME GetNextVariableName;
|
||||
EFI_SET_VARIABLE SetVariable;
|
||||
|
||||
//
|
||||
// Miscellaneous Services
|
||||
//
|
||||
EFI_GET_NEXT_HIGH_MONO_COUNT GetNextHighMonotonicCount;
|
||||
EFI_RESET_SYSTEM ResetSystem;
|
||||
EFI_GET_NEXT_HIGH_MONO_COUNT GetNextHighMonotonicCount;
|
||||
EFI_RESET_SYSTEM ResetSystem;
|
||||
|
||||
//
|
||||
// UEFI 2.0 Capsule Services
|
||||
//
|
||||
EFI_UPDATE_CAPSULE UpdateCapsule;
|
||||
EFI_QUERY_CAPSULE_CAPABILITIES QueryCapsuleCapabilities;
|
||||
EFI_UPDATE_CAPSULE UpdateCapsule;
|
||||
EFI_QUERY_CAPSULE_CAPABILITIES QueryCapsuleCapabilities;
|
||||
|
||||
//
|
||||
// Miscellaneous UEFI 2.0 Service
|
||||
//
|
||||
EFI_QUERY_VARIABLE_INFO QueryVariableInfo;
|
||||
EFI_QUERY_VARIABLE_INFO QueryVariableInfo;
|
||||
} EFI_RUNTIME_SERVICES;
|
||||
|
||||
|
||||
#define EFI_BOOT_SERVICES_SIGNATURE SIGNATURE_64 ('B','O','O','T','S','E','R','V')
|
||||
#define EFI_BOOT_SERVICES_REVISION EFI_SPECIFICATION_VERSION
|
||||
#define EFI_BOOT_SERVICES_SIGNATURE SIGNATURE_64 ('B','O','O','T','S','E','R','V')
|
||||
#define EFI_BOOT_SERVICES_REVISION EFI_SPECIFICATION_VERSION
|
||||
|
||||
///
|
||||
/// EFI Boot Services Table.
|
||||
@@ -1873,95 +1864,95 @@ typedef struct {
|
||||
///
|
||||
/// The table header for the EFI Boot Services Table.
|
||||
///
|
||||
EFI_TABLE_HEADER Hdr;
|
||||
EFI_TABLE_HEADER Hdr;
|
||||
|
||||
//
|
||||
// Task Priority Services
|
||||
//
|
||||
EFI_RAISE_TPL RaiseTPL;
|
||||
EFI_RESTORE_TPL RestoreTPL;
|
||||
EFI_RAISE_TPL RaiseTPL;
|
||||
EFI_RESTORE_TPL RestoreTPL;
|
||||
|
||||
//
|
||||
// Memory Services
|
||||
//
|
||||
EFI_ALLOCATE_PAGES AllocatePages;
|
||||
EFI_FREE_PAGES FreePages;
|
||||
EFI_GET_MEMORY_MAP GetMemoryMap;
|
||||
EFI_ALLOCATE_POOL AllocatePool;
|
||||
EFI_FREE_POOL FreePool;
|
||||
EFI_ALLOCATE_PAGES AllocatePages;
|
||||
EFI_FREE_PAGES FreePages;
|
||||
EFI_GET_MEMORY_MAP GetMemoryMap;
|
||||
EFI_ALLOCATE_POOL AllocatePool;
|
||||
EFI_FREE_POOL FreePool;
|
||||
|
||||
//
|
||||
// Event & Timer Services
|
||||
//
|
||||
EFI_CREATE_EVENT CreateEvent;
|
||||
EFI_SET_TIMER SetTimer;
|
||||
EFI_WAIT_FOR_EVENT WaitForEvent;
|
||||
EFI_SIGNAL_EVENT SignalEvent;
|
||||
EFI_CLOSE_EVENT CloseEvent;
|
||||
EFI_CHECK_EVENT CheckEvent;
|
||||
EFI_CREATE_EVENT CreateEvent;
|
||||
EFI_SET_TIMER SetTimer;
|
||||
EFI_WAIT_FOR_EVENT WaitForEvent;
|
||||
EFI_SIGNAL_EVENT SignalEvent;
|
||||
EFI_CLOSE_EVENT CloseEvent;
|
||||
EFI_CHECK_EVENT CheckEvent;
|
||||
|
||||
//
|
||||
// Protocol Handler Services
|
||||
//
|
||||
EFI_INSTALL_PROTOCOL_INTERFACE InstallProtocolInterface;
|
||||
EFI_REINSTALL_PROTOCOL_INTERFACE ReinstallProtocolInterface;
|
||||
EFI_UNINSTALL_PROTOCOL_INTERFACE UninstallProtocolInterface;
|
||||
EFI_HANDLE_PROTOCOL HandleProtocol;
|
||||
VOID *Reserved;
|
||||
EFI_REGISTER_PROTOCOL_NOTIFY RegisterProtocolNotify;
|
||||
EFI_LOCATE_HANDLE LocateHandle;
|
||||
EFI_LOCATE_DEVICE_PATH LocateDevicePath;
|
||||
EFI_INSTALL_CONFIGURATION_TABLE InstallConfigurationTable;
|
||||
EFI_INSTALL_PROTOCOL_INTERFACE InstallProtocolInterface;
|
||||
EFI_REINSTALL_PROTOCOL_INTERFACE ReinstallProtocolInterface;
|
||||
EFI_UNINSTALL_PROTOCOL_INTERFACE UninstallProtocolInterface;
|
||||
EFI_HANDLE_PROTOCOL HandleProtocol;
|
||||
VOID *Reserved;
|
||||
EFI_REGISTER_PROTOCOL_NOTIFY RegisterProtocolNotify;
|
||||
EFI_LOCATE_HANDLE LocateHandle;
|
||||
EFI_LOCATE_DEVICE_PATH LocateDevicePath;
|
||||
EFI_INSTALL_CONFIGURATION_TABLE InstallConfigurationTable;
|
||||
|
||||
//
|
||||
// Image Services
|
||||
//
|
||||
EFI_IMAGE_LOAD LoadImage;
|
||||
EFI_IMAGE_START StartImage;
|
||||
EFI_EXIT Exit;
|
||||
EFI_IMAGE_UNLOAD UnloadImage;
|
||||
EFI_EXIT_BOOT_SERVICES ExitBootServices;
|
||||
EFI_IMAGE_LOAD LoadImage;
|
||||
EFI_IMAGE_START StartImage;
|
||||
EFI_EXIT Exit;
|
||||
EFI_IMAGE_UNLOAD UnloadImage;
|
||||
EFI_EXIT_BOOT_SERVICES ExitBootServices;
|
||||
|
||||
//
|
||||
// Miscellaneous Services
|
||||
//
|
||||
EFI_GET_NEXT_MONOTONIC_COUNT GetNextMonotonicCount;
|
||||
EFI_STALL Stall;
|
||||
EFI_SET_WATCHDOG_TIMER SetWatchdogTimer;
|
||||
EFI_GET_NEXT_MONOTONIC_COUNT GetNextMonotonicCount;
|
||||
EFI_STALL Stall;
|
||||
EFI_SET_WATCHDOG_TIMER SetWatchdogTimer;
|
||||
|
||||
//
|
||||
// DriverSupport Services
|
||||
//
|
||||
EFI_CONNECT_CONTROLLER ConnectController;
|
||||
EFI_DISCONNECT_CONTROLLER DisconnectController;
|
||||
EFI_CONNECT_CONTROLLER ConnectController;
|
||||
EFI_DISCONNECT_CONTROLLER DisconnectController;
|
||||
|
||||
//
|
||||
// Open and Close Protocol Services
|
||||
//
|
||||
EFI_OPEN_PROTOCOL OpenProtocol;
|
||||
EFI_CLOSE_PROTOCOL CloseProtocol;
|
||||
EFI_OPEN_PROTOCOL_INFORMATION OpenProtocolInformation;
|
||||
EFI_OPEN_PROTOCOL OpenProtocol;
|
||||
EFI_CLOSE_PROTOCOL CloseProtocol;
|
||||
EFI_OPEN_PROTOCOL_INFORMATION OpenProtocolInformation;
|
||||
|
||||
//
|
||||
// Library Services
|
||||
//
|
||||
EFI_PROTOCOLS_PER_HANDLE ProtocolsPerHandle;
|
||||
EFI_LOCATE_HANDLE_BUFFER LocateHandleBuffer;
|
||||
EFI_LOCATE_PROTOCOL LocateProtocol;
|
||||
EFI_INSTALL_MULTIPLE_PROTOCOL_INTERFACES InstallMultipleProtocolInterfaces;
|
||||
EFI_UNINSTALL_MULTIPLE_PROTOCOL_INTERFACES UninstallMultipleProtocolInterfaces;
|
||||
EFI_PROTOCOLS_PER_HANDLE ProtocolsPerHandle;
|
||||
EFI_LOCATE_HANDLE_BUFFER LocateHandleBuffer;
|
||||
EFI_LOCATE_PROTOCOL LocateProtocol;
|
||||
EFI_INSTALL_MULTIPLE_PROTOCOL_INTERFACES InstallMultipleProtocolInterfaces;
|
||||
EFI_UNINSTALL_MULTIPLE_PROTOCOL_INTERFACES UninstallMultipleProtocolInterfaces;
|
||||
|
||||
//
|
||||
// 32-bit CRC Services
|
||||
//
|
||||
EFI_CALCULATE_CRC32 CalculateCrc32;
|
||||
EFI_CALCULATE_CRC32 CalculateCrc32;
|
||||
|
||||
//
|
||||
// Miscellaneous Services
|
||||
//
|
||||
EFI_COPY_MEM CopyMem;
|
||||
EFI_SET_MEM SetMem;
|
||||
EFI_CREATE_EVENT_EX CreateEventEx;
|
||||
EFI_COPY_MEM CopyMem;
|
||||
EFI_SET_MEM SetMem;
|
||||
EFI_CREATE_EVENT_EX CreateEventEx;
|
||||
} EFI_BOOT_SERVICES;
|
||||
|
||||
///
|
||||
@@ -1972,11 +1963,11 @@ typedef struct {
|
||||
///
|
||||
/// The 128-bit GUID value that uniquely identifies the system configuration table.
|
||||
///
|
||||
EFI_GUID VendorGuid;
|
||||
EFI_GUID VendorGuid;
|
||||
///
|
||||
/// A pointer to the table associated with VendorGuid.
|
||||
///
|
||||
VOID *VendorTable;
|
||||
VOID *VendorTable;
|
||||
} EFI_CONFIGURATION_TABLE;
|
||||
|
||||
///
|
||||
@@ -1986,63 +1977,63 @@ typedef struct {
|
||||
///
|
||||
/// The table header for the EFI System Table.
|
||||
///
|
||||
EFI_TABLE_HEADER Hdr;
|
||||
EFI_TABLE_HEADER Hdr;
|
||||
///
|
||||
/// A pointer to a null terminated string that identifies the vendor
|
||||
/// that produces the system firmware for the platform.
|
||||
///
|
||||
CHAR16 *FirmwareVendor;
|
||||
CHAR16 *FirmwareVendor;
|
||||
///
|
||||
/// A firmware vendor specific value that identifies the revision
|
||||
/// of the system firmware for the platform.
|
||||
///
|
||||
UINT32 FirmwareRevision;
|
||||
UINT32 FirmwareRevision;
|
||||
///
|
||||
/// The handle for the active console input device. This handle must support
|
||||
/// EFI_SIMPLE_TEXT_INPUT_PROTOCOL and EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL.
|
||||
///
|
||||
EFI_HANDLE ConsoleInHandle;
|
||||
EFI_HANDLE ConsoleInHandle;
|
||||
///
|
||||
/// A pointer to the EFI_SIMPLE_TEXT_INPUT_PROTOCOL interface that is
|
||||
/// associated with ConsoleInHandle.
|
||||
///
|
||||
EFI_SIMPLE_TEXT_INPUT_PROTOCOL *ConIn;
|
||||
EFI_SIMPLE_TEXT_INPUT_PROTOCOL *ConIn;
|
||||
///
|
||||
/// The handle for the active console output device.
|
||||
///
|
||||
EFI_HANDLE ConsoleOutHandle;
|
||||
EFI_HANDLE ConsoleOutHandle;
|
||||
///
|
||||
/// A pointer to the EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL interface
|
||||
/// that is associated with ConsoleOutHandle.
|
||||
///
|
||||
EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *ConOut;
|
||||
EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *ConOut;
|
||||
///
|
||||
/// The handle for the active standard error console device.
|
||||
/// This handle must support the EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL.
|
||||
///
|
||||
EFI_HANDLE StandardErrorHandle;
|
||||
EFI_HANDLE StandardErrorHandle;
|
||||
///
|
||||
/// A pointer to the EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL interface
|
||||
/// that is associated with StandardErrorHandle.
|
||||
///
|
||||
EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *StdErr;
|
||||
EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *StdErr;
|
||||
///
|
||||
/// A pointer to the EFI Runtime Services Table.
|
||||
///
|
||||
EFI_RUNTIME_SERVICES *RuntimeServices;
|
||||
EFI_RUNTIME_SERVICES *RuntimeServices;
|
||||
///
|
||||
/// A pointer to the EFI Boot Services Table.
|
||||
///
|
||||
EFI_BOOT_SERVICES *BootServices;
|
||||
EFI_BOOT_SERVICES *BootServices;
|
||||
///
|
||||
/// The number of system configuration tables in the buffer ConfigurationTable.
|
||||
///
|
||||
UINTN NumberOfTableEntries;
|
||||
UINTN NumberOfTableEntries;
|
||||
///
|
||||
/// A pointer to the system configuration tables.
|
||||
/// The number of entries in the table is NumberOfTableEntries.
|
||||
///
|
||||
EFI_CONFIGURATION_TABLE *ConfigurationTable;
|
||||
EFI_CONFIGURATION_TABLE *ConfigurationTable;
|
||||
} EFI_SYSTEM_TABLE;
|
||||
|
||||
/**
|
||||
@@ -2077,13 +2068,13 @@ typedef struct _EFI_LOAD_OPTION {
|
||||
/// The attributes for this load option entry. All unused bits must be zero
|
||||
/// and are reserved by the UEFI specification for future growth.
|
||||
///
|
||||
UINT32 Attributes;
|
||||
UINT32 Attributes;
|
||||
///
|
||||
/// Length in bytes of the FilePathList. OptionalData starts at offset
|
||||
/// sizeof(UINT32) + sizeof(UINT16) + StrSize(Description) + FilePathListLength
|
||||
/// of the EFI_LOAD_OPTION descriptor.
|
||||
///
|
||||
UINT16 FilePathListLength;
|
||||
UINT16 FilePathListLength;
|
||||
///
|
||||
/// The user readable description for the load option.
|
||||
/// This field ends with a Null character.
|
||||
@@ -2115,18 +2106,18 @@ typedef struct _EFI_LOAD_OPTION {
|
||||
//
|
||||
// EFI Load Options Attributes
|
||||
//
|
||||
#define LOAD_OPTION_ACTIVE 0x00000001
|
||||
#define LOAD_OPTION_FORCE_RECONNECT 0x00000002
|
||||
#define LOAD_OPTION_HIDDEN 0x00000008
|
||||
#define LOAD_OPTION_CATEGORY 0x00001F00
|
||||
#define LOAD_OPTION_ACTIVE 0x00000001
|
||||
#define LOAD_OPTION_FORCE_RECONNECT 0x00000002
|
||||
#define LOAD_OPTION_HIDDEN 0x00000008
|
||||
#define LOAD_OPTION_CATEGORY 0x00001F00
|
||||
|
||||
#define LOAD_OPTION_CATEGORY_BOOT 0x00000000
|
||||
#define LOAD_OPTION_CATEGORY_APP 0x00000100
|
||||
#define LOAD_OPTION_CATEGORY_BOOT 0x00000000
|
||||
#define LOAD_OPTION_CATEGORY_APP 0x00000100
|
||||
|
||||
#define EFI_BOOT_OPTION_SUPPORT_KEY 0x00000001
|
||||
#define EFI_BOOT_OPTION_SUPPORT_APP 0x00000002
|
||||
#define EFI_BOOT_OPTION_SUPPORT_SYSPREP 0x00000010
|
||||
#define EFI_BOOT_OPTION_SUPPORT_COUNT 0x00000300
|
||||
#define EFI_BOOT_OPTION_SUPPORT_KEY 0x00000001
|
||||
#define EFI_BOOT_OPTION_SUPPORT_APP 0x00000002
|
||||
#define EFI_BOOT_OPTION_SUPPORT_SYSPREP 0x00000010
|
||||
#define EFI_BOOT_OPTION_SUPPORT_COUNT 0x00000300
|
||||
|
||||
///
|
||||
/// EFI Boot Key Data
|
||||
@@ -2136,40 +2127,40 @@ typedef union {
|
||||
///
|
||||
/// Indicates the revision of the EFI_KEY_OPTION structure. This revision level should be 0.
|
||||
///
|
||||
UINT32 Revision : 8;
|
||||
UINT32 Revision : 8;
|
||||
///
|
||||
/// Either the left or right Shift keys must be pressed (1) or must not be pressed (0).
|
||||
///
|
||||
UINT32 ShiftPressed : 1;
|
||||
UINT32 ShiftPressed : 1;
|
||||
///
|
||||
/// Either the left or right Control keys must be pressed (1) or must not be pressed (0).
|
||||
///
|
||||
UINT32 ControlPressed : 1;
|
||||
UINT32 ControlPressed : 1;
|
||||
///
|
||||
/// Either the left or right Alt keys must be pressed (1) or must not be pressed (0).
|
||||
///
|
||||
UINT32 AltPressed : 1;
|
||||
UINT32 AltPressed : 1;
|
||||
///
|
||||
/// Either the left or right Logo keys must be pressed (1) or must not be pressed (0).
|
||||
///
|
||||
UINT32 LogoPressed : 1;
|
||||
UINT32 LogoPressed : 1;
|
||||
///
|
||||
/// The Menu key must be pressed (1) or must not be pressed (0).
|
||||
///
|
||||
UINT32 MenuPressed : 1;
|
||||
UINT32 MenuPressed : 1;
|
||||
///
|
||||
/// The SysReq key must be pressed (1) or must not be pressed (0).
|
||||
///
|
||||
UINT32 SysReqPressed : 1;
|
||||
UINT32 Reserved : 16;
|
||||
UINT32 SysReqPressed : 1;
|
||||
UINT32 Reserved : 16;
|
||||
///
|
||||
/// Specifies the actual number of entries in EFI_KEY_OPTION.Keys, from 0-3. If
|
||||
/// zero, then only the shift state is considered. If more than one, then the boot option will
|
||||
/// only be launched if all of the specified keys are pressed with the same shift state.
|
||||
///
|
||||
UINT32 InputKeyCount : 2;
|
||||
UINT32 InputKeyCount : 2;
|
||||
} Options;
|
||||
UINT32 PackedValue;
|
||||
UINT32 PackedValue;
|
||||
} EFI_BOOT_KEY_DATA;
|
||||
|
||||
///
|
||||
@@ -2180,58 +2171,58 @@ typedef struct {
|
||||
///
|
||||
/// Specifies options about how the key will be processed.
|
||||
///
|
||||
EFI_BOOT_KEY_DATA KeyData;
|
||||
EFI_BOOT_KEY_DATA KeyData;
|
||||
///
|
||||
/// The CRC-32 which should match the CRC-32 of the entire EFI_LOAD_OPTION to
|
||||
/// which BootOption refers. If the CRC-32s do not match this value, then this key
|
||||
/// option is ignored.
|
||||
///
|
||||
UINT32 BootOptionCrc;
|
||||
UINT32 BootOptionCrc;
|
||||
///
|
||||
/// The Boot#### option which will be invoked if this key is pressed and the boot option
|
||||
/// is active (LOAD_OPTION_ACTIVE is set).
|
||||
///
|
||||
UINT16 BootOption;
|
||||
UINT16 BootOption;
|
||||
///
|
||||
/// The key codes to compare against those returned by the
|
||||
/// EFI_SIMPLE_TEXT_INPUT and EFI_SIMPLE_TEXT_INPUT_EX protocols.
|
||||
/// The number of key codes (0-3) is specified by the EFI_KEY_CODE_COUNT field in KeyOptions.
|
||||
///
|
||||
//EFI_INPUT_KEY Keys[];
|
||||
// EFI_INPUT_KEY Keys[];
|
||||
} EFI_KEY_OPTION;
|
||||
#pragma pack()
|
||||
|
||||
//
|
||||
// EFI File location to boot from on removable media devices
|
||||
//
|
||||
#define EFI_REMOVABLE_MEDIA_FILE_NAME_IA32 L"\\EFI\\BOOT\\BOOTIA32.EFI"
|
||||
#define EFI_REMOVABLE_MEDIA_FILE_NAME_IA64 L"\\EFI\\BOOT\\BOOTIA64.EFI"
|
||||
#define EFI_REMOVABLE_MEDIA_FILE_NAME_X64 L"\\EFI\\BOOT\\BOOTX64.EFI"
|
||||
#define EFI_REMOVABLE_MEDIA_FILE_NAME_ARM L"\\EFI\\BOOT\\BOOTARM.EFI"
|
||||
#define EFI_REMOVABLE_MEDIA_FILE_NAME_AARCH64 L"\\EFI\\BOOT\\BOOTAA64.EFI"
|
||||
#define EFI_REMOVABLE_MEDIA_FILE_NAME_RISCV64 L"\\EFI\\BOOT\\BOOTRISCV64.EFI"
|
||||
#define EFI_REMOVABLE_MEDIA_FILE_NAME_IA32 L"\\EFI\\BOOT\\BOOTIA32.EFI"
|
||||
#define EFI_REMOVABLE_MEDIA_FILE_NAME_IA64 L"\\EFI\\BOOT\\BOOTIA64.EFI"
|
||||
#define EFI_REMOVABLE_MEDIA_FILE_NAME_X64 L"\\EFI\\BOOT\\BOOTX64.EFI"
|
||||
#define EFI_REMOVABLE_MEDIA_FILE_NAME_ARM L"\\EFI\\BOOT\\BOOTARM.EFI"
|
||||
#define EFI_REMOVABLE_MEDIA_FILE_NAME_AARCH64 L"\\EFI\\BOOT\\BOOTAA64.EFI"
|
||||
#define EFI_REMOVABLE_MEDIA_FILE_NAME_RISCV64 L"\\EFI\\BOOT\\BOOTRISCV64.EFI"
|
||||
|
||||
#if !defined(EFI_REMOVABLE_MEDIA_FILE_NAME)
|
||||
#if defined (MDE_CPU_IA32)
|
||||
#define EFI_REMOVABLE_MEDIA_FILE_NAME EFI_REMOVABLE_MEDIA_FILE_NAME_IA32
|
||||
#elif defined (MDE_CPU_X64)
|
||||
#define EFI_REMOVABLE_MEDIA_FILE_NAME EFI_REMOVABLE_MEDIA_FILE_NAME_X64
|
||||
#elif defined (MDE_CPU_EBC)
|
||||
#elif defined (MDE_CPU_ARM)
|
||||
#define EFI_REMOVABLE_MEDIA_FILE_NAME EFI_REMOVABLE_MEDIA_FILE_NAME_ARM
|
||||
#elif defined (MDE_CPU_AARCH64)
|
||||
#define EFI_REMOVABLE_MEDIA_FILE_NAME EFI_REMOVABLE_MEDIA_FILE_NAME_AARCH64
|
||||
#elif defined (MDE_CPU_RISCV64)
|
||||
#define EFI_REMOVABLE_MEDIA_FILE_NAME EFI_REMOVABLE_MEDIA_FILE_NAME_RISCV64
|
||||
#else
|
||||
#error Unknown Processor Type
|
||||
#endif
|
||||
#if !defined (EFI_REMOVABLE_MEDIA_FILE_NAME)
|
||||
#if defined (MDE_CPU_IA32)
|
||||
#define EFI_REMOVABLE_MEDIA_FILE_NAME EFI_REMOVABLE_MEDIA_FILE_NAME_IA32
|
||||
#elif defined (MDE_CPU_X64)
|
||||
#define EFI_REMOVABLE_MEDIA_FILE_NAME EFI_REMOVABLE_MEDIA_FILE_NAME_X64
|
||||
#elif defined (MDE_CPU_EBC)
|
||||
#elif defined (MDE_CPU_ARM)
|
||||
#define EFI_REMOVABLE_MEDIA_FILE_NAME EFI_REMOVABLE_MEDIA_FILE_NAME_ARM
|
||||
#elif defined (MDE_CPU_AARCH64)
|
||||
#define EFI_REMOVABLE_MEDIA_FILE_NAME EFI_REMOVABLE_MEDIA_FILE_NAME_AARCH64
|
||||
#elif defined (MDE_CPU_RISCV64)
|
||||
#define EFI_REMOVABLE_MEDIA_FILE_NAME EFI_REMOVABLE_MEDIA_FILE_NAME_RISCV64
|
||||
#else
|
||||
#error Unknown Processor Type
|
||||
#endif
|
||||
#endif
|
||||
|
||||
//
|
||||
// The directory within the active EFI System Partition defined for delivery of capsule to firmware
|
||||
//
|
||||
#define EFI_CAPSULE_FILE_DIRECTORY L"\\EFI\\UpdateCapsule\\"
|
||||
#define EFI_CAPSULE_FILE_DIRECTORY L"\\EFI\\UpdateCapsule\\"
|
||||
|
||||
#include <Uefi/UefiPxe.h>
|
||||
#include <Uefi/UefiGpt.h>
|
||||
|
Reference in New Issue
Block a user