aboutsummaryrefslogtreecommitdiff
path: root/sys/contrib/edk2
diff options
context:
space:
mode:
Diffstat (limited to 'sys/contrib/edk2')
-rw-r--r--sys/contrib/edk2/Include/Base.h725
-rw-r--r--sys/contrib/edk2/Include/Guid/HiiFormMapMethodGuid.h2
-rw-r--r--sys/contrib/edk2/Include/Guid/PcAnsi.h12
-rw-r--r--sys/contrib/edk2/Include/Guid/WinCertificate.h32
-rw-r--r--sys/contrib/edk2/Include/IndustryStandard/Acpi10.h473
-rw-r--r--sys/contrib/edk2/Include/IndustryStandard/Acpi20.h348
-rw-r--r--sys/contrib/edk2/Include/IndustryStandard/Acpi30.h464
-rw-r--r--sys/contrib/edk2/Include/IndustryStandard/Acpi40.h1042
-rw-r--r--sys/contrib/edk2/Include/IndustryStandard/Acpi50.h1517
-rw-r--r--sys/contrib/edk2/Include/IndustryStandard/Acpi51.h1631
-rw-r--r--sys/contrib/edk2/Include/IndustryStandard/Acpi60.h1905
-rw-r--r--sys/contrib/edk2/Include/IndustryStandard/AcpiAml.h305
-rw-r--r--sys/contrib/edk2/Include/IndustryStandard/Bluetooth.h18
-rw-r--r--sys/contrib/edk2/Include/Library/BaseLib.h2792
-rw-r--r--sys/contrib/edk2/Include/Library/DebugLib.h237
-rw-r--r--sys/contrib/edk2/Include/Library/DevicePathLib.h38
-rw-r--r--sys/contrib/edk2/Include/Library/MemoryAllocationLib.h2
-rw-r--r--sys/contrib/edk2/Include/Library/PcdLib.h848
-rw-r--r--sys/contrib/edk2/Include/Library/PrintLib.h151
-rw-r--r--sys/contrib/edk2/Include/Library/UefiBootServicesTableLib.h4
-rw-r--r--sys/contrib/edk2/Include/Protocol/DebugPort.h21
-rw-r--r--sys/contrib/edk2/Include/Protocol/DevicePath.h592
-rw-r--r--sys/contrib/edk2/Include/Protocol/DevicePathFromText.h11
-rw-r--r--sys/contrib/edk2/Include/Protocol/DevicePathToText.h12
-rw-r--r--sys/contrib/edk2/Include/Protocol/DevicePathUtilities.h33
-rw-r--r--sys/contrib/edk2/Include/Protocol/SimpleTextIn.h19
-rw-r--r--sys/contrib/edk2/Include/Protocol/SimpleTextInEx.h124
-rw-r--r--sys/contrib/edk2/Include/Protocol/SimpleTextOut.h96
-rw-r--r--sys/contrib/edk2/Include/Uefi.h1
-rw-r--r--sys/contrib/edk2/Include/Uefi/UefiBaseType.h145
-rw-r--r--sys/contrib/edk2/Include/Uefi/UefiGpt.h36
-rw-r--r--sys/contrib/edk2/Include/Uefi/UefiInternalFormRepresentation.h1480
-rw-r--r--sys/contrib/edk2/Include/Uefi/UefiMultiPhase.h58
-rw-r--r--sys/contrib/edk2/Include/Uefi/UefiPxe.h608
-rw-r--r--sys/contrib/edk2/Include/Uefi/UefiSpec.h532
-rw-r--r--sys/contrib/edk2/MdePkg.dec322
36 files changed, 8399 insertions, 8237 deletions
diff --git a/sys/contrib/edk2/Include/Base.h b/sys/contrib/edk2/Include/Base.h
index 60c2e085d5cc..e3d03a9cc5ab 100644
--- a/sys/contrib/edk2/Include/Base.h
+++ b/sys/contrib/edk2/Include/Base.h
@@ -6,13 +6,12 @@
environment. There are a set of base libraries in the Mde Package that can
be used to implement base modules.
-Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2006 - 2021, Intel Corporation. All rights reserved.<BR>
Portions copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>
SPDX-License-Identifier: BSD-2-Clause-Patent
**/
-
#ifndef __BASE_H__
#define __BASE_H__
@@ -21,11 +20,11 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
//
#include <ProcessorBind.h>
-#if defined(_MSC_EXTENSIONS)
+#if defined (_MSC_EXTENSIONS)
//
// Disable warning when last field of data structure is a zero sized array.
//
-#pragma warning ( disable : 4200 )
+ #pragma warning ( disable : 4200 )
#endif
//
@@ -33,20 +32,20 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
// if the /OPT:REF linker option is used. We defined a macro as this is a
// a non standard extension
//
-#if defined(_MSC_VER) && _MSC_VER < 1800 && !defined (MDE_CPU_EBC)
- ///
- /// Remove global variable from the linked image if there are no references to
- /// it after all compiler and linker optimizations have been performed.
- ///
- ///
- #define GLOBAL_REMOVE_IF_UNREFERENCED __declspec(selectany)
+#if defined (_MSC_VER) && _MSC_VER < 1800 && !defined (MDE_CPU_EBC)
+///
+/// Remove global variable from the linked image if there are no references to
+/// it after all compiler and linker optimizations have been performed.
+///
+///
+#define GLOBAL_REMOVE_IF_UNREFERENCED __declspec(selectany)
#else
- ///
- /// Remove the global variable from the linked image if there are no references
- /// to it after all compiler and linker optimizations have been performed.
- ///
- ///
- #define GLOBAL_REMOVE_IF_UNREFERENCED
+///
+/// Remove the global variable from the linked image if there are no references
+/// to it after all compiler and linker optimizations have been performed.
+///
+///
+#define GLOBAL_REMOVE_IF_UNREFERENCED
#endif
//
@@ -55,27 +54,27 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
//
#ifndef UNREACHABLE
#ifdef __GNUC__
- ///
- /// Signal compilers and analyzers that this call is not reachable. It is
- /// up to the compiler to remove any code past that point.
- ///
- #define UNREACHABLE() __builtin_unreachable ()
- #elif defined (__has_feature)
+///
+/// Signal compilers and analyzers that this call is not reachable. It is
+/// up to the compiler to remove any code past that point.
+///
+#define UNREACHABLE() __builtin_unreachable ()
+ #elif defined (__has_builtin) && defined (__has_feature)
#if __has_builtin (__builtin_unreachable)
- ///
- /// Signal compilers and analyzers that this call is not reachable. It is
- /// up to the compiler to remove any code past that point.
- ///
- #define UNREACHABLE() __builtin_unreachable ()
+///
+/// Signal compilers and analyzers that this call is not reachable. It is
+/// up to the compiler to remove any code past that point.
+///
+#define UNREACHABLE() __builtin_unreachable ()
#endif
#endif
#ifndef UNREACHABLE
- ///
- /// Signal compilers and analyzers that this call is not reachable. It is
- /// up to the compiler to remove any code past that point.
- ///
- #define UNREACHABLE()
+///
+/// Signal compilers and analyzers that this call is not reachable. It is
+/// up to the compiler to remove any code past that point.
+///
+#define UNREACHABLE()
#endif
#endif
@@ -86,26 +85,26 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
//
#ifndef NORETURN
#if defined (__GNUC__) || defined (__clang__)
- ///
- /// Signal compilers and analyzers that the function cannot return.
- /// It is up to the compiler to remove any code past a call to functions
- /// flagged with this attribute.
- ///
- #define NORETURN __attribute__((noreturn))
- #elif defined(_MSC_EXTENSIONS) && !defined(MDE_CPU_EBC)
- ///
- /// Signal compilers and analyzers that the function cannot return.
- /// It is up to the compiler to remove any code past a call to functions
- /// flagged with this attribute.
- ///
- #define NORETURN __declspec(noreturn)
+///
+/// Signal compilers and analyzers that the function cannot return.
+/// It is up to the compiler to remove any code past a call to functions
+/// flagged with this attribute.
+///
+#define NORETURN __attribute__((noreturn))
+ #elif defined (_MSC_EXTENSIONS) && !defined (MDE_CPU_EBC)
+///
+/// Signal compilers and analyzers that the function cannot return.
+/// It is up to the compiler to remove any code past a call to functions
+/// flagged with this attribute.
+///
+#define NORETURN __declspec(noreturn)
#else
- ///
- /// Signal compilers and analyzers that the function cannot return.
- /// It is up to the compiler to remove any code past a call to functions
- /// flagged with this attribute.
- ///
- #define NORETURN
+///
+/// Signal compilers and analyzers that the function cannot return.
+/// It is up to the compiler to remove any code past a call to functions
+/// flagged with this attribute.
+///
+#define NORETURN
#endif
#endif
@@ -116,20 +115,20 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
#ifndef ANALYZER_UNREACHABLE
#ifdef __clang_analyzer__
#if __has_builtin (__builtin_unreachable)
- ///
- /// Signal the analyzer that this call is not reachable.
- /// This excludes compilers.
- ///
- #define ANALYZER_UNREACHABLE() __builtin_unreachable ()
+///
+/// Signal the analyzer that this call is not reachable.
+/// This excludes compilers.
+///
+#define ANALYZER_UNREACHABLE() __builtin_unreachable ()
#endif
#endif
#ifndef ANALYZER_UNREACHABLE
- ///
- /// Signal the analyzer that this call is not reachable.
- /// This excludes compilers.
- ///
- #define ANALYZER_UNREACHABLE()
+///
+/// Signal the analyzer that this call is not reachable.
+/// This excludes compilers.
+///
+#define ANALYZER_UNREACHABLE()
#endif
#endif
@@ -142,20 +141,20 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
#ifndef ANALYZER_NORETURN
#ifdef __has_feature
#if __has_feature (attribute_analyzer_noreturn)
- ///
- /// Signal analyzers that the function cannot return.
- /// This excludes compilers.
- ///
- #define ANALYZER_NORETURN __attribute__((analyzer_noreturn))
+///
+/// Signal analyzers that the function cannot return.
+/// This excludes compilers.
+///
+#define ANALYZER_NORETURN __attribute__((analyzer_noreturn))
#endif
#endif
#ifndef ANALYZER_NORETURN
- ///
- /// Signal the analyzer that the function cannot return.
- /// This excludes compilers.
- ///
- #define ANALYZER_NORETURN
+///
+/// Signal the analyzer that the function cannot return.
+/// This excludes compilers.
+///
+#define ANALYZER_NORETURN
#endif
#endif
@@ -165,17 +164,17 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
///
#ifndef RETURNS_TWICE
#if defined (__GNUC__) || defined (__clang__)
- ///
- /// Tell the code optimizer that the function will return twice.
- /// This prevents wrong optimizations which can cause bugs.
- ///
- #define RETURNS_TWICE __attribute__((returns_twice))
+///
+/// Tell the code optimizer that the function will return twice.
+/// This prevents wrong optimizations which can cause bugs.
+///
+#define RETURNS_TWICE __attribute__((returns_twice))
#else
- ///
- /// Tell the code optimizer that the function will return twice.
- /// This prevents wrong optimizations which can cause bugs.
- ///
- #define RETURNS_TWICE
+///
+/// Tell the code optimizer that the function will return twice.
+/// This prevents wrong optimizations which can cause bugs.
+///
+#define RETURNS_TWICE
#endif
#endif
@@ -186,58 +185,50 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
///
/// Private worker functions for ASM_PFX()
///
-#define _CONCATENATE(a, b) __CONCATENATE(a, b)
-#define __CONCATENATE(a, b) a ## b
+#define _CONCATENATE(a, b) __CONCATENATE(a, b)
+#define __CONCATENATE(a, b) a ## b
///
/// The __USER_LABEL_PREFIX__ macro predefined by GNUC represents the prefix
/// on symbols in assembly language.
///
-#define ASM_PFX(name) _CONCATENATE (__USER_LABEL_PREFIX__, name)
+#define ASM_PFX(name) _CONCATENATE (__USER_LABEL_PREFIX__, name)
#ifdef __APPLE__
- //
- // Apple extension that is used by the linker to optimize code size
- // with assembly functions. Put at the end of your .S files
- //
- #define ASM_FUNCTION_REMOVE_IF_UNREFERENCED .subsections_via_symbols
+//
+// Apple extension that is used by the linker to optimize code size
+// with assembly functions. Put at the end of your .S files
+//
+#define ASM_FUNCTION_REMOVE_IF_UNREFERENCED .subsections_via_symbols
#else
- #define ASM_FUNCTION_REMOVE_IF_UNREFERENCED
+#define ASM_FUNCTION_REMOVE_IF_UNREFERENCED
#endif
-#ifdef __CC_ARM
- //
- // Older RVCT ARM compilers don't fully support #pragma pack and require __packed
- // as a prefix for the structure.
- //
- #define PACKED __packed
-#else
- #define PACKED
-#endif
+#define PACKED
///
/// 128 bit buffer containing a unique identifier value.
/// Unless otherwise specified, aligned on a 64 bit boundary.
///
typedef struct {
- UINT32 Data1;
- UINT16 Data2;
- UINT16 Data3;
- UINT8 Data4[8];
+ UINT32 Data1;
+ UINT16 Data2;
+ UINT16 Data3;
+ UINT8 Data4[8];
} GUID;
///
/// 4-byte buffer. An IPv4 internet protocol address.
///
typedef struct {
- UINT8 Addr[4];
+ UINT8 Addr[4];
} IPv4_ADDRESS;
///
/// 16-byte buffer. An IPv6 internet protocol address.
///
typedef struct {
- UINT8 Addr[16];
+ UINT8 Addr[16];
} IPv6_ADDRESS;
//
@@ -254,8 +245,8 @@ typedef struct _LIST_ENTRY LIST_ENTRY;
/// _LIST_ENTRY structure definition.
///
struct _LIST_ENTRY {
- LIST_ENTRY *ForwardLink;
- LIST_ENTRY *BackLink;
+ LIST_ENTRY *ForwardLink;
+ LIST_ENTRY *BackLink;
};
//
@@ -265,17 +256,17 @@ struct _LIST_ENTRY {
///
/// Datum is read-only.
///
-#define CONST const
+#define CONST const
///
/// Datum is scoped to the current file or function.
///
-#define STATIC static
+#define STATIC static
///
/// Undeclared type.
///
-#define VOID void
+#define VOID void
//
// Modifiers for Data Types used to self document code.
@@ -313,17 +304,25 @@ struct _LIST_ENTRY {
/// Boolean false value. UEFI Specification defines this value to be 0,
/// but this form is more portable.
///
-#define FALSE ((BOOLEAN)(0==1))
+#define FALSE ((BOOLEAN)(0==1))
///
/// NULL pointer (VOID *)
///
+#if defined (__cplusplus)
+ #if defined (_MSC_EXTENSIONS)
+#define NULL nullptr
+ #else
+#define NULL __null
+ #endif
+#else
#define NULL ((VOID *) 0)
+#endif
//
// Null character
//
-#define CHAR_NULL 0x0000
+#define CHAR_NULL 0x0000
///
/// Maximum values for common UEFI Data Types
@@ -345,70 +344,70 @@ struct _LIST_ENTRY {
#define MIN_INT32 (((INT32) -2147483647) - 1)
#define MIN_INT64 (((INT64) -9223372036854775807LL) - 1)
-#define BIT0 0x00000001
-#define BIT1 0x00000002
-#define BIT2 0x00000004
-#define BIT3 0x00000008
-#define BIT4 0x00000010
-#define BIT5 0x00000020
-#define BIT6 0x00000040
-#define BIT7 0x00000080
-#define BIT8 0x00000100
-#define BIT9 0x00000200
-#define BIT10 0x00000400
-#define BIT11 0x00000800
-#define BIT12 0x00001000
-#define BIT13 0x00002000
-#define BIT14 0x00004000
-#define BIT15 0x00008000
-#define BIT16 0x00010000
-#define BIT17 0x00020000
-#define BIT18 0x00040000
-#define BIT19 0x00080000
-#define BIT20 0x00100000
-#define BIT21 0x00200000
-#define BIT22 0x00400000
-#define BIT23 0x00800000
-#define BIT24 0x01000000
-#define BIT25 0x02000000
-#define BIT26 0x04000000
-#define BIT27 0x08000000
-#define BIT28 0x10000000
-#define BIT29 0x20000000
-#define BIT30 0x40000000
-#define BIT31 0x80000000
-#define BIT32 0x0000000100000000ULL
-#define BIT33 0x0000000200000000ULL
-#define BIT34 0x0000000400000000ULL
-#define BIT35 0x0000000800000000ULL
-#define BIT36 0x0000001000000000ULL
-#define BIT37 0x0000002000000000ULL
-#define BIT38 0x0000004000000000ULL
-#define BIT39 0x0000008000000000ULL
-#define BIT40 0x0000010000000000ULL
-#define BIT41 0x0000020000000000ULL
-#define BIT42 0x0000040000000000ULL
-#define BIT43 0x0000080000000000ULL
-#define BIT44 0x0000100000000000ULL
-#define BIT45 0x0000200000000000ULL
-#define BIT46 0x0000400000000000ULL
-#define BIT47 0x0000800000000000ULL
-#define BIT48 0x0001000000000000ULL
-#define BIT49 0x0002000000000000ULL
-#define BIT50 0x0004000000000000ULL
-#define BIT51 0x0008000000000000ULL
-#define BIT52 0x0010000000000000ULL
-#define BIT53 0x0020000000000000ULL
-#define BIT54 0x0040000000000000ULL
-#define BIT55 0x0080000000000000ULL
-#define BIT56 0x0100000000000000ULL
-#define BIT57 0x0200000000000000ULL
-#define BIT58 0x0400000000000000ULL
-#define BIT59 0x0800000000000000ULL
-#define BIT60 0x1000000000000000ULL
-#define BIT61 0x2000000000000000ULL
-#define BIT62 0x4000000000000000ULL
-#define BIT63 0x8000000000000000ULL
+#define BIT0 0x00000001
+#define BIT1 0x00000002
+#define BIT2 0x00000004
+#define BIT3 0x00000008
+#define BIT4 0x00000010
+#define BIT5 0x00000020
+#define BIT6 0x00000040
+#define BIT7 0x00000080
+#define BIT8 0x00000100
+#define BIT9 0x00000200
+#define BIT10 0x00000400
+#define BIT11 0x00000800
+#define BIT12 0x00001000
+#define BIT13 0x00002000
+#define BIT14 0x00004000
+#define BIT15 0x00008000
+#define BIT16 0x00010000
+#define BIT17 0x00020000
+#define BIT18 0x00040000
+#define BIT19 0x00080000
+#define BIT20 0x00100000
+#define BIT21 0x00200000
+#define BIT22 0x00400000
+#define BIT23 0x00800000
+#define BIT24 0x01000000
+#define BIT25 0x02000000
+#define BIT26 0x04000000
+#define BIT27 0x08000000
+#define BIT28 0x10000000
+#define BIT29 0x20000000
+#define BIT30 0x40000000
+#define BIT31 0x80000000
+#define BIT32 0x0000000100000000ULL
+#define BIT33 0x0000000200000000ULL
+#define BIT34 0x0000000400000000ULL
+#define BIT35 0x0000000800000000ULL
+#define BIT36 0x0000001000000000ULL
+#define BIT37 0x0000002000000000ULL
+#define BIT38 0x0000004000000000ULL
+#define BIT39 0x0000008000000000ULL
+#define BIT40 0x0000010000000000ULL
+#define BIT41 0x0000020000000000ULL
+#define BIT42 0x0000040000000000ULL
+#define BIT43 0x0000080000000000ULL
+#define BIT44 0x0000100000000000ULL
+#define BIT45 0x0000200000000000ULL
+#define BIT46 0x0000400000000000ULL
+#define BIT47 0x0000800000000000ULL
+#define BIT48 0x0001000000000000ULL
+#define BIT49 0x0002000000000000ULL
+#define BIT50 0x0004000000000000ULL
+#define BIT51 0x0008000000000000ULL
+#define BIT52 0x0010000000000000ULL
+#define BIT53 0x0020000000000000ULL
+#define BIT54 0x0040000000000000ULL
+#define BIT55 0x0080000000000000ULL
+#define BIT56 0x0100000000000000ULL
+#define BIT57 0x0200000000000000ULL
+#define BIT58 0x0400000000000000ULL
+#define BIT59 0x0800000000000000ULL
+#define BIT60 0x1000000000000000ULL
+#define BIT61 0x2000000000000000ULL
+#define BIT62 0x4000000000000000ULL
+#define BIT63 0x8000000000000000ULL
#define SIZE_1KB 0x00000400
#define SIZE_2KB 0x00000800
@@ -577,53 +576,23 @@ struct _LIST_ENTRY {
@return The aligned size.
**/
-#define _INT_SIZE_OF(n) ((sizeof (n) + sizeof (UINTN) - 1) &~(sizeof (UINTN) - 1))
-
-#if defined(__CC_ARM)
-//
-// RVCT ARM variable argument list support.
-//
+#define _INT_SIZE_OF(n) ((sizeof (n) + sizeof (UINTN) - 1) &~(sizeof (UINTN) - 1))
-///
-/// Variable used to traverse the list of arguments. This type can vary by
-/// implementation and could be an array or structure.
-///
-#ifdef __APCS_ADSABI
- typedef int *va_list[1];
- #define VA_LIST va_list
-#else
- typedef struct __va_list { void *__ap; } va_list;
- #define VA_LIST va_list
-#endif
-
-#define VA_START(Marker, Parameter) __va_start(Marker, Parameter)
-
-#define VA_ARG(Marker, TYPE) __va_arg(Marker, TYPE)
-
-#define VA_END(Marker) ((void)0)
-
-// For some ARM RVCT compilers, __va_copy is not defined
-#ifndef __va_copy
- #define __va_copy(dest, src) ((void)((dest) = (src)))
-#endif
-
-#define VA_COPY(Dest, Start) __va_copy (Dest, Start)
-
-#elif defined(_M_ARM) || defined(_M_ARM64)
+#if defined (_M_ARM) || defined (_M_ARM64)
//
// MSFT ARM variable argument list support.
//
-typedef char* VA_LIST;
+typedef char *VA_LIST;
-#define VA_START(Marker, Parameter) __va_start (&Marker, &Parameter, _INT_SIZE_OF (Parameter), __alignof(Parameter), &Parameter)
-#define VA_ARG(Marker, TYPE) (*(TYPE *) ((Marker += _INT_SIZE_OF (TYPE) + ((-(INTN)Marker) & (sizeof(TYPE) - 1))) - _INT_SIZE_OF (TYPE)))
-#define VA_END(Marker) (Marker = (VA_LIST) 0)
-#define VA_COPY(Dest, Start) ((void)((Dest) = (Start)))
+#define VA_START(Marker, Parameter) __va_start (&Marker, &Parameter, _INT_SIZE_OF (Parameter), __alignof(Parameter), &Parameter)
+#define VA_ARG(Marker, TYPE) (*(TYPE *) ((Marker += _INT_SIZE_OF (TYPE) + ((-(INTN)Marker) & (sizeof(TYPE) - 1))) - _INT_SIZE_OF (TYPE)))
+#define VA_END(Marker) (Marker = (VA_LIST) 0)
+#define VA_COPY(Dest, Start) ((void)((Dest) = (Start)))
-#elif defined(__GNUC__) || defined(__clang__)
+#elif defined (__GNUC__) || defined (__clang__)
-#if defined(MDE_CPU_X64) && !defined(NO_MSABI_VA_FUNCS)
+ #if defined (MDE_CPU_X64) && !defined (NO_MSABI_VA_FUNCS)
//
// X64 only. Use MS ABI version of GCC built-in macros for variable argument lists.
//
@@ -639,13 +608,13 @@ typedef __builtin_ms_va_list VA_LIST;
#define VA_START(Marker, Parameter) __builtin_ms_va_start (Marker, Parameter)
-#define VA_ARG(Marker, TYPE) ((sizeof (TYPE) < sizeof (UINTN)) ? (TYPE)(__builtin_va_arg (Marker, UINTN)) : (TYPE)(__builtin_va_arg (Marker, TYPE)))
+#define VA_ARG(Marker, TYPE) ((sizeof (TYPE) < sizeof (UINTN)) ? (TYPE)(__builtin_va_arg (Marker, UINTN)) : (TYPE)(__builtin_va_arg (Marker, TYPE)))
-#define VA_END(Marker) __builtin_ms_va_end (Marker)
+#define VA_END(Marker) __builtin_ms_va_end (Marker)
-#define VA_COPY(Dest, Start) __builtin_ms_va_copy (Dest, Start)
+#define VA_COPY(Dest, Start) __builtin_ms_va_copy (Dest, Start)
-#else
+ #else
//
// Use GCC built-in macros for variable argument lists.
//
@@ -658,13 +627,13 @@ typedef __builtin_va_list VA_LIST;
#define VA_START(Marker, Parameter) __builtin_va_start (Marker, Parameter)
-#define VA_ARG(Marker, TYPE) ((sizeof (TYPE) < sizeof (UINTN)) ? (TYPE)(__builtin_va_arg (Marker, UINTN)) : (TYPE)(__builtin_va_arg (Marker, TYPE)))
+#define VA_ARG(Marker, TYPE) ((sizeof (TYPE) < sizeof (UINTN)) ? (TYPE)(__builtin_va_arg (Marker, UINTN)) : (TYPE)(__builtin_va_arg (Marker, TYPE)))
-#define VA_END(Marker) __builtin_va_end (Marker)
+#define VA_END(Marker) __builtin_va_end (Marker)
-#define VA_COPY(Dest, Start) __builtin_va_copy (Dest, Start)
+#define VA_COPY(Dest, Start) __builtin_va_copy (Dest, Start)
-#endif
+ #endif
#else
///
@@ -689,7 +658,7 @@ typedef CHAR8 *VA_LIST;
@return A pointer to the beginning of a variable argument list.
**/
-#define VA_START(Marker, Parameter) (Marker = (VA_LIST) ((UINTN) & (Parameter) + _INT_SIZE_OF (Parameter)))
+#define VA_START(Marker, Parameter) (Marker = (VA_LIST) ((UINTN) & (Parameter) + _INT_SIZE_OF (Parameter)))
/**
Returns an argument of a specified type from a variable argument list and updates
@@ -707,7 +676,7 @@ typedef CHAR8 *VA_LIST;
@return An argument of the type specified by TYPE.
**/
-#define VA_ARG(Marker, TYPE) (*(TYPE *) ((Marker += _INT_SIZE_OF (TYPE)) - _INT_SIZE_OF (TYPE)))
+#define VA_ARG(Marker, TYPE) (*(TYPE *) ((Marker += _INT_SIZE_OF (TYPE)) - _INT_SIZE_OF (TYPE)))
/**
Terminates the use of a variable argument list.
@@ -719,7 +688,7 @@ typedef CHAR8 *VA_LIST;
@param Marker VA_LIST used to traverse the list of arguments.
**/
-#define VA_END(Marker) (Marker = (VA_LIST) 0)
+#define VA_END(Marker) (Marker = (VA_LIST) 0)
/**
Initializes a VA_LIST as a copy of an existing VA_LIST.
@@ -739,7 +708,7 @@ typedef CHAR8 *VA_LIST;
///
/// Pointer to the start of a variable argument list stored in a memory buffer. Same as UINT8 *.
///
-typedef UINTN *BASE_LIST;
+typedef UINTN *BASE_LIST;
/**
Returns the size of a data type in sizeof(UINTN) units rounded up to the nearest UINTN boundary.
@@ -748,7 +717,7 @@ typedef UINTN *BASE_LIST;
@return The size of TYPE in sizeof (UINTN) units rounded up to the nearest UINTN boundary.
**/
-#define _BASE_INT_SIZE_OF(TYPE) ((sizeof (TYPE) + sizeof (UINTN) - 1) / sizeof (UINTN))
+#define _BASE_INT_SIZE_OF(TYPE) ((sizeof (TYPE) + sizeof (UINTN) - 1) / sizeof (UINTN))
/**
Returns an argument of a specified type from a variable argument list and updates
@@ -766,7 +735,7 @@ typedef UINTN *BASE_LIST;
@return An argument of the type specified by TYPE.
**/
-#define BASE_ARG(Marker, TYPE) (*(TYPE *) ((Marker += _BASE_INT_SIZE_OF (TYPE)) - _BASE_INT_SIZE_OF (TYPE)))
+#define BASE_ARG(Marker, TYPE) (*(TYPE *) ((Marker += _BASE_INT_SIZE_OF (TYPE)) - _BASE_INT_SIZE_OF (TYPE)))
/**
The macro that returns the byte offset of a field in a data structure.
@@ -781,12 +750,46 @@ typedef UINTN *BASE_LIST;
@return Offset, in bytes, of field.
**/
-#if (defined(__GNUC__) && __GNUC__ >= 4) || defined(__clang__)
-#define OFFSET_OF(TYPE, Field) ((UINTN) __builtin_offsetof(TYPE, Field))
+#if (defined (__GNUC__) && __GNUC__ >= 4) || defined (__clang__)
+#define OFFSET_OF(TYPE, Field) ((UINTN) __builtin_offsetof(TYPE, Field))
#endif
#ifndef OFFSET_OF
-#define OFFSET_OF(TYPE, Field) ((UINTN) &(((TYPE *)0)->Field))
+#define OFFSET_OF(TYPE, Field) ((UINTN) &(((TYPE *)0)->Field))
+#endif
+
+/**
+ Returns the alignment requirement of a type.
+
+ @param TYPE The name of the type to retrieve the alignment requirement of.
+
+ @return Alignment requirement, in Bytes, of TYPE.
+**/
+#if defined (__cplusplus)
+//
+// Standard C++ operator.
+//
+#define ALIGNOF(TYPE) alignof (TYPE)
+#elif defined (__GNUC__) || defined (__clang__) || (defined (_MSC_VER) && _MSC_VER >= 1900)
+//
+// All supported versions of GCC and Clang, as well as MSVC 2015 and later,
+// support the standard operator _Alignof.
+//
+#define ALIGNOF(TYPE) _Alignof (TYPE)
+#elif defined (_MSC_EXTENSIONS)
+//
+// Earlier versions of MSVC, at least MSVC 2008 and later, support the vendor
+// extension __alignof.
+//
+#define ALIGNOF(TYPE) __alignof (TYPE)
+#else
+//
+// For compilers that do not support inbuilt alignof operators, use OFFSET_OF.
+// CHAR8 is known to have both a size and an alignment requirement of 1 Byte.
+// As such, A must be located exactly at the offset equal to its alignment
+// requirement.
+//
+#define ALIGNOF(TYPE) OFFSET_OF (struct { CHAR8 C; TYPE A; }, A)
#endif
/**
@@ -797,12 +800,12 @@ typedef UINTN *BASE_LIST;
@param Message Raised compiler diagnostic message when expression is false.
**/
-#ifdef MDE_CPU_EBC
- #define STATIC_ASSERT(Expression, Message)
-#elif defined(_MSC_EXTENSIONS)
- #define STATIC_ASSERT static_assert
-#else
- #define STATIC_ASSERT _Static_assert
+#if defined (__cplusplus)
+#define STATIC_ASSERT static_assert
+#elif defined (__GNUC__) || defined (__clang__)
+#define STATIC_ASSERT _Static_assert
+#elif defined (_MSC_EXTENSIONS)
+#define STATIC_ASSERT static_assert
#endif
//
@@ -821,13 +824,37 @@ STATIC_ASSERT (sizeof (INT64) == 8, "sizeof (INT64) does not meet UEFI Specifi
STATIC_ASSERT (sizeof (UINT64) == 8, "sizeof (UINT64) does not meet UEFI Specification Data Type requirements");
STATIC_ASSERT (sizeof (CHAR8) == 1, "sizeof (CHAR8) does not meet UEFI Specification Data Type requirements");
STATIC_ASSERT (sizeof (CHAR16) == 2, "sizeof (CHAR16) does not meet UEFI Specification Data Type requirements");
+/*
+ * FreeBSD uses these headers in userland wher the following two assertions
+ * fail, but it also takes lengths to never use either of these constructs. The
+ * boot loader, however, uses them and needs these assertionst o be correct.
+ */
+#ifdef _STANDALONE
+STATIC_ASSERT (sizeof (L'A') == 2, "sizeof (L'A') does not meet UEFI Specification Data Type requirements");
+STATIC_ASSERT (sizeof (L"A") == 4, "sizeof (L\"A\") does not meet UEFI Specification Data Type requirements");
+#endif
+
+STATIC_ASSERT (ALIGNOF (BOOLEAN) == sizeof (BOOLEAN), "Alignment of BOOLEAN does not meet UEFI Specification Data Type requirements");
+STATIC_ASSERT (ALIGNOF (INT8) == sizeof (INT8), "Alignment of INT8 does not meet UEFI Specification Data Type requirements");
+STATIC_ASSERT (ALIGNOF (UINT8) == sizeof (UINT8), "Alignment of INT16 does not meet UEFI Specification Data Type requirements");
+STATIC_ASSERT (ALIGNOF (INT16) == sizeof (INT16), "Alignment of INT16 does not meet UEFI Specification Data Type requirements");
+STATIC_ASSERT (ALIGNOF (UINT16) == sizeof (UINT16), "Alignment of UINT16 does not meet UEFI Specification Data Type requirements");
+STATIC_ASSERT (ALIGNOF (INT32) == sizeof (INT32), "Alignment of INT32 does not meet UEFI Specification Data Type requirements");
+STATIC_ASSERT (ALIGNOF (UINT32) == sizeof (UINT32), "Alignment of UINT32 does not meet UEFI Specification Data Type requirements");
+STATIC_ASSERT (ALIGNOF (INT64) == sizeof (INT64), "Alignment of INT64 does not meet UEFI Specification Data Type requirements");
+STATIC_ASSERT (ALIGNOF (UINT64) == sizeof (UINT64), "Alignment of UINT64 does not meet UEFI Specification Data Type requirements");
+STATIC_ASSERT (ALIGNOF (CHAR8) == sizeof (CHAR8), "Alignment of CHAR8 does not meet UEFI Specification Data Type requirements");
+STATIC_ASSERT (ALIGNOF (CHAR16) == sizeof (CHAR16), "Alignment of CHAR16 does not meet UEFI Specification Data Type requirements");
+STATIC_ASSERT (ALIGNOF (INTN) == sizeof (INTN), "Alignment of INTN does not meet UEFI Specification Data Type requirements");
+STATIC_ASSERT (ALIGNOF (UINTN) == sizeof (UINTN), "Alignment of UINTN does not meet UEFI Specification Data Type requirements");
+STATIC_ASSERT (ALIGNOF (VOID *) == sizeof (VOID *), "Alignment of VOID * does not meet UEFI Specification Data Type requirements");
//
// 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.
+// UEFI 2.3.1 Errata C 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
@@ -838,12 +865,16 @@ typedef enum {
} __VERIFY_UINT16_ENUM_SIZE;
typedef enum {
- __VerifyUint32EnumValue = 0xffffffff
-} __VERIFY_UINT32_ENUM_SIZE;
+ __VerifyInt32EnumValue = 0x7fffffff
+} __VERIFY_INT32_ENUM_SIZE;
STATIC_ASSERT (sizeof (__VERIFY_UINT8_ENUM_SIZE) == 4, "Size of enum does not meet UEFI Specification Data Type requirements");
STATIC_ASSERT (sizeof (__VERIFY_UINT16_ENUM_SIZE) == 4, "Size of enum does not meet UEFI Specification Data Type requirements");
-STATIC_ASSERT (sizeof (__VERIFY_UINT32_ENUM_SIZE) == 4, "Size of enum does not meet UEFI Specification Data Type requirements");
+STATIC_ASSERT (sizeof (__VERIFY_INT32_ENUM_SIZE) == 4, "Size of enum does not meet UEFI Specification Data Type requirements");
+
+STATIC_ASSERT (ALIGNOF (__VERIFY_UINT8_ENUM_SIZE) == sizeof (__VERIFY_UINT8_ENUM_SIZE), "Alignment of enum does not meet UEFI Specification Data Type requirements");
+STATIC_ASSERT (ALIGNOF (__VERIFY_UINT16_ENUM_SIZE) == sizeof (__VERIFY_UINT16_ENUM_SIZE), "Alignment of enum does not meet UEFI Specification Data Type requirements");
+STATIC_ASSERT (ALIGNOF (__VERIFY_INT32_ENUM_SIZE) == sizeof (__VERIFY_INT32_ENUM_SIZE), "Alignment of enum does not meet UEFI Specification Data Type requirements");
/**
Macro that returns a pointer to the data structure that contains a specified field of
@@ -864,7 +895,50 @@ STATIC_ASSERT (sizeof (__VERIFY_UINT32_ENUM_SIZE) == 4, "Size of enum does not m
@return A pointer to the structure from one of it's elements.
**/
-#define BASE_CR(Record, TYPE, Field) ((TYPE *) ((CHAR8 *) (Record) - OFFSET_OF (TYPE, Field)))
+#define BASE_CR(Record, TYPE, Field) ((TYPE *) (VOID *) ((CHAR8 *) (Record) - OFFSET_OF (TYPE, Field)))
+
+/**
+ Checks whether a value is a power of two.
+
+ @param Value The value to check.
+
+ @retval TRUE Value is a power of two.
+ @retval FALSE Value is not a power of two.
+**/
+#define IS_POW2(Value) ((Value) != 0U && ((Value) & ((Value) - 1U)) == 0U)
+
+/**
+ Checks whether a value is aligned by a specified alignment.
+
+ @param Value The value to check.
+ @param Alignment The alignment boundary used to check against.
+
+ @retval TRUE Value is aligned by Alignment.
+ @retval FALSE Value is not aligned by Alignment.
+**/
+#define IS_ALIGNED(Value, Alignment) (((Value) & ((Alignment) - 1U)) == 0U)
+
+/**
+ Checks whether a pointer or address is aligned by a specified alignment.
+
+ @param Address The pointer or address to check.
+ @param Alignment The alignment boundary used to check against.
+
+ @retval TRUE Address is aligned by Alignment.
+ @retval FALSE Address is not aligned by Alignment.
+**/
+#define ADDRESS_IS_ALIGNED(Address, Alignment) IS_ALIGNED ((UINTN) (Address), Alignment)
+
+/**
+ Determines the addend to add to a value to round it up to the next boundary of
+ a specified alignment.
+
+ @param Value The value to round up.
+ @param Alignment The alignment boundary used to return the addend.
+
+ @return Addend to round Value up to alignment boundary Alignment.
+**/
+#define ALIGN_VALUE_ADDEND(Value, Alignment) (((Alignment) - (Value)) & ((Alignment) - 1U))
/**
Rounds a value up to the next boundary using a specified alignment.
@@ -878,7 +952,7 @@ STATIC_ASSERT (sizeof (__VERIFY_UINT32_ENUM_SIZE) == 4, "Size of enum does not m
@return A value up to the next boundary.
**/
-#define ALIGN_VALUE(Value, Alignment) ((Value) + (((Alignment) - (Value)) & ((Alignment) - 1)))
+#define ALIGN_VALUE(Value, Alignment) ((Value) + ALIGN_VALUE_ADDEND (Value, Alignment))
/**
Adjust a pointer by adding the minimum offset required for it to be aligned on
@@ -893,7 +967,7 @@ STATIC_ASSERT (sizeof (__VERIFY_UINT32_ENUM_SIZE) == 4, "Size of enum does not m
@return Pointer to the aligned address.
**/
-#define ALIGN_POINTER(Pointer, Alignment) ((VOID *) (ALIGN_VALUE ((UINTN)(Pointer), (Alignment))))
+#define ALIGN_POINTER(Pointer, Alignment) ((VOID *) (ALIGN_VALUE ((UINTN)(Pointer), (Alignment))))
/**
Rounds a value up to the next natural boundary for the current CPU.
@@ -909,7 +983,6 @@ STATIC_ASSERT (sizeof (__VERIFY_UINT32_ENUM_SIZE) == 4, "Size of enum does not m
**/
#define ALIGN_VARIABLE(Value) ALIGN_VALUE ((Value), sizeof (UINTN))
-
/**
Return the maximum of two operands.
@@ -968,7 +1041,7 @@ typedef UINTN RETURN_STATUS;
@return The value specified by StatusCode with the highest bit set.
**/
-#define ENCODE_ERROR(StatusCode) ((RETURN_STATUS)(MAX_BIT | (StatusCode)))
+#define ENCODE_ERROR(StatusCode) ((RETURN_STATUS)(MAX_BIT | (StatusCode)))
/**
Produces a RETURN_STATUS code with the highest bit clear.
@@ -979,7 +1052,7 @@ typedef UINTN RETURN_STATUS;
@return The value specified by StatusCode with the highest bit clear.
**/
-#define ENCODE_WARNING(StatusCode) ((RETURN_STATUS)(StatusCode))
+#define ENCODE_WARNING(StatusCode) ((RETURN_STATUS)(StatusCode))
/**
Returns TRUE if a specified RETURN_STATUS code is an error code.
@@ -992,138 +1065,138 @@ typedef UINTN RETURN_STATUS;
@retval FALSE The high bit of StatusCode is clear.
**/
-#define RETURN_ERROR(StatusCode) (((INTN)(RETURN_STATUS)(StatusCode)) < 0)
+#define RETURN_ERROR(StatusCode) (((RETURN_STATUS)(StatusCode)) >= MAX_BIT)
///
/// The operation completed successfully.
///
-#define RETURN_SUCCESS 0
+#define RETURN_SUCCESS (RETURN_STATUS)(0)
///
/// The image failed to load.
///
-#define RETURN_LOAD_ERROR ENCODE_ERROR (1)
+#define RETURN_LOAD_ERROR ENCODE_ERROR (1)
///
/// The parameter was incorrect.
///
-#define RETURN_INVALID_PARAMETER ENCODE_ERROR (2)
+#define RETURN_INVALID_PARAMETER ENCODE_ERROR (2)
///
/// The operation is not supported.
///
-#define RETURN_UNSUPPORTED ENCODE_ERROR (3)
+#define RETURN_UNSUPPORTED ENCODE_ERROR (3)
///
/// The buffer was not the proper size for the request.
///
-#define RETURN_BAD_BUFFER_SIZE ENCODE_ERROR (4)
+#define RETURN_BAD_BUFFER_SIZE ENCODE_ERROR (4)
///
/// The buffer was not large enough to hold the requested data.
/// The required buffer size is returned in the appropriate
/// parameter when this error occurs.
///
-#define RETURN_BUFFER_TOO_SMALL ENCODE_ERROR (5)
+#define RETURN_BUFFER_TOO_SMALL ENCODE_ERROR (5)
///
/// There is no data pending upon return.
///
-#define RETURN_NOT_READY ENCODE_ERROR (6)
+#define RETURN_NOT_READY ENCODE_ERROR (6)
///
/// The physical device reported an error while attempting the
/// operation.
///
-#define RETURN_DEVICE_ERROR ENCODE_ERROR (7)
+#define RETURN_DEVICE_ERROR ENCODE_ERROR (7)
///
/// The device can not be written to.
///
-#define RETURN_WRITE_PROTECTED ENCODE_ERROR (8)
+#define RETURN_WRITE_PROTECTED ENCODE_ERROR (8)
///
/// The resource has run out.
///
-#define RETURN_OUT_OF_RESOURCES ENCODE_ERROR (9)
+#define RETURN_OUT_OF_RESOURCES ENCODE_ERROR (9)
///
/// An inconsistency was detected on the file system causing the
/// operation to fail.
///
-#define RETURN_VOLUME_CORRUPTED ENCODE_ERROR (10)
+#define RETURN_VOLUME_CORRUPTED ENCODE_ERROR (10)
///
/// There is no more space on the file system.
///
-#define RETURN_VOLUME_FULL ENCODE_ERROR (11)
+#define RETURN_VOLUME_FULL ENCODE_ERROR (11)
///
/// The device does not contain any medium to perform the
/// operation.
///
-#define RETURN_NO_MEDIA ENCODE_ERROR (12)
+#define RETURN_NO_MEDIA ENCODE_ERROR (12)
///
/// The medium in the device has changed since the last
/// access.
///
-#define RETURN_MEDIA_CHANGED ENCODE_ERROR (13)
+#define RETURN_MEDIA_CHANGED ENCODE_ERROR (13)
///
/// The item was not found.
///
-#define RETURN_NOT_FOUND ENCODE_ERROR (14)
+#define RETURN_NOT_FOUND ENCODE_ERROR (14)
///
/// Access was denied.
///
-#define RETURN_ACCESS_DENIED ENCODE_ERROR (15)
+#define RETURN_ACCESS_DENIED ENCODE_ERROR (15)
///
/// The server was not found or did not respond to the request.
///
-#define RETURN_NO_RESPONSE ENCODE_ERROR (16)
+#define RETURN_NO_RESPONSE ENCODE_ERROR (16)
///
/// A mapping to the device does not exist.
///
-#define RETURN_NO_MAPPING ENCODE_ERROR (17)
+#define RETURN_NO_MAPPING ENCODE_ERROR (17)
///
/// A timeout time expired.
///
-#define RETURN_TIMEOUT ENCODE_ERROR (18)
+#define RETURN_TIMEOUT ENCODE_ERROR (18)
///
/// The protocol has not been started.
///
-#define RETURN_NOT_STARTED ENCODE_ERROR (19)
+#define RETURN_NOT_STARTED ENCODE_ERROR (19)
///
/// The protocol has already been started.
///
-#define RETURN_ALREADY_STARTED ENCODE_ERROR (20)
+#define RETURN_ALREADY_STARTED ENCODE_ERROR (20)
///
/// The operation was aborted.
///
-#define RETURN_ABORTED ENCODE_ERROR (21)
+#define RETURN_ABORTED ENCODE_ERROR (21)
///
/// An ICMP error occurred during the network operation.
///
-#define RETURN_ICMP_ERROR ENCODE_ERROR (22)
+#define RETURN_ICMP_ERROR ENCODE_ERROR (22)
///
/// A TFTP error occurred during the network operation.
///
-#define RETURN_TFTP_ERROR ENCODE_ERROR (23)
+#define RETURN_TFTP_ERROR ENCODE_ERROR (23)
///
/// A protocol error occurred during the network operation.
///
-#define RETURN_PROTOCOL_ERROR ENCODE_ERROR (24)
+#define RETURN_PROTOCOL_ERROR ENCODE_ERROR (24)
///
/// A function encountered an internal version that was
@@ -1134,74 +1207,83 @@ typedef UINTN RETURN_STATUS;
///
/// The function was not performed due to a security violation.
///
-#define RETURN_SECURITY_VIOLATION ENCODE_ERROR (26)
+#define RETURN_SECURITY_VIOLATION ENCODE_ERROR (26)
///
/// A CRC error was detected.
///
-#define RETURN_CRC_ERROR ENCODE_ERROR (27)
+#define RETURN_CRC_ERROR ENCODE_ERROR (27)
///
/// The beginning or end of media was reached.
///
-#define RETURN_END_OF_MEDIA ENCODE_ERROR (28)
+#define RETURN_END_OF_MEDIA ENCODE_ERROR (28)
///
/// The end of the file was reached.
///
-#define RETURN_END_OF_FILE ENCODE_ERROR (31)
+#define RETURN_END_OF_FILE ENCODE_ERROR (31)
///
/// The language specified was invalid.
///
-#define RETURN_INVALID_LANGUAGE ENCODE_ERROR (32)
+#define RETURN_INVALID_LANGUAGE ENCODE_ERROR (32)
///
/// The security status of the data is unknown or compromised
/// and the data must be updated or replaced to restore a valid
/// security status.
///
-#define RETURN_COMPROMISED_DATA ENCODE_ERROR (33)
+#define RETURN_COMPROMISED_DATA ENCODE_ERROR (33)
+
+///
+/// There is an address conflict address allocation.
+///
+#define RETURN_IP_ADDRESS_CONFLICT ENCODE_ERROR (34)
///
/// A HTTP error occurred during the network operation.
///
-#define RETURN_HTTP_ERROR ENCODE_ERROR (35)
+#define RETURN_HTTP_ERROR ENCODE_ERROR (35)
///
/// The string contained one or more characters that
/// the device could not render and were skipped.
///
-#define RETURN_WARN_UNKNOWN_GLYPH ENCODE_WARNING (1)
+#define RETURN_WARN_UNKNOWN_GLYPH ENCODE_WARNING (1)
///
/// The handle was closed, but the file was not deleted.
///
-#define RETURN_WARN_DELETE_FAILURE ENCODE_WARNING (2)
+#define RETURN_WARN_DELETE_FAILURE ENCODE_WARNING (2)
///
/// The handle was closed, but the data to the file was not
/// flushed properly.
///
-#define RETURN_WARN_WRITE_FAILURE ENCODE_WARNING (3)
+#define RETURN_WARN_WRITE_FAILURE ENCODE_WARNING (3)
///
/// The resulting buffer was too small, and the data was
/// truncated to the buffer size.
///
-#define RETURN_WARN_BUFFER_TOO_SMALL ENCODE_WARNING (4)
+#define RETURN_WARN_BUFFER_TOO_SMALL ENCODE_WARNING (4)
///
/// The data has not been updated within the timeframe set by
/// local policy for this type of data.
///
-#define RETURN_WARN_STALE_DATA ENCODE_WARNING (5)
+#define RETURN_WARN_STALE_DATA ENCODE_WARNING (5)
///
/// The resulting buffer contains UEFI-compliant file system.
///
-#define RETURN_WARN_FILE_SYSTEM ENCODE_WARNING (6)
+#define RETURN_WARN_FILE_SYSTEM ENCODE_WARNING (6)
+///
+/// The operation will be processed across a system reset.
+///
+#define RETURN_WARN_RESET_REQUIRED ENCODE_WARNING (7)
/**
Returns a 16-bit signature built from 2 ASCII characters.
@@ -1215,7 +1297,7 @@ typedef UINTN RETURN_STATUS;
@return A 16-bit value built from the two ASCII characters specified by A and B.
**/
-#define SIGNATURE_16(A, B) ((A) | (B << 8))
+#define SIGNATURE_16(A, B) ((A) | (B << 8))
/**
Returns a 32-bit signature built from 4 ASCII characters.
@@ -1256,46 +1338,52 @@ typedef UINTN RETURN_STATUS;
#define SIGNATURE_64(A, B, C, D, E, F, G, H) \
(SIGNATURE_32 (A, B, C, D) | ((UINT64) (SIGNATURE_32 (E, F, G, H)) << 32))
-#if defined(_MSC_EXTENSIONS) && !defined (__INTEL_COMPILER) && !defined (MDE_CPU_EBC)
- void * _ReturnAddress(void);
+#if defined (_MSC_EXTENSIONS) && !defined (__INTEL_COMPILER) && !defined (MDE_CPU_EBC)
+void *
+_ReturnAddress (
+ void
+ );
+
#pragma intrinsic(_ReturnAddress)
- /**
- Get the return address of the calling function.
- Based on intrinsic function _ReturnAddress that provides the address of
- the instruction in the calling function that will be executed after
- control returns to the caller.
+/**
+ Get the return address of the calling function.
+
+ Based on intrinsic function _ReturnAddress that provides the address of
+ the instruction in the calling function that will be executed after
+ control returns to the caller.
- @param L Return Level.
+ @param L Return Level.
- @return The return address of the calling function or 0 if L != 0.
+ @return The return address of the calling function or 0 if L != 0.
- **/
- #define RETURN_ADDRESS(L) ((L == 0) ? _ReturnAddress() : (VOID *) 0)
+**/
+#define RETURN_ADDRESS(L) ((L == 0) ? _ReturnAddress() : (VOID *) 0)
#elif defined (__GNUC__) || defined (__clang__)
- void * __builtin_return_address (unsigned int level);
- /**
- Get the return address of the calling function.
- Based on built-in Function __builtin_return_address that returns
- the return address of the current function, or of one of its callers.
+/**
+ Get the return address of the calling function.
+
+ Based on built-in Function __builtin_return_address that returns
+ the return address of the current function, or of one of its callers.
- @param L Return Level.
+ @param L Return Level.
- @return The return address of the calling function.
+ @return The return address of the calling function.
- **/
- #define RETURN_ADDRESS(L) __builtin_return_address (L)
+**/
+#define RETURN_ADDRESS(L) __builtin_return_address (L)
#else
- /**
- Get the return address of the calling function.
- @param L Return Level.
+/**
+ Get the return address of the calling function.
- @return 0 as compilers don't support this feature.
+ @param L Return Level.
- **/
- #define RETURN_ADDRESS(L) ((VOID *) 0)
+ @return 0 as compilers don't support this feature.
+
+**/
+#define RETURN_ADDRESS(L) ((VOID *) 0)
#endif
/**
@@ -1309,7 +1397,6 @@ typedef UINTN RETURN_STATUS;
@return The number of elements in Array. The result has type UINTN.
**/
-#define ARRAY_SIZE(Array) (sizeof (Array) / sizeof ((Array)[0]))
+#define ARRAY_SIZE(Array) (sizeof (Array) / sizeof ((Array)[0]))
#endif
-
diff --git a/sys/contrib/edk2/Include/Guid/HiiFormMapMethodGuid.h b/sys/contrib/edk2/Include/Guid/HiiFormMapMethodGuid.h
index 6fff5b606f95..57836a5ae28a 100644
--- a/sys/contrib/edk2/Include/Guid/HiiFormMapMethodGuid.h
+++ b/sys/contrib/edk2/Include/Guid/HiiFormMapMethodGuid.h
@@ -14,6 +14,6 @@
#define EFI_HII_STANDARD_FORM_GUID \
{ 0x3bd2f4ec, 0xe524, 0x46e4, { 0xa9, 0xd8, 0x51, 0x1, 0x17, 0x42, 0x55, 0x62 } }
-extern EFI_GUID gEfiHiiStandardFormGuid;
+extern EFI_GUID gEfiHiiStandardFormGuid;
#endif
diff --git a/sys/contrib/edk2/Include/Guid/PcAnsi.h b/sys/contrib/edk2/Include/Guid/PcAnsi.h
index 312df6bd304f..867dfb4df1f9 100644
--- a/sys/contrib/edk2/Include/Guid/PcAnsi.h
+++ b/sys/contrib/edk2/Include/Guid/PcAnsi.h
@@ -42,11 +42,11 @@
0xd487ddb4, 0x008b, 0x11d9, {0xaf, 0xdc, 0x00, 0x10, 0x83, 0xff, 0xca, 0x4d } \
}
-extern EFI_GUID gEfiPcAnsiGuid;
-extern EFI_GUID gEfiVT100Guid;
-extern EFI_GUID gEfiVT100PlusGuid;
-extern EFI_GUID gEfiVTUTF8Guid;
-extern EFI_GUID gEfiUartDevicePathGuid;
-extern EFI_GUID gEfiSasDevicePathGuid;
+extern EFI_GUID gEfiPcAnsiGuid;
+extern EFI_GUID gEfiVT100Guid;
+extern EFI_GUID gEfiVT100PlusGuid;
+extern EFI_GUID gEfiVTUTF8Guid;
+extern EFI_GUID gEfiUartDevicePathGuid;
+extern EFI_GUID gEfiSasDevicePathGuid;
#endif
diff --git a/sys/contrib/edk2/Include/Guid/WinCertificate.h b/sys/contrib/edk2/Include/Guid/WinCertificate.h
index c44bb388cccc..72d766d22d69 100644
--- a/sys/contrib/edk2/Include/Guid/WinCertificate.h
+++ b/sys/contrib/edk2/Include/Guid/WinCertificate.h
@@ -14,9 +14,9 @@
//
// _WIN_CERTIFICATE.wCertificateType
//
-#define WIN_CERT_TYPE_PKCS_SIGNED_DATA 0x0002
-#define WIN_CERT_TYPE_EFI_PKCS115 0x0EF0
-#define WIN_CERT_TYPE_EFI_GUID 0x0EF1
+#define WIN_CERT_TYPE_PKCS_SIGNED_DATA 0x0002
+#define WIN_CERT_TYPE_EFI_PKCS115 0x0EF0
+#define WIN_CERT_TYPE_EFI_GUID 0x0EF1
///
/// The WIN_CERTIFICATE structure is part of the PE/COFF specification.
@@ -26,18 +26,18 @@ typedef struct {
/// The length of the entire certificate,
/// including the length of the header, in bytes.
///
- UINT32 dwLength;
+ UINT32 dwLength;
///
/// The revision level of the WIN_CERTIFICATE
/// structure. The current revision level is 0x0200.
///
- UINT16 wRevision;
+ UINT16 wRevision;
///
/// The certificate type. See WIN_CERT_TYPE_xxx for the UEFI
/// certificate types. The UEFI specification reserves the range of
/// certificate type values from 0x0EF0 to 0x0EFF.
///
- UINT16 wCertificateType;
+ UINT16 wCertificateType;
///
/// The following is the actual certificate. The format of
/// the certificate depends on wCertificateType.
@@ -56,12 +56,11 @@ typedef struct {
/// WIN_CERTIFICATE_UEFI_GUID.CertData
///
typedef struct {
- EFI_GUID HashType;
- UINT8 PublicKey[256];
- UINT8 Signature[256];
+ EFI_GUID HashType;
+ UINT8 PublicKey[256];
+ UINT8 Signature[256];
} EFI_CERT_BLOCK_RSA_2048_SHA256;
-
///
/// Certificate which encapsulates a GUID-specific digital signature
///
@@ -70,22 +69,21 @@ typedef struct {
/// This is the standard WIN_CERTIFICATE header, where
/// wCertificateType is set to WIN_CERT_TYPE_EFI_GUID.
///
- WIN_CERTIFICATE Hdr;
+ WIN_CERTIFICATE Hdr;
///
/// This is the unique id which determines the
/// format of the CertData. .
///
- EFI_GUID CertType;
+ EFI_GUID CertType;
///
/// The following is the certificate data. The format of
/// the data is determined by the CertType.
/// If CertType is EFI_CERT_TYPE_RSA2048_SHA256_GUID,
/// the CertData will be EFI_CERT_BLOCK_RSA_2048_SHA256 structure.
///
- UINT8 CertData[1];
+ UINT8 CertData[1];
} WIN_CERTIFICATE_UEFI_GUID;
-
///
/// Certificate which encapsulates the RSASSA_PKCS1-v1_5 digital signature.
///
@@ -99,12 +97,12 @@ typedef struct {
/// This is the standard WIN_CERTIFICATE header, where
/// wCertificateType is set to WIN_CERT_TYPE_UEFI_PKCS1_15.
///
- WIN_CERTIFICATE Hdr;
+ WIN_CERTIFICATE Hdr;
///
/// This is the hashing algorithm which was performed on the
/// UEFI executable when creating the digital signature.
///
- EFI_GUID HashAlgorithm;
+ EFI_GUID HashAlgorithm;
///
/// The following is the actual digital signature. The
/// size of the signature is the same size as the key
@@ -117,6 +115,6 @@ typedef struct {
///
} WIN_CERTIFICATE_EFI_PKCS1_15;
-extern EFI_GUID gEfiCertTypeRsa2048Sha256Guid;
+extern EFI_GUID gEfiCertTypeRsa2048Sha256Guid;
#endif
diff --git a/sys/contrib/edk2/Include/IndustryStandard/Acpi10.h b/sys/contrib/edk2/Include/IndustryStandard/Acpi10.h
index d1398018aef9..fb920d8beafd 100644
--- a/sys/contrib/edk2/Include/IndustryStandard/Acpi10.h
+++ b/sys/contrib/edk2/Include/IndustryStandard/Acpi10.h
@@ -2,6 +2,7 @@
ACPI 1.0b definitions from the ACPI Specification, revision 1.0b
Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2020, Arm Limited. All rights reserved.<BR>
SPDX-License-Identifier: BSD-2-Clause-Patent
**/
@@ -15,8 +16,8 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
/// excluding the RSD PTR structure.
///
typedef struct {
- UINT32 Signature;
- UINT32 Length;
+ UINT32 Signature;
+ UINT32 Length;
} EFI_ACPI_COMMON_HEADER;
#pragma pack(1)
@@ -24,84 +25,84 @@ typedef struct {
/// The common ACPI description table header. This structure prefaces most ACPI tables.
///
typedef struct {
- UINT32 Signature;
- UINT32 Length;
- UINT8 Revision;
- UINT8 Checksum;
- UINT8 OemId[6];
- UINT64 OemTableId;
- UINT32 OemRevision;
- UINT32 CreatorId;
- UINT32 CreatorRevision;
+ UINT32 Signature;
+ UINT32 Length;
+ UINT8 Revision;
+ UINT8 Checksum;
+ UINT8 OemId[6];
+ UINT64 OemTableId;
+ UINT32 OemRevision;
+ UINT32 CreatorId;
+ UINT32 CreatorRevision;
} EFI_ACPI_DESCRIPTION_HEADER;
#pragma pack()
//
// Define for Descriptor
//
-#define ACPI_SMALL_ITEM_FLAG 0x00
-#define ACPI_LARGE_ITEM_FLAG 0x01
+#define ACPI_SMALL_ITEM_FLAG 0x00
+#define ACPI_LARGE_ITEM_FLAG 0x01
//
// Small Item Descriptor Name
//
-#define ACPI_SMALL_IRQ_DESCRIPTOR_NAME 0x04
-#define ACPI_SMALL_DMA_DESCRIPTOR_NAME 0x05
-#define ACPI_SMALL_START_DEPENDENT_DESCRIPTOR_NAME 0x06
-#define ACPI_SMALL_END_DEPENDENT_DESCRIPTOR_NAME 0x07
-#define ACPI_SMALL_IO_PORT_DESCRIPTOR_NAME 0x08
-#define ACPI_SMALL_FIXED_IO_PORT_DESCRIPTOR_NAME 0x09
-#define ACPI_SMALL_VENDOR_DEFINED_DESCRIPTOR_NAME 0x0E
-#define ACPI_SMALL_END_TAG_DESCRIPTOR_NAME 0x0F
+#define ACPI_SMALL_IRQ_DESCRIPTOR_NAME 0x04
+#define ACPI_SMALL_DMA_DESCRIPTOR_NAME 0x05
+#define ACPI_SMALL_START_DEPENDENT_DESCRIPTOR_NAME 0x06
+#define ACPI_SMALL_END_DEPENDENT_DESCRIPTOR_NAME 0x07
+#define ACPI_SMALL_IO_PORT_DESCRIPTOR_NAME 0x08
+#define ACPI_SMALL_FIXED_IO_PORT_DESCRIPTOR_NAME 0x09
+#define ACPI_SMALL_VENDOR_DEFINED_DESCRIPTOR_NAME 0x0E
+#define ACPI_SMALL_END_TAG_DESCRIPTOR_NAME 0x0F
//
// Large Item Descriptor Name
//
-#define ACPI_LARGE_24_BIT_MEMORY_RANGE_DESCRIPTOR_NAME 0x01
-#define ACPI_LARGE_VENDOR_DEFINED_DESCRIPTOR_NAME 0x04
-#define ACPI_LARGE_32_BIT_MEMORY_RANGE_DESCRIPTOR_NAME 0x05
-#define ACPI_LARGE_32_BIT_FIXED_MEMORY_RANGE_DESCRIPTOR_NAME 0x06
-#define ACPI_LARGE_DWORD_ADDRESS_SPACE_DESCRIPTOR_NAME 0x07
-#define ACPI_LARGE_WORD_ADDRESS_SPACE_DESCRIPTOR_NAME 0x08
-#define ACPI_LARGE_EXTENDED_IRQ_DESCRIPTOR_NAME 0x09
-#define ACPI_LARGE_QWORD_ADDRESS_SPACE_DESCRIPTOR_NAME 0x0A
+#define ACPI_LARGE_24_BIT_MEMORY_RANGE_DESCRIPTOR_NAME 0x01
+#define ACPI_LARGE_VENDOR_DEFINED_DESCRIPTOR_NAME 0x04
+#define ACPI_LARGE_32_BIT_MEMORY_RANGE_DESCRIPTOR_NAME 0x05
+#define ACPI_LARGE_32_BIT_FIXED_MEMORY_RANGE_DESCRIPTOR_NAME 0x06
+#define ACPI_LARGE_DWORD_ADDRESS_SPACE_DESCRIPTOR_NAME 0x07
+#define ACPI_LARGE_WORD_ADDRESS_SPACE_DESCRIPTOR_NAME 0x08
+#define ACPI_LARGE_EXTENDED_IRQ_DESCRIPTOR_NAME 0x09
+#define ACPI_LARGE_QWORD_ADDRESS_SPACE_DESCRIPTOR_NAME 0x0A
//
// Small Item Descriptor Value
//
-#define ACPI_IRQ_NOFLAG_DESCRIPTOR 0x22
-#define ACPI_IRQ_DESCRIPTOR 0x23
-#define ACPI_DMA_DESCRIPTOR 0x2A
-#define ACPI_START_DEPENDENT_DESCRIPTOR 0x30
-#define ACPI_START_DEPENDENT_EX_DESCRIPTOR 0x31
-#define ACPI_END_DEPENDENT_DESCRIPTOR 0x38
-#define ACPI_IO_PORT_DESCRIPTOR 0x47
-#define ACPI_FIXED_LOCATION_IO_PORT_DESCRIPTOR 0x4B
-#define ACPI_END_TAG_DESCRIPTOR 0x79
+#define ACPI_IRQ_NOFLAG_DESCRIPTOR 0x22
+#define ACPI_IRQ_DESCRIPTOR 0x23
+#define ACPI_DMA_DESCRIPTOR 0x2A
+#define ACPI_START_DEPENDENT_DESCRIPTOR 0x30
+#define ACPI_START_DEPENDENT_EX_DESCRIPTOR 0x31
+#define ACPI_END_DEPENDENT_DESCRIPTOR 0x38
+#define ACPI_IO_PORT_DESCRIPTOR 0x47
+#define ACPI_FIXED_LOCATION_IO_PORT_DESCRIPTOR 0x4B
+#define ACPI_END_TAG_DESCRIPTOR 0x79
//
// Large Item Descriptor Value
//
-#define ACPI_24_BIT_MEMORY_RANGE_DESCRIPTOR 0x81
-#define ACPI_32_BIT_MEMORY_RANGE_DESCRIPTOR 0x85
-#define ACPI_32_BIT_FIXED_MEMORY_RANGE_DESCRIPTOR 0x86
-#define ACPI_DWORD_ADDRESS_SPACE_DESCRIPTOR 0x87
-#define ACPI_WORD_ADDRESS_SPACE_DESCRIPTOR 0x88
-#define ACPI_EXTENDED_INTERRUPT_DESCRIPTOR 0x89
-#define ACPI_QWORD_ADDRESS_SPACE_DESCRIPTOR 0x8A
-#define ACPI_ADDRESS_SPACE_DESCRIPTOR 0x8A
+#define ACPI_24_BIT_MEMORY_RANGE_DESCRIPTOR 0x81
+#define ACPI_32_BIT_MEMORY_RANGE_DESCRIPTOR 0x85
+#define ACPI_32_BIT_FIXED_MEMORY_RANGE_DESCRIPTOR 0x86
+#define ACPI_DWORD_ADDRESS_SPACE_DESCRIPTOR 0x87
+#define ACPI_WORD_ADDRESS_SPACE_DESCRIPTOR 0x88
+#define ACPI_EXTENDED_INTERRUPT_DESCRIPTOR 0x89
+#define ACPI_QWORD_ADDRESS_SPACE_DESCRIPTOR 0x8A
+#define ACPI_ADDRESS_SPACE_DESCRIPTOR 0x8A
//
// Resource Type
//
-#define ACPI_ADDRESS_SPACE_TYPE_MEM 0x00
-#define ACPI_ADDRESS_SPACE_TYPE_IO 0x01
-#define ACPI_ADDRESS_SPACE_TYPE_BUS 0x02
+#define ACPI_ADDRESS_SPACE_TYPE_MEM 0x00
+#define ACPI_ADDRESS_SPACE_TYPE_IO 0x01
+#define ACPI_ADDRESS_SPACE_TYPE_BUS 0x02
///
/// Power Management Timer frequency is fixed at 3.579545MHz.
///
-#define ACPI_TIMER_FREQUENCY 3579545
+#define ACPI_TIMER_FREQUENCY 3579545
//
// Ensure proper structure formats
@@ -113,83 +114,83 @@ typedef struct {
/// Address Space Descriptors.
///
typedef PACKED struct {
- UINT8 Desc;
- UINT16 Len;
- UINT8 ResType;
- UINT8 GenFlag;
- UINT8 SpecificFlag;
- UINT64 AddrSpaceGranularity;
- UINT64 AddrRangeMin;
- UINT64 AddrRangeMax;
- UINT64 AddrTranslationOffset;
- UINT64 AddrLen;
+ UINT8 Desc;
+ UINT16 Len;
+ UINT8 ResType;
+ UINT8 GenFlag;
+ UINT8 SpecificFlag;
+ UINT64 AddrSpaceGranularity;
+ UINT64 AddrRangeMin;
+ UINT64 AddrRangeMax;
+ UINT64 AddrTranslationOffset;
+ UINT64 AddrLen;
} EFI_ACPI_ADDRESS_SPACE_DESCRIPTOR;
typedef PACKED union {
- UINT8 Byte;
+ UINT8 Byte;
PACKED struct {
- UINT8 Length : 3;
- UINT8 Name : 4;
- UINT8 Type : 1;
+ UINT8 Length : 3;
+ UINT8 Name : 4;
+ UINT8 Type : 1;
} Bits;
} ACPI_SMALL_RESOURCE_HEADER;
typedef PACKED struct {
PACKED union {
- UINT8 Byte;
+ UINT8 Byte;
PACKED struct {
- UINT8 Name : 7;
- UINT8 Type : 1;
- }Bits;
+ UINT8 Name : 7;
+ UINT8 Type : 1;
+ } Bits;
} Header;
- UINT16 Length;
+ UINT16 Length;
} ACPI_LARGE_RESOURCE_HEADER;
///
/// IRQ Descriptor.
///
typedef PACKED struct {
- ACPI_SMALL_RESOURCE_HEADER Header;
- UINT16 Mask;
+ ACPI_SMALL_RESOURCE_HEADER Header;
+ UINT16 Mask;
} EFI_ACPI_IRQ_NOFLAG_DESCRIPTOR;
///
/// IRQ Descriptor.
///
typedef PACKED struct {
- ACPI_SMALL_RESOURCE_HEADER Header;
- UINT16 Mask;
- UINT8 Information;
+ ACPI_SMALL_RESOURCE_HEADER Header;
+ UINT16 Mask;
+ UINT8 Information;
} EFI_ACPI_IRQ_DESCRIPTOR;
///
/// DMA Descriptor.
///
typedef PACKED struct {
- ACPI_SMALL_RESOURCE_HEADER Header;
- UINT8 ChannelMask;
- UINT8 Information;
+ ACPI_SMALL_RESOURCE_HEADER Header;
+ UINT8 ChannelMask;
+ UINT8 Information;
} EFI_ACPI_DMA_DESCRIPTOR;
///
/// I/O Port Descriptor
///
typedef PACKED struct {
- ACPI_SMALL_RESOURCE_HEADER Header;
- UINT8 Information;
- UINT16 BaseAddressMin;
- UINT16 BaseAddressMax;
- UINT8 Alignment;
- UINT8 Length;
+ ACPI_SMALL_RESOURCE_HEADER Header;
+ UINT8 Information;
+ UINT16 BaseAddressMin;
+ UINT16 BaseAddressMax;
+ UINT8 Alignment;
+ UINT8 Length;
} EFI_ACPI_IO_PORT_DESCRIPTOR;
///
/// Fixed Location I/O Port Descriptor.
///
typedef PACKED struct {
- ACPI_SMALL_RESOURCE_HEADER Header;
- UINT16 BaseAddress;
- UINT8 Length;
+ ACPI_SMALL_RESOURCE_HEADER Header;
+ UINT16 BaseAddress;
+ UINT8 Length;
} EFI_ACPI_FIXED_LOCATION_IO_PORT_DESCRIPTOR;
///
@@ -287,17 +288,17 @@ typedef PACKED struct {
/// The End tag identifies an end of resource data.
///
typedef struct {
- UINT8 Desc;
- UINT8 Checksum;
+ UINT8 Desc;
+ UINT8 Checksum;
} EFI_ACPI_END_TAG_DESCRIPTOR;
//
// General use definitions
//
-#define EFI_ACPI_RESERVED_BYTE 0x00
-#define EFI_ACPI_RESERVED_WORD 0x0000
-#define EFI_ACPI_RESERVED_DWORD 0x00000000
-#define EFI_ACPI_RESERVED_QWORD 0x0000000000000000
+#define EFI_ACPI_RESERVED_BYTE 0x00
+#define EFI_ACPI_RESERVED_WORD 0x0000
+#define EFI_ACPI_RESERVED_DWORD 0x00000000
+#define EFI_ACPI_RESERVED_QWORD 0x0000000000000000
//
// Resource Type Specific Flags
@@ -305,76 +306,86 @@ typedef struct {
//
// Bit [0] : Write Status, _RW
//
-#define EFI_ACPI_MEMORY_RESOURCE_SPECIFIC_FLAG_READ_WRITE (1 << 0)
-#define EFI_ACPI_MEMORY_RESOURCE_SPECIFIC_FLAG_READ_ONLY (0 << 0)
+#define EFI_ACPI_MEMORY_RESOURCE_SPECIFIC_FLAG_READ_WRITE (1 << 0)
+#define EFI_ACPI_MEMORY_RESOURCE_SPECIFIC_FLAG_READ_ONLY (0 << 0)
//
// Bit [2:1] : Memory Attributes, _MEM
//
-#define EFI_ACPI_MEMORY_RESOURCE_SPECIFIC_FLAG_NON_CACHEABLE (0 << 1)
-#define EFI_ACPI_MEMORY_RESOURCE_SPECIFIC_FLAG_CACHEABLE (1 << 1)
-#define EFI_ACPI_MEMORY_RESOURCE_SPECIFIC_FLAG_CACHEABLE_WRITE_COMBINING (2 << 1)
-#define EFI_ACPI_MEMORY_RESOURCE_SPECIFIC_FLAG_CACHEABLE_PREFETCHABLE (3 << 1)
+#define EFI_ACPI_MEMORY_RESOURCE_SPECIFIC_FLAG_NON_CACHEABLE (0 << 1)
+#define EFI_ACPI_MEMORY_RESOURCE_SPECIFIC_FLAG_CACHEABLE (1 << 1)
+#define EFI_ACPI_MEMORY_RESOURCE_SPECIFIC_FLAG_CACHEABLE_WRITE_COMBINING (2 << 1)
+#define EFI_ACPI_MEMORY_RESOURCE_SPECIFIC_FLAG_CACHEABLE_PREFETCHABLE (3 << 1)
//
// Bit [4:3] : Memory Attributes, _MTP
//
-#define EFI_ACPI_MEMORY_RESOURCE_SPECIFIC_FLAG_ADDRESS_RANGE_MEMORY (0 << 3)
-#define EFI_ACPI_MEMORY_RESOURCE_SPECIFIC_FLAG_ADDRESS_RANGE_RESERVED (1 << 3)
-#define EFI_ACPI_MEMORY_RESOURCE_SPECIFIC_FLAG_ADDRESS_RANGE_ACPI (2 << 3)
-#define EFI_APCI_MEMORY_RESOURCE_SPECIFIC_FLAG_ADDRESS_RANGE_NVS (3 << 3)
+#define EFI_ACPI_MEMORY_RESOURCE_SPECIFIC_FLAG_ADDRESS_RANGE_MEMORY (0 << 3)
+#define EFI_ACPI_MEMORY_RESOURCE_SPECIFIC_FLAG_ADDRESS_RANGE_RESERVED (1 << 3)
+#define EFI_ACPI_MEMORY_RESOURCE_SPECIFIC_FLAG_ADDRESS_RANGE_ACPI (2 << 3)
+#define EFI_APCI_MEMORY_RESOURCE_SPECIFIC_FLAG_ADDRESS_RANGE_NVS (3 << 3)
//
// Bit [5] : Memory to I/O Translation, _TTP
//
-#define EFI_ACPI_MEMORY_RESOURCE_SPECIFIC_FLAG_TYPE_TRANSLATION (1 << 5)
-#define EFI_ACPI_MEMORY_RESOURCE_SPECIFIC_FLAG_TYPE_STATIC (0 << 5)
+#define EFI_ACPI_MEMORY_RESOURCE_SPECIFIC_FLAG_TYPE_TRANSLATION (1 << 5)
+#define EFI_ACPI_MEMORY_RESOURCE_SPECIFIC_FLAG_TYPE_STATIC (0 << 5)
//
// IRQ Information
// Ref ACPI specification 6.4.2.1
//
-#define EFI_ACPI_IRQ_SHARABLE_MASK 0x10
-#define EFI_ACPI_IRQ_SHARABLE 0x10
+#define EFI_ACPI_IRQ_SHARABLE_MASK 0x10
+#define EFI_ACPI_IRQ_SHARABLE 0x10
-#define EFI_ACPI_IRQ_POLARITY_MASK 0x08
-#define EFI_ACPI_IRQ_HIGH_TRUE 0x00
-#define EFI_ACPI_IRQ_LOW_FALSE 0x08
+#define EFI_ACPI_IRQ_POLARITY_MASK 0x08
+#define EFI_ACPI_IRQ_HIGH_TRUE 0x00
+#define EFI_ACPI_IRQ_LOW_FALSE 0x08
-#define EFI_ACPI_IRQ_MODE 0x01
-#define EFI_ACPI_IRQ_LEVEL_TRIGGERED 0x00
-#define EFI_ACPI_IRQ_EDGE_TRIGGERED 0x01
+#define EFI_ACPI_IRQ_MODE 0x01
+#define EFI_ACPI_IRQ_LEVEL_TRIGGERED 0x00
+#define EFI_ACPI_IRQ_EDGE_TRIGGERED 0x01
//
// DMA Information
// Ref ACPI specification 6.4.2.2
//
-#define EFI_ACPI_DMA_SPEED_TYPE_MASK 0x60
-#define EFI_ACPI_DMA_SPEED_TYPE_COMPATIBILITY 0x00
-#define EFI_ACPI_DMA_SPEED_TYPE_A 0x20
-#define EFI_ACPI_DMA_SPEED_TYPE_B 0x40
-#define EFI_ACPI_DMA_SPEED_TYPE_F 0x60
+#define EFI_ACPI_DMA_SPEED_TYPE_MASK 0x60
+#define EFI_ACPI_DMA_SPEED_TYPE_COMPATIBILITY 0x00
+#define EFI_ACPI_DMA_SPEED_TYPE_A 0x20
+#define EFI_ACPI_DMA_SPEED_TYPE_B 0x40
+#define EFI_ACPI_DMA_SPEED_TYPE_F 0x60
-#define EFI_ACPI_DMA_BUS_MASTER_MASK 0x04
-#define EFI_ACPI_DMA_BUS_MASTER 0x04
+#define EFI_ACPI_DMA_BUS_MASTER_MASK 0x04
+#define EFI_ACPI_DMA_BUS_MASTER 0x04
-#define EFI_ACPI_DMA_TRANSFER_TYPE_MASK 0x03
-#define EFI_ACPI_DMA_TRANSFER_TYPE_8_BIT 0x00
-#define EFI_ACPI_DMA_TRANSFER_TYPE_8_BIT_AND_16_BIT 0x01
-#define EFI_ACPI_DMA_TRANSFER_TYPE_16_BIT 0x10
+#define EFI_ACPI_DMA_TRANSFER_TYPE_MASK 0x03
+#define EFI_ACPI_DMA_TRANSFER_TYPE_8_BIT 0x00
+#define EFI_ACPI_DMA_TRANSFER_TYPE_8_BIT_AND_16_BIT 0x01
+#define EFI_ACPI_DMA_TRANSFER_TYPE_16_BIT 0x02
//
// IO Information
// Ref ACPI specification 6.4.2.5
//
-#define EFI_ACPI_IO_DECODE_MASK 0x01
-#define EFI_ACPI_IO_DECODE_16_BIT 0x01
-#define EFI_ACPI_IO_DECODE_10_BIT 0x00
+#define EFI_ACPI_IO_DECODE_MASK 0x01
+#define EFI_ACPI_IO_DECODE_16_BIT 0x01
+#define EFI_ACPI_IO_DECODE_10_BIT 0x00
//
// Memory Information
// Ref ACPI specification 6.4.3.4
//
-#define EFI_ACPI_MEMORY_WRITE_STATUS_MASK 0x01
-#define EFI_ACPI_MEMORY_WRITABLE 0x01
-#define EFI_ACPI_MEMORY_NON_WRITABLE 0x00
+#define EFI_ACPI_MEMORY_WRITE_STATUS_MASK 0x01
+#define EFI_ACPI_MEMORY_WRITABLE 0x01
+#define EFI_ACPI_MEMORY_NON_WRITABLE 0x00
+
+//
+// Interrupt Vector Flags definitions for Extended Interrupt Descriptor
+// Ref ACPI specification 6.4.3.6
+//
+#define EFI_ACPI_EXTENDED_INTERRUPT_FLAG_PRODUCER_CONSUMER_MASK BIT0
+#define EFI_ACPI_EXTENDED_INTERRUPT_FLAG_MODE_MASK BIT1
+#define EFI_ACPI_EXTENDED_INTERRUPT_FLAG_POLARITY_MASK BIT2
+#define EFI_ACPI_EXTENDED_INTERRUPT_FLAG_SHARABLE_MASK BIT3
+#define EFI_ACPI_EXTENDED_INTERRUPT_FLAG_WAKE_CAPABLITY_MASK BIT4
//
// Ensure proper structure formats
@@ -388,11 +399,11 @@ typedef struct {
/// Root System Description Pointer Structure.
///
typedef struct {
- UINT64 Signature;
- UINT8 Checksum;
- UINT8 OemId[6];
- UINT8 Reserved;
- UINT32 RsdtAddress;
+ UINT64 Signature;
+ UINT8 Checksum;
+ UINT8 OemId[6];
+ UINT8 Reserved;
+ UINT32 RsdtAddress;
} EFI_ACPI_1_0_ROOT_SYSTEM_DESCRIPTION_POINTER;
//
@@ -404,52 +415,52 @@ typedef struct {
///
/// RSDT Revision (as defined in ACPI 1.0b specification).
///
-#define EFI_ACPI_1_0_ROOT_SYSTEM_DESCRIPTION_TABLE_REVISION 0x01
+#define EFI_ACPI_1_0_ROOT_SYSTEM_DESCRIPTION_TABLE_REVISION 0x01
///
/// Fixed ACPI Description Table Structure (FADT).
///
typedef struct {
- EFI_ACPI_DESCRIPTION_HEADER Header;
- UINT32 FirmwareCtrl;
- UINT32 Dsdt;
- UINT8 IntModel;
- UINT8 Reserved1;
- UINT16 SciInt;
- UINT32 SmiCmd;
- UINT8 AcpiEnable;
- UINT8 AcpiDisable;
- UINT8 S4BiosReq;
- UINT8 Reserved2;
- UINT32 Pm1aEvtBlk;
- UINT32 Pm1bEvtBlk;
- UINT32 Pm1aCntBlk;
- UINT32 Pm1bCntBlk;
- UINT32 Pm2CntBlk;
- UINT32 PmTmrBlk;
- UINT32 Gpe0Blk;
- UINT32 Gpe1Blk;
- UINT8 Pm1EvtLen;
- UINT8 Pm1CntLen;
- UINT8 Pm2CntLen;
- UINT8 PmTmLen;
- UINT8 Gpe0BlkLen;
- UINT8 Gpe1BlkLen;
- UINT8 Gpe1Base;
- UINT8 Reserved3;
- UINT16 PLvl2Lat;
- UINT16 PLvl3Lat;
- UINT16 FlushSize;
- UINT16 FlushStride;
- UINT8 DutyOffset;
- UINT8 DutyWidth;
- UINT8 DayAlrm;
- UINT8 MonAlrm;
- UINT8 Century;
- UINT8 Reserved4;
- UINT8 Reserved5;
- UINT8 Reserved6;
- UINT32 Flags;
+ EFI_ACPI_DESCRIPTION_HEADER Header;
+ UINT32 FirmwareCtrl;
+ UINT32 Dsdt;
+ UINT8 IntModel;
+ UINT8 Reserved1;
+ UINT16 SciInt;
+ UINT32 SmiCmd;
+ UINT8 AcpiEnable;
+ UINT8 AcpiDisable;
+ UINT8 S4BiosReq;
+ UINT8 Reserved2;
+ UINT32 Pm1aEvtBlk;
+ UINT32 Pm1bEvtBlk;
+ UINT32 Pm1aCntBlk;
+ UINT32 Pm1bCntBlk;
+ UINT32 Pm2CntBlk;
+ UINT32 PmTmrBlk;
+ UINT32 Gpe0Blk;
+ UINT32 Gpe1Blk;
+ UINT8 Pm1EvtLen;
+ UINT8 Pm1CntLen;
+ UINT8 Pm2CntLen;
+ UINT8 PmTmLen;
+ UINT8 Gpe0BlkLen;
+ UINT8 Gpe1BlkLen;
+ UINT8 Gpe1Base;
+ UINT8 Reserved3;
+ UINT16 PLvl2Lat;
+ UINT16 PLvl3Lat;
+ UINT16 FlushSize;
+ UINT16 FlushStride;
+ UINT8 DutyOffset;
+ UINT8 DutyWidth;
+ UINT8 DayAlrm;
+ UINT8 MonAlrm;
+ UINT8 Century;
+ UINT8 Reserved4;
+ UINT8 Reserved5;
+ UINT8 Reserved6;
+ UINT32 Flags;
} EFI_ACPI_1_0_FIXED_ACPI_DESCRIPTION_TABLE;
///
@@ -457,63 +468,63 @@ typedef struct {
///
#define EFI_ACPI_1_0_FIXED_ACPI_DESCRIPTION_TABLE_REVISION 0x01
-#define EFI_ACPI_1_0_INT_MODE_DUAL_PIC 0
-#define EFI_ACPI_1_0_INT_MODE_MULTIPLE_APIC 1
+#define EFI_ACPI_1_0_INT_MODE_DUAL_PIC 0
+#define EFI_ACPI_1_0_INT_MODE_MULTIPLE_APIC 1
//
// Fixed ACPI Description Table Fixed Feature Flags
// All other bits are reserved and must be set to 0.
//
-#define EFI_ACPI_1_0_WBINVD BIT0
-#define EFI_ACPI_1_0_WBINVD_FLUSH BIT1
-#define EFI_ACPI_1_0_PROC_C1 BIT2
-#define EFI_ACPI_1_0_P_LVL2_UP BIT3
-#define EFI_ACPI_1_0_PWR_BUTTON BIT4
-#define EFI_ACPI_1_0_SLP_BUTTON BIT5
-#define EFI_ACPI_1_0_FIX_RTC BIT6
-#define EFI_ACPI_1_0_RTC_S4 BIT7
-#define EFI_ACPI_1_0_TMR_VAL_EXT BIT8
-#define EFI_ACPI_1_0_DCK_CAP BIT9
+#define EFI_ACPI_1_0_WBINVD BIT0
+#define EFI_ACPI_1_0_WBINVD_FLUSH BIT1
+#define EFI_ACPI_1_0_PROC_C1 BIT2
+#define EFI_ACPI_1_0_P_LVL2_UP BIT3
+#define EFI_ACPI_1_0_PWR_BUTTON BIT4
+#define EFI_ACPI_1_0_SLP_BUTTON BIT5
+#define EFI_ACPI_1_0_FIX_RTC BIT6
+#define EFI_ACPI_1_0_RTC_S4 BIT7
+#define EFI_ACPI_1_0_TMR_VAL_EXT BIT8
+#define EFI_ACPI_1_0_DCK_CAP BIT9
///
/// Firmware ACPI Control Structure.
///
typedef struct {
- UINT32 Signature;
- UINT32 Length;
- UINT32 HardwareSignature;
- UINT32 FirmwareWakingVector;
- UINT32 GlobalLock;
- UINT32 Flags;
- UINT8 Reserved[40];
+ UINT32 Signature;
+ UINT32 Length;
+ UINT32 HardwareSignature;
+ UINT32 FirmwareWakingVector;
+ UINT32 GlobalLock;
+ UINT32 Flags;
+ UINT8 Reserved[40];
} EFI_ACPI_1_0_FIRMWARE_ACPI_CONTROL_STRUCTURE;
///
/// Firmware Control Structure Feature Flags.
/// All other bits are reserved and must be set to 0.
///
-#define EFI_ACPI_1_0_S4BIOS_F BIT0
+#define EFI_ACPI_1_0_S4BIOS_F BIT0
///
/// Multiple APIC Description Table header definition. The rest of the table
/// must be defined in a platform-specific manner.
///
typedef struct {
- EFI_ACPI_DESCRIPTION_HEADER Header;
- UINT32 LocalApicAddress;
- UINT32 Flags;
+ EFI_ACPI_DESCRIPTION_HEADER Header;
+ UINT32 LocalApicAddress;
+ UINT32 Flags;
} EFI_ACPI_1_0_MULTIPLE_APIC_DESCRIPTION_TABLE_HEADER;
///
/// MADT Revision (as defined in ACPI 1.0b specification).
///
-#define EFI_ACPI_1_0_MULTIPLE_APIC_DESCRIPTION_TABLE_REVISION 0x01
+#define EFI_ACPI_1_0_MULTIPLE_APIC_DESCRIPTION_TABLE_REVISION 0x01
///
/// Multiple APIC Flags
/// All other bits are reserved and must be set to 0.
///
-#define EFI_ACPI_1_0_PCAT_COMPAT BIT0
+#define EFI_ACPI_1_0_PCAT_COMPAT BIT0
//
// Multiple APIC Description Table APIC structure types
@@ -534,71 +545,71 @@ typedef struct {
/// Processor Local APIC Structure Definition.
///
typedef struct {
- UINT8 Type;
- UINT8 Length;
- UINT8 AcpiProcessorId;
- UINT8 ApicId;
- UINT32 Flags;
+ UINT8 Type;
+ UINT8 Length;
+ UINT8 AcpiProcessorId;
+ UINT8 ApicId;
+ UINT32 Flags;
} EFI_ACPI_1_0_PROCESSOR_LOCAL_APIC_STRUCTURE;
///
/// Local APIC Flags. All other bits are reserved and must be 0.
///
-#define EFI_ACPI_1_0_LOCAL_APIC_ENABLED BIT0
+#define EFI_ACPI_1_0_LOCAL_APIC_ENABLED BIT0
///
/// IO APIC Structure.
///
typedef struct {
- UINT8 Type;
- UINT8 Length;
- UINT8 IoApicId;
- UINT8 Reserved;
- UINT32 IoApicAddress;
- UINT32 SystemVectorBase;
+ UINT8 Type;
+ UINT8 Length;
+ UINT8 IoApicId;
+ UINT8 Reserved;
+ UINT32 IoApicAddress;
+ UINT32 SystemVectorBase;
} EFI_ACPI_1_0_IO_APIC_STRUCTURE;
///
/// Interrupt Source Override Structure.
///
typedef struct {
- UINT8 Type;
- UINT8 Length;
- UINT8 Bus;
- UINT8 Source;
- UINT32 GlobalSystemInterruptVector;
- UINT16 Flags;
+ UINT8 Type;
+ UINT8 Length;
+ UINT8 Bus;
+ UINT8 Source;
+ UINT32 GlobalSystemInterruptVector;
+ UINT16 Flags;
} EFI_ACPI_1_0_INTERRUPT_SOURCE_OVERRIDE_STRUCTURE;
///
/// Non-Maskable Interrupt Source Structure.
///
typedef struct {
- UINT8 Type;
- UINT8 Length;
- UINT16 Flags;
- UINT32 GlobalSystemInterruptVector;
+ UINT8 Type;
+ UINT8 Length;
+ UINT16 Flags;
+ UINT32 GlobalSystemInterruptVector;
} EFI_ACPI_1_0_NON_MASKABLE_INTERRUPT_SOURCE_STRUCTURE;
///
/// Local APIC NMI Structure.
///
typedef struct {
- UINT8 Type;
- UINT8 Length;
- UINT8 AcpiProcessorId;
- UINT16 Flags;
- UINT8 LocalApicInti;
+ UINT8 Type;
+ UINT8 Length;
+ UINT8 AcpiProcessorId;
+ UINT16 Flags;
+ UINT8 LocalApicInti;
} EFI_ACPI_1_0_LOCAL_APIC_NMI_STRUCTURE;
///
/// Smart Battery Description Table (SBST)
///
typedef struct {
- EFI_ACPI_DESCRIPTION_HEADER Header;
- UINT32 WarningEnergyLevel;
- UINT32 LowEnergyLevel;
- UINT32 CriticalEnergyLevel;
+ EFI_ACPI_DESCRIPTION_HEADER Header;
+ UINT32 WarningEnergyLevel;
+ UINT32 LowEnergyLevel;
+ UINT32 CriticalEnergyLevel;
} EFI_ACPI_1_0_SMART_BATTERY_DESCRIPTION_TABLE;
//
diff --git a/sys/contrib/edk2/Include/IndustryStandard/Acpi20.h b/sys/contrib/edk2/Include/IndustryStandard/Acpi20.h
index b4e19ae56ea6..4e39452baab3 100644
--- a/sys/contrib/edk2/Include/IndustryStandard/Acpi20.h
+++ b/sys/contrib/edk2/Include/IndustryStandard/Acpi20.h
@@ -13,9 +13,9 @@
//
// Define for Descriptor
//
-#define ACPI_LARGE_GENERIC_REGISTER_DESCRIPTOR_NAME 0x02
+#define ACPI_LARGE_GENERIC_REGISTER_DESCRIPTOR_NAME 0x02
-#define ACPI_GENERIC_REGISTER_DESCRIPTOR 0x82
+#define ACPI_GENERIC_REGISTER_DESCRIPTOR 0x82
//
// Ensure proper structure formats
@@ -45,11 +45,11 @@ typedef PACKED struct {
/// ACPI 2.0 Generic Address Space definition
///
typedef struct {
- UINT8 AddressSpaceId;
- UINT8 RegisterBitWidth;
- UINT8 RegisterBitOffset;
- UINT8 Reserved;
- UINT64 Address;
+ UINT8 AddressSpaceId;
+ UINT8 RegisterBitWidth;
+ UINT8 RegisterBitOffset;
+ UINT8 Reserved;
+ UINT64 Address;
} EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE;
//
@@ -70,29 +70,29 @@ typedef struct {
/// Root System Description Pointer Structure
///
typedef struct {
- UINT64 Signature;
- UINT8 Checksum;
- UINT8 OemId[6];
- UINT8 Revision;
- UINT32 RsdtAddress;
- UINT32 Length;
- UINT64 XsdtAddress;
- UINT8 ExtendedChecksum;
- UINT8 Reserved[3];
+ UINT64 Signature;
+ UINT8 Checksum;
+ UINT8 OemId[6];
+ UINT8 Revision;
+ UINT32 RsdtAddress;
+ UINT32 Length;
+ UINT64 XsdtAddress;
+ UINT8 ExtendedChecksum;
+ UINT8 Reserved[3];
} EFI_ACPI_2_0_ROOT_SYSTEM_DESCRIPTION_POINTER;
///
/// RSD_PTR Revision (as defined in ACPI 2.0 spec.)
///
-#define EFI_ACPI_2_0_ROOT_SYSTEM_DESCRIPTION_POINTER_REVISION 0x02
+#define EFI_ACPI_2_0_ROOT_SYSTEM_DESCRIPTION_POINTER_REVISION 0x02
///
/// Common table header, this prefaces all ACPI tables, including FACS, but
/// excluding the RSD PTR structure
///
typedef struct {
- UINT32 Signature;
- UINT32 Length;
+ UINT32 Signature;
+ UINT32 Length;
} EFI_ACPI_2_0_COMMON_HEADER;
//
@@ -104,7 +104,7 @@ typedef struct {
///
/// RSDT Revision (as defined in ACPI 2.0 spec.)
///
-#define EFI_ACPI_2_0_ROOT_SYSTEM_DESCRIPTION_TABLE_REVISION 0x01
+#define EFI_ACPI_2_0_ROOT_SYSTEM_DESCRIPTION_TABLE_REVISION 0x01
//
// Extended System Description Table
@@ -115,64 +115,64 @@ typedef struct {
///
/// XSDT Revision (as defined in ACPI 2.0 spec.)
///
-#define EFI_ACPI_2_0_EXTENDED_SYSTEM_DESCRIPTION_TABLE_REVISION 0x01
+#define EFI_ACPI_2_0_EXTENDED_SYSTEM_DESCRIPTION_TABLE_REVISION 0x01
///
/// Fixed ACPI Description Table Structure (FADT)
///
typedef struct {
- EFI_ACPI_DESCRIPTION_HEADER Header;
- UINT32 FirmwareCtrl;
- UINT32 Dsdt;
- UINT8 Reserved0;
- UINT8 PreferredPmProfile;
- UINT16 SciInt;
- UINT32 SmiCmd;
- UINT8 AcpiEnable;
- UINT8 AcpiDisable;
- UINT8 S4BiosReq;
- UINT8 PstateCnt;
- UINT32 Pm1aEvtBlk;
- UINT32 Pm1bEvtBlk;
- UINT32 Pm1aCntBlk;
- UINT32 Pm1bCntBlk;
- UINT32 Pm2CntBlk;
- UINT32 PmTmrBlk;
- UINT32 Gpe0Blk;
- UINT32 Gpe1Blk;
- UINT8 Pm1EvtLen;
- UINT8 Pm1CntLen;
- UINT8 Pm2CntLen;
- UINT8 PmTmrLen;
- UINT8 Gpe0BlkLen;
- UINT8 Gpe1BlkLen;
- UINT8 Gpe1Base;
- UINT8 CstCnt;
- UINT16 PLvl2Lat;
- UINT16 PLvl3Lat;
- UINT16 FlushSize;
- UINT16 FlushStride;
- UINT8 DutyOffset;
- UINT8 DutyWidth;
- UINT8 DayAlrm;
- UINT8 MonAlrm;
- UINT8 Century;
- UINT16 IaPcBootArch;
- UINT8 Reserved1;
- UINT32 Flags;
- EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE ResetReg;
- UINT8 ResetValue;
- UINT8 Reserved2[3];
- UINT64 XFirmwareCtrl;
- UINT64 XDsdt;
- EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE XPm1aEvtBlk;
- EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE XPm1bEvtBlk;
- EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE XPm1aCntBlk;
- EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE XPm1bCntBlk;
- EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE XPm2CntBlk;
- EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE XPmTmrBlk;
- EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE XGpe0Blk;
- EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE XGpe1Blk;
+ EFI_ACPI_DESCRIPTION_HEADER Header;
+ UINT32 FirmwareCtrl;
+ UINT32 Dsdt;
+ UINT8 Reserved0;
+ UINT8 PreferredPmProfile;
+ UINT16 SciInt;
+ UINT32 SmiCmd;
+ UINT8 AcpiEnable;
+ UINT8 AcpiDisable;
+ UINT8 S4BiosReq;
+ UINT8 PstateCnt;
+ UINT32 Pm1aEvtBlk;
+ UINT32 Pm1bEvtBlk;
+ UINT32 Pm1aCntBlk;
+ UINT32 Pm1bCntBlk;
+ UINT32 Pm2CntBlk;
+ UINT32 PmTmrBlk;
+ UINT32 Gpe0Blk;
+ UINT32 Gpe1Blk;
+ UINT8 Pm1EvtLen;
+ UINT8 Pm1CntLen;
+ UINT8 Pm2CntLen;
+ UINT8 PmTmrLen;
+ UINT8 Gpe0BlkLen;
+ UINT8 Gpe1BlkLen;
+ UINT8 Gpe1Base;
+ UINT8 CstCnt;
+ UINT16 PLvl2Lat;
+ UINT16 PLvl3Lat;
+ UINT16 FlushSize;
+ UINT16 FlushStride;
+ UINT8 DutyOffset;
+ UINT8 DutyWidth;
+ UINT8 DayAlrm;
+ UINT8 MonAlrm;
+ UINT8 Century;
+ UINT16 IaPcBootArch;
+ UINT8 Reserved1;
+ UINT32 Flags;
+ EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE ResetReg;
+ UINT8 ResetValue;
+ UINT8 Reserved2[3];
+ UINT64 XFirmwareCtrl;
+ UINT64 XDsdt;
+ EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE XPm1aEvtBlk;
+ EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE XPm1bEvtBlk;
+ EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE XPm1aCntBlk;
+ EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE XPm1bCntBlk;
+ EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE XPm2CntBlk;
+ EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE XPmTmrBlk;
+ EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE XGpe0Blk;
+ EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE XGpe1Blk;
} EFI_ACPI_2_0_FIXED_ACPI_DESCRIPTION_TABLE;
///
@@ -183,53 +183,53 @@ typedef struct {
//
// Fixed ACPI Description Table Preferred Power Management Profile
//
-#define EFI_ACPI_2_0_PM_PROFILE_UNSPECIFIED 0
-#define EFI_ACPI_2_0_PM_PROFILE_DESKTOP 1
-#define EFI_ACPI_2_0_PM_PROFILE_MOBILE 2
-#define EFI_ACPI_2_0_PM_PROFILE_WORKSTATION 3
-#define EFI_ACPI_2_0_PM_PROFILE_ENTERPRISE_SERVER 4
-#define EFI_ACPI_2_0_PM_PROFILE_SOHO_SERVER 5
-#define EFI_ACPI_2_0_PM_PROFILE_APPLIANCE_PC 6
+#define EFI_ACPI_2_0_PM_PROFILE_UNSPECIFIED 0
+#define EFI_ACPI_2_0_PM_PROFILE_DESKTOP 1
+#define EFI_ACPI_2_0_PM_PROFILE_MOBILE 2
+#define EFI_ACPI_2_0_PM_PROFILE_WORKSTATION 3
+#define EFI_ACPI_2_0_PM_PROFILE_ENTERPRISE_SERVER 4
+#define EFI_ACPI_2_0_PM_PROFILE_SOHO_SERVER 5
+#define EFI_ACPI_2_0_PM_PROFILE_APPLIANCE_PC 6
//
// Fixed ACPI Description Table Boot Architecture Flags
// All other bits are reserved and must be set to 0.
//
-#define EFI_ACPI_2_0_LEGACY_DEVICES BIT0
-#define EFI_ACPI_2_0_8042 BIT1
+#define EFI_ACPI_2_0_LEGACY_DEVICES BIT0
+#define EFI_ACPI_2_0_8042 BIT1
//
// Fixed ACPI Description Table Fixed Feature Flags
// All other bits are reserved and must be set to 0.
//
-#define EFI_ACPI_2_0_WBINVD BIT0
-#define EFI_ACPI_2_0_WBINVD_FLUSH BIT1
-#define EFI_ACPI_2_0_PROC_C1 BIT2
-#define EFI_ACPI_2_0_P_LVL2_UP BIT3
-#define EFI_ACPI_2_0_PWR_BUTTON BIT4
-#define EFI_ACPI_2_0_SLP_BUTTON BIT5
-#define EFI_ACPI_2_0_FIX_RTC BIT6
-#define EFI_ACPI_2_0_RTC_S4 BIT7
-#define EFI_ACPI_2_0_TMR_VAL_EXT BIT8
-#define EFI_ACPI_2_0_DCK_CAP BIT9
-#define EFI_ACPI_2_0_RESET_REG_SUP BIT10
-#define EFI_ACPI_2_0_SEALED_CASE BIT11
-#define EFI_ACPI_2_0_HEADLESS BIT12
-#define EFI_ACPI_2_0_CPU_SW_SLP BIT13
+#define EFI_ACPI_2_0_WBINVD BIT0
+#define EFI_ACPI_2_0_WBINVD_FLUSH BIT1
+#define EFI_ACPI_2_0_PROC_C1 BIT2
+#define EFI_ACPI_2_0_P_LVL2_UP BIT3
+#define EFI_ACPI_2_0_PWR_BUTTON BIT4
+#define EFI_ACPI_2_0_SLP_BUTTON BIT5
+#define EFI_ACPI_2_0_FIX_RTC BIT6
+#define EFI_ACPI_2_0_RTC_S4 BIT7
+#define EFI_ACPI_2_0_TMR_VAL_EXT BIT8
+#define EFI_ACPI_2_0_DCK_CAP BIT9
+#define EFI_ACPI_2_0_RESET_REG_SUP BIT10
+#define EFI_ACPI_2_0_SEALED_CASE BIT11
+#define EFI_ACPI_2_0_HEADLESS BIT12
+#define EFI_ACPI_2_0_CPU_SW_SLP BIT13
///
/// Firmware ACPI Control Structure
///
typedef struct {
- UINT32 Signature;
- UINT32 Length;
- UINT32 HardwareSignature;
- UINT32 FirmwareWakingVector;
- UINT32 GlobalLock;
- UINT32 Flags;
- UINT64 XFirmwareWakingVector;
- UINT8 Version;
- UINT8 Reserved[31];
+ UINT32 Signature;
+ UINT32 Length;
+ UINT32 HardwareSignature;
+ UINT32 FirmwareWakingVector;
+ UINT32 GlobalLock;
+ UINT32 Flags;
+ UINT64 XFirmwareWakingVector;
+ UINT8 Version;
+ UINT8 Reserved[31];
} EFI_ACPI_2_0_FIRMWARE_ACPI_CONTROL_STRUCTURE;
///
@@ -241,28 +241,28 @@ typedef struct {
/// Firmware Control Structure Feature Flags
/// All other bits are reserved and must be set to 0.
///
-#define EFI_ACPI_2_0_S4BIOS_F BIT0
+#define EFI_ACPI_2_0_S4BIOS_F BIT0
///
/// Multiple APIC Description Table header definition. The rest of the table
/// must be defined in a platform specific manner.
///
typedef struct {
- EFI_ACPI_DESCRIPTION_HEADER Header;
- UINT32 LocalApicAddress;
- UINT32 Flags;
+ EFI_ACPI_DESCRIPTION_HEADER Header;
+ UINT32 LocalApicAddress;
+ UINT32 Flags;
} EFI_ACPI_2_0_MULTIPLE_APIC_DESCRIPTION_TABLE_HEADER;
///
/// MADT Revision (as defined in ACPI 2.0 spec.)
///
-#define EFI_ACPI_2_0_MULTIPLE_APIC_DESCRIPTION_TABLE_REVISION 0x01
+#define EFI_ACPI_2_0_MULTIPLE_APIC_DESCRIPTION_TABLE_REVISION 0x01
///
/// Multiple APIC Flags
/// All other bits are reserved and must be set to 0.
///
-#define EFI_ACPI_2_0_PCAT_COMPAT BIT0
+#define EFI_ACPI_2_0_PCAT_COMPAT BIT0
//
// Multiple APIC Description Table APIC structure types
@@ -287,127 +287,127 @@ typedef struct {
/// Processor Local APIC Structure Definition
///
typedef struct {
- UINT8 Type;
- UINT8 Length;
- UINT8 AcpiProcessorId;
- UINT8 ApicId;
- UINT32 Flags;
+ UINT8 Type;
+ UINT8 Length;
+ UINT8 AcpiProcessorId;
+ UINT8 ApicId;
+ UINT32 Flags;
} EFI_ACPI_2_0_PROCESSOR_LOCAL_APIC_STRUCTURE;
///
/// Local APIC Flags. All other bits are reserved and must be 0.
///
-#define EFI_ACPI_2_0_LOCAL_APIC_ENABLED BIT0
+#define EFI_ACPI_2_0_LOCAL_APIC_ENABLED BIT0
///
/// IO APIC Structure
///
typedef struct {
- UINT8 Type;
- UINT8 Length;
- UINT8 IoApicId;
- UINT8 Reserved;
- UINT32 IoApicAddress;
- UINT32 GlobalSystemInterruptBase;
+ UINT8 Type;
+ UINT8 Length;
+ UINT8 IoApicId;
+ UINT8 Reserved;
+ UINT32 IoApicAddress;
+ UINT32 GlobalSystemInterruptBase;
} EFI_ACPI_2_0_IO_APIC_STRUCTURE;
///
/// Interrupt Source Override Structure
///
typedef struct {
- UINT8 Type;
- UINT8 Length;
- UINT8 Bus;
- UINT8 Source;
- UINT32 GlobalSystemInterrupt;
- UINT16 Flags;
+ UINT8 Type;
+ UINT8 Length;
+ UINT8 Bus;
+ UINT8 Source;
+ UINT32 GlobalSystemInterrupt;
+ UINT16 Flags;
} EFI_ACPI_2_0_INTERRUPT_SOURCE_OVERRIDE_STRUCTURE;
///
/// Non-Maskable Interrupt Source Structure
///
typedef struct {
- UINT8 Type;
- UINT8 Length;
- UINT16 Flags;
- UINT32 GlobalSystemInterrupt;
+ UINT8 Type;
+ UINT8 Length;
+ UINT16 Flags;
+ UINT32 GlobalSystemInterrupt;
} EFI_ACPI_2_0_NON_MASKABLE_INTERRUPT_SOURCE_STRUCTURE;
///
/// Local APIC NMI Structure
///
typedef struct {
- UINT8 Type;
- UINT8 Length;
- UINT8 AcpiProcessorId;
- UINT16 Flags;
- UINT8 LocalApicLint;
+ UINT8 Type;
+ UINT8 Length;
+ UINT8 AcpiProcessorId;
+ UINT16 Flags;
+ UINT8 LocalApicLint;
} EFI_ACPI_2_0_LOCAL_APIC_NMI_STRUCTURE;
///
/// Local APIC Address Override Structure
///
typedef struct {
- UINT8 Type;
- UINT8 Length;
- UINT16 Reserved;
- UINT64 LocalApicAddress;
+ UINT8 Type;
+ UINT8 Length;
+ UINT16 Reserved;
+ UINT64 LocalApicAddress;
} EFI_ACPI_2_0_LOCAL_APIC_ADDRESS_OVERRIDE_STRUCTURE;
///
/// IO SAPIC Structure
///
typedef struct {
- UINT8 Type;
- UINT8 Length;
- UINT8 IoApicId;
- UINT8 Reserved;
- UINT32 GlobalSystemInterruptBase;
- UINT64 IoSapicAddress;
+ UINT8 Type;
+ UINT8 Length;
+ UINT8 IoApicId;
+ UINT8 Reserved;
+ UINT32 GlobalSystemInterruptBase;
+ UINT64 IoSapicAddress;
} EFI_ACPI_2_0_IO_SAPIC_STRUCTURE;
///
/// Local SAPIC Structure
///
typedef struct {
- UINT8 Type;
- UINT8 Length;
- UINT8 AcpiProcessorId;
- UINT8 LocalSapicId;
- UINT8 LocalSapicEid;
- UINT8 Reserved[3];
- UINT32 Flags;
+ UINT8 Type;
+ UINT8 Length;
+ UINT8 AcpiProcessorId;
+ UINT8 LocalSapicId;
+ UINT8 LocalSapicEid;
+ UINT8 Reserved[3];
+ UINT32 Flags;
} EFI_ACPI_2_0_PROCESSOR_LOCAL_SAPIC_STRUCTURE;
///
/// Platform Interrupt Sources Structure
///
typedef struct {
- UINT8 Type;
- UINT8 Length;
- UINT16 Flags;
- UINT8 InterruptType;
- UINT8 ProcessorId;
- UINT8 ProcessorEid;
- UINT8 IoSapicVector;
- UINT32 GlobalSystemInterrupt;
- UINT32 Reserved;
+ UINT8 Type;
+ UINT8 Length;
+ UINT16 Flags;
+ UINT8 InterruptType;
+ UINT8 ProcessorId;
+ UINT8 ProcessorEid;
+ UINT8 IoSapicVector;
+ UINT32 GlobalSystemInterrupt;
+ UINT32 Reserved;
} EFI_ACPI_2_0_PLATFORM_INTERRUPT_SOURCES_STRUCTURE;
///
/// Smart Battery Description Table (SBST)
///
typedef struct {
- EFI_ACPI_DESCRIPTION_HEADER Header;
- UINT32 WarningEnergyLevel;
- UINT32 LowEnergyLevel;
- UINT32 CriticalEnergyLevel;
+ EFI_ACPI_DESCRIPTION_HEADER Header;
+ UINT32 WarningEnergyLevel;
+ UINT32 LowEnergyLevel;
+ UINT32 CriticalEnergyLevel;
} EFI_ACPI_2_0_SMART_BATTERY_DESCRIPTION_TABLE;
///
/// SBST Version (as defined in ACPI 2.0 spec.)
///
-#define EFI_ACPI_2_0_SMART_BATTERY_DESCRIPTION_TABLE_REVISION 0x01
+#define EFI_ACPI_2_0_SMART_BATTERY_DESCRIPTION_TABLE_REVISION 0x01
///
/// Embedded Controller Boot Resources Table (ECDT)
@@ -415,11 +415,11 @@ typedef struct {
/// a fully qualified reference to the name space object.
///
typedef struct {
- EFI_ACPI_DESCRIPTION_HEADER Header;
- EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE EcControl;
- EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE EcData;
- UINT32 Uid;
- UINT8 GpeBit;
+ EFI_ACPI_DESCRIPTION_HEADER Header;
+ EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE EcControl;
+ EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE EcData;
+ UINT32 Uid;
+ UINT8 GpeBit;
} EFI_ACPI_2_0_EMBEDDED_CONTROLLER_BOOT_RESOURCES_TABLE;
///
diff --git a/sys/contrib/edk2/Include/IndustryStandard/Acpi30.h b/sys/contrib/edk2/Include/IndustryStandard/Acpi30.h
index 4ef7bec7a5b4..dbdc072b5ffe 100644
--- a/sys/contrib/edk2/Include/IndustryStandard/Acpi30.h
+++ b/sys/contrib/edk2/Include/IndustryStandard/Acpi30.h
@@ -13,9 +13,23 @@
//
// Define for Descriptor
//
-#define ACPI_LARGE_EXTENDED_ADDRESS_SPACE_DESCRIPTOR_NAME 0x0B
+#define ACPI_LARGE_EXTENDED_ADDRESS_SPACE_DESCRIPTOR_NAME 0x0B
-#define ACPI_EXTENDED_ADDRESS_SPACE_DESCRIPTOR 0x8B
+#define ACPI_EXTENDED_ADDRESS_SPACE_DESCRIPTOR 0x8B
+
+///
+/// C-state Coordination Types
+/// See s8.4.2.2 _CSD (C-State Dependency)
+///
+#define ACPI_AML_COORD_TYPE_SW_ALL 0xFC
+#define ACPI_AML_COORD_TYPE_SW_ANY 0xFD
+#define ACPI_AML_COORD_TYPE_HW_ALL 0xFE
+
+///
+/// _PSD Revision for ACPI 3.0
+// See s8.4.4.5 _PSD (P-State Dependency)
+///
+#define EFI_ACPI_3_0_AML_PSD_REVISION 0
//
// Ensure proper structure formats
@@ -45,12 +59,12 @@ typedef PACKED struct {
//
// Memory Type Specific Flags
//
-#define EFI_ACPI_MEMORY_TYPE_SPECIFIC_ATTRIBUTES_UC 0x0000000000000001
-#define EFI_ACPI_MEMORY_TYPE_SPECIFIC_ATTRIBUTES_WC 0x0000000000000002
-#define EFI_ACPI_MEMORY_TYPE_SPECIFIC_ATTRIBUTES_WT 0x0000000000000004
-#define EFI_ACPI_MEMORY_TYPE_SPECIFIC_ATTRIBUTES_WB 0x0000000000000008
-#define EFI_ACPI_MEMORY_TYPE_SPECIFIC_ATTRIBUTES_UCE 0x0000000000000010
-#define EFI_ACPI_MEMORY_TYPE_SPECIFIC_ATTRIBUTES_NV 0x0000000000008000
+#define EFI_ACPI_MEMORY_TYPE_SPECIFIC_ATTRIBUTES_UC 0x0000000000000001
+#define EFI_ACPI_MEMORY_TYPE_SPECIFIC_ATTRIBUTES_WC 0x0000000000000002
+#define EFI_ACPI_MEMORY_TYPE_SPECIFIC_ATTRIBUTES_WT 0x0000000000000004
+#define EFI_ACPI_MEMORY_TYPE_SPECIFIC_ATTRIBUTES_WB 0x0000000000000008
+#define EFI_ACPI_MEMORY_TYPE_SPECIFIC_ATTRIBUTES_UCE 0x0000000000000010
+#define EFI_ACPI_MEMORY_TYPE_SPECIFIC_ATTRIBUTES_NV 0x0000000000008000
//
// Ensure proper structure formats
@@ -61,11 +75,11 @@ typedef PACKED struct {
/// ACPI 3.0 Generic Address Space definition
///
typedef struct {
- UINT8 AddressSpaceId;
- UINT8 RegisterBitWidth;
- UINT8 RegisterBitOffset;
- UINT8 AccessSize;
- UINT64 Address;
+ UINT8 AddressSpaceId;
+ UINT8 RegisterBitWidth;
+ UINT8 RegisterBitOffset;
+ UINT8 AccessSize;
+ UINT64 Address;
} EFI_ACPI_3_0_GENERIC_ADDRESS_STRUCTURE;
//
@@ -95,29 +109,29 @@ typedef struct {
/// Root System Description Pointer Structure
///
typedef struct {
- UINT64 Signature;
- UINT8 Checksum;
- UINT8 OemId[6];
- UINT8 Revision;
- UINT32 RsdtAddress;
- UINT32 Length;
- UINT64 XsdtAddress;
- UINT8 ExtendedChecksum;
- UINT8 Reserved[3];
+ UINT64 Signature;
+ UINT8 Checksum;
+ UINT8 OemId[6];
+ UINT8 Revision;
+ UINT32 RsdtAddress;
+ UINT32 Length;
+ UINT64 XsdtAddress;
+ UINT8 ExtendedChecksum;
+ UINT8 Reserved[3];
} EFI_ACPI_3_0_ROOT_SYSTEM_DESCRIPTION_POINTER;
///
/// RSD_PTR Revision (as defined in ACPI 3.0b spec.)
///
-#define EFI_ACPI_3_0_ROOT_SYSTEM_DESCRIPTION_POINTER_REVISION 0x02 ///< ACPISpec (Revision 3.0b) says current value is 2
+#define EFI_ACPI_3_0_ROOT_SYSTEM_DESCRIPTION_POINTER_REVISION 0x02 ///< ACPISpec (Revision 3.0b) says current value is 2
///
/// Common table header, this prefaces all ACPI tables, including FACS, but
/// excluding the RSD PTR structure
///
typedef struct {
- UINT32 Signature;
- UINT32 Length;
+ UINT32 Signature;
+ UINT32 Length;
} EFI_ACPI_3_0_COMMON_HEADER;
//
@@ -129,7 +143,7 @@ typedef struct {
///
/// RSDT Revision (as defined in ACPI 3.0 spec.)
///
-#define EFI_ACPI_3_0_ROOT_SYSTEM_DESCRIPTION_TABLE_REVISION 0x01
+#define EFI_ACPI_3_0_ROOT_SYSTEM_DESCRIPTION_TABLE_REVISION 0x01
//
// Extended System Description Table
@@ -140,64 +154,64 @@ typedef struct {
///
/// XSDT Revision (as defined in ACPI 3.0 spec.)
///
-#define EFI_ACPI_3_0_EXTENDED_SYSTEM_DESCRIPTION_TABLE_REVISION 0x01
+#define EFI_ACPI_3_0_EXTENDED_SYSTEM_DESCRIPTION_TABLE_REVISION 0x01
///
/// Fixed ACPI Description Table Structure (FADT)
///
typedef struct {
- EFI_ACPI_DESCRIPTION_HEADER Header;
- UINT32 FirmwareCtrl;
- UINT32 Dsdt;
- UINT8 Reserved0;
- UINT8 PreferredPmProfile;
- UINT16 SciInt;
- UINT32 SmiCmd;
- UINT8 AcpiEnable;
- UINT8 AcpiDisable;
- UINT8 S4BiosReq;
- UINT8 PstateCnt;
- UINT32 Pm1aEvtBlk;
- UINT32 Pm1bEvtBlk;
- UINT32 Pm1aCntBlk;
- UINT32 Pm1bCntBlk;
- UINT32 Pm2CntBlk;
- UINT32 PmTmrBlk;
- UINT32 Gpe0Blk;
- UINT32 Gpe1Blk;
- UINT8 Pm1EvtLen;
- UINT8 Pm1CntLen;
- UINT8 Pm2CntLen;
- UINT8 PmTmrLen;
- UINT8 Gpe0BlkLen;
- UINT8 Gpe1BlkLen;
- UINT8 Gpe1Base;
- UINT8 CstCnt;
- UINT16 PLvl2Lat;
- UINT16 PLvl3Lat;
- UINT16 FlushSize;
- UINT16 FlushStride;
- UINT8 DutyOffset;
- UINT8 DutyWidth;
- UINT8 DayAlrm;
- UINT8 MonAlrm;
- UINT8 Century;
- UINT16 IaPcBootArch;
- UINT8 Reserved1;
- UINT32 Flags;
- EFI_ACPI_3_0_GENERIC_ADDRESS_STRUCTURE ResetReg;
- UINT8 ResetValue;
- UINT8 Reserved2[3];
- UINT64 XFirmwareCtrl;
- UINT64 XDsdt;
- EFI_ACPI_3_0_GENERIC_ADDRESS_STRUCTURE XPm1aEvtBlk;
- EFI_ACPI_3_0_GENERIC_ADDRESS_STRUCTURE XPm1bEvtBlk;
- EFI_ACPI_3_0_GENERIC_ADDRESS_STRUCTURE XPm1aCntBlk;
- EFI_ACPI_3_0_GENERIC_ADDRESS_STRUCTURE XPm1bCntBlk;
- EFI_ACPI_3_0_GENERIC_ADDRESS_STRUCTURE XPm2CntBlk;
- EFI_ACPI_3_0_GENERIC_ADDRESS_STRUCTURE XPmTmrBlk;
- EFI_ACPI_3_0_GENERIC_ADDRESS_STRUCTURE XGpe0Blk;
- EFI_ACPI_3_0_GENERIC_ADDRESS_STRUCTURE XGpe1Blk;
+ EFI_ACPI_DESCRIPTION_HEADER Header;
+ UINT32 FirmwareCtrl;
+ UINT32 Dsdt;
+ UINT8 Reserved0;
+ UINT8 PreferredPmProfile;
+ UINT16 SciInt;
+ UINT32 SmiCmd;
+ UINT8 AcpiEnable;
+ UINT8 AcpiDisable;
+ UINT8 S4BiosReq;
+ UINT8 PstateCnt;
+ UINT32 Pm1aEvtBlk;
+ UINT32 Pm1bEvtBlk;
+ UINT32 Pm1aCntBlk;
+ UINT32 Pm1bCntBlk;
+ UINT32 Pm2CntBlk;
+ UINT32 PmTmrBlk;
+ UINT32 Gpe0Blk;
+ UINT32 Gpe1Blk;
+ UINT8 Pm1EvtLen;
+ UINT8 Pm1CntLen;
+ UINT8 Pm2CntLen;
+ UINT8 PmTmrLen;
+ UINT8 Gpe0BlkLen;
+ UINT8 Gpe1BlkLen;
+ UINT8 Gpe1Base;
+ UINT8 CstCnt;
+ UINT16 PLvl2Lat;
+ UINT16 PLvl3Lat;
+ UINT16 FlushSize;
+ UINT16 FlushStride;
+ UINT8 DutyOffset;
+ UINT8 DutyWidth;
+ UINT8 DayAlrm;
+ UINT8 MonAlrm;
+ UINT8 Century;
+ UINT16 IaPcBootArch;
+ UINT8 Reserved1;
+ UINT32 Flags;
+ EFI_ACPI_3_0_GENERIC_ADDRESS_STRUCTURE ResetReg;
+ UINT8 ResetValue;
+ UINT8 Reserved2[3];
+ UINT64 XFirmwareCtrl;
+ UINT64 XDsdt;
+ EFI_ACPI_3_0_GENERIC_ADDRESS_STRUCTURE XPm1aEvtBlk;
+ EFI_ACPI_3_0_GENERIC_ADDRESS_STRUCTURE XPm1bEvtBlk;
+ EFI_ACPI_3_0_GENERIC_ADDRESS_STRUCTURE XPm1aCntBlk;
+ EFI_ACPI_3_0_GENERIC_ADDRESS_STRUCTURE XPm1bCntBlk;
+ EFI_ACPI_3_0_GENERIC_ADDRESS_STRUCTURE XPm2CntBlk;
+ EFI_ACPI_3_0_GENERIC_ADDRESS_STRUCTURE XPmTmrBlk;
+ EFI_ACPI_3_0_GENERIC_ADDRESS_STRUCTURE XGpe0Blk;
+ EFI_ACPI_3_0_GENERIC_ADDRESS_STRUCTURE XGpe1Blk;
} EFI_ACPI_3_0_FIXED_ACPI_DESCRIPTION_TABLE;
///
@@ -221,50 +235,50 @@ typedef struct {
// Fixed ACPI Description Table Boot Architecture Flags
// All other bits are reserved and must be set to 0.
//
-#define EFI_ACPI_3_0_LEGACY_DEVICES BIT0
-#define EFI_ACPI_3_0_8042 BIT1
-#define EFI_ACPI_3_0_VGA_NOT_PRESENT BIT2
-#define EFI_ACPI_3_0_MSI_NOT_SUPPORTED BIT3
-#define EFI_ACPI_3_0_PCIE_ASPM_CONTROLS BIT4
+#define EFI_ACPI_3_0_LEGACY_DEVICES BIT0
+#define EFI_ACPI_3_0_8042 BIT1
+#define EFI_ACPI_3_0_VGA_NOT_PRESENT BIT2
+#define EFI_ACPI_3_0_MSI_NOT_SUPPORTED BIT3
+#define EFI_ACPI_3_0_PCIE_ASPM_CONTROLS BIT4
//
// Fixed ACPI Description Table Fixed Feature Flags
// All other bits are reserved and must be set to 0.
//
-#define EFI_ACPI_3_0_WBINVD BIT0
-#define EFI_ACPI_3_0_WBINVD_FLUSH BIT1
-#define EFI_ACPI_3_0_PROC_C1 BIT2
-#define EFI_ACPI_3_0_P_LVL2_UP BIT3
-#define EFI_ACPI_3_0_PWR_BUTTON BIT4
-#define EFI_ACPI_3_0_SLP_BUTTON BIT5
-#define EFI_ACPI_3_0_FIX_RTC BIT6
-#define EFI_ACPI_3_0_RTC_S4 BIT7
-#define EFI_ACPI_3_0_TMR_VAL_EXT BIT8
-#define EFI_ACPI_3_0_DCK_CAP BIT9
-#define EFI_ACPI_3_0_RESET_REG_SUP BIT10
-#define EFI_ACPI_3_0_SEALED_CASE BIT11
-#define EFI_ACPI_3_0_HEADLESS BIT12
-#define EFI_ACPI_3_0_CPU_SW_SLP BIT13
-#define EFI_ACPI_3_0_PCI_EXP_WAK BIT14
-#define EFI_ACPI_3_0_USE_PLATFORM_CLOCK BIT15
-#define EFI_ACPI_3_0_S4_RTC_STS_VALID BIT16
-#define EFI_ACPI_3_0_REMOTE_POWER_ON_CAPABLE BIT17
-#define EFI_ACPI_3_0_FORCE_APIC_CLUSTER_MODEL BIT18
-#define EFI_ACPI_3_0_FORCE_APIC_PHYSICAL_DESTINATION_MODE BIT19
+#define EFI_ACPI_3_0_WBINVD BIT0
+#define EFI_ACPI_3_0_WBINVD_FLUSH BIT1
+#define EFI_ACPI_3_0_PROC_C1 BIT2
+#define EFI_ACPI_3_0_P_LVL2_UP BIT3
+#define EFI_ACPI_3_0_PWR_BUTTON BIT4
+#define EFI_ACPI_3_0_SLP_BUTTON BIT5
+#define EFI_ACPI_3_0_FIX_RTC BIT6
+#define EFI_ACPI_3_0_RTC_S4 BIT7
+#define EFI_ACPI_3_0_TMR_VAL_EXT BIT8
+#define EFI_ACPI_3_0_DCK_CAP BIT9
+#define EFI_ACPI_3_0_RESET_REG_SUP BIT10
+#define EFI_ACPI_3_0_SEALED_CASE BIT11
+#define EFI_ACPI_3_0_HEADLESS BIT12
+#define EFI_ACPI_3_0_CPU_SW_SLP BIT13
+#define EFI_ACPI_3_0_PCI_EXP_WAK BIT14
+#define EFI_ACPI_3_0_USE_PLATFORM_CLOCK BIT15
+#define EFI_ACPI_3_0_S4_RTC_STS_VALID BIT16
+#define EFI_ACPI_3_0_REMOTE_POWER_ON_CAPABLE BIT17
+#define EFI_ACPI_3_0_FORCE_APIC_CLUSTER_MODEL BIT18
+#define EFI_ACPI_3_0_FORCE_APIC_PHYSICAL_DESTINATION_MODE BIT19
///
/// Firmware ACPI Control Structure
///
typedef struct {
- UINT32 Signature;
- UINT32 Length;
- UINT32 HardwareSignature;
- UINT32 FirmwareWakingVector;
- UINT32 GlobalLock;
- UINT32 Flags;
- UINT64 XFirmwareWakingVector;
- UINT8 Version;
- UINT8 Reserved[31];
+ UINT32 Signature;
+ UINT32 Length;
+ UINT32 HardwareSignature;
+ UINT32 FirmwareWakingVector;
+ UINT32 GlobalLock;
+ UINT32 Flags;
+ UINT64 XFirmwareWakingVector;
+ UINT8 Version;
+ UINT8 Reserved[31];
} EFI_ACPI_3_0_FIRMWARE_ACPI_CONTROL_STRUCTURE;
///
@@ -276,7 +290,7 @@ typedef struct {
/// Firmware Control Structure Feature Flags
/// All other bits are reserved and must be set to 0.
///
-#define EFI_ACPI_3_0_S4BIOS_F BIT0
+#define EFI_ACPI_3_0_S4BIOS_F BIT0
//
// Differentiated System Description Table,
@@ -285,29 +299,29 @@ typedef struct {
// no definition needed as they are common description table header, the same with
// EFI_ACPI_DESCRIPTION_HEADER, followed by a definition block.
//
-#define EFI_ACPI_3_0_DIFFERENTIATED_SYSTEM_DESCRIPTION_TABLE_REVISION 0x02
-#define EFI_ACPI_3_0_SECONDARY_SYSTEM_DESCRIPTION_TABLE_REVISION 0x02
+#define EFI_ACPI_3_0_DIFFERENTIATED_SYSTEM_DESCRIPTION_TABLE_REVISION 0x02
+#define EFI_ACPI_3_0_SECONDARY_SYSTEM_DESCRIPTION_TABLE_REVISION 0x02
///
/// Multiple APIC Description Table header definition. The rest of the table
/// must be defined in a platform specific manner.
///
typedef struct {
- EFI_ACPI_DESCRIPTION_HEADER Header;
- UINT32 LocalApicAddress;
- UINT32 Flags;
+ EFI_ACPI_DESCRIPTION_HEADER Header;
+ UINT32 LocalApicAddress;
+ UINT32 Flags;
} EFI_ACPI_3_0_MULTIPLE_APIC_DESCRIPTION_TABLE_HEADER;
///
/// MADT Revision (as defined in ACPI 3.0 spec.)
///
-#define EFI_ACPI_3_0_MULTIPLE_APIC_DESCRIPTION_TABLE_REVISION 0x02
+#define EFI_ACPI_3_0_MULTIPLE_APIC_DESCRIPTION_TABLE_REVISION 0x02
///
/// Multiple APIC Flags
/// All other bits are reserved and must be set to 0.
///
-#define EFI_ACPI_3_0_PCAT_COMPAT BIT0
+#define EFI_ACPI_3_0_PCAT_COMPAT BIT0
//
// Multiple APIC Description Table APIC structure types
@@ -332,57 +346,57 @@ typedef struct {
/// Processor Local APIC Structure Definition
///
typedef struct {
- UINT8 Type;
- UINT8 Length;
- UINT8 AcpiProcessorId;
- UINT8 ApicId;
- UINT32 Flags;
+ UINT8 Type;
+ UINT8 Length;
+ UINT8 AcpiProcessorId;
+ UINT8 ApicId;
+ UINT32 Flags;
} EFI_ACPI_3_0_PROCESSOR_LOCAL_APIC_STRUCTURE;
///
/// Local APIC Flags. All other bits are reserved and must be 0.
///
-#define EFI_ACPI_3_0_LOCAL_APIC_ENABLED BIT0
+#define EFI_ACPI_3_0_LOCAL_APIC_ENABLED BIT0
///
/// IO APIC Structure
///
typedef struct {
- UINT8 Type;
- UINT8 Length;
- UINT8 IoApicId;
- UINT8 Reserved;
- UINT32 IoApicAddress;
- UINT32 GlobalSystemInterruptBase;
+ UINT8 Type;
+ UINT8 Length;
+ UINT8 IoApicId;
+ UINT8 Reserved;
+ UINT32 IoApicAddress;
+ UINT32 GlobalSystemInterruptBase;
} EFI_ACPI_3_0_IO_APIC_STRUCTURE;
///
/// Interrupt Source Override Structure
///
typedef struct {
- UINT8 Type;
- UINT8 Length;
- UINT8 Bus;
- UINT8 Source;
- UINT32 GlobalSystemInterrupt;
- UINT16 Flags;
+ UINT8 Type;
+ UINT8 Length;
+ UINT8 Bus;
+ UINT8 Source;
+ UINT32 GlobalSystemInterrupt;
+ UINT16 Flags;
} EFI_ACPI_3_0_INTERRUPT_SOURCE_OVERRIDE_STRUCTURE;
///
/// Platform Interrupt Sources Structure Definition
///
typedef struct {
- UINT8 Type;
- UINT8 Length;
- UINT16 Flags;
- UINT8 InterruptType;
- UINT8 ProcessorId;
- UINT8 ProcessorEid;
- UINT8 IoSapicVector;
- UINT32 GlobalSystemInterrupt;
- UINT32 PlatformInterruptSourceFlags;
- UINT8 CpeiProcessorOverride;
- UINT8 Reserved[31];
+ UINT8 Type;
+ UINT8 Length;
+ UINT16 Flags;
+ UINT8 InterruptType;
+ UINT8 ProcessorId;
+ UINT8 ProcessorEid;
+ UINT8 IoSapicVector;
+ UINT32 GlobalSystemInterrupt;
+ UINT32 PlatformInterruptSourceFlags;
+ UINT8 CpeiProcessorOverride;
+ UINT8 Reserved[31];
} EFI_ACPI_3_0_PLATFORM_INTERRUPT_APIC_STRUCTURE;
//
@@ -396,43 +410,43 @@ typedef struct {
/// Non-Maskable Interrupt Source Structure
///
typedef struct {
- UINT8 Type;
- UINT8 Length;
- UINT16 Flags;
- UINT32 GlobalSystemInterrupt;
+ UINT8 Type;
+ UINT8 Length;
+ UINT16 Flags;
+ UINT32 GlobalSystemInterrupt;
} EFI_ACPI_3_0_NON_MASKABLE_INTERRUPT_SOURCE_STRUCTURE;
///
/// Local APIC NMI Structure
///
typedef struct {
- UINT8 Type;
- UINT8 Length;
- UINT8 AcpiProcessorId;
- UINT16 Flags;
- UINT8 LocalApicLint;
+ UINT8 Type;
+ UINT8 Length;
+ UINT8 AcpiProcessorId;
+ UINT16 Flags;
+ UINT8 LocalApicLint;
} EFI_ACPI_3_0_LOCAL_APIC_NMI_STRUCTURE;
///
/// Local APIC Address Override Structure
///
typedef struct {
- UINT8 Type;
- UINT8 Length;
- UINT16 Reserved;
- UINT64 LocalApicAddress;
+ UINT8 Type;
+ UINT8 Length;
+ UINT16 Reserved;
+ UINT64 LocalApicAddress;
} EFI_ACPI_3_0_LOCAL_APIC_ADDRESS_OVERRIDE_STRUCTURE;
///
/// IO SAPIC Structure
///
typedef struct {
- UINT8 Type;
- UINT8 Length;
- UINT8 IoApicId;
- UINT8 Reserved;
- UINT32 GlobalSystemInterruptBase;
- UINT64 IoSapicAddress;
+ UINT8 Type;
+ UINT8 Length;
+ UINT8 IoApicId;
+ UINT8 Reserved;
+ UINT32 GlobalSystemInterruptBase;
+ UINT64 IoSapicAddress;
} EFI_ACPI_3_0_IO_SAPIC_STRUCTURE;
///
@@ -440,51 +454,51 @@ typedef struct {
/// This struct followed by a null-terminated ASCII string - ACPI Processor UID String
///
typedef struct {
- UINT8 Type;
- UINT8 Length;
- UINT8 AcpiProcessorId;
- UINT8 LocalSapicId;
- UINT8 LocalSapicEid;
- UINT8 Reserved[3];
- UINT32 Flags;
- UINT32 ACPIProcessorUIDValue;
+ UINT8 Type;
+ UINT8 Length;
+ UINT8 AcpiProcessorId;
+ UINT8 LocalSapicId;
+ UINT8 LocalSapicEid;
+ UINT8 Reserved[3];
+ UINT32 Flags;
+ UINT32 ACPIProcessorUIDValue;
} EFI_ACPI_3_0_PROCESSOR_LOCAL_SAPIC_STRUCTURE;
///
/// Platform Interrupt Sources Structure
///
typedef struct {
- UINT8 Type;
- UINT8 Length;
- UINT16 Flags;
- UINT8 InterruptType;
- UINT8 ProcessorId;
- UINT8 ProcessorEid;
- UINT8 IoSapicVector;
- UINT32 GlobalSystemInterrupt;
- UINT32 PlatformInterruptSourceFlags;
+ UINT8 Type;
+ UINT8 Length;
+ UINT16 Flags;
+ UINT8 InterruptType;
+ UINT8 ProcessorId;
+ UINT8 ProcessorEid;
+ UINT8 IoSapicVector;
+ UINT32 GlobalSystemInterrupt;
+ UINT32 PlatformInterruptSourceFlags;
} EFI_ACPI_3_0_PLATFORM_INTERRUPT_SOURCES_STRUCTURE;
///
/// Platform Interrupt Source Flags.
/// All other bits are reserved and must be set to 0.
///
-#define EFI_ACPI_3_0_CPEI_PROCESSOR_OVERRIDE BIT0
+#define EFI_ACPI_3_0_CPEI_PROCESSOR_OVERRIDE BIT0
///
/// Smart Battery Description Table (SBST)
///
typedef struct {
- EFI_ACPI_DESCRIPTION_HEADER Header;
- UINT32 WarningEnergyLevel;
- UINT32 LowEnergyLevel;
- UINT32 CriticalEnergyLevel;
+ EFI_ACPI_DESCRIPTION_HEADER Header;
+ UINT32 WarningEnergyLevel;
+ UINT32 LowEnergyLevel;
+ UINT32 CriticalEnergyLevel;
} EFI_ACPI_3_0_SMART_BATTERY_DESCRIPTION_TABLE;
///
/// SBST Version (as defined in ACPI 3.0 spec.)
///
-#define EFI_ACPI_3_0_SMART_BATTERY_DESCRIPTION_TABLE_REVISION 0x01
+#define EFI_ACPI_3_0_SMART_BATTERY_DESCRIPTION_TABLE_REVISION 0x01
///
/// Embedded Controller Boot Resources Table (ECDT)
@@ -492,11 +506,11 @@ typedef struct {
/// a fully qualified reference to the name space object.
///
typedef struct {
- EFI_ACPI_DESCRIPTION_HEADER Header;
- EFI_ACPI_3_0_GENERIC_ADDRESS_STRUCTURE EcControl;
- EFI_ACPI_3_0_GENERIC_ADDRESS_STRUCTURE EcData;
- UINT32 Uid;
- UINT8 GpeBit;
+ EFI_ACPI_DESCRIPTION_HEADER Header;
+ EFI_ACPI_3_0_GENERIC_ADDRESS_STRUCTURE EcControl;
+ EFI_ACPI_3_0_GENERIC_ADDRESS_STRUCTURE EcData;
+ UINT32 Uid;
+ UINT8 GpeBit;
} EFI_ACPI_3_0_EMBEDDED_CONTROLLER_BOOT_RESOURCES_TABLE;
///
@@ -509,9 +523,9 @@ typedef struct {
/// must be defined in a platform specific manner.
///
typedef struct {
- EFI_ACPI_DESCRIPTION_HEADER Header;
- UINT32 Reserved1; ///< Must be set to 1
- UINT64 Reserved2;
+ EFI_ACPI_DESCRIPTION_HEADER Header;
+ UINT32 Reserved1; ///< Must be set to 1
+ UINT64 Reserved2;
} EFI_ACPI_3_0_SYSTEM_RESOURCE_AFFINITY_TABLE_HEADER;
///
@@ -531,52 +545,52 @@ typedef struct {
/// Processor Local APIC/SAPIC Affinity Structure Definition
///
typedef struct {
- UINT8 Type;
- UINT8 Length;
- UINT8 ProximityDomain7To0;
- UINT8 ApicId;
- UINT32 Flags;
- UINT8 LocalSapicEid;
- UINT8 ProximityDomain31To8[3];
- UINT8 Reserved[4];
+ UINT8 Type;
+ UINT8 Length;
+ UINT8 ProximityDomain7To0;
+ UINT8 ApicId;
+ UINT32 Flags;
+ UINT8 LocalSapicEid;
+ UINT8 ProximityDomain31To8[3];
+ UINT8 Reserved[4];
} EFI_ACPI_3_0_PROCESSOR_LOCAL_APIC_SAPIC_AFFINITY_STRUCTURE;
///
/// Local APIC/SAPIC Flags. All other bits are reserved and must be 0.
///
-#define EFI_ACPI_3_0_PROCESSOR_LOCAL_APIC_SAPIC_ENABLED (1 << 0)
+#define EFI_ACPI_3_0_PROCESSOR_LOCAL_APIC_SAPIC_ENABLED (1 << 0)
///
/// Memory Affinity Structure Definition
///
typedef struct {
- UINT8 Type;
- UINT8 Length;
- UINT32 ProximityDomain;
- UINT16 Reserved1;
- UINT32 AddressBaseLow;
- UINT32 AddressBaseHigh;
- UINT32 LengthLow;
- UINT32 LengthHigh;
- UINT32 Reserved2;
- UINT32 Flags;
- UINT64 Reserved3;
+ UINT8 Type;
+ UINT8 Length;
+ UINT32 ProximityDomain;
+ UINT16 Reserved1;
+ UINT32 AddressBaseLow;
+ UINT32 AddressBaseHigh;
+ UINT32 LengthLow;
+ UINT32 LengthHigh;
+ UINT32 Reserved2;
+ UINT32 Flags;
+ UINT64 Reserved3;
} EFI_ACPI_3_0_MEMORY_AFFINITY_STRUCTURE;
//
// Memory Flags. All other bits are reserved and must be 0.
//
-#define EFI_ACPI_3_0_MEMORY_ENABLED (1 << 0)
-#define EFI_ACPI_3_0_MEMORY_HOT_PLUGGABLE (1 << 1)
-#define EFI_ACPI_3_0_MEMORY_NONVOLATILE (1 << 2)
+#define EFI_ACPI_3_0_MEMORY_ENABLED (1 << 0)
+#define EFI_ACPI_3_0_MEMORY_HOT_PLUGGABLE (1 << 1)
+#define EFI_ACPI_3_0_MEMORY_NONVOLATILE (1 << 2)
///
/// System Locality Distance Information Table (SLIT).
/// The rest of the table is a matrix.
///
typedef struct {
- EFI_ACPI_DESCRIPTION_HEADER Header;
- UINT64 NumberOfSystemLocalities;
+ EFI_ACPI_DESCRIPTION_HEADER Header;
+ UINT64 NumberOfSystemLocalities;
} EFI_ACPI_3_0_SYSTEM_LOCALITY_DISTANCE_INFORMATION_TABLE_HEADER;
///
diff --git a/sys/contrib/edk2/Include/IndustryStandard/Acpi40.h b/sys/contrib/edk2/Include/IndustryStandard/Acpi40.h
index cfd491d45de5..4f5b494b5dd0 100644
--- a/sys/contrib/edk2/Include/IndustryStandard/Acpi40.h
+++ b/sys/contrib/edk2/Include/IndustryStandard/Acpi40.h
@@ -1,7 +1,7 @@
/** @file
ACPI 4.0 definitions from the ACPI Specification Revision 4.0a April 5, 2010
- Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2010 - 2022, Intel Corporation. All rights reserved.<BR>
SPDX-License-Identifier: BSD-2-Clause-Patent
**/
@@ -10,6 +10,11 @@
#include <IndustryStandard/Acpi30.h>
+///
+/// _PSD Revision for ACPI 4.0
+///
+#define EFI_ACPI_4_0_AML_PSD_REVISION 0
+
//
// Ensure proper structure formats
//
@@ -19,11 +24,11 @@
/// ACPI 4.0 Generic Address Space definition
///
typedef struct {
- UINT8 AddressSpaceId;
- UINT8 RegisterBitWidth;
- UINT8 RegisterBitOffset;
- UINT8 AccessSize;
- UINT64 Address;
+ UINT8 AddressSpaceId;
+ UINT8 RegisterBitWidth;
+ UINT8 RegisterBitOffset;
+ UINT8 AccessSize;
+ UINT64 Address;
} EFI_ACPI_4_0_GENERIC_ADDRESS_STRUCTURE;
//
@@ -53,29 +58,29 @@ typedef struct {
/// Root System Description Pointer Structure
///
typedef struct {
- UINT64 Signature;
- UINT8 Checksum;
- UINT8 OemId[6];
- UINT8 Revision;
- UINT32 RsdtAddress;
- UINT32 Length;
- UINT64 XsdtAddress;
- UINT8 ExtendedChecksum;
- UINT8 Reserved[3];
+ UINT64 Signature;
+ UINT8 Checksum;
+ UINT8 OemId[6];
+ UINT8 Revision;
+ UINT32 RsdtAddress;
+ UINT32 Length;
+ UINT64 XsdtAddress;
+ UINT8 ExtendedChecksum;
+ UINT8 Reserved[3];
} EFI_ACPI_4_0_ROOT_SYSTEM_DESCRIPTION_POINTER;
///
/// RSD_PTR Revision (as defined in ACPI 4.0b spec.)
///
-#define EFI_ACPI_4_0_ROOT_SYSTEM_DESCRIPTION_POINTER_REVISION 0x02 ///< ACPISpec (Revision 4.0a) says current value is 2
+#define EFI_ACPI_4_0_ROOT_SYSTEM_DESCRIPTION_POINTER_REVISION 0x02 ///< ACPISpec (Revision 4.0a) says current value is 2
///
/// Common table header, this prefaces all ACPI tables, including FACS, but
/// excluding the RSD PTR structure
///
typedef struct {
- UINT32 Signature;
- UINT32 Length;
+ UINT32 Signature;
+ UINT32 Length;
} EFI_ACPI_4_0_COMMON_HEADER;
//
@@ -87,7 +92,7 @@ typedef struct {
///
/// RSDT Revision (as defined in ACPI 4.0 spec.)
///
-#define EFI_ACPI_4_0_ROOT_SYSTEM_DESCRIPTION_TABLE_REVISION 0x01
+#define EFI_ACPI_4_0_ROOT_SYSTEM_DESCRIPTION_TABLE_REVISION 0x01
//
// Extended System Description Table
@@ -98,64 +103,64 @@ typedef struct {
///
/// XSDT Revision (as defined in ACPI 4.0 spec.)
///
-#define EFI_ACPI_4_0_EXTENDED_SYSTEM_DESCRIPTION_TABLE_REVISION 0x01
+#define EFI_ACPI_4_0_EXTENDED_SYSTEM_DESCRIPTION_TABLE_REVISION 0x01
///
/// Fixed ACPI Description Table Structure (FADT)
///
typedef struct {
- EFI_ACPI_DESCRIPTION_HEADER Header;
- UINT32 FirmwareCtrl;
- UINT32 Dsdt;
- UINT8 Reserved0;
- UINT8 PreferredPmProfile;
- UINT16 SciInt;
- UINT32 SmiCmd;
- UINT8 AcpiEnable;
- UINT8 AcpiDisable;
- UINT8 S4BiosReq;
- UINT8 PstateCnt;
- UINT32 Pm1aEvtBlk;
- UINT32 Pm1bEvtBlk;
- UINT32 Pm1aCntBlk;
- UINT32 Pm1bCntBlk;
- UINT32 Pm2CntBlk;
- UINT32 PmTmrBlk;
- UINT32 Gpe0Blk;
- UINT32 Gpe1Blk;
- UINT8 Pm1EvtLen;
- UINT8 Pm1CntLen;
- UINT8 Pm2CntLen;
- UINT8 PmTmrLen;
- UINT8 Gpe0BlkLen;
- UINT8 Gpe1BlkLen;
- UINT8 Gpe1Base;
- UINT8 CstCnt;
- UINT16 PLvl2Lat;
- UINT16 PLvl3Lat;
- UINT16 FlushSize;
- UINT16 FlushStride;
- UINT8 DutyOffset;
- UINT8 DutyWidth;
- UINT8 DayAlrm;
- UINT8 MonAlrm;
- UINT8 Century;
- UINT16 IaPcBootArch;
- UINT8 Reserved1;
- UINT32 Flags;
- EFI_ACPI_4_0_GENERIC_ADDRESS_STRUCTURE ResetReg;
- UINT8 ResetValue;
- UINT8 Reserved2[3];
- UINT64 XFirmwareCtrl;
- UINT64 XDsdt;
- EFI_ACPI_4_0_GENERIC_ADDRESS_STRUCTURE XPm1aEvtBlk;
- EFI_ACPI_4_0_GENERIC_ADDRESS_STRUCTURE XPm1bEvtBlk;
- EFI_ACPI_4_0_GENERIC_ADDRESS_STRUCTURE XPm1aCntBlk;
- EFI_ACPI_4_0_GENERIC_ADDRESS_STRUCTURE XPm1bCntBlk;
- EFI_ACPI_4_0_GENERIC_ADDRESS_STRUCTURE XPm2CntBlk;
- EFI_ACPI_4_0_GENERIC_ADDRESS_STRUCTURE XPmTmrBlk;
- EFI_ACPI_4_0_GENERIC_ADDRESS_STRUCTURE XGpe0Blk;
- EFI_ACPI_4_0_GENERIC_ADDRESS_STRUCTURE XGpe1Blk;
+ EFI_ACPI_DESCRIPTION_HEADER Header;
+ UINT32 FirmwareCtrl;
+ UINT32 Dsdt;
+ UINT8 Reserved0;
+ UINT8 PreferredPmProfile;
+ UINT16 SciInt;
+ UINT32 SmiCmd;
+ UINT8 AcpiEnable;
+ UINT8 AcpiDisable;
+ UINT8 S4BiosReq;
+ UINT8 PstateCnt;
+ UINT32 Pm1aEvtBlk;
+ UINT32 Pm1bEvtBlk;
+ UINT32 Pm1aCntBlk;
+ UINT32 Pm1bCntBlk;
+ UINT32 Pm2CntBlk;
+ UINT32 PmTmrBlk;
+ UINT32 Gpe0Blk;
+ UINT32 Gpe1Blk;
+ UINT8 Pm1EvtLen;
+ UINT8 Pm1CntLen;
+ UINT8 Pm2CntLen;
+ UINT8 PmTmrLen;
+ UINT8 Gpe0BlkLen;
+ UINT8 Gpe1BlkLen;
+ UINT8 Gpe1Base;
+ UINT8 CstCnt;
+ UINT16 PLvl2Lat;
+ UINT16 PLvl3Lat;
+ UINT16 FlushSize;
+ UINT16 FlushStride;
+ UINT8 DutyOffset;
+ UINT8 DutyWidth;
+ UINT8 DayAlrm;
+ UINT8 MonAlrm;
+ UINT8 Century;
+ UINT16 IaPcBootArch;
+ UINT8 Reserved1;
+ UINT32 Flags;
+ EFI_ACPI_4_0_GENERIC_ADDRESS_STRUCTURE ResetReg;
+ UINT8 ResetValue;
+ UINT8 Reserved2[3];
+ UINT64 XFirmwareCtrl;
+ UINT64 XDsdt;
+ EFI_ACPI_4_0_GENERIC_ADDRESS_STRUCTURE XPm1aEvtBlk;
+ EFI_ACPI_4_0_GENERIC_ADDRESS_STRUCTURE XPm1bEvtBlk;
+ EFI_ACPI_4_0_GENERIC_ADDRESS_STRUCTURE XPm1aCntBlk;
+ EFI_ACPI_4_0_GENERIC_ADDRESS_STRUCTURE XPm1bCntBlk;
+ EFI_ACPI_4_0_GENERIC_ADDRESS_STRUCTURE XPm2CntBlk;
+ EFI_ACPI_4_0_GENERIC_ADDRESS_STRUCTURE XPmTmrBlk;
+ EFI_ACPI_4_0_GENERIC_ADDRESS_STRUCTURE XGpe0Blk;
+ EFI_ACPI_4_0_GENERIC_ADDRESS_STRUCTURE XGpe1Blk;
} EFI_ACPI_4_0_FIXED_ACPI_DESCRIPTION_TABLE;
///
@@ -179,52 +184,52 @@ typedef struct {
// Fixed ACPI Description Table Boot Architecture Flags
// All other bits are reserved and must be set to 0.
//
-#define EFI_ACPI_4_0_LEGACY_DEVICES BIT0
-#define EFI_ACPI_4_0_8042 BIT1
-#define EFI_ACPI_4_0_VGA_NOT_PRESENT BIT2
-#define EFI_ACPI_4_0_MSI_NOT_SUPPORTED BIT3
-#define EFI_ACPI_4_0_PCIE_ASPM_CONTROLS BIT4
+#define EFI_ACPI_4_0_LEGACY_DEVICES BIT0
+#define EFI_ACPI_4_0_8042 BIT1
+#define EFI_ACPI_4_0_VGA_NOT_PRESENT BIT2
+#define EFI_ACPI_4_0_MSI_NOT_SUPPORTED BIT3
+#define EFI_ACPI_4_0_PCIE_ASPM_CONTROLS BIT4
//
// Fixed ACPI Description Table Fixed Feature Flags
// All other bits are reserved and must be set to 0.
//
-#define EFI_ACPI_4_0_WBINVD BIT0
-#define EFI_ACPI_4_0_WBINVD_FLUSH BIT1
-#define EFI_ACPI_4_0_PROC_C1 BIT2
-#define EFI_ACPI_4_0_P_LVL2_UP BIT3
-#define EFI_ACPI_4_0_PWR_BUTTON BIT4
-#define EFI_ACPI_4_0_SLP_BUTTON BIT5
-#define EFI_ACPI_4_0_FIX_RTC BIT6
-#define EFI_ACPI_4_0_RTC_S4 BIT7
-#define EFI_ACPI_4_0_TMR_VAL_EXT BIT8
-#define EFI_ACPI_4_0_DCK_CAP BIT9
-#define EFI_ACPI_4_0_RESET_REG_SUP BIT10
-#define EFI_ACPI_4_0_SEALED_CASE BIT11
-#define EFI_ACPI_4_0_HEADLESS BIT12
-#define EFI_ACPI_4_0_CPU_SW_SLP BIT13
-#define EFI_ACPI_4_0_PCI_EXP_WAK BIT14
-#define EFI_ACPI_4_0_USE_PLATFORM_CLOCK BIT15
-#define EFI_ACPI_4_0_S4_RTC_STS_VALID BIT16
-#define EFI_ACPI_4_0_REMOTE_POWER_ON_CAPABLE BIT17
-#define EFI_ACPI_4_0_FORCE_APIC_CLUSTER_MODEL BIT18
-#define EFI_ACPI_4_0_FORCE_APIC_PHYSICAL_DESTINATION_MODE BIT19
+#define EFI_ACPI_4_0_WBINVD BIT0
+#define EFI_ACPI_4_0_WBINVD_FLUSH BIT1
+#define EFI_ACPI_4_0_PROC_C1 BIT2
+#define EFI_ACPI_4_0_P_LVL2_UP BIT3
+#define EFI_ACPI_4_0_PWR_BUTTON BIT4
+#define EFI_ACPI_4_0_SLP_BUTTON BIT5
+#define EFI_ACPI_4_0_FIX_RTC BIT6
+#define EFI_ACPI_4_0_RTC_S4 BIT7
+#define EFI_ACPI_4_0_TMR_VAL_EXT BIT8
+#define EFI_ACPI_4_0_DCK_CAP BIT9
+#define EFI_ACPI_4_0_RESET_REG_SUP BIT10
+#define EFI_ACPI_4_0_SEALED_CASE BIT11
+#define EFI_ACPI_4_0_HEADLESS BIT12
+#define EFI_ACPI_4_0_CPU_SW_SLP BIT13
+#define EFI_ACPI_4_0_PCI_EXP_WAK BIT14
+#define EFI_ACPI_4_0_USE_PLATFORM_CLOCK BIT15
+#define EFI_ACPI_4_0_S4_RTC_STS_VALID BIT16
+#define EFI_ACPI_4_0_REMOTE_POWER_ON_CAPABLE BIT17
+#define EFI_ACPI_4_0_FORCE_APIC_CLUSTER_MODEL BIT18
+#define EFI_ACPI_4_0_FORCE_APIC_PHYSICAL_DESTINATION_MODE BIT19
///
/// Firmware ACPI Control Structure
///
typedef struct {
- UINT32 Signature;
- UINT32 Length;
- UINT32 HardwareSignature;
- UINT32 FirmwareWakingVector;
- UINT32 GlobalLock;
- UINT32 Flags;
- UINT64 XFirmwareWakingVector;
- UINT8 Version;
- UINT8 Reserved0[3];
- UINT32 OspmFlags;
- UINT8 Reserved1[24];
+ UINT32 Signature;
+ UINT32 Length;
+ UINT32 HardwareSignature;
+ UINT32 FirmwareWakingVector;
+ UINT32 GlobalLock;
+ UINT32 Flags;
+ UINT64 XFirmwareWakingVector;
+ UINT8 Version;
+ UINT8 Reserved0[3];
+ UINT32 OspmFlags;
+ UINT8 Reserved1[24];
} EFI_ACPI_4_0_FIRMWARE_ACPI_CONTROL_STRUCTURE;
///
@@ -236,14 +241,14 @@ typedef struct {
/// Firmware Control Structure Feature Flags
/// All other bits are reserved and must be set to 0.
///
-#define EFI_ACPI_4_0_S4BIOS_F BIT0
-#define EFI_ACPI_4_0_64BIT_WAKE_SUPPORTED_F BIT1
+#define EFI_ACPI_4_0_S4BIOS_F BIT0
+#define EFI_ACPI_4_0_64BIT_WAKE_SUPPORTED_F BIT1
///
/// OSPM Enabled Firmware Control Structure Flags
/// All other bits are reserved and must be set to 0.
///
-#define EFI_ACPI_4_0_OSPM_64BIT_WAKE__F BIT0
+#define EFI_ACPI_4_0_OSPM_64BIT_WAKE__F BIT0
//
// Differentiated System Description Table,
@@ -252,29 +257,29 @@ typedef struct {
// no definition needed as they are common description table header, the same with
// EFI_ACPI_DESCRIPTION_HEADER, followed by a definition block.
//
-#define EFI_ACPI_4_0_DIFFERENTIATED_SYSTEM_DESCRIPTION_TABLE_REVISION 0x02
-#define EFI_ACPI_4_0_SECONDARY_SYSTEM_DESCRIPTION_TABLE_REVISION 0x02
+#define EFI_ACPI_4_0_DIFFERENTIATED_SYSTEM_DESCRIPTION_TABLE_REVISION 0x02
+#define EFI_ACPI_4_0_SECONDARY_SYSTEM_DESCRIPTION_TABLE_REVISION 0x02
///
/// Multiple APIC Description Table header definition. The rest of the table
/// must be defined in a platform specific manner.
///
typedef struct {
- EFI_ACPI_DESCRIPTION_HEADER Header;
- UINT32 LocalApicAddress;
- UINT32 Flags;
+ EFI_ACPI_DESCRIPTION_HEADER Header;
+ UINT32 LocalApicAddress;
+ UINT32 Flags;
} EFI_ACPI_4_0_MULTIPLE_APIC_DESCRIPTION_TABLE_HEADER;
///
/// MADT Revision (as defined in ACPI 4.0 spec.)
///
-#define EFI_ACPI_4_0_MULTIPLE_APIC_DESCRIPTION_TABLE_REVISION 0x03
+#define EFI_ACPI_4_0_MULTIPLE_APIC_DESCRIPTION_TABLE_REVISION 0x03
///
/// Multiple APIC Flags
/// All other bits are reserved and must be set to 0.
///
-#define EFI_ACPI_4_0_PCAT_COMPAT BIT0
+#define EFI_ACPI_4_0_PCAT_COMPAT BIT0
//
// Multiple APIC Description Table APIC structure types
@@ -301,57 +306,57 @@ typedef struct {
/// Processor Local APIC Structure Definition
///
typedef struct {
- UINT8 Type;
- UINT8 Length;
- UINT8 AcpiProcessorId;
- UINT8 ApicId;
- UINT32 Flags;
+ UINT8 Type;
+ UINT8 Length;
+ UINT8 AcpiProcessorId;
+ UINT8 ApicId;
+ UINT32 Flags;
} EFI_ACPI_4_0_PROCESSOR_LOCAL_APIC_STRUCTURE;
///
/// Local APIC Flags. All other bits are reserved and must be 0.
///
-#define EFI_ACPI_4_0_LOCAL_APIC_ENABLED BIT0
+#define EFI_ACPI_4_0_LOCAL_APIC_ENABLED BIT0
///
/// IO APIC Structure
///
typedef struct {
- UINT8 Type;
- UINT8 Length;
- UINT8 IoApicId;
- UINT8 Reserved;
- UINT32 IoApicAddress;
- UINT32 GlobalSystemInterruptBase;
+ UINT8 Type;
+ UINT8 Length;
+ UINT8 IoApicId;
+ UINT8 Reserved;
+ UINT32 IoApicAddress;
+ UINT32 GlobalSystemInterruptBase;
} EFI_ACPI_4_0_IO_APIC_STRUCTURE;
///
/// Interrupt Source Override Structure
///
typedef struct {
- UINT8 Type;
- UINT8 Length;
- UINT8 Bus;
- UINT8 Source;
- UINT32 GlobalSystemInterrupt;
- UINT16 Flags;
+ UINT8 Type;
+ UINT8 Length;
+ UINT8 Bus;
+ UINT8 Source;
+ UINT32 GlobalSystemInterrupt;
+ UINT16 Flags;
} EFI_ACPI_4_0_INTERRUPT_SOURCE_OVERRIDE_STRUCTURE;
///
/// Platform Interrupt Sources Structure Definition
///
typedef struct {
- UINT8 Type;
- UINT8 Length;
- UINT16 Flags;
- UINT8 InterruptType;
- UINT8 ProcessorId;
- UINT8 ProcessorEid;
- UINT8 IoSapicVector;
- UINT32 GlobalSystemInterrupt;
- UINT32 PlatformInterruptSourceFlags;
- UINT8 CpeiProcessorOverride;
- UINT8 Reserved[31];
+ UINT8 Type;
+ UINT8 Length;
+ UINT16 Flags;
+ UINT8 InterruptType;
+ UINT8 ProcessorId;
+ UINT8 ProcessorEid;
+ UINT8 IoSapicVector;
+ UINT32 GlobalSystemInterrupt;
+ UINT32 PlatformInterruptSourceFlags;
+ UINT8 CpeiProcessorOverride;
+ UINT8 Reserved[31];
} EFI_ACPI_4_0_PLATFORM_INTERRUPT_APIC_STRUCTURE;
//
@@ -365,43 +370,43 @@ typedef struct {
/// Non-Maskable Interrupt Source Structure
///
typedef struct {
- UINT8 Type;
- UINT8 Length;
- UINT16 Flags;
- UINT32 GlobalSystemInterrupt;
+ UINT8 Type;
+ UINT8 Length;
+ UINT16 Flags;
+ UINT32 GlobalSystemInterrupt;
} EFI_ACPI_4_0_NON_MASKABLE_INTERRUPT_SOURCE_STRUCTURE;
///
/// Local APIC NMI Structure
///
typedef struct {
- UINT8 Type;
- UINT8 Length;
- UINT8 AcpiProcessorId;
- UINT16 Flags;
- UINT8 LocalApicLint;
+ UINT8 Type;
+ UINT8 Length;
+ UINT8 AcpiProcessorId;
+ UINT16 Flags;
+ UINT8 LocalApicLint;
} EFI_ACPI_4_0_LOCAL_APIC_NMI_STRUCTURE;
///
/// Local APIC Address Override Structure
///
typedef struct {
- UINT8 Type;
- UINT8 Length;
- UINT16 Reserved;
- UINT64 LocalApicAddress;
+ UINT8 Type;
+ UINT8 Length;
+ UINT16 Reserved;
+ UINT64 LocalApicAddress;
} EFI_ACPI_4_0_LOCAL_APIC_ADDRESS_OVERRIDE_STRUCTURE;
///
/// IO SAPIC Structure
///
typedef struct {
- UINT8 Type;
- UINT8 Length;
- UINT8 IoApicId;
- UINT8 Reserved;
- UINT32 GlobalSystemInterruptBase;
- UINT64 IoSapicAddress;
+ UINT8 Type;
+ UINT8 Length;
+ UINT8 IoApicId;
+ UINT8 Reserved;
+ UINT32 GlobalSystemInterruptBase;
+ UINT64 IoSapicAddress;
} EFI_ACPI_4_0_IO_SAPIC_STRUCTURE;
///
@@ -409,75 +414,75 @@ typedef struct {
/// This struct followed by a null-terminated ASCII string - ACPI Processor UID String
///
typedef struct {
- UINT8 Type;
- UINT8 Length;
- UINT8 AcpiProcessorId;
- UINT8 LocalSapicId;
- UINT8 LocalSapicEid;
- UINT8 Reserved[3];
- UINT32 Flags;
- UINT32 ACPIProcessorUIDValue;
+ UINT8 Type;
+ UINT8 Length;
+ UINT8 AcpiProcessorId;
+ UINT8 LocalSapicId;
+ UINT8 LocalSapicEid;
+ UINT8 Reserved[3];
+ UINT32 Flags;
+ UINT32 ACPIProcessorUIDValue;
} EFI_ACPI_4_0_PROCESSOR_LOCAL_SAPIC_STRUCTURE;
///
/// Platform Interrupt Sources Structure
///
typedef struct {
- UINT8 Type;
- UINT8 Length;
- UINT16 Flags;
- UINT8 InterruptType;
- UINT8 ProcessorId;
- UINT8 ProcessorEid;
- UINT8 IoSapicVector;
- UINT32 GlobalSystemInterrupt;
- UINT32 PlatformInterruptSourceFlags;
+ UINT8 Type;
+ UINT8 Length;
+ UINT16 Flags;
+ UINT8 InterruptType;
+ UINT8 ProcessorId;
+ UINT8 ProcessorEid;
+ UINT8 IoSapicVector;
+ UINT32 GlobalSystemInterrupt;
+ UINT32 PlatformInterruptSourceFlags;
} EFI_ACPI_4_0_PLATFORM_INTERRUPT_SOURCES_STRUCTURE;
///
/// Platform Interrupt Source Flags.
/// All other bits are reserved and must be set to 0.
///
-#define EFI_ACPI_4_0_CPEI_PROCESSOR_OVERRIDE BIT0
+#define EFI_ACPI_4_0_CPEI_PROCESSOR_OVERRIDE BIT0
///
/// Processor Local x2APIC Structure Definition
///
typedef struct {
- UINT8 Type;
- UINT8 Length;
- UINT8 Reserved[2];
- UINT32 X2ApicId;
- UINT32 Flags;
- UINT32 AcpiProcessorUid;
+ UINT8 Type;
+ UINT8 Length;
+ UINT8 Reserved[2];
+ UINT32 X2ApicId;
+ UINT32 Flags;
+ UINT32 AcpiProcessorUid;
} EFI_ACPI_4_0_PROCESSOR_LOCAL_X2APIC_STRUCTURE;
///
/// Local x2APIC NMI Structure
///
typedef struct {
- UINT8 Type;
- UINT8 Length;
- UINT16 Flags;
- UINT32 AcpiProcessorUid;
- UINT8 LocalX2ApicLint;
- UINT8 Reserved[3];
+ UINT8 Type;
+ UINT8 Length;
+ UINT16 Flags;
+ UINT32 AcpiProcessorUid;
+ UINT8 LocalX2ApicLint;
+ UINT8 Reserved[3];
} EFI_ACPI_4_0_LOCAL_X2APIC_NMI_STRUCTURE;
///
/// Smart Battery Description Table (SBST)
///
typedef struct {
- EFI_ACPI_DESCRIPTION_HEADER Header;
- UINT32 WarningEnergyLevel;
- UINT32 LowEnergyLevel;
- UINT32 CriticalEnergyLevel;
+ EFI_ACPI_DESCRIPTION_HEADER Header;
+ UINT32 WarningEnergyLevel;
+ UINT32 LowEnergyLevel;
+ UINT32 CriticalEnergyLevel;
} EFI_ACPI_4_0_SMART_BATTERY_DESCRIPTION_TABLE;
///
/// SBST Version (as defined in ACPI 4.0 spec.)
///
-#define EFI_ACPI_4_0_SMART_BATTERY_DESCRIPTION_TABLE_REVISION 0x01
+#define EFI_ACPI_4_0_SMART_BATTERY_DESCRIPTION_TABLE_REVISION 0x01
///
/// Embedded Controller Boot Resources Table (ECDT)
@@ -485,11 +490,11 @@ typedef struct {
/// a fully qualified reference to the name space object.
///
typedef struct {
- EFI_ACPI_DESCRIPTION_HEADER Header;
- EFI_ACPI_4_0_GENERIC_ADDRESS_STRUCTURE EcControl;
- EFI_ACPI_4_0_GENERIC_ADDRESS_STRUCTURE EcData;
- UINT32 Uid;
- UINT8 GpeBit;
+ EFI_ACPI_DESCRIPTION_HEADER Header;
+ EFI_ACPI_4_0_GENERIC_ADDRESS_STRUCTURE EcControl;
+ EFI_ACPI_4_0_GENERIC_ADDRESS_STRUCTURE EcData;
+ UINT32 Uid;
+ UINT8 GpeBit;
} EFI_ACPI_4_0_EMBEDDED_CONTROLLER_BOOT_RESOURCES_TABLE;
///
@@ -502,9 +507,9 @@ typedef struct {
/// must be defined in a platform specific manner.
///
typedef struct {
- EFI_ACPI_DESCRIPTION_HEADER Header;
- UINT32 Reserved1; ///< Must be set to 1
- UINT64 Reserved2;
+ EFI_ACPI_DESCRIPTION_HEADER Header;
+ UINT32 Reserved1; ///< Must be set to 1
+ UINT64 Reserved2;
} EFI_ACPI_4_0_SYSTEM_RESOURCE_AFFINITY_TABLE_HEADER;
///
@@ -525,57 +530,57 @@ typedef struct {
/// Processor Local APIC/SAPIC Affinity Structure Definition
///
typedef struct {
- UINT8 Type;
- UINT8 Length;
- UINT8 ProximityDomain7To0;
- UINT8 ApicId;
- UINT32 Flags;
- UINT8 LocalSapicEid;
- UINT8 ProximityDomain31To8[3];
- UINT32 ClockDomain;
+ UINT8 Type;
+ UINT8 Length;
+ UINT8 ProximityDomain7To0;
+ UINT8 ApicId;
+ UINT32 Flags;
+ UINT8 LocalSapicEid;
+ UINT8 ProximityDomain31To8[3];
+ UINT32 ClockDomain;
} EFI_ACPI_4_0_PROCESSOR_LOCAL_APIC_SAPIC_AFFINITY_STRUCTURE;
///
/// Local APIC/SAPIC Flags. All other bits are reserved and must be 0.
///
-#define EFI_ACPI_4_0_PROCESSOR_LOCAL_APIC_SAPIC_ENABLED (1 << 0)
+#define EFI_ACPI_4_0_PROCESSOR_LOCAL_APIC_SAPIC_ENABLED (1 << 0)
///
/// Memory Affinity Structure Definition
///
typedef struct {
- UINT8 Type;
- UINT8 Length;
- UINT32 ProximityDomain;
- UINT16 Reserved1;
- UINT32 AddressBaseLow;
- UINT32 AddressBaseHigh;
- UINT32 LengthLow;
- UINT32 LengthHigh;
- UINT32 Reserved2;
- UINT32 Flags;
- UINT64 Reserved3;
+ UINT8 Type;
+ UINT8 Length;
+ UINT32 ProximityDomain;
+ UINT16 Reserved1;
+ UINT32 AddressBaseLow;
+ UINT32 AddressBaseHigh;
+ UINT32 LengthLow;
+ UINT32 LengthHigh;
+ UINT32 Reserved2;
+ UINT32 Flags;
+ UINT64 Reserved3;
} EFI_ACPI_4_0_MEMORY_AFFINITY_STRUCTURE;
//
// Memory Flags. All other bits are reserved and must be 0.
//
-#define EFI_ACPI_4_0_MEMORY_ENABLED (1 << 0)
-#define EFI_ACPI_4_0_MEMORY_HOT_PLUGGABLE (1 << 1)
-#define EFI_ACPI_4_0_MEMORY_NONVOLATILE (1 << 2)
+#define EFI_ACPI_4_0_MEMORY_ENABLED (1 << 0)
+#define EFI_ACPI_4_0_MEMORY_HOT_PLUGGABLE (1 << 1)
+#define EFI_ACPI_4_0_MEMORY_NONVOLATILE (1 << 2)
///
/// Processor Local x2APIC Affinity Structure Definition
///
typedef struct {
- UINT8 Type;
- UINT8 Length;
- UINT8 Reserved1[2];
- UINT32 ProximityDomain;
- UINT32 X2ApicId;
- UINT32 Flags;
- UINT32 ClockDomain;
- UINT8 Reserved2[4];
+ UINT8 Type;
+ UINT8 Length;
+ UINT8 Reserved1[2];
+ UINT32 ProximityDomain;
+ UINT32 X2ApicId;
+ UINT32 Flags;
+ UINT32 ClockDomain;
+ UINT8 Reserved2[4];
} EFI_ACPI_4_0_PROCESSOR_LOCAL_X2APIC_AFFINITY_STRUCTURE;
///
@@ -583,8 +588,8 @@ typedef struct {
/// The rest of the table is a matrix.
///
typedef struct {
- EFI_ACPI_DESCRIPTION_HEADER Header;
- UINT64 NumberOfSystemLocalities;
+ EFI_ACPI_DESCRIPTION_HEADER Header;
+ UINT64 NumberOfSystemLocalities;
} EFI_ACPI_4_0_SYSTEM_LOCALITY_DISTANCE_INFORMATION_TABLE_HEADER;
///
@@ -596,14 +601,14 @@ typedef struct {
/// Corrected Platform Error Polling Table (CPEP)
///
typedef struct {
- EFI_ACPI_DESCRIPTION_HEADER Header;
- UINT8 Reserved[8];
+ EFI_ACPI_DESCRIPTION_HEADER Header;
+ UINT8 Reserved[8];
} EFI_ACPI_4_0_CORRECTED_PLATFORM_ERROR_POLLING_TABLE_HEADER;
///
/// CPEP Version (as defined in ACPI 4.0 spec.)
///
-#define EFI_ACPI_4_0_CORRECTED_PLATFORM_ERROR_POLLING_TABLE_REVISION 0x01
+#define EFI_ACPI_4_0_CORRECTED_PLATFORM_ERROR_POLLING_TABLE_REVISION 0x01
//
// CPEP processor structure types.
@@ -614,82 +619,83 @@ typedef struct {
/// Corrected Platform Error Polling Processor Structure Definition
///
typedef struct {
- UINT8 Type;
- UINT8 Length;
- UINT8 ProcessorId;
- UINT8 ProcessorEid;
- UINT32 PollingInterval;
+ UINT8 Type;
+ UINT8 Length;
+ UINT8 ProcessorId;
+ UINT8 ProcessorEid;
+ UINT32 PollingInterval;
} EFI_ACPI_4_0_CPEP_PROCESSOR_APIC_SAPIC_STRUCTURE;
///
/// Maximum System Characteristics Table (MSCT)
///
typedef struct {
- EFI_ACPI_DESCRIPTION_HEADER Header;
- UINT32 OffsetProxDomInfo;
- UINT32 MaximumNumberOfProximityDomains;
- UINT32 MaximumNumberOfClockDomains;
- UINT64 MaximumPhysicalAddress;
+ EFI_ACPI_DESCRIPTION_HEADER Header;
+ UINT32 OffsetProxDomInfo;
+ UINT32 MaximumNumberOfProximityDomains;
+ UINT32 MaximumNumberOfClockDomains;
+ UINT64 MaximumPhysicalAddress;
} EFI_ACPI_4_0_MAXIMUM_SYSTEM_CHARACTERISTICS_TABLE_HEADER;
///
/// MSCT Version (as defined in ACPI 4.0 spec.)
///
-#define EFI_ACPI_4_0_MAXIMUM_SYSTEM_CHARACTERISTICS_TABLE_REVISION 0x01
+#define EFI_ACPI_4_0_MAXIMUM_SYSTEM_CHARACTERISTICS_TABLE_REVISION 0x01
///
/// Maximum Proximity Domain Information Structure Definition
///
typedef struct {
- UINT8 Revision;
- UINT8 Length;
- UINT32 ProximityDomainRangeLow;
- UINT32 ProximityDomainRangeHigh;
- UINT32 MaximumProcessorCapacity;
- UINT64 MaximumMemoryCapacity;
+ UINT8 Revision;
+ UINT8 Length;
+ UINT32 ProximityDomainRangeLow;
+ UINT32 ProximityDomainRangeHigh;
+ UINT32 MaximumProcessorCapacity;
+ UINT64 MaximumMemoryCapacity;
} EFI_ACPI_4_0_MAXIMUM_PROXIMITY_DOMAIN_INFORMATION_STRUCTURE;
///
/// Boot Error Record Table (BERT)
///
typedef struct {
- EFI_ACPI_DESCRIPTION_HEADER Header;
- UINT32 BootErrorRegionLength;
- UINT64 BootErrorRegion;
+ EFI_ACPI_DESCRIPTION_HEADER Header;
+ UINT32 BootErrorRegionLength;
+ UINT64 BootErrorRegion;
} EFI_ACPI_4_0_BOOT_ERROR_RECORD_TABLE_HEADER;
///
/// BERT Version (as defined in ACPI 4.0 spec.)
///
-#define EFI_ACPI_4_0_BOOT_ERROR_RECORD_TABLE_REVISION 0x01
+#define EFI_ACPI_4_0_BOOT_ERROR_RECORD_TABLE_REVISION 0x01
///
/// Boot Error Region Block Status Definition
///
typedef struct {
- UINT32 UncorrectableErrorValid:1;
- UINT32 CorrectableErrorValid:1;
- UINT32 MultipleUncorrectableErrors:1;
- UINT32 MultipleCorrectableErrors:1;
- UINT32 ErrorDataEntryCount:10;
- UINT32 Reserved:18;
+ UINT32 UncorrectableErrorValid : 1;
+ UINT32 CorrectableErrorValid : 1;
+ UINT32 MultipleUncorrectableErrors : 1;
+ UINT32 MultipleCorrectableErrors : 1;
+ UINT32 ErrorDataEntryCount : 10;
+ UINT32 Reserved : 18;
} EFI_ACPI_4_0_ERROR_BLOCK_STATUS;
///
/// Boot Error Region Definition
///
typedef struct {
- EFI_ACPI_4_0_ERROR_BLOCK_STATUS BlockStatus;
- UINT32 RawDataOffset;
- UINT32 RawDataLength;
- UINT32 DataLength;
- UINT32 ErrorSeverity;
+ EFI_ACPI_4_0_ERROR_BLOCK_STATUS BlockStatus;
+ UINT32 RawDataOffset;
+ UINT32 RawDataLength;
+ UINT32 DataLength;
+ UINT32 ErrorSeverity;
} EFI_ACPI_4_0_BOOT_ERROR_REGION_STRUCTURE;
//
// Boot Error Severity types
//
#define EFI_ACPI_4_0_ERROR_SEVERITY_CORRECTABLE 0x00
+#define EFI_ACPI_4_0_ERROR_SEVERITY_RECOVERABLE 0x00
#define EFI_ACPI_4_0_ERROR_SEVERITY_FATAL 0x01
#define EFI_ACPI_4_0_ERROR_SEVERITY_CORRECTED 0x02
#define EFI_ACPI_4_0_ERROR_SEVERITY_NONE 0x03
@@ -698,14 +704,14 @@ typedef struct {
/// Generic Error Data Entry Definition
///
typedef struct {
- UINT8 SectionType[16];
- UINT32 ErrorSeverity;
- UINT16 Revision;
- UINT8 ValidationBits;
- UINT8 Flags;
- UINT32 ErrorDataLength;
- UINT8 FruId[16];
- UINT8 FruText[20];
+ UINT8 SectionType[16];
+ UINT32 ErrorSeverity;
+ UINT16 Revision;
+ UINT8 ValidationBits;
+ UINT8 Flags;
+ UINT32 ErrorDataLength;
+ UINT8 FruId[16];
+ UINT8 FruText[20];
} EFI_ACPI_4_0_GENERIC_ERROR_DATA_ENTRY_STRUCTURE;
///
@@ -717,14 +723,14 @@ typedef struct {
/// HEST - Hardware Error Source Table
///
typedef struct {
- EFI_ACPI_DESCRIPTION_HEADER Header;
- UINT32 ErrorSourceCount;
+ EFI_ACPI_DESCRIPTION_HEADER Header;
+ UINT32 ErrorSourceCount;
} EFI_ACPI_4_0_HARDWARE_ERROR_SOURCE_TABLE_HEADER;
///
/// HEST Version (as defined in ACPI 4.0 spec.)
///
-#define EFI_ACPI_4_0_HARDWARE_ERROR_SOURCE_TABLE_REVISION 0x01
+#define EFI_ACPI_4_0_HARDWARE_ERROR_SOURCE_TABLE_REVISION 0x01
//
// Error Source structure types.
@@ -740,383 +746,383 @@ typedef struct {
//
// Error Source structure flags.
//
-#define EFI_ACPI_4_0_ERROR_SOURCE_FLAG_FIRMWARE_FIRST (1 << 0)
-#define EFI_ACPI_4_0_ERROR_SOURCE_FLAG_GLOBAL (1 << 1)
+#define EFI_ACPI_4_0_ERROR_SOURCE_FLAG_FIRMWARE_FIRST (1 << 0)
+#define EFI_ACPI_4_0_ERROR_SOURCE_FLAG_GLOBAL (1 << 1)
///
/// IA-32 Architecture Machine Check Exception Structure Definition
///
typedef struct {
- UINT16 Type;
- UINT16 SourceId;
- UINT8 Reserved0[2];
- UINT8 Flags;
- UINT8 Enabled;
- UINT32 NumberOfRecordsToPreAllocate;
- UINT32 MaxSectionsPerRecord;
- UINT64 GlobalCapabilityInitData;
- UINT64 GlobalControlInitData;
- UINT8 NumberOfHardwareBanks;
- UINT8 Reserved1[7];
+ UINT16 Type;
+ UINT16 SourceId;
+ UINT8 Reserved0[2];
+ UINT8 Flags;
+ UINT8 Enabled;
+ UINT32 NumberOfRecordsToPreAllocate;
+ UINT32 MaxSectionsPerRecord;
+ UINT64 GlobalCapabilityInitData;
+ UINT64 GlobalControlInitData;
+ UINT8 NumberOfHardwareBanks;
+ UINT8 Reserved1[7];
} EFI_ACPI_4_0_IA32_ARCHITECTURE_MACHINE_CHECK_EXCEPTION_STRUCTURE;
///
/// IA-32 Architecture Machine Check Bank Structure Definition
///
typedef struct {
- UINT8 BankNumber;
- UINT8 ClearStatusOnInitialization;
- UINT8 StatusDataFormat;
- UINT8 Reserved0;
- UINT32 ControlRegisterMsrAddress;
- UINT64 ControlInitData;
- UINT32 StatusRegisterMsrAddress;
- UINT32 AddressRegisterMsrAddress;
- UINT32 MiscRegisterMsrAddress;
+ UINT8 BankNumber;
+ UINT8 ClearStatusOnInitialization;
+ UINT8 StatusDataFormat;
+ UINT8 Reserved0;
+ UINT32 ControlRegisterMsrAddress;
+ UINT64 ControlInitData;
+ UINT32 StatusRegisterMsrAddress;
+ UINT32 AddressRegisterMsrAddress;
+ UINT32 MiscRegisterMsrAddress;
} EFI_ACPI_4_0_IA32_ARCHITECTURE_MACHINE_CHECK_ERROR_BANK_STRUCTURE;
///
/// IA-32 Architecture Machine Check Bank Structure MCA data format
///
-#define EFI_ACPI_4_0_IA32_ARCHITECTURE_MACHINE_CHECK_ERROR_DATA_FORMAT_IA32 0x00
-#define EFI_ACPI_4_0_IA32_ARCHITECTURE_MACHINE_CHECK_ERROR_DATA_FORMAT_INTEL64 0x01
-#define EFI_ACPI_4_0_IA32_ARCHITECTURE_MACHINE_CHECK_ERROR_DATA_FORMAT_AMD64 0x02
+#define EFI_ACPI_4_0_IA32_ARCHITECTURE_MACHINE_CHECK_ERROR_DATA_FORMAT_IA32 0x00
+#define EFI_ACPI_4_0_IA32_ARCHITECTURE_MACHINE_CHECK_ERROR_DATA_FORMAT_INTEL64 0x01
+#define EFI_ACPI_4_0_IA32_ARCHITECTURE_MACHINE_CHECK_ERROR_DATA_FORMAT_AMD64 0x02
//
// Hardware Error Notification types. All other values are reserved
//
-#define EFI_ACPI_4_0_HARDWARE_ERROR_NOTIFICATION_POLLED 0x00
-#define EFI_ACPI_4_0_HARDWARE_ERROR_NOTIFICATION_EXTERNAL_INTERRUPT 0x01
-#define EFI_ACPI_4_0_HARDWARE_ERROR_NOTIFICATION_LOCAL_INTERRUPT 0x02
-#define EFI_ACPI_4_0_HARDWARE_ERROR_NOTIFICATION_SCI 0x03
-#define EFI_ACPI_4_0_HARDWARE_ERROR_NOTIFICATION_NMI 0x04
+#define EFI_ACPI_4_0_HARDWARE_ERROR_NOTIFICATION_POLLED 0x00
+#define EFI_ACPI_4_0_HARDWARE_ERROR_NOTIFICATION_EXTERNAL_INTERRUPT 0x01
+#define EFI_ACPI_4_0_HARDWARE_ERROR_NOTIFICATION_LOCAL_INTERRUPT 0x02
+#define EFI_ACPI_4_0_HARDWARE_ERROR_NOTIFICATION_SCI 0x03
+#define EFI_ACPI_4_0_HARDWARE_ERROR_NOTIFICATION_NMI 0x04
///
/// Hardware Error Notification Configuration Write Enable Structure Definition
///
typedef struct {
- UINT16 Type:1;
- UINT16 PollInterval:1;
- UINT16 SwitchToPollingThresholdValue:1;
- UINT16 SwitchToPollingThresholdWindow:1;
- UINT16 ErrorThresholdValue:1;
- UINT16 ErrorThresholdWindow:1;
- UINT16 Reserved:10;
+ UINT16 Type : 1;
+ UINT16 PollInterval : 1;
+ UINT16 SwitchToPollingThresholdValue : 1;
+ UINT16 SwitchToPollingThresholdWindow : 1;
+ UINT16 ErrorThresholdValue : 1;
+ UINT16 ErrorThresholdWindow : 1;
+ UINT16 Reserved : 10;
} EFI_ACPI_4_0_HARDWARE_ERROR_NOTIFICATION_CONFIGURATION_WRITE_ENABLE_STRUCTURE;
///
/// Hardware Error Notification Structure Definition
///
typedef struct {
- UINT8 Type;
- UINT8 Length;
- EFI_ACPI_4_0_HARDWARE_ERROR_NOTIFICATION_CONFIGURATION_WRITE_ENABLE_STRUCTURE ConfigurationWriteEnable;
- UINT32 PollInterval;
- UINT32 Vector;
- UINT32 SwitchToPollingThresholdValue;
- UINT32 SwitchToPollingThresholdWindow;
- UINT32 ErrorThresholdValue;
- UINT32 ErrorThresholdWindow;
+ UINT8 Type;
+ UINT8 Length;
+ EFI_ACPI_4_0_HARDWARE_ERROR_NOTIFICATION_CONFIGURATION_WRITE_ENABLE_STRUCTURE ConfigurationWriteEnable;
+ UINT32 PollInterval;
+ UINT32 Vector;
+ UINT32 SwitchToPollingThresholdValue;
+ UINT32 SwitchToPollingThresholdWindow;
+ UINT32 ErrorThresholdValue;
+ UINT32 ErrorThresholdWindow;
} EFI_ACPI_4_0_HARDWARE_ERROR_NOTIFICATION_STRUCTURE;
///
/// IA-32 Architecture Corrected Machine Check Structure Definition
///
typedef struct {
- UINT16 Type;
- UINT16 SourceId;
- UINT8 Reserved0[2];
- UINT8 Flags;
- UINT8 Enabled;
- UINT32 NumberOfRecordsToPreAllocate;
- UINT32 MaxSectionsPerRecord;
- EFI_ACPI_4_0_HARDWARE_ERROR_NOTIFICATION_STRUCTURE NotificationStructure;
- UINT8 NumberOfHardwareBanks;
- UINT8 Reserved1[3];
+ UINT16 Type;
+ UINT16 SourceId;
+ UINT8 Reserved0[2];
+ UINT8 Flags;
+ UINT8 Enabled;
+ UINT32 NumberOfRecordsToPreAllocate;
+ UINT32 MaxSectionsPerRecord;
+ EFI_ACPI_4_0_HARDWARE_ERROR_NOTIFICATION_STRUCTURE NotificationStructure;
+ UINT8 NumberOfHardwareBanks;
+ UINT8 Reserved1[3];
} EFI_ACPI_4_0_IA32_ARCHITECTURE_CORRECTED_MACHINE_CHECK_STRUCTURE;
///
/// IA-32 Architecture NMI Error Structure Definition
///
typedef struct {
- UINT16 Type;
- UINT16 SourceId;
- UINT8 Reserved0[2];
- UINT32 NumberOfRecordsToPreAllocate;
- UINT32 MaxSectionsPerRecord;
- UINT32 MaxRawDataLength;
+ UINT16 Type;
+ UINT16 SourceId;
+ UINT8 Reserved0[2];
+ UINT32 NumberOfRecordsToPreAllocate;
+ UINT32 MaxSectionsPerRecord;
+ UINT32 MaxRawDataLength;
} EFI_ACPI_4_0_IA32_ARCHITECTURE_NMI_ERROR_STRUCTURE;
///
/// PCI Express Root Port AER Structure Definition
///
typedef struct {
- UINT16 Type;
- UINT16 SourceId;
- UINT8 Reserved0[2];
- UINT8 Flags;
- UINT8 Enabled;
- UINT32 NumberOfRecordsToPreAllocate;
- UINT32 MaxSectionsPerRecord;
- UINT32 Bus;
- UINT16 Device;
- UINT16 Function;
- UINT16 DeviceControl;
- UINT8 Reserved1[2];
- UINT32 UncorrectableErrorMask;
- UINT32 UncorrectableErrorSeverity;
- UINT32 CorrectableErrorMask;
- UINT32 AdvancedErrorCapabilitiesAndControl;
- UINT32 RootErrorCommand;
+ UINT16 Type;
+ UINT16 SourceId;
+ UINT8 Reserved0[2];
+ UINT8 Flags;
+ UINT8 Enabled;
+ UINT32 NumberOfRecordsToPreAllocate;
+ UINT32 MaxSectionsPerRecord;
+ UINT32 Bus;
+ UINT16 Device;
+ UINT16 Function;
+ UINT16 DeviceControl;
+ UINT8 Reserved1[2];
+ UINT32 UncorrectableErrorMask;
+ UINT32 UncorrectableErrorSeverity;
+ UINT32 CorrectableErrorMask;
+ UINT32 AdvancedErrorCapabilitiesAndControl;
+ UINT32 RootErrorCommand;
} EFI_ACPI_4_0_PCI_EXPRESS_ROOT_PORT_AER_STRUCTURE;
///
/// PCI Express Device AER Structure Definition
///
typedef struct {
- UINT16 Type;
- UINT16 SourceId;
- UINT8 Reserved0[2];
- UINT8 Flags;
- UINT8 Enabled;
- UINT32 NumberOfRecordsToPreAllocate;
- UINT32 MaxSectionsPerRecord;
- UINT32 Bus;
- UINT16 Device;
- UINT16 Function;
- UINT16 DeviceControl;
- UINT8 Reserved1[2];
- UINT32 UncorrectableErrorMask;
- UINT32 UncorrectableErrorSeverity;
- UINT32 CorrectableErrorMask;
- UINT32 AdvancedErrorCapabilitiesAndControl;
+ UINT16 Type;
+ UINT16 SourceId;
+ UINT8 Reserved0[2];
+ UINT8 Flags;
+ UINT8 Enabled;
+ UINT32 NumberOfRecordsToPreAllocate;
+ UINT32 MaxSectionsPerRecord;
+ UINT32 Bus;
+ UINT16 Device;
+ UINT16 Function;
+ UINT16 DeviceControl;
+ UINT8 Reserved1[2];
+ UINT32 UncorrectableErrorMask;
+ UINT32 UncorrectableErrorSeverity;
+ UINT32 CorrectableErrorMask;
+ UINT32 AdvancedErrorCapabilitiesAndControl;
} EFI_ACPI_4_0_PCI_EXPRESS_DEVICE_AER_STRUCTURE;
///
/// PCI Express Bridge AER Structure Definition
///
typedef struct {
- UINT16 Type;
- UINT16 SourceId;
- UINT8 Reserved0[2];
- UINT8 Flags;
- UINT8 Enabled;
- UINT32 NumberOfRecordsToPreAllocate;
- UINT32 MaxSectionsPerRecord;
- UINT32 Bus;
- UINT16 Device;
- UINT16 Function;
- UINT16 DeviceControl;
- UINT8 Reserved1[2];
- UINT32 UncorrectableErrorMask;
- UINT32 UncorrectableErrorSeverity;
- UINT32 CorrectableErrorMask;
- UINT32 AdvancedErrorCapabilitiesAndControl;
- UINT32 SecondaryUncorrectableErrorMask;
- UINT32 SecondaryUncorrectableErrorSeverity;
- UINT32 SecondaryAdvancedErrorCapabilitiesAndControl;
+ UINT16 Type;
+ UINT16 SourceId;
+ UINT8 Reserved0[2];
+ UINT8 Flags;
+ UINT8 Enabled;
+ UINT32 NumberOfRecordsToPreAllocate;
+ UINT32 MaxSectionsPerRecord;
+ UINT32 Bus;
+ UINT16 Device;
+ UINT16 Function;
+ UINT16 DeviceControl;
+ UINT8 Reserved1[2];
+ UINT32 UncorrectableErrorMask;
+ UINT32 UncorrectableErrorSeverity;
+ UINT32 CorrectableErrorMask;
+ UINT32 AdvancedErrorCapabilitiesAndControl;
+ UINT32 SecondaryUncorrectableErrorMask;
+ UINT32 SecondaryUncorrectableErrorSeverity;
+ UINT32 SecondaryAdvancedErrorCapabilitiesAndControl;
} EFI_ACPI_4_0_PCI_EXPRESS_BRIDGE_AER_STRUCTURE;
///
/// Generic Hardware Error Source Structure Definition
///
typedef struct {
- UINT16 Type;
- UINT16 SourceId;
- UINT16 RelatedSourceId;
- UINT8 Flags;
- UINT8 Enabled;
- UINT32 NumberOfRecordsToPreAllocate;
- UINT32 MaxSectionsPerRecord;
- UINT32 MaxRawDataLength;
- EFI_ACPI_4_0_GENERIC_ADDRESS_STRUCTURE ErrorStatusAddress;
- EFI_ACPI_4_0_HARDWARE_ERROR_NOTIFICATION_STRUCTURE NotificationStructure;
- UINT32 ErrorStatusBlockLength;
+ UINT16 Type;
+ UINT16 SourceId;
+ UINT16 RelatedSourceId;
+ UINT8 Flags;
+ UINT8 Enabled;
+ UINT32 NumberOfRecordsToPreAllocate;
+ UINT32 MaxSectionsPerRecord;
+ UINT32 MaxRawDataLength;
+ EFI_ACPI_4_0_GENERIC_ADDRESS_STRUCTURE ErrorStatusAddress;
+ EFI_ACPI_4_0_HARDWARE_ERROR_NOTIFICATION_STRUCTURE NotificationStructure;
+ UINT32 ErrorStatusBlockLength;
} EFI_ACPI_4_0_GENERIC_HARDWARE_ERROR_SOURCE_STRUCTURE;
///
/// Generic Error Status Definition
///
typedef struct {
- EFI_ACPI_4_0_ERROR_BLOCK_STATUS BlockStatus;
- UINT32 RawDataOffset;
- UINT32 RawDataLength;
- UINT32 DataLength;
- UINT32 ErrorSeverity;
+ EFI_ACPI_4_0_ERROR_BLOCK_STATUS BlockStatus;
+ UINT32 RawDataOffset;
+ UINT32 RawDataLength;
+ UINT32 DataLength;
+ UINT32 ErrorSeverity;
} EFI_ACPI_4_0_GENERIC_ERROR_STATUS_STRUCTURE;
///
/// ERST - Error Record Serialization Table
///
typedef struct {
- EFI_ACPI_DESCRIPTION_HEADER Header;
- UINT32 SerializationHeaderSize;
- UINT8 Reserved0[4];
- UINT32 InstructionEntryCount;
+ EFI_ACPI_DESCRIPTION_HEADER Header;
+ UINT32 SerializationHeaderSize;
+ UINT8 Reserved0[4];
+ UINT32 InstructionEntryCount;
} EFI_ACPI_4_0_ERROR_RECORD_SERIALIZATION_TABLE_HEADER;
///
/// ERST Version (as defined in ACPI 4.0 spec.)
///
-#define EFI_ACPI_4_0_ERROR_RECORD_SERIALIZATION_TABLE_REVISION 0x01
+#define EFI_ACPI_4_0_ERROR_RECORD_SERIALIZATION_TABLE_REVISION 0x01
///
/// ERST Serialization Actions
///
-#define EFI_ACPI_4_0_ERST_BEGIN_WRITE_OPERATION 0x00
-#define EFI_ACPI_4_0_ERST_BEGIN_READ_OPERATION 0x01
-#define EFI_ACPI_4_0_ERST_BEGIN_CLEAR_OPERATION 0x02
-#define EFI_ACPI_4_0_ERST_END_OPERATION 0x03
-#define EFI_ACPI_4_0_ERST_SET_RECORD_OFFSET 0x04
-#define EFI_ACPI_4_0_ERST_EXECUTE_OPERATION 0x05
-#define EFI_ACPI_4_0_ERST_CHECK_BUSY_STATUS 0x06
-#define EFI_ACPI_4_0_ERST_GET_COMMAND_STATUS 0x07
-#define EFI_ACPI_4_0_ERST_GET_RECORD_IDENTIFIER 0x08
-#define EFI_ACPI_4_0_ERST_SET_RECORD_IDENTIFIER 0x09
-#define EFI_ACPI_4_0_ERST_GET_RECORD_COUNT 0x0A
-#define EFI_ACPI_4_0_ERST_BEGIN_DUMMY_WRITE_OPERATION 0x0B
-#define EFI_ACPI_4_0_ERST_GET_ERROR_LOG_ADDRESS_RANGE 0x0D
-#define EFI_ACPI_4_0_ERST_GET_ERROR_LOG_ADDRESS_RANGE_LENGTH 0x0E
-#define EFI_ACPI_4_0_ERST_GET_ERROR_LOG_ADDRESS_RANGE_ATTRIBUTES 0x0F
+#define EFI_ACPI_4_0_ERST_BEGIN_WRITE_OPERATION 0x00
+#define EFI_ACPI_4_0_ERST_BEGIN_READ_OPERATION 0x01
+#define EFI_ACPI_4_0_ERST_BEGIN_CLEAR_OPERATION 0x02
+#define EFI_ACPI_4_0_ERST_END_OPERATION 0x03
+#define EFI_ACPI_4_0_ERST_SET_RECORD_OFFSET 0x04
+#define EFI_ACPI_4_0_ERST_EXECUTE_OPERATION 0x05
+#define EFI_ACPI_4_0_ERST_CHECK_BUSY_STATUS 0x06
+#define EFI_ACPI_4_0_ERST_GET_COMMAND_STATUS 0x07
+#define EFI_ACPI_4_0_ERST_GET_RECORD_IDENTIFIER 0x08
+#define EFI_ACPI_4_0_ERST_SET_RECORD_IDENTIFIER 0x09
+#define EFI_ACPI_4_0_ERST_GET_RECORD_COUNT 0x0A
+#define EFI_ACPI_4_0_ERST_BEGIN_DUMMY_WRITE_OPERATION 0x0B
+#define EFI_ACPI_4_0_ERST_GET_ERROR_LOG_ADDRESS_RANGE 0x0D
+#define EFI_ACPI_4_0_ERST_GET_ERROR_LOG_ADDRESS_RANGE_LENGTH 0x0E
+#define EFI_ACPI_4_0_ERST_GET_ERROR_LOG_ADDRESS_RANGE_ATTRIBUTES 0x0F
///
/// ERST Action Command Status
///
-#define EFI_ACPI_4_0_EINJ_STATUS_SUCCESS 0x00
-#define EFI_ACPI_4_0_EINJ_STATUS_NOT_ENOUGH_SPACE 0x01
-#define EFI_ACPI_4_0_EINJ_STATUS_HARDWARE_NOT_AVAILABLE 0x02
-#define EFI_ACPI_4_0_EINJ_STATUS_FAILED 0x03
-#define EFI_ACPI_4_0_EINJ_STATUS_RECORD_STORE_EMPTY 0x04
-#define EFI_ACPI_4_0_EINJ_STATUS_RECORD_NOT_FOUND 0x05
+#define EFI_ACPI_4_0_EINJ_STATUS_SUCCESS 0x00
+#define EFI_ACPI_4_0_EINJ_STATUS_NOT_ENOUGH_SPACE 0x01
+#define EFI_ACPI_4_0_EINJ_STATUS_HARDWARE_NOT_AVAILABLE 0x02
+#define EFI_ACPI_4_0_EINJ_STATUS_FAILED 0x03
+#define EFI_ACPI_4_0_EINJ_STATUS_RECORD_STORE_EMPTY 0x04
+#define EFI_ACPI_4_0_EINJ_STATUS_RECORD_NOT_FOUND 0x05
///
/// ERST Serialization Instructions
///
-#define EFI_ACPI_4_0_ERST_READ_REGISTER 0x00
-#define EFI_ACPI_4_0_ERST_READ_REGISTER_VALUE 0x01
-#define EFI_ACPI_4_0_ERST_WRITE_REGISTER 0x02
-#define EFI_ACPI_4_0_ERST_WRITE_REGISTER_VALUE 0x03
-#define EFI_ACPI_4_0_ERST_NOOP 0x04
-#define EFI_ACPI_4_0_ERST_LOAD_VAR1 0x05
-#define EFI_ACPI_4_0_ERST_LOAD_VAR2 0x06
-#define EFI_ACPI_4_0_ERST_STORE_VAR1 0x07
-#define EFI_ACPI_4_0_ERST_ADD 0x08
-#define EFI_ACPI_4_0_ERST_SUBTRACT 0x09
-#define EFI_ACPI_4_0_ERST_ADD_VALUE 0x0A
-#define EFI_ACPI_4_0_ERST_SUBTRACT_VALUE 0x0B
-#define EFI_ACPI_4_0_ERST_STALL 0x0C
-#define EFI_ACPI_4_0_ERST_STALL_WHILE_TRUE 0x0D
-#define EFI_ACPI_4_0_ERST_SKIP_NEXT_INSTRUCTION_IF_TRUE 0x0E
-#define EFI_ACPI_4_0_ERST_GOTO 0x0F
-#define EFI_ACPI_4_0_ERST_SET_SRC_ADDRESS_BASE 0x10
-#define EFI_ACPI_4_0_ERST_SET_DST_ADDRESS_BASE 0x11
-#define EFI_ACPI_4_0_ERST_MOVE_DATA 0x12
+#define EFI_ACPI_4_0_ERST_READ_REGISTER 0x00
+#define EFI_ACPI_4_0_ERST_READ_REGISTER_VALUE 0x01
+#define EFI_ACPI_4_0_ERST_WRITE_REGISTER 0x02
+#define EFI_ACPI_4_0_ERST_WRITE_REGISTER_VALUE 0x03
+#define EFI_ACPI_4_0_ERST_NOOP 0x04
+#define EFI_ACPI_4_0_ERST_LOAD_VAR1 0x05
+#define EFI_ACPI_4_0_ERST_LOAD_VAR2 0x06
+#define EFI_ACPI_4_0_ERST_STORE_VAR1 0x07
+#define EFI_ACPI_4_0_ERST_ADD 0x08
+#define EFI_ACPI_4_0_ERST_SUBTRACT 0x09
+#define EFI_ACPI_4_0_ERST_ADD_VALUE 0x0A
+#define EFI_ACPI_4_0_ERST_SUBTRACT_VALUE 0x0B
+#define EFI_ACPI_4_0_ERST_STALL 0x0C
+#define EFI_ACPI_4_0_ERST_STALL_WHILE_TRUE 0x0D
+#define EFI_ACPI_4_0_ERST_SKIP_NEXT_INSTRUCTION_IF_TRUE 0x0E
+#define EFI_ACPI_4_0_ERST_GOTO 0x0F
+#define EFI_ACPI_4_0_ERST_SET_SRC_ADDRESS_BASE 0x10
+#define EFI_ACPI_4_0_ERST_SET_DST_ADDRESS_BASE 0x11
+#define EFI_ACPI_4_0_ERST_MOVE_DATA 0x12
///
/// ERST Instruction Flags
///
-#define EFI_ACPI_4_0_ERST_PRESERVE_REGISTER 0x01
+#define EFI_ACPI_4_0_ERST_PRESERVE_REGISTER 0x01
///
/// ERST Serialization Instruction Entry
///
typedef struct {
- UINT8 SerializationAction;
- UINT8 Instruction;
- UINT8 Flags;
- UINT8 Reserved0;
- EFI_ACPI_4_0_GENERIC_ADDRESS_STRUCTURE RegisterRegion;
- UINT64 Value;
- UINT64 Mask;
+ UINT8 SerializationAction;
+ UINT8 Instruction;
+ UINT8 Flags;
+ UINT8 Reserved0;
+ EFI_ACPI_4_0_GENERIC_ADDRESS_STRUCTURE RegisterRegion;
+ UINT64 Value;
+ UINT64 Mask;
} EFI_ACPI_4_0_ERST_SERIALIZATION_INSTRUCTION_ENTRY;
///
/// EINJ - Error Injection Table
///
typedef struct {
- EFI_ACPI_DESCRIPTION_HEADER Header;
- UINT32 InjectionHeaderSize;
- UINT8 InjectionFlags;
- UINT8 Reserved0[3];
- UINT32 InjectionEntryCount;
+ EFI_ACPI_DESCRIPTION_HEADER Header;
+ UINT32 InjectionHeaderSize;
+ UINT8 InjectionFlags;
+ UINT8 Reserved0[3];
+ UINT32 InjectionEntryCount;
} EFI_ACPI_4_0_ERROR_INJECTION_TABLE_HEADER;
///
/// EINJ Version (as defined in ACPI 4.0 spec.)
///
-#define EFI_ACPI_4_0_ERROR_INJECTION_TABLE_REVISION 0x01
+#define EFI_ACPI_4_0_ERROR_INJECTION_TABLE_REVISION 0x01
///
/// EINJ Error Injection Actions
///
-#define EFI_ACPI_4_0_EINJ_BEGIN_INJECTION_OPERATION 0x00
-#define EFI_ACPI_4_0_EINJ_GET_TRIGGER_ERROR_ACTION_TABLE 0x01
-#define EFI_ACPI_4_0_EINJ_SET_ERROR_TYPE 0x02
-#define EFI_ACPI_4_0_EINJ_GET_ERROR_TYPE 0x03
-#define EFI_ACPI_4_0_EINJ_END_OPERATION 0x04
-#define EFI_ACPI_4_0_EINJ_EXECUTE_OPERATION 0x05
-#define EFI_ACPI_4_0_EINJ_CHECK_BUSY_STATUS 0x06
-#define EFI_ACPI_4_0_EINJ_GET_COMMAND_STATUS 0x07
-#define EFI_ACPI_4_0_EINJ_TRIGGER_ERROR 0xFF
+#define EFI_ACPI_4_0_EINJ_BEGIN_INJECTION_OPERATION 0x00
+#define EFI_ACPI_4_0_EINJ_GET_TRIGGER_ERROR_ACTION_TABLE 0x01
+#define EFI_ACPI_4_0_EINJ_SET_ERROR_TYPE 0x02
+#define EFI_ACPI_4_0_EINJ_GET_ERROR_TYPE 0x03
+#define EFI_ACPI_4_0_EINJ_END_OPERATION 0x04
+#define EFI_ACPI_4_0_EINJ_EXECUTE_OPERATION 0x05
+#define EFI_ACPI_4_0_EINJ_CHECK_BUSY_STATUS 0x06
+#define EFI_ACPI_4_0_EINJ_GET_COMMAND_STATUS 0x07
+#define EFI_ACPI_4_0_EINJ_TRIGGER_ERROR 0xFF
///
/// EINJ Action Command Status
///
-#define EFI_ACPI_4_0_EINJ_STATUS_SUCCESS 0x00
-#define EFI_ACPI_4_0_EINJ_STATUS_UNKNOWN_FAILURE 0x01
-#define EFI_ACPI_4_0_EINJ_STATUS_INVALID_ACCESS 0x02
+#define EFI_ACPI_4_0_EINJ_STATUS_SUCCESS 0x00
+#define EFI_ACPI_4_0_EINJ_STATUS_UNKNOWN_FAILURE 0x01
+#define EFI_ACPI_4_0_EINJ_STATUS_INVALID_ACCESS 0x02
///
/// EINJ Error Type Definition
///
-#define EFI_ACPI_4_0_EINJ_ERROR_PROCESSOR_CORRECTABLE (1 << 0)
-#define EFI_ACPI_4_0_EINJ_ERROR_PROCESSOR_UNCORRECTABLE_NONFATAL (1 << 1)
-#define EFI_ACPI_4_0_EINJ_ERROR_PROCESSOR_UNCORRECTABLE_FATAL (1 << 2)
-#define EFI_ACPI_4_0_EINJ_ERROR_MEMORY_CORRECTABLE (1 << 3)
-#define EFI_ACPI_4_0_EINJ_ERROR_MEMORY_UNCORRECTABLE_NONFATAL (1 << 4)
-#define EFI_ACPI_4_0_EINJ_ERROR_MEMORY_UNCORRECTABLE_FATAL (1 << 5)
-#define EFI_ACPI_4_0_EINJ_ERROR_PCI_EXPRESS_CORRECTABLE (1 << 6)
-#define EFI_ACPI_4_0_EINJ_ERROR_PCI_EXPRESS_UNCORRECTABLE_NONFATAL (1 << 7)
-#define EFI_ACPI_4_0_EINJ_ERROR_PCI_EXPRESS_UNCORRECTABLE_FATAL (1 << 8)
-#define EFI_ACPI_4_0_EINJ_ERROR_PLATFORM_CORRECTABLE (1 << 9)
-#define EFI_ACPI_4_0_EINJ_ERROR_PLATFORM_UNCORRECTABLE_NONFATAL (1 << 10)
-#define EFI_ACPI_4_0_EINJ_ERROR_PLATFORM_UNCORRECTABLE_FATAL (1 << 11)
+#define EFI_ACPI_4_0_EINJ_ERROR_PROCESSOR_CORRECTABLE (1 << 0)
+#define EFI_ACPI_4_0_EINJ_ERROR_PROCESSOR_UNCORRECTABLE_NONFATAL (1 << 1)
+#define EFI_ACPI_4_0_EINJ_ERROR_PROCESSOR_UNCORRECTABLE_FATAL (1 << 2)
+#define EFI_ACPI_4_0_EINJ_ERROR_MEMORY_CORRECTABLE (1 << 3)
+#define EFI_ACPI_4_0_EINJ_ERROR_MEMORY_UNCORRECTABLE_NONFATAL (1 << 4)
+#define EFI_ACPI_4_0_EINJ_ERROR_MEMORY_UNCORRECTABLE_FATAL (1 << 5)
+#define EFI_ACPI_4_0_EINJ_ERROR_PCI_EXPRESS_CORRECTABLE (1 << 6)
+#define EFI_ACPI_4_0_EINJ_ERROR_PCI_EXPRESS_UNCORRECTABLE_NONFATAL (1 << 7)
+#define EFI_ACPI_4_0_EINJ_ERROR_PCI_EXPRESS_UNCORRECTABLE_FATAL (1 << 8)
+#define EFI_ACPI_4_0_EINJ_ERROR_PLATFORM_CORRECTABLE (1 << 9)
+#define EFI_ACPI_4_0_EINJ_ERROR_PLATFORM_UNCORRECTABLE_NONFATAL (1 << 10)
+#define EFI_ACPI_4_0_EINJ_ERROR_PLATFORM_UNCORRECTABLE_FATAL (1 << 11)
///
/// EINJ Injection Instructions
///
-#define EFI_ACPI_4_0_EINJ_READ_REGISTER 0x00
-#define EFI_ACPI_4_0_EINJ_READ_REGISTER_VALUE 0x01
-#define EFI_ACPI_4_0_EINJ_WRITE_REGISTER 0x02
-#define EFI_ACPI_4_0_EINJ_WRITE_REGISTER_VALUE 0x03
-#define EFI_ACPI_4_0_EINJ_NOOP 0x04
+#define EFI_ACPI_4_0_EINJ_READ_REGISTER 0x00
+#define EFI_ACPI_4_0_EINJ_READ_REGISTER_VALUE 0x01
+#define EFI_ACPI_4_0_EINJ_WRITE_REGISTER 0x02
+#define EFI_ACPI_4_0_EINJ_WRITE_REGISTER_VALUE 0x03
+#define EFI_ACPI_4_0_EINJ_NOOP 0x04
///
/// EINJ Instruction Flags
///
-#define EFI_ACPI_4_0_EINJ_PRESERVE_REGISTER 0x01
+#define EFI_ACPI_4_0_EINJ_PRESERVE_REGISTER 0x01
///
/// EINJ Injection Instruction Entry
///
typedef struct {
- UINT8 InjectionAction;
- UINT8 Instruction;
- UINT8 Flags;
- UINT8 Reserved0;
- EFI_ACPI_4_0_GENERIC_ADDRESS_STRUCTURE RegisterRegion;
- UINT64 Value;
- UINT64 Mask;
+ UINT8 InjectionAction;
+ UINT8 Instruction;
+ UINT8 Flags;
+ UINT8 Reserved0;
+ EFI_ACPI_4_0_GENERIC_ADDRESS_STRUCTURE RegisterRegion;
+ UINT64 Value;
+ UINT64 Mask;
} EFI_ACPI_4_0_EINJ_INJECTION_INSTRUCTION_ENTRY;
///
/// EINJ Trigger Action Table
///
typedef struct {
- UINT32 HeaderSize;
- UINT32 Revision;
- UINT32 TableSize;
- UINT32 EntryCount;
+ UINT32 HeaderSize;
+ UINT32 Revision;
+ UINT32 TableSize;
+ UINT32 EntryCount;
} EFI_ACPI_4_0_EINJ_TRIGGER_ACTION_TABLE;
//
diff --git a/sys/contrib/edk2/Include/IndustryStandard/Acpi50.h b/sys/contrib/edk2/Include/IndustryStandard/Acpi50.h
index a9f0912e2d6a..9f24032053e4 100644
--- a/sys/contrib/edk2/Include/IndustryStandard/Acpi50.h
+++ b/sys/contrib/edk2/Include/IndustryStandard/Acpi50.h
@@ -2,7 +2,7 @@
ACPI 5.0 definitions from the ACPI Specification Revision 5.0a November 13, 2013.
Copyright (c) 2014 Hewlett-Packard Development Company, L.P.<BR>
- Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2011 - 2022, Intel Corporation. All rights reserved.<BR>
Copyright (c) 2020, ARM Ltd. All rights reserved.<BR>
SPDX-License-Identifier: BSD-2-Clause-Patent
**/
@@ -15,13 +15,23 @@
//
// Define for Descriptor
//
-#define ACPI_SMALL_FIXED_DMA_DESCRIPTOR_NAME 0x0A
-#define ACPI_LARGE_GPIO_CONNECTION_DESCRIPTOR_NAME 0x0C
-#define ACPI_LARGE_GENERIC_SERIAL_BUS_CONNECTION_DESCRIPTOR_NAME 0x0E
+#define ACPI_SMALL_FIXED_DMA_DESCRIPTOR_NAME 0x0A
+#define ACPI_LARGE_GPIO_CONNECTION_DESCRIPTOR_NAME 0x0C
+#define ACPI_LARGE_GENERIC_SERIAL_BUS_CONNECTION_DESCRIPTOR_NAME 0x0E
-#define ACPI_FIXED_DMA_DESCRIPTOR 0x55
-#define ACPI_GPIO_CONNECTION_DESCRIPTOR 0x8C
-#define ACPI_GENERIC_SERIAL_BUS_CONNECTION_DESCRIPTOR 0x8E
+#define ACPI_FIXED_DMA_DESCRIPTOR 0x55
+#define ACPI_GPIO_CONNECTION_DESCRIPTOR 0x8C
+#define ACPI_GENERIC_SERIAL_BUS_CONNECTION_DESCRIPTOR 0x8E
+
+///
+/// _PSD Revision for ACPI 5.0
+///
+#define EFI_ACPI_5_0_AML_PSD_REVISION 0
+
+///
+/// _CPC Revision for ACPI 5.0
+///
+#define EFI_ACPI_5_0_AML_CPC_REVISION 1
#pragma pack(1)
@@ -29,10 +39,10 @@
/// Generic DMA Descriptor.
///
typedef PACKED struct {
- ACPI_SMALL_RESOURCE_HEADER Header;
- UINT16 DmaRequestLine;
- UINT16 DmaChannel;
- UINT8 DmaTransferWidth;
+ ACPI_SMALL_RESOURCE_HEADER Header;
+ UINT16 DmaRequestLine;
+ UINT16 DmaChannel;
+ UINT8 DmaTransferWidth;
} EFI_ACPI_FIXED_DMA_DESCRIPTOR;
///
@@ -54,8 +64,8 @@ typedef PACKED struct {
UINT16 VendorDataLength;
} EFI_ACPI_GPIO_CONNECTION_DESCRIPTOR;
-#define EFI_ACPI_GPIO_CONNECTION_TYPE_INTERRUPT 0x0
-#define EFI_ACPI_GPIO_CONNECTION_TYPE_IO 0x1
+#define EFI_ACPI_GPIO_CONNECTION_TYPE_INTERRUPT 0x0
+#define EFI_ACPI_GPIO_CONNECTION_TYPE_IO 0x1
///
/// Serial Bus Resource Descriptor (Generic)
@@ -69,7 +79,7 @@ typedef PACKED struct {
UINT16 TypeSpecificFlags;
UINT8 TypeSpecificRevisionId;
UINT16 TypeDataLength;
-// Type specific data
+ // Type specific data
} EFI_ACPI_SERIAL_BUS_RESOURCE_DESCRIPTOR;
#define EFI_ACPI_SERIAL_BUS_RESOURCE_TYPE_I2C 0x1
@@ -141,21 +151,21 @@ typedef PACKED struct {
/// ACPI 5.0 Generic Address Space definition
///
typedef struct {
- UINT8 AddressSpaceId;
- UINT8 RegisterBitWidth;
- UINT8 RegisterBitOffset;
- UINT8 AccessSize;
- UINT64 Address;
+ UINT8 AddressSpaceId;
+ UINT8 RegisterBitWidth;
+ UINT8 RegisterBitOffset;
+ UINT8 AccessSize;
+ UINT64 Address;
} EFI_ACPI_5_0_GENERIC_ADDRESS_STRUCTURE;
//
// Generic Address Space Address IDs
//
-#define EFI_ACPI_5_0_SYSTEM_MEMORY 0
-#define EFI_ACPI_5_0_SYSTEM_IO 1
-#define EFI_ACPI_5_0_PCI_CONFIGURATION_SPACE 2
-#define EFI_ACPI_5_0_EMBEDDED_CONTROLLER 3
-#define EFI_ACPI_5_0_SMBUS 4
+#define EFI_ACPI_5_0_SYSTEM_MEMORY 0
+#define EFI_ACPI_5_0_SYSTEM_IO 1
+#define EFI_ACPI_5_0_PCI_CONFIGURATION_SPACE 2
+#define EFI_ACPI_5_0_EMBEDDED_CONTROLLER 3
+#define EFI_ACPI_5_0_SMBUS 4
#define EFI_ACPI_5_0_PLATFORM_COMMUNICATION_CHANNEL 0x0A
#define EFI_ACPI_5_0_FUNCTIONAL_FIXED_HARDWARE 0x7F
@@ -176,29 +186,29 @@ typedef struct {
/// Root System Description Pointer Structure
///
typedef struct {
- UINT64 Signature;
- UINT8 Checksum;
- UINT8 OemId[6];
- UINT8 Revision;
- UINT32 RsdtAddress;
- UINT32 Length;
- UINT64 XsdtAddress;
- UINT8 ExtendedChecksum;
- UINT8 Reserved[3];
+ UINT64 Signature;
+ UINT8 Checksum;
+ UINT8 OemId[6];
+ UINT8 Revision;
+ UINT32 RsdtAddress;
+ UINT32 Length;
+ UINT64 XsdtAddress;
+ UINT8 ExtendedChecksum;
+ UINT8 Reserved[3];
} EFI_ACPI_5_0_ROOT_SYSTEM_DESCRIPTION_POINTER;
///
/// RSD_PTR Revision (as defined in ACPI 5.0 spec.)
///
-#define EFI_ACPI_5_0_ROOT_SYSTEM_DESCRIPTION_POINTER_REVISION 0x02 ///< ACPISpec (Revision 5.0) says current value is 2
+#define EFI_ACPI_5_0_ROOT_SYSTEM_DESCRIPTION_POINTER_REVISION 0x02 ///< ACPISpec (Revision 5.0) says current value is 2
///
/// Common table header, this prefaces all ACPI tables, including FACS, but
/// excluding the RSD PTR structure
///
typedef struct {
- UINT32 Signature;
- UINT32 Length;
+ UINT32 Signature;
+ UINT32 Length;
} EFI_ACPI_5_0_COMMON_HEADER;
//
@@ -210,7 +220,7 @@ typedef struct {
///
/// RSDT Revision (as defined in ACPI 5.0 spec.)
///
-#define EFI_ACPI_5_0_ROOT_SYSTEM_DESCRIPTION_TABLE_REVISION 0x01
+#define EFI_ACPI_5_0_ROOT_SYSTEM_DESCRIPTION_TABLE_REVISION 0x01
//
// Extended System Description Table
@@ -221,66 +231,66 @@ typedef struct {
///
/// XSDT Revision (as defined in ACPI 5.0 spec.)
///
-#define EFI_ACPI_5_0_EXTENDED_SYSTEM_DESCRIPTION_TABLE_REVISION 0x01
+#define EFI_ACPI_5_0_EXTENDED_SYSTEM_DESCRIPTION_TABLE_REVISION 0x01
///
/// Fixed ACPI Description Table Structure (FADT)
///
typedef struct {
- EFI_ACPI_DESCRIPTION_HEADER Header;
- UINT32 FirmwareCtrl;
- UINT32 Dsdt;
- UINT8 Reserved0;
- UINT8 PreferredPmProfile;
- UINT16 SciInt;
- UINT32 SmiCmd;
- UINT8 AcpiEnable;
- UINT8 AcpiDisable;
- UINT8 S4BiosReq;
- UINT8 PstateCnt;
- UINT32 Pm1aEvtBlk;
- UINT32 Pm1bEvtBlk;
- UINT32 Pm1aCntBlk;
- UINT32 Pm1bCntBlk;
- UINT32 Pm2CntBlk;
- UINT32 PmTmrBlk;
- UINT32 Gpe0Blk;
- UINT32 Gpe1Blk;
- UINT8 Pm1EvtLen;
- UINT8 Pm1CntLen;
- UINT8 Pm2CntLen;
- UINT8 PmTmrLen;
- UINT8 Gpe0BlkLen;
- UINT8 Gpe1BlkLen;
- UINT8 Gpe1Base;
- UINT8 CstCnt;
- UINT16 PLvl2Lat;
- UINT16 PLvl3Lat;
- UINT16 FlushSize;
- UINT16 FlushStride;
- UINT8 DutyOffset;
- UINT8 DutyWidth;
- UINT8 DayAlrm;
- UINT8 MonAlrm;
- UINT8 Century;
- UINT16 IaPcBootArch;
- UINT8 Reserved1;
- UINT32 Flags;
- EFI_ACPI_5_0_GENERIC_ADDRESS_STRUCTURE ResetReg;
- UINT8 ResetValue;
- UINT8 Reserved2[3];
- UINT64 XFirmwareCtrl;
- UINT64 XDsdt;
- EFI_ACPI_5_0_GENERIC_ADDRESS_STRUCTURE XPm1aEvtBlk;
- EFI_ACPI_5_0_GENERIC_ADDRESS_STRUCTURE XPm1bEvtBlk;
- EFI_ACPI_5_0_GENERIC_ADDRESS_STRUCTURE XPm1aCntBlk;
- EFI_ACPI_5_0_GENERIC_ADDRESS_STRUCTURE XPm1bCntBlk;
- EFI_ACPI_5_0_GENERIC_ADDRESS_STRUCTURE XPm2CntBlk;
- EFI_ACPI_5_0_GENERIC_ADDRESS_STRUCTURE XPmTmrBlk;
- EFI_ACPI_5_0_GENERIC_ADDRESS_STRUCTURE XGpe0Blk;
- EFI_ACPI_5_0_GENERIC_ADDRESS_STRUCTURE XGpe1Blk;
- EFI_ACPI_5_0_GENERIC_ADDRESS_STRUCTURE SleepControlReg;
- EFI_ACPI_5_0_GENERIC_ADDRESS_STRUCTURE SleepStatusReg;
+ EFI_ACPI_DESCRIPTION_HEADER Header;
+ UINT32 FirmwareCtrl;
+ UINT32 Dsdt;
+ UINT8 Reserved0;
+ UINT8 PreferredPmProfile;
+ UINT16 SciInt;
+ UINT32 SmiCmd;
+ UINT8 AcpiEnable;
+ UINT8 AcpiDisable;
+ UINT8 S4BiosReq;
+ UINT8 PstateCnt;
+ UINT32 Pm1aEvtBlk;
+ UINT32 Pm1bEvtBlk;
+ UINT32 Pm1aCntBlk;
+ UINT32 Pm1bCntBlk;
+ UINT32 Pm2CntBlk;
+ UINT32 PmTmrBlk;
+ UINT32 Gpe0Blk;
+ UINT32 Gpe1Blk;
+ UINT8 Pm1EvtLen;
+ UINT8 Pm1CntLen;
+ UINT8 Pm2CntLen;
+ UINT8 PmTmrLen;
+ UINT8 Gpe0BlkLen;
+ UINT8 Gpe1BlkLen;
+ UINT8 Gpe1Base;
+ UINT8 CstCnt;
+ UINT16 PLvl2Lat;
+ UINT16 PLvl3Lat;
+ UINT16 FlushSize;
+ UINT16 FlushStride;
+ UINT8 DutyOffset;
+ UINT8 DutyWidth;
+ UINT8 DayAlrm;
+ UINT8 MonAlrm;
+ UINT8 Century;
+ UINT16 IaPcBootArch;
+ UINT8 Reserved1;
+ UINT32 Flags;
+ EFI_ACPI_5_0_GENERIC_ADDRESS_STRUCTURE ResetReg;
+ UINT8 ResetValue;
+ UINT8 Reserved2[3];
+ UINT64 XFirmwareCtrl;
+ UINT64 XDsdt;
+ EFI_ACPI_5_0_GENERIC_ADDRESS_STRUCTURE XPm1aEvtBlk;
+ EFI_ACPI_5_0_GENERIC_ADDRESS_STRUCTURE XPm1bEvtBlk;
+ EFI_ACPI_5_0_GENERIC_ADDRESS_STRUCTURE XPm1aCntBlk;
+ EFI_ACPI_5_0_GENERIC_ADDRESS_STRUCTURE XPm1bCntBlk;
+ EFI_ACPI_5_0_GENERIC_ADDRESS_STRUCTURE XPm2CntBlk;
+ EFI_ACPI_5_0_GENERIC_ADDRESS_STRUCTURE XPmTmrBlk;
+ EFI_ACPI_5_0_GENERIC_ADDRESS_STRUCTURE XGpe0Blk;
+ EFI_ACPI_5_0_GENERIC_ADDRESS_STRUCTURE XGpe1Blk;
+ EFI_ACPI_5_0_GENERIC_ADDRESS_STRUCTURE SleepControlReg;
+ EFI_ACPI_5_0_GENERIC_ADDRESS_STRUCTURE SleepStatusReg;
} EFI_ACPI_5_0_FIXED_ACPI_DESCRIPTION_TABLE;
///
@@ -305,55 +315,55 @@ typedef struct {
// Fixed ACPI Description Table Boot Architecture Flags
// All other bits are reserved and must be set to 0.
//
-#define EFI_ACPI_5_0_LEGACY_DEVICES BIT0
-#define EFI_ACPI_5_0_8042 BIT1
-#define EFI_ACPI_5_0_VGA_NOT_PRESENT BIT2
-#define EFI_ACPI_5_0_MSI_NOT_SUPPORTED BIT3
-#define EFI_ACPI_5_0_PCIE_ASPM_CONTROLS BIT4
-#define EFI_ACPI_5_0_CMOS_RTC_NOT_PRESENT BIT5
+#define EFI_ACPI_5_0_LEGACY_DEVICES BIT0
+#define EFI_ACPI_5_0_8042 BIT1
+#define EFI_ACPI_5_0_VGA_NOT_PRESENT BIT2
+#define EFI_ACPI_5_0_MSI_NOT_SUPPORTED BIT3
+#define EFI_ACPI_5_0_PCIE_ASPM_CONTROLS BIT4
+#define EFI_ACPI_5_0_CMOS_RTC_NOT_PRESENT BIT5
//
// Fixed ACPI Description Table Fixed Feature Flags
// All other bits are reserved and must be set to 0.
//
-#define EFI_ACPI_5_0_WBINVD BIT0
-#define EFI_ACPI_5_0_WBINVD_FLUSH BIT1
-#define EFI_ACPI_5_0_PROC_C1 BIT2
-#define EFI_ACPI_5_0_P_LVL2_UP BIT3
-#define EFI_ACPI_5_0_PWR_BUTTON BIT4
-#define EFI_ACPI_5_0_SLP_BUTTON BIT5
-#define EFI_ACPI_5_0_FIX_RTC BIT6
-#define EFI_ACPI_5_0_RTC_S4 BIT7
-#define EFI_ACPI_5_0_TMR_VAL_EXT BIT8
-#define EFI_ACPI_5_0_DCK_CAP BIT9
-#define EFI_ACPI_5_0_RESET_REG_SUP BIT10
-#define EFI_ACPI_5_0_SEALED_CASE BIT11
-#define EFI_ACPI_5_0_HEADLESS BIT12
-#define EFI_ACPI_5_0_CPU_SW_SLP BIT13
-#define EFI_ACPI_5_0_PCI_EXP_WAK BIT14
-#define EFI_ACPI_5_0_USE_PLATFORM_CLOCK BIT15
-#define EFI_ACPI_5_0_S4_RTC_STS_VALID BIT16
-#define EFI_ACPI_5_0_REMOTE_POWER_ON_CAPABLE BIT17
-#define EFI_ACPI_5_0_FORCE_APIC_CLUSTER_MODEL BIT18
-#define EFI_ACPI_5_0_FORCE_APIC_PHYSICAL_DESTINATION_MODE BIT19
-#define EFI_ACPI_5_0_HW_REDUCED_ACPI BIT20
-#define EFI_ACPI_5_0_LOW_POWER_S0_IDLE_CAPABLE BIT21
+#define EFI_ACPI_5_0_WBINVD BIT0
+#define EFI_ACPI_5_0_WBINVD_FLUSH BIT1
+#define EFI_ACPI_5_0_PROC_C1 BIT2
+#define EFI_ACPI_5_0_P_LVL2_UP BIT3
+#define EFI_ACPI_5_0_PWR_BUTTON BIT4
+#define EFI_ACPI_5_0_SLP_BUTTON BIT5
+#define EFI_ACPI_5_0_FIX_RTC BIT6
+#define EFI_ACPI_5_0_RTC_S4 BIT7
+#define EFI_ACPI_5_0_TMR_VAL_EXT BIT8
+#define EFI_ACPI_5_0_DCK_CAP BIT9
+#define EFI_ACPI_5_0_RESET_REG_SUP BIT10
+#define EFI_ACPI_5_0_SEALED_CASE BIT11
+#define EFI_ACPI_5_0_HEADLESS BIT12
+#define EFI_ACPI_5_0_CPU_SW_SLP BIT13
+#define EFI_ACPI_5_0_PCI_EXP_WAK BIT14
+#define EFI_ACPI_5_0_USE_PLATFORM_CLOCK BIT15
+#define EFI_ACPI_5_0_S4_RTC_STS_VALID BIT16
+#define EFI_ACPI_5_0_REMOTE_POWER_ON_CAPABLE BIT17
+#define EFI_ACPI_5_0_FORCE_APIC_CLUSTER_MODEL BIT18
+#define EFI_ACPI_5_0_FORCE_APIC_PHYSICAL_DESTINATION_MODE BIT19
+#define EFI_ACPI_5_0_HW_REDUCED_ACPI BIT20
+#define EFI_ACPI_5_0_LOW_POWER_S0_IDLE_CAPABLE BIT21
///
/// Firmware ACPI Control Structure
///
typedef struct {
- UINT32 Signature;
- UINT32 Length;
- UINT32 HardwareSignature;
- UINT32 FirmwareWakingVector;
- UINT32 GlobalLock;
- UINT32 Flags;
- UINT64 XFirmwareWakingVector;
- UINT8 Version;
- UINT8 Reserved0[3];
- UINT32 OspmFlags;
- UINT8 Reserved1[24];
+ UINT32 Signature;
+ UINT32 Length;
+ UINT32 HardwareSignature;
+ UINT32 FirmwareWakingVector;
+ UINT32 GlobalLock;
+ UINT32 Flags;
+ UINT64 XFirmwareWakingVector;
+ UINT8 Version;
+ UINT8 Reserved0[3];
+ UINT32 OspmFlags;
+ UINT8 Reserved1[24];
} EFI_ACPI_5_0_FIRMWARE_ACPI_CONTROL_STRUCTURE;
///
@@ -365,14 +375,14 @@ typedef struct {
/// Firmware Control Structure Feature Flags
/// All other bits are reserved and must be set to 0.
///
-#define EFI_ACPI_5_0_S4BIOS_F BIT0
-#define EFI_ACPI_5_0_64BIT_WAKE_SUPPORTED_F BIT1
+#define EFI_ACPI_5_0_S4BIOS_F BIT0
+#define EFI_ACPI_5_0_64BIT_WAKE_SUPPORTED_F BIT1
///
/// OSPM Enabled Firmware Control Structure Flags
/// All other bits are reserved and must be set to 0.
///
-#define EFI_ACPI_5_0_OSPM_64BIT_WAKE_F BIT0
+#define EFI_ACPI_5_0_OSPM_64BIT_WAKE_F BIT0
//
// Differentiated System Description Table,
@@ -381,29 +391,29 @@ typedef struct {
// no definition needed as they are common description table header, the same with
// EFI_ACPI_DESCRIPTION_HEADER, followed by a definition block.
//
-#define EFI_ACPI_5_0_DIFFERENTIATED_SYSTEM_DESCRIPTION_TABLE_REVISION 0x02
-#define EFI_ACPI_5_0_SECONDARY_SYSTEM_DESCRIPTION_TABLE_REVISION 0x02
+#define EFI_ACPI_5_0_DIFFERENTIATED_SYSTEM_DESCRIPTION_TABLE_REVISION 0x02
+#define EFI_ACPI_5_0_SECONDARY_SYSTEM_DESCRIPTION_TABLE_REVISION 0x02
///
/// Multiple APIC Description Table header definition. The rest of the table
/// must be defined in a platform specific manner.
///
typedef struct {
- EFI_ACPI_DESCRIPTION_HEADER Header;
- UINT32 LocalApicAddress;
- UINT32 Flags;
+ EFI_ACPI_DESCRIPTION_HEADER Header;
+ UINT32 LocalApicAddress;
+ UINT32 Flags;
} EFI_ACPI_5_0_MULTIPLE_APIC_DESCRIPTION_TABLE_HEADER;
///
/// MADT Revision (as defined in ACPI 5.0 spec.)
///
-#define EFI_ACPI_5_0_MULTIPLE_APIC_DESCRIPTION_TABLE_REVISION 0x03
+#define EFI_ACPI_5_0_MULTIPLE_APIC_DESCRIPTION_TABLE_REVISION 0x03
///
/// Multiple APIC Flags
/// All other bits are reserved and must be set to 0.
///
-#define EFI_ACPI_5_0_PCAT_COMPAT BIT0
+#define EFI_ACPI_5_0_PCAT_COMPAT BIT0
//
// Multiple APIC Description Table APIC structure types
@@ -432,57 +442,57 @@ typedef struct {
/// Processor Local APIC Structure Definition
///
typedef struct {
- UINT8 Type;
- UINT8 Length;
- UINT8 AcpiProcessorId;
- UINT8 ApicId;
- UINT32 Flags;
+ UINT8 Type;
+ UINT8 Length;
+ UINT8 AcpiProcessorId;
+ UINT8 ApicId;
+ UINT32 Flags;
} EFI_ACPI_5_0_PROCESSOR_LOCAL_APIC_STRUCTURE;
///
/// Local APIC Flags. All other bits are reserved and must be 0.
///
-#define EFI_ACPI_5_0_LOCAL_APIC_ENABLED BIT0
+#define EFI_ACPI_5_0_LOCAL_APIC_ENABLED BIT0
///
/// IO APIC Structure
///
typedef struct {
- UINT8 Type;
- UINT8 Length;
- UINT8 IoApicId;
- UINT8 Reserved;
- UINT32 IoApicAddress;
- UINT32 GlobalSystemInterruptBase;
+ UINT8 Type;
+ UINT8 Length;
+ UINT8 IoApicId;
+ UINT8 Reserved;
+ UINT32 IoApicAddress;
+ UINT32 GlobalSystemInterruptBase;
} EFI_ACPI_5_0_IO_APIC_STRUCTURE;
///
/// Interrupt Source Override Structure
///
typedef struct {
- UINT8 Type;
- UINT8 Length;
- UINT8 Bus;
- UINT8 Source;
- UINT32 GlobalSystemInterrupt;
- UINT16 Flags;
+ UINT8 Type;
+ UINT8 Length;
+ UINT8 Bus;
+ UINT8 Source;
+ UINT32 GlobalSystemInterrupt;
+ UINT16 Flags;
} EFI_ACPI_5_0_INTERRUPT_SOURCE_OVERRIDE_STRUCTURE;
///
/// Platform Interrupt Sources Structure Definition
///
typedef struct {
- UINT8 Type;
- UINT8 Length;
- UINT16 Flags;
- UINT8 InterruptType;
- UINT8 ProcessorId;
- UINT8 ProcessorEid;
- UINT8 IoSapicVector;
- UINT32 GlobalSystemInterrupt;
- UINT32 PlatformInterruptSourceFlags;
- UINT8 CpeiProcessorOverride;
- UINT8 Reserved[31];
+ UINT8 Type;
+ UINT8 Length;
+ UINT16 Flags;
+ UINT8 InterruptType;
+ UINT8 ProcessorId;
+ UINT8 ProcessorEid;
+ UINT8 IoSapicVector;
+ UINT32 GlobalSystemInterrupt;
+ UINT32 PlatformInterruptSourceFlags;
+ UINT8 CpeiProcessorOverride;
+ UINT8 Reserved[31];
} EFI_ACPI_5_0_PLATFORM_INTERRUPT_APIC_STRUCTURE;
//
@@ -496,43 +506,43 @@ typedef struct {
/// Non-Maskable Interrupt Source Structure
///
typedef struct {
- UINT8 Type;
- UINT8 Length;
- UINT16 Flags;
- UINT32 GlobalSystemInterrupt;
+ UINT8 Type;
+ UINT8 Length;
+ UINT16 Flags;
+ UINT32 GlobalSystemInterrupt;
} EFI_ACPI_5_0_NON_MASKABLE_INTERRUPT_SOURCE_STRUCTURE;
///
/// Local APIC NMI Structure
///
typedef struct {
- UINT8 Type;
- UINT8 Length;
- UINT8 AcpiProcessorId;
- UINT16 Flags;
- UINT8 LocalApicLint;
+ UINT8 Type;
+ UINT8 Length;
+ UINT8 AcpiProcessorId;
+ UINT16 Flags;
+ UINT8 LocalApicLint;
} EFI_ACPI_5_0_LOCAL_APIC_NMI_STRUCTURE;
///
/// Local APIC Address Override Structure
///
typedef struct {
- UINT8 Type;
- UINT8 Length;
- UINT16 Reserved;
- UINT64 LocalApicAddress;
+ UINT8 Type;
+ UINT8 Length;
+ UINT16 Reserved;
+ UINT64 LocalApicAddress;
} EFI_ACPI_5_0_LOCAL_APIC_ADDRESS_OVERRIDE_STRUCTURE;
///
/// IO SAPIC Structure
///
typedef struct {
- UINT8 Type;
- UINT8 Length;
- UINT8 IoApicId;
- UINT8 Reserved;
- UINT32 GlobalSystemInterruptBase;
- UINT64 IoSapicAddress;
+ UINT8 Type;
+ UINT8 Length;
+ UINT8 IoApicId;
+ UINT8 Reserved;
+ UINT32 GlobalSystemInterruptBase;
+ UINT64 IoSapicAddress;
} EFI_ACPI_5_0_IO_SAPIC_STRUCTURE;
///
@@ -540,110 +550,110 @@ typedef struct {
/// This struct followed by a null-terminated ASCII string - ACPI Processor UID String
///
typedef struct {
- UINT8 Type;
- UINT8 Length;
- UINT8 AcpiProcessorId;
- UINT8 LocalSapicId;
- UINT8 LocalSapicEid;
- UINT8 Reserved[3];
- UINT32 Flags;
- UINT32 ACPIProcessorUIDValue;
+ UINT8 Type;
+ UINT8 Length;
+ UINT8 AcpiProcessorId;
+ UINT8 LocalSapicId;
+ UINT8 LocalSapicEid;
+ UINT8 Reserved[3];
+ UINT32 Flags;
+ UINT32 ACPIProcessorUIDValue;
} EFI_ACPI_5_0_PROCESSOR_LOCAL_SAPIC_STRUCTURE;
///
/// Platform Interrupt Sources Structure
///
typedef struct {
- UINT8 Type;
- UINT8 Length;
- UINT16 Flags;
- UINT8 InterruptType;
- UINT8 ProcessorId;
- UINT8 ProcessorEid;
- UINT8 IoSapicVector;
- UINT32 GlobalSystemInterrupt;
- UINT32 PlatformInterruptSourceFlags;
+ UINT8 Type;
+ UINT8 Length;
+ UINT16 Flags;
+ UINT8 InterruptType;
+ UINT8 ProcessorId;
+ UINT8 ProcessorEid;
+ UINT8 IoSapicVector;
+ UINT32 GlobalSystemInterrupt;
+ UINT32 PlatformInterruptSourceFlags;
} EFI_ACPI_5_0_PLATFORM_INTERRUPT_SOURCES_STRUCTURE;
///
/// Platform Interrupt Source Flags.
/// All other bits are reserved and must be set to 0.
///
-#define EFI_ACPI_5_0_CPEI_PROCESSOR_OVERRIDE BIT0
+#define EFI_ACPI_5_0_CPEI_PROCESSOR_OVERRIDE BIT0
///
/// Processor Local x2APIC Structure Definition
///
typedef struct {
- UINT8 Type;
- UINT8 Length;
- UINT8 Reserved[2];
- UINT32 X2ApicId;
- UINT32 Flags;
- UINT32 AcpiProcessorUid;
+ UINT8 Type;
+ UINT8 Length;
+ UINT8 Reserved[2];
+ UINT32 X2ApicId;
+ UINT32 Flags;
+ UINT32 AcpiProcessorUid;
} EFI_ACPI_5_0_PROCESSOR_LOCAL_X2APIC_STRUCTURE;
///
/// Local x2APIC NMI Structure
///
typedef struct {
- UINT8 Type;
- UINT8 Length;
- UINT16 Flags;
- UINT32 AcpiProcessorUid;
- UINT8 LocalX2ApicLint;
- UINT8 Reserved[3];
+ UINT8 Type;
+ UINT8 Length;
+ UINT16 Flags;
+ UINT32 AcpiProcessorUid;
+ UINT8 LocalX2ApicLint;
+ UINT8 Reserved[3];
} EFI_ACPI_5_0_LOCAL_X2APIC_NMI_STRUCTURE;
///
/// GIC Structure
///
typedef struct {
- UINT8 Type;
- UINT8 Length;
- UINT16 Reserved;
- UINT32 GicId;
- UINT32 AcpiProcessorUid;
- UINT32 Flags;
- UINT32 ParkingProtocolVersion;
- UINT32 PerformanceInterruptGsiv;
- UINT64 ParkedAddress;
- UINT64 PhysicalBaseAddress;
+ UINT8 Type;
+ UINT8 Length;
+ UINT16 Reserved;
+ UINT32 GicId;
+ UINT32 AcpiProcessorUid;
+ UINT32 Flags;
+ UINT32 ParkingProtocolVersion;
+ UINT32 PerformanceInterruptGsiv;
+ UINT64 ParkedAddress;
+ UINT64 PhysicalBaseAddress;
} EFI_ACPI_5_0_GIC_STRUCTURE;
///
/// GIC Flags. All other bits are reserved and must be 0.
///
-#define EFI_ACPI_5_0_GIC_ENABLED BIT0
-#define EFI_ACPI_5_0_PERFORMANCE_INTERRUPT_MODEL BIT1
+#define EFI_ACPI_5_0_GIC_ENABLED BIT0
+#define EFI_ACPI_5_0_PERFORMANCE_INTERRUPT_MODEL BIT1
///
/// GIC Distributor Structure
///
typedef struct {
- UINT8 Type;
- UINT8 Length;
- UINT16 Reserved1;
- UINT32 GicId;
- UINT64 PhysicalBaseAddress;
- UINT32 SystemVectorBase;
- UINT32 Reserved2;
+ UINT8 Type;
+ UINT8 Length;
+ UINT16 Reserved1;
+ UINT32 GicId;
+ UINT64 PhysicalBaseAddress;
+ UINT32 SystemVectorBase;
+ UINT32 Reserved2;
} EFI_ACPI_5_0_GIC_DISTRIBUTOR_STRUCTURE;
///
/// Smart Battery Description Table (SBST)
///
typedef struct {
- EFI_ACPI_DESCRIPTION_HEADER Header;
- UINT32 WarningEnergyLevel;
- UINT32 LowEnergyLevel;
- UINT32 CriticalEnergyLevel;
+ EFI_ACPI_DESCRIPTION_HEADER Header;
+ UINT32 WarningEnergyLevel;
+ UINT32 LowEnergyLevel;
+ UINT32 CriticalEnergyLevel;
} EFI_ACPI_5_0_SMART_BATTERY_DESCRIPTION_TABLE;
///
/// SBST Version (as defined in ACPI 5.0 spec.)
///
-#define EFI_ACPI_5_0_SMART_BATTERY_DESCRIPTION_TABLE_REVISION 0x01
+#define EFI_ACPI_5_0_SMART_BATTERY_DESCRIPTION_TABLE_REVISION 0x01
///
/// Embedded Controller Boot Resources Table (ECDT)
@@ -651,11 +661,11 @@ typedef struct {
/// a fully qualified reference to the name space object.
///
typedef struct {
- EFI_ACPI_DESCRIPTION_HEADER Header;
- EFI_ACPI_5_0_GENERIC_ADDRESS_STRUCTURE EcControl;
- EFI_ACPI_5_0_GENERIC_ADDRESS_STRUCTURE EcData;
- UINT32 Uid;
- UINT8 GpeBit;
+ EFI_ACPI_DESCRIPTION_HEADER Header;
+ EFI_ACPI_5_0_GENERIC_ADDRESS_STRUCTURE EcControl;
+ EFI_ACPI_5_0_GENERIC_ADDRESS_STRUCTURE EcData;
+ UINT32 Uid;
+ UINT8 GpeBit;
} EFI_ACPI_5_0_EMBEDDED_CONTROLLER_BOOT_RESOURCES_TABLE;
///
@@ -668,9 +678,9 @@ typedef struct {
/// must be defined in a platform specific manner.
///
typedef struct {
- EFI_ACPI_DESCRIPTION_HEADER Header;
- UINT32 Reserved1; ///< Must be set to 1
- UINT64 Reserved2;
+ EFI_ACPI_DESCRIPTION_HEADER Header;
+ UINT32 Reserved1; ///< Must be set to 1
+ UINT64 Reserved2;
} EFI_ACPI_5_0_SYSTEM_RESOURCE_AFFINITY_TABLE_HEADER;
///
@@ -691,57 +701,57 @@ typedef struct {
/// Processor Local APIC/SAPIC Affinity Structure Definition
///
typedef struct {
- UINT8 Type;
- UINT8 Length;
- UINT8 ProximityDomain7To0;
- UINT8 ApicId;
- UINT32 Flags;
- UINT8 LocalSapicEid;
- UINT8 ProximityDomain31To8[3];
- UINT32 ClockDomain;
+ UINT8 Type;
+ UINT8 Length;
+ UINT8 ProximityDomain7To0;
+ UINT8 ApicId;
+ UINT32 Flags;
+ UINT8 LocalSapicEid;
+ UINT8 ProximityDomain31To8[3];
+ UINT32 ClockDomain;
} EFI_ACPI_5_0_PROCESSOR_LOCAL_APIC_SAPIC_AFFINITY_STRUCTURE;
///
/// Local APIC/SAPIC Flags. All other bits are reserved and must be 0.
///
-#define EFI_ACPI_5_0_PROCESSOR_LOCAL_APIC_SAPIC_ENABLED (1 << 0)
+#define EFI_ACPI_5_0_PROCESSOR_LOCAL_APIC_SAPIC_ENABLED (1 << 0)
///
/// Memory Affinity Structure Definition
///
typedef struct {
- UINT8 Type;
- UINT8 Length;
- UINT32 ProximityDomain;
- UINT16 Reserved1;
- UINT32 AddressBaseLow;
- UINT32 AddressBaseHigh;
- UINT32 LengthLow;
- UINT32 LengthHigh;
- UINT32 Reserved2;
- UINT32 Flags;
- UINT64 Reserved3;
+ UINT8 Type;
+ UINT8 Length;
+ UINT32 ProximityDomain;
+ UINT16 Reserved1;
+ UINT32 AddressBaseLow;
+ UINT32 AddressBaseHigh;
+ UINT32 LengthLow;
+ UINT32 LengthHigh;
+ UINT32 Reserved2;
+ UINT32 Flags;
+ UINT64 Reserved3;
} EFI_ACPI_5_0_MEMORY_AFFINITY_STRUCTURE;
//
// Memory Flags. All other bits are reserved and must be 0.
//
-#define EFI_ACPI_5_0_MEMORY_ENABLED (1 << 0)
-#define EFI_ACPI_5_0_MEMORY_HOT_PLUGGABLE (1 << 1)
-#define EFI_ACPI_5_0_MEMORY_NONVOLATILE (1 << 2)
+#define EFI_ACPI_5_0_MEMORY_ENABLED (1 << 0)
+#define EFI_ACPI_5_0_MEMORY_HOT_PLUGGABLE (1 << 1)
+#define EFI_ACPI_5_0_MEMORY_NONVOLATILE (1 << 2)
///
/// Processor Local x2APIC Affinity Structure Definition
///
typedef struct {
- UINT8 Type;
- UINT8 Length;
- UINT8 Reserved1[2];
- UINT32 ProximityDomain;
- UINT32 X2ApicId;
- UINT32 Flags;
- UINT32 ClockDomain;
- UINT8 Reserved2[4];
+ UINT8 Type;
+ UINT8 Length;
+ UINT8 Reserved1[2];
+ UINT32 ProximityDomain;
+ UINT32 X2ApicId;
+ UINT32 Flags;
+ UINT32 ClockDomain;
+ UINT8 Reserved2[4];
} EFI_ACPI_5_0_PROCESSOR_LOCAL_X2APIC_AFFINITY_STRUCTURE;
///
@@ -749,8 +759,8 @@ typedef struct {
/// The rest of the table is a matrix.
///
typedef struct {
- EFI_ACPI_DESCRIPTION_HEADER Header;
- UINT64 NumberOfSystemLocalities;
+ EFI_ACPI_DESCRIPTION_HEADER Header;
+ UINT64 NumberOfSystemLocalities;
} EFI_ACPI_5_0_SYSTEM_LOCALITY_DISTANCE_INFORMATION_TABLE_HEADER;
///
@@ -762,14 +772,14 @@ typedef struct {
/// Corrected Platform Error Polling Table (CPEP)
///
typedef struct {
- EFI_ACPI_DESCRIPTION_HEADER Header;
- UINT8 Reserved[8];
+ EFI_ACPI_DESCRIPTION_HEADER Header;
+ UINT8 Reserved[8];
} EFI_ACPI_5_0_CORRECTED_PLATFORM_ERROR_POLLING_TABLE_HEADER;
///
/// CPEP Version (as defined in ACPI 5.0 spec.)
///
-#define EFI_ACPI_5_0_CORRECTED_PLATFORM_ERROR_POLLING_TABLE_REVISION 0x01
+#define EFI_ACPI_5_0_CORRECTED_PLATFORM_ERROR_POLLING_TABLE_REVISION 0x01
//
// CPEP processor structure types.
@@ -780,66 +790,66 @@ typedef struct {
/// Corrected Platform Error Polling Processor Structure Definition
///
typedef struct {
- UINT8 Type;
- UINT8 Length;
- UINT8 ProcessorId;
- UINT8 ProcessorEid;
- UINT32 PollingInterval;
+ UINT8 Type;
+ UINT8 Length;
+ UINT8 ProcessorId;
+ UINT8 ProcessorEid;
+ UINT32 PollingInterval;
} EFI_ACPI_5_0_CPEP_PROCESSOR_APIC_SAPIC_STRUCTURE;
///
/// Maximum System Characteristics Table (MSCT)
///
typedef struct {
- EFI_ACPI_DESCRIPTION_HEADER Header;
- UINT32 OffsetProxDomInfo;
- UINT32 MaximumNumberOfProximityDomains;
- UINT32 MaximumNumberOfClockDomains;
- UINT64 MaximumPhysicalAddress;
+ EFI_ACPI_DESCRIPTION_HEADER Header;
+ UINT32 OffsetProxDomInfo;
+ UINT32 MaximumNumberOfProximityDomains;
+ UINT32 MaximumNumberOfClockDomains;
+ UINT64 MaximumPhysicalAddress;
} EFI_ACPI_5_0_MAXIMUM_SYSTEM_CHARACTERISTICS_TABLE_HEADER;
///
/// MSCT Version (as defined in ACPI 5.0 spec.)
///
-#define EFI_ACPI_5_0_MAXIMUM_SYSTEM_CHARACTERISTICS_TABLE_REVISION 0x01
+#define EFI_ACPI_5_0_MAXIMUM_SYSTEM_CHARACTERISTICS_TABLE_REVISION 0x01
///
/// Maximum Proximity Domain Information Structure Definition
///
typedef struct {
- UINT8 Revision;
- UINT8 Length;
- UINT32 ProximityDomainRangeLow;
- UINT32 ProximityDomainRangeHigh;
- UINT32 MaximumProcessorCapacity;
- UINT64 MaximumMemoryCapacity;
+ UINT8 Revision;
+ UINT8 Length;
+ UINT32 ProximityDomainRangeLow;
+ UINT32 ProximityDomainRangeHigh;
+ UINT32 MaximumProcessorCapacity;
+ UINT64 MaximumMemoryCapacity;
} EFI_ACPI_5_0_MAXIMUM_PROXIMITY_DOMAIN_INFORMATION_STRUCTURE;
///
/// ACPI RAS Feature Table definition.
///
typedef struct {
- EFI_ACPI_DESCRIPTION_HEADER Header;
- UINT8 PlatformCommunicationChannelIdentifier[12];
+ EFI_ACPI_DESCRIPTION_HEADER Header;
+ UINT8 PlatformCommunicationChannelIdentifier[12];
} EFI_ACPI_5_0_RAS_FEATURE_TABLE;
///
/// RASF Version (as defined in ACPI 5.0 spec.)
///
-#define EFI_ACPI_5_0_RAS_FEATURE_TABLE_REVISION 0x01
+#define EFI_ACPI_5_0_RAS_FEATURE_TABLE_REVISION 0x01
///
/// ACPI RASF Platform Communication Channel Shared Memory Region definition.
///
typedef struct {
- UINT32 Signature;
- UINT16 Command;
- UINT16 Status;
- UINT16 Version;
- UINT8 RASCapabilities[16];
- UINT8 SetRASCapabilities[16];
- UINT16 NumberOfRASFParameterBlocks;
- UINT32 SetRASCapabilitiesStatus;
+ UINT32 Signature;
+ UINT16 Command;
+ UINT16 Status;
+ UINT16 Version;
+ UINT8 RASCapabilities[16];
+ UINT8 SetRASCapabilities[16];
+ UINT16 NumberOfRASFParameterBlocks;
+ UINT32 SetRASCapabilitiesStatus;
} EFI_ACPI_5_0_RASF_PLATFORM_COMMUNICATION_CHANNEL_SHARED_MEMORY_REGION;
///
@@ -857,52 +867,52 @@ typedef struct {
/// ACPI RASF Parameter Block structure for PATROL_SCRUB
///
typedef struct {
- UINT16 Type;
- UINT16 Version;
- UINT16 Length;
- UINT16 PatrolScrubCommand;
- UINT64 RequestedAddressRange[2];
- UINT64 ActualAddressRange[2];
- UINT16 Flags;
- UINT8 RequestedSpeed;
+ UINT16 Type;
+ UINT16 Version;
+ UINT16 Length;
+ UINT16 PatrolScrubCommand;
+ UINT64 RequestedAddressRange[2];
+ UINT64 ActualAddressRange[2];
+ UINT16 Flags;
+ UINT8 RequestedSpeed;
} EFI_ACPI_5_0_RASF_PATROL_SCRUB_PLATFORM_BLOCK_STRUCTURE;
///
/// ACPI RASF Patrol Scrub command
///
-#define EFI_ACPI_5_0_RASF_PATROL_SCRUB_COMMAND_GET_PATROL_PARAMETERS 0x01
-#define EFI_ACPI_5_0_RASF_PATROL_SCRUB_COMMAND_START_PATROL_SCRUBBER 0x02
-#define EFI_ACPI_5_0_RASF_PATROL_SCRUB_COMMAND_STOP_PATROL_SCRUBBER 0x03
+#define EFI_ACPI_5_0_RASF_PATROL_SCRUB_COMMAND_GET_PATROL_PARAMETERS 0x01
+#define EFI_ACPI_5_0_RASF_PATROL_SCRUB_COMMAND_START_PATROL_SCRUBBER 0x02
+#define EFI_ACPI_5_0_RASF_PATROL_SCRUB_COMMAND_STOP_PATROL_SCRUBBER 0x03
///
/// Memory Power State Table definition.
///
typedef struct {
- EFI_ACPI_DESCRIPTION_HEADER Header;
- UINT8 PlatformCommunicationChannelIdentifier;
- UINT8 Reserved[3];
-// Memory Power Node Structure
-// Memory Power State Characteristics
+ EFI_ACPI_DESCRIPTION_HEADER Header;
+ UINT8 PlatformCommunicationChannelIdentifier;
+ UINT8 Reserved[3];
+ // Memory Power Node Structure
+ // Memory Power State Characteristics
} EFI_ACPI_5_0_MEMORY_POWER_STATUS_TABLE;
///
/// MPST Version (as defined in ACPI 5.0 spec.)
///
-#define EFI_ACPI_5_0_MEMORY_POWER_STATE_TABLE_REVISION 0x01
+#define EFI_ACPI_5_0_MEMORY_POWER_STATE_TABLE_REVISION 0x01
///
/// MPST Platform Communication Channel Shared Memory Region definition.
///
typedef struct {
- UINT32 Signature;
- UINT16 Command;
- UINT16 Status;
- UINT32 MemoryPowerCommandRegister;
- UINT32 MemoryPowerStatusRegister;
- UINT32 PowerStateId;
- UINT32 MemoryPowerNodeId;
- UINT64 MemoryEnergyConsumed;
- UINT64 ExpectedAveragePowerComsuned;
+ UINT32 Signature;
+ UINT16 Command;
+ UINT16 Status;
+ UINT32 MemoryPowerCommandRegister;
+ UINT32 MemoryPowerStatusRegister;
+ UINT32 PowerStateId;
+ UINT32 MemoryPowerNodeId;
+ UINT64 MemoryEnergyConsumed;
+ UINT64 ExpectedAveragePowerComsuned;
} EFI_ACPI_5_0_MPST_PLATFORM_COMMUNICATION_CHANNEL_SHARED_MEMORY_REGION;
///
@@ -913,188 +923,188 @@ typedef struct {
///
/// ACPI MPST Memory Power command
///
-#define EFI_ACPI_5_0_MPST_MEMORY_POWER_COMMAND_GET_MEMORY_POWER_STATE 0x01
-#define EFI_ACPI_5_0_MPST_MEMORY_POWER_COMMAND_SET_MEMORY_POWER_STATE 0x02
-#define EFI_ACPI_5_0_MPST_MEMORY_POWER_COMMAND_GET_AVERAGE_POWER_CONSUMED 0x03
-#define EFI_ACPI_5_0_MPST_MEMORY_POWER_COMMAND_GET_MEMORY_ENERGY_CONSUMED 0x04
+#define EFI_ACPI_5_0_MPST_MEMORY_POWER_COMMAND_GET_MEMORY_POWER_STATE 0x01
+#define EFI_ACPI_5_0_MPST_MEMORY_POWER_COMMAND_SET_MEMORY_POWER_STATE 0x02
+#define EFI_ACPI_5_0_MPST_MEMORY_POWER_COMMAND_GET_AVERAGE_POWER_CONSUMED 0x03
+#define EFI_ACPI_5_0_MPST_MEMORY_POWER_COMMAND_GET_MEMORY_ENERGY_CONSUMED 0x04
///
/// MPST Memory Power Node Table
///
typedef struct {
- UINT8 PowerStateValue;
- UINT8 PowerStateInformationIndex;
+ UINT8 PowerStateValue;
+ UINT8 PowerStateInformationIndex;
} EFI_ACPI_5_0_MPST_MEMORY_POWER_STATE;
typedef struct {
- UINT8 Flag;
- UINT8 Reserved;
- UINT16 MemoryPowerNodeId;
- UINT32 Length;
- UINT64 AddressBase;
- UINT64 AddressLength;
- UINT32 NumberOfPowerStates;
- UINT32 NumberOfPhysicalComponents;
-//EFI_ACPI_5_0_MPST_MEMORY_POWER_STATE MemoryPowerState[NumberOfPowerStates];
-//UINT16 PhysicalComponentIdentifier[NumberOfPhysicalComponents];
+ UINT8 Flag;
+ UINT8 Reserved;
+ UINT16 MemoryPowerNodeId;
+ UINT32 Length;
+ UINT64 AddressBase;
+ UINT64 AddressLength;
+ UINT32 NumberOfPowerStates;
+ UINT32 NumberOfPhysicalComponents;
+ // EFI_ACPI_5_0_MPST_MEMORY_POWER_STATE MemoryPowerState[NumberOfPowerStates];
+ // UINT16 PhysicalComponentIdentifier[NumberOfPhysicalComponents];
} EFI_ACPI_5_0_MPST_MEMORY_POWER_STRUCTURE;
-#define EFI_ACPI_5_0_MPST_MEMORY_POWER_STRUCTURE_FLAG_ENABLE 0x01
-#define EFI_ACPI_5_0_MPST_MEMORY_POWER_STRUCTURE_FLAG_POWER_MANAGED 0x02
-#define EFI_ACPI_5_0_MPST_MEMORY_POWER_STRUCTURE_FLAG_HOT_PLUGGABLE 0x04
+#define EFI_ACPI_5_0_MPST_MEMORY_POWER_STRUCTURE_FLAG_ENABLE 0x01
+#define EFI_ACPI_5_0_MPST_MEMORY_POWER_STRUCTURE_FLAG_POWER_MANAGED 0x02
+#define EFI_ACPI_5_0_MPST_MEMORY_POWER_STRUCTURE_FLAG_HOT_PLUGGABLE 0x04
typedef struct {
- UINT16 MemoryPowerNodeCount;
- UINT8 Reserved[2];
+ UINT16 MemoryPowerNodeCount;
+ UINT8 Reserved[2];
} EFI_ACPI_5_0_MPST_MEMORY_POWER_NODE_TABLE;
///
/// MPST Memory Power State Characteristics Table
///
typedef struct {
- UINT8 PowerStateStructureID;
- UINT8 Flag;
- UINT16 Reserved;
- UINT32 AveragePowerConsumedInMPS0;
- UINT32 RelativePowerSavingToMPS0;
- UINT64 ExitLatencyToMPS0;
+ UINT8 PowerStateStructureID;
+ UINT8 Flag;
+ UINT16 Reserved;
+ UINT32 AveragePowerConsumedInMPS0;
+ UINT32 RelativePowerSavingToMPS0;
+ UINT64 ExitLatencyToMPS0;
} EFI_ACPI_5_0_MPST_MEMORY_POWER_STATE_CHARACTERISTICS_STRUCTURE;
-#define EFI_ACPI_5_0_MPST_MEMORY_POWER_STATE_CHARACTERISTICS_STRUCTURE_FLAG_MEMORY_CONTENT_PRESERVED 0x01
-#define EFI_ACPI_5_0_MPST_MEMORY_POWER_STATE_CHARACTERISTICS_STRUCTURE_FLAG_AUTONOMOUS_MEMORY_POWER_STATE_ENTRY 0x02
-#define EFI_ACPI_5_0_MPST_MEMORY_POWER_STATE_CHARACTERISTICS_STRUCTURE_FLAG_AUTONOMOUS_MEMORY_POWER_STATE_EXIT 0x04
+#define EFI_ACPI_5_0_MPST_MEMORY_POWER_STATE_CHARACTERISTICS_STRUCTURE_FLAG_MEMORY_CONTENT_PRESERVED 0x01
+#define EFI_ACPI_5_0_MPST_MEMORY_POWER_STATE_CHARACTERISTICS_STRUCTURE_FLAG_AUTONOMOUS_MEMORY_POWER_STATE_ENTRY 0x02
+#define EFI_ACPI_5_0_MPST_MEMORY_POWER_STATE_CHARACTERISTICS_STRUCTURE_FLAG_AUTONOMOUS_MEMORY_POWER_STATE_EXIT 0x04
typedef struct {
- UINT16 MemoryPowerStateCharacteristicsCount;
- UINT8 Reserved[2];
+ UINT16 MemoryPowerStateCharacteristicsCount;
+ UINT8 Reserved[2];
} EFI_ACPI_5_0_MPST_MEMORY_POWER_STATE_CHARACTERISTICS_TABLE;
///
/// Memory Topology Table definition.
///
typedef struct {
- EFI_ACPI_DESCRIPTION_HEADER Header;
- UINT32 Reserved;
+ EFI_ACPI_DESCRIPTION_HEADER Header;
+ UINT32 Reserved;
} EFI_ACPI_5_0_MEMORY_TOPOLOGY_TABLE;
///
/// PMTT Version (as defined in ACPI 5.0 spec.)
///
-#define EFI_ACPI_5_0_MEMORY_TOPOLOGY_TABLE_REVISION 0x01
+#define EFI_ACPI_5_0_MEMORY_TOPOLOGY_TABLE_REVISION 0x01
///
/// Common Memory Aggregator Device Structure.
///
typedef struct {
- UINT8 Type;
- UINT8 Reserved;
- UINT16 Length;
- UINT16 Flags;
- UINT16 Reserved1;
+ UINT8 Type;
+ UINT8 Reserved;
+ UINT16 Length;
+ UINT16 Flags;
+ UINT16 Reserved1;
} EFI_ACPI_5_0_PMMT_COMMON_MEMORY_AGGREGATOR_DEVICE_STRUCTURE;
///
/// Memory Aggregator Device Type
///
-#define EFI_ACPI_5_0_PMMT_MEMORY_AGGREGATOR_DEVICE_TYPE_SOCKET 0x1
-#define EFI_ACPI_5_0_PMMT_MEMORY_AGGREGATOR_DEVICE_TYPE_MEMORY_CONTROLLER 0x2
-#define EFI_ACPI_5_0_PMMT_MEMORY_AGGREGATOR_DEVICE_TYPE_DIMM 0x3
+#define EFI_ACPI_5_0_PMMT_MEMORY_AGGREGATOR_DEVICE_TYPE_SOCKET 0x0
+#define EFI_ACPI_5_0_PMMT_MEMORY_AGGREGATOR_DEVICE_TYPE_MEMORY_CONTROLLER 0x1
+#define EFI_ACPI_5_0_PMMT_MEMORY_AGGREGATOR_DEVICE_TYPE_DIMM 0x2
///
/// Socket Memory Aggregator Device Structure.
///
typedef struct {
- EFI_ACPI_5_0_PMMT_COMMON_MEMORY_AGGREGATOR_DEVICE_STRUCTURE Header;
- UINT16 SocketIdentifier;
- UINT16 Reserved;
-//EFI_ACPI_5_0_PMMT_MEMORY_CONTROLLER_MEMORY_AGGREGATOR_DEVICE_STRUCTURE MemoryController[];
+ EFI_ACPI_5_0_PMMT_COMMON_MEMORY_AGGREGATOR_DEVICE_STRUCTURE Header;
+ UINT16 SocketIdentifier;
+ UINT16 Reserved;
+ // EFI_ACPI_5_0_PMMT_MEMORY_CONTROLLER_MEMORY_AGGREGATOR_DEVICE_STRUCTURE MemoryController[];
} EFI_ACPI_5_0_PMMT_SOCKET_MEMORY_AGGREGATOR_DEVICE_STRUCTURE;
///
/// MemoryController Memory Aggregator Device Structure.
///
typedef struct {
- EFI_ACPI_5_0_PMMT_COMMON_MEMORY_AGGREGATOR_DEVICE_STRUCTURE Header;
- UINT32 ReadLatency;
- UINT32 WriteLatency;
- UINT32 ReadBandwidth;
- UINT32 WriteBandwidth;
- UINT16 OptimalAccessUnit;
- UINT16 OptimalAccessAlignment;
- UINT16 Reserved;
- UINT16 NumberOfProximityDomains;
-//UINT32 ProximityDomain[NumberOfProximityDomains];
-//EFI_ACPI_5_0_PMMT_DIMM_MEMORY_AGGREGATOR_DEVICE_STRUCTURE PhysicalComponent[];
+ EFI_ACPI_5_0_PMMT_COMMON_MEMORY_AGGREGATOR_DEVICE_STRUCTURE Header;
+ UINT32 ReadLatency;
+ UINT32 WriteLatency;
+ UINT32 ReadBandwidth;
+ UINT32 WriteBandwidth;
+ UINT16 OptimalAccessUnit;
+ UINT16 OptimalAccessAlignment;
+ UINT16 Reserved;
+ UINT16 NumberOfProximityDomains;
+ // UINT32 ProximityDomain[NumberOfProximityDomains];
+ // EFI_ACPI_5_0_PMMT_DIMM_MEMORY_AGGREGATOR_DEVICE_STRUCTURE PhysicalComponent[];
} EFI_ACPI_5_0_PMMT_MEMORY_CONTROLLER_MEMORY_AGGREGATOR_DEVICE_STRUCTURE;
///
/// DIMM Memory Aggregator Device Structure.
///
typedef struct {
- EFI_ACPI_5_0_PMMT_COMMON_MEMORY_AGGREGATOR_DEVICE_STRUCTURE Header;
- UINT16 PhysicalComponentIdentifier;
- UINT16 Reserved;
- UINT32 SizeOfDimm;
- UINT32 SmbiosHandle;
+ EFI_ACPI_5_0_PMMT_COMMON_MEMORY_AGGREGATOR_DEVICE_STRUCTURE Header;
+ UINT16 PhysicalComponentIdentifier;
+ UINT16 Reserved;
+ UINT32 SizeOfDimm;
+ UINT32 SmbiosHandle;
} EFI_ACPI_5_0_PMMT_DIMM_MEMORY_AGGREGATOR_DEVICE_STRUCTURE;
///
/// Boot Graphics Resource Table definition.
///
typedef struct {
- EFI_ACPI_DESCRIPTION_HEADER Header;
+ EFI_ACPI_DESCRIPTION_HEADER Header;
///
/// 2-bytes (16 bit) version ID. This value must be 1.
///
- UINT16 Version;
+ UINT16 Version;
///
/// 1-byte status field indicating current status about the table.
/// Bits[7:1] = Reserved (must be zero)
/// Bit [0] = Valid. A one indicates the boot image graphic is valid.
///
- UINT8 Status;
+ UINT8 Status;
///
/// 1-byte enumerated type field indicating format of the image.
/// 0 = Bitmap
/// 1 - 255 Reserved (for future use)
///
- UINT8 ImageType;
+ UINT8 ImageType;
///
/// 8-byte (64 bit) physical address pointing to the firmware's in-memory copy
/// of the image bitmap.
///
- UINT64 ImageAddress;
+ UINT64 ImageAddress;
///
/// A 4-byte (32-bit) unsigned long describing the display X-offset of the boot image.
/// (X, Y) display offset of the top left corner of the boot image.
/// The top left corner of the display is at offset (0, 0).
///
- UINT32 ImageOffsetX;
+ UINT32 ImageOffsetX;
///
/// A 4-byte (32-bit) unsigned long describing the display Y-offset of the boot image.
/// (X, Y) display offset of the top left corner of the boot image.
/// The top left corner of the display is at offset (0, 0).
///
- UINT32 ImageOffsetY;
+ UINT32 ImageOffsetY;
} EFI_ACPI_5_0_BOOT_GRAPHICS_RESOURCE_TABLE;
///
/// BGRT Revision
///
-#define EFI_ACPI_5_0_BOOT_GRAPHICS_RESOURCE_TABLE_REVISION 1
+#define EFI_ACPI_5_0_BOOT_GRAPHICS_RESOURCE_TABLE_REVISION 1
///
/// BGRT Version
///
-#define EFI_ACPI_5_0_BGRT_VERSION 0x01
+#define EFI_ACPI_5_0_BGRT_VERSION 0x01
///
/// BGRT Status
///
-#define EFI_ACPI_5_0_BGRT_STATUS_NOT_DISPLAYED 0x00
-#define EFI_ACPI_5_0_BGRT_STATUS_DISPLAYED 0x01
-#define EFI_ACPI_5_0_BGRT_STATUS_INVALID EFI_ACPI_5_0_BGRT_STATUS_NOT_DISPLAYED
-#define EFI_ACPI_5_0_BGRT_STATUS_VALID EFI_ACPI_5_0_BGRT_STATUS_DISPLAYED
+#define EFI_ACPI_5_0_BGRT_STATUS_NOT_DISPLAYED 0x00
+#define EFI_ACPI_5_0_BGRT_STATUS_DISPLAYED 0x01
+#define EFI_ACPI_5_0_BGRT_STATUS_INVALID EFI_ACPI_5_0_BGRT_STATUS_NOT_DISPLAYED
+#define EFI_ACPI_5_0_BGRT_STATUS_VALID EFI_ACPI_5_0_BGRT_STATUS_DISPLAYED
///
/// BGRT Image Type
@@ -1104,26 +1114,26 @@ typedef struct {
///
/// FPDT Version (as defined in ACPI 5.0 spec.)
///
-#define EFI_ACPI_5_0_FIRMWARE_PERFORMANCE_DATA_TABLE_REVISION 0x01
+#define EFI_ACPI_5_0_FIRMWARE_PERFORMANCE_DATA_TABLE_REVISION 0x01
///
/// FPDT Performance Record Types
///
-#define EFI_ACPI_5_0_FPDT_RECORD_TYPE_FIRMWARE_BASIC_BOOT_POINTER 0x0000
-#define EFI_ACPI_5_0_FPDT_RECORD_TYPE_S3_PERFORMANCE_TABLE_POINTER 0x0001
+#define EFI_ACPI_5_0_FPDT_RECORD_TYPE_FIRMWARE_BASIC_BOOT_POINTER 0x0000
+#define EFI_ACPI_5_0_FPDT_RECORD_TYPE_S3_PERFORMANCE_TABLE_POINTER 0x0001
///
/// FPDT Performance Record Revision
///
-#define EFI_ACPI_5_0_FPDT_RECORD_REVISION_FIRMWARE_BASIC_BOOT_POINTER 0x01
-#define EFI_ACPI_5_0_FPDT_RECORD_REVISION_S3_PERFORMANCE_TABLE_POINTER 0x01
+#define EFI_ACPI_5_0_FPDT_RECORD_REVISION_FIRMWARE_BASIC_BOOT_POINTER 0x01
+#define EFI_ACPI_5_0_FPDT_RECORD_REVISION_S3_PERFORMANCE_TABLE_POINTER 0x01
///
/// FPDT Runtime Performance Record Types
///
-#define EFI_ACPI_5_0_FPDT_RUNTIME_RECORD_TYPE_S3_RESUME 0x0000
-#define EFI_ACPI_5_0_FPDT_RUNTIME_RECORD_TYPE_S3_SUSPEND 0x0001
-#define EFI_ACPI_5_0_FPDT_RUNTIME_RECORD_TYPE_FIRMWARE_BASIC_BOOT 0x0002
+#define EFI_ACPI_5_0_FPDT_RUNTIME_RECORD_TYPE_S3_RESUME 0x0000
+#define EFI_ACPI_5_0_FPDT_RUNTIME_RECORD_TYPE_S3_SUSPEND 0x0001
+#define EFI_ACPI_5_0_FPDT_RUNTIME_RECORD_TYPE_FIRMWARE_BASIC_BOOT 0x0002
///
/// FPDT Runtime Performance Record Revision
@@ -1136,77 +1146,77 @@ typedef struct {
/// FPDT Performance Record header
///
typedef struct {
- UINT16 Type;
- UINT8 Length;
- UINT8 Revision;
+ UINT16 Type;
+ UINT8 Length;
+ UINT8 Revision;
} EFI_ACPI_5_0_FPDT_PERFORMANCE_RECORD_HEADER;
///
/// FPDT Performance Table header
///
typedef struct {
- UINT32 Signature;
- UINT32 Length;
+ UINT32 Signature;
+ UINT32 Length;
} EFI_ACPI_5_0_FPDT_PERFORMANCE_TABLE_HEADER;
///
/// FPDT Firmware Basic Boot Performance Pointer Record Structure
///
typedef struct {
- EFI_ACPI_5_0_FPDT_PERFORMANCE_RECORD_HEADER Header;
- UINT32 Reserved;
+ EFI_ACPI_5_0_FPDT_PERFORMANCE_RECORD_HEADER Header;
+ UINT32 Reserved;
///
/// 64-bit processor-relative physical address of the Basic Boot Performance Table.
///
- UINT64 BootPerformanceTablePointer;
+ UINT64 BootPerformanceTablePointer;
} EFI_ACPI_5_0_FPDT_BOOT_PERFORMANCE_TABLE_POINTER_RECORD;
///
/// FPDT S3 Performance Table Pointer Record Structure
///
typedef struct {
- EFI_ACPI_5_0_FPDT_PERFORMANCE_RECORD_HEADER Header;
- UINT32 Reserved;
+ EFI_ACPI_5_0_FPDT_PERFORMANCE_RECORD_HEADER Header;
+ UINT32 Reserved;
///
/// 64-bit processor-relative physical address of the S3 Performance Table.
///
- UINT64 S3PerformanceTablePointer;
+ UINT64 S3PerformanceTablePointer;
} EFI_ACPI_5_0_FPDT_S3_PERFORMANCE_TABLE_POINTER_RECORD;
///
/// FPDT Firmware Basic Boot Performance Record Structure
///
typedef struct {
- EFI_ACPI_5_0_FPDT_PERFORMANCE_RECORD_HEADER Header;
- UINT32 Reserved;
+ EFI_ACPI_5_0_FPDT_PERFORMANCE_RECORD_HEADER Header;
+ UINT32 Reserved;
///
/// Timer value logged at the beginning of firmware image execution.
/// This may not always be zero or near zero.
///
- UINT64 ResetEnd;
+ UINT64 ResetEnd;
///
/// Timer value logged just prior to loading the OS boot loader into memory.
/// For non-UEFI compatible boots, this field must be zero.
///
- UINT64 OsLoaderLoadImageStart;
+ UINT64 OsLoaderLoadImageStart;
///
/// Timer value logged just prior to launching the previously loaded OS boot loader image.
/// For non-UEFI compatible boots, the timer value logged will be just prior
/// to the INT 19h handler invocation.
///
- UINT64 OsLoaderStartImageStart;
+ UINT64 OsLoaderStartImageStart;
///
/// Timer value logged at the point when the OS loader calls the
/// ExitBootServices function for UEFI compatible firmware.
/// For non-UEFI compatible boots, this field must be zero.
///
- UINT64 ExitBootServicesEntry;
+ UINT64 ExitBootServicesEntry;
///
/// Timer value logged at the point just prior to when the OS loader gaining
/// control back from calls the ExitBootServices function for UEFI compatible firmware.
/// For non-UEFI compatible boots, this field must be zero.
///
- UINT64 ExitBootServicesExit;
+ UINT64 ExitBootServicesExit;
} EFI_ACPI_5_0_FPDT_FIRMWARE_BASIC_BOOT_RECORD;
///
@@ -1218,7 +1228,7 @@ typedef struct {
// FPDT Firmware Basic Boot Performance Table
//
typedef struct {
- EFI_ACPI_5_0_FPDT_PERFORMANCE_TABLE_HEADER Header;
+ EFI_ACPI_5_0_FPDT_PERFORMANCE_TABLE_HEADER Header;
//
// one or more Performance Records.
//
@@ -1233,7 +1243,7 @@ typedef struct {
// FPDT Firmware S3 Boot Performance Table
//
typedef struct {
- EFI_ACPI_5_0_FPDT_PERFORMANCE_TABLE_HEADER Header;
+ EFI_ACPI_5_0_FPDT_PERFORMANCE_TABLE_HEADER Header;
//
// one or more Performance Records.
//
@@ -1243,124 +1253,125 @@ typedef struct {
/// FPDT Basic S3 Resume Performance Record
///
typedef struct {
- EFI_ACPI_5_0_FPDT_PERFORMANCE_RECORD_HEADER Header;
+ EFI_ACPI_5_0_FPDT_PERFORMANCE_RECORD_HEADER Header;
///
/// A count of the number of S3 resume cycles since the last full boot sequence.
///
- UINT32 ResumeCount;
+ UINT32 ResumeCount;
///
/// Timer recorded at the end of BIOS S3 resume, just prior to handoff to the
/// OS waking vector. Only the most recent resume cycle's time is retained.
///
- UINT64 FullResume;
+ UINT64 FullResume;
///
/// Average timer value of all resume cycles logged since the last full boot
/// sequence, including the most recent resume. Note that the entire log of
/// timer values does not need to be retained in order to calculate this average.
///
- UINT64 AverageResume;
+ UINT64 AverageResume;
} EFI_ACPI_5_0_FPDT_S3_RESUME_RECORD;
///
/// FPDT Basic S3 Suspend Performance Record
///
typedef struct {
- EFI_ACPI_5_0_FPDT_PERFORMANCE_RECORD_HEADER Header;
+ EFI_ACPI_5_0_FPDT_PERFORMANCE_RECORD_HEADER Header;
///
/// Timer value recorded at the OS write to SLP_TYP upon entry to S3.
/// Only the most recent suspend cycle's timer value is retained.
///
- UINT64 SuspendStart;
+ UINT64 SuspendStart;
///
/// Timer value recorded at the final firmware write to SLP_TYP (or other
/// mechanism) used to trigger hardware entry to S3.
/// Only the most recent suspend cycle's timer value is retained.
///
- UINT64 SuspendEnd;
+ UINT64 SuspendEnd;
} EFI_ACPI_5_0_FPDT_S3_SUSPEND_RECORD;
///
/// Firmware Performance Record Table definition.
///
typedef struct {
- EFI_ACPI_DESCRIPTION_HEADER Header;
+ EFI_ACPI_DESCRIPTION_HEADER Header;
} EFI_ACPI_5_0_FIRMWARE_PERFORMANCE_RECORD_TABLE;
///
/// Generic Timer Description Table definition.
///
typedef struct {
- EFI_ACPI_DESCRIPTION_HEADER Header;
- UINT64 PhysicalAddress;
- UINT32 GlobalFlags;
- UINT32 SecurePL1TimerGSIV;
- UINT32 SecurePL1TimerFlags;
- UINT32 NonSecurePL1TimerGSIV;
- UINT32 NonSecurePL1TimerFlags;
- UINT32 VirtualTimerGSIV;
- UINT32 VirtualTimerFlags;
- UINT32 NonSecurePL2TimerGSIV;
- UINT32 NonSecurePL2TimerFlags;
+ EFI_ACPI_DESCRIPTION_HEADER Header;
+ UINT64 PhysicalAddress;
+ UINT32 GlobalFlags;
+ UINT32 SecurePL1TimerGSIV;
+ UINT32 SecurePL1TimerFlags;
+ UINT32 NonSecurePL1TimerGSIV;
+ UINT32 NonSecurePL1TimerFlags;
+ UINT32 VirtualTimerGSIV;
+ UINT32 VirtualTimerFlags;
+ UINT32 NonSecurePL2TimerGSIV;
+ UINT32 NonSecurePL2TimerFlags;
} EFI_ACPI_5_0_GENERIC_TIMER_DESCRIPTION_TABLE;
///
/// GTDT Version (as defined in ACPI 5.0 spec.)
///
-#define EFI_ACPI_5_0_GENERIC_TIMER_DESCRIPTION_TABLE_REVISION 0x01
+#define EFI_ACPI_5_0_GENERIC_TIMER_DESCRIPTION_TABLE_REVISION 0x01
///
/// Global Flags. All other bits are reserved and must be 0.
///
-#define EFI_ACPI_5_0_GTDT_GLOBAL_FLAG_MEMORY_MAPPED_BLOCK_PRESENT BIT0
-#define EFI_ACPI_5_0_GTDT_GLOBAL_FLAG_INTERRUPT_MODE BIT1
+#define EFI_ACPI_5_0_GTDT_GLOBAL_FLAG_MEMORY_MAPPED_BLOCK_PRESENT BIT0
+#define EFI_ACPI_5_0_GTDT_GLOBAL_FLAG_INTERRUPT_MODE BIT1
///
/// Timer Flags. All other bits are reserved and must be 0.
///
-#define EFI_ACPI_5_0_GTDT_TIMER_FLAG_TIMER_INTERRUPT_MODE BIT0
-#define EFI_ACPI_5_0_GTDT_TIMER_FLAG_TIMER_INTERRUPT_POLARITY BIT1
+#define EFI_ACPI_5_0_GTDT_TIMER_FLAG_TIMER_INTERRUPT_MODE BIT0
+#define EFI_ACPI_5_0_GTDT_TIMER_FLAG_TIMER_INTERRUPT_POLARITY BIT1
///
/// Boot Error Record Table (BERT)
///
typedef struct {
- EFI_ACPI_DESCRIPTION_HEADER Header;
- UINT32 BootErrorRegionLength;
- UINT64 BootErrorRegion;
+ EFI_ACPI_DESCRIPTION_HEADER Header;
+ UINT32 BootErrorRegionLength;
+ UINT64 BootErrorRegion;
} EFI_ACPI_5_0_BOOT_ERROR_RECORD_TABLE_HEADER;
///
/// BERT Version (as defined in ACPI 5.0 spec.)
///
-#define EFI_ACPI_5_0_BOOT_ERROR_RECORD_TABLE_REVISION 0x01
+#define EFI_ACPI_5_0_BOOT_ERROR_RECORD_TABLE_REVISION 0x01
///
/// Boot Error Region Block Status Definition
///
typedef struct {
- UINT32 UncorrectableErrorValid:1;
- UINT32 CorrectableErrorValid:1;
- UINT32 MultipleUncorrectableErrors:1;
- UINT32 MultipleCorrectableErrors:1;
- UINT32 ErrorDataEntryCount:10;
- UINT32 Reserved:18;
+ UINT32 UncorrectableErrorValid : 1;
+ UINT32 CorrectableErrorValid : 1;
+ UINT32 MultipleUncorrectableErrors : 1;
+ UINT32 MultipleCorrectableErrors : 1;
+ UINT32 ErrorDataEntryCount : 10;
+ UINT32 Reserved : 18;
} EFI_ACPI_5_0_ERROR_BLOCK_STATUS;
///
/// Boot Error Region Definition
///
typedef struct {
- EFI_ACPI_5_0_ERROR_BLOCK_STATUS BlockStatus;
- UINT32 RawDataOffset;
- UINT32 RawDataLength;
- UINT32 DataLength;
- UINT32 ErrorSeverity;
+ EFI_ACPI_5_0_ERROR_BLOCK_STATUS BlockStatus;
+ UINT32 RawDataOffset;
+ UINT32 RawDataLength;
+ UINT32 DataLength;
+ UINT32 ErrorSeverity;
} EFI_ACPI_5_0_BOOT_ERROR_REGION_STRUCTURE;
//
// Boot Error Severity types
//
#define EFI_ACPI_5_0_ERROR_SEVERITY_CORRECTABLE 0x00
+#define EFI_ACPI_5_0_ERROR_SEVERITY_RECOVERABLE 0x00
#define EFI_ACPI_5_0_ERROR_SEVERITY_FATAL 0x01
#define EFI_ACPI_5_0_ERROR_SEVERITY_CORRECTED 0x02
#define EFI_ACPI_5_0_ERROR_SEVERITY_NONE 0x03
@@ -1369,14 +1380,14 @@ typedef struct {
/// Generic Error Data Entry Definition
///
typedef struct {
- UINT8 SectionType[16];
- UINT32 ErrorSeverity;
- UINT16 Revision;
- UINT8 ValidationBits;
- UINT8 Flags;
- UINT32 ErrorDataLength;
- UINT8 FruId[16];
- UINT8 FruText[20];
+ UINT8 SectionType[16];
+ UINT32 ErrorSeverity;
+ UINT16 Revision;
+ UINT8 ValidationBits;
+ UINT8 Flags;
+ UINT32 ErrorDataLength;
+ UINT8 FruId[16];
+ UINT8 FruText[20];
} EFI_ACPI_5_0_GENERIC_ERROR_DATA_ENTRY_STRUCTURE;
///
@@ -1388,14 +1399,14 @@ typedef struct {
/// HEST - Hardware Error Source Table
///
typedef struct {
- EFI_ACPI_DESCRIPTION_HEADER Header;
- UINT32 ErrorSourceCount;
+ EFI_ACPI_DESCRIPTION_HEADER Header;
+ UINT32 ErrorSourceCount;
} EFI_ACPI_5_0_HARDWARE_ERROR_SOURCE_TABLE_HEADER;
///
/// HEST Version (as defined in ACPI 5.0 spec.)
///
-#define EFI_ACPI_5_0_HARDWARE_ERROR_SOURCE_TABLE_REVISION 0x01
+#define EFI_ACPI_5_0_HARDWARE_ERROR_SOURCE_TABLE_REVISION 0x01
//
// Error Source structure types.
@@ -1411,403 +1422,403 @@ typedef struct {
//
// Error Source structure flags.
//
-#define EFI_ACPI_5_0_ERROR_SOURCE_FLAG_FIRMWARE_FIRST (1 << 0)
-#define EFI_ACPI_5_0_ERROR_SOURCE_FLAG_GLOBAL (1 << 1)
+#define EFI_ACPI_5_0_ERROR_SOURCE_FLAG_FIRMWARE_FIRST (1 << 0)
+#define EFI_ACPI_5_0_ERROR_SOURCE_FLAG_GLOBAL (1 << 1)
///
/// IA-32 Architecture Machine Check Exception Structure Definition
///
typedef struct {
- UINT16 Type;
- UINT16 SourceId;
- UINT8 Reserved0[2];
- UINT8 Flags;
- UINT8 Enabled;
- UINT32 NumberOfRecordsToPreAllocate;
- UINT32 MaxSectionsPerRecord;
- UINT64 GlobalCapabilityInitData;
- UINT64 GlobalControlInitData;
- UINT8 NumberOfHardwareBanks;
- UINT8 Reserved1[7];
+ UINT16 Type;
+ UINT16 SourceId;
+ UINT8 Reserved0[2];
+ UINT8 Flags;
+ UINT8 Enabled;
+ UINT32 NumberOfRecordsToPreAllocate;
+ UINT32 MaxSectionsPerRecord;
+ UINT64 GlobalCapabilityInitData;
+ UINT64 GlobalControlInitData;
+ UINT8 NumberOfHardwareBanks;
+ UINT8 Reserved1[7];
} EFI_ACPI_5_0_IA32_ARCHITECTURE_MACHINE_CHECK_EXCEPTION_STRUCTURE;
///
/// IA-32 Architecture Machine Check Bank Structure Definition
///
typedef struct {
- UINT8 BankNumber;
- UINT8 ClearStatusOnInitialization;
- UINT8 StatusDataFormat;
- UINT8 Reserved0;
- UINT32 ControlRegisterMsrAddress;
- UINT64 ControlInitData;
- UINT32 StatusRegisterMsrAddress;
- UINT32 AddressRegisterMsrAddress;
- UINT32 MiscRegisterMsrAddress;
+ UINT8 BankNumber;
+ UINT8 ClearStatusOnInitialization;
+ UINT8 StatusDataFormat;
+ UINT8 Reserved0;
+ UINT32 ControlRegisterMsrAddress;
+ UINT64 ControlInitData;
+ UINT32 StatusRegisterMsrAddress;
+ UINT32 AddressRegisterMsrAddress;
+ UINT32 MiscRegisterMsrAddress;
} EFI_ACPI_5_0_IA32_ARCHITECTURE_MACHINE_CHECK_ERROR_BANK_STRUCTURE;
///
/// IA-32 Architecture Machine Check Bank Structure MCA data format
///
-#define EFI_ACPI_5_0_IA32_ARCHITECTURE_MACHINE_CHECK_ERROR_DATA_FORMAT_IA32 0x00
-#define EFI_ACPI_5_0_IA32_ARCHITECTURE_MACHINE_CHECK_ERROR_DATA_FORMAT_INTEL64 0x01
-#define EFI_ACPI_5_0_IA32_ARCHITECTURE_MACHINE_CHECK_ERROR_DATA_FORMAT_AMD64 0x02
+#define EFI_ACPI_5_0_IA32_ARCHITECTURE_MACHINE_CHECK_ERROR_DATA_FORMAT_IA32 0x00
+#define EFI_ACPI_5_0_IA32_ARCHITECTURE_MACHINE_CHECK_ERROR_DATA_FORMAT_INTEL64 0x01
+#define EFI_ACPI_5_0_IA32_ARCHITECTURE_MACHINE_CHECK_ERROR_DATA_FORMAT_AMD64 0x02
//
// Hardware Error Notification types. All other values are reserved
//
-#define EFI_ACPI_5_0_HARDWARE_ERROR_NOTIFICATION_POLLED 0x00
-#define EFI_ACPI_5_0_HARDWARE_ERROR_NOTIFICATION_EXTERNAL_INTERRUPT 0x01
-#define EFI_ACPI_5_0_HARDWARE_ERROR_NOTIFICATION_LOCAL_INTERRUPT 0x02
-#define EFI_ACPI_5_0_HARDWARE_ERROR_NOTIFICATION_SCI 0x03
-#define EFI_ACPI_5_0_HARDWARE_ERROR_NOTIFICATION_NMI 0x04
+#define EFI_ACPI_5_0_HARDWARE_ERROR_NOTIFICATION_POLLED 0x00
+#define EFI_ACPI_5_0_HARDWARE_ERROR_NOTIFICATION_EXTERNAL_INTERRUPT 0x01
+#define EFI_ACPI_5_0_HARDWARE_ERROR_NOTIFICATION_LOCAL_INTERRUPT 0x02
+#define EFI_ACPI_5_0_HARDWARE_ERROR_NOTIFICATION_SCI 0x03
+#define EFI_ACPI_5_0_HARDWARE_ERROR_NOTIFICATION_NMI 0x04
///
/// Hardware Error Notification Configuration Write Enable Structure Definition
///
typedef struct {
- UINT16 Type:1;
- UINT16 PollInterval:1;
- UINT16 SwitchToPollingThresholdValue:1;
- UINT16 SwitchToPollingThresholdWindow:1;
- UINT16 ErrorThresholdValue:1;
- UINT16 ErrorThresholdWindow:1;
- UINT16 Reserved:10;
+ UINT16 Type : 1;
+ UINT16 PollInterval : 1;
+ UINT16 SwitchToPollingThresholdValue : 1;
+ UINT16 SwitchToPollingThresholdWindow : 1;
+ UINT16 ErrorThresholdValue : 1;
+ UINT16 ErrorThresholdWindow : 1;
+ UINT16 Reserved : 10;
} EFI_ACPI_5_0_HARDWARE_ERROR_NOTIFICATION_CONFIGURATION_WRITE_ENABLE_STRUCTURE;
///
/// Hardware Error Notification Structure Definition
///
typedef struct {
- UINT8 Type;
- UINT8 Length;
- EFI_ACPI_5_0_HARDWARE_ERROR_NOTIFICATION_CONFIGURATION_WRITE_ENABLE_STRUCTURE ConfigurationWriteEnable;
- UINT32 PollInterval;
- UINT32 Vector;
- UINT32 SwitchToPollingThresholdValue;
- UINT32 SwitchToPollingThresholdWindow;
- UINT32 ErrorThresholdValue;
- UINT32 ErrorThresholdWindow;
+ UINT8 Type;
+ UINT8 Length;
+ EFI_ACPI_5_0_HARDWARE_ERROR_NOTIFICATION_CONFIGURATION_WRITE_ENABLE_STRUCTURE ConfigurationWriteEnable;
+ UINT32 PollInterval;
+ UINT32 Vector;
+ UINT32 SwitchToPollingThresholdValue;
+ UINT32 SwitchToPollingThresholdWindow;
+ UINT32 ErrorThresholdValue;
+ UINT32 ErrorThresholdWindow;
} EFI_ACPI_5_0_HARDWARE_ERROR_NOTIFICATION_STRUCTURE;
///
/// IA-32 Architecture Corrected Machine Check Structure Definition
///
typedef struct {
- UINT16 Type;
- UINT16 SourceId;
- UINT8 Reserved0[2];
- UINT8 Flags;
- UINT8 Enabled;
- UINT32 NumberOfRecordsToPreAllocate;
- UINT32 MaxSectionsPerRecord;
- EFI_ACPI_5_0_HARDWARE_ERROR_NOTIFICATION_STRUCTURE NotificationStructure;
- UINT8 NumberOfHardwareBanks;
- UINT8 Reserved1[3];
+ UINT16 Type;
+ UINT16 SourceId;
+ UINT8 Reserved0[2];
+ UINT8 Flags;
+ UINT8 Enabled;
+ UINT32 NumberOfRecordsToPreAllocate;
+ UINT32 MaxSectionsPerRecord;
+ EFI_ACPI_5_0_HARDWARE_ERROR_NOTIFICATION_STRUCTURE NotificationStructure;
+ UINT8 NumberOfHardwareBanks;
+ UINT8 Reserved1[3];
} EFI_ACPI_5_0_IA32_ARCHITECTURE_CORRECTED_MACHINE_CHECK_STRUCTURE;
///
/// IA-32 Architecture NMI Error Structure Definition
///
typedef struct {
- UINT16 Type;
- UINT16 SourceId;
- UINT8 Reserved0[2];
- UINT32 NumberOfRecordsToPreAllocate;
- UINT32 MaxSectionsPerRecord;
- UINT32 MaxRawDataLength;
+ UINT16 Type;
+ UINT16 SourceId;
+ UINT8 Reserved0[2];
+ UINT32 NumberOfRecordsToPreAllocate;
+ UINT32 MaxSectionsPerRecord;
+ UINT32 MaxRawDataLength;
} EFI_ACPI_5_0_IA32_ARCHITECTURE_NMI_ERROR_STRUCTURE;
///
/// PCI Express Root Port AER Structure Definition
///
typedef struct {
- UINT16 Type;
- UINT16 SourceId;
- UINT8 Reserved0[2];
- UINT8 Flags;
- UINT8 Enabled;
- UINT32 NumberOfRecordsToPreAllocate;
- UINT32 MaxSectionsPerRecord;
- UINT32 Bus;
- UINT16 Device;
- UINT16 Function;
- UINT16 DeviceControl;
- UINT8 Reserved1[2];
- UINT32 UncorrectableErrorMask;
- UINT32 UncorrectableErrorSeverity;
- UINT32 CorrectableErrorMask;
- UINT32 AdvancedErrorCapabilitiesAndControl;
- UINT32 RootErrorCommand;
+ UINT16 Type;
+ UINT16 SourceId;
+ UINT8 Reserved0[2];
+ UINT8 Flags;
+ UINT8 Enabled;
+ UINT32 NumberOfRecordsToPreAllocate;
+ UINT32 MaxSectionsPerRecord;
+ UINT32 Bus;
+ UINT16 Device;
+ UINT16 Function;
+ UINT16 DeviceControl;
+ UINT8 Reserved1[2];
+ UINT32 UncorrectableErrorMask;
+ UINT32 UncorrectableErrorSeverity;
+ UINT32 CorrectableErrorMask;
+ UINT32 AdvancedErrorCapabilitiesAndControl;
+ UINT32 RootErrorCommand;
} EFI_ACPI_5_0_PCI_EXPRESS_ROOT_PORT_AER_STRUCTURE;
///
/// PCI Express Device AER Structure Definition
///
typedef struct {
- UINT16 Type;
- UINT16 SourceId;
- UINT8 Reserved0[2];
- UINT8 Flags;
- UINT8 Enabled;
- UINT32 NumberOfRecordsToPreAllocate;
- UINT32 MaxSectionsPerRecord;
- UINT32 Bus;
- UINT16 Device;
- UINT16 Function;
- UINT16 DeviceControl;
- UINT8 Reserved1[2];
- UINT32 UncorrectableErrorMask;
- UINT32 UncorrectableErrorSeverity;
- UINT32 CorrectableErrorMask;
- UINT32 AdvancedErrorCapabilitiesAndControl;
+ UINT16 Type;
+ UINT16 SourceId;
+ UINT8 Reserved0[2];
+ UINT8 Flags;
+ UINT8 Enabled;
+ UINT32 NumberOfRecordsToPreAllocate;
+ UINT32 MaxSectionsPerRecord;
+ UINT32 Bus;
+ UINT16 Device;
+ UINT16 Function;
+ UINT16 DeviceControl;
+ UINT8 Reserved1[2];
+ UINT32 UncorrectableErrorMask;
+ UINT32 UncorrectableErrorSeverity;
+ UINT32 CorrectableErrorMask;
+ UINT32 AdvancedErrorCapabilitiesAndControl;
} EFI_ACPI_5_0_PCI_EXPRESS_DEVICE_AER_STRUCTURE;
///
/// PCI Express Bridge AER Structure Definition
///
typedef struct {
- UINT16 Type;
- UINT16 SourceId;
- UINT8 Reserved0[2];
- UINT8 Flags;
- UINT8 Enabled;
- UINT32 NumberOfRecordsToPreAllocate;
- UINT32 MaxSectionsPerRecord;
- UINT32 Bus;
- UINT16 Device;
- UINT16 Function;
- UINT16 DeviceControl;
- UINT8 Reserved1[2];
- UINT32 UncorrectableErrorMask;
- UINT32 UncorrectableErrorSeverity;
- UINT32 CorrectableErrorMask;
- UINT32 AdvancedErrorCapabilitiesAndControl;
- UINT32 SecondaryUncorrectableErrorMask;
- UINT32 SecondaryUncorrectableErrorSeverity;
- UINT32 SecondaryAdvancedErrorCapabilitiesAndControl;
+ UINT16 Type;
+ UINT16 SourceId;
+ UINT8 Reserved0[2];
+ UINT8 Flags;
+ UINT8 Enabled;
+ UINT32 NumberOfRecordsToPreAllocate;
+ UINT32 MaxSectionsPerRecord;
+ UINT32 Bus;
+ UINT16 Device;
+ UINT16 Function;
+ UINT16 DeviceControl;
+ UINT8 Reserved1[2];
+ UINT32 UncorrectableErrorMask;
+ UINT32 UncorrectableErrorSeverity;
+ UINT32 CorrectableErrorMask;
+ UINT32 AdvancedErrorCapabilitiesAndControl;
+ UINT32 SecondaryUncorrectableErrorMask;
+ UINT32 SecondaryUncorrectableErrorSeverity;
+ UINT32 SecondaryAdvancedErrorCapabilitiesAndControl;
} EFI_ACPI_5_0_PCI_EXPRESS_BRIDGE_AER_STRUCTURE;
///
/// Generic Hardware Error Source Structure Definition
///
typedef struct {
- UINT16 Type;
- UINT16 SourceId;
- UINT16 RelatedSourceId;
- UINT8 Flags;
- UINT8 Enabled;
- UINT32 NumberOfRecordsToPreAllocate;
- UINT32 MaxSectionsPerRecord;
- UINT32 MaxRawDataLength;
- EFI_ACPI_5_0_GENERIC_ADDRESS_STRUCTURE ErrorStatusAddress;
- EFI_ACPI_5_0_HARDWARE_ERROR_NOTIFICATION_STRUCTURE NotificationStructure;
- UINT32 ErrorStatusBlockLength;
+ UINT16 Type;
+ UINT16 SourceId;
+ UINT16 RelatedSourceId;
+ UINT8 Flags;
+ UINT8 Enabled;
+ UINT32 NumberOfRecordsToPreAllocate;
+ UINT32 MaxSectionsPerRecord;
+ UINT32 MaxRawDataLength;
+ EFI_ACPI_5_0_GENERIC_ADDRESS_STRUCTURE ErrorStatusAddress;
+ EFI_ACPI_5_0_HARDWARE_ERROR_NOTIFICATION_STRUCTURE NotificationStructure;
+ UINT32 ErrorStatusBlockLength;
} EFI_ACPI_5_0_GENERIC_HARDWARE_ERROR_SOURCE_STRUCTURE;
///
/// Generic Error Status Definition
///
typedef struct {
- EFI_ACPI_5_0_ERROR_BLOCK_STATUS BlockStatus;
- UINT32 RawDataOffset;
- UINT32 RawDataLength;
- UINT32 DataLength;
- UINT32 ErrorSeverity;
+ EFI_ACPI_5_0_ERROR_BLOCK_STATUS BlockStatus;
+ UINT32 RawDataOffset;
+ UINT32 RawDataLength;
+ UINT32 DataLength;
+ UINT32 ErrorSeverity;
} EFI_ACPI_5_0_GENERIC_ERROR_STATUS_STRUCTURE;
///
/// ERST - Error Record Serialization Table
///
typedef struct {
- EFI_ACPI_DESCRIPTION_HEADER Header;
- UINT32 SerializationHeaderSize;
- UINT8 Reserved0[4];
- UINT32 InstructionEntryCount;
+ EFI_ACPI_DESCRIPTION_HEADER Header;
+ UINT32 SerializationHeaderSize;
+ UINT8 Reserved0[4];
+ UINT32 InstructionEntryCount;
} EFI_ACPI_5_0_ERROR_RECORD_SERIALIZATION_TABLE_HEADER;
///
/// ERST Version (as defined in ACPI 5.0 spec.)
///
-#define EFI_ACPI_5_0_ERROR_RECORD_SERIALIZATION_TABLE_REVISION 0x01
+#define EFI_ACPI_5_0_ERROR_RECORD_SERIALIZATION_TABLE_REVISION 0x01
///
/// ERST Serialization Actions
///
-#define EFI_ACPI_5_0_ERST_BEGIN_WRITE_OPERATION 0x00
-#define EFI_ACPI_5_0_ERST_BEGIN_READ_OPERATION 0x01
-#define EFI_ACPI_5_0_ERST_BEGIN_CLEAR_OPERATION 0x02
-#define EFI_ACPI_5_0_ERST_END_OPERATION 0x03
-#define EFI_ACPI_5_0_ERST_SET_RECORD_OFFSET 0x04
-#define EFI_ACPI_5_0_ERST_EXECUTE_OPERATION 0x05
-#define EFI_ACPI_5_0_ERST_CHECK_BUSY_STATUS 0x06
-#define EFI_ACPI_5_0_ERST_GET_COMMAND_STATUS 0x07
-#define EFI_ACPI_5_0_ERST_GET_RECORD_IDENTIFIER 0x08
-#define EFI_ACPI_5_0_ERST_SET_RECORD_IDENTIFIER 0x09
-#define EFI_ACPI_5_0_ERST_GET_RECORD_COUNT 0x0A
-#define EFI_ACPI_5_0_ERST_BEGIN_DUMMY_WRITE_OPERATION 0x0B
-#define EFI_ACPI_5_0_ERST_GET_ERROR_LOG_ADDRESS_RANGE 0x0D
-#define EFI_ACPI_5_0_ERST_GET_ERROR_LOG_ADDRESS_RANGE_LENGTH 0x0E
-#define EFI_ACPI_5_0_ERST_GET_ERROR_LOG_ADDRESS_RANGE_ATTRIBUTES 0x0F
+#define EFI_ACPI_5_0_ERST_BEGIN_WRITE_OPERATION 0x00
+#define EFI_ACPI_5_0_ERST_BEGIN_READ_OPERATION 0x01
+#define EFI_ACPI_5_0_ERST_BEGIN_CLEAR_OPERATION 0x02
+#define EFI_ACPI_5_0_ERST_END_OPERATION 0x03
+#define EFI_ACPI_5_0_ERST_SET_RECORD_OFFSET 0x04
+#define EFI_ACPI_5_0_ERST_EXECUTE_OPERATION 0x05
+#define EFI_ACPI_5_0_ERST_CHECK_BUSY_STATUS 0x06
+#define EFI_ACPI_5_0_ERST_GET_COMMAND_STATUS 0x07
+#define EFI_ACPI_5_0_ERST_GET_RECORD_IDENTIFIER 0x08
+#define EFI_ACPI_5_0_ERST_SET_RECORD_IDENTIFIER 0x09
+#define EFI_ACPI_5_0_ERST_GET_RECORD_COUNT 0x0A
+#define EFI_ACPI_5_0_ERST_BEGIN_DUMMY_WRITE_OPERATION 0x0B
+#define EFI_ACPI_5_0_ERST_GET_ERROR_LOG_ADDRESS_RANGE 0x0D
+#define EFI_ACPI_5_0_ERST_GET_ERROR_LOG_ADDRESS_RANGE_LENGTH 0x0E
+#define EFI_ACPI_5_0_ERST_GET_ERROR_LOG_ADDRESS_RANGE_ATTRIBUTES 0x0F
///
/// ERST Action Command Status
///
-#define EFI_ACPI_5_0_ERST_STATUS_SUCCESS 0x00
-#define EFI_ACPI_5_0_ERST_STATUS_NOT_ENOUGH_SPACE 0x01
-#define EFI_ACPI_5_0_ERST_STATUS_HARDWARE_NOT_AVAILABLE 0x02
-#define EFI_ACPI_5_0_ERST_STATUS_FAILED 0x03
-#define EFI_ACPI_5_0_ERST_STATUS_RECORD_STORE_EMPTY 0x04
-#define EFI_ACPI_5_0_ERST_STATUS_RECORD_NOT_FOUND 0x05
+#define EFI_ACPI_5_0_ERST_STATUS_SUCCESS 0x00
+#define EFI_ACPI_5_0_ERST_STATUS_NOT_ENOUGH_SPACE 0x01
+#define EFI_ACPI_5_0_ERST_STATUS_HARDWARE_NOT_AVAILABLE 0x02
+#define EFI_ACPI_5_0_ERST_STATUS_FAILED 0x03
+#define EFI_ACPI_5_0_ERST_STATUS_RECORD_STORE_EMPTY 0x04
+#define EFI_ACPI_5_0_ERST_STATUS_RECORD_NOT_FOUND 0x05
///
/// ERST Serialization Instructions
///
-#define EFI_ACPI_5_0_ERST_READ_REGISTER 0x00
-#define EFI_ACPI_5_0_ERST_READ_REGISTER_VALUE 0x01
-#define EFI_ACPI_5_0_ERST_WRITE_REGISTER 0x02
-#define EFI_ACPI_5_0_ERST_WRITE_REGISTER_VALUE 0x03
-#define EFI_ACPI_5_0_ERST_NOOP 0x04
-#define EFI_ACPI_5_0_ERST_LOAD_VAR1 0x05
-#define EFI_ACPI_5_0_ERST_LOAD_VAR2 0x06
-#define EFI_ACPI_5_0_ERST_STORE_VAR1 0x07
-#define EFI_ACPI_5_0_ERST_ADD 0x08
-#define EFI_ACPI_5_0_ERST_SUBTRACT 0x09
-#define EFI_ACPI_5_0_ERST_ADD_VALUE 0x0A
-#define EFI_ACPI_5_0_ERST_SUBTRACT_VALUE 0x0B
-#define EFI_ACPI_5_0_ERST_STALL 0x0C
-#define EFI_ACPI_5_0_ERST_STALL_WHILE_TRUE 0x0D
-#define EFI_ACPI_5_0_ERST_SKIP_NEXT_INSTRUCTION_IF_TRUE 0x0E
-#define EFI_ACPI_5_0_ERST_GOTO 0x0F
-#define EFI_ACPI_5_0_ERST_SET_SRC_ADDRESS_BASE 0x10
-#define EFI_ACPI_5_0_ERST_SET_DST_ADDRESS_BASE 0x11
-#define EFI_ACPI_5_0_ERST_MOVE_DATA 0x12
+#define EFI_ACPI_5_0_ERST_READ_REGISTER 0x00
+#define EFI_ACPI_5_0_ERST_READ_REGISTER_VALUE 0x01
+#define EFI_ACPI_5_0_ERST_WRITE_REGISTER 0x02
+#define EFI_ACPI_5_0_ERST_WRITE_REGISTER_VALUE 0x03
+#define EFI_ACPI_5_0_ERST_NOOP 0x04
+#define EFI_ACPI_5_0_ERST_LOAD_VAR1 0x05
+#define EFI_ACPI_5_0_ERST_LOAD_VAR2 0x06
+#define EFI_ACPI_5_0_ERST_STORE_VAR1 0x07
+#define EFI_ACPI_5_0_ERST_ADD 0x08
+#define EFI_ACPI_5_0_ERST_SUBTRACT 0x09
+#define EFI_ACPI_5_0_ERST_ADD_VALUE 0x0A
+#define EFI_ACPI_5_0_ERST_SUBTRACT_VALUE 0x0B
+#define EFI_ACPI_5_0_ERST_STALL 0x0C
+#define EFI_ACPI_5_0_ERST_STALL_WHILE_TRUE 0x0D
+#define EFI_ACPI_5_0_ERST_SKIP_NEXT_INSTRUCTION_IF_TRUE 0x0E
+#define EFI_ACPI_5_0_ERST_GOTO 0x0F
+#define EFI_ACPI_5_0_ERST_SET_SRC_ADDRESS_BASE 0x10
+#define EFI_ACPI_5_0_ERST_SET_DST_ADDRESS_BASE 0x11
+#define EFI_ACPI_5_0_ERST_MOVE_DATA 0x12
///
/// ERST Instruction Flags
///
-#define EFI_ACPI_5_0_ERST_PRESERVE_REGISTER 0x01
+#define EFI_ACPI_5_0_ERST_PRESERVE_REGISTER 0x01
///
/// ERST Serialization Instruction Entry
///
typedef struct {
- UINT8 SerializationAction;
- UINT8 Instruction;
- UINT8 Flags;
- UINT8 Reserved0;
- EFI_ACPI_5_0_GENERIC_ADDRESS_STRUCTURE RegisterRegion;
- UINT64 Value;
- UINT64 Mask;
+ UINT8 SerializationAction;
+ UINT8 Instruction;
+ UINT8 Flags;
+ UINT8 Reserved0;
+ EFI_ACPI_5_0_GENERIC_ADDRESS_STRUCTURE RegisterRegion;
+ UINT64 Value;
+ UINT64 Mask;
} EFI_ACPI_5_0_ERST_SERIALIZATION_INSTRUCTION_ENTRY;
///
/// EINJ - Error Injection Table
///
typedef struct {
- EFI_ACPI_DESCRIPTION_HEADER Header;
- UINT32 InjectionHeaderSize;
- UINT8 InjectionFlags;
- UINT8 Reserved0[3];
- UINT32 InjectionEntryCount;
+ EFI_ACPI_DESCRIPTION_HEADER Header;
+ UINT32 InjectionHeaderSize;
+ UINT8 InjectionFlags;
+ UINT8 Reserved0[3];
+ UINT32 InjectionEntryCount;
} EFI_ACPI_5_0_ERROR_INJECTION_TABLE_HEADER;
///
/// EINJ Version (as defined in ACPI 5.0 spec.)
///
-#define EFI_ACPI_5_0_ERROR_INJECTION_TABLE_REVISION 0x01
+#define EFI_ACPI_5_0_ERROR_INJECTION_TABLE_REVISION 0x01
///
/// EINJ Error Injection Actions
///
-#define EFI_ACPI_5_0_EINJ_BEGIN_INJECTION_OPERATION 0x00
-#define EFI_ACPI_5_0_EINJ_GET_TRIGGER_ERROR_ACTION_TABLE 0x01
-#define EFI_ACPI_5_0_EINJ_SET_ERROR_TYPE 0x02
-#define EFI_ACPI_5_0_EINJ_GET_ERROR_TYPE 0x03
-#define EFI_ACPI_5_0_EINJ_END_OPERATION 0x04
-#define EFI_ACPI_5_0_EINJ_EXECUTE_OPERATION 0x05
-#define EFI_ACPI_5_0_EINJ_CHECK_BUSY_STATUS 0x06
-#define EFI_ACPI_5_0_EINJ_GET_COMMAND_STATUS 0x07
-#define EFI_ACPI_5_0_EINJ_TRIGGER_ERROR 0xFF
+#define EFI_ACPI_5_0_EINJ_BEGIN_INJECTION_OPERATION 0x00
+#define EFI_ACPI_5_0_EINJ_GET_TRIGGER_ERROR_ACTION_TABLE 0x01
+#define EFI_ACPI_5_0_EINJ_SET_ERROR_TYPE 0x02
+#define EFI_ACPI_5_0_EINJ_GET_ERROR_TYPE 0x03
+#define EFI_ACPI_5_0_EINJ_END_OPERATION 0x04
+#define EFI_ACPI_5_0_EINJ_EXECUTE_OPERATION 0x05
+#define EFI_ACPI_5_0_EINJ_CHECK_BUSY_STATUS 0x06
+#define EFI_ACPI_5_0_EINJ_GET_COMMAND_STATUS 0x07
+#define EFI_ACPI_5_0_EINJ_TRIGGER_ERROR 0xFF
///
/// EINJ Action Command Status
///
-#define EFI_ACPI_5_0_EINJ_STATUS_SUCCESS 0x00
-#define EFI_ACPI_5_0_EINJ_STATUS_UNKNOWN_FAILURE 0x01
-#define EFI_ACPI_5_0_EINJ_STATUS_INVALID_ACCESS 0x02
+#define EFI_ACPI_5_0_EINJ_STATUS_SUCCESS 0x00
+#define EFI_ACPI_5_0_EINJ_STATUS_UNKNOWN_FAILURE 0x01
+#define EFI_ACPI_5_0_EINJ_STATUS_INVALID_ACCESS 0x02
///
/// EINJ Error Type Definition
///
-#define EFI_ACPI_5_0_EINJ_ERROR_PROCESSOR_CORRECTABLE (1 << 0)
-#define EFI_ACPI_5_0_EINJ_ERROR_PROCESSOR_UNCORRECTABLE_NONFATAL (1 << 1)
-#define EFI_ACPI_5_0_EINJ_ERROR_PROCESSOR_UNCORRECTABLE_FATAL (1 << 2)
-#define EFI_ACPI_5_0_EINJ_ERROR_MEMORY_CORRECTABLE (1 << 3)
-#define EFI_ACPI_5_0_EINJ_ERROR_MEMORY_UNCORRECTABLE_NONFATAL (1 << 4)
-#define EFI_ACPI_5_0_EINJ_ERROR_MEMORY_UNCORRECTABLE_FATAL (1 << 5)
-#define EFI_ACPI_5_0_EINJ_ERROR_PCI_EXPRESS_CORRECTABLE (1 << 6)
-#define EFI_ACPI_5_0_EINJ_ERROR_PCI_EXPRESS_UNCORRECTABLE_NONFATAL (1 << 7)
-#define EFI_ACPI_5_0_EINJ_ERROR_PCI_EXPRESS_UNCORRECTABLE_FATAL (1 << 8)
-#define EFI_ACPI_5_0_EINJ_ERROR_PLATFORM_CORRECTABLE (1 << 9)
-#define EFI_ACPI_5_0_EINJ_ERROR_PLATFORM_UNCORRECTABLE_NONFATAL (1 << 10)
-#define EFI_ACPI_5_0_EINJ_ERROR_PLATFORM_UNCORRECTABLE_FATAL (1 << 11)
+#define EFI_ACPI_5_0_EINJ_ERROR_PROCESSOR_CORRECTABLE (1 << 0)
+#define EFI_ACPI_5_0_EINJ_ERROR_PROCESSOR_UNCORRECTABLE_NONFATAL (1 << 1)
+#define EFI_ACPI_5_0_EINJ_ERROR_PROCESSOR_UNCORRECTABLE_FATAL (1 << 2)
+#define EFI_ACPI_5_0_EINJ_ERROR_MEMORY_CORRECTABLE (1 << 3)
+#define EFI_ACPI_5_0_EINJ_ERROR_MEMORY_UNCORRECTABLE_NONFATAL (1 << 4)
+#define EFI_ACPI_5_0_EINJ_ERROR_MEMORY_UNCORRECTABLE_FATAL (1 << 5)
+#define EFI_ACPI_5_0_EINJ_ERROR_PCI_EXPRESS_CORRECTABLE (1 << 6)
+#define EFI_ACPI_5_0_EINJ_ERROR_PCI_EXPRESS_UNCORRECTABLE_NONFATAL (1 << 7)
+#define EFI_ACPI_5_0_EINJ_ERROR_PCI_EXPRESS_UNCORRECTABLE_FATAL (1 << 8)
+#define EFI_ACPI_5_0_EINJ_ERROR_PLATFORM_CORRECTABLE (1 << 9)
+#define EFI_ACPI_5_0_EINJ_ERROR_PLATFORM_UNCORRECTABLE_NONFATAL (1 << 10)
+#define EFI_ACPI_5_0_EINJ_ERROR_PLATFORM_UNCORRECTABLE_FATAL (1 << 11)
///
/// EINJ Injection Instructions
///
-#define EFI_ACPI_5_0_EINJ_READ_REGISTER 0x00
-#define EFI_ACPI_5_0_EINJ_READ_REGISTER_VALUE 0x01
-#define EFI_ACPI_5_0_EINJ_WRITE_REGISTER 0x02
-#define EFI_ACPI_5_0_EINJ_WRITE_REGISTER_VALUE 0x03
-#define EFI_ACPI_5_0_EINJ_NOOP 0x04
+#define EFI_ACPI_5_0_EINJ_READ_REGISTER 0x00
+#define EFI_ACPI_5_0_EINJ_READ_REGISTER_VALUE 0x01
+#define EFI_ACPI_5_0_EINJ_WRITE_REGISTER 0x02
+#define EFI_ACPI_5_0_EINJ_WRITE_REGISTER_VALUE 0x03
+#define EFI_ACPI_5_0_EINJ_NOOP 0x04
///
/// EINJ Instruction Flags
///
-#define EFI_ACPI_5_0_EINJ_PRESERVE_REGISTER 0x01
+#define EFI_ACPI_5_0_EINJ_PRESERVE_REGISTER 0x01
///
/// EINJ Injection Instruction Entry
///
typedef struct {
- UINT8 InjectionAction;
- UINT8 Instruction;
- UINT8 Flags;
- UINT8 Reserved0;
- EFI_ACPI_5_0_GENERIC_ADDRESS_STRUCTURE RegisterRegion;
- UINT64 Value;
- UINT64 Mask;
+ UINT8 InjectionAction;
+ UINT8 Instruction;
+ UINT8 Flags;
+ UINT8 Reserved0;
+ EFI_ACPI_5_0_GENERIC_ADDRESS_STRUCTURE RegisterRegion;
+ UINT64 Value;
+ UINT64 Mask;
} EFI_ACPI_5_0_EINJ_INJECTION_INSTRUCTION_ENTRY;
///
/// EINJ Trigger Action Table
///
typedef struct {
- UINT32 HeaderSize;
- UINT32 Revision;
- UINT32 TableSize;
- UINT32 EntryCount;
+ UINT32 HeaderSize;
+ UINT32 Revision;
+ UINT32 TableSize;
+ UINT32 EntryCount;
} EFI_ACPI_5_0_EINJ_TRIGGER_ACTION_TABLE;
///
/// Platform Communications Channel Table (PCCT)
///
typedef struct {
- EFI_ACPI_DESCRIPTION_HEADER Header;
- UINT32 Flags;
- UINT64 Reserved;
+ EFI_ACPI_DESCRIPTION_HEADER Header;
+ UINT32 Flags;
+ UINT64 Reserved;
} EFI_ACPI_5_0_PLATFORM_COMMUNICATION_CHANNEL_TABLE_HEADER;
///
/// PCCT Version (as defined in ACPI 5.0 spec.)
///
-#define EFI_ACPI_5_0_PLATFORM_COMMUNICATION_CHANNEL_TABLE_REVISION 0x01
+#define EFI_ACPI_5_0_PLATFORM_COMMUNICATION_CHANNEL_TABLE_REVISION 0x01
///
/// PCCT Global Flags
///
-#define EFI_ACPI_5_0_PCCT_FLAGS_SCI_DOORBELL BIT0
+#define EFI_ACPI_5_0_PCCT_FLAGS_SCI_DOORBELL BIT0
//
// PCCT Subspace type
@@ -1818,25 +1829,25 @@ typedef struct {
/// PCC Subspace Structure Header
///
typedef struct {
- UINT8 Type;
- UINT8 Length;
+ UINT8 Type;
+ UINT8 Length;
} EFI_ACPI_5_0_PCCT_SUBSPACE_HEADER;
///
/// Generic Communications Subspace Structure
///
typedef struct {
- UINT8 Type;
- UINT8 Length;
- UINT8 Reserved[6];
- UINT64 BaseAddress;
- UINT64 AddressLength;
- EFI_ACPI_5_0_GENERIC_ADDRESS_STRUCTURE DoorbellRegister;
- UINT64 DoorbellPreserve;
- UINT64 DoorbellWrite;
- UINT32 NominalLatency;
- UINT32 MaximumPeriodicAccessRate;
- UINT16 MinimumRequestTurnaroundTime;
+ UINT8 Type;
+ UINT8 Length;
+ UINT8 Reserved[6];
+ UINT64 BaseAddress;
+ UINT64 AddressLength;
+ EFI_ACPI_5_0_GENERIC_ADDRESS_STRUCTURE DoorbellRegister;
+ UINT64 DoorbellPreserve;
+ UINT64 DoorbellWrite;
+ UINT32 NominalLatency;
+ UINT32 MaximumPeriodicAccessRate;
+ UINT16 MinimumRequestTurnaroundTime;
} EFI_ACPI_5_0_PCCT_SUBSPACE_GENERIC;
///
@@ -1844,18 +1855,18 @@ typedef struct {
///
typedef struct {
- UINT8 Command;
- UINT8 Reserved:7;
- UINT8 GenerateSci:1;
+ UINT8 Command;
+ UINT8 Reserved : 7;
+ UINT8 GenerateSci : 1;
} EFI_ACPI_5_0_PCCT_GENERIC_SHARED_MEMORY_REGION_COMMAND;
typedef struct {
- UINT8 CommandComplete:1;
- UINT8 SciDoorbell:1;
- UINT8 Error:1;
- UINT8 PlatformNotification:1;
- UINT8 Reserved:4;
- UINT8 Reserved1;
+ UINT8 CommandComplete : 1;
+ UINT8 SciDoorbell : 1;
+ UINT8 Error : 1;
+ UINT8 PlatformNotification : 1;
+ UINT8 Reserved : 4;
+ UINT8 Reserved1;
} EFI_ACPI_5_0_PCCT_GENERIC_SHARED_MEMORY_REGION_STATUS;
typedef struct {
@@ -2097,7 +2108,7 @@ typedef struct {
/// "WAET" Windows ACPI Emulated Devices Table
///
#define EFI_ACPI_5_0_WINDOWS_ACPI_EMULATED_DEVICES_TABLE_SIGNATURE SIGNATURE_32('W', 'A', 'E', 'T')
-#define EFI_ACPI_5_0_WINDOWS_ACPI_ENLIGHTENMENT_TABLE_SIGNATURE EFI_ACPI_5_0_WINDOWS_ACPI_EMULATED_DEVICES_TABLE_SIGNATURE
+#define EFI_ACPI_5_0_WINDOWS_ACPI_ENLIGHTENMENT_TABLE_SIGNATURE EFI_ACPI_5_0_WINDOWS_ACPI_EMULATED_DEVICES_TABLE_SIGNATURE
///
/// "WDAT" Watchdog Action Table
diff --git a/sys/contrib/edk2/Include/IndustryStandard/Acpi51.h b/sys/contrib/edk2/Include/IndustryStandard/Acpi51.h
index 2c027859b9a3..b5289663f0e3 100644
--- a/sys/contrib/edk2/Include/IndustryStandard/Acpi51.h
+++ b/sys/contrib/edk2/Include/IndustryStandard/Acpi51.h
@@ -2,7 +2,7 @@
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 - 2018, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2014 - 2022, Intel Corporation. All rights reserved.<BR>
(C) Copyright 2015 Hewlett Packard Enterprise Development LP<BR>
Copyright (c) 2020, ARM Ltd. All rights reserved.<BR>
SPDX-License-Identifier: BSD-2-Clause-Patent
@@ -13,6 +13,16 @@
#include <IndustryStandard/Acpi50.h>
+///
+/// _PSD Revision for ACPI 5.1
+///
+#define EFI_ACPI_5_1_AML_PSD_REVISION 0
+
+///
+/// _CPC Revision for ACPI 5.1
+///
+#define EFI_ACPI_5_1_AML_CPC_REVISION 2
+
//
// Ensure proper structure formats
//
@@ -22,21 +32,21 @@
/// ACPI 5.1 Generic Address Space definition
///
typedef struct {
- UINT8 AddressSpaceId;
- UINT8 RegisterBitWidth;
- UINT8 RegisterBitOffset;
- UINT8 AccessSize;
- UINT64 Address;
+ UINT8 AddressSpaceId;
+ UINT8 RegisterBitWidth;
+ UINT8 RegisterBitOffset;
+ UINT8 AccessSize;
+ UINT64 Address;
} EFI_ACPI_5_1_GENERIC_ADDRESS_STRUCTURE;
//
// Generic Address Space Address IDs
//
-#define EFI_ACPI_5_1_SYSTEM_MEMORY 0
-#define EFI_ACPI_5_1_SYSTEM_IO 1
-#define EFI_ACPI_5_1_PCI_CONFIGURATION_SPACE 2
-#define EFI_ACPI_5_1_EMBEDDED_CONTROLLER 3
-#define EFI_ACPI_5_1_SMBUS 4
+#define EFI_ACPI_5_1_SYSTEM_MEMORY 0
+#define EFI_ACPI_5_1_SYSTEM_IO 1
+#define EFI_ACPI_5_1_PCI_CONFIGURATION_SPACE 2
+#define EFI_ACPI_5_1_EMBEDDED_CONTROLLER 3
+#define EFI_ACPI_5_1_SMBUS 4
#define EFI_ACPI_5_1_PLATFORM_COMMUNICATION_CHANNEL 0x0A
#define EFI_ACPI_5_1_FUNCTIONAL_FIXED_HARDWARE 0x7F
@@ -57,29 +67,29 @@ typedef struct {
/// Root System Description Pointer Structure
///
typedef struct {
- UINT64 Signature;
- UINT8 Checksum;
- UINT8 OemId[6];
- UINT8 Revision;
- UINT32 RsdtAddress;
- UINT32 Length;
- UINT64 XsdtAddress;
- UINT8 ExtendedChecksum;
- UINT8 Reserved[3];
+ UINT64 Signature;
+ UINT8 Checksum;
+ UINT8 OemId[6];
+ UINT8 Revision;
+ UINT32 RsdtAddress;
+ UINT32 Length;
+ UINT64 XsdtAddress;
+ UINT8 ExtendedChecksum;
+ UINT8 Reserved[3];
} EFI_ACPI_5_1_ROOT_SYSTEM_DESCRIPTION_POINTER;
///
/// RSD_PTR Revision (as defined in ACPI 5.1 spec.)
///
-#define EFI_ACPI_5_1_ROOT_SYSTEM_DESCRIPTION_POINTER_REVISION 0x02 ///< ACPISpec (Revision 5.1) says current value is 2
+#define EFI_ACPI_5_1_ROOT_SYSTEM_DESCRIPTION_POINTER_REVISION 0x02 ///< ACPISpec (Revision 5.1) says current value is 2
///
/// Common table header, this prefaces all ACPI tables, including FACS, but
/// excluding the RSD PTR structure
///
typedef struct {
- UINT32 Signature;
- UINT32 Length;
+ UINT32 Signature;
+ UINT32 Length;
} EFI_ACPI_5_1_COMMON_HEADER;
//
@@ -91,7 +101,7 @@ typedef struct {
///
/// RSDT Revision (as defined in ACPI 5.1 spec.)
///
-#define EFI_ACPI_5_1_ROOT_SYSTEM_DESCRIPTION_TABLE_REVISION 0x01
+#define EFI_ACPI_5_1_ROOT_SYSTEM_DESCRIPTION_TABLE_REVISION 0x01
//
// Extended System Description Table
@@ -102,73 +112,73 @@ typedef struct {
///
/// XSDT Revision (as defined in ACPI 5.1 spec.)
///
-#define EFI_ACPI_5_1_EXTENDED_SYSTEM_DESCRIPTION_TABLE_REVISION 0x01
+#define EFI_ACPI_5_1_EXTENDED_SYSTEM_DESCRIPTION_TABLE_REVISION 0x01
///
/// Fixed ACPI Description Table Structure (FADT)
///
typedef struct {
- EFI_ACPI_DESCRIPTION_HEADER Header;
- UINT32 FirmwareCtrl;
- UINT32 Dsdt;
- UINT8 Reserved0;
- UINT8 PreferredPmProfile;
- UINT16 SciInt;
- UINT32 SmiCmd;
- UINT8 AcpiEnable;
- UINT8 AcpiDisable;
- UINT8 S4BiosReq;
- UINT8 PstateCnt;
- UINT32 Pm1aEvtBlk;
- UINT32 Pm1bEvtBlk;
- UINT32 Pm1aCntBlk;
- UINT32 Pm1bCntBlk;
- UINT32 Pm2CntBlk;
- UINT32 PmTmrBlk;
- UINT32 Gpe0Blk;
- UINT32 Gpe1Blk;
- UINT8 Pm1EvtLen;
- UINT8 Pm1CntLen;
- UINT8 Pm2CntLen;
- UINT8 PmTmrLen;
- UINT8 Gpe0BlkLen;
- UINT8 Gpe1BlkLen;
- UINT8 Gpe1Base;
- UINT8 CstCnt;
- UINT16 PLvl2Lat;
- UINT16 PLvl3Lat;
- UINT16 FlushSize;
- UINT16 FlushStride;
- UINT8 DutyOffset;
- UINT8 DutyWidth;
- UINT8 DayAlrm;
- UINT8 MonAlrm;
- UINT8 Century;
- UINT16 IaPcBootArch;
- UINT8 Reserved1;
- UINT32 Flags;
- EFI_ACPI_5_1_GENERIC_ADDRESS_STRUCTURE ResetReg;
- UINT8 ResetValue;
- UINT16 ArmBootArch;
- UINT8 MinorVersion;
- UINT64 XFirmwareCtrl;
- UINT64 XDsdt;
- EFI_ACPI_5_1_GENERIC_ADDRESS_STRUCTURE XPm1aEvtBlk;
- EFI_ACPI_5_1_GENERIC_ADDRESS_STRUCTURE XPm1bEvtBlk;
- EFI_ACPI_5_1_GENERIC_ADDRESS_STRUCTURE XPm1aCntBlk;
- EFI_ACPI_5_1_GENERIC_ADDRESS_STRUCTURE XPm1bCntBlk;
- EFI_ACPI_5_1_GENERIC_ADDRESS_STRUCTURE XPm2CntBlk;
- EFI_ACPI_5_1_GENERIC_ADDRESS_STRUCTURE XPmTmrBlk;
- EFI_ACPI_5_1_GENERIC_ADDRESS_STRUCTURE XGpe0Blk;
- EFI_ACPI_5_1_GENERIC_ADDRESS_STRUCTURE XGpe1Blk;
- EFI_ACPI_5_1_GENERIC_ADDRESS_STRUCTURE SleepControlReg;
- EFI_ACPI_5_1_GENERIC_ADDRESS_STRUCTURE SleepStatusReg;
+ EFI_ACPI_DESCRIPTION_HEADER Header;
+ UINT32 FirmwareCtrl;
+ UINT32 Dsdt;
+ UINT8 Reserved0;
+ UINT8 PreferredPmProfile;
+ UINT16 SciInt;
+ UINT32 SmiCmd;
+ UINT8 AcpiEnable;
+ UINT8 AcpiDisable;
+ UINT8 S4BiosReq;
+ UINT8 PstateCnt;
+ UINT32 Pm1aEvtBlk;
+ UINT32 Pm1bEvtBlk;
+ UINT32 Pm1aCntBlk;
+ UINT32 Pm1bCntBlk;
+ UINT32 Pm2CntBlk;
+ UINT32 PmTmrBlk;
+ UINT32 Gpe0Blk;
+ UINT32 Gpe1Blk;
+ UINT8 Pm1EvtLen;
+ UINT8 Pm1CntLen;
+ UINT8 Pm2CntLen;
+ UINT8 PmTmrLen;
+ UINT8 Gpe0BlkLen;
+ UINT8 Gpe1BlkLen;
+ UINT8 Gpe1Base;
+ UINT8 CstCnt;
+ UINT16 PLvl2Lat;
+ UINT16 PLvl3Lat;
+ UINT16 FlushSize;
+ UINT16 FlushStride;
+ UINT8 DutyOffset;
+ UINT8 DutyWidth;
+ UINT8 DayAlrm;
+ UINT8 MonAlrm;
+ UINT8 Century;
+ UINT16 IaPcBootArch;
+ UINT8 Reserved1;
+ UINT32 Flags;
+ EFI_ACPI_5_1_GENERIC_ADDRESS_STRUCTURE ResetReg;
+ UINT8 ResetValue;
+ UINT16 ArmBootArch;
+ UINT8 MinorVersion;
+ UINT64 XFirmwareCtrl;
+ UINT64 XDsdt;
+ EFI_ACPI_5_1_GENERIC_ADDRESS_STRUCTURE XPm1aEvtBlk;
+ EFI_ACPI_5_1_GENERIC_ADDRESS_STRUCTURE XPm1bEvtBlk;
+ EFI_ACPI_5_1_GENERIC_ADDRESS_STRUCTURE XPm1aCntBlk;
+ EFI_ACPI_5_1_GENERIC_ADDRESS_STRUCTURE XPm1bCntBlk;
+ EFI_ACPI_5_1_GENERIC_ADDRESS_STRUCTURE XPm2CntBlk;
+ EFI_ACPI_5_1_GENERIC_ADDRESS_STRUCTURE XPmTmrBlk;
+ EFI_ACPI_5_1_GENERIC_ADDRESS_STRUCTURE XGpe0Blk;
+ EFI_ACPI_5_1_GENERIC_ADDRESS_STRUCTURE XGpe1Blk;
+ EFI_ACPI_5_1_GENERIC_ADDRESS_STRUCTURE SleepControlReg;
+ EFI_ACPI_5_1_GENERIC_ADDRESS_STRUCTURE SleepStatusReg;
} EFI_ACPI_5_1_FIXED_ACPI_DESCRIPTION_TABLE;
///
/// FADT Version (as defined in ACPI 5.1 spec.)
///
-#define EFI_ACPI_5_1_FIXED_ACPI_DESCRIPTION_TABLE_REVISION 0x05
+#define EFI_ACPI_5_1_FIXED_ACPI_DESCRIPTION_TABLE_REVISION 0x05
#define EFI_ACPI_5_1_FIXED_ACPI_DESCRIPTION_TABLE_MINOR_REVISION 0x01
//
@@ -188,62 +198,62 @@ typedef struct {
// Fixed ACPI Description Table Boot Architecture Flags
// All other bits are reserved and must be set to 0.
//
-#define EFI_ACPI_5_1_LEGACY_DEVICES BIT0
-#define EFI_ACPI_5_1_8042 BIT1
-#define EFI_ACPI_5_1_VGA_NOT_PRESENT BIT2
-#define EFI_ACPI_5_1_MSI_NOT_SUPPORTED BIT3
-#define EFI_ACPI_5_1_PCIE_ASPM_CONTROLS BIT4
-#define EFI_ACPI_5_1_CMOS_RTC_NOT_PRESENT BIT5
+#define EFI_ACPI_5_1_LEGACY_DEVICES BIT0
+#define EFI_ACPI_5_1_8042 BIT1
+#define EFI_ACPI_5_1_VGA_NOT_PRESENT BIT2
+#define EFI_ACPI_5_1_MSI_NOT_SUPPORTED BIT3
+#define EFI_ACPI_5_1_PCIE_ASPM_CONTROLS BIT4
+#define EFI_ACPI_5_1_CMOS_RTC_NOT_PRESENT BIT5
//
// Fixed ACPI Description Table Arm Boot Architecture Flags
// All other bits are reserved and must be set to 0.
//
-#define EFI_ACPI_5_1_ARM_PSCI_COMPLIANT BIT0
-#define EFI_ACPI_5_1_ARM_PSCI_USE_HVC BIT1
+#define EFI_ACPI_5_1_ARM_PSCI_COMPLIANT BIT0
+#define EFI_ACPI_5_1_ARM_PSCI_USE_HVC BIT1
//
// Fixed ACPI Description Table Fixed Feature Flags
// All other bits are reserved and must be set to 0.
//
-#define EFI_ACPI_5_1_WBINVD BIT0
-#define EFI_ACPI_5_1_WBINVD_FLUSH BIT1
-#define EFI_ACPI_5_1_PROC_C1 BIT2
-#define EFI_ACPI_5_1_P_LVL2_UP BIT3
-#define EFI_ACPI_5_1_PWR_BUTTON BIT4
-#define EFI_ACPI_5_1_SLP_BUTTON BIT5
-#define EFI_ACPI_5_1_FIX_RTC BIT6
-#define EFI_ACPI_5_1_RTC_S4 BIT7
-#define EFI_ACPI_5_1_TMR_VAL_EXT BIT8
-#define EFI_ACPI_5_1_DCK_CAP BIT9
-#define EFI_ACPI_5_1_RESET_REG_SUP BIT10
-#define EFI_ACPI_5_1_SEALED_CASE BIT11
-#define EFI_ACPI_5_1_HEADLESS BIT12
-#define EFI_ACPI_5_1_CPU_SW_SLP BIT13
-#define EFI_ACPI_5_1_PCI_EXP_WAK BIT14
-#define EFI_ACPI_5_1_USE_PLATFORM_CLOCK BIT15
-#define EFI_ACPI_5_1_S4_RTC_STS_VALID BIT16
-#define EFI_ACPI_5_1_REMOTE_POWER_ON_CAPABLE BIT17
-#define EFI_ACPI_5_1_FORCE_APIC_CLUSTER_MODEL BIT18
-#define EFI_ACPI_5_1_FORCE_APIC_PHYSICAL_DESTINATION_MODE BIT19
-#define EFI_ACPI_5_1_HW_REDUCED_ACPI BIT20
-#define EFI_ACPI_5_1_LOW_POWER_S0_IDLE_CAPABLE BIT21
+#define EFI_ACPI_5_1_WBINVD BIT0
+#define EFI_ACPI_5_1_WBINVD_FLUSH BIT1
+#define EFI_ACPI_5_1_PROC_C1 BIT2
+#define EFI_ACPI_5_1_P_LVL2_UP BIT3
+#define EFI_ACPI_5_1_PWR_BUTTON BIT4
+#define EFI_ACPI_5_1_SLP_BUTTON BIT5
+#define EFI_ACPI_5_1_FIX_RTC BIT6
+#define EFI_ACPI_5_1_RTC_S4 BIT7
+#define EFI_ACPI_5_1_TMR_VAL_EXT BIT8
+#define EFI_ACPI_5_1_DCK_CAP BIT9
+#define EFI_ACPI_5_1_RESET_REG_SUP BIT10
+#define EFI_ACPI_5_1_SEALED_CASE BIT11
+#define EFI_ACPI_5_1_HEADLESS BIT12
+#define EFI_ACPI_5_1_CPU_SW_SLP BIT13
+#define EFI_ACPI_5_1_PCI_EXP_WAK BIT14
+#define EFI_ACPI_5_1_USE_PLATFORM_CLOCK BIT15
+#define EFI_ACPI_5_1_S4_RTC_STS_VALID BIT16
+#define EFI_ACPI_5_1_REMOTE_POWER_ON_CAPABLE BIT17
+#define EFI_ACPI_5_1_FORCE_APIC_CLUSTER_MODEL BIT18
+#define EFI_ACPI_5_1_FORCE_APIC_PHYSICAL_DESTINATION_MODE BIT19
+#define EFI_ACPI_5_1_HW_REDUCED_ACPI BIT20
+#define EFI_ACPI_5_1_LOW_POWER_S0_IDLE_CAPABLE BIT21
///
/// Firmware ACPI Control Structure
///
typedef struct {
- UINT32 Signature;
- UINT32 Length;
- UINT32 HardwareSignature;
- UINT32 FirmwareWakingVector;
- UINT32 GlobalLock;
- UINT32 Flags;
- UINT64 XFirmwareWakingVector;
- UINT8 Version;
- UINT8 Reserved0[3];
- UINT32 OspmFlags;
- UINT8 Reserved1[24];
+ UINT32 Signature;
+ UINT32 Length;
+ UINT32 HardwareSignature;
+ UINT32 FirmwareWakingVector;
+ UINT32 GlobalLock;
+ UINT32 Flags;
+ UINT64 XFirmwareWakingVector;
+ UINT8 Version;
+ UINT8 Reserved0[3];
+ UINT32 OspmFlags;
+ UINT8 Reserved1[24];
} EFI_ACPI_5_1_FIRMWARE_ACPI_CONTROL_STRUCTURE;
///
@@ -255,14 +265,14 @@ typedef struct {
/// Firmware Control Structure Feature Flags
/// All other bits are reserved and must be set to 0.
///
-#define EFI_ACPI_5_1_S4BIOS_F BIT0
-#define EFI_ACPI_5_1_64BIT_WAKE_SUPPORTED_F BIT1
+#define EFI_ACPI_5_1_S4BIOS_F BIT0
+#define EFI_ACPI_5_1_64BIT_WAKE_SUPPORTED_F BIT1
///
/// OSPM Enabled Firmware Control Structure Flags
/// All other bits are reserved and must be set to 0.
///
-#define EFI_ACPI_5_1_OSPM_64BIT_WAKE_F BIT0
+#define EFI_ACPI_5_1_OSPM_64BIT_WAKE_F BIT0
//
// Differentiated System Description Table,
@@ -271,29 +281,29 @@ typedef struct {
// no definition needed as they are common description table header, the same with
// EFI_ACPI_DESCRIPTION_HEADER, followed by a definition block.
//
-#define EFI_ACPI_5_1_DIFFERENTIATED_SYSTEM_DESCRIPTION_TABLE_REVISION 0x02
-#define EFI_ACPI_5_1_SECONDARY_SYSTEM_DESCRIPTION_TABLE_REVISION 0x02
+#define EFI_ACPI_5_1_DIFFERENTIATED_SYSTEM_DESCRIPTION_TABLE_REVISION 0x02
+#define EFI_ACPI_5_1_SECONDARY_SYSTEM_DESCRIPTION_TABLE_REVISION 0x02
///
/// Multiple APIC Description Table header definition. The rest of the table
/// must be defined in a platform specific manner.
///
typedef struct {
- EFI_ACPI_DESCRIPTION_HEADER Header;
- UINT32 LocalApicAddress;
- UINT32 Flags;
+ EFI_ACPI_DESCRIPTION_HEADER Header;
+ UINT32 LocalApicAddress;
+ UINT32 Flags;
} EFI_ACPI_5_1_MULTIPLE_APIC_DESCRIPTION_TABLE_HEADER;
///
/// MADT Revision (as defined in ACPI 5.1 spec.)
///
-#define EFI_ACPI_5_1_MULTIPLE_APIC_DESCRIPTION_TABLE_REVISION 0x03
+#define EFI_ACPI_5_1_MULTIPLE_APIC_DESCRIPTION_TABLE_REVISION 0x03
///
/// Multiple APIC Flags
/// All other bits are reserved and must be set to 0.
///
-#define EFI_ACPI_5_1_PCAT_COMPAT BIT0
+#define EFI_ACPI_5_1_PCAT_COMPAT BIT0
//
// Multiple APIC Description Table APIC structure types
@@ -324,57 +334,57 @@ typedef struct {
/// Processor Local APIC Structure Definition
///
typedef struct {
- UINT8 Type;
- UINT8 Length;
- UINT8 AcpiProcessorId;
- UINT8 ApicId;
- UINT32 Flags;
+ UINT8 Type;
+ UINT8 Length;
+ UINT8 AcpiProcessorId;
+ UINT8 ApicId;
+ UINT32 Flags;
} EFI_ACPI_5_1_PROCESSOR_LOCAL_APIC_STRUCTURE;
///
/// Local APIC Flags. All other bits are reserved and must be 0.
///
-#define EFI_ACPI_5_1_LOCAL_APIC_ENABLED BIT0
+#define EFI_ACPI_5_1_LOCAL_APIC_ENABLED BIT0
///
/// IO APIC Structure
///
typedef struct {
- UINT8 Type;
- UINT8 Length;
- UINT8 IoApicId;
- UINT8 Reserved;
- UINT32 IoApicAddress;
- UINT32 GlobalSystemInterruptBase;
+ UINT8 Type;
+ UINT8 Length;
+ UINT8 IoApicId;
+ UINT8 Reserved;
+ UINT32 IoApicAddress;
+ UINT32 GlobalSystemInterruptBase;
} EFI_ACPI_5_1_IO_APIC_STRUCTURE;
///
/// Interrupt Source Override Structure
///
typedef struct {
- UINT8 Type;
- UINT8 Length;
- UINT8 Bus;
- UINT8 Source;
- UINT32 GlobalSystemInterrupt;
- UINT16 Flags;
+ UINT8 Type;
+ UINT8 Length;
+ UINT8 Bus;
+ UINT8 Source;
+ UINT32 GlobalSystemInterrupt;
+ UINT16 Flags;
} EFI_ACPI_5_1_INTERRUPT_SOURCE_OVERRIDE_STRUCTURE;
///
/// Platform Interrupt Sources Structure Definition
///
typedef struct {
- UINT8 Type;
- UINT8 Length;
- UINT16 Flags;
- UINT8 InterruptType;
- UINT8 ProcessorId;
- UINT8 ProcessorEid;
- UINT8 IoSapicVector;
- UINT32 GlobalSystemInterrupt;
- UINT32 PlatformInterruptSourceFlags;
- UINT8 CpeiProcessorOverride;
- UINT8 Reserved[31];
+ UINT8 Type;
+ UINT8 Length;
+ UINT16 Flags;
+ UINT8 InterruptType;
+ UINT8 ProcessorId;
+ UINT8 ProcessorEid;
+ UINT8 IoSapicVector;
+ UINT32 GlobalSystemInterrupt;
+ UINT32 PlatformInterruptSourceFlags;
+ UINT8 CpeiProcessorOverride;
+ UINT8 Reserved[31];
} EFI_ACPI_5_1_PLATFORM_INTERRUPT_APIC_STRUCTURE;
//
@@ -388,43 +398,43 @@ typedef struct {
/// Non-Maskable Interrupt Source Structure
///
typedef struct {
- UINT8 Type;
- UINT8 Length;
- UINT16 Flags;
- UINT32 GlobalSystemInterrupt;
+ UINT8 Type;
+ UINT8 Length;
+ UINT16 Flags;
+ UINT32 GlobalSystemInterrupt;
} EFI_ACPI_5_1_NON_MASKABLE_INTERRUPT_SOURCE_STRUCTURE;
///
/// Local APIC NMI Structure
///
typedef struct {
- UINT8 Type;
- UINT8 Length;
- UINT8 AcpiProcessorId;
- UINT16 Flags;
- UINT8 LocalApicLint;
+ UINT8 Type;
+ UINT8 Length;
+ UINT8 AcpiProcessorId;
+ UINT16 Flags;
+ UINT8 LocalApicLint;
} EFI_ACPI_5_1_LOCAL_APIC_NMI_STRUCTURE;
///
/// Local APIC Address Override Structure
///
typedef struct {
- UINT8 Type;
- UINT8 Length;
- UINT16 Reserved;
- UINT64 LocalApicAddress;
+ UINT8 Type;
+ UINT8 Length;
+ UINT16 Reserved;
+ UINT64 LocalApicAddress;
} EFI_ACPI_5_1_LOCAL_APIC_ADDRESS_OVERRIDE_STRUCTURE;
///
/// IO SAPIC Structure
///
typedef struct {
- UINT8 Type;
- UINT8 Length;
- UINT8 IoApicId;
- UINT8 Reserved;
- UINT32 GlobalSystemInterruptBase;
- UINT64 IoSapicAddress;
+ UINT8 Type;
+ UINT8 Length;
+ UINT8 IoApicId;
+ UINT8 Reserved;
+ UINT32 GlobalSystemInterruptBase;
+ UINT64 IoSapicAddress;
} EFI_ACPI_5_1_IO_SAPIC_STRUCTURE;
///
@@ -432,155 +442,155 @@ typedef struct {
/// This struct followed by a null-terminated ASCII string - ACPI Processor UID String
///
typedef struct {
- UINT8 Type;
- UINT8 Length;
- UINT8 AcpiProcessorId;
- UINT8 LocalSapicId;
- UINT8 LocalSapicEid;
- UINT8 Reserved[3];
- UINT32 Flags;
- UINT32 ACPIProcessorUIDValue;
+ UINT8 Type;
+ UINT8 Length;
+ UINT8 AcpiProcessorId;
+ UINT8 LocalSapicId;
+ UINT8 LocalSapicEid;
+ UINT8 Reserved[3];
+ UINT32 Flags;
+ UINT32 ACPIProcessorUIDValue;
} EFI_ACPI_5_1_PROCESSOR_LOCAL_SAPIC_STRUCTURE;
///
/// Platform Interrupt Sources Structure
///
typedef struct {
- UINT8 Type;
- UINT8 Length;
- UINT16 Flags;
- UINT8 InterruptType;
- UINT8 ProcessorId;
- UINT8 ProcessorEid;
- UINT8 IoSapicVector;
- UINT32 GlobalSystemInterrupt;
- UINT32 PlatformInterruptSourceFlags;
+ UINT8 Type;
+ UINT8 Length;
+ UINT16 Flags;
+ UINT8 InterruptType;
+ UINT8 ProcessorId;
+ UINT8 ProcessorEid;
+ UINT8 IoSapicVector;
+ UINT32 GlobalSystemInterrupt;
+ UINT32 PlatformInterruptSourceFlags;
} EFI_ACPI_5_1_PLATFORM_INTERRUPT_SOURCES_STRUCTURE;
///
/// Platform Interrupt Source Flags.
/// All other bits are reserved and must be set to 0.
///
-#define EFI_ACPI_5_1_CPEI_PROCESSOR_OVERRIDE BIT0
+#define EFI_ACPI_5_1_CPEI_PROCESSOR_OVERRIDE BIT0
///
/// Processor Local x2APIC Structure Definition
///
typedef struct {
- UINT8 Type;
- UINT8 Length;
- UINT8 Reserved[2];
- UINT32 X2ApicId;
- UINT32 Flags;
- UINT32 AcpiProcessorUid;
+ UINT8 Type;
+ UINT8 Length;
+ UINT8 Reserved[2];
+ UINT32 X2ApicId;
+ UINT32 Flags;
+ UINT32 AcpiProcessorUid;
} EFI_ACPI_5_1_PROCESSOR_LOCAL_X2APIC_STRUCTURE;
///
/// Local x2APIC NMI Structure
///
typedef struct {
- UINT8 Type;
- UINT8 Length;
- UINT16 Flags;
- UINT32 AcpiProcessorUid;
- UINT8 LocalX2ApicLint;
- UINT8 Reserved[3];
+ UINT8 Type;
+ UINT8 Length;
+ UINT16 Flags;
+ UINT32 AcpiProcessorUid;
+ UINT8 LocalX2ApicLint;
+ UINT8 Reserved[3];
} EFI_ACPI_5_1_LOCAL_X2APIC_NMI_STRUCTURE;
///
/// GIC Structure
///
typedef struct {
- UINT8 Type;
- UINT8 Length;
- UINT16 Reserved;
- UINT32 CPUInterfaceNumber;
- UINT32 AcpiProcessorUid;
- UINT32 Flags;
- UINT32 ParkingProtocolVersion;
- UINT32 PerformanceInterruptGsiv;
- UINT64 ParkedAddress;
- UINT64 PhysicalBaseAddress;
- UINT64 GICV;
- UINT64 GICH;
- UINT32 VGICMaintenanceInterrupt;
- UINT64 GICRBaseAddress;
- UINT64 MPIDR;
+ UINT8 Type;
+ UINT8 Length;
+ UINT16 Reserved;
+ UINT32 CPUInterfaceNumber;
+ UINT32 AcpiProcessorUid;
+ UINT32 Flags;
+ UINT32 ParkingProtocolVersion;
+ UINT32 PerformanceInterruptGsiv;
+ UINT64 ParkedAddress;
+ UINT64 PhysicalBaseAddress;
+ UINT64 GICV;
+ UINT64 GICH;
+ UINT32 VGICMaintenanceInterrupt;
+ UINT64 GICRBaseAddress;
+ UINT64 MPIDR;
} EFI_ACPI_5_1_GIC_STRUCTURE;
///
/// GIC Flags. All other bits are reserved and must be 0.
///
-#define EFI_ACPI_5_1_GIC_ENABLED BIT0
-#define EFI_ACPI_5_1_PERFORMANCE_INTERRUPT_MODEL BIT1
-#define EFI_ACPI_5_1_VGIC_MAINTENANCE_INTERRUPT_MODE_FLAGS BIT2
+#define EFI_ACPI_5_1_GIC_ENABLED BIT0
+#define EFI_ACPI_5_1_PERFORMANCE_INTERRUPT_MODEL BIT1
+#define EFI_ACPI_5_1_VGIC_MAINTENANCE_INTERRUPT_MODE_FLAGS BIT2
///
/// GIC Distributor Structure
///
typedef struct {
- UINT8 Type;
- UINT8 Length;
- UINT16 Reserved1;
- UINT32 GicId;
- UINT64 PhysicalBaseAddress;
- UINT32 SystemVectorBase;
- UINT8 GicVersion;
- UINT8 Reserved2[3];
+ UINT8 Type;
+ UINT8 Length;
+ UINT16 Reserved1;
+ UINT32 GicId;
+ UINT64 PhysicalBaseAddress;
+ UINT32 SystemVectorBase;
+ UINT8 GicVersion;
+ UINT8 Reserved2[3];
} EFI_ACPI_5_1_GIC_DISTRIBUTOR_STRUCTURE;
///
/// GIC Version
///
-#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
+#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
///
/// GIC MSI Frame Structure
///
typedef struct {
- UINT8 Type;
- UINT8 Length;
- UINT16 Reserved1;
- UINT32 GicMsiFrameId;
- UINT64 PhysicalBaseAddress;
- UINT32 Flags;
- UINT16 SPICount;
- UINT16 SPIBase;
+ UINT8 Type;
+ UINT8 Length;
+ UINT16 Reserved1;
+ UINT32 GicMsiFrameId;
+ UINT64 PhysicalBaseAddress;
+ UINT32 Flags;
+ UINT16 SPICount;
+ UINT16 SPIBase;
} EFI_ACPI_5_1_GIC_MSI_FRAME_STRUCTURE;
///
/// GIC MSI Frame Flags. All other bits are reserved and must be 0.
///
-#define EFI_ACPI_5_1_SPI_COUNT_BASE_SELECT BIT0
+#define EFI_ACPI_5_1_SPI_COUNT_BASE_SELECT BIT0
///
/// GICR Structure
///
typedef struct {
- UINT8 Type;
- UINT8 Length;
- UINT16 Reserved;
- UINT64 DiscoveryRangeBaseAddress;
- UINT32 DiscoveryRangeLength;
+ UINT8 Type;
+ UINT8 Length;
+ UINT16 Reserved;
+ UINT64 DiscoveryRangeBaseAddress;
+ UINT32 DiscoveryRangeLength;
} EFI_ACPI_5_1_GICR_STRUCTURE;
///
/// Smart Battery Description Table (SBST)
///
typedef struct {
- EFI_ACPI_DESCRIPTION_HEADER Header;
- UINT32 WarningEnergyLevel;
- UINT32 LowEnergyLevel;
- UINT32 CriticalEnergyLevel;
+ EFI_ACPI_DESCRIPTION_HEADER Header;
+ UINT32 WarningEnergyLevel;
+ UINT32 LowEnergyLevel;
+ UINT32 CriticalEnergyLevel;
} EFI_ACPI_5_1_SMART_BATTERY_DESCRIPTION_TABLE;
///
/// SBST Version (as defined in ACPI 5.1 spec.)
///
-#define EFI_ACPI_5_1_SMART_BATTERY_DESCRIPTION_TABLE_REVISION 0x01
+#define EFI_ACPI_5_1_SMART_BATTERY_DESCRIPTION_TABLE_REVISION 0x01
///
/// Embedded Controller Boot Resources Table (ECDT)
@@ -588,11 +598,11 @@ typedef struct {
/// a fully qualified reference to the name space object.
///
typedef struct {
- EFI_ACPI_DESCRIPTION_HEADER Header;
- EFI_ACPI_5_1_GENERIC_ADDRESS_STRUCTURE EcControl;
- EFI_ACPI_5_1_GENERIC_ADDRESS_STRUCTURE EcData;
- UINT32 Uid;
- UINT8 GpeBit;
+ EFI_ACPI_DESCRIPTION_HEADER Header;
+ EFI_ACPI_5_1_GENERIC_ADDRESS_STRUCTURE EcControl;
+ EFI_ACPI_5_1_GENERIC_ADDRESS_STRUCTURE EcData;
+ UINT32 Uid;
+ UINT8 GpeBit;
} EFI_ACPI_5_1_EMBEDDED_CONTROLLER_BOOT_RESOURCES_TABLE;
///
@@ -605,9 +615,9 @@ typedef struct {
/// must be defined in a platform specific manner.
///
typedef struct {
- EFI_ACPI_DESCRIPTION_HEADER Header;
- UINT32 Reserved1; ///< Must be set to 1
- UINT64 Reserved2;
+ EFI_ACPI_DESCRIPTION_HEADER Header;
+ UINT32 Reserved1; ///< Must be set to 1
+ UINT64 Reserved2;
} EFI_ACPI_5_1_SYSTEM_RESOURCE_AFFINITY_TABLE_HEADER;
///
@@ -629,83 +639,83 @@ typedef struct {
/// Processor Local APIC/SAPIC Affinity Structure Definition
///
typedef struct {
- UINT8 Type;
- UINT8 Length;
- UINT8 ProximityDomain7To0;
- UINT8 ApicId;
- UINT32 Flags;
- UINT8 LocalSapicEid;
- UINT8 ProximityDomain31To8[3];
- UINT32 ClockDomain;
+ UINT8 Type;
+ UINT8 Length;
+ UINT8 ProximityDomain7To0;
+ UINT8 ApicId;
+ UINT32 Flags;
+ UINT8 LocalSapicEid;
+ UINT8 ProximityDomain31To8[3];
+ UINT32 ClockDomain;
} EFI_ACPI_5_1_PROCESSOR_LOCAL_APIC_SAPIC_AFFINITY_STRUCTURE;
///
/// Local APIC/SAPIC Flags. All other bits are reserved and must be 0.
///
-#define EFI_ACPI_5_1_PROCESSOR_LOCAL_APIC_SAPIC_ENABLED (1 << 0)
+#define EFI_ACPI_5_1_PROCESSOR_LOCAL_APIC_SAPIC_ENABLED (1 << 0)
///
/// Memory Affinity Structure Definition
///
typedef struct {
- UINT8 Type;
- UINT8 Length;
- UINT32 ProximityDomain;
- UINT16 Reserved1;
- UINT32 AddressBaseLow;
- UINT32 AddressBaseHigh;
- UINT32 LengthLow;
- UINT32 LengthHigh;
- UINT32 Reserved2;
- UINT32 Flags;
- UINT64 Reserved3;
+ UINT8 Type;
+ UINT8 Length;
+ UINT32 ProximityDomain;
+ UINT16 Reserved1;
+ UINT32 AddressBaseLow;
+ UINT32 AddressBaseHigh;
+ UINT32 LengthLow;
+ UINT32 LengthHigh;
+ UINT32 Reserved2;
+ UINT32 Flags;
+ UINT64 Reserved3;
} EFI_ACPI_5_1_MEMORY_AFFINITY_STRUCTURE;
//
// Memory Flags. All other bits are reserved and must be 0.
//
-#define EFI_ACPI_5_1_MEMORY_ENABLED (1 << 0)
-#define EFI_ACPI_5_1_MEMORY_HOT_PLUGGABLE (1 << 1)
-#define EFI_ACPI_5_1_MEMORY_NONVOLATILE (1 << 2)
+#define EFI_ACPI_5_1_MEMORY_ENABLED (1 << 0)
+#define EFI_ACPI_5_1_MEMORY_HOT_PLUGGABLE (1 << 1)
+#define EFI_ACPI_5_1_MEMORY_NONVOLATILE (1 << 2)
///
/// Processor Local x2APIC Affinity Structure Definition
///
typedef struct {
- UINT8 Type;
- UINT8 Length;
- UINT8 Reserved1[2];
- UINT32 ProximityDomain;
- UINT32 X2ApicId;
- UINT32 Flags;
- UINT32 ClockDomain;
- UINT8 Reserved2[4];
+ UINT8 Type;
+ UINT8 Length;
+ UINT8 Reserved1[2];
+ UINT32 ProximityDomain;
+ UINT32 X2ApicId;
+ UINT32 Flags;
+ UINT32 ClockDomain;
+ UINT8 Reserved2[4];
} EFI_ACPI_5_1_PROCESSOR_LOCAL_X2APIC_AFFINITY_STRUCTURE;
///
/// GICC Affinity Structure Definition
///
typedef struct {
- UINT8 Type;
- UINT8 Length;
- UINT32 ProximityDomain;
- UINT32 AcpiProcessorUid;
- UINT32 Flags;
- UINT32 ClockDomain;
+ UINT8 Type;
+ UINT8 Length;
+ UINT32 ProximityDomain;
+ UINT32 AcpiProcessorUid;
+ UINT32 Flags;
+ UINT32 ClockDomain;
} EFI_ACPI_5_1_GICC_AFFINITY_STRUCTURE;
///
/// GICC Flags. All other bits are reserved and must be 0.
///
-#define EFI_ACPI_5_1_GICC_ENABLED (1 << 0)
+#define EFI_ACPI_5_1_GICC_ENABLED (1 << 0)
///
/// System Locality Distance Information Table (SLIT).
/// The rest of the table is a matrix.
///
typedef struct {
- EFI_ACPI_DESCRIPTION_HEADER Header;
- UINT64 NumberOfSystemLocalities;
+ EFI_ACPI_DESCRIPTION_HEADER Header;
+ UINT64 NumberOfSystemLocalities;
} EFI_ACPI_5_1_SYSTEM_LOCALITY_DISTANCE_INFORMATION_TABLE_HEADER;
///
@@ -717,14 +727,14 @@ typedef struct {
/// Corrected Platform Error Polling Table (CPEP)
///
typedef struct {
- EFI_ACPI_DESCRIPTION_HEADER Header;
- UINT8 Reserved[8];
+ EFI_ACPI_DESCRIPTION_HEADER Header;
+ UINT8 Reserved[8];
} EFI_ACPI_5_1_CORRECTED_PLATFORM_ERROR_POLLING_TABLE_HEADER;
///
/// CPEP Version (as defined in ACPI 5.1 spec.)
///
-#define EFI_ACPI_5_1_CORRECTED_PLATFORM_ERROR_POLLING_TABLE_REVISION 0x01
+#define EFI_ACPI_5_1_CORRECTED_PLATFORM_ERROR_POLLING_TABLE_REVISION 0x01
//
// CPEP processor structure types.
@@ -735,66 +745,66 @@ typedef struct {
/// Corrected Platform Error Polling Processor Structure Definition
///
typedef struct {
- UINT8 Type;
- UINT8 Length;
- UINT8 ProcessorId;
- UINT8 ProcessorEid;
- UINT32 PollingInterval;
+ UINT8 Type;
+ UINT8 Length;
+ UINT8 ProcessorId;
+ UINT8 ProcessorEid;
+ UINT32 PollingInterval;
} EFI_ACPI_5_1_CPEP_PROCESSOR_APIC_SAPIC_STRUCTURE;
///
/// Maximum System Characteristics Table (MSCT)
///
typedef struct {
- EFI_ACPI_DESCRIPTION_HEADER Header;
- UINT32 OffsetProxDomInfo;
- UINT32 MaximumNumberOfProximityDomains;
- UINT32 MaximumNumberOfClockDomains;
- UINT64 MaximumPhysicalAddress;
+ EFI_ACPI_DESCRIPTION_HEADER Header;
+ UINT32 OffsetProxDomInfo;
+ UINT32 MaximumNumberOfProximityDomains;
+ UINT32 MaximumNumberOfClockDomains;
+ UINT64 MaximumPhysicalAddress;
} EFI_ACPI_5_1_MAXIMUM_SYSTEM_CHARACTERISTICS_TABLE_HEADER;
///
/// MSCT Version (as defined in ACPI 5.1 spec.)
///
-#define EFI_ACPI_5_1_MAXIMUM_SYSTEM_CHARACTERISTICS_TABLE_REVISION 0x01
+#define EFI_ACPI_5_1_MAXIMUM_SYSTEM_CHARACTERISTICS_TABLE_REVISION 0x01
///
/// Maximum Proximity Domain Information Structure Definition
///
typedef struct {
- UINT8 Revision;
- UINT8 Length;
- UINT32 ProximityDomainRangeLow;
- UINT32 ProximityDomainRangeHigh;
- UINT32 MaximumProcessorCapacity;
- UINT64 MaximumMemoryCapacity;
+ UINT8 Revision;
+ UINT8 Length;
+ UINT32 ProximityDomainRangeLow;
+ UINT32 ProximityDomainRangeHigh;
+ UINT32 MaximumProcessorCapacity;
+ UINT64 MaximumMemoryCapacity;
} EFI_ACPI_5_1_MAXIMUM_PROXIMITY_DOMAIN_INFORMATION_STRUCTURE;
///
/// ACPI RAS Feature Table definition.
///
typedef struct {
- EFI_ACPI_DESCRIPTION_HEADER Header;
- UINT8 PlatformCommunicationChannelIdentifier[12];
+ EFI_ACPI_DESCRIPTION_HEADER Header;
+ UINT8 PlatformCommunicationChannelIdentifier[12];
} EFI_ACPI_5_1_RAS_FEATURE_TABLE;
///
/// RASF Version (as defined in ACPI 5.1 spec.)
///
-#define EFI_ACPI_5_1_RAS_FEATURE_TABLE_REVISION 0x01
+#define EFI_ACPI_5_1_RAS_FEATURE_TABLE_REVISION 0x01
///
/// ACPI RASF Platform Communication Channel Shared Memory Region definition.
///
typedef struct {
- UINT32 Signature;
- UINT16 Command;
- UINT16 Status;
- UINT16 Version;
- UINT8 RASCapabilities[16];
- UINT8 SetRASCapabilities[16];
- UINT16 NumberOfRASFParameterBlocks;
- UINT32 SetRASCapabilitiesStatus;
+ UINT32 Signature;
+ UINT16 Command;
+ UINT16 Status;
+ UINT16 Version;
+ UINT8 RASCapabilities[16];
+ UINT8 SetRASCapabilities[16];
+ UINT16 NumberOfRASFParameterBlocks;
+ UINT32 SetRASCapabilitiesStatus;
} EFI_ACPI_5_1_RASF_PLATFORM_COMMUNICATION_CHANNEL_SHARED_MEMORY_REGION;
///
@@ -812,52 +822,52 @@ typedef struct {
/// ACPI RASF Parameter Block structure for PATROL_SCRUB
///
typedef struct {
- UINT16 Type;
- UINT16 Version;
- UINT16 Length;
- UINT16 PatrolScrubCommand;
- UINT64 RequestedAddressRange[2];
- UINT64 ActualAddressRange[2];
- UINT16 Flags;
- UINT8 RequestedSpeed;
+ UINT16 Type;
+ UINT16 Version;
+ UINT16 Length;
+ UINT16 PatrolScrubCommand;
+ UINT64 RequestedAddressRange[2];
+ UINT64 ActualAddressRange[2];
+ UINT16 Flags;
+ UINT8 RequestedSpeed;
} EFI_ACPI_5_1_RASF_PATROL_SCRUB_PLATFORM_BLOCK_STRUCTURE;
///
/// ACPI RASF Patrol Scrub command
///
-#define EFI_ACPI_5_1_RASF_PATROL_SCRUB_COMMAND_GET_PATROL_PARAMETERS 0x01
-#define EFI_ACPI_5_1_RASF_PATROL_SCRUB_COMMAND_START_PATROL_SCRUBBER 0x02
-#define EFI_ACPI_5_1_RASF_PATROL_SCRUB_COMMAND_STOP_PATROL_SCRUBBER 0x03
+#define EFI_ACPI_5_1_RASF_PATROL_SCRUB_COMMAND_GET_PATROL_PARAMETERS 0x01
+#define EFI_ACPI_5_1_RASF_PATROL_SCRUB_COMMAND_START_PATROL_SCRUBBER 0x02
+#define EFI_ACPI_5_1_RASF_PATROL_SCRUB_COMMAND_STOP_PATROL_SCRUBBER 0x03
///
/// Memory Power State Table definition.
///
typedef struct {
- EFI_ACPI_DESCRIPTION_HEADER Header;
- UINT8 PlatformCommunicationChannelIdentifier;
- UINT8 Reserved[3];
-// Memory Power Node Structure
-// Memory Power State Characteristics
+ EFI_ACPI_DESCRIPTION_HEADER Header;
+ UINT8 PlatformCommunicationChannelIdentifier;
+ UINT8 Reserved[3];
+ // Memory Power Node Structure
+ // Memory Power State Characteristics
} EFI_ACPI_5_1_MEMORY_POWER_STATUS_TABLE;
///
/// MPST Version (as defined in ACPI 5.1 spec.)
///
-#define EFI_ACPI_5_1_MEMORY_POWER_STATE_TABLE_REVISION 0x01
+#define EFI_ACPI_5_1_MEMORY_POWER_STATE_TABLE_REVISION 0x01
///
/// MPST Platform Communication Channel Shared Memory Region definition.
///
typedef struct {
- UINT32 Signature;
- UINT16 Command;
- UINT16 Status;
- UINT32 MemoryPowerCommandRegister;
- UINT32 MemoryPowerStatusRegister;
- UINT32 PowerStateId;
- UINT32 MemoryPowerNodeId;
- UINT64 MemoryEnergyConsumed;
- UINT64 ExpectedAveragePowerComsuned;
+ UINT32 Signature;
+ UINT16 Command;
+ UINT16 Status;
+ UINT32 MemoryPowerCommandRegister;
+ UINT32 MemoryPowerStatusRegister;
+ UINT32 PowerStateId;
+ UINT32 MemoryPowerNodeId;
+ UINT64 MemoryEnergyConsumed;
+ UINT64 ExpectedAveragePowerComsuned;
} EFI_ACPI_5_1_MPST_PLATFORM_COMMUNICATION_CHANNEL_SHARED_MEMORY_REGION;
///
@@ -868,186 +878,186 @@ typedef struct {
///
/// ACPI MPST Memory Power command
///
-#define EFI_ACPI_5_1_MPST_MEMORY_POWER_COMMAND_GET_MEMORY_POWER_STATE 0x01
-#define EFI_ACPI_5_1_MPST_MEMORY_POWER_COMMAND_SET_MEMORY_POWER_STATE 0x02
-#define EFI_ACPI_5_1_MPST_MEMORY_POWER_COMMAND_GET_AVERAGE_POWER_CONSUMED 0x03
-#define EFI_ACPI_5_1_MPST_MEMORY_POWER_COMMAND_GET_MEMORY_ENERGY_CONSUMED 0x04
+#define EFI_ACPI_5_1_MPST_MEMORY_POWER_COMMAND_GET_MEMORY_POWER_STATE 0x01
+#define EFI_ACPI_5_1_MPST_MEMORY_POWER_COMMAND_SET_MEMORY_POWER_STATE 0x02
+#define EFI_ACPI_5_1_MPST_MEMORY_POWER_COMMAND_GET_AVERAGE_POWER_CONSUMED 0x03
+#define EFI_ACPI_5_1_MPST_MEMORY_POWER_COMMAND_GET_MEMORY_ENERGY_CONSUMED 0x04
///
/// MPST Memory Power Node Table
///
typedef struct {
- UINT8 PowerStateValue;
- UINT8 PowerStateInformationIndex;
+ UINT8 PowerStateValue;
+ UINT8 PowerStateInformationIndex;
} EFI_ACPI_5_1_MPST_MEMORY_POWER_STATE;
typedef struct {
- UINT8 Flag;
- UINT8 Reserved;
- UINT16 MemoryPowerNodeId;
- UINT32 Length;
- UINT64 AddressBase;
- UINT64 AddressLength;
- UINT32 NumberOfPowerStates;
- UINT32 NumberOfPhysicalComponents;
-//EFI_ACPI_5_1_MPST_MEMORY_POWER_STATE MemoryPowerState[NumberOfPowerStates];
-//UINT16 PhysicalComponentIdentifier[NumberOfPhysicalComponents];
+ UINT8 Flag;
+ UINT8 Reserved;
+ UINT16 MemoryPowerNodeId;
+ UINT32 Length;
+ UINT64 AddressBase;
+ UINT64 AddressLength;
+ UINT32 NumberOfPowerStates;
+ UINT32 NumberOfPhysicalComponents;
+ // EFI_ACPI_5_1_MPST_MEMORY_POWER_STATE MemoryPowerState[NumberOfPowerStates];
+ // UINT16 PhysicalComponentIdentifier[NumberOfPhysicalComponents];
} EFI_ACPI_5_1_MPST_MEMORY_POWER_STRUCTURE;
-#define EFI_ACPI_5_1_MPST_MEMORY_POWER_STRUCTURE_FLAG_ENABLE 0x01
-#define EFI_ACPI_5_1_MPST_MEMORY_POWER_STRUCTURE_FLAG_POWER_MANAGED 0x02
-#define EFI_ACPI_5_1_MPST_MEMORY_POWER_STRUCTURE_FLAG_HOT_PLUGGABLE 0x04
+#define EFI_ACPI_5_1_MPST_MEMORY_POWER_STRUCTURE_FLAG_ENABLE 0x01
+#define EFI_ACPI_5_1_MPST_MEMORY_POWER_STRUCTURE_FLAG_POWER_MANAGED 0x02
+#define EFI_ACPI_5_1_MPST_MEMORY_POWER_STRUCTURE_FLAG_HOT_PLUGGABLE 0x04
typedef struct {
- UINT16 MemoryPowerNodeCount;
- UINT8 Reserved[2];
+ UINT16 MemoryPowerNodeCount;
+ UINT8 Reserved[2];
} EFI_ACPI_5_1_MPST_MEMORY_POWER_NODE_TABLE;
///
/// MPST Memory Power State Characteristics Table
///
typedef struct {
- UINT8 PowerStateStructureID;
- UINT8 Flag;
- UINT16 Reserved;
- UINT32 AveragePowerConsumedInMPS0;
- UINT32 RelativePowerSavingToMPS0;
- UINT64 ExitLatencyToMPS0;
+ UINT8 PowerStateStructureID;
+ UINT8 Flag;
+ UINT16 Reserved;
+ UINT32 AveragePowerConsumedInMPS0;
+ UINT32 RelativePowerSavingToMPS0;
+ UINT64 ExitLatencyToMPS0;
} EFI_ACPI_5_1_MPST_MEMORY_POWER_STATE_CHARACTERISTICS_STRUCTURE;
-#define EFI_ACPI_5_1_MPST_MEMORY_POWER_STATE_CHARACTERISTICS_STRUCTURE_FLAG_MEMORY_CONTENT_PRESERVED 0x01
-#define EFI_ACPI_5_1_MPST_MEMORY_POWER_STATE_CHARACTERISTICS_STRUCTURE_FLAG_AUTONOMOUS_MEMORY_POWER_STATE_ENTRY 0x02
-#define EFI_ACPI_5_1_MPST_MEMORY_POWER_STATE_CHARACTERISTICS_STRUCTURE_FLAG_AUTONOMOUS_MEMORY_POWER_STATE_EXIT 0x04
+#define EFI_ACPI_5_1_MPST_MEMORY_POWER_STATE_CHARACTERISTICS_STRUCTURE_FLAG_MEMORY_CONTENT_PRESERVED 0x01
+#define EFI_ACPI_5_1_MPST_MEMORY_POWER_STATE_CHARACTERISTICS_STRUCTURE_FLAG_AUTONOMOUS_MEMORY_POWER_STATE_ENTRY 0x02
+#define EFI_ACPI_5_1_MPST_MEMORY_POWER_STATE_CHARACTERISTICS_STRUCTURE_FLAG_AUTONOMOUS_MEMORY_POWER_STATE_EXIT 0x04
typedef struct {
- UINT16 MemoryPowerStateCharacteristicsCount;
- UINT8 Reserved[2];
+ UINT16 MemoryPowerStateCharacteristicsCount;
+ UINT8 Reserved[2];
} EFI_ACPI_5_1_MPST_MEMORY_POWER_STATE_CHARACTERISTICS_TABLE;
///
/// Memory Topology Table definition.
///
typedef struct {
- EFI_ACPI_DESCRIPTION_HEADER Header;
- UINT32 Reserved;
+ EFI_ACPI_DESCRIPTION_HEADER Header;
+ UINT32 Reserved;
} EFI_ACPI_5_1_MEMORY_TOPOLOGY_TABLE;
///
/// PMTT Version (as defined in ACPI 5.1 spec.)
///
-#define EFI_ACPI_5_1_MEMORY_TOPOLOGY_TABLE_REVISION 0x01
+#define EFI_ACPI_5_1_MEMORY_TOPOLOGY_TABLE_REVISION 0x01
///
/// Common Memory Aggregator Device Structure.
///
typedef struct {
- UINT8 Type;
- UINT8 Reserved;
- UINT16 Length;
- UINT16 Flags;
- UINT16 Reserved1;
+ UINT8 Type;
+ UINT8 Reserved;
+ UINT16 Length;
+ UINT16 Flags;
+ UINT16 Reserved1;
} EFI_ACPI_5_1_PMMT_COMMON_MEMORY_AGGREGATOR_DEVICE_STRUCTURE;
///
/// Memory Aggregator Device Type
///
-#define EFI_ACPI_5_1_PMMT_MEMORY_AGGREGATOR_DEVICE_TYPE_SOCKET 0x1
-#define EFI_ACPI_5_1_PMMT_MEMORY_AGGREGATOR_DEVICE_TYPE_MEMORY_CONTROLLER 0x2
-#define EFI_ACPI_5_1_PMMT_MEMORY_AGGREGATOR_DEVICE_TYPE_DIMM 0x3
+#define EFI_ACPI_5_1_PMMT_MEMORY_AGGREGATOR_DEVICE_TYPE_SOCKET 0x0
+#define EFI_ACPI_5_1_PMMT_MEMORY_AGGREGATOR_DEVICE_TYPE_MEMORY_CONTROLLER 0x1
+#define EFI_ACPI_5_1_PMMT_MEMORY_AGGREGATOR_DEVICE_TYPE_DIMM 0x2
///
/// Socket Memory Aggregator Device Structure.
///
typedef struct {
- EFI_ACPI_5_1_PMMT_COMMON_MEMORY_AGGREGATOR_DEVICE_STRUCTURE Header;
- UINT16 SocketIdentifier;
- UINT16 Reserved;
-//EFI_ACPI_5_1_PMMT_MEMORY_CONTROLLER_MEMORY_AGGREGATOR_DEVICE_STRUCTURE MemoryController[];
+ EFI_ACPI_5_1_PMMT_COMMON_MEMORY_AGGREGATOR_DEVICE_STRUCTURE Header;
+ UINT16 SocketIdentifier;
+ UINT16 Reserved;
+ // EFI_ACPI_5_1_PMMT_MEMORY_CONTROLLER_MEMORY_AGGREGATOR_DEVICE_STRUCTURE MemoryController[];
} EFI_ACPI_5_1_PMMT_SOCKET_MEMORY_AGGREGATOR_DEVICE_STRUCTURE;
///
/// MemoryController Memory Aggregator Device Structure.
///
typedef struct {
- EFI_ACPI_5_1_PMMT_COMMON_MEMORY_AGGREGATOR_DEVICE_STRUCTURE Header;
- UINT32 ReadLatency;
- UINT32 WriteLatency;
- UINT32 ReadBandwidth;
- UINT32 WriteBandwidth;
- UINT16 OptimalAccessUnit;
- UINT16 OptimalAccessAlignment;
- UINT16 Reserved;
- UINT16 NumberOfProximityDomains;
-//UINT32 ProximityDomain[NumberOfProximityDomains];
-//EFI_ACPI_5_1_PMMT_DIMM_MEMORY_AGGREGATOR_DEVICE_STRUCTURE PhysicalComponent[];
+ EFI_ACPI_5_1_PMMT_COMMON_MEMORY_AGGREGATOR_DEVICE_STRUCTURE Header;
+ UINT32 ReadLatency;
+ UINT32 WriteLatency;
+ UINT32 ReadBandwidth;
+ UINT32 WriteBandwidth;
+ UINT16 OptimalAccessUnit;
+ UINT16 OptimalAccessAlignment;
+ UINT16 Reserved;
+ UINT16 NumberOfProximityDomains;
+ // UINT32 ProximityDomain[NumberOfProximityDomains];
+ // EFI_ACPI_5_1_PMMT_DIMM_MEMORY_AGGREGATOR_DEVICE_STRUCTURE PhysicalComponent[];
} EFI_ACPI_5_1_PMMT_MEMORY_CONTROLLER_MEMORY_AGGREGATOR_DEVICE_STRUCTURE;
///
/// DIMM Memory Aggregator Device Structure.
///
typedef struct {
- EFI_ACPI_5_1_PMMT_COMMON_MEMORY_AGGREGATOR_DEVICE_STRUCTURE Header;
- UINT16 PhysicalComponentIdentifier;
- UINT16 Reserved;
- UINT32 SizeOfDimm;
- UINT32 SmbiosHandle;
+ EFI_ACPI_5_1_PMMT_COMMON_MEMORY_AGGREGATOR_DEVICE_STRUCTURE Header;
+ UINT16 PhysicalComponentIdentifier;
+ UINT16 Reserved;
+ UINT32 SizeOfDimm;
+ UINT32 SmbiosHandle;
} EFI_ACPI_5_1_PMMT_DIMM_MEMORY_AGGREGATOR_DEVICE_STRUCTURE;
///
/// Boot Graphics Resource Table definition.
///
typedef struct {
- EFI_ACPI_DESCRIPTION_HEADER Header;
+ EFI_ACPI_DESCRIPTION_HEADER Header;
///
/// 2-bytes (16 bit) version ID. This value must be 1.
///
- UINT16 Version;
+ UINT16 Version;
///
/// 1-byte status field indicating current status about the table.
/// Bits[7:1] = Reserved (must be zero)
/// Bit [0] = Valid. A one indicates the boot image graphic is valid.
///
- UINT8 Status;
+ UINT8 Status;
///
/// 1-byte enumerated type field indicating format of the image.
/// 0 = Bitmap
/// 1 - 255 Reserved (for future use)
///
- UINT8 ImageType;
+ UINT8 ImageType;
///
/// 8-byte (64 bit) physical address pointing to the firmware's in-memory copy
/// of the image bitmap.
///
- UINT64 ImageAddress;
+ UINT64 ImageAddress;
///
/// A 4-byte (32-bit) unsigned long describing the display X-offset of the boot image.
/// (X, Y) display offset of the top left corner of the boot image.
/// The top left corner of the display is at offset (0, 0).
///
- UINT32 ImageOffsetX;
+ UINT32 ImageOffsetX;
///
/// A 4-byte (32-bit) unsigned long describing the display Y-offset of the boot image.
/// (X, Y) display offset of the top left corner of the boot image.
/// The top left corner of the display is at offset (0, 0).
///
- UINT32 ImageOffsetY;
+ UINT32 ImageOffsetY;
} EFI_ACPI_5_1_BOOT_GRAPHICS_RESOURCE_TABLE;
///
/// BGRT Revision
///
-#define EFI_ACPI_5_1_BOOT_GRAPHICS_RESOURCE_TABLE_REVISION 1
+#define EFI_ACPI_5_1_BOOT_GRAPHICS_RESOURCE_TABLE_REVISION 1
///
/// BGRT Version
///
-#define EFI_ACPI_5_1_BGRT_VERSION 0x01
+#define EFI_ACPI_5_1_BGRT_VERSION 0x01
///
/// BGRT Status
///
-#define EFI_ACPI_5_1_BGRT_STATUS_NOT_DISPLAYED 0x00
-#define EFI_ACPI_5_1_BGRT_STATUS_DISPLAYED 0x01
+#define EFI_ACPI_5_1_BGRT_STATUS_NOT_DISPLAYED 0x00
+#define EFI_ACPI_5_1_BGRT_STATUS_DISPLAYED 0x01
///
/// BGRT Image Type
@@ -1057,26 +1067,26 @@ typedef struct {
///
/// FPDT Version (as defined in ACPI 5.1 spec.)
///
-#define EFI_ACPI_5_1_FIRMWARE_PERFORMANCE_DATA_TABLE_REVISION 0x01
+#define EFI_ACPI_5_1_FIRMWARE_PERFORMANCE_DATA_TABLE_REVISION 0x01
///
/// FPDT Performance Record Types
///
-#define EFI_ACPI_5_1_FPDT_RECORD_TYPE_FIRMWARE_BASIC_BOOT_POINTER 0x0000
-#define EFI_ACPI_5_1_FPDT_RECORD_TYPE_S3_PERFORMANCE_TABLE_POINTER 0x0001
+#define EFI_ACPI_5_1_FPDT_RECORD_TYPE_FIRMWARE_BASIC_BOOT_POINTER 0x0000
+#define EFI_ACPI_5_1_FPDT_RECORD_TYPE_S3_PERFORMANCE_TABLE_POINTER 0x0001
///
/// FPDT Performance Record Revision
///
-#define EFI_ACPI_5_1_FPDT_RECORD_REVISION_FIRMWARE_BASIC_BOOT_POINTER 0x01
-#define EFI_ACPI_5_1_FPDT_RECORD_REVISION_S3_PERFORMANCE_TABLE_POINTER 0x01
+#define EFI_ACPI_5_1_FPDT_RECORD_REVISION_FIRMWARE_BASIC_BOOT_POINTER 0x01
+#define EFI_ACPI_5_1_FPDT_RECORD_REVISION_S3_PERFORMANCE_TABLE_POINTER 0x01
///
/// FPDT Runtime Performance Record Types
///
-#define EFI_ACPI_5_1_FPDT_RUNTIME_RECORD_TYPE_S3_RESUME 0x0000
-#define EFI_ACPI_5_1_FPDT_RUNTIME_RECORD_TYPE_S3_SUSPEND 0x0001
-#define EFI_ACPI_5_1_FPDT_RUNTIME_RECORD_TYPE_FIRMWARE_BASIC_BOOT 0x0002
+#define EFI_ACPI_5_1_FPDT_RUNTIME_RECORD_TYPE_S3_RESUME 0x0000
+#define EFI_ACPI_5_1_FPDT_RUNTIME_RECORD_TYPE_S3_SUSPEND 0x0001
+#define EFI_ACPI_5_1_FPDT_RUNTIME_RECORD_TYPE_FIRMWARE_BASIC_BOOT 0x0002
///
/// FPDT Runtime Performance Record Revision
@@ -1089,77 +1099,77 @@ typedef struct {
/// FPDT Performance Record header
///
typedef struct {
- UINT16 Type;
- UINT8 Length;
- UINT8 Revision;
+ UINT16 Type;
+ UINT8 Length;
+ UINT8 Revision;
} EFI_ACPI_5_1_FPDT_PERFORMANCE_RECORD_HEADER;
///
/// FPDT Performance Table header
///
typedef struct {
- UINT32 Signature;
- UINT32 Length;
+ UINT32 Signature;
+ UINT32 Length;
} EFI_ACPI_5_1_FPDT_PERFORMANCE_TABLE_HEADER;
///
/// FPDT Firmware Basic Boot Performance Pointer Record Structure
///
typedef struct {
- EFI_ACPI_5_1_FPDT_PERFORMANCE_RECORD_HEADER Header;
- UINT32 Reserved;
+ EFI_ACPI_5_1_FPDT_PERFORMANCE_RECORD_HEADER Header;
+ UINT32 Reserved;
///
/// 64-bit processor-relative physical address of the Basic Boot Performance Table.
///
- UINT64 BootPerformanceTablePointer;
+ UINT64 BootPerformanceTablePointer;
} EFI_ACPI_5_1_FPDT_BOOT_PERFORMANCE_TABLE_POINTER_RECORD;
///
/// FPDT S3 Performance Table Pointer Record Structure
///
typedef struct {
- EFI_ACPI_5_1_FPDT_PERFORMANCE_RECORD_HEADER Header;
- UINT32 Reserved;
+ EFI_ACPI_5_1_FPDT_PERFORMANCE_RECORD_HEADER Header;
+ UINT32 Reserved;
///
/// 64-bit processor-relative physical address of the S3 Performance Table.
///
- UINT64 S3PerformanceTablePointer;
+ UINT64 S3PerformanceTablePointer;
} EFI_ACPI_5_1_FPDT_S3_PERFORMANCE_TABLE_POINTER_RECORD;
///
/// FPDT Firmware Basic Boot Performance Record Structure
///
typedef struct {
- EFI_ACPI_5_1_FPDT_PERFORMANCE_RECORD_HEADER Header;
- UINT32 Reserved;
+ EFI_ACPI_5_1_FPDT_PERFORMANCE_RECORD_HEADER Header;
+ UINT32 Reserved;
///
/// Timer value logged at the beginning of firmware image execution.
/// This may not always be zero or near zero.
///
- UINT64 ResetEnd;
+ UINT64 ResetEnd;
///
/// Timer value logged just prior to loading the OS boot loader into memory.
/// For non-UEFI compatible boots, this field must be zero.
///
- UINT64 OsLoaderLoadImageStart;
+ UINT64 OsLoaderLoadImageStart;
///
/// Timer value logged just prior to launching the previously loaded OS boot loader image.
/// For non-UEFI compatible boots, the timer value logged will be just prior
/// to the INT 19h handler invocation.
///
- UINT64 OsLoaderStartImageStart;
+ UINT64 OsLoaderStartImageStart;
///
/// Timer value logged at the point when the OS loader calls the
/// ExitBootServices function for UEFI compatible firmware.
/// For non-UEFI compatible boots, this field must be zero.
///
- UINT64 ExitBootServicesEntry;
+ UINT64 ExitBootServicesEntry;
///
/// Timer value logged at the point just prior to when the OS loader gaining
/// control back from calls the ExitBootServices function for UEFI compatible firmware.
/// For non-UEFI compatible boots, this field must be zero.
///
- UINT64 ExitBootServicesExit;
+ UINT64 ExitBootServicesExit;
} EFI_ACPI_5_1_FPDT_FIRMWARE_BASIC_BOOT_RECORD;
///
@@ -1171,7 +1181,7 @@ typedef struct {
// FPDT Firmware Basic Boot Performance Table
//
typedef struct {
- EFI_ACPI_5_1_FPDT_PERFORMANCE_TABLE_HEADER Header;
+ EFI_ACPI_5_1_FPDT_PERFORMANCE_TABLE_HEADER Header;
//
// one or more Performance Records.
//
@@ -1186,7 +1196,7 @@ typedef struct {
// FPDT Firmware S3 Boot Performance Table
//
typedef struct {
- EFI_ACPI_5_1_FPDT_PERFORMANCE_TABLE_HEADER Header;
+ EFI_ACPI_5_1_FPDT_PERFORMANCE_TABLE_HEADER Header;
//
// one or more Performance Records.
//
@@ -1196,203 +1206,209 @@ typedef struct {
/// FPDT Basic S3 Resume Performance Record
///
typedef struct {
- EFI_ACPI_5_1_FPDT_PERFORMANCE_RECORD_HEADER Header;
+ EFI_ACPI_5_1_FPDT_PERFORMANCE_RECORD_HEADER Header;
///
/// A count of the number of S3 resume cycles since the last full boot sequence.
///
- UINT32 ResumeCount;
+ UINT32 ResumeCount;
///
/// Timer recorded at the end of BIOS S3 resume, just prior to handoff to the
/// OS waking vector. Only the most recent resume cycle's time is retained.
///
- UINT64 FullResume;
+ UINT64 FullResume;
///
/// Average timer value of all resume cycles logged since the last full boot
/// sequence, including the most recent resume. Note that the entire log of
/// timer values does not need to be retained in order to calculate this average.
///
- UINT64 AverageResume;
+ UINT64 AverageResume;
} EFI_ACPI_5_1_FPDT_S3_RESUME_RECORD;
///
/// FPDT Basic S3 Suspend Performance Record
///
typedef struct {
- EFI_ACPI_5_1_FPDT_PERFORMANCE_RECORD_HEADER Header;
+ EFI_ACPI_5_1_FPDT_PERFORMANCE_RECORD_HEADER Header;
///
/// Timer value recorded at the OS write to SLP_TYP upon entry to S3.
/// Only the most recent suspend cycle's timer value is retained.
///
- UINT64 SuspendStart;
+ UINT64 SuspendStart;
///
/// Timer value recorded at the final firmware write to SLP_TYP (or other
/// mechanism) used to trigger hardware entry to S3.
/// Only the most recent suspend cycle's timer value is retained.
///
- UINT64 SuspendEnd;
+ UINT64 SuspendEnd;
} EFI_ACPI_5_1_FPDT_S3_SUSPEND_RECORD;
///
/// Firmware Performance Record Table definition.
///
typedef struct {
- EFI_ACPI_DESCRIPTION_HEADER Header;
+ EFI_ACPI_DESCRIPTION_HEADER Header;
} EFI_ACPI_5_1_FIRMWARE_PERFORMANCE_RECORD_TABLE;
///
/// Generic Timer Description Table definition.
///
typedef struct {
- EFI_ACPI_DESCRIPTION_HEADER Header;
- UINT64 CntControlBasePhysicalAddress;
- UINT32 Reserved;
- UINT32 SecurePL1TimerGSIV;
- UINT32 SecurePL1TimerFlags;
- UINT32 NonSecurePL1TimerGSIV;
- UINT32 NonSecurePL1TimerFlags;
- UINT32 VirtualTimerGSIV;
- UINT32 VirtualTimerFlags;
- UINT32 NonSecurePL2TimerGSIV;
- UINT32 NonSecurePL2TimerFlags;
- UINT64 CntReadBasePhysicalAddress;
- UINT32 PlatformTimerCount;
- UINT32 PlatformTimerOffset;
+ EFI_ACPI_DESCRIPTION_HEADER Header;
+ UINT64 CntControlBasePhysicalAddress;
+ UINT32 Reserved;
+ UINT32 SecurePL1TimerGSIV;
+ UINT32 SecurePL1TimerFlags;
+ UINT32 NonSecurePL1TimerGSIV;
+ UINT32 NonSecurePL1TimerFlags;
+ UINT32 VirtualTimerGSIV;
+ UINT32 VirtualTimerFlags;
+ UINT32 NonSecurePL2TimerGSIV;
+ UINT32 NonSecurePL2TimerFlags;
+ UINT64 CntReadBasePhysicalAddress;
+ UINT32 PlatformTimerCount;
+ UINT32 PlatformTimerOffset;
} EFI_ACPI_5_1_GENERIC_TIMER_DESCRIPTION_TABLE;
///
/// GTDT Version (as defined in ACPI 5.1 spec.)
///
-#define EFI_ACPI_5_1_GENERIC_TIMER_DESCRIPTION_TABLE_REVISION 0x02
+#define EFI_ACPI_5_1_GENERIC_TIMER_DESCRIPTION_TABLE_REVISION 0x02
///
/// Timer Flags. All other bits are reserved and must be 0.
///
-#define EFI_ACPI_5_1_GTDT_TIMER_FLAG_TIMER_INTERRUPT_MODE BIT0
-#define EFI_ACPI_5_1_GTDT_TIMER_FLAG_TIMER_INTERRUPT_POLARITY BIT1
-#define EFI_ACPI_5_1_GTDT_TIMER_FLAG_ALWAYS_ON_CAPABILITY BIT2
+#define EFI_ACPI_5_1_GTDT_TIMER_FLAG_TIMER_INTERRUPT_MODE BIT0
+#define EFI_ACPI_5_1_GTDT_TIMER_FLAG_TIMER_INTERRUPT_POLARITY BIT1
+#define EFI_ACPI_5_1_GTDT_TIMER_FLAG_ALWAYS_ON_CAPABILITY BIT2
///
/// Platform Timer Type
///
-#define EFI_ACPI_5_1_GTDT_GT_BLOCK 0
-#define EFI_ACPI_5_1_GTDT_SBSA_GENERIC_WATCHDOG 1
+#define EFI_ACPI_5_1_GTDT_GT_BLOCK 0
+#define EFI_ACPI_5_1_GTDT_SBSA_GENERIC_WATCHDOG 1
///
/// GT Block Structure
///
typedef struct {
- UINT8 Type;
- UINT16 Length;
- UINT8 Reserved;
- UINT64 CntCtlBase;
- UINT32 GTBlockTimerCount;
- UINT32 GTBlockTimerOffset;
+ UINT8 Type;
+ UINT16 Length;
+ UINT8 Reserved;
+ UINT64 CntCtlBase;
+ UINT32 GTBlockTimerCount;
+ UINT32 GTBlockTimerOffset;
} EFI_ACPI_5_1_GTDT_GT_BLOCK_STRUCTURE;
///
/// GT Block Timer Structure
///
typedef struct {
- UINT8 GTFrameNumber;
- UINT8 Reserved[3];
- UINT64 CntBaseX;
- UINT64 CntEL0BaseX;
- UINT32 GTxPhysicalTimerGSIV;
- UINT32 GTxPhysicalTimerFlags;
- UINT32 GTxVirtualTimerGSIV;
- UINT32 GTxVirtualTimerFlags;
- UINT32 GTxCommonFlags;
+ UINT8 GTFrameNumber;
+ UINT8 Reserved[3];
+ UINT64 CntBaseX;
+ UINT64 CntEL0BaseX;
+ UINT32 GTxPhysicalTimerGSIV;
+ UINT32 GTxPhysicalTimerFlags;
+ UINT32 GTxVirtualTimerGSIV;
+ UINT32 GTxVirtualTimerFlags;
+ UINT32 GTxCommonFlags;
} EFI_ACPI_5_1_GTDT_GT_BLOCK_TIMER_STRUCTURE;
///
/// GT Block Physical Timers and Virtual Timers Flags. All other bits are reserved and must be 0.
///
-#define EFI_ACPI_5_1_GTDT_GT_BLOCK_TIMER_FLAG_TIMER_INTERRUPT_MODE BIT0
-#define EFI_ACPI_5_1_GTDT_GT_BLOCK_TIMER_FLAG_TIMER_INTERRUPT_POLARITY BIT1
+#define EFI_ACPI_5_1_GTDT_GT_BLOCK_TIMER_FLAG_TIMER_INTERRUPT_MODE BIT0
+#define EFI_ACPI_5_1_GTDT_GT_BLOCK_TIMER_FLAG_TIMER_INTERRUPT_POLARITY BIT1
///
/// Common Flags Flags. All other bits are reserved and must be 0.
///
-#define EFI_ACPI_5_1_GTDT_GT_BLOCK_COMMON_FLAG_SECURE_TIMER BIT0
-#define EFI_ACPI_5_1_GTDT_GT_BLOCK_COMMON_FLAG_ALWAYS_ON_CAPABILITY BIT1
+#define EFI_ACPI_5_1_GTDT_GT_BLOCK_COMMON_FLAG_SECURE_TIMER BIT0
+#define EFI_ACPI_5_1_GTDT_GT_BLOCK_COMMON_FLAG_ALWAYS_ON_CAPABILITY BIT1
///
/// SBSA Generic Watchdog Structure
///
typedef struct {
- UINT8 Type;
- UINT16 Length;
- UINT8 Reserved;
- UINT64 RefreshFramePhysicalAddress;
- UINT64 WatchdogControlFramePhysicalAddress;
- UINT32 WatchdogTimerGSIV;
- UINT32 WatchdogTimerFlags;
+ UINT8 Type;
+ UINT16 Length;
+ UINT8 Reserved;
+ UINT64 RefreshFramePhysicalAddress;
+ UINT64 WatchdogControlFramePhysicalAddress;
+ UINT32 WatchdogTimerGSIV;
+ UINT32 WatchdogTimerFlags;
} EFI_ACPI_5_1_GTDT_SBSA_GENERIC_WATCHDOG_STRUCTURE;
///
/// SBSA Generic Watchdog Timer Flags. All other bits are reserved and must be 0.
///
-#define EFI_ACPI_5_1_GTDT_SBSA_GENERIC_WATCHDOG_FLAG_TIMER_INTERRUPT_MODE BIT0
-#define EFI_ACPI_5_1_GTDT_SBSA_GENERIC_WATCHDOG_FLAG_TIMER_INTERRUPT_POLARITY BIT1
-#define EFI_ACPI_5_1_GTDT_SBSA_GENERIC_WATCHDOG_FLAG_SECURE_TIMER BIT2
+#define EFI_ACPI_5_1_GTDT_SBSA_GENERIC_WATCHDOG_FLAG_TIMER_INTERRUPT_MODE BIT0
+#define EFI_ACPI_5_1_GTDT_SBSA_GENERIC_WATCHDOG_FLAG_TIMER_INTERRUPT_POLARITY BIT1
+#define EFI_ACPI_5_1_GTDT_SBSA_GENERIC_WATCHDOG_FLAG_SECURE_TIMER BIT2
///
/// Boot Error Record Table (BERT)
///
typedef struct {
- EFI_ACPI_DESCRIPTION_HEADER Header;
- UINT32 BootErrorRegionLength;
- UINT64 BootErrorRegion;
+ EFI_ACPI_DESCRIPTION_HEADER Header;
+ UINT32 BootErrorRegionLength;
+ UINT64 BootErrorRegion;
} EFI_ACPI_5_1_BOOT_ERROR_RECORD_TABLE_HEADER;
///
/// BERT Version (as defined in ACPI 5.1 spec.)
///
-#define EFI_ACPI_5_1_BOOT_ERROR_RECORD_TABLE_REVISION 0x01
+#define EFI_ACPI_5_1_BOOT_ERROR_RECORD_TABLE_REVISION 0x01
///
/// Boot Error Region Block Status Definition
///
typedef struct {
- UINT32 UncorrectableErrorValid:1;
- UINT32 CorrectableErrorValid:1;
- UINT32 MultipleUncorrectableErrors:1;
- UINT32 MultipleCorrectableErrors:1;
- UINT32 ErrorDataEntryCount:10;
- UINT32 Reserved:18;
+ UINT32 UncorrectableErrorValid : 1;
+ UINT32 CorrectableErrorValid : 1;
+ UINT32 MultipleUncorrectableErrors : 1;
+ UINT32 MultipleCorrectableErrors : 1;
+ UINT32 ErrorDataEntryCount : 10;
+ UINT32 Reserved : 18;
} EFI_ACPI_5_1_ERROR_BLOCK_STATUS;
///
/// Boot Error Region Definition
///
typedef struct {
- EFI_ACPI_5_1_ERROR_BLOCK_STATUS BlockStatus;
- UINT32 RawDataOffset;
- UINT32 RawDataLength;
- UINT32 DataLength;
- UINT32 ErrorSeverity;
+ EFI_ACPI_5_1_ERROR_BLOCK_STATUS BlockStatus;
+ UINT32 RawDataOffset;
+ UINT32 RawDataLength;
+ UINT32 DataLength;
+ UINT32 ErrorSeverity;
} EFI_ACPI_5_1_BOOT_ERROR_REGION_STRUCTURE;
//
// Boot Error Severity types
//
-#define EFI_ACPI_5_1_ERROR_SEVERITY_CORRECTABLE 0x00
+#define EFI_ACPI_5_1_ERROR_SEVERITY_RECOVERABLE 0x00
#define EFI_ACPI_5_1_ERROR_SEVERITY_FATAL 0x01
#define EFI_ACPI_5_1_ERROR_SEVERITY_CORRECTED 0x02
#define EFI_ACPI_5_1_ERROR_SEVERITY_NONE 0x03
+//
+// The term 'Correctable' is no longer being used as an error severity of the
+// reported error since ACPI Specification Version 5.1 Errata B.
+// The below macro is considered as deprecated and should no longer be used.
+//
+#define EFI_ACPI_5_1_ERROR_SEVERITY_CORRECTABLE 0x00
///
/// Generic Error Data Entry Definition
///
typedef struct {
- UINT8 SectionType[16];
- UINT32 ErrorSeverity;
- UINT16 Revision;
- UINT8 ValidationBits;
- UINT8 Flags;
- UINT32 ErrorDataLength;
- UINT8 FruId[16];
- UINT8 FruText[20];
+ UINT8 SectionType[16];
+ UINT32 ErrorSeverity;
+ UINT16 Revision;
+ UINT8 ValidationBits;
+ UINT8 Flags;
+ UINT32 ErrorDataLength;
+ UINT8 FruId[16];
+ UINT8 FruText[20];
} EFI_ACPI_5_1_GENERIC_ERROR_DATA_ENTRY_STRUCTURE;
///
@@ -1404,14 +1420,14 @@ typedef struct {
/// HEST - Hardware Error Source Table
///
typedef struct {
- EFI_ACPI_DESCRIPTION_HEADER Header;
- UINT32 ErrorSourceCount;
+ EFI_ACPI_DESCRIPTION_HEADER Header;
+ UINT32 ErrorSourceCount;
} EFI_ACPI_5_1_HARDWARE_ERROR_SOURCE_TABLE_HEADER;
///
/// HEST Version (as defined in ACPI 5.1 spec.)
///
-#define EFI_ACPI_5_1_HARDWARE_ERROR_SOURCE_TABLE_REVISION 0x01
+#define EFI_ACPI_5_1_HARDWARE_ERROR_SOURCE_TABLE_REVISION 0x01
//
// Error Source structure types.
@@ -1427,403 +1443,404 @@ typedef struct {
//
// Error Source structure flags.
//
-#define EFI_ACPI_5_1_ERROR_SOURCE_FLAG_FIRMWARE_FIRST (1 << 0)
-#define EFI_ACPI_5_1_ERROR_SOURCE_FLAG_GLOBAL (1 << 1)
+#define EFI_ACPI_5_1_ERROR_SOURCE_FLAG_FIRMWARE_FIRST (1 << 0)
+#define EFI_ACPI_5_1_ERROR_SOURCE_FLAG_GLOBAL (1 << 1)
///
/// IA-32 Architecture Machine Check Exception Structure Definition
///
typedef struct {
- UINT16 Type;
- UINT16 SourceId;
- UINT8 Reserved0[2];
- UINT8 Flags;
- UINT8 Enabled;
- UINT32 NumberOfRecordsToPreAllocate;
- UINT32 MaxSectionsPerRecord;
- UINT64 GlobalCapabilityInitData;
- UINT64 GlobalControlInitData;
- UINT8 NumberOfHardwareBanks;
- UINT8 Reserved1[7];
+ UINT16 Type;
+ UINT16 SourceId;
+ UINT8 Reserved0[2];
+ UINT8 Flags;
+ UINT8 Enabled;
+ UINT32 NumberOfRecordsToPreAllocate;
+ UINT32 MaxSectionsPerRecord;
+ UINT64 GlobalCapabilityInitData;
+ UINT64 GlobalControlInitData;
+ UINT8 NumberOfHardwareBanks;
+ UINT8 Reserved1[7];
} EFI_ACPI_5_1_IA32_ARCHITECTURE_MACHINE_CHECK_EXCEPTION_STRUCTURE;
///
/// IA-32 Architecture Machine Check Bank Structure Definition
///
typedef struct {
- UINT8 BankNumber;
- UINT8 ClearStatusOnInitialization;
- UINT8 StatusDataFormat;
- UINT8 Reserved0;
- UINT32 ControlRegisterMsrAddress;
- UINT64 ControlInitData;
- UINT32 StatusRegisterMsrAddress;
- UINT32 AddressRegisterMsrAddress;
- UINT32 MiscRegisterMsrAddress;
+ UINT8 BankNumber;
+ UINT8 ClearStatusOnInitialization;
+ UINT8 StatusDataFormat;
+ UINT8 Reserved0;
+ UINT32 ControlRegisterMsrAddress;
+ UINT64 ControlInitData;
+ UINT32 StatusRegisterMsrAddress;
+ UINT32 AddressRegisterMsrAddress;
+ UINT32 MiscRegisterMsrAddress;
} EFI_ACPI_5_1_IA32_ARCHITECTURE_MACHINE_CHECK_ERROR_BANK_STRUCTURE;
///
/// IA-32 Architecture Machine Check Bank Structure MCA data format
///
-#define EFI_ACPI_5_1_IA32_ARCHITECTURE_MACHINE_CHECK_ERROR_DATA_FORMAT_IA32 0x00
-#define EFI_ACPI_5_1_IA32_ARCHITECTURE_MACHINE_CHECK_ERROR_DATA_FORMAT_INTEL64 0x01
-#define EFI_ACPI_5_1_IA32_ARCHITECTURE_MACHINE_CHECK_ERROR_DATA_FORMAT_AMD64 0x02
+#define EFI_ACPI_5_1_IA32_ARCHITECTURE_MACHINE_CHECK_ERROR_DATA_FORMAT_IA32 0x00
+#define EFI_ACPI_5_1_IA32_ARCHITECTURE_MACHINE_CHECK_ERROR_DATA_FORMAT_INTEL64 0x01
+#define EFI_ACPI_5_1_IA32_ARCHITECTURE_MACHINE_CHECK_ERROR_DATA_FORMAT_AMD64 0x02
//
// Hardware Error Notification types. All other values are reserved
//
-#define EFI_ACPI_5_1_HARDWARE_ERROR_NOTIFICATION_POLLED 0x00
-#define EFI_ACPI_5_1_HARDWARE_ERROR_NOTIFICATION_EXTERNAL_INTERRUPT 0x01
-#define EFI_ACPI_5_1_HARDWARE_ERROR_NOTIFICATION_LOCAL_INTERRUPT 0x02
-#define EFI_ACPI_5_1_HARDWARE_ERROR_NOTIFICATION_SCI 0x03
-#define EFI_ACPI_5_1_HARDWARE_ERROR_NOTIFICATION_NMI 0x04
+#define EFI_ACPI_5_1_HARDWARE_ERROR_NOTIFICATION_POLLED 0x00
+#define EFI_ACPI_5_1_HARDWARE_ERROR_NOTIFICATION_EXTERNAL_INTERRUPT 0x01
+#define EFI_ACPI_5_1_HARDWARE_ERROR_NOTIFICATION_LOCAL_INTERRUPT 0x02
+#define EFI_ACPI_5_1_HARDWARE_ERROR_NOTIFICATION_SCI 0x03
+#define EFI_ACPI_5_1_HARDWARE_ERROR_NOTIFICATION_NMI 0x04
///
/// Hardware Error Notification Configuration Write Enable Structure Definition
///
typedef struct {
- UINT16 Type:1;
- UINT16 PollInterval:1;
- UINT16 SwitchToPollingThresholdValue:1;
- UINT16 SwitchToPollingThresholdWindow:1;
- UINT16 ErrorThresholdValue:1;
- UINT16 ErrorThresholdWindow:1;
- UINT16 Reserved:10;
+ UINT16 Type : 1;
+ UINT16 PollInterval : 1;
+ UINT16 SwitchToPollingThresholdValue : 1;
+ UINT16 SwitchToPollingThresholdWindow : 1;
+ UINT16 ErrorThresholdValue : 1;
+ UINT16 ErrorThresholdWindow : 1;
+ UINT16 Reserved : 10;
} EFI_ACPI_5_1_HARDWARE_ERROR_NOTIFICATION_CONFIGURATION_WRITE_ENABLE_STRUCTURE;
///
/// Hardware Error Notification Structure Definition
///
typedef struct {
- UINT8 Type;
- UINT8 Length;
- EFI_ACPI_5_1_HARDWARE_ERROR_NOTIFICATION_CONFIGURATION_WRITE_ENABLE_STRUCTURE ConfigurationWriteEnable;
- UINT32 PollInterval;
- UINT32 Vector;
- UINT32 SwitchToPollingThresholdValue;
- UINT32 SwitchToPollingThresholdWindow;
- UINT32 ErrorThresholdValue;
- UINT32 ErrorThresholdWindow;
+ UINT8 Type;
+ UINT8 Length;
+ EFI_ACPI_5_1_HARDWARE_ERROR_NOTIFICATION_CONFIGURATION_WRITE_ENABLE_STRUCTURE ConfigurationWriteEnable;
+ UINT32 PollInterval;
+ UINT32 Vector;
+ UINT32 SwitchToPollingThresholdValue;
+ UINT32 SwitchToPollingThresholdWindow;
+ UINT32 ErrorThresholdValue;
+ UINT32 ErrorThresholdWindow;
} EFI_ACPI_5_1_HARDWARE_ERROR_NOTIFICATION_STRUCTURE;
///
/// IA-32 Architecture Corrected Machine Check Structure Definition
///
typedef struct {
- UINT16 Type;
- UINT16 SourceId;
- UINT8 Reserved0[2];
- UINT8 Flags;
- UINT8 Enabled;
- UINT32 NumberOfRecordsToPreAllocate;
- UINT32 MaxSectionsPerRecord;
- EFI_ACPI_5_1_HARDWARE_ERROR_NOTIFICATION_STRUCTURE NotificationStructure;
- UINT8 NumberOfHardwareBanks;
- UINT8 Reserved1[3];
+ UINT16 Type;
+ UINT16 SourceId;
+ UINT8 Reserved0[2];
+ UINT8 Flags;
+ UINT8 Enabled;
+ UINT32 NumberOfRecordsToPreAllocate;
+ UINT32 MaxSectionsPerRecord;
+ EFI_ACPI_5_1_HARDWARE_ERROR_NOTIFICATION_STRUCTURE NotificationStructure;
+ UINT8 NumberOfHardwareBanks;
+ UINT8 Reserved1[3];
} EFI_ACPI_5_1_IA32_ARCHITECTURE_CORRECTED_MACHINE_CHECK_STRUCTURE;
///
/// IA-32 Architecture NMI Error Structure Definition
///
typedef struct {
- UINT16 Type;
- UINT16 SourceId;
- UINT8 Reserved0[2];
- UINT32 NumberOfRecordsToPreAllocate;
- UINT32 MaxSectionsPerRecord;
- UINT32 MaxRawDataLength;
+ UINT16 Type;
+ UINT16 SourceId;
+ UINT8 Reserved0[2];
+ UINT32 NumberOfRecordsToPreAllocate;
+ UINT32 MaxSectionsPerRecord;
+ UINT32 MaxRawDataLength;
} EFI_ACPI_5_1_IA32_ARCHITECTURE_NMI_ERROR_STRUCTURE;
///
/// PCI Express Root Port AER Structure Definition
///
typedef struct {
- UINT16 Type;
- UINT16 SourceId;
- UINT8 Reserved0[2];
- UINT8 Flags;
- UINT8 Enabled;
- UINT32 NumberOfRecordsToPreAllocate;
- UINT32 MaxSectionsPerRecord;
- UINT32 Bus;
- UINT16 Device;
- UINT16 Function;
- UINT16 DeviceControl;
- UINT8 Reserved1[2];
- UINT32 UncorrectableErrorMask;
- UINT32 UncorrectableErrorSeverity;
- UINT32 CorrectableErrorMask;
- UINT32 AdvancedErrorCapabilitiesAndControl;
- UINT32 RootErrorCommand;
+ UINT16 Type;
+ UINT16 SourceId;
+ UINT8 Reserved0[2];
+ UINT8 Flags;
+ UINT8 Enabled;
+ UINT32 NumberOfRecordsToPreAllocate;
+ UINT32 MaxSectionsPerRecord;
+ UINT32 Bus;
+ UINT16 Device;
+ UINT16 Function;
+ UINT16 DeviceControl;
+ UINT8 Reserved1[2];
+ UINT32 UncorrectableErrorMask;
+ UINT32 UncorrectableErrorSeverity;
+ UINT32 CorrectableErrorMask;
+ UINT32 AdvancedErrorCapabilitiesAndControl;
+ UINT32 RootErrorCommand;
} EFI_ACPI_5_1_PCI_EXPRESS_ROOT_PORT_AER_STRUCTURE;
///
/// PCI Express Device AER Structure Definition
///
typedef struct {
- UINT16 Type;
- UINT16 SourceId;
- UINT8 Reserved0[2];
- UINT8 Flags;
- UINT8 Enabled;
- UINT32 NumberOfRecordsToPreAllocate;
- UINT32 MaxSectionsPerRecord;
- UINT32 Bus;
- UINT16 Device;
- UINT16 Function;
- UINT16 DeviceControl;
- UINT8 Reserved1[2];
- UINT32 UncorrectableErrorMask;
- UINT32 UncorrectableErrorSeverity;
- UINT32 CorrectableErrorMask;
- UINT32 AdvancedErrorCapabilitiesAndControl;
+ UINT16 Type;
+ UINT16 SourceId;
+ UINT8 Reserved0[2];
+ UINT8 Flags;
+ UINT8 Enabled;
+ UINT32 NumberOfRecordsToPreAllocate;
+ UINT32 MaxSectionsPerRecord;
+ UINT32 Bus;
+ UINT16 Device;
+ UINT16 Function;
+ UINT16 DeviceControl;
+ UINT8 Reserved1[2];
+ UINT32 UncorrectableErrorMask;
+ UINT32 UncorrectableErrorSeverity;
+ UINT32 CorrectableErrorMask;
+ UINT32 AdvancedErrorCapabilitiesAndControl;
} EFI_ACPI_5_1_PCI_EXPRESS_DEVICE_AER_STRUCTURE;
///
/// PCI Express Bridge AER Structure Definition
///
typedef struct {
- UINT16 Type;
- UINT16 SourceId;
- UINT8 Reserved0[2];
- UINT8 Flags;
- UINT8 Enabled;
- UINT32 NumberOfRecordsToPreAllocate;
- UINT32 MaxSectionsPerRecord;
- UINT32 Bus;
- UINT16 Device;
- UINT16 Function;
- UINT16 DeviceControl;
- UINT8 Reserved1[2];
- UINT32 UncorrectableErrorMask;
- UINT32 UncorrectableErrorSeverity;
- UINT32 CorrectableErrorMask;
- UINT32 AdvancedErrorCapabilitiesAndControl;
- UINT32 SecondaryUncorrectableErrorMask;
- UINT32 SecondaryUncorrectableErrorSeverity;
- UINT32 SecondaryAdvancedErrorCapabilitiesAndControl;
+ UINT16 Type;
+ UINT16 SourceId;
+ UINT8 Reserved0[2];
+ UINT8 Flags;
+ UINT8 Enabled;
+ UINT32 NumberOfRecordsToPreAllocate;
+ UINT32 MaxSectionsPerRecord;
+ UINT32 Bus;
+ UINT16 Device;
+ UINT16 Function;
+ UINT16 DeviceControl;
+ UINT8 Reserved1[2];
+ UINT32 UncorrectableErrorMask;
+ UINT32 UncorrectableErrorSeverity;
+ UINT32 CorrectableErrorMask;
+ UINT32 AdvancedErrorCapabilitiesAndControl;
+ UINT32 SecondaryUncorrectableErrorMask;
+ UINT32 SecondaryUncorrectableErrorSeverity;
+ UINT32 SecondaryAdvancedErrorCapabilitiesAndControl;
} EFI_ACPI_5_1_PCI_EXPRESS_BRIDGE_AER_STRUCTURE;
///
/// Generic Hardware Error Source Structure Definition
///
typedef struct {
- UINT16 Type;
- UINT16 SourceId;
- UINT16 RelatedSourceId;
- UINT8 Flags;
- UINT8 Enabled;
- UINT32 NumberOfRecordsToPreAllocate;
- UINT32 MaxSectionsPerRecord;
- UINT32 MaxRawDataLength;
- EFI_ACPI_5_1_GENERIC_ADDRESS_STRUCTURE ErrorStatusAddress;
- EFI_ACPI_5_1_HARDWARE_ERROR_NOTIFICATION_STRUCTURE NotificationStructure;
- UINT32 ErrorStatusBlockLength;
+ UINT16 Type;
+ UINT16 SourceId;
+ UINT16 RelatedSourceId;
+ UINT8 Flags;
+ UINT8 Enabled;
+ UINT32 NumberOfRecordsToPreAllocate;
+ UINT32 MaxSectionsPerRecord;
+ UINT32 MaxRawDataLength;
+ EFI_ACPI_5_1_GENERIC_ADDRESS_STRUCTURE ErrorStatusAddress;
+ EFI_ACPI_5_1_HARDWARE_ERROR_NOTIFICATION_STRUCTURE NotificationStructure;
+ UINT32 ErrorStatusBlockLength;
} EFI_ACPI_5_1_GENERIC_HARDWARE_ERROR_SOURCE_STRUCTURE;
///
/// Generic Error Status Definition
///
typedef struct {
- EFI_ACPI_5_1_ERROR_BLOCK_STATUS BlockStatus;
- UINT32 RawDataOffset;
- UINT32 RawDataLength;
- UINT32 DataLength;
- UINT32 ErrorSeverity;
+ EFI_ACPI_5_1_ERROR_BLOCK_STATUS BlockStatus;
+ UINT32 RawDataOffset;
+ UINT32 RawDataLength;
+ UINT32 DataLength;
+ UINT32 ErrorSeverity;
} EFI_ACPI_5_1_GENERIC_ERROR_STATUS_STRUCTURE;
///
/// ERST - Error Record Serialization Table
///
typedef struct {
- EFI_ACPI_DESCRIPTION_HEADER Header;
- UINT32 SerializationHeaderSize;
- UINT8 Reserved0[4];
- UINT32 InstructionEntryCount;
+ EFI_ACPI_DESCRIPTION_HEADER Header;
+ UINT32 SerializationHeaderSize;
+ UINT8 Reserved0[4];
+ UINT32 InstructionEntryCount;
} EFI_ACPI_5_1_ERROR_RECORD_SERIALIZATION_TABLE_HEADER;
///
/// ERST Version (as defined in ACPI 5.1 spec.)
///
-#define EFI_ACPI_5_1_ERROR_RECORD_SERIALIZATION_TABLE_REVISION 0x01
+#define EFI_ACPI_5_1_ERROR_RECORD_SERIALIZATION_TABLE_REVISION 0x01
///
/// ERST Serialization Actions
///
-#define EFI_ACPI_5_1_ERST_BEGIN_WRITE_OPERATION 0x00
-#define EFI_ACPI_5_1_ERST_BEGIN_READ_OPERATION 0x01
-#define EFI_ACPI_5_1_ERST_BEGIN_CLEAR_OPERATION 0x02
-#define EFI_ACPI_5_1_ERST_END_OPERATION 0x03
-#define EFI_ACPI_5_1_ERST_SET_RECORD_OFFSET 0x04
-#define EFI_ACPI_5_1_ERST_EXECUTE_OPERATION 0x05
-#define EFI_ACPI_5_1_ERST_CHECK_BUSY_STATUS 0x06
-#define EFI_ACPI_5_1_ERST_GET_COMMAND_STATUS 0x07
-#define EFI_ACPI_5_1_ERST_GET_RECORD_IDENTIFIER 0x08
-#define EFI_ACPI_5_1_ERST_SET_RECORD_IDENTIFIER 0x09
-#define EFI_ACPI_5_1_ERST_GET_RECORD_COUNT 0x0A
-#define EFI_ACPI_5_1_ERST_BEGIN_DUMMY_WRITE_OPERATION 0x0B
-#define EFI_ACPI_5_1_ERST_GET_ERROR_LOG_ADDRESS_RANGE 0x0D
-#define EFI_ACPI_5_1_ERST_GET_ERROR_LOG_ADDRESS_RANGE_LENGTH 0x0E
-#define EFI_ACPI_5_1_ERST_GET_ERROR_LOG_ADDRESS_RANGE_ATTRIBUTES 0x0F
+#define EFI_ACPI_5_1_ERST_BEGIN_WRITE_OPERATION 0x00
+#define EFI_ACPI_5_1_ERST_BEGIN_READ_OPERATION 0x01
+#define EFI_ACPI_5_1_ERST_BEGIN_CLEAR_OPERATION 0x02
+#define EFI_ACPI_5_1_ERST_END_OPERATION 0x03
+#define EFI_ACPI_5_1_ERST_SET_RECORD_OFFSET 0x04
+#define EFI_ACPI_5_1_ERST_EXECUTE_OPERATION 0x05
+#define EFI_ACPI_5_1_ERST_CHECK_BUSY_STATUS 0x06
+#define EFI_ACPI_5_1_ERST_GET_COMMAND_STATUS 0x07
+#define EFI_ACPI_5_1_ERST_GET_RECORD_IDENTIFIER 0x08
+#define EFI_ACPI_5_1_ERST_SET_RECORD_IDENTIFIER 0x09
+#define EFI_ACPI_5_1_ERST_GET_RECORD_COUNT 0x0A
+#define EFI_ACPI_5_1_ERST_BEGIN_DUMMY_WRITE_OPERATION 0x0B
+#define EFI_ACPI_5_1_ERST_GET_ERROR_LOG_ADDRESS_RANGE 0x0D
+#define EFI_ACPI_5_1_ERST_GET_ERROR_LOG_ADDRESS_RANGE_LENGTH 0x0E
+#define EFI_ACPI_5_1_ERST_GET_ERROR_LOG_ADDRESS_RANGE_ATTRIBUTES 0x0F
///
/// ERST Action Command Status
///
-#define EFI_ACPI_5_1_ERST_STATUS_SUCCESS 0x00
-#define EFI_ACPI_5_1_ERST_STATUS_NOT_ENOUGH_SPACE 0x01
-#define EFI_ACPI_5_1_ERST_STATUS_HARDWARE_NOT_AVAILABLE 0x02
-#define EFI_ACPI_5_1_ERST_STATUS_FAILED 0x03
-#define EFI_ACPI_5_1_ERST_STATUS_RECORD_STORE_EMPTY 0x04
-#define EFI_ACPI_5_1_ERST_STATUS_RECORD_NOT_FOUND 0x05
+#define EFI_ACPI_5_1_ERST_STATUS_SUCCESS 0x00
+#define EFI_ACPI_5_1_ERST_STATUS_NOT_ENOUGH_SPACE 0x01
+#define EFI_ACPI_5_1_ERST_STATUS_HARDWARE_NOT_AVAILABLE 0x02
+#define EFI_ACPI_5_1_ERST_STATUS_FAILED 0x03
+#define EFI_ACPI_5_1_ERST_STATUS_RECORD_STORE_EMPTY 0x04
+#define EFI_ACPI_5_1_ERST_STATUS_RECORD_NOT_FOUND 0x05
///
/// ERST Serialization Instructions
///
-#define EFI_ACPI_5_1_ERST_READ_REGISTER 0x00
-#define EFI_ACPI_5_1_ERST_READ_REGISTER_VALUE 0x01
-#define EFI_ACPI_5_1_ERST_WRITE_REGISTER 0x02
-#define EFI_ACPI_5_1_ERST_WRITE_REGISTER_VALUE 0x03
-#define EFI_ACPI_5_1_ERST_NOOP 0x04
-#define EFI_ACPI_5_1_ERST_LOAD_VAR1 0x05
-#define EFI_ACPI_5_1_ERST_LOAD_VAR2 0x06
-#define EFI_ACPI_5_1_ERST_STORE_VAR1 0x07
-#define EFI_ACPI_5_1_ERST_ADD 0x08
-#define EFI_ACPI_5_1_ERST_SUBTRACT 0x09
-#define EFI_ACPI_5_1_ERST_ADD_VALUE 0x0A
-#define EFI_ACPI_5_1_ERST_SUBTRACT_VALUE 0x0B
-#define EFI_ACPI_5_1_ERST_STALL 0x0C
-#define EFI_ACPI_5_1_ERST_STALL_WHILE_TRUE 0x0D
-#define EFI_ACPI_5_1_ERST_SKIP_NEXT_INSTRUCTION_IF_TRUE 0x0E
-#define EFI_ACPI_5_1_ERST_GOTO 0x0F
-#define EFI_ACPI_5_1_ERST_SET_SRC_ADDRESS_BASE 0x10
-#define EFI_ACPI_5_1_ERST_SET_DST_ADDRESS_BASE 0x11
-#define EFI_ACPI_5_1_ERST_MOVE_DATA 0x12
+#define EFI_ACPI_5_1_ERST_READ_REGISTER 0x00
+#define EFI_ACPI_5_1_ERST_READ_REGISTER_VALUE 0x01
+#define EFI_ACPI_5_1_ERST_WRITE_REGISTER 0x02
+#define EFI_ACPI_5_1_ERST_WRITE_REGISTER_VALUE 0x03
+#define EFI_ACPI_5_1_ERST_NOOP 0x04
+#define EFI_ACPI_5_1_ERST_LOAD_VAR1 0x05
+#define EFI_ACPI_5_1_ERST_LOAD_VAR2 0x06
+#define EFI_ACPI_5_1_ERST_STORE_VAR1 0x07
+#define EFI_ACPI_5_1_ERST_ADD 0x08
+#define EFI_ACPI_5_1_ERST_SUBTRACT 0x09
+#define EFI_ACPI_5_1_ERST_ADD_VALUE 0x0A
+#define EFI_ACPI_5_1_ERST_SUBTRACT_VALUE 0x0B
+#define EFI_ACPI_5_1_ERST_STALL 0x0C
+#define EFI_ACPI_5_1_ERST_STALL_WHILE_TRUE 0x0D
+#define EFI_ACPI_5_1_ERST_SKIP_NEXT_INSTRUCTION_IF_TRUE 0x0E
+#define EFI_ACPI_5_1_ERST_GOTO 0x0F
+#define EFI_ACPI_5_1_ERST_SET_SRC_ADDRESS_BASE 0x10
+#define EFI_ACPI_5_1_ERST_SET_DST_ADDRESS_BASE 0x11
+#define EFI_ACPI_5_1_ERST_MOVE_DATA 0x12
///
/// ERST Instruction Flags
///
-#define EFI_ACPI_5_1_ERST_PRESERVE_REGISTER 0x01
+#define EFI_ACPI_5_1_ERST_PRESERVE_REGISTER 0x01
///
/// ERST Serialization Instruction Entry
///
typedef struct {
- UINT8 SerializationAction;
- UINT8 Instruction;
- UINT8 Flags;
- UINT8 Reserved0;
- EFI_ACPI_5_1_GENERIC_ADDRESS_STRUCTURE RegisterRegion;
- UINT64 Value;
- UINT64 Mask;
+ UINT8 SerializationAction;
+ UINT8 Instruction;
+ UINT8 Flags;
+ UINT8 Reserved0;
+ EFI_ACPI_5_1_GENERIC_ADDRESS_STRUCTURE RegisterRegion;
+ UINT64 Value;
+ UINT64 Mask;
} EFI_ACPI_5_1_ERST_SERIALIZATION_INSTRUCTION_ENTRY;
///
/// EINJ - Error Injection Table
///
typedef struct {
- EFI_ACPI_DESCRIPTION_HEADER Header;
- UINT32 InjectionHeaderSize;
- UINT8 InjectionFlags;
- UINT8 Reserved0[3];
- UINT32 InjectionEntryCount;
+ EFI_ACPI_DESCRIPTION_HEADER Header;
+ UINT32 InjectionHeaderSize;
+ UINT8 InjectionFlags;
+ UINT8 Reserved0[3];
+ UINT32 InjectionEntryCount;
} EFI_ACPI_5_1_ERROR_INJECTION_TABLE_HEADER;
///
/// EINJ Version (as defined in ACPI 5.1 spec.)
///
-#define EFI_ACPI_5_1_ERROR_INJECTION_TABLE_REVISION 0x01
+#define EFI_ACPI_5_1_ERROR_INJECTION_TABLE_REVISION 0x01
///
/// EINJ Error Injection Actions
///
-#define EFI_ACPI_5_1_EINJ_BEGIN_INJECTION_OPERATION 0x00
-#define EFI_ACPI_5_1_EINJ_GET_TRIGGER_ERROR_ACTION_TABLE 0x01
-#define EFI_ACPI_5_1_EINJ_SET_ERROR_TYPE 0x02
-#define EFI_ACPI_5_1_EINJ_GET_ERROR_TYPE 0x03
-#define EFI_ACPI_5_1_EINJ_END_OPERATION 0x04
-#define EFI_ACPI_5_1_EINJ_EXECUTE_OPERATION 0x05
-#define EFI_ACPI_5_1_EINJ_CHECK_BUSY_STATUS 0x06
-#define EFI_ACPI_5_1_EINJ_GET_COMMAND_STATUS 0x07
-#define EFI_ACPI_5_1_EINJ_TRIGGER_ERROR 0xFF
+#define EFI_ACPI_5_1_EINJ_BEGIN_INJECTION_OPERATION 0x00
+#define EFI_ACPI_5_1_EINJ_GET_TRIGGER_ERROR_ACTION_TABLE 0x01
+#define EFI_ACPI_5_1_EINJ_SET_ERROR_TYPE 0x02
+#define EFI_ACPI_5_1_EINJ_GET_ERROR_TYPE 0x03
+#define EFI_ACPI_5_1_EINJ_END_OPERATION 0x04
+#define EFI_ACPI_5_1_EINJ_EXECUTE_OPERATION 0x05
+#define EFI_ACPI_5_1_EINJ_CHECK_BUSY_STATUS 0x06
+#define EFI_ACPI_5_1_EINJ_GET_COMMAND_STATUS 0x07
+#define EFI_ACPI_5_1_EINJ_SET_ERROR_TYPE_WITH_ADDRESS 0x08
+#define EFI_ACPI_5_1_EINJ_TRIGGER_ERROR 0xFF
///
/// EINJ Action Command Status
///
-#define EFI_ACPI_5_1_EINJ_STATUS_SUCCESS 0x00
-#define EFI_ACPI_5_1_EINJ_STATUS_UNKNOWN_FAILURE 0x01
-#define EFI_ACPI_5_1_EINJ_STATUS_INVALID_ACCESS 0x02
+#define EFI_ACPI_5_1_EINJ_STATUS_SUCCESS 0x00
+#define EFI_ACPI_5_1_EINJ_STATUS_UNKNOWN_FAILURE 0x01
+#define EFI_ACPI_5_1_EINJ_STATUS_INVALID_ACCESS 0x02
///
/// EINJ Error Type Definition
///
-#define EFI_ACPI_5_1_EINJ_ERROR_PROCESSOR_CORRECTABLE (1 << 0)
-#define EFI_ACPI_5_1_EINJ_ERROR_PROCESSOR_UNCORRECTABLE_NONFATAL (1 << 1)
-#define EFI_ACPI_5_1_EINJ_ERROR_PROCESSOR_UNCORRECTABLE_FATAL (1 << 2)
-#define EFI_ACPI_5_1_EINJ_ERROR_MEMORY_CORRECTABLE (1 << 3)
-#define EFI_ACPI_5_1_EINJ_ERROR_MEMORY_UNCORRECTABLE_NONFATAL (1 << 4)
-#define EFI_ACPI_5_1_EINJ_ERROR_MEMORY_UNCORRECTABLE_FATAL (1 << 5)
-#define EFI_ACPI_5_1_EINJ_ERROR_PCI_EXPRESS_CORRECTABLE (1 << 6)
-#define EFI_ACPI_5_1_EINJ_ERROR_PCI_EXPRESS_UNCORRECTABLE_NONFATAL (1 << 7)
-#define EFI_ACPI_5_1_EINJ_ERROR_PCI_EXPRESS_UNCORRECTABLE_FATAL (1 << 8)
-#define EFI_ACPI_5_1_EINJ_ERROR_PLATFORM_CORRECTABLE (1 << 9)
-#define EFI_ACPI_5_1_EINJ_ERROR_PLATFORM_UNCORRECTABLE_NONFATAL (1 << 10)
-#define EFI_ACPI_5_1_EINJ_ERROR_PLATFORM_UNCORRECTABLE_FATAL (1 << 11)
+#define EFI_ACPI_5_1_EINJ_ERROR_PROCESSOR_CORRECTABLE (1 << 0)
+#define EFI_ACPI_5_1_EINJ_ERROR_PROCESSOR_UNCORRECTABLE_NONFATAL (1 << 1)
+#define EFI_ACPI_5_1_EINJ_ERROR_PROCESSOR_UNCORRECTABLE_FATAL (1 << 2)
+#define EFI_ACPI_5_1_EINJ_ERROR_MEMORY_CORRECTABLE (1 << 3)
+#define EFI_ACPI_5_1_EINJ_ERROR_MEMORY_UNCORRECTABLE_NONFATAL (1 << 4)
+#define EFI_ACPI_5_1_EINJ_ERROR_MEMORY_UNCORRECTABLE_FATAL (1 << 5)
+#define EFI_ACPI_5_1_EINJ_ERROR_PCI_EXPRESS_CORRECTABLE (1 << 6)
+#define EFI_ACPI_5_1_EINJ_ERROR_PCI_EXPRESS_UNCORRECTABLE_NONFATAL (1 << 7)
+#define EFI_ACPI_5_1_EINJ_ERROR_PCI_EXPRESS_UNCORRECTABLE_FATAL (1 << 8)
+#define EFI_ACPI_5_1_EINJ_ERROR_PLATFORM_CORRECTABLE (1 << 9)
+#define EFI_ACPI_5_1_EINJ_ERROR_PLATFORM_UNCORRECTABLE_NONFATAL (1 << 10)
+#define EFI_ACPI_5_1_EINJ_ERROR_PLATFORM_UNCORRECTABLE_FATAL (1 << 11)
///
/// EINJ Injection Instructions
///
-#define EFI_ACPI_5_1_EINJ_READ_REGISTER 0x00
-#define EFI_ACPI_5_1_EINJ_READ_REGISTER_VALUE 0x01
-#define EFI_ACPI_5_1_EINJ_WRITE_REGISTER 0x02
-#define EFI_ACPI_5_1_EINJ_WRITE_REGISTER_VALUE 0x03
-#define EFI_ACPI_5_1_EINJ_NOOP 0x04
+#define EFI_ACPI_5_1_EINJ_READ_REGISTER 0x00
+#define EFI_ACPI_5_1_EINJ_READ_REGISTER_VALUE 0x01
+#define EFI_ACPI_5_1_EINJ_WRITE_REGISTER 0x02
+#define EFI_ACPI_5_1_EINJ_WRITE_REGISTER_VALUE 0x03
+#define EFI_ACPI_5_1_EINJ_NOOP 0x04
///
/// EINJ Instruction Flags
///
-#define EFI_ACPI_5_1_EINJ_PRESERVE_REGISTER 0x01
+#define EFI_ACPI_5_1_EINJ_PRESERVE_REGISTER 0x01
///
/// EINJ Injection Instruction Entry
///
typedef struct {
- UINT8 InjectionAction;
- UINT8 Instruction;
- UINT8 Flags;
- UINT8 Reserved0;
- EFI_ACPI_5_1_GENERIC_ADDRESS_STRUCTURE RegisterRegion;
- UINT64 Value;
- UINT64 Mask;
+ UINT8 InjectionAction;
+ UINT8 Instruction;
+ UINT8 Flags;
+ UINT8 Reserved0;
+ EFI_ACPI_5_1_GENERIC_ADDRESS_STRUCTURE RegisterRegion;
+ UINT64 Value;
+ UINT64 Mask;
} EFI_ACPI_5_1_EINJ_INJECTION_INSTRUCTION_ENTRY;
///
/// EINJ Trigger Action Table
///
typedef struct {
- UINT32 HeaderSize;
- UINT32 Revision;
- UINT32 TableSize;
- UINT32 EntryCount;
+ UINT32 HeaderSize;
+ UINT32 Revision;
+ UINT32 TableSize;
+ UINT32 EntryCount;
} EFI_ACPI_5_1_EINJ_TRIGGER_ACTION_TABLE;
///
/// Platform Communications Channel Table (PCCT)
///
typedef struct {
- EFI_ACPI_DESCRIPTION_HEADER Header;
- UINT32 Flags;
- UINT64 Reserved;
+ EFI_ACPI_DESCRIPTION_HEADER Header;
+ UINT32 Flags;
+ UINT64 Reserved;
} EFI_ACPI_5_1_PLATFORM_COMMUNICATION_CHANNEL_TABLE_HEADER;
///
/// PCCT Version (as defined in ACPI 5.1 spec.)
///
-#define EFI_ACPI_5_1_PLATFORM_COMMUNICATION_CHANNEL_TABLE_REVISION 0x01
+#define EFI_ACPI_5_1_PLATFORM_COMMUNICATION_CHANNEL_TABLE_REVISION 0x01
///
/// PCCT Global Flags
///
-#define EFI_ACPI_5_1_PCCT_FLAGS_SCI_DOORBELL BIT0
+#define EFI_ACPI_5_1_PCCT_FLAGS_SCI_DOORBELL BIT0
//
// PCCT Subspace type
@@ -1834,25 +1851,25 @@ typedef struct {
/// PCC Subspace Structure Header
///
typedef struct {
- UINT8 Type;
- UINT8 Length;
+ UINT8 Type;
+ UINT8 Length;
} EFI_ACPI_5_1_PCCT_SUBSPACE_HEADER;
///
/// Generic Communications Subspace Structure
///
typedef struct {
- UINT8 Type;
- UINT8 Length;
- UINT8 Reserved[6];
- UINT64 BaseAddress;
- UINT64 AddressLength;
- EFI_ACPI_5_1_GENERIC_ADDRESS_STRUCTURE DoorbellRegister;
- UINT64 DoorbellPreserve;
- UINT64 DoorbellWrite;
- UINT32 NominalLatency;
- UINT32 MaximumPeriodicAccessRate;
- UINT16 MinimumRequestTurnaroundTime;
+ UINT8 Type;
+ UINT8 Length;
+ UINT8 Reserved[6];
+ UINT64 BaseAddress;
+ UINT64 AddressLength;
+ EFI_ACPI_5_1_GENERIC_ADDRESS_STRUCTURE DoorbellRegister;
+ UINT64 DoorbellPreserve;
+ UINT64 DoorbellWrite;
+ UINT32 NominalLatency;
+ UINT32 MaximumPeriodicAccessRate;
+ UINT16 MinimumRequestTurnaroundTime;
} EFI_ACPI_5_1_PCCT_SUBSPACE_GENERIC;
///
@@ -1860,18 +1877,18 @@ typedef struct {
///
typedef struct {
- UINT8 Command;
- UINT8 Reserved:7;
- UINT8 GenerateSci:1;
+ UINT8 Command;
+ UINT8 Reserved : 7;
+ UINT8 GenerateSci : 1;
} EFI_ACPI_5_1_PCCT_GENERIC_SHARED_MEMORY_REGION_COMMAND;
typedef struct {
- UINT8 CommandComplete:1;
- UINT8 SciDoorbell:1;
- UINT8 Error:1;
- UINT8 PlatformNotification:1;
- UINT8 Reserved:4;
- UINT8 Reserved1;
+ UINT8 CommandComplete : 1;
+ UINT8 SciDoorbell : 1;
+ UINT8 Error : 1;
+ UINT8 PlatformNotification : 1;
+ UINT8 Reserved : 4;
+ UINT8 Reserved1;
} EFI_ACPI_5_1_PCCT_GENERIC_SHARED_MEMORY_REGION_STATUS;
typedef struct {
diff --git a/sys/contrib/edk2/Include/IndustryStandard/Acpi60.h b/sys/contrib/edk2/Include/IndustryStandard/Acpi60.h
index 35417fb39b11..27f05e3bcd28 100644
--- a/sys/contrib/edk2/Include/IndustryStandard/Acpi60.h
+++ b/sys/contrib/edk2/Include/IndustryStandard/Acpi60.h
@@ -1,7 +1,7 @@
/** @file
ACPI 6.0 definitions from the ACPI Specification Revision 6.0 Errata A January, 2016.
- Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2015 - 2022, Intel Corporation. All rights reserved.<BR>
(C) Copyright 2015-2016 Hewlett Packard Enterprise Development LP<BR>
Copyright (c) 2020, ARM Ltd. All rights reserved.<BR>
SPDX-License-Identifier: BSD-2-Clause-Patent
@@ -12,6 +12,16 @@
#include <IndustryStandard/Acpi51.h>
+///
+/// _PSD Revision for ACPI 6.0
+///
+#define EFI_ACPI_6_0_AML_PSD_REVISION 0
+
+///
+/// _CPC Revision for ACPI 6.0
+///
+#define EFI_ACPI_6_0_AML_CPC_REVISION 2
+
//
// Ensure proper structure formats
//
@@ -21,21 +31,21 @@
/// ACPI 6.0 Generic Address Space definition
///
typedef struct {
- UINT8 AddressSpaceId;
- UINT8 RegisterBitWidth;
- UINT8 RegisterBitOffset;
- UINT8 AccessSize;
- UINT64 Address;
+ UINT8 AddressSpaceId;
+ UINT8 RegisterBitWidth;
+ UINT8 RegisterBitOffset;
+ UINT8 AccessSize;
+ UINT64 Address;
} EFI_ACPI_6_0_GENERIC_ADDRESS_STRUCTURE;
//
// Generic Address Space Address IDs
//
-#define EFI_ACPI_6_0_SYSTEM_MEMORY 0
-#define EFI_ACPI_6_0_SYSTEM_IO 1
-#define EFI_ACPI_6_0_PCI_CONFIGURATION_SPACE 2
-#define EFI_ACPI_6_0_EMBEDDED_CONTROLLER 3
-#define EFI_ACPI_6_0_SMBUS 4
+#define EFI_ACPI_6_0_SYSTEM_MEMORY 0
+#define EFI_ACPI_6_0_SYSTEM_IO 1
+#define EFI_ACPI_6_0_PCI_CONFIGURATION_SPACE 2
+#define EFI_ACPI_6_0_EMBEDDED_CONTROLLER 3
+#define EFI_ACPI_6_0_SMBUS 4
#define EFI_ACPI_6_0_PLATFORM_COMMUNICATION_CHANNEL 0x0A
#define EFI_ACPI_6_0_FUNCTIONAL_FIXED_HARDWARE 0x7F
@@ -56,29 +66,29 @@ typedef struct {
/// Root System Description Pointer Structure
///
typedef struct {
- UINT64 Signature;
- UINT8 Checksum;
- UINT8 OemId[6];
- UINT8 Revision;
- UINT32 RsdtAddress;
- UINT32 Length;
- UINT64 XsdtAddress;
- UINT8 ExtendedChecksum;
- UINT8 Reserved[3];
+ UINT64 Signature;
+ UINT8 Checksum;
+ UINT8 OemId[6];
+ UINT8 Revision;
+ UINT32 RsdtAddress;
+ UINT32 Length;
+ UINT64 XsdtAddress;
+ UINT8 ExtendedChecksum;
+ UINT8 Reserved[3];
} EFI_ACPI_6_0_ROOT_SYSTEM_DESCRIPTION_POINTER;
///
/// RSD_PTR Revision (as defined in ACPI 6.0 spec.)
///
-#define EFI_ACPI_6_0_ROOT_SYSTEM_DESCRIPTION_POINTER_REVISION 0x02 ///< ACPISpec (Revision 6.0) says current value is 2
+#define EFI_ACPI_6_0_ROOT_SYSTEM_DESCRIPTION_POINTER_REVISION 0x02 ///< ACPISpec (Revision 6.0) says current value is 2
///
/// Common table header, this prefaces all ACPI tables, including FACS, but
/// excluding the RSD PTR structure
///
typedef struct {
- UINT32 Signature;
- UINT32 Length;
+ UINT32 Signature;
+ UINT32 Length;
} EFI_ACPI_6_0_COMMON_HEADER;
//
@@ -90,7 +100,7 @@ typedef struct {
///
/// RSDT Revision (as defined in ACPI 6.0 spec.)
///
-#define EFI_ACPI_6_0_ROOT_SYSTEM_DESCRIPTION_TABLE_REVISION 0x01
+#define EFI_ACPI_6_0_ROOT_SYSTEM_DESCRIPTION_TABLE_REVISION 0x01
//
// Extended System Description Table
@@ -101,74 +111,74 @@ typedef struct {
///
/// XSDT Revision (as defined in ACPI 6.0 spec.)
///
-#define EFI_ACPI_6_0_EXTENDED_SYSTEM_DESCRIPTION_TABLE_REVISION 0x01
+#define EFI_ACPI_6_0_EXTENDED_SYSTEM_DESCRIPTION_TABLE_REVISION 0x01
///
/// Fixed ACPI Description Table Structure (FADT)
///
typedef struct {
- EFI_ACPI_DESCRIPTION_HEADER Header;
- UINT32 FirmwareCtrl;
- UINT32 Dsdt;
- UINT8 Reserved0;
- UINT8 PreferredPmProfile;
- UINT16 SciInt;
- UINT32 SmiCmd;
- UINT8 AcpiEnable;
- UINT8 AcpiDisable;
- UINT8 S4BiosReq;
- UINT8 PstateCnt;
- UINT32 Pm1aEvtBlk;
- UINT32 Pm1bEvtBlk;
- UINT32 Pm1aCntBlk;
- UINT32 Pm1bCntBlk;
- UINT32 Pm2CntBlk;
- UINT32 PmTmrBlk;
- UINT32 Gpe0Blk;
- UINT32 Gpe1Blk;
- UINT8 Pm1EvtLen;
- UINT8 Pm1CntLen;
- UINT8 Pm2CntLen;
- UINT8 PmTmrLen;
- UINT8 Gpe0BlkLen;
- UINT8 Gpe1BlkLen;
- UINT8 Gpe1Base;
- UINT8 CstCnt;
- UINT16 PLvl2Lat;
- UINT16 PLvl3Lat;
- UINT16 FlushSize;
- UINT16 FlushStride;
- UINT8 DutyOffset;
- UINT8 DutyWidth;
- UINT8 DayAlrm;
- UINT8 MonAlrm;
- UINT8 Century;
- UINT16 IaPcBootArch;
- UINT8 Reserved1;
- UINT32 Flags;
- EFI_ACPI_6_0_GENERIC_ADDRESS_STRUCTURE ResetReg;
- UINT8 ResetValue;
- UINT16 ArmBootArch;
- UINT8 MinorVersion;
- UINT64 XFirmwareCtrl;
- UINT64 XDsdt;
- EFI_ACPI_6_0_GENERIC_ADDRESS_STRUCTURE XPm1aEvtBlk;
- EFI_ACPI_6_0_GENERIC_ADDRESS_STRUCTURE XPm1bEvtBlk;
- EFI_ACPI_6_0_GENERIC_ADDRESS_STRUCTURE XPm1aCntBlk;
- EFI_ACPI_6_0_GENERIC_ADDRESS_STRUCTURE XPm1bCntBlk;
- EFI_ACPI_6_0_GENERIC_ADDRESS_STRUCTURE XPm2CntBlk;
- EFI_ACPI_6_0_GENERIC_ADDRESS_STRUCTURE XPmTmrBlk;
- EFI_ACPI_6_0_GENERIC_ADDRESS_STRUCTURE XGpe0Blk;
- EFI_ACPI_6_0_GENERIC_ADDRESS_STRUCTURE XGpe1Blk;
- EFI_ACPI_6_0_GENERIC_ADDRESS_STRUCTURE SleepControlReg;
- EFI_ACPI_6_0_GENERIC_ADDRESS_STRUCTURE SleepStatusReg;
- UINT64 HypervisorVendorIdentity;
+ EFI_ACPI_DESCRIPTION_HEADER Header;
+ UINT32 FirmwareCtrl;
+ UINT32 Dsdt;
+ UINT8 Reserved0;
+ UINT8 PreferredPmProfile;
+ UINT16 SciInt;
+ UINT32 SmiCmd;
+ UINT8 AcpiEnable;
+ UINT8 AcpiDisable;
+ UINT8 S4BiosReq;
+ UINT8 PstateCnt;
+ UINT32 Pm1aEvtBlk;
+ UINT32 Pm1bEvtBlk;
+ UINT32 Pm1aCntBlk;
+ UINT32 Pm1bCntBlk;
+ UINT32 Pm2CntBlk;
+ UINT32 PmTmrBlk;
+ UINT32 Gpe0Blk;
+ UINT32 Gpe1Blk;
+ UINT8 Pm1EvtLen;
+ UINT8 Pm1CntLen;
+ UINT8 Pm2CntLen;
+ UINT8 PmTmrLen;
+ UINT8 Gpe0BlkLen;
+ UINT8 Gpe1BlkLen;
+ UINT8 Gpe1Base;
+ UINT8 CstCnt;
+ UINT16 PLvl2Lat;
+ UINT16 PLvl3Lat;
+ UINT16 FlushSize;
+ UINT16 FlushStride;
+ UINT8 DutyOffset;
+ UINT8 DutyWidth;
+ UINT8 DayAlrm;
+ UINT8 MonAlrm;
+ UINT8 Century;
+ UINT16 IaPcBootArch;
+ UINT8 Reserved1;
+ UINT32 Flags;
+ EFI_ACPI_6_0_GENERIC_ADDRESS_STRUCTURE ResetReg;
+ UINT8 ResetValue;
+ UINT16 ArmBootArch;
+ UINT8 MinorVersion;
+ UINT64 XFirmwareCtrl;
+ UINT64 XDsdt;
+ EFI_ACPI_6_0_GENERIC_ADDRESS_STRUCTURE XPm1aEvtBlk;
+ EFI_ACPI_6_0_GENERIC_ADDRESS_STRUCTURE XPm1bEvtBlk;
+ EFI_ACPI_6_0_GENERIC_ADDRESS_STRUCTURE XPm1aCntBlk;
+ EFI_ACPI_6_0_GENERIC_ADDRESS_STRUCTURE XPm1bCntBlk;
+ EFI_ACPI_6_0_GENERIC_ADDRESS_STRUCTURE XPm2CntBlk;
+ EFI_ACPI_6_0_GENERIC_ADDRESS_STRUCTURE XPmTmrBlk;
+ EFI_ACPI_6_0_GENERIC_ADDRESS_STRUCTURE XGpe0Blk;
+ EFI_ACPI_6_0_GENERIC_ADDRESS_STRUCTURE XGpe1Blk;
+ EFI_ACPI_6_0_GENERIC_ADDRESS_STRUCTURE SleepControlReg;
+ EFI_ACPI_6_0_GENERIC_ADDRESS_STRUCTURE SleepStatusReg;
+ UINT64 HypervisorVendorIdentity;
} EFI_ACPI_6_0_FIXED_ACPI_DESCRIPTION_TABLE;
///
/// FADT Version (as defined in ACPI 6.0 spec.)
///
-#define EFI_ACPI_6_0_FIXED_ACPI_DESCRIPTION_TABLE_REVISION 0x06
+#define EFI_ACPI_6_0_FIXED_ACPI_DESCRIPTION_TABLE_REVISION 0x06
#define EFI_ACPI_6_0_FIXED_ACPI_DESCRIPTION_TABLE_MINOR_REVISION 0x00
//
@@ -188,62 +198,62 @@ typedef struct {
// Fixed ACPI Description Table Boot Architecture Flags
// All other bits are reserved and must be set to 0.
//
-#define EFI_ACPI_6_0_LEGACY_DEVICES BIT0
-#define EFI_ACPI_6_0_8042 BIT1
-#define EFI_ACPI_6_0_VGA_NOT_PRESENT BIT2
-#define EFI_ACPI_6_0_MSI_NOT_SUPPORTED BIT3
-#define EFI_ACPI_6_0_PCIE_ASPM_CONTROLS BIT4
-#define EFI_ACPI_6_0_CMOS_RTC_NOT_PRESENT BIT5
+#define EFI_ACPI_6_0_LEGACY_DEVICES BIT0
+#define EFI_ACPI_6_0_8042 BIT1
+#define EFI_ACPI_6_0_VGA_NOT_PRESENT BIT2
+#define EFI_ACPI_6_0_MSI_NOT_SUPPORTED BIT3
+#define EFI_ACPI_6_0_PCIE_ASPM_CONTROLS BIT4
+#define EFI_ACPI_6_0_CMOS_RTC_NOT_PRESENT BIT5
//
// Fixed ACPI Description Table Arm Boot Architecture Flags
// All other bits are reserved and must be set to 0.
//
-#define EFI_ACPI_6_0_ARM_PSCI_COMPLIANT BIT0
-#define EFI_ACPI_6_0_ARM_PSCI_USE_HVC BIT1
+#define EFI_ACPI_6_0_ARM_PSCI_COMPLIANT BIT0
+#define EFI_ACPI_6_0_ARM_PSCI_USE_HVC BIT1
//
// Fixed ACPI Description Table Fixed Feature Flags
// All other bits are reserved and must be set to 0.
//
-#define EFI_ACPI_6_0_WBINVD BIT0
-#define EFI_ACPI_6_0_WBINVD_FLUSH BIT1
-#define EFI_ACPI_6_0_PROC_C1 BIT2
-#define EFI_ACPI_6_0_P_LVL2_UP BIT3
-#define EFI_ACPI_6_0_PWR_BUTTON BIT4
-#define EFI_ACPI_6_0_SLP_BUTTON BIT5
-#define EFI_ACPI_6_0_FIX_RTC BIT6
-#define EFI_ACPI_6_0_RTC_S4 BIT7
-#define EFI_ACPI_6_0_TMR_VAL_EXT BIT8
-#define EFI_ACPI_6_0_DCK_CAP BIT9
-#define EFI_ACPI_6_0_RESET_REG_SUP BIT10
-#define EFI_ACPI_6_0_SEALED_CASE BIT11
-#define EFI_ACPI_6_0_HEADLESS BIT12
-#define EFI_ACPI_6_0_CPU_SW_SLP BIT13
-#define EFI_ACPI_6_0_PCI_EXP_WAK BIT14
-#define EFI_ACPI_6_0_USE_PLATFORM_CLOCK BIT15
-#define EFI_ACPI_6_0_S4_RTC_STS_VALID BIT16
-#define EFI_ACPI_6_0_REMOTE_POWER_ON_CAPABLE BIT17
-#define EFI_ACPI_6_0_FORCE_APIC_CLUSTER_MODEL BIT18
-#define EFI_ACPI_6_0_FORCE_APIC_PHYSICAL_DESTINATION_MODE BIT19
-#define EFI_ACPI_6_0_HW_REDUCED_ACPI BIT20
-#define EFI_ACPI_6_0_LOW_POWER_S0_IDLE_CAPABLE BIT21
+#define EFI_ACPI_6_0_WBINVD BIT0
+#define EFI_ACPI_6_0_WBINVD_FLUSH BIT1
+#define EFI_ACPI_6_0_PROC_C1 BIT2
+#define EFI_ACPI_6_0_P_LVL2_UP BIT3
+#define EFI_ACPI_6_0_PWR_BUTTON BIT4
+#define EFI_ACPI_6_0_SLP_BUTTON BIT5
+#define EFI_ACPI_6_0_FIX_RTC BIT6
+#define EFI_ACPI_6_0_RTC_S4 BIT7
+#define EFI_ACPI_6_0_TMR_VAL_EXT BIT8
+#define EFI_ACPI_6_0_DCK_CAP BIT9
+#define EFI_ACPI_6_0_RESET_REG_SUP BIT10
+#define EFI_ACPI_6_0_SEALED_CASE BIT11
+#define EFI_ACPI_6_0_HEADLESS BIT12
+#define EFI_ACPI_6_0_CPU_SW_SLP BIT13
+#define EFI_ACPI_6_0_PCI_EXP_WAK BIT14
+#define EFI_ACPI_6_0_USE_PLATFORM_CLOCK BIT15
+#define EFI_ACPI_6_0_S4_RTC_STS_VALID BIT16
+#define EFI_ACPI_6_0_REMOTE_POWER_ON_CAPABLE BIT17
+#define EFI_ACPI_6_0_FORCE_APIC_CLUSTER_MODEL BIT18
+#define EFI_ACPI_6_0_FORCE_APIC_PHYSICAL_DESTINATION_MODE BIT19
+#define EFI_ACPI_6_0_HW_REDUCED_ACPI BIT20
+#define EFI_ACPI_6_0_LOW_POWER_S0_IDLE_CAPABLE BIT21
///
/// Firmware ACPI Control Structure
///
typedef struct {
- UINT32 Signature;
- UINT32 Length;
- UINT32 HardwareSignature;
- UINT32 FirmwareWakingVector;
- UINT32 GlobalLock;
- UINT32 Flags;
- UINT64 XFirmwareWakingVector;
- UINT8 Version;
- UINT8 Reserved0[3];
- UINT32 OspmFlags;
- UINT8 Reserved1[24];
+ UINT32 Signature;
+ UINT32 Length;
+ UINT32 HardwareSignature;
+ UINT32 FirmwareWakingVector;
+ UINT32 GlobalLock;
+ UINT32 Flags;
+ UINT64 XFirmwareWakingVector;
+ UINT8 Version;
+ UINT8 Reserved0[3];
+ UINT32 OspmFlags;
+ UINT8 Reserved1[24];
} EFI_ACPI_6_0_FIRMWARE_ACPI_CONTROL_STRUCTURE;
///
@@ -255,14 +265,14 @@ typedef struct {
/// Firmware Control Structure Feature Flags
/// All other bits are reserved and must be set to 0.
///
-#define EFI_ACPI_6_0_S4BIOS_F BIT0
-#define EFI_ACPI_6_0_64BIT_WAKE_SUPPORTED_F BIT1
+#define EFI_ACPI_6_0_S4BIOS_F BIT0
+#define EFI_ACPI_6_0_64BIT_WAKE_SUPPORTED_F BIT1
///
/// OSPM Enabled Firmware Control Structure Flags
/// All other bits are reserved and must be set to 0.
///
-#define EFI_ACPI_6_0_OSPM_64BIT_WAKE_F BIT0
+#define EFI_ACPI_6_0_OSPM_64BIT_WAKE_F BIT0
//
// Differentiated System Description Table,
@@ -271,29 +281,29 @@ typedef struct {
// no definition needed as they are common description table header, the same with
// EFI_ACPI_DESCRIPTION_HEADER, followed by a definition block.
//
-#define EFI_ACPI_6_0_DIFFERENTIATED_SYSTEM_DESCRIPTION_TABLE_REVISION 0x02
-#define EFI_ACPI_6_0_SECONDARY_SYSTEM_DESCRIPTION_TABLE_REVISION 0x02
+#define EFI_ACPI_6_0_DIFFERENTIATED_SYSTEM_DESCRIPTION_TABLE_REVISION 0x02
+#define EFI_ACPI_6_0_SECONDARY_SYSTEM_DESCRIPTION_TABLE_REVISION 0x02
///
/// Multiple APIC Description Table header definition. The rest of the table
/// must be defined in a platform specific manner.
///
typedef struct {
- EFI_ACPI_DESCRIPTION_HEADER Header;
- UINT32 LocalApicAddress;
- UINT32 Flags;
+ EFI_ACPI_DESCRIPTION_HEADER Header;
+ UINT32 LocalApicAddress;
+ UINT32 Flags;
} EFI_ACPI_6_0_MULTIPLE_APIC_DESCRIPTION_TABLE_HEADER;
///
/// MADT Revision (as defined in ACPI 6.0 Errata A spec.)
///
-#define EFI_ACPI_6_0_MULTIPLE_APIC_DESCRIPTION_TABLE_REVISION 0x04
+#define EFI_ACPI_6_0_MULTIPLE_APIC_DESCRIPTION_TABLE_REVISION 0x04
///
/// Multiple APIC Flags
/// All other bits are reserved and must be set to 0.
///
-#define EFI_ACPI_6_0_PCAT_COMPAT BIT0
+#define EFI_ACPI_6_0_PCAT_COMPAT BIT0
//
// Multiple APIC Description Table APIC structure types
@@ -325,57 +335,57 @@ typedef struct {
/// Processor Local APIC Structure Definition
///
typedef struct {
- UINT8 Type;
- UINT8 Length;
- UINT8 AcpiProcessorUid;
- UINT8 ApicId;
- UINT32 Flags;
+ UINT8 Type;
+ UINT8 Length;
+ UINT8 AcpiProcessorUid;
+ UINT8 ApicId;
+ UINT32 Flags;
} EFI_ACPI_6_0_PROCESSOR_LOCAL_APIC_STRUCTURE;
///
/// Local APIC Flags. All other bits are reserved and must be 0.
///
-#define EFI_ACPI_6_0_LOCAL_APIC_ENABLED BIT0
+#define EFI_ACPI_6_0_LOCAL_APIC_ENABLED BIT0
///
/// IO APIC Structure
///
typedef struct {
- UINT8 Type;
- UINT8 Length;
- UINT8 IoApicId;
- UINT8 Reserved;
- UINT32 IoApicAddress;
- UINT32 GlobalSystemInterruptBase;
+ UINT8 Type;
+ UINT8 Length;
+ UINT8 IoApicId;
+ UINT8 Reserved;
+ UINT32 IoApicAddress;
+ UINT32 GlobalSystemInterruptBase;
} EFI_ACPI_6_0_IO_APIC_STRUCTURE;
///
/// Interrupt Source Override Structure
///
typedef struct {
- UINT8 Type;
- UINT8 Length;
- UINT8 Bus;
- UINT8 Source;
- UINT32 GlobalSystemInterrupt;
- UINT16 Flags;
+ UINT8 Type;
+ UINT8 Length;
+ UINT8 Bus;
+ UINT8 Source;
+ UINT32 GlobalSystemInterrupt;
+ UINT16 Flags;
} EFI_ACPI_6_0_INTERRUPT_SOURCE_OVERRIDE_STRUCTURE;
///
/// Platform Interrupt Sources Structure Definition
///
typedef struct {
- UINT8 Type;
- UINT8 Length;
- UINT16 Flags;
- UINT8 InterruptType;
- UINT8 ProcessorId;
- UINT8 ProcessorEid;
- UINT8 IoSapicVector;
- UINT32 GlobalSystemInterrupt;
- UINT32 PlatformInterruptSourceFlags;
- UINT8 CpeiProcessorOverride;
- UINT8 Reserved[31];
+ UINT8 Type;
+ UINT8 Length;
+ UINT16 Flags;
+ UINT8 InterruptType;
+ UINT8 ProcessorId;
+ UINT8 ProcessorEid;
+ UINT8 IoSapicVector;
+ UINT32 GlobalSystemInterrupt;
+ UINT32 PlatformInterruptSourceFlags;
+ UINT8 CpeiProcessorOverride;
+ UINT8 Reserved[31];
} EFI_ACPI_6_0_PLATFORM_INTERRUPT_APIC_STRUCTURE;
//
@@ -389,43 +399,43 @@ typedef struct {
/// Non-Maskable Interrupt Source Structure
///
typedef struct {
- UINT8 Type;
- UINT8 Length;
- UINT16 Flags;
- UINT32 GlobalSystemInterrupt;
+ UINT8 Type;
+ UINT8 Length;
+ UINT16 Flags;
+ UINT32 GlobalSystemInterrupt;
} EFI_ACPI_6_0_NON_MASKABLE_INTERRUPT_SOURCE_STRUCTURE;
///
/// Local APIC NMI Structure
///
typedef struct {
- UINT8 Type;
- UINT8 Length;
- UINT8 AcpiProcessorUid;
- UINT16 Flags;
- UINT8 LocalApicLint;
+ UINT8 Type;
+ UINT8 Length;
+ UINT8 AcpiProcessorUid;
+ UINT16 Flags;
+ UINT8 LocalApicLint;
} EFI_ACPI_6_0_LOCAL_APIC_NMI_STRUCTURE;
///
/// Local APIC Address Override Structure
///
typedef struct {
- UINT8 Type;
- UINT8 Length;
- UINT16 Reserved;
- UINT64 LocalApicAddress;
+ UINT8 Type;
+ UINT8 Length;
+ UINT16 Reserved;
+ UINT64 LocalApicAddress;
} EFI_ACPI_6_0_LOCAL_APIC_ADDRESS_OVERRIDE_STRUCTURE;
///
/// IO SAPIC Structure
///
typedef struct {
- UINT8 Type;
- UINT8 Length;
- UINT8 IoApicId;
- UINT8 Reserved;
- UINT32 GlobalSystemInterruptBase;
- UINT64 IoSapicAddress;
+ UINT8 Type;
+ UINT8 Length;
+ UINT8 IoApicId;
+ UINT8 Reserved;
+ UINT32 GlobalSystemInterruptBase;
+ UINT64 IoSapicAddress;
} EFI_ACPI_6_0_IO_SAPIC_STRUCTURE;
///
@@ -433,169 +443,169 @@ typedef struct {
/// This struct followed by a null-terminated ASCII string - ACPI Processor UID String
///
typedef struct {
- UINT8 Type;
- UINT8 Length;
- UINT8 AcpiProcessorId;
- UINT8 LocalSapicId;
- UINT8 LocalSapicEid;
- UINT8 Reserved[3];
- UINT32 Flags;
- UINT32 ACPIProcessorUIDValue;
+ UINT8 Type;
+ UINT8 Length;
+ UINT8 AcpiProcessorId;
+ UINT8 LocalSapicId;
+ UINT8 LocalSapicEid;
+ UINT8 Reserved[3];
+ UINT32 Flags;
+ UINT32 ACPIProcessorUIDValue;
} EFI_ACPI_6_0_PROCESSOR_LOCAL_SAPIC_STRUCTURE;
///
/// Platform Interrupt Sources Structure
///
typedef struct {
- UINT8 Type;
- UINT8 Length;
- UINT16 Flags;
- UINT8 InterruptType;
- UINT8 ProcessorId;
- UINT8 ProcessorEid;
- UINT8 IoSapicVector;
- UINT32 GlobalSystemInterrupt;
- UINT32 PlatformInterruptSourceFlags;
+ UINT8 Type;
+ UINT8 Length;
+ UINT16 Flags;
+ UINT8 InterruptType;
+ UINT8 ProcessorId;
+ UINT8 ProcessorEid;
+ UINT8 IoSapicVector;
+ UINT32 GlobalSystemInterrupt;
+ UINT32 PlatformInterruptSourceFlags;
} EFI_ACPI_6_0_PLATFORM_INTERRUPT_SOURCES_STRUCTURE;
///
/// Platform Interrupt Source Flags.
/// All other bits are reserved and must be set to 0.
///
-#define EFI_ACPI_6_0_CPEI_PROCESSOR_OVERRIDE BIT0
+#define EFI_ACPI_6_0_CPEI_PROCESSOR_OVERRIDE BIT0
///
/// Processor Local x2APIC Structure Definition
///
typedef struct {
- UINT8 Type;
- UINT8 Length;
- UINT8 Reserved[2];
- UINT32 X2ApicId;
- UINT32 Flags;
- UINT32 AcpiProcessorUid;
+ UINT8 Type;
+ UINT8 Length;
+ UINT8 Reserved[2];
+ UINT32 X2ApicId;
+ UINT32 Flags;
+ UINT32 AcpiProcessorUid;
} EFI_ACPI_6_0_PROCESSOR_LOCAL_X2APIC_STRUCTURE;
///
/// Local x2APIC NMI Structure
///
typedef struct {
- UINT8 Type;
- UINT8 Length;
- UINT16 Flags;
- UINT32 AcpiProcessorUid;
- UINT8 LocalX2ApicLint;
- UINT8 Reserved[3];
+ UINT8 Type;
+ UINT8 Length;
+ UINT16 Flags;
+ UINT32 AcpiProcessorUid;
+ UINT8 LocalX2ApicLint;
+ UINT8 Reserved[3];
} EFI_ACPI_6_0_LOCAL_X2APIC_NMI_STRUCTURE;
///
/// GIC Structure
///
typedef struct {
- UINT8 Type;
- UINT8 Length;
- UINT16 Reserved;
- UINT32 CPUInterfaceNumber;
- UINT32 AcpiProcessorUid;
- UINT32 Flags;
- UINT32 ParkingProtocolVersion;
- UINT32 PerformanceInterruptGsiv;
- UINT64 ParkedAddress;
- UINT64 PhysicalBaseAddress;
- UINT64 GICV;
- UINT64 GICH;
- UINT32 VGICMaintenanceInterrupt;
- UINT64 GICRBaseAddress;
- UINT64 MPIDR;
- UINT8 ProcessorPowerEfficiencyClass;
- UINT8 Reserved2[3];
+ UINT8 Type;
+ UINT8 Length;
+ UINT16 Reserved;
+ UINT32 CPUInterfaceNumber;
+ UINT32 AcpiProcessorUid;
+ UINT32 Flags;
+ UINT32 ParkingProtocolVersion;
+ UINT32 PerformanceInterruptGsiv;
+ UINT64 ParkedAddress;
+ UINT64 PhysicalBaseAddress;
+ UINT64 GICV;
+ UINT64 GICH;
+ UINT32 VGICMaintenanceInterrupt;
+ UINT64 GICRBaseAddress;
+ UINT64 MPIDR;
+ UINT8 ProcessorPowerEfficiencyClass;
+ UINT8 Reserved2[3];
} EFI_ACPI_6_0_GIC_STRUCTURE;
///
/// GIC Flags. All other bits are reserved and must be 0.
///
-#define EFI_ACPI_6_0_GIC_ENABLED BIT0
-#define EFI_ACPI_6_0_PERFORMANCE_INTERRUPT_MODEL BIT1
-#define EFI_ACPI_6_0_VGIC_MAINTENANCE_INTERRUPT_MODE_FLAGS BIT2
+#define EFI_ACPI_6_0_GIC_ENABLED BIT0
+#define EFI_ACPI_6_0_PERFORMANCE_INTERRUPT_MODEL BIT1
+#define EFI_ACPI_6_0_VGIC_MAINTENANCE_INTERRUPT_MODE_FLAGS BIT2
///
/// GIC Distributor Structure
///
typedef struct {
- UINT8 Type;
- UINT8 Length;
- UINT16 Reserved1;
- UINT32 GicId;
- UINT64 PhysicalBaseAddress;
- UINT32 SystemVectorBase;
- UINT8 GicVersion;
- UINT8 Reserved2[3];
+ UINT8 Type;
+ UINT8 Length;
+ UINT16 Reserved1;
+ UINT32 GicId;
+ UINT64 PhysicalBaseAddress;
+ UINT32 SystemVectorBase;
+ UINT8 GicVersion;
+ UINT8 Reserved2[3];
} EFI_ACPI_6_0_GIC_DISTRIBUTOR_STRUCTURE;
///
/// GIC Version
///
-#define EFI_ACPI_6_0_GIC_V1 0x01
-#define EFI_ACPI_6_0_GIC_V2 0x02
-#define EFI_ACPI_6_0_GIC_V3 0x03
-#define EFI_ACPI_6_0_GIC_V4 0x04
+#define EFI_ACPI_6_0_GIC_V1 0x01
+#define EFI_ACPI_6_0_GIC_V2 0x02
+#define EFI_ACPI_6_0_GIC_V3 0x03
+#define EFI_ACPI_6_0_GIC_V4 0x04
///
/// GIC MSI Frame Structure
///
typedef struct {
- UINT8 Type;
- UINT8 Length;
- UINT16 Reserved1;
- UINT32 GicMsiFrameId;
- UINT64 PhysicalBaseAddress;
- UINT32 Flags;
- UINT16 SPICount;
- UINT16 SPIBase;
+ UINT8 Type;
+ UINT8 Length;
+ UINT16 Reserved1;
+ UINT32 GicMsiFrameId;
+ UINT64 PhysicalBaseAddress;
+ UINT32 Flags;
+ UINT16 SPICount;
+ UINT16 SPIBase;
} EFI_ACPI_6_0_GIC_MSI_FRAME_STRUCTURE;
///
/// GIC MSI Frame Flags. All other bits are reserved and must be 0.
///
-#define EFI_ACPI_6_0_SPI_COUNT_BASE_SELECT BIT0
+#define EFI_ACPI_6_0_SPI_COUNT_BASE_SELECT BIT0
///
/// GICR Structure
///
typedef struct {
- UINT8 Type;
- UINT8 Length;
- UINT16 Reserved;
- UINT64 DiscoveryRangeBaseAddress;
- UINT32 DiscoveryRangeLength;
+ UINT8 Type;
+ UINT8 Length;
+ UINT16 Reserved;
+ UINT64 DiscoveryRangeBaseAddress;
+ UINT32 DiscoveryRangeLength;
} EFI_ACPI_6_0_GICR_STRUCTURE;
///
/// GIC Interrupt Translation Service Structure
///
typedef struct {
- UINT8 Type;
- UINT8 Length;
- UINT16 Reserved;
- UINT32 GicItsId;
- UINT64 PhysicalBaseAddress;
- UINT32 Reserved2;
+ UINT8 Type;
+ UINT8 Length;
+ UINT16 Reserved;
+ UINT32 GicItsId;
+ UINT64 PhysicalBaseAddress;
+ UINT32 Reserved2;
} EFI_ACPI_6_0_GIC_ITS_STRUCTURE;
///
/// Smart Battery Description Table (SBST)
///
typedef struct {
- EFI_ACPI_DESCRIPTION_HEADER Header;
- UINT32 WarningEnergyLevel;
- UINT32 LowEnergyLevel;
- UINT32 CriticalEnergyLevel;
+ EFI_ACPI_DESCRIPTION_HEADER Header;
+ UINT32 WarningEnergyLevel;
+ UINT32 LowEnergyLevel;
+ UINT32 CriticalEnergyLevel;
} EFI_ACPI_6_0_SMART_BATTERY_DESCRIPTION_TABLE;
///
/// SBST Version (as defined in ACPI 6.0 spec.)
///
-#define EFI_ACPI_6_0_SMART_BATTERY_DESCRIPTION_TABLE_REVISION 0x01
+#define EFI_ACPI_6_0_SMART_BATTERY_DESCRIPTION_TABLE_REVISION 0x01
///
/// Embedded Controller Boot Resources Table (ECDT)
@@ -603,11 +613,11 @@ typedef struct {
/// a fully qualified reference to the name space object.
///
typedef struct {
- EFI_ACPI_DESCRIPTION_HEADER Header;
- EFI_ACPI_6_0_GENERIC_ADDRESS_STRUCTURE EcControl;
- EFI_ACPI_6_0_GENERIC_ADDRESS_STRUCTURE EcData;
- UINT32 Uid;
- UINT8 GpeBit;
+ EFI_ACPI_DESCRIPTION_HEADER Header;
+ EFI_ACPI_6_0_GENERIC_ADDRESS_STRUCTURE EcControl;
+ EFI_ACPI_6_0_GENERIC_ADDRESS_STRUCTURE EcData;
+ UINT32 Uid;
+ UINT8 GpeBit;
} EFI_ACPI_6_0_EMBEDDED_CONTROLLER_BOOT_RESOURCES_TABLE;
///
@@ -620,9 +630,9 @@ typedef struct {
/// must be defined in a platform specific manner.
///
typedef struct {
- EFI_ACPI_DESCRIPTION_HEADER Header;
- UINT32 Reserved1; ///< Must be set to 1
- UINT64 Reserved2;
+ EFI_ACPI_DESCRIPTION_HEADER Header;
+ UINT32 Reserved1; ///< Must be set to 1
+ UINT64 Reserved2;
} EFI_ACPI_6_0_SYSTEM_RESOURCE_AFFINITY_TABLE_HEADER;
///
@@ -644,83 +654,83 @@ typedef struct {
/// Processor Local APIC/SAPIC Affinity Structure Definition
///
typedef struct {
- UINT8 Type;
- UINT8 Length;
- UINT8 ProximityDomain7To0;
- UINT8 ApicId;
- UINT32 Flags;
- UINT8 LocalSapicEid;
- UINT8 ProximityDomain31To8[3];
- UINT32 ClockDomain;
+ UINT8 Type;
+ UINT8 Length;
+ UINT8 ProximityDomain7To0;
+ UINT8 ApicId;
+ UINT32 Flags;
+ UINT8 LocalSapicEid;
+ UINT8 ProximityDomain31To8[3];
+ UINT32 ClockDomain;
} EFI_ACPI_6_0_PROCESSOR_LOCAL_APIC_SAPIC_AFFINITY_STRUCTURE;
///
/// Local APIC/SAPIC Flags. All other bits are reserved and must be 0.
///
-#define EFI_ACPI_6_0_PROCESSOR_LOCAL_APIC_SAPIC_ENABLED (1 << 0)
+#define EFI_ACPI_6_0_PROCESSOR_LOCAL_APIC_SAPIC_ENABLED (1 << 0)
///
/// Memory Affinity Structure Definition
///
typedef struct {
- UINT8 Type;
- UINT8 Length;
- UINT32 ProximityDomain;
- UINT16 Reserved1;
- UINT32 AddressBaseLow;
- UINT32 AddressBaseHigh;
- UINT32 LengthLow;
- UINT32 LengthHigh;
- UINT32 Reserved2;
- UINT32 Flags;
- UINT64 Reserved3;
+ UINT8 Type;
+ UINT8 Length;
+ UINT32 ProximityDomain;
+ UINT16 Reserved1;
+ UINT32 AddressBaseLow;
+ UINT32 AddressBaseHigh;
+ UINT32 LengthLow;
+ UINT32 LengthHigh;
+ UINT32 Reserved2;
+ UINT32 Flags;
+ UINT64 Reserved3;
} EFI_ACPI_6_0_MEMORY_AFFINITY_STRUCTURE;
//
// Memory Flags. All other bits are reserved and must be 0.
//
-#define EFI_ACPI_6_0_MEMORY_ENABLED (1 << 0)
-#define EFI_ACPI_6_0_MEMORY_HOT_PLUGGABLE (1 << 1)
-#define EFI_ACPI_6_0_MEMORY_NONVOLATILE (1 << 2)
+#define EFI_ACPI_6_0_MEMORY_ENABLED (1 << 0)
+#define EFI_ACPI_6_0_MEMORY_HOT_PLUGGABLE (1 << 1)
+#define EFI_ACPI_6_0_MEMORY_NONVOLATILE (1 << 2)
///
/// Processor Local x2APIC Affinity Structure Definition
///
typedef struct {
- UINT8 Type;
- UINT8 Length;
- UINT8 Reserved1[2];
- UINT32 ProximityDomain;
- UINT32 X2ApicId;
- UINT32 Flags;
- UINT32 ClockDomain;
- UINT8 Reserved2[4];
+ UINT8 Type;
+ UINT8 Length;
+ UINT8 Reserved1[2];
+ UINT32 ProximityDomain;
+ UINT32 X2ApicId;
+ UINT32 Flags;
+ UINT32 ClockDomain;
+ UINT8 Reserved2[4];
} EFI_ACPI_6_0_PROCESSOR_LOCAL_X2APIC_AFFINITY_STRUCTURE;
///
/// GICC Affinity Structure Definition
///
typedef struct {
- UINT8 Type;
- UINT8 Length;
- UINT32 ProximityDomain;
- UINT32 AcpiProcessorUid;
- UINT32 Flags;
- UINT32 ClockDomain;
+ UINT8 Type;
+ UINT8 Length;
+ UINT32 ProximityDomain;
+ UINT32 AcpiProcessorUid;
+ UINT32 Flags;
+ UINT32 ClockDomain;
} EFI_ACPI_6_0_GICC_AFFINITY_STRUCTURE;
///
/// GICC Flags. All other bits are reserved and must be 0.
///
-#define EFI_ACPI_6_0_GICC_ENABLED (1 << 0)
+#define EFI_ACPI_6_0_GICC_ENABLED (1 << 0)
///
/// System Locality Distance Information Table (SLIT).
/// The rest of the table is a matrix.
///
typedef struct {
- EFI_ACPI_DESCRIPTION_HEADER Header;
- UINT64 NumberOfSystemLocalities;
+ EFI_ACPI_DESCRIPTION_HEADER Header;
+ UINT64 NumberOfSystemLocalities;
} EFI_ACPI_6_0_SYSTEM_LOCALITY_DISTANCE_INFORMATION_TABLE_HEADER;
///
@@ -732,14 +742,14 @@ typedef struct {
/// Corrected Platform Error Polling Table (CPEP)
///
typedef struct {
- EFI_ACPI_DESCRIPTION_HEADER Header;
- UINT8 Reserved[8];
+ EFI_ACPI_DESCRIPTION_HEADER Header;
+ UINT8 Reserved[8];
} EFI_ACPI_6_0_CORRECTED_PLATFORM_ERROR_POLLING_TABLE_HEADER;
///
/// CPEP Version (as defined in ACPI 6.0 spec.)
///
-#define EFI_ACPI_6_0_CORRECTED_PLATFORM_ERROR_POLLING_TABLE_REVISION 0x01
+#define EFI_ACPI_6_0_CORRECTED_PLATFORM_ERROR_POLLING_TABLE_REVISION 0x01
//
// CPEP processor structure types.
@@ -750,66 +760,66 @@ typedef struct {
/// Corrected Platform Error Polling Processor Structure Definition
///
typedef struct {
- UINT8 Type;
- UINT8 Length;
- UINT8 ProcessorId;
- UINT8 ProcessorEid;
- UINT32 PollingInterval;
+ UINT8 Type;
+ UINT8 Length;
+ UINT8 ProcessorId;
+ UINT8 ProcessorEid;
+ UINT32 PollingInterval;
} EFI_ACPI_6_0_CPEP_PROCESSOR_APIC_SAPIC_STRUCTURE;
///
/// Maximum System Characteristics Table (MSCT)
///
typedef struct {
- EFI_ACPI_DESCRIPTION_HEADER Header;
- UINT32 OffsetProxDomInfo;
- UINT32 MaximumNumberOfProximityDomains;
- UINT32 MaximumNumberOfClockDomains;
- UINT64 MaximumPhysicalAddress;
+ EFI_ACPI_DESCRIPTION_HEADER Header;
+ UINT32 OffsetProxDomInfo;
+ UINT32 MaximumNumberOfProximityDomains;
+ UINT32 MaximumNumberOfClockDomains;
+ UINT64 MaximumPhysicalAddress;
} EFI_ACPI_6_0_MAXIMUM_SYSTEM_CHARACTERISTICS_TABLE_HEADER;
///
/// MSCT Version (as defined in ACPI 6.0 spec.)
///
-#define EFI_ACPI_6_0_MAXIMUM_SYSTEM_CHARACTERISTICS_TABLE_REVISION 0x01
+#define EFI_ACPI_6_0_MAXIMUM_SYSTEM_CHARACTERISTICS_TABLE_REVISION 0x01
///
/// Maximum Proximity Domain Information Structure Definition
///
typedef struct {
- UINT8 Revision;
- UINT8 Length;
- UINT32 ProximityDomainRangeLow;
- UINT32 ProximityDomainRangeHigh;
- UINT32 MaximumProcessorCapacity;
- UINT64 MaximumMemoryCapacity;
+ UINT8 Revision;
+ UINT8 Length;
+ UINT32 ProximityDomainRangeLow;
+ UINT32 ProximityDomainRangeHigh;
+ UINT32 MaximumProcessorCapacity;
+ UINT64 MaximumMemoryCapacity;
} EFI_ACPI_6_0_MAXIMUM_PROXIMITY_DOMAIN_INFORMATION_STRUCTURE;
///
/// ACPI RAS Feature Table definition.
///
typedef struct {
- EFI_ACPI_DESCRIPTION_HEADER Header;
- UINT8 PlatformCommunicationChannelIdentifier[12];
+ EFI_ACPI_DESCRIPTION_HEADER Header;
+ UINT8 PlatformCommunicationChannelIdentifier[12];
} EFI_ACPI_6_0_RAS_FEATURE_TABLE;
///
/// RASF Version (as defined in ACPI 6.0 spec.)
///
-#define EFI_ACPI_6_0_RAS_FEATURE_TABLE_REVISION 0x01
+#define EFI_ACPI_6_0_RAS_FEATURE_TABLE_REVISION 0x01
///
/// ACPI RASF Platform Communication Channel Shared Memory Region definition.
///
typedef struct {
- UINT32 Signature;
- UINT16 Command;
- UINT16 Status;
- UINT16 Version;
- UINT8 RASCapabilities[16];
- UINT8 SetRASCapabilities[16];
- UINT16 NumberOfRASFParameterBlocks;
- UINT32 SetRASCapabilitiesStatus;
+ UINT32 Signature;
+ UINT16 Command;
+ UINT16 Status;
+ UINT16 Version;
+ UINT8 RASCapabilities[16];
+ UINT8 SetRASCapabilities[16];
+ UINT16 NumberOfRASFParameterBlocks;
+ UINT32 SetRASCapabilitiesStatus;
} EFI_ACPI_6_0_RASF_PLATFORM_COMMUNICATION_CHANNEL_SHARED_MEMORY_REGION;
///
@@ -827,52 +837,52 @@ typedef struct {
/// ACPI RASF Parameter Block structure for PATROL_SCRUB
///
typedef struct {
- UINT16 Type;
- UINT16 Version;
- UINT16 Length;
- UINT16 PatrolScrubCommand;
- UINT64 RequestedAddressRange[2];
- UINT64 ActualAddressRange[2];
- UINT16 Flags;
- UINT8 RequestedSpeed;
+ UINT16 Type;
+ UINT16 Version;
+ UINT16 Length;
+ UINT16 PatrolScrubCommand;
+ UINT64 RequestedAddressRange[2];
+ UINT64 ActualAddressRange[2];
+ UINT16 Flags;
+ UINT8 RequestedSpeed;
} EFI_ACPI_6_0_RASF_PATROL_SCRUB_PLATFORM_BLOCK_STRUCTURE;
///
/// ACPI RASF Patrol Scrub command
///
-#define EFI_ACPI_6_0_RASF_PATROL_SCRUB_COMMAND_GET_PATROL_PARAMETERS 0x01
-#define EFI_ACPI_6_0_RASF_PATROL_SCRUB_COMMAND_START_PATROL_SCRUBBER 0x02
-#define EFI_ACPI_6_0_RASF_PATROL_SCRUB_COMMAND_STOP_PATROL_SCRUBBER 0x03
+#define EFI_ACPI_6_0_RASF_PATROL_SCRUB_COMMAND_GET_PATROL_PARAMETERS 0x01
+#define EFI_ACPI_6_0_RASF_PATROL_SCRUB_COMMAND_START_PATROL_SCRUBBER 0x02
+#define EFI_ACPI_6_0_RASF_PATROL_SCRUB_COMMAND_STOP_PATROL_SCRUBBER 0x03
///
/// Memory Power State Table definition.
///
typedef struct {
- EFI_ACPI_DESCRIPTION_HEADER Header;
- UINT8 PlatformCommunicationChannelIdentifier;
- UINT8 Reserved[3];
-// Memory Power Node Structure
-// Memory Power State Characteristics
+ EFI_ACPI_DESCRIPTION_HEADER Header;
+ UINT8 PlatformCommunicationChannelIdentifier;
+ UINT8 Reserved[3];
+ // Memory Power Node Structure
+ // Memory Power State Characteristics
} EFI_ACPI_6_0_MEMORY_POWER_STATUS_TABLE;
///
/// MPST Version (as defined in ACPI 6.0 spec.)
///
-#define EFI_ACPI_6_0_MEMORY_POWER_STATE_TABLE_REVISION 0x01
+#define EFI_ACPI_6_0_MEMORY_POWER_STATE_TABLE_REVISION 0x01
///
/// MPST Platform Communication Channel Shared Memory Region definition.
///
typedef struct {
- UINT32 Signature;
- UINT16 Command;
- UINT16 Status;
- UINT32 MemoryPowerCommandRegister;
- UINT32 MemoryPowerStatusRegister;
- UINT32 PowerStateId;
- UINT32 MemoryPowerNodeId;
- UINT64 MemoryEnergyConsumed;
- UINT64 ExpectedAveragePowerComsuned;
+ UINT32 Signature;
+ UINT16 Command;
+ UINT16 Status;
+ UINT32 MemoryPowerCommandRegister;
+ UINT32 MemoryPowerStatusRegister;
+ UINT32 PowerStateId;
+ UINT32 MemoryPowerNodeId;
+ UINT64 MemoryEnergyConsumed;
+ UINT64 ExpectedAveragePowerComsuned;
} EFI_ACPI_6_0_MPST_PLATFORM_COMMUNICATION_CHANNEL_SHARED_MEMORY_REGION;
///
@@ -883,186 +893,186 @@ typedef struct {
///
/// ACPI MPST Memory Power command
///
-#define EFI_ACPI_6_0_MPST_MEMORY_POWER_COMMAND_GET_MEMORY_POWER_STATE 0x01
-#define EFI_ACPI_6_0_MPST_MEMORY_POWER_COMMAND_SET_MEMORY_POWER_STATE 0x02
-#define EFI_ACPI_6_0_MPST_MEMORY_POWER_COMMAND_GET_AVERAGE_POWER_CONSUMED 0x03
-#define EFI_ACPI_6_0_MPST_MEMORY_POWER_COMMAND_GET_MEMORY_ENERGY_CONSUMED 0x04
+#define EFI_ACPI_6_0_MPST_MEMORY_POWER_COMMAND_GET_MEMORY_POWER_STATE 0x01
+#define EFI_ACPI_6_0_MPST_MEMORY_POWER_COMMAND_SET_MEMORY_POWER_STATE 0x02
+#define EFI_ACPI_6_0_MPST_MEMORY_POWER_COMMAND_GET_AVERAGE_POWER_CONSUMED 0x03
+#define EFI_ACPI_6_0_MPST_MEMORY_POWER_COMMAND_GET_MEMORY_ENERGY_CONSUMED 0x04
///
/// MPST Memory Power Node Table
///
typedef struct {
- UINT8 PowerStateValue;
- UINT8 PowerStateInformationIndex;
+ UINT8 PowerStateValue;
+ UINT8 PowerStateInformationIndex;
} EFI_ACPI_6_0_MPST_MEMORY_POWER_STATE;
typedef struct {
- UINT8 Flag;
- UINT8 Reserved;
- UINT16 MemoryPowerNodeId;
- UINT32 Length;
- UINT64 AddressBase;
- UINT64 AddressLength;
- UINT32 NumberOfPowerStates;
- UINT32 NumberOfPhysicalComponents;
-//EFI_ACPI_6_0_MPST_MEMORY_POWER_STATE MemoryPowerState[NumberOfPowerStates];
-//UINT16 PhysicalComponentIdentifier[NumberOfPhysicalComponents];
+ UINT8 Flag;
+ UINT8 Reserved;
+ UINT16 MemoryPowerNodeId;
+ UINT32 Length;
+ UINT64 AddressBase;
+ UINT64 AddressLength;
+ UINT32 NumberOfPowerStates;
+ UINT32 NumberOfPhysicalComponents;
+ // EFI_ACPI_6_0_MPST_MEMORY_POWER_STATE MemoryPowerState[NumberOfPowerStates];
+ // UINT16 PhysicalComponentIdentifier[NumberOfPhysicalComponents];
} EFI_ACPI_6_0_MPST_MEMORY_POWER_STRUCTURE;
-#define EFI_ACPI_6_0_MPST_MEMORY_POWER_STRUCTURE_FLAG_ENABLE 0x01
-#define EFI_ACPI_6_0_MPST_MEMORY_POWER_STRUCTURE_FLAG_POWER_MANAGED 0x02
-#define EFI_ACPI_6_0_MPST_MEMORY_POWER_STRUCTURE_FLAG_HOT_PLUGGABLE 0x04
+#define EFI_ACPI_6_0_MPST_MEMORY_POWER_STRUCTURE_FLAG_ENABLE 0x01
+#define EFI_ACPI_6_0_MPST_MEMORY_POWER_STRUCTURE_FLAG_POWER_MANAGED 0x02
+#define EFI_ACPI_6_0_MPST_MEMORY_POWER_STRUCTURE_FLAG_HOT_PLUGGABLE 0x04
typedef struct {
- UINT16 MemoryPowerNodeCount;
- UINT8 Reserved[2];
+ UINT16 MemoryPowerNodeCount;
+ UINT8 Reserved[2];
} EFI_ACPI_6_0_MPST_MEMORY_POWER_NODE_TABLE;
///
/// MPST Memory Power State Characteristics Table
///
typedef struct {
- UINT8 PowerStateStructureID;
- UINT8 Flag;
- UINT16 Reserved;
- UINT32 AveragePowerConsumedInMPS0;
- UINT32 RelativePowerSavingToMPS0;
- UINT64 ExitLatencyToMPS0;
+ UINT8 PowerStateStructureID;
+ UINT8 Flag;
+ UINT16 Reserved;
+ UINT32 AveragePowerConsumedInMPS0;
+ UINT32 RelativePowerSavingToMPS0;
+ UINT64 ExitLatencyToMPS0;
} EFI_ACPI_6_0_MPST_MEMORY_POWER_STATE_CHARACTERISTICS_STRUCTURE;
-#define EFI_ACPI_6_0_MPST_MEMORY_POWER_STATE_CHARACTERISTICS_STRUCTURE_FLAG_MEMORY_CONTENT_PRESERVED 0x01
-#define EFI_ACPI_6_0_MPST_MEMORY_POWER_STATE_CHARACTERISTICS_STRUCTURE_FLAG_AUTONOMOUS_MEMORY_POWER_STATE_ENTRY 0x02
-#define EFI_ACPI_6_0_MPST_MEMORY_POWER_STATE_CHARACTERISTICS_STRUCTURE_FLAG_AUTONOMOUS_MEMORY_POWER_STATE_EXIT 0x04
+#define EFI_ACPI_6_0_MPST_MEMORY_POWER_STATE_CHARACTERISTICS_STRUCTURE_FLAG_MEMORY_CONTENT_PRESERVED 0x01
+#define EFI_ACPI_6_0_MPST_MEMORY_POWER_STATE_CHARACTERISTICS_STRUCTURE_FLAG_AUTONOMOUS_MEMORY_POWER_STATE_ENTRY 0x02
+#define EFI_ACPI_6_0_MPST_MEMORY_POWER_STATE_CHARACTERISTICS_STRUCTURE_FLAG_AUTONOMOUS_MEMORY_POWER_STATE_EXIT 0x04
typedef struct {
- UINT16 MemoryPowerStateCharacteristicsCount;
- UINT8 Reserved[2];
+ UINT16 MemoryPowerStateCharacteristicsCount;
+ UINT8 Reserved[2];
} EFI_ACPI_6_0_MPST_MEMORY_POWER_STATE_CHARACTERISTICS_TABLE;
///
/// Memory Topology Table definition.
///
typedef struct {
- EFI_ACPI_DESCRIPTION_HEADER Header;
- UINT32 Reserved;
+ EFI_ACPI_DESCRIPTION_HEADER Header;
+ UINT32 Reserved;
} EFI_ACPI_6_0_MEMORY_TOPOLOGY_TABLE;
///
/// PMTT Version (as defined in ACPI 6.0 spec.)
///
-#define EFI_ACPI_6_0_MEMORY_TOPOLOGY_TABLE_REVISION 0x01
+#define EFI_ACPI_6_0_MEMORY_TOPOLOGY_TABLE_REVISION 0x01
///
/// Common Memory Aggregator Device Structure.
///
typedef struct {
- UINT8 Type;
- UINT8 Reserved;
- UINT16 Length;
- UINT16 Flags;
- UINT16 Reserved1;
+ UINT8 Type;
+ UINT8 Reserved;
+ UINT16 Length;
+ UINT16 Flags;
+ UINT16 Reserved1;
} EFI_ACPI_6_0_PMMT_COMMON_MEMORY_AGGREGATOR_DEVICE_STRUCTURE;
///
/// Memory Aggregator Device Type
///
-#define EFI_ACPI_6_0_PMMT_MEMORY_AGGREGATOR_DEVICE_TYPE_SOCKET 0x1
-#define EFI_ACPI_6_0_PMMT_MEMORY_AGGREGATOR_DEVICE_TYPE_MEMORY_CONTROLLER 0x2
-#define EFI_ACPI_6_0_PMMT_MEMORY_AGGREGATOR_DEVICE_TYPE_DIMM 0x3
+#define EFI_ACPI_6_0_PMMT_MEMORY_AGGREGATOR_DEVICE_TYPE_SOCKET 0x0
+#define EFI_ACPI_6_0_PMMT_MEMORY_AGGREGATOR_DEVICE_TYPE_MEMORY_CONTROLLER 0x1
+#define EFI_ACPI_6_0_PMMT_MEMORY_AGGREGATOR_DEVICE_TYPE_DIMM 0x2
///
/// Socket Memory Aggregator Device Structure.
///
typedef struct {
- EFI_ACPI_6_0_PMMT_COMMON_MEMORY_AGGREGATOR_DEVICE_STRUCTURE Header;
- UINT16 SocketIdentifier;
- UINT16 Reserved;
-//EFI_ACPI_6_0_PMMT_MEMORY_CONTROLLER_MEMORY_AGGREGATOR_DEVICE_STRUCTURE MemoryController[];
+ EFI_ACPI_6_0_PMMT_COMMON_MEMORY_AGGREGATOR_DEVICE_STRUCTURE Header;
+ UINT16 SocketIdentifier;
+ UINT16 Reserved;
+ // EFI_ACPI_6_0_PMMT_MEMORY_CONTROLLER_MEMORY_AGGREGATOR_DEVICE_STRUCTURE MemoryController[];
} EFI_ACPI_6_0_PMMT_SOCKET_MEMORY_AGGREGATOR_DEVICE_STRUCTURE;
///
/// MemoryController Memory Aggregator Device Structure.
///
typedef struct {
- EFI_ACPI_6_0_PMMT_COMMON_MEMORY_AGGREGATOR_DEVICE_STRUCTURE Header;
- UINT32 ReadLatency;
- UINT32 WriteLatency;
- UINT32 ReadBandwidth;
- UINT32 WriteBandwidth;
- UINT16 OptimalAccessUnit;
- UINT16 OptimalAccessAlignment;
- UINT16 Reserved;
- UINT16 NumberOfProximityDomains;
-//UINT32 ProximityDomain[NumberOfProximityDomains];
-//EFI_ACPI_6_0_PMMT_DIMM_MEMORY_AGGREGATOR_DEVICE_STRUCTURE PhysicalComponent[];
+ EFI_ACPI_6_0_PMMT_COMMON_MEMORY_AGGREGATOR_DEVICE_STRUCTURE Header;
+ UINT32 ReadLatency;
+ UINT32 WriteLatency;
+ UINT32 ReadBandwidth;
+ UINT32 WriteBandwidth;
+ UINT16 OptimalAccessUnit;
+ UINT16 OptimalAccessAlignment;
+ UINT16 Reserved;
+ UINT16 NumberOfProximityDomains;
+ // UINT32 ProximityDomain[NumberOfProximityDomains];
+ // EFI_ACPI_6_0_PMMT_DIMM_MEMORY_AGGREGATOR_DEVICE_STRUCTURE PhysicalComponent[];
} EFI_ACPI_6_0_PMMT_MEMORY_CONTROLLER_MEMORY_AGGREGATOR_DEVICE_STRUCTURE;
///
/// DIMM Memory Aggregator Device Structure.
///
typedef struct {
- EFI_ACPI_6_0_PMMT_COMMON_MEMORY_AGGREGATOR_DEVICE_STRUCTURE Header;
- UINT16 PhysicalComponentIdentifier;
- UINT16 Reserved;
- UINT32 SizeOfDimm;
- UINT32 SmbiosHandle;
+ EFI_ACPI_6_0_PMMT_COMMON_MEMORY_AGGREGATOR_DEVICE_STRUCTURE Header;
+ UINT16 PhysicalComponentIdentifier;
+ UINT16 Reserved;
+ UINT32 SizeOfDimm;
+ UINT32 SmbiosHandle;
} EFI_ACPI_6_0_PMMT_DIMM_MEMORY_AGGREGATOR_DEVICE_STRUCTURE;
///
/// Boot Graphics Resource Table definition.
///
typedef struct {
- EFI_ACPI_DESCRIPTION_HEADER Header;
+ EFI_ACPI_DESCRIPTION_HEADER Header;
///
/// 2-bytes (16 bit) version ID. This value must be 1.
///
- UINT16 Version;
+ UINT16 Version;
///
/// 1-byte status field indicating current status about the table.
/// Bits[7:1] = Reserved (must be zero)
/// Bit [0] = Valid. A one indicates the boot image graphic is valid.
///
- UINT8 Status;
+ UINT8 Status;
///
/// 1-byte enumerated type field indicating format of the image.
/// 0 = Bitmap
/// 1 - 255 Reserved (for future use)
///
- UINT8 ImageType;
+ UINT8 ImageType;
///
/// 8-byte (64 bit) physical address pointing to the firmware's in-memory copy
/// of the image bitmap.
///
- UINT64 ImageAddress;
+ UINT64 ImageAddress;
///
/// A 4-byte (32-bit) unsigned long describing the display X-offset of the boot image.
/// (X, Y) display offset of the top left corner of the boot image.
/// The top left corner of the display is at offset (0, 0).
///
- UINT32 ImageOffsetX;
+ UINT32 ImageOffsetX;
///
/// A 4-byte (32-bit) unsigned long describing the display Y-offset of the boot image.
/// (X, Y) display offset of the top left corner of the boot image.
/// The top left corner of the display is at offset (0, 0).
///
- UINT32 ImageOffsetY;
+ UINT32 ImageOffsetY;
} EFI_ACPI_6_0_BOOT_GRAPHICS_RESOURCE_TABLE;
///
/// BGRT Revision
///
-#define EFI_ACPI_6_0_BOOT_GRAPHICS_RESOURCE_TABLE_REVISION 1
+#define EFI_ACPI_6_0_BOOT_GRAPHICS_RESOURCE_TABLE_REVISION 1
///
/// BGRT Version
///
-#define EFI_ACPI_6_0_BGRT_VERSION 0x01
+#define EFI_ACPI_6_0_BGRT_VERSION 0x01
///
/// BGRT Status
///
-#define EFI_ACPI_6_0_BGRT_STATUS_NOT_DISPLAYED 0x00
-#define EFI_ACPI_6_0_BGRT_STATUS_DISPLAYED 0x01
+#define EFI_ACPI_6_0_BGRT_STATUS_NOT_DISPLAYED 0x00
+#define EFI_ACPI_6_0_BGRT_STATUS_DISPLAYED 0x01
///
/// BGRT Image Type
@@ -1072,26 +1082,26 @@ typedef struct {
///
/// FPDT Version (as defined in ACPI 6.0 spec.)
///
-#define EFI_ACPI_6_0_FIRMWARE_PERFORMANCE_DATA_TABLE_REVISION 0x01
+#define EFI_ACPI_6_0_FIRMWARE_PERFORMANCE_DATA_TABLE_REVISION 0x01
///
/// FPDT Performance Record Types
///
-#define EFI_ACPI_6_0_FPDT_RECORD_TYPE_FIRMWARE_BASIC_BOOT_POINTER 0x0000
-#define EFI_ACPI_6_0_FPDT_RECORD_TYPE_S3_PERFORMANCE_TABLE_POINTER 0x0001
+#define EFI_ACPI_6_0_FPDT_RECORD_TYPE_FIRMWARE_BASIC_BOOT_POINTER 0x0000
+#define EFI_ACPI_6_0_FPDT_RECORD_TYPE_S3_PERFORMANCE_TABLE_POINTER 0x0001
///
/// FPDT Performance Record Revision
///
-#define EFI_ACPI_6_0_FPDT_RECORD_REVISION_FIRMWARE_BASIC_BOOT_POINTER 0x01
-#define EFI_ACPI_6_0_FPDT_RECORD_REVISION_S3_PERFORMANCE_TABLE_POINTER 0x01
+#define EFI_ACPI_6_0_FPDT_RECORD_REVISION_FIRMWARE_BASIC_BOOT_POINTER 0x01
+#define EFI_ACPI_6_0_FPDT_RECORD_REVISION_S3_PERFORMANCE_TABLE_POINTER 0x01
///
/// FPDT Runtime Performance Record Types
///
-#define EFI_ACPI_6_0_FPDT_RUNTIME_RECORD_TYPE_S3_RESUME 0x0000
-#define EFI_ACPI_6_0_FPDT_RUNTIME_RECORD_TYPE_S3_SUSPEND 0x0001
-#define EFI_ACPI_6_0_FPDT_RUNTIME_RECORD_TYPE_FIRMWARE_BASIC_BOOT 0x0002
+#define EFI_ACPI_6_0_FPDT_RUNTIME_RECORD_TYPE_S3_RESUME 0x0000
+#define EFI_ACPI_6_0_FPDT_RUNTIME_RECORD_TYPE_S3_SUSPEND 0x0001
+#define EFI_ACPI_6_0_FPDT_RUNTIME_RECORD_TYPE_FIRMWARE_BASIC_BOOT 0x0002
///
/// FPDT Runtime Performance Record Revision
@@ -1104,77 +1114,77 @@ typedef struct {
/// FPDT Performance Record header
///
typedef struct {
- UINT16 Type;
- UINT8 Length;
- UINT8 Revision;
+ UINT16 Type;
+ UINT8 Length;
+ UINT8 Revision;
} EFI_ACPI_6_0_FPDT_PERFORMANCE_RECORD_HEADER;
///
/// FPDT Performance Table header
///
typedef struct {
- UINT32 Signature;
- UINT32 Length;
+ UINT32 Signature;
+ UINT32 Length;
} EFI_ACPI_6_0_FPDT_PERFORMANCE_TABLE_HEADER;
///
/// FPDT Firmware Basic Boot Performance Pointer Record Structure
///
typedef struct {
- EFI_ACPI_6_0_FPDT_PERFORMANCE_RECORD_HEADER Header;
- UINT32 Reserved;
+ EFI_ACPI_6_0_FPDT_PERFORMANCE_RECORD_HEADER Header;
+ UINT32 Reserved;
///
/// 64-bit processor-relative physical address of the Basic Boot Performance Table.
///
- UINT64 BootPerformanceTablePointer;
+ UINT64 BootPerformanceTablePointer;
} EFI_ACPI_6_0_FPDT_BOOT_PERFORMANCE_TABLE_POINTER_RECORD;
///
/// FPDT S3 Performance Table Pointer Record Structure
///
typedef struct {
- EFI_ACPI_6_0_FPDT_PERFORMANCE_RECORD_HEADER Header;
- UINT32 Reserved;
+ EFI_ACPI_6_0_FPDT_PERFORMANCE_RECORD_HEADER Header;
+ UINT32 Reserved;
///
/// 64-bit processor-relative physical address of the S3 Performance Table.
///
- UINT64 S3PerformanceTablePointer;
+ UINT64 S3PerformanceTablePointer;
} EFI_ACPI_6_0_FPDT_S3_PERFORMANCE_TABLE_POINTER_RECORD;
///
/// FPDT Firmware Basic Boot Performance Record Structure
///
typedef struct {
- EFI_ACPI_6_0_FPDT_PERFORMANCE_RECORD_HEADER Header;
- UINT32 Reserved;
+ EFI_ACPI_6_0_FPDT_PERFORMANCE_RECORD_HEADER Header;
+ UINT32 Reserved;
///
/// Timer value logged at the beginning of firmware image execution.
/// This may not always be zero or near zero.
///
- UINT64 ResetEnd;
+ UINT64 ResetEnd;
///
/// Timer value logged just prior to loading the OS boot loader into memory.
/// For non-UEFI compatible boots, this field must be zero.
///
- UINT64 OsLoaderLoadImageStart;
+ UINT64 OsLoaderLoadImageStart;
///
/// Timer value logged just prior to launching the previously loaded OS boot loader image.
/// For non-UEFI compatible boots, the timer value logged will be just prior
/// to the INT 19h handler invocation.
///
- UINT64 OsLoaderStartImageStart;
+ UINT64 OsLoaderStartImageStart;
///
/// Timer value logged at the point when the OS loader calls the
/// ExitBootServices function for UEFI compatible firmware.
/// For non-UEFI compatible boots, this field must be zero.
///
- UINT64 ExitBootServicesEntry;
+ UINT64 ExitBootServicesEntry;
///
/// Timer value logged at the point just prior to when the OS loader gaining
/// control back from calls the ExitBootServices function for UEFI compatible firmware.
/// For non-UEFI compatible boots, this field must be zero.
///
- UINT64 ExitBootServicesExit;
+ UINT64 ExitBootServicesExit;
} EFI_ACPI_6_0_FPDT_FIRMWARE_BASIC_BOOT_RECORD;
///
@@ -1186,7 +1196,7 @@ typedef struct {
// FPDT Firmware Basic Boot Performance Table
//
typedef struct {
- EFI_ACPI_6_0_FPDT_PERFORMANCE_TABLE_HEADER Header;
+ EFI_ACPI_6_0_FPDT_PERFORMANCE_TABLE_HEADER Header;
//
// one or more Performance Records.
//
@@ -1201,7 +1211,7 @@ typedef struct {
// FPDT Firmware S3 Boot Performance Table
//
typedef struct {
- EFI_ACPI_6_0_FPDT_PERFORMANCE_TABLE_HEADER Header;
+ EFI_ACPI_6_0_FPDT_PERFORMANCE_TABLE_HEADER Header;
//
// one or more Performance Records.
//
@@ -1211,145 +1221,145 @@ typedef struct {
/// FPDT Basic S3 Resume Performance Record
///
typedef struct {
- EFI_ACPI_6_0_FPDT_PERFORMANCE_RECORD_HEADER Header;
+ EFI_ACPI_6_0_FPDT_PERFORMANCE_RECORD_HEADER Header;
///
/// A count of the number of S3 resume cycles since the last full boot sequence.
///
- UINT32 ResumeCount;
+ UINT32 ResumeCount;
///
/// Timer recorded at the end of BIOS S3 resume, just prior to handoff to the
/// OS waking vector. Only the most recent resume cycle's time is retained.
///
- UINT64 FullResume;
+ UINT64 FullResume;
///
/// Average timer value of all resume cycles logged since the last full boot
/// sequence, including the most recent resume. Note that the entire log of
/// timer values does not need to be retained in order to calculate this average.
///
- UINT64 AverageResume;
+ UINT64 AverageResume;
} EFI_ACPI_6_0_FPDT_S3_RESUME_RECORD;
///
/// FPDT Basic S3 Suspend Performance Record
///
typedef struct {
- EFI_ACPI_6_0_FPDT_PERFORMANCE_RECORD_HEADER Header;
+ EFI_ACPI_6_0_FPDT_PERFORMANCE_RECORD_HEADER Header;
///
/// Timer value recorded at the OS write to SLP_TYP upon entry to S3.
/// Only the most recent suspend cycle's timer value is retained.
///
- UINT64 SuspendStart;
+ UINT64 SuspendStart;
///
/// Timer value recorded at the final firmware write to SLP_TYP (or other
/// mechanism) used to trigger hardware entry to S3.
/// Only the most recent suspend cycle's timer value is retained.
///
- UINT64 SuspendEnd;
+ UINT64 SuspendEnd;
} EFI_ACPI_6_0_FPDT_S3_SUSPEND_RECORD;
///
/// Firmware Performance Record Table definition.
///
typedef struct {
- EFI_ACPI_DESCRIPTION_HEADER Header;
+ EFI_ACPI_DESCRIPTION_HEADER Header;
} EFI_ACPI_6_0_FIRMWARE_PERFORMANCE_RECORD_TABLE;
///
/// Generic Timer Description Table definition.
///
typedef struct {
- EFI_ACPI_DESCRIPTION_HEADER Header;
- UINT64 CntControlBasePhysicalAddress;
- UINT32 Reserved;
- UINT32 SecurePL1TimerGSIV;
- UINT32 SecurePL1TimerFlags;
- UINT32 NonSecurePL1TimerGSIV;
- UINT32 NonSecurePL1TimerFlags;
- UINT32 VirtualTimerGSIV;
- UINT32 VirtualTimerFlags;
- UINT32 NonSecurePL2TimerGSIV;
- UINT32 NonSecurePL2TimerFlags;
- UINT64 CntReadBasePhysicalAddress;
- UINT32 PlatformTimerCount;
- UINT32 PlatformTimerOffset;
+ EFI_ACPI_DESCRIPTION_HEADER Header;
+ UINT64 CntControlBasePhysicalAddress;
+ UINT32 Reserved;
+ UINT32 SecurePL1TimerGSIV;
+ UINT32 SecurePL1TimerFlags;
+ UINT32 NonSecurePL1TimerGSIV;
+ UINT32 NonSecurePL1TimerFlags;
+ UINT32 VirtualTimerGSIV;
+ UINT32 VirtualTimerFlags;
+ UINT32 NonSecurePL2TimerGSIV;
+ UINT32 NonSecurePL2TimerFlags;
+ UINT64 CntReadBasePhysicalAddress;
+ UINT32 PlatformTimerCount;
+ UINT32 PlatformTimerOffset;
} EFI_ACPI_6_0_GENERIC_TIMER_DESCRIPTION_TABLE;
///
/// GTDT Version (as defined in ACPI 6.0 spec.)
///
-#define EFI_ACPI_6_0_GENERIC_TIMER_DESCRIPTION_TABLE_REVISION 0x02
+#define EFI_ACPI_6_0_GENERIC_TIMER_DESCRIPTION_TABLE_REVISION 0x02
///
/// Timer Flags. All other bits are reserved and must be 0.
///
-#define EFI_ACPI_6_0_GTDT_TIMER_FLAG_TIMER_INTERRUPT_MODE BIT0
-#define EFI_ACPI_6_0_GTDT_TIMER_FLAG_TIMER_INTERRUPT_POLARITY BIT1
-#define EFI_ACPI_6_0_GTDT_TIMER_FLAG_ALWAYS_ON_CAPABILITY BIT2
+#define EFI_ACPI_6_0_GTDT_TIMER_FLAG_TIMER_INTERRUPT_MODE BIT0
+#define EFI_ACPI_6_0_GTDT_TIMER_FLAG_TIMER_INTERRUPT_POLARITY BIT1
+#define EFI_ACPI_6_0_GTDT_TIMER_FLAG_ALWAYS_ON_CAPABILITY BIT2
///
/// Platform Timer Type
///
-#define EFI_ACPI_6_0_GTDT_GT_BLOCK 0
-#define EFI_ACPI_6_0_GTDT_SBSA_GENERIC_WATCHDOG 1
+#define EFI_ACPI_6_0_GTDT_GT_BLOCK 0
+#define EFI_ACPI_6_0_GTDT_SBSA_GENERIC_WATCHDOG 1
///
/// GT Block Structure
///
typedef struct {
- UINT8 Type;
- UINT16 Length;
- UINT8 Reserved;
- UINT64 CntCtlBase;
- UINT32 GTBlockTimerCount;
- UINT32 GTBlockTimerOffset;
+ UINT8 Type;
+ UINT16 Length;
+ UINT8 Reserved;
+ UINT64 CntCtlBase;
+ UINT32 GTBlockTimerCount;
+ UINT32 GTBlockTimerOffset;
} EFI_ACPI_6_0_GTDT_GT_BLOCK_STRUCTURE;
///
/// GT Block Timer Structure
///
typedef struct {
- UINT8 GTFrameNumber;
- UINT8 Reserved[3];
- UINT64 CntBaseX;
- UINT64 CntEL0BaseX;
- UINT32 GTxPhysicalTimerGSIV;
- UINT32 GTxPhysicalTimerFlags;
- UINT32 GTxVirtualTimerGSIV;
- UINT32 GTxVirtualTimerFlags;
- UINT32 GTxCommonFlags;
+ UINT8 GTFrameNumber;
+ UINT8 Reserved[3];
+ UINT64 CntBaseX;
+ UINT64 CntEL0BaseX;
+ UINT32 GTxPhysicalTimerGSIV;
+ UINT32 GTxPhysicalTimerFlags;
+ UINT32 GTxVirtualTimerGSIV;
+ UINT32 GTxVirtualTimerFlags;
+ UINT32 GTxCommonFlags;
} EFI_ACPI_6_0_GTDT_GT_BLOCK_TIMER_STRUCTURE;
///
/// GT Block Physical Timers and Virtual Timers Flags. All other bits are reserved and must be 0.
///
-#define EFI_ACPI_6_0_GTDT_GT_BLOCK_TIMER_FLAG_TIMER_INTERRUPT_MODE BIT0
-#define EFI_ACPI_6_0_GTDT_GT_BLOCK_TIMER_FLAG_TIMER_INTERRUPT_POLARITY BIT1
+#define EFI_ACPI_6_0_GTDT_GT_BLOCK_TIMER_FLAG_TIMER_INTERRUPT_MODE BIT0
+#define EFI_ACPI_6_0_GTDT_GT_BLOCK_TIMER_FLAG_TIMER_INTERRUPT_POLARITY BIT1
///
/// Common Flags Flags. All other bits are reserved and must be 0.
///
-#define EFI_ACPI_6_0_GTDT_GT_BLOCK_COMMON_FLAG_SECURE_TIMER BIT0
-#define EFI_ACPI_6_0_GTDT_GT_BLOCK_COMMON_FLAG_ALWAYS_ON_CAPABILITY BIT1
+#define EFI_ACPI_6_0_GTDT_GT_BLOCK_COMMON_FLAG_SECURE_TIMER BIT0
+#define EFI_ACPI_6_0_GTDT_GT_BLOCK_COMMON_FLAG_ALWAYS_ON_CAPABILITY BIT1
///
/// SBSA Generic Watchdog Structure
///
typedef struct {
- UINT8 Type;
- UINT16 Length;
- UINT8 Reserved;
- UINT64 RefreshFramePhysicalAddress;
- UINT64 WatchdogControlFramePhysicalAddress;
- UINT32 WatchdogTimerGSIV;
- UINT32 WatchdogTimerFlags;
+ UINT8 Type;
+ UINT16 Length;
+ UINT8 Reserved;
+ UINT64 RefreshFramePhysicalAddress;
+ UINT64 WatchdogControlFramePhysicalAddress;
+ UINT32 WatchdogTimerGSIV;
+ UINT32 WatchdogTimerFlags;
} EFI_ACPI_6_0_GTDT_SBSA_GENERIC_WATCHDOG_STRUCTURE;
///
/// SBSA Generic Watchdog Timer Flags. All other bits are reserved and must be 0.
///
-#define EFI_ACPI_6_0_GTDT_SBSA_GENERIC_WATCHDOG_FLAG_TIMER_INTERRUPT_MODE BIT0
-#define EFI_ACPI_6_0_GTDT_SBSA_GENERIC_WATCHDOG_FLAG_TIMER_INTERRUPT_POLARITY BIT1
-#define EFI_ACPI_6_0_GTDT_SBSA_GENERIC_WATCHDOG_FLAG_SECURE_TIMER BIT2
+#define EFI_ACPI_6_0_GTDT_SBSA_GENERIC_WATCHDOG_FLAG_TIMER_INTERRUPT_MODE BIT0
+#define EFI_ACPI_6_0_GTDT_SBSA_GENERIC_WATCHDOG_FLAG_TIMER_INTERRUPT_POLARITY BIT1
+#define EFI_ACPI_6_0_GTDT_SBSA_GENERIC_WATCHDOG_FLAG_SECURE_TIMER BIT2
//
// NVDIMM Firmware Interface Table definition.
@@ -1362,7 +1372,7 @@ typedef struct {
//
// NFIT Version (as defined in ACPI 6.0 spec.)
//
-#define EFI_ACPI_6_0_NVDIMM_FIRMWARE_INTERFACE_TABLE_REVISION 0x1
+#define EFI_ACPI_6_0_NVDIMM_FIRMWARE_INTERFACE_TABLE_REVISION 0x1
//
// Definition for NFIT Table Structure Types
@@ -1379,46 +1389,46 @@ typedef struct {
// Definition for NFIT Structure Header
//
typedef struct {
- UINT16 Type;
- UINT16 Length;
+ UINT16 Type;
+ UINT16 Length;
} EFI_ACPI_6_0_NFIT_STRUCTURE_HEADER;
//
// Definition for System Physical Address Range Structure
//
-#define EFI_ACPI_6_0_NFIT_SYSTEM_PHYSICAL_ADDRESS_RANGE_FLAGS_CONTROL_REGION_FOR_MANAGEMENT BIT0
-#define EFI_ACPI_6_0_NFIT_SYSTEM_PHYSICAL_ADDRESS_RANGE_FLAGS_PROXIMITY_DOMAIN_VALID BIT1
-#define EFI_ACPI_6_0_NFIT_GUID_VOLATILE_MEMORY_REGION { 0x7305944F, 0xFDDA, 0x44E3, { 0xB1, 0x6C, 0x3F, 0x22, 0xD2, 0x52, 0xE5, 0xD0 }}
-#define EFI_ACPI_6_0_NFIT_GUID_BYTE_ADDRESSABLE_PERSISTENT_MEMORY_REGION { 0x66F0D379, 0xB4F3, 0x4074, { 0xAC, 0x43, 0x0D, 0x33, 0x18, 0xB7, 0x8C, 0xDB }}
-#define EFI_ACPI_6_0_NFIT_GUID_NVDIMM_CONTROL_REGION { 0x92F701F6, 0x13B4, 0x405D, { 0x91, 0x0B, 0x29, 0x93, 0x67, 0xE8, 0x23, 0x4C }}
-#define EFI_ACPI_6_0_NFIT_GUID_NVDIMM_BLOCK_DATA_WINDOW_REGION { 0x91AF0530, 0x5D86, 0x470E, { 0xA6, 0xB0, 0x0A, 0x2D, 0xB9, 0x40, 0x82, 0x49 }}
-#define EFI_ACPI_6_0_NFIT_GUID_RAM_DISK_SUPPORTING_VIRTUAL_DISK_REGION_VOLATILE { 0x77AB535A, 0x45FC, 0x624B, { 0x55, 0x60, 0xF7, 0xB2, 0x81, 0xD1, 0xF9, 0x6E }}
-#define EFI_ACPI_6_0_NFIT_GUID_RAM_DISK_SUPPORTING_VIRTUAL_CD_REGION_VOLATILE { 0x3D5ABD30, 0x4175, 0x87CE, { 0x6D, 0x64, 0xD2, 0xAD, 0xE5, 0x23, 0xC4, 0xBB }}
-#define EFI_ACPI_6_0_NFIT_GUID_RAM_DISK_SUPPORTING_VIRTUAL_DISK_REGION_PERSISTENT { 0x5CEA02C9, 0x4D07, 0x69D3, { 0x26, 0x9F ,0x44, 0x96, 0xFB, 0xE0, 0x96, 0xF9 }}
-#define EFI_ACPI_6_0_NFIT_GUID_RAM_DISK_SUPPORTING_VIRTUAL_CD_REGION_PERSISTENT { 0x08018188, 0x42CD, 0xBB48, { 0x10, 0x0F, 0x53, 0x87, 0xD5, 0x3D, 0xED, 0x3D }}
-typedef struct {
- UINT16 Type;
- UINT16 Length;
- UINT16 SPARangeStructureIndex;
- UINT16 Flags;
- UINT32 Reserved_8;
- UINT32 ProximityDomain;
- GUID AddressRangeTypeGUID;
- UINT64 SystemPhysicalAddressRangeBase;
- UINT64 SystemPhysicalAddressRangeLength;
- UINT64 AddressRangeMemoryMappingAttribute;
+#define EFI_ACPI_6_0_NFIT_SYSTEM_PHYSICAL_ADDRESS_RANGE_FLAGS_CONTROL_REGION_FOR_MANAGEMENT BIT0
+#define EFI_ACPI_6_0_NFIT_SYSTEM_PHYSICAL_ADDRESS_RANGE_FLAGS_PROXIMITY_DOMAIN_VALID BIT1
+#define EFI_ACPI_6_0_NFIT_GUID_VOLATILE_MEMORY_REGION { 0x7305944F, 0xFDDA, 0x44E3, { 0xB1, 0x6C, 0x3F, 0x22, 0xD2, 0x52, 0xE5, 0xD0 }}
+#define EFI_ACPI_6_0_NFIT_GUID_BYTE_ADDRESSABLE_PERSISTENT_MEMORY_REGION { 0x66F0D379, 0xB4F3, 0x4074, { 0xAC, 0x43, 0x0D, 0x33, 0x18, 0xB7, 0x8C, 0xDB }}
+#define EFI_ACPI_6_0_NFIT_GUID_NVDIMM_CONTROL_REGION { 0x92F701F6, 0x13B4, 0x405D, { 0x91, 0x0B, 0x29, 0x93, 0x67, 0xE8, 0x23, 0x4C }}
+#define EFI_ACPI_6_0_NFIT_GUID_NVDIMM_BLOCK_DATA_WINDOW_REGION { 0x91AF0530, 0x5D86, 0x470E, { 0xA6, 0xB0, 0x0A, 0x2D, 0xB9, 0x40, 0x82, 0x49 }}
+#define EFI_ACPI_6_0_NFIT_GUID_RAM_DISK_SUPPORTING_VIRTUAL_DISK_REGION_VOLATILE { 0x77AB535A, 0x45FC, 0x624B, { 0x55, 0x60, 0xF7, 0xB2, 0x81, 0xD1, 0xF9, 0x6E }}
+#define EFI_ACPI_6_0_NFIT_GUID_RAM_DISK_SUPPORTING_VIRTUAL_CD_REGION_VOLATILE { 0x3D5ABD30, 0x4175, 0x87CE, { 0x6D, 0x64, 0xD2, 0xAD, 0xE5, 0x23, 0xC4, 0xBB }}
+#define EFI_ACPI_6_0_NFIT_GUID_RAM_DISK_SUPPORTING_VIRTUAL_DISK_REGION_PERSISTENT { 0x5CEA02C9, 0x4D07, 0x69D3, { 0x26, 0x9F ,0x44, 0x96, 0xFB, 0xE0, 0x96, 0xF9 }}
+#define EFI_ACPI_6_0_NFIT_GUID_RAM_DISK_SUPPORTING_VIRTUAL_CD_REGION_PERSISTENT { 0x08018188, 0x42CD, 0xBB48, { 0x10, 0x0F, 0x53, 0x87, 0xD5, 0x3D, 0xED, 0x3D }}
+typedef struct {
+ UINT16 Type;
+ UINT16 Length;
+ UINT16 SPARangeStructureIndex;
+ UINT16 Flags;
+ UINT32 Reserved_8;
+ UINT32 ProximityDomain;
+ GUID AddressRangeTypeGUID;
+ UINT64 SystemPhysicalAddressRangeBase;
+ UINT64 SystemPhysicalAddressRangeLength;
+ UINT64 AddressRangeMemoryMappingAttribute;
} EFI_ACPI_6_0_NFIT_SYSTEM_PHYSICAL_ADDRESS_RANGE_STRUCTURE;
//
// Definition for Memory Device to System Physical Address Range Mapping Structure
//
typedef struct {
- UINT32 DIMMNumber:4;
- UINT32 MemoryChannelNumber:4;
- UINT32 MemoryControllerID:4;
- UINT32 SocketID:4;
- UINT32 NodeControllerID:12;
- UINT32 Reserved_28:4;
+ UINT32 DIMMNumber : 4;
+ UINT32 MemoryChannelNumber : 4;
+ UINT32 MemoryControllerID : 4;
+ UINT32 SocketID : 4;
+ UINT32 NodeControllerID : 12;
+ UINT32 Reserved_28 : 4;
} EFI_ACPI_6_0_NFIT_DEVICE_HANDLE;
#define EFI_ACPI_6_0_NFIT_MEMORY_DEVICE_STATE_FLAGS_PREVIOUS_SAVE_FAIL BIT0
@@ -1428,155 +1438,161 @@ typedef struct {
#define EFI_ACPI_6_0_NFIT_MEMORY_DEVICE_STATE_FLAGS_SMART_HEALTH_EVENTS_PRIOR_OSPM_HAND_OFF BIT4
#define EFI_ACPI_6_0_NFIT_MEMORY_DEVICE_STATE_FLAGS_FIRMWARE_ENABLED_TO_NOTIFY_OSPM_ON_SMART_HEALTH_EVENTS BIT5
typedef struct {
- UINT16 Type;
- UINT16 Length;
- EFI_ACPI_6_0_NFIT_DEVICE_HANDLE NFITDeviceHandle;
- UINT16 MemoryDevicePhysicalID;
- UINT16 MemoryDeviceRegionID;
- UINT16 SPARangeStructureIndex ;
- UINT16 NVDIMMControlRegionStructureIndex;
- UINT64 MemoryDeviceRegionSize;
- UINT64 RegionOffset;
- UINT64 MemoryDevicePhysicalAddressRegionBase;
- UINT16 InterleaveStructureIndex;
- UINT16 InterleaveWays;
- UINT16 MemoryDeviceStateFlags;
- UINT16 Reserved_46;
+ UINT16 Type;
+ UINT16 Length;
+ EFI_ACPI_6_0_NFIT_DEVICE_HANDLE NFITDeviceHandle;
+ UINT16 MemoryDevicePhysicalID;
+ UINT16 MemoryDeviceRegionID;
+ UINT16 SPARangeStructureIndex;
+ UINT16 NVDIMMControlRegionStructureIndex;
+ UINT64 MemoryDeviceRegionSize;
+ UINT64 RegionOffset;
+ UINT64 MemoryDevicePhysicalAddressRegionBase;
+ UINT16 InterleaveStructureIndex;
+ UINT16 InterleaveWays;
+ UINT16 MemoryDeviceStateFlags;
+ UINT16 Reserved_46;
} EFI_ACPI_6_0_NFIT_MEMORY_DEVICE_TO_SYSTEM_ADDRESS_RANGE_MAP_STRUCTURE;
//
// Definition for Interleave Structure
//
typedef struct {
- UINT16 Type;
- UINT16 Length;
- UINT16 InterleaveStructureIndex;
- UINT16 Reserved_6;
- UINT32 NumberOfLines;
- UINT32 LineSize;
-//UINT32 LineOffset[NumberOfLines];
+ UINT16 Type;
+ UINT16 Length;
+ UINT16 InterleaveStructureIndex;
+ UINT16 Reserved_6;
+ UINT32 NumberOfLines;
+ UINT32 LineSize;
+ // UINT32 LineOffset[NumberOfLines];
} EFI_ACPI_6_0_NFIT_INTERLEAVE_STRUCTURE;
//
// Definition for SMBIOS Management Information Structure
//
typedef struct {
- UINT16 Type;
- UINT16 Length;
- UINT32 Reserved_4;
-//UINT8 Data[];
+ UINT16 Type;
+ UINT16 Length;
+ UINT32 Reserved_4;
+ // UINT8 Data[];
} EFI_ACPI_6_0_NFIT_SMBIOS_MANAGEMENT_INFORMATION_STRUCTURE;
//
// Definition for NVDIMM Control Region Structure
//
-#define EFI_ACPI_6_0_NFIT_NVDIMM_CONTROL_REGION_FLAGS_BLOCK_DATA_WINDOWS_BUFFERED BIT0
-typedef struct {
- UINT16 Type;
- UINT16 Length;
- UINT16 NVDIMMControlRegionStructureIndex;
- UINT16 VendorID;
- UINT16 DeviceID;
- UINT16 RevisionID;
- UINT16 SubsystemVendorID;
- UINT16 SubsystemDeviceID;
- UINT16 SubsystemRevisionID;
- UINT8 Reserved_18[6];
- UINT32 SerialNumber;
- UINT16 RegionFormatInterfaceCode;
- UINT16 NumberOfBlockControlWindows;
- UINT64 SizeOfBlockControlWindow;
- UINT64 CommandRegisterOffsetInBlockControlWindow;
- UINT64 SizeOfCommandRegisterInBlockControlWindows;
- UINT64 StatusRegisterOffsetInBlockControlWindow;
- UINT64 SizeOfStatusRegisterInBlockControlWindows;
- UINT16 NVDIMMControlRegionFlag;
- UINT8 Reserved_74[6];
+#define EFI_ACPI_6_0_NFIT_NVDIMM_CONTROL_REGION_FLAGS_BLOCK_DATA_WINDOWS_BUFFERED BIT0
+typedef struct {
+ UINT16 Type;
+ UINT16 Length;
+ UINT16 NVDIMMControlRegionStructureIndex;
+ UINT16 VendorID;
+ UINT16 DeviceID;
+ UINT16 RevisionID;
+ UINT16 SubsystemVendorID;
+ UINT16 SubsystemDeviceID;
+ UINT16 SubsystemRevisionID;
+ UINT8 Reserved_18[6];
+ UINT32 SerialNumber;
+ UINT16 RegionFormatInterfaceCode;
+ UINT16 NumberOfBlockControlWindows;
+ UINT64 SizeOfBlockControlWindow;
+ UINT64 CommandRegisterOffsetInBlockControlWindow;
+ UINT64 SizeOfCommandRegisterInBlockControlWindows;
+ UINT64 StatusRegisterOffsetInBlockControlWindow;
+ UINT64 SizeOfStatusRegisterInBlockControlWindows;
+ UINT16 NVDIMMControlRegionFlag;
+ UINT8 Reserved_74[6];
} EFI_ACPI_6_0_NFIT_NVDIMM_CONTROL_REGION_STRUCTURE;
//
// Definition for NVDIMM Block Data Window Region Structure
//
typedef struct {
- UINT16 Type;
- UINT16 Length;
- UINT16 NVDIMMControlRegionStructureIndex;
- UINT16 NumberOfBlockDataWindows;
- UINT64 BlockDataWindowStartOffset;
- UINT64 SizeOfBlockDataWindow;
- UINT64 BlockAccessibleMemoryCapacity;
- UINT64 BeginningAddressOfFirstBlockInBlockAccessibleMemory;
+ UINT16 Type;
+ UINT16 Length;
+ UINT16 NVDIMMControlRegionStructureIndex;
+ UINT16 NumberOfBlockDataWindows;
+ UINT64 BlockDataWindowStartOffset;
+ UINT64 SizeOfBlockDataWindow;
+ UINT64 BlockAccessibleMemoryCapacity;
+ UINT64 BeginningAddressOfFirstBlockInBlockAccessibleMemory;
} EFI_ACPI_6_0_NFIT_NVDIMM_BLOCK_DATA_WINDOW_REGION_STRUCTURE;
//
// Definition for Flush Hint Address Structure
//
typedef struct {
- UINT16 Type;
- UINT16 Length;
- EFI_ACPI_6_0_NFIT_DEVICE_HANDLE NFITDeviceHandle;
- UINT16 NumberOfFlushHintAddresses;
- UINT8 Reserved_10[6];
-//UINT64 FlushHintAddress[NumberOfFlushHintAddresses];
+ UINT16 Type;
+ UINT16 Length;
+ EFI_ACPI_6_0_NFIT_DEVICE_HANDLE NFITDeviceHandle;
+ UINT16 NumberOfFlushHintAddresses;
+ UINT8 Reserved_10[6];
+ // UINT64 FlushHintAddress[NumberOfFlushHintAddresses];
} EFI_ACPI_6_0_NFIT_FLUSH_HINT_ADDRESS_STRUCTURE;
///
/// Boot Error Record Table (BERT)
///
typedef struct {
- EFI_ACPI_DESCRIPTION_HEADER Header;
- UINT32 BootErrorRegionLength;
- UINT64 BootErrorRegion;
+ EFI_ACPI_DESCRIPTION_HEADER Header;
+ UINT32 BootErrorRegionLength;
+ UINT64 BootErrorRegion;
} EFI_ACPI_6_0_BOOT_ERROR_RECORD_TABLE_HEADER;
///
/// BERT Version (as defined in ACPI 6.0 spec.)
///
-#define EFI_ACPI_6_0_BOOT_ERROR_RECORD_TABLE_REVISION 0x01
+#define EFI_ACPI_6_0_BOOT_ERROR_RECORD_TABLE_REVISION 0x01
///
/// Boot Error Region Block Status Definition
///
typedef struct {
- UINT32 UncorrectableErrorValid:1;
- UINT32 CorrectableErrorValid:1;
- UINT32 MultipleUncorrectableErrors:1;
- UINT32 MultipleCorrectableErrors:1;
- UINT32 ErrorDataEntryCount:10;
- UINT32 Reserved:18;
+ UINT32 UncorrectableErrorValid : 1;
+ UINT32 CorrectableErrorValid : 1;
+ UINT32 MultipleUncorrectableErrors : 1;
+ UINT32 MultipleCorrectableErrors : 1;
+ UINT32 ErrorDataEntryCount : 10;
+ UINT32 Reserved : 18;
} EFI_ACPI_6_0_ERROR_BLOCK_STATUS;
///
/// Boot Error Region Definition
///
typedef struct {
- EFI_ACPI_6_0_ERROR_BLOCK_STATUS BlockStatus;
- UINT32 RawDataOffset;
- UINT32 RawDataLength;
- UINT32 DataLength;
- UINT32 ErrorSeverity;
+ EFI_ACPI_6_0_ERROR_BLOCK_STATUS BlockStatus;
+ UINT32 RawDataOffset;
+ UINT32 RawDataLength;
+ UINT32 DataLength;
+ UINT32 ErrorSeverity;
} EFI_ACPI_6_0_BOOT_ERROR_REGION_STRUCTURE;
//
// Boot Error Severity types
//
-#define EFI_ACPI_6_0_ERROR_SEVERITY_CORRECTABLE 0x00
+#define EFI_ACPI_6_0_ERROR_SEVERITY_RECOVERABLE 0x00
#define EFI_ACPI_6_0_ERROR_SEVERITY_FATAL 0x01
#define EFI_ACPI_6_0_ERROR_SEVERITY_CORRECTED 0x02
#define EFI_ACPI_6_0_ERROR_SEVERITY_NONE 0x03
+//
+// The term 'Correctable' is no longer being used as an error severity of the
+// reported error since ACPI Specification Version 5.1 Errata B.
+// The below macro is considered as deprecated and should no longer be used.
+//
+#define EFI_ACPI_6_0_ERROR_SEVERITY_CORRECTABLE 0x00
///
/// Generic Error Data Entry Definition
///
typedef struct {
- UINT8 SectionType[16];
- UINT32 ErrorSeverity;
- UINT16 Revision;
- UINT8 ValidationBits;
- UINT8 Flags;
- UINT32 ErrorDataLength;
- UINT8 FruId[16];
- UINT8 FruText[20];
+ UINT8 SectionType[16];
+ UINT32 ErrorSeverity;
+ UINT16 Revision;
+ UINT8 ValidationBits;
+ UINT8 Flags;
+ UINT32 ErrorDataLength;
+ UINT8 FruId[16];
+ UINT8 FruText[20];
} EFI_ACPI_6_0_GENERIC_ERROR_DATA_ENTRY_STRUCTURE;
///
@@ -1588,14 +1604,14 @@ typedef struct {
/// HEST - Hardware Error Source Table
///
typedef struct {
- EFI_ACPI_DESCRIPTION_HEADER Header;
- UINT32 ErrorSourceCount;
+ EFI_ACPI_DESCRIPTION_HEADER Header;
+ UINT32 ErrorSourceCount;
} EFI_ACPI_6_0_HARDWARE_ERROR_SOURCE_TABLE_HEADER;
///
/// HEST Version (as defined in ACPI 6.0 spec.)
///
-#define EFI_ACPI_6_0_HARDWARE_ERROR_SOURCE_TABLE_REVISION 0x01
+#define EFI_ACPI_6_0_HARDWARE_ERROR_SOURCE_TABLE_REVISION 0x01
//
// Error Source structure types.
@@ -1611,437 +1627,438 @@ typedef struct {
//
// Error Source structure flags.
//
-#define EFI_ACPI_6_0_ERROR_SOURCE_FLAG_FIRMWARE_FIRST (1 << 0)
-#define EFI_ACPI_6_0_ERROR_SOURCE_FLAG_GLOBAL (1 << 1)
+#define EFI_ACPI_6_0_ERROR_SOURCE_FLAG_FIRMWARE_FIRST (1 << 0)
+#define EFI_ACPI_6_0_ERROR_SOURCE_FLAG_GLOBAL (1 << 1)
///
/// IA-32 Architecture Machine Check Exception Structure Definition
///
typedef struct {
- UINT16 Type;
- UINT16 SourceId;
- UINT8 Reserved0[2];
- UINT8 Flags;
- UINT8 Enabled;
- UINT32 NumberOfRecordsToPreAllocate;
- UINT32 MaxSectionsPerRecord;
- UINT64 GlobalCapabilityInitData;
- UINT64 GlobalControlInitData;
- UINT8 NumberOfHardwareBanks;
- UINT8 Reserved1[7];
+ UINT16 Type;
+ UINT16 SourceId;
+ UINT8 Reserved0[2];
+ UINT8 Flags;
+ UINT8 Enabled;
+ UINT32 NumberOfRecordsToPreAllocate;
+ UINT32 MaxSectionsPerRecord;
+ UINT64 GlobalCapabilityInitData;
+ UINT64 GlobalControlInitData;
+ UINT8 NumberOfHardwareBanks;
+ UINT8 Reserved1[7];
} EFI_ACPI_6_0_IA32_ARCHITECTURE_MACHINE_CHECK_EXCEPTION_STRUCTURE;
///
/// IA-32 Architecture Machine Check Bank Structure Definition
///
typedef struct {
- UINT8 BankNumber;
- UINT8 ClearStatusOnInitialization;
- UINT8 StatusDataFormat;
- UINT8 Reserved0;
- UINT32 ControlRegisterMsrAddress;
- UINT64 ControlInitData;
- UINT32 StatusRegisterMsrAddress;
- UINT32 AddressRegisterMsrAddress;
- UINT32 MiscRegisterMsrAddress;
+ UINT8 BankNumber;
+ UINT8 ClearStatusOnInitialization;
+ UINT8 StatusDataFormat;
+ UINT8 Reserved0;
+ UINT32 ControlRegisterMsrAddress;
+ UINT64 ControlInitData;
+ UINT32 StatusRegisterMsrAddress;
+ UINT32 AddressRegisterMsrAddress;
+ UINT32 MiscRegisterMsrAddress;
} EFI_ACPI_6_0_IA32_ARCHITECTURE_MACHINE_CHECK_ERROR_BANK_STRUCTURE;
///
/// IA-32 Architecture Machine Check Bank Structure MCA data format
///
-#define EFI_ACPI_6_0_IA32_ARCHITECTURE_MACHINE_CHECK_ERROR_DATA_FORMAT_IA32 0x00
-#define EFI_ACPI_6_0_IA32_ARCHITECTURE_MACHINE_CHECK_ERROR_DATA_FORMAT_INTEL64 0x01
-#define EFI_ACPI_6_0_IA32_ARCHITECTURE_MACHINE_CHECK_ERROR_DATA_FORMAT_AMD64 0x02
+#define EFI_ACPI_6_0_IA32_ARCHITECTURE_MACHINE_CHECK_ERROR_DATA_FORMAT_IA32 0x00
+#define EFI_ACPI_6_0_IA32_ARCHITECTURE_MACHINE_CHECK_ERROR_DATA_FORMAT_INTEL64 0x01
+#define EFI_ACPI_6_0_IA32_ARCHITECTURE_MACHINE_CHECK_ERROR_DATA_FORMAT_AMD64 0x02
//
// Hardware Error Notification types. All other values are reserved
//
-#define EFI_ACPI_6_0_HARDWARE_ERROR_NOTIFICATION_POLLED 0x00
-#define EFI_ACPI_6_0_HARDWARE_ERROR_NOTIFICATION_EXTERNAL_INTERRUPT 0x01
-#define EFI_ACPI_6_0_HARDWARE_ERROR_NOTIFICATION_LOCAL_INTERRUPT 0x02
-#define EFI_ACPI_6_0_HARDWARE_ERROR_NOTIFICATION_SCI 0x03
-#define EFI_ACPI_6_0_HARDWARE_ERROR_NOTIFICATION_NMI 0x04
-#define EFI_ACPI_6_0_HARDWARE_ERROR_NOTIFICATION_CMCI 0x05
-#define EFI_ACPI_6_0_HARDWARE_ERROR_NOTIFICATION_MCE 0x06
-#define EFI_ACPI_6_0_HARDWARE_ERROR_NOTIFICATION_GPIO_SIGNAL 0x07
+#define EFI_ACPI_6_0_HARDWARE_ERROR_NOTIFICATION_POLLED 0x00
+#define EFI_ACPI_6_0_HARDWARE_ERROR_NOTIFICATION_EXTERNAL_INTERRUPT 0x01
+#define EFI_ACPI_6_0_HARDWARE_ERROR_NOTIFICATION_LOCAL_INTERRUPT 0x02
+#define EFI_ACPI_6_0_HARDWARE_ERROR_NOTIFICATION_SCI 0x03
+#define EFI_ACPI_6_0_HARDWARE_ERROR_NOTIFICATION_NMI 0x04
+#define EFI_ACPI_6_0_HARDWARE_ERROR_NOTIFICATION_CMCI 0x05
+#define EFI_ACPI_6_0_HARDWARE_ERROR_NOTIFICATION_MCE 0x06
+#define EFI_ACPI_6_0_HARDWARE_ERROR_NOTIFICATION_GPIO_SIGNAL 0x07
///
/// Hardware Error Notification Configuration Write Enable Structure Definition
///
typedef struct {
- UINT16 Type:1;
- UINT16 PollInterval:1;
- UINT16 SwitchToPollingThresholdValue:1;
- UINT16 SwitchToPollingThresholdWindow:1;
- UINT16 ErrorThresholdValue:1;
- UINT16 ErrorThresholdWindow:1;
- UINT16 Reserved:10;
+ UINT16 Type : 1;
+ UINT16 PollInterval : 1;
+ UINT16 SwitchToPollingThresholdValue : 1;
+ UINT16 SwitchToPollingThresholdWindow : 1;
+ UINT16 ErrorThresholdValue : 1;
+ UINT16 ErrorThresholdWindow : 1;
+ UINT16 Reserved : 10;
} EFI_ACPI_6_0_HARDWARE_ERROR_NOTIFICATION_CONFIGURATION_WRITE_ENABLE_STRUCTURE;
///
/// Hardware Error Notification Structure Definition
///
typedef struct {
- UINT8 Type;
- UINT8 Length;
- EFI_ACPI_6_0_HARDWARE_ERROR_NOTIFICATION_CONFIGURATION_WRITE_ENABLE_STRUCTURE ConfigurationWriteEnable;
- UINT32 PollInterval;
- UINT32 Vector;
- UINT32 SwitchToPollingThresholdValue;
- UINT32 SwitchToPollingThresholdWindow;
- UINT32 ErrorThresholdValue;
- UINT32 ErrorThresholdWindow;
+ UINT8 Type;
+ UINT8 Length;
+ EFI_ACPI_6_0_HARDWARE_ERROR_NOTIFICATION_CONFIGURATION_WRITE_ENABLE_STRUCTURE ConfigurationWriteEnable;
+ UINT32 PollInterval;
+ UINT32 Vector;
+ UINT32 SwitchToPollingThresholdValue;
+ UINT32 SwitchToPollingThresholdWindow;
+ UINT32 ErrorThresholdValue;
+ UINT32 ErrorThresholdWindow;
} EFI_ACPI_6_0_HARDWARE_ERROR_NOTIFICATION_STRUCTURE;
///
/// IA-32 Architecture Corrected Machine Check Structure Definition
///
typedef struct {
- UINT16 Type;
- UINT16 SourceId;
- UINT8 Reserved0[2];
- UINT8 Flags;
- UINT8 Enabled;
- UINT32 NumberOfRecordsToPreAllocate;
- UINT32 MaxSectionsPerRecord;
- EFI_ACPI_6_0_HARDWARE_ERROR_NOTIFICATION_STRUCTURE NotificationStructure;
- UINT8 NumberOfHardwareBanks;
- UINT8 Reserved1[3];
+ UINT16 Type;
+ UINT16 SourceId;
+ UINT8 Reserved0[2];
+ UINT8 Flags;
+ UINT8 Enabled;
+ UINT32 NumberOfRecordsToPreAllocate;
+ UINT32 MaxSectionsPerRecord;
+ EFI_ACPI_6_0_HARDWARE_ERROR_NOTIFICATION_STRUCTURE NotificationStructure;
+ UINT8 NumberOfHardwareBanks;
+ UINT8 Reserved1[3];
} EFI_ACPI_6_0_IA32_ARCHITECTURE_CORRECTED_MACHINE_CHECK_STRUCTURE;
///
/// IA-32 Architecture NMI Error Structure Definition
///
typedef struct {
- UINT16 Type;
- UINT16 SourceId;
- UINT8 Reserved0[2];
- UINT32 NumberOfRecordsToPreAllocate;
- UINT32 MaxSectionsPerRecord;
- UINT32 MaxRawDataLength;
+ UINT16 Type;
+ UINT16 SourceId;
+ UINT8 Reserved0[2];
+ UINT32 NumberOfRecordsToPreAllocate;
+ UINT32 MaxSectionsPerRecord;
+ UINT32 MaxRawDataLength;
} EFI_ACPI_6_0_IA32_ARCHITECTURE_NMI_ERROR_STRUCTURE;
///
/// PCI Express Root Port AER Structure Definition
///
typedef struct {
- UINT16 Type;
- UINT16 SourceId;
- UINT8 Reserved0[2];
- UINT8 Flags;
- UINT8 Enabled;
- UINT32 NumberOfRecordsToPreAllocate;
- UINT32 MaxSectionsPerRecord;
- UINT32 Bus;
- UINT16 Device;
- UINT16 Function;
- UINT16 DeviceControl;
- UINT8 Reserved1[2];
- UINT32 UncorrectableErrorMask;
- UINT32 UncorrectableErrorSeverity;
- UINT32 CorrectableErrorMask;
- UINT32 AdvancedErrorCapabilitiesAndControl;
- UINT32 RootErrorCommand;
+ UINT16 Type;
+ UINT16 SourceId;
+ UINT8 Reserved0[2];
+ UINT8 Flags;
+ UINT8 Enabled;
+ UINT32 NumberOfRecordsToPreAllocate;
+ UINT32 MaxSectionsPerRecord;
+ UINT32 Bus;
+ UINT16 Device;
+ UINT16 Function;
+ UINT16 DeviceControl;
+ UINT8 Reserved1[2];
+ UINT32 UncorrectableErrorMask;
+ UINT32 UncorrectableErrorSeverity;
+ UINT32 CorrectableErrorMask;
+ UINT32 AdvancedErrorCapabilitiesAndControl;
+ UINT32 RootErrorCommand;
} EFI_ACPI_6_0_PCI_EXPRESS_ROOT_PORT_AER_STRUCTURE;
///
/// PCI Express Device AER Structure Definition
///
typedef struct {
- UINT16 Type;
- UINT16 SourceId;
- UINT8 Reserved0[2];
- UINT8 Flags;
- UINT8 Enabled;
- UINT32 NumberOfRecordsToPreAllocate;
- UINT32 MaxSectionsPerRecord;
- UINT32 Bus;
- UINT16 Device;
- UINT16 Function;
- UINT16 DeviceControl;
- UINT8 Reserved1[2];
- UINT32 UncorrectableErrorMask;
- UINT32 UncorrectableErrorSeverity;
- UINT32 CorrectableErrorMask;
- UINT32 AdvancedErrorCapabilitiesAndControl;
+ UINT16 Type;
+ UINT16 SourceId;
+ UINT8 Reserved0[2];
+ UINT8 Flags;
+ UINT8 Enabled;
+ UINT32 NumberOfRecordsToPreAllocate;
+ UINT32 MaxSectionsPerRecord;
+ UINT32 Bus;
+ UINT16 Device;
+ UINT16 Function;
+ UINT16 DeviceControl;
+ UINT8 Reserved1[2];
+ UINT32 UncorrectableErrorMask;
+ UINT32 UncorrectableErrorSeverity;
+ UINT32 CorrectableErrorMask;
+ UINT32 AdvancedErrorCapabilitiesAndControl;
} EFI_ACPI_6_0_PCI_EXPRESS_DEVICE_AER_STRUCTURE;
///
/// PCI Express Bridge AER Structure Definition
///
typedef struct {
- UINT16 Type;
- UINT16 SourceId;
- UINT8 Reserved0[2];
- UINT8 Flags;
- UINT8 Enabled;
- UINT32 NumberOfRecordsToPreAllocate;
- UINT32 MaxSectionsPerRecord;
- UINT32 Bus;
- UINT16 Device;
- UINT16 Function;
- UINT16 DeviceControl;
- UINT8 Reserved1[2];
- UINT32 UncorrectableErrorMask;
- UINT32 UncorrectableErrorSeverity;
- UINT32 CorrectableErrorMask;
- UINT32 AdvancedErrorCapabilitiesAndControl;
- UINT32 SecondaryUncorrectableErrorMask;
- UINT32 SecondaryUncorrectableErrorSeverity;
- UINT32 SecondaryAdvancedErrorCapabilitiesAndControl;
+ UINT16 Type;
+ UINT16 SourceId;
+ UINT8 Reserved0[2];
+ UINT8 Flags;
+ UINT8 Enabled;
+ UINT32 NumberOfRecordsToPreAllocate;
+ UINT32 MaxSectionsPerRecord;
+ UINT32 Bus;
+ UINT16 Device;
+ UINT16 Function;
+ UINT16 DeviceControl;
+ UINT8 Reserved1[2];
+ UINT32 UncorrectableErrorMask;
+ UINT32 UncorrectableErrorSeverity;
+ UINT32 CorrectableErrorMask;
+ UINT32 AdvancedErrorCapabilitiesAndControl;
+ UINT32 SecondaryUncorrectableErrorMask;
+ UINT32 SecondaryUncorrectableErrorSeverity;
+ UINT32 SecondaryAdvancedErrorCapabilitiesAndControl;
} EFI_ACPI_6_0_PCI_EXPRESS_BRIDGE_AER_STRUCTURE;
///
/// Generic Hardware Error Source Structure Definition
///
typedef struct {
- UINT16 Type;
- UINT16 SourceId;
- UINT16 RelatedSourceId;
- UINT8 Flags;
- UINT8 Enabled;
- UINT32 NumberOfRecordsToPreAllocate;
- UINT32 MaxSectionsPerRecord;
- UINT32 MaxRawDataLength;
- EFI_ACPI_6_0_GENERIC_ADDRESS_STRUCTURE ErrorStatusAddress;
- EFI_ACPI_6_0_HARDWARE_ERROR_NOTIFICATION_STRUCTURE NotificationStructure;
- UINT32 ErrorStatusBlockLength;
+ UINT16 Type;
+ UINT16 SourceId;
+ UINT16 RelatedSourceId;
+ UINT8 Flags;
+ UINT8 Enabled;
+ UINT32 NumberOfRecordsToPreAllocate;
+ UINT32 MaxSectionsPerRecord;
+ UINT32 MaxRawDataLength;
+ EFI_ACPI_6_0_GENERIC_ADDRESS_STRUCTURE ErrorStatusAddress;
+ EFI_ACPI_6_0_HARDWARE_ERROR_NOTIFICATION_STRUCTURE NotificationStructure;
+ UINT32 ErrorStatusBlockLength;
} EFI_ACPI_6_0_GENERIC_HARDWARE_ERROR_SOURCE_STRUCTURE;
///
/// Generic Error Status Definition
///
typedef struct {
- EFI_ACPI_6_0_ERROR_BLOCK_STATUS BlockStatus;
- UINT32 RawDataOffset;
- UINT32 RawDataLength;
- UINT32 DataLength;
- UINT32 ErrorSeverity;
+ EFI_ACPI_6_0_ERROR_BLOCK_STATUS BlockStatus;
+ UINT32 RawDataOffset;
+ UINT32 RawDataLength;
+ UINT32 DataLength;
+ UINT32 ErrorSeverity;
} EFI_ACPI_6_0_GENERIC_ERROR_STATUS_STRUCTURE;
///
/// ERST - Error Record Serialization Table
///
typedef struct {
- EFI_ACPI_DESCRIPTION_HEADER Header;
- UINT32 SerializationHeaderSize;
- UINT8 Reserved0[4];
- UINT32 InstructionEntryCount;
+ EFI_ACPI_DESCRIPTION_HEADER Header;
+ UINT32 SerializationHeaderSize;
+ UINT8 Reserved0[4];
+ UINT32 InstructionEntryCount;
} EFI_ACPI_6_0_ERROR_RECORD_SERIALIZATION_TABLE_HEADER;
///
/// ERST Version (as defined in ACPI 6.0 spec.)
///
-#define EFI_ACPI_6_0_ERROR_RECORD_SERIALIZATION_TABLE_REVISION 0x01
+#define EFI_ACPI_6_0_ERROR_RECORD_SERIALIZATION_TABLE_REVISION 0x01
///
/// ERST Serialization Actions
///
-#define EFI_ACPI_6_0_ERST_BEGIN_WRITE_OPERATION 0x00
-#define EFI_ACPI_6_0_ERST_BEGIN_READ_OPERATION 0x01
-#define EFI_ACPI_6_0_ERST_BEGIN_CLEAR_OPERATION 0x02
-#define EFI_ACPI_6_0_ERST_END_OPERATION 0x03
-#define EFI_ACPI_6_0_ERST_SET_RECORD_OFFSET 0x04
-#define EFI_ACPI_6_0_ERST_EXECUTE_OPERATION 0x05
-#define EFI_ACPI_6_0_ERST_CHECK_BUSY_STATUS 0x06
-#define EFI_ACPI_6_0_ERST_GET_COMMAND_STATUS 0x07
-#define EFI_ACPI_6_0_ERST_GET_RECORD_IDENTIFIER 0x08
-#define EFI_ACPI_6_0_ERST_SET_RECORD_IDENTIFIER 0x09
-#define EFI_ACPI_6_0_ERST_GET_RECORD_COUNT 0x0A
-#define EFI_ACPI_6_0_ERST_BEGIN_DUMMY_WRITE_OPERATION 0x0B
-#define EFI_ACPI_6_0_ERST_GET_ERROR_LOG_ADDRESS_RANGE 0x0D
-#define EFI_ACPI_6_0_ERST_GET_ERROR_LOG_ADDRESS_RANGE_LENGTH 0x0E
-#define EFI_ACPI_6_0_ERST_GET_ERROR_LOG_ADDRESS_RANGE_ATTRIBUTES 0x0F
+#define EFI_ACPI_6_0_ERST_BEGIN_WRITE_OPERATION 0x00
+#define EFI_ACPI_6_0_ERST_BEGIN_READ_OPERATION 0x01
+#define EFI_ACPI_6_0_ERST_BEGIN_CLEAR_OPERATION 0x02
+#define EFI_ACPI_6_0_ERST_END_OPERATION 0x03
+#define EFI_ACPI_6_0_ERST_SET_RECORD_OFFSET 0x04
+#define EFI_ACPI_6_0_ERST_EXECUTE_OPERATION 0x05
+#define EFI_ACPI_6_0_ERST_CHECK_BUSY_STATUS 0x06
+#define EFI_ACPI_6_0_ERST_GET_COMMAND_STATUS 0x07
+#define EFI_ACPI_6_0_ERST_GET_RECORD_IDENTIFIER 0x08
+#define EFI_ACPI_6_0_ERST_SET_RECORD_IDENTIFIER 0x09
+#define EFI_ACPI_6_0_ERST_GET_RECORD_COUNT 0x0A
+#define EFI_ACPI_6_0_ERST_BEGIN_DUMMY_WRITE_OPERATION 0x0B
+#define EFI_ACPI_6_0_ERST_GET_ERROR_LOG_ADDRESS_RANGE 0x0D
+#define EFI_ACPI_6_0_ERST_GET_ERROR_LOG_ADDRESS_RANGE_LENGTH 0x0E
+#define EFI_ACPI_6_0_ERST_GET_ERROR_LOG_ADDRESS_RANGE_ATTRIBUTES 0x0F
///
/// ERST Action Command Status
///
-#define EFI_ACPI_6_0_ERST_STATUS_SUCCESS 0x00
-#define EFI_ACPI_6_0_ERST_STATUS_NOT_ENOUGH_SPACE 0x01
-#define EFI_ACPI_6_0_ERST_STATUS_HARDWARE_NOT_AVAILABLE 0x02
-#define EFI_ACPI_6_0_ERST_STATUS_FAILED 0x03
-#define EFI_ACPI_6_0_ERST_STATUS_RECORD_STORE_EMPTY 0x04
-#define EFI_ACPI_6_0_ERST_STATUS_RECORD_NOT_FOUND 0x05
+#define EFI_ACPI_6_0_ERST_STATUS_SUCCESS 0x00
+#define EFI_ACPI_6_0_ERST_STATUS_NOT_ENOUGH_SPACE 0x01
+#define EFI_ACPI_6_0_ERST_STATUS_HARDWARE_NOT_AVAILABLE 0x02
+#define EFI_ACPI_6_0_ERST_STATUS_FAILED 0x03
+#define EFI_ACPI_6_0_ERST_STATUS_RECORD_STORE_EMPTY 0x04
+#define EFI_ACPI_6_0_ERST_STATUS_RECORD_NOT_FOUND 0x05
///
/// ERST Serialization Instructions
///
-#define EFI_ACPI_6_0_ERST_READ_REGISTER 0x00
-#define EFI_ACPI_6_0_ERST_READ_REGISTER_VALUE 0x01
-#define EFI_ACPI_6_0_ERST_WRITE_REGISTER 0x02
-#define EFI_ACPI_6_0_ERST_WRITE_REGISTER_VALUE 0x03
-#define EFI_ACPI_6_0_ERST_NOOP 0x04
-#define EFI_ACPI_6_0_ERST_LOAD_VAR1 0x05
-#define EFI_ACPI_6_0_ERST_LOAD_VAR2 0x06
-#define EFI_ACPI_6_0_ERST_STORE_VAR1 0x07
-#define EFI_ACPI_6_0_ERST_ADD 0x08
-#define EFI_ACPI_6_0_ERST_SUBTRACT 0x09
-#define EFI_ACPI_6_0_ERST_ADD_VALUE 0x0A
-#define EFI_ACPI_6_0_ERST_SUBTRACT_VALUE 0x0B
-#define EFI_ACPI_6_0_ERST_STALL 0x0C
-#define EFI_ACPI_6_0_ERST_STALL_WHILE_TRUE 0x0D
-#define EFI_ACPI_6_0_ERST_SKIP_NEXT_INSTRUCTION_IF_TRUE 0x0E
-#define EFI_ACPI_6_0_ERST_GOTO 0x0F
-#define EFI_ACPI_6_0_ERST_SET_SRC_ADDRESS_BASE 0x10
-#define EFI_ACPI_6_0_ERST_SET_DST_ADDRESS_BASE 0x11
-#define EFI_ACPI_6_0_ERST_MOVE_DATA 0x12
+#define EFI_ACPI_6_0_ERST_READ_REGISTER 0x00
+#define EFI_ACPI_6_0_ERST_READ_REGISTER_VALUE 0x01
+#define EFI_ACPI_6_0_ERST_WRITE_REGISTER 0x02
+#define EFI_ACPI_6_0_ERST_WRITE_REGISTER_VALUE 0x03
+#define EFI_ACPI_6_0_ERST_NOOP 0x04
+#define EFI_ACPI_6_0_ERST_LOAD_VAR1 0x05
+#define EFI_ACPI_6_0_ERST_LOAD_VAR2 0x06
+#define EFI_ACPI_6_0_ERST_STORE_VAR1 0x07
+#define EFI_ACPI_6_0_ERST_ADD 0x08
+#define EFI_ACPI_6_0_ERST_SUBTRACT 0x09
+#define EFI_ACPI_6_0_ERST_ADD_VALUE 0x0A
+#define EFI_ACPI_6_0_ERST_SUBTRACT_VALUE 0x0B
+#define EFI_ACPI_6_0_ERST_STALL 0x0C
+#define EFI_ACPI_6_0_ERST_STALL_WHILE_TRUE 0x0D
+#define EFI_ACPI_6_0_ERST_SKIP_NEXT_INSTRUCTION_IF_TRUE 0x0E
+#define EFI_ACPI_6_0_ERST_GOTO 0x0F
+#define EFI_ACPI_6_0_ERST_SET_SRC_ADDRESS_BASE 0x10
+#define EFI_ACPI_6_0_ERST_SET_DST_ADDRESS_BASE 0x11
+#define EFI_ACPI_6_0_ERST_MOVE_DATA 0x12
///
/// ERST Instruction Flags
///
-#define EFI_ACPI_6_0_ERST_PRESERVE_REGISTER 0x01
+#define EFI_ACPI_6_0_ERST_PRESERVE_REGISTER 0x01
///
/// ERST Serialization Instruction Entry
///
typedef struct {
- UINT8 SerializationAction;
- UINT8 Instruction;
- UINT8 Flags;
- UINT8 Reserved0;
- EFI_ACPI_6_0_GENERIC_ADDRESS_STRUCTURE RegisterRegion;
- UINT64 Value;
- UINT64 Mask;
+ UINT8 SerializationAction;
+ UINT8 Instruction;
+ UINT8 Flags;
+ UINT8 Reserved0;
+ EFI_ACPI_6_0_GENERIC_ADDRESS_STRUCTURE RegisterRegion;
+ UINT64 Value;
+ UINT64 Mask;
} EFI_ACPI_6_0_ERST_SERIALIZATION_INSTRUCTION_ENTRY;
///
/// EINJ - Error Injection Table
///
typedef struct {
- EFI_ACPI_DESCRIPTION_HEADER Header;
- UINT32 InjectionHeaderSize;
- UINT8 InjectionFlags;
- UINT8 Reserved0[3];
- UINT32 InjectionEntryCount;
+ EFI_ACPI_DESCRIPTION_HEADER Header;
+ UINT32 InjectionHeaderSize;
+ UINT8 InjectionFlags;
+ UINT8 Reserved0[3];
+ UINT32 InjectionEntryCount;
} EFI_ACPI_6_0_ERROR_INJECTION_TABLE_HEADER;
///
/// EINJ Version (as defined in ACPI 6.0 spec.)
///
-#define EFI_ACPI_6_0_ERROR_INJECTION_TABLE_REVISION 0x01
+#define EFI_ACPI_6_0_ERROR_INJECTION_TABLE_REVISION 0x01
///
/// EINJ Error Injection Actions
///
-#define EFI_ACPI_6_0_EINJ_BEGIN_INJECTION_OPERATION 0x00
-#define EFI_ACPI_6_0_EINJ_GET_TRIGGER_ERROR_ACTION_TABLE 0x01
-#define EFI_ACPI_6_0_EINJ_SET_ERROR_TYPE 0x02
-#define EFI_ACPI_6_0_EINJ_GET_ERROR_TYPE 0x03
-#define EFI_ACPI_6_0_EINJ_END_OPERATION 0x04
-#define EFI_ACPI_6_0_EINJ_EXECUTE_OPERATION 0x05
-#define EFI_ACPI_6_0_EINJ_CHECK_BUSY_STATUS 0x06
-#define EFI_ACPI_6_0_EINJ_GET_COMMAND_STATUS 0x07
-#define EFI_ACPI_6_0_EINJ_TRIGGER_ERROR 0xFF
+#define EFI_ACPI_6_0_EINJ_BEGIN_INJECTION_OPERATION 0x00
+#define EFI_ACPI_6_0_EINJ_GET_TRIGGER_ERROR_ACTION_TABLE 0x01
+#define EFI_ACPI_6_0_EINJ_SET_ERROR_TYPE 0x02
+#define EFI_ACPI_6_0_EINJ_GET_ERROR_TYPE 0x03
+#define EFI_ACPI_6_0_EINJ_END_OPERATION 0x04
+#define EFI_ACPI_6_0_EINJ_EXECUTE_OPERATION 0x05
+#define EFI_ACPI_6_0_EINJ_CHECK_BUSY_STATUS 0x06
+#define EFI_ACPI_6_0_EINJ_GET_COMMAND_STATUS 0x07
+#define EFI_ACPI_6_0_EINJ_SET_ERROR_TYPE_WITH_ADDRESS 0x08
+#define EFI_ACPI_6_0_EINJ_TRIGGER_ERROR 0xFF
///
/// EINJ Action Command Status
///
-#define EFI_ACPI_6_0_EINJ_STATUS_SUCCESS 0x00
-#define EFI_ACPI_6_0_EINJ_STATUS_UNKNOWN_FAILURE 0x01
-#define EFI_ACPI_6_0_EINJ_STATUS_INVALID_ACCESS 0x02
+#define EFI_ACPI_6_0_EINJ_STATUS_SUCCESS 0x00
+#define EFI_ACPI_6_0_EINJ_STATUS_UNKNOWN_FAILURE 0x01
+#define EFI_ACPI_6_0_EINJ_STATUS_INVALID_ACCESS 0x02
///
/// EINJ Error Type Definition
///
-#define EFI_ACPI_6_0_EINJ_ERROR_PROCESSOR_CORRECTABLE (1 << 0)
-#define EFI_ACPI_6_0_EINJ_ERROR_PROCESSOR_UNCORRECTABLE_NONFATAL (1 << 1)
-#define EFI_ACPI_6_0_EINJ_ERROR_PROCESSOR_UNCORRECTABLE_FATAL (1 << 2)
-#define EFI_ACPI_6_0_EINJ_ERROR_MEMORY_CORRECTABLE (1 << 3)
-#define EFI_ACPI_6_0_EINJ_ERROR_MEMORY_UNCORRECTABLE_NONFATAL (1 << 4)
-#define EFI_ACPI_6_0_EINJ_ERROR_MEMORY_UNCORRECTABLE_FATAL (1 << 5)
-#define EFI_ACPI_6_0_EINJ_ERROR_PCI_EXPRESS_CORRECTABLE (1 << 6)
-#define EFI_ACPI_6_0_EINJ_ERROR_PCI_EXPRESS_UNCORRECTABLE_NONFATAL (1 << 7)
-#define EFI_ACPI_6_0_EINJ_ERROR_PCI_EXPRESS_UNCORRECTABLE_FATAL (1 << 8)
-#define EFI_ACPI_6_0_EINJ_ERROR_PLATFORM_CORRECTABLE (1 << 9)
-#define EFI_ACPI_6_0_EINJ_ERROR_PLATFORM_UNCORRECTABLE_NONFATAL (1 << 10)
-#define EFI_ACPI_6_0_EINJ_ERROR_PLATFORM_UNCORRECTABLE_FATAL (1 << 11)
+#define EFI_ACPI_6_0_EINJ_ERROR_PROCESSOR_CORRECTABLE (1 << 0)
+#define EFI_ACPI_6_0_EINJ_ERROR_PROCESSOR_UNCORRECTABLE_NONFATAL (1 << 1)
+#define EFI_ACPI_6_0_EINJ_ERROR_PROCESSOR_UNCORRECTABLE_FATAL (1 << 2)
+#define EFI_ACPI_6_0_EINJ_ERROR_MEMORY_CORRECTABLE (1 << 3)
+#define EFI_ACPI_6_0_EINJ_ERROR_MEMORY_UNCORRECTABLE_NONFATAL (1 << 4)
+#define EFI_ACPI_6_0_EINJ_ERROR_MEMORY_UNCORRECTABLE_FATAL (1 << 5)
+#define EFI_ACPI_6_0_EINJ_ERROR_PCI_EXPRESS_CORRECTABLE (1 << 6)
+#define EFI_ACPI_6_0_EINJ_ERROR_PCI_EXPRESS_UNCORRECTABLE_NONFATAL (1 << 7)
+#define EFI_ACPI_6_0_EINJ_ERROR_PCI_EXPRESS_UNCORRECTABLE_FATAL (1 << 8)
+#define EFI_ACPI_6_0_EINJ_ERROR_PLATFORM_CORRECTABLE (1 << 9)
+#define EFI_ACPI_6_0_EINJ_ERROR_PLATFORM_UNCORRECTABLE_NONFATAL (1 << 10)
+#define EFI_ACPI_6_0_EINJ_ERROR_PLATFORM_UNCORRECTABLE_FATAL (1 << 11)
///
/// EINJ Injection Instructions
///
-#define EFI_ACPI_6_0_EINJ_READ_REGISTER 0x00
-#define EFI_ACPI_6_0_EINJ_READ_REGISTER_VALUE 0x01
-#define EFI_ACPI_6_0_EINJ_WRITE_REGISTER 0x02
-#define EFI_ACPI_6_0_EINJ_WRITE_REGISTER_VALUE 0x03
-#define EFI_ACPI_6_0_EINJ_NOOP 0x04
+#define EFI_ACPI_6_0_EINJ_READ_REGISTER 0x00
+#define EFI_ACPI_6_0_EINJ_READ_REGISTER_VALUE 0x01
+#define EFI_ACPI_6_0_EINJ_WRITE_REGISTER 0x02
+#define EFI_ACPI_6_0_EINJ_WRITE_REGISTER_VALUE 0x03
+#define EFI_ACPI_6_0_EINJ_NOOP 0x04
///
/// EINJ Instruction Flags
///
-#define EFI_ACPI_6_0_EINJ_PRESERVE_REGISTER 0x01
+#define EFI_ACPI_6_0_EINJ_PRESERVE_REGISTER 0x01
///
/// EINJ Injection Instruction Entry
///
typedef struct {
- UINT8 InjectionAction;
- UINT8 Instruction;
- UINT8 Flags;
- UINT8 Reserved0;
- EFI_ACPI_6_0_GENERIC_ADDRESS_STRUCTURE RegisterRegion;
- UINT64 Value;
- UINT64 Mask;
+ UINT8 InjectionAction;
+ UINT8 Instruction;
+ UINT8 Flags;
+ UINT8 Reserved0;
+ EFI_ACPI_6_0_GENERIC_ADDRESS_STRUCTURE RegisterRegion;
+ UINT64 Value;
+ UINT64 Mask;
} EFI_ACPI_6_0_EINJ_INJECTION_INSTRUCTION_ENTRY;
///
/// EINJ Trigger Action Table
///
typedef struct {
- UINT32 HeaderSize;
- UINT32 Revision;
- UINT32 TableSize;
- UINT32 EntryCount;
+ UINT32 HeaderSize;
+ UINT32 Revision;
+ UINT32 TableSize;
+ UINT32 EntryCount;
} EFI_ACPI_6_0_EINJ_TRIGGER_ACTION_TABLE;
///
/// Platform Communications Channel Table (PCCT)
///
typedef struct {
- EFI_ACPI_DESCRIPTION_HEADER Header;
- UINT32 Flags;
- UINT64 Reserved;
+ EFI_ACPI_DESCRIPTION_HEADER Header;
+ UINT32 Flags;
+ UINT64 Reserved;
} EFI_ACPI_6_0_PLATFORM_COMMUNICATION_CHANNEL_TABLE_HEADER;
///
/// PCCT Version (as defined in ACPI 6.0 spec.)
///
-#define EFI_ACPI_6_0_PLATFORM_COMMUNICATION_CHANNEL_TABLE_REVISION 0x01
+#define EFI_ACPI_6_0_PLATFORM_COMMUNICATION_CHANNEL_TABLE_REVISION 0x01
///
/// PCCT Global Flags
///
-#define EFI_ACPI_6_0_PCCT_FLAGS_SCI_DOORBELL BIT0
+#define EFI_ACPI_6_0_PCCT_FLAGS_SCI_DOORBELL BIT0
//
// PCCT Subspace type
//
-#define EFI_ACPI_6_0_PCCT_SUBSPACE_TYPE_GENERIC 0x00
-#define EFI_ACPI_6_0_PCCT_SUBSPACE_TYPE_1_HW_REDUCED_COMMUNICATIONS 0x01
-#define EFI_ACPI_6_0_PCCT_SUBSPACE_TYPE_2_HW_REDUCED_COMMUNICATIONS 0x02
+#define EFI_ACPI_6_0_PCCT_SUBSPACE_TYPE_GENERIC 0x00
+#define EFI_ACPI_6_0_PCCT_SUBSPACE_TYPE_1_HW_REDUCED_COMMUNICATIONS 0x01
+#define EFI_ACPI_6_0_PCCT_SUBSPACE_TYPE_2_HW_REDUCED_COMMUNICATIONS 0x02
///
/// PCC Subspace Structure Header
///
typedef struct {
- UINT8 Type;
- UINT8 Length;
+ UINT8 Type;
+ UINT8 Length;
} EFI_ACPI_6_0_PCCT_SUBSPACE_HEADER;
///
/// Generic Communications Subspace Structure
///
typedef struct {
- UINT8 Type;
- UINT8 Length;
- UINT8 Reserved[6];
- UINT64 BaseAddress;
- UINT64 AddressLength;
- EFI_ACPI_6_0_GENERIC_ADDRESS_STRUCTURE DoorbellRegister;
- UINT64 DoorbellPreserve;
- UINT64 DoorbellWrite;
- UINT32 NominalLatency;
- UINT32 MaximumPeriodicAccessRate;
- UINT16 MinimumRequestTurnaroundTime;
+ UINT8 Type;
+ UINT8 Length;
+ UINT8 Reserved[6];
+ UINT64 BaseAddress;
+ UINT64 AddressLength;
+ EFI_ACPI_6_0_GENERIC_ADDRESS_STRUCTURE DoorbellRegister;
+ UINT64 DoorbellPreserve;
+ UINT64 DoorbellWrite;
+ UINT32 NominalLatency;
+ UINT32 MaximumPeriodicAccessRate;
+ UINT16 MinimumRequestTurnaroundTime;
} EFI_ACPI_6_0_PCCT_SUBSPACE_GENERIC;
///
@@ -2049,18 +2066,18 @@ typedef struct {
///
typedef struct {
- UINT8 Command;
- UINT8 Reserved:7;
- UINT8 GenerateSci:1;
+ UINT8 Command;
+ UINT8 Reserved : 7;
+ UINT8 GenerateSci : 1;
} EFI_ACPI_6_0_PCCT_GENERIC_SHARED_MEMORY_REGION_COMMAND;
typedef struct {
- UINT8 CommandComplete:1;
- UINT8 SciDoorbell:1;
- UINT8 Error:1;
- UINT8 PlatformNotification:1;
- UINT8 Reserved:4;
- UINT8 Reserved1;
+ UINT8 CommandComplete : 1;
+ UINT8 SciDoorbell : 1;
+ UINT8 Error : 1;
+ UINT8 PlatformNotification : 1;
+ UINT8 Reserved : 4;
+ UINT8 Reserved1;
} EFI_ACPI_6_0_PCCT_GENERIC_SHARED_MEMORY_REGION_STATUS;
typedef struct {
@@ -2069,48 +2086,48 @@ typedef struct {
EFI_ACPI_6_0_PCCT_GENERIC_SHARED_MEMORY_REGION_STATUS Status;
} EFI_ACPI_6_0_PCCT_GENERIC_SHARED_MEMORY_REGION_HEADER;
-#define EFI_ACPI_6_0_PCCT_SUBSPACE_DOORBELL_INTERRUPT_FLAGS_POLARITY BIT0
-#define EFI_ACPI_6_0_PCCT_SUBSPACE_DOORBELL_INTERRUPT_FLAGS_MODE BIT1
+#define EFI_ACPI_6_0_PCCT_SUBSPACE_DOORBELL_INTERRUPT_FLAGS_POLARITY BIT0
+#define EFI_ACPI_6_0_PCCT_SUBSPACE_DOORBELL_INTERRUPT_FLAGS_MODE BIT1
///
/// Type 1 HW-Reduced Communications Subspace Structure
///
typedef struct {
- UINT8 Type;
- UINT8 Length;
- UINT32 DoorbellInterrupt;
- UINT8 DoorbellInterruptFlags;
- UINT8 Reserved;
- UINT64 BaseAddress;
- UINT64 AddressLength;
- EFI_ACPI_6_0_GENERIC_ADDRESS_STRUCTURE DoorbellRegister;
- UINT64 DoorbellPreserve;
- UINT64 DoorbellWrite;
- UINT32 NominalLatency;
- UINT32 MaximumPeriodicAccessRate;
- UINT16 MinimumRequestTurnaroundTime;
+ UINT8 Type;
+ UINT8 Length;
+ UINT32 DoorbellInterrupt;
+ UINT8 DoorbellInterruptFlags;
+ UINT8 Reserved;
+ UINT64 BaseAddress;
+ UINT64 AddressLength;
+ EFI_ACPI_6_0_GENERIC_ADDRESS_STRUCTURE DoorbellRegister;
+ UINT64 DoorbellPreserve;
+ UINT64 DoorbellWrite;
+ UINT32 NominalLatency;
+ UINT32 MaximumPeriodicAccessRate;
+ UINT16 MinimumRequestTurnaroundTime;
} EFI_ACPI_6_0_PCCT_SUBSPACE_1_HW_REDUCED_COMMUNICATIONS;
///
/// Type 2 HW-Reduced Communications Subspace Structure
///
typedef struct {
- UINT8 Type;
- UINT8 Length;
- UINT32 DoorbellInterrupt;
- UINT8 DoorbellInterruptFlags;
- UINT8 Reserved;
- UINT64 BaseAddress;
- UINT64 AddressLength;
- EFI_ACPI_6_0_GENERIC_ADDRESS_STRUCTURE DoorbellRegister;
- UINT64 DoorbellPreserve;
- UINT64 DoorbellWrite;
- UINT32 NominalLatency;
- UINT32 MaximumPeriodicAccessRate;
- UINT16 MinimumRequestTurnaroundTime;
- EFI_ACPI_6_0_GENERIC_ADDRESS_STRUCTURE DoorbellAckRegister;
- UINT64 DoorbellAckPreserve;
- UINT64 DoorbellAckWrite;
+ UINT8 Type;
+ UINT8 Length;
+ UINT32 DoorbellInterrupt;
+ UINT8 DoorbellInterruptFlags;
+ UINT8 Reserved;
+ UINT64 BaseAddress;
+ UINT64 AddressLength;
+ EFI_ACPI_6_0_GENERIC_ADDRESS_STRUCTURE DoorbellRegister;
+ UINT64 DoorbellPreserve;
+ UINT64 DoorbellWrite;
+ UINT32 NominalLatency;
+ UINT32 MaximumPeriodicAccessRate;
+ UINT16 MinimumRequestTurnaroundTime;
+ EFI_ACPI_6_0_GENERIC_ADDRESS_STRUCTURE DoorbellAckRegister;
+ UINT64 DoorbellAckPreserve;
+ UINT64 DoorbellAckWrite;
} EFI_ACPI_6_0_PCCT_SUBSPACE_2_HW_REDUCED_COMMUNICATIONS;
//
diff --git a/sys/contrib/edk2/Include/IndustryStandard/AcpiAml.h b/sys/contrib/edk2/Include/IndustryStandard/AcpiAml.h
index cba5848cb400..79e30b7b58f8 100644
--- a/sys/contrib/edk2/Include/IndustryStandard/AcpiAml.h
+++ b/sys/contrib/edk2/Include/IndustryStandard/AcpiAml.h
@@ -2,7 +2,7 @@
This file contains AML code definition in the latest ACPI spec.
Copyright (c) 2011, Intel Corporation. All rights reserved.<BR>
- Copyright (c) 2019, ARM Limited. All rights reserved.<BR>
+ Copyright (c) 2019 - 2021, Arm Limited. All rights reserved.<BR>
SPDX-License-Identifier: BSD-2-Clause-Patent
**/
@@ -17,163 +17,168 @@
//
// Primary OpCode
//
-#define AML_ZERO_OP 0x00
-#define AML_ONE_OP 0x01
-#define AML_ALIAS_OP 0x06
-#define AML_NAME_OP 0x08
-#define AML_BYTE_PREFIX 0x0a
-#define AML_WORD_PREFIX 0x0b
-#define AML_DWORD_PREFIX 0x0c
-#define AML_STRING_PREFIX 0x0d
-#define AML_QWORD_PREFIX 0x0e
-#define AML_SCOPE_OP 0x10
-#define AML_BUFFER_OP 0x11
-#define AML_PACKAGE_OP 0x12
-#define AML_VAR_PACKAGE_OP 0x13
-#define AML_METHOD_OP 0x14
-#define AML_EXTERNAL_OP 0x15
-#define AML_DUAL_NAME_PREFIX 0x2e
-#define AML_MULTI_NAME_PREFIX 0x2f
-#define AML_NAME_CHAR_A 0x41
-#define AML_NAME_CHAR_B 0x42
-#define AML_NAME_CHAR_C 0x43
-#define AML_NAME_CHAR_D 0x44
-#define AML_NAME_CHAR_E 0x45
-#define AML_NAME_CHAR_F 0x46
-#define AML_NAME_CHAR_G 0x47
-#define AML_NAME_CHAR_H 0x48
-#define AML_NAME_CHAR_I 0x49
-#define AML_NAME_CHAR_J 0x4a
-#define AML_NAME_CHAR_K 0x4b
-#define AML_NAME_CHAR_L 0x4c
-#define AML_NAME_CHAR_M 0x4d
-#define AML_NAME_CHAR_N 0x4e
-#define AML_NAME_CHAR_O 0x4f
-#define AML_NAME_CHAR_P 0x50
-#define AML_NAME_CHAR_Q 0x51
-#define AML_NAME_CHAR_R 0x52
-#define AML_NAME_CHAR_S 0x53
-#define AML_NAME_CHAR_T 0x54
-#define AML_NAME_CHAR_U 0x55
-#define AML_NAME_CHAR_V 0x56
-#define AML_NAME_CHAR_W 0x57
-#define AML_NAME_CHAR_X 0x58
-#define AML_NAME_CHAR_Y 0x59
-#define AML_NAME_CHAR_Z 0x5a
-#define AML_ROOT_CHAR 0x5c
-#define AML_PARENT_PREFIX_CHAR 0x5e
-#define AML_NAME_CHAR__ 0x5f
-#define AML_LOCAL0 0x60
-#define AML_LOCAL1 0x61
-#define AML_LOCAL2 0x62
-#define AML_LOCAL3 0x63
-#define AML_LOCAL4 0x64
-#define AML_LOCAL5 0x65
-#define AML_LOCAL6 0x66
-#define AML_LOCAL7 0x67
-#define AML_ARG0 0x68
-#define AML_ARG1 0x69
-#define AML_ARG2 0x6a
-#define AML_ARG3 0x6b
-#define AML_ARG4 0x6c
-#define AML_ARG5 0x6d
-#define AML_ARG6 0x6e
-#define AML_STORE_OP 0x70
-#define AML_REF_OF_OP 0x71
-#define AML_ADD_OP 0x72
-#define AML_CONCAT_OP 0x73
-#define AML_SUBTRACT_OP 0x74
-#define AML_INCREMENT_OP 0x75
-#define AML_DECREMENT_OP 0x76
-#define AML_MULTIPLY_OP 0x77
-#define AML_DIVIDE_OP 0x78
-#define AML_SHIFT_LEFT_OP 0x79
-#define AML_SHIFT_RIGHT_OP 0x7a
-#define AML_AND_OP 0x7b
-#define AML_NAND_OP 0x7c
-#define AML_OR_OP 0x7d
-#define AML_NOR_OP 0x7e
-#define AML_XOR_OP 0x7f
-#define AML_NOT_OP 0x80
-#define AML_FIND_SET_LEFT_BIT_OP 0x81
-#define AML_FIND_SET_RIGHT_BIT_OP 0x82
-#define AML_DEREF_OF_OP 0x83
-#define AML_CONCAT_RES_OP 0x84
-#define AML_MOD_OP 0x85
-#define AML_NOTIFY_OP 0x86
-#define AML_SIZE_OF_OP 0x87
-#define AML_INDEX_OP 0x88
-#define AML_MATCH_OP 0x89
-#define AML_CREATE_DWORD_FIELD_OP 0x8a
-#define AML_CREATE_WORD_FIELD_OP 0x8b
-#define AML_CREATE_BYTE_FIELD_OP 0x8c
-#define AML_CREATE_BIT_FIELD_OP 0x8d
-#define AML_OBJECT_TYPE_OP 0x8e
-#define AML_CREATE_QWORD_FIELD_OP 0x8f
-#define AML_LAND_OP 0x90
-#define AML_LOR_OP 0x91
-#define AML_LNOT_OP 0x92
-#define AML_LEQUAL_OP 0x93
-#define AML_LGREATER_OP 0x94
-#define AML_LLESS_OP 0x95
-#define AML_TO_BUFFER_OP 0x96
-#define AML_TO_DEC_STRING_OP 0x97
-#define AML_TO_HEX_STRING_OP 0x98
-#define AML_TO_INTEGER_OP 0x99
-#define AML_TO_STRING_OP 0x9c
-#define AML_COPY_OBJECT_OP 0x9d
-#define AML_MID_OP 0x9e
-#define AML_CONTINUE_OP 0x9f
-#define AML_IF_OP 0xa0
-#define AML_ELSE_OP 0xa1
-#define AML_WHILE_OP 0xa2
-#define AML_NOOP_OP 0xa3
-#define AML_RETURN_OP 0xa4
-#define AML_BREAK_OP 0xa5
-#define AML_BREAK_POINT_OP 0xcc
-#define AML_ONES_OP 0xff
+#define AML_ZERO_OP 0x00
+#define AML_ONE_OP 0x01
+#define AML_ALIAS_OP 0x06
+#define AML_NAME_OP 0x08
+#define AML_BYTE_PREFIX 0x0a
+#define AML_WORD_PREFIX 0x0b
+#define AML_DWORD_PREFIX 0x0c
+#define AML_STRING_PREFIX 0x0d
+#define AML_QWORD_PREFIX 0x0e
+#define AML_SCOPE_OP 0x10
+#define AML_BUFFER_OP 0x11
+#define AML_PACKAGE_OP 0x12
+#define AML_VAR_PACKAGE_OP 0x13
+#define AML_METHOD_OP 0x14
+#define AML_EXTERNAL_OP 0x15
+#define AML_DUAL_NAME_PREFIX 0x2e
+#define AML_MULTI_NAME_PREFIX 0x2f
+#define AML_NAME_CHAR_A 0x41
+#define AML_NAME_CHAR_B 0x42
+#define AML_NAME_CHAR_C 0x43
+#define AML_NAME_CHAR_D 0x44
+#define AML_NAME_CHAR_E 0x45
+#define AML_NAME_CHAR_F 0x46
+#define AML_NAME_CHAR_G 0x47
+#define AML_NAME_CHAR_H 0x48
+#define AML_NAME_CHAR_I 0x49
+#define AML_NAME_CHAR_J 0x4a
+#define AML_NAME_CHAR_K 0x4b
+#define AML_NAME_CHAR_L 0x4c
+#define AML_NAME_CHAR_M 0x4d
+#define AML_NAME_CHAR_N 0x4e
+#define AML_NAME_CHAR_O 0x4f
+#define AML_NAME_CHAR_P 0x50
+#define AML_NAME_CHAR_Q 0x51
+#define AML_NAME_CHAR_R 0x52
+#define AML_NAME_CHAR_S 0x53
+#define AML_NAME_CHAR_T 0x54
+#define AML_NAME_CHAR_U 0x55
+#define AML_NAME_CHAR_V 0x56
+#define AML_NAME_CHAR_W 0x57
+#define AML_NAME_CHAR_X 0x58
+#define AML_NAME_CHAR_Y 0x59
+#define AML_NAME_CHAR_Z 0x5a
+#define AML_ROOT_CHAR 0x5c
+#define AML_PARENT_PREFIX_CHAR 0x5e
+#define AML_NAME_CHAR__ 0x5f
+#define AML_LOCAL0 0x60
+#define AML_LOCAL1 0x61
+#define AML_LOCAL2 0x62
+#define AML_LOCAL3 0x63
+#define AML_LOCAL4 0x64
+#define AML_LOCAL5 0x65
+#define AML_LOCAL6 0x66
+#define AML_LOCAL7 0x67
+#define AML_ARG0 0x68
+#define AML_ARG1 0x69
+#define AML_ARG2 0x6a
+#define AML_ARG3 0x6b
+#define AML_ARG4 0x6c
+#define AML_ARG5 0x6d
+#define AML_ARG6 0x6e
+#define AML_STORE_OP 0x70
+#define AML_REF_OF_OP 0x71
+#define AML_ADD_OP 0x72
+#define AML_CONCAT_OP 0x73
+#define AML_SUBTRACT_OP 0x74
+#define AML_INCREMENT_OP 0x75
+#define AML_DECREMENT_OP 0x76
+#define AML_MULTIPLY_OP 0x77
+#define AML_DIVIDE_OP 0x78
+#define AML_SHIFT_LEFT_OP 0x79
+#define AML_SHIFT_RIGHT_OP 0x7a
+#define AML_AND_OP 0x7b
+#define AML_NAND_OP 0x7c
+#define AML_OR_OP 0x7d
+#define AML_NOR_OP 0x7e
+#define AML_XOR_OP 0x7f
+#define AML_NOT_OP 0x80
+#define AML_FIND_SET_LEFT_BIT_OP 0x81
+#define AML_FIND_SET_RIGHT_BIT_OP 0x82
+#define AML_DEREF_OF_OP 0x83
+#define AML_CONCAT_RES_OP 0x84
+#define AML_MOD_OP 0x85
+#define AML_NOTIFY_OP 0x86
+#define AML_SIZE_OF_OP 0x87
+#define AML_INDEX_OP 0x88
+#define AML_MATCH_OP 0x89
+#define AML_CREATE_DWORD_FIELD_OP 0x8a
+#define AML_CREATE_WORD_FIELD_OP 0x8b
+#define AML_CREATE_BYTE_FIELD_OP 0x8c
+#define AML_CREATE_BIT_FIELD_OP 0x8d
+#define AML_OBJECT_TYPE_OP 0x8e
+#define AML_CREATE_QWORD_FIELD_OP 0x8f
+#define AML_LAND_OP 0x90
+#define AML_LOR_OP 0x91
+#define AML_LNOT_OP 0x92
+#define AML_LEQUAL_OP 0x93
+#define AML_LGREATER_OP 0x94
+#define AML_LLESS_OP 0x95
+#define AML_TO_BUFFER_OP 0x96
+#define AML_TO_DEC_STRING_OP 0x97
+#define AML_TO_HEX_STRING_OP 0x98
+#define AML_TO_INTEGER_OP 0x99
+#define AML_TO_STRING_OP 0x9c
+#define AML_COPY_OBJECT_OP 0x9d
+#define AML_MID_OP 0x9e
+#define AML_CONTINUE_OP 0x9f
+#define AML_IF_OP 0xa0
+#define AML_ELSE_OP 0xa1
+#define AML_WHILE_OP 0xa2
+#define AML_NOOP_OP 0xa3
+#define AML_RETURN_OP 0xa4
+#define AML_BREAK_OP 0xa5
+#define AML_BREAK_POINT_OP 0xcc
+#define AML_ONES_OP 0xff
//
// Extended OpCode
//
-#define AML_EXT_OP 0x5b
+#define AML_EXT_OP 0x5b
-#define AML_EXT_MUTEX_OP 0x01
-#define AML_EXT_EVENT_OP 0x02
-#define AML_EXT_COND_REF_OF_OP 0x12
-#define AML_EXT_CREATE_FIELD_OP 0x13
-#define AML_EXT_LOAD_TABLE_OP 0x1f
-#define AML_EXT_LOAD_OP 0x20
-#define AML_EXT_STALL_OP 0x21
-#define AML_EXT_SLEEP_OP 0x22
-#define AML_EXT_ACQUIRE_OP 0x23
-#define AML_EXT_SIGNAL_OP 0x24
-#define AML_EXT_WAIT_OP 0x25
-#define AML_EXT_RESET_OP 0x26
-#define AML_EXT_RELEASE_OP 0x27
-#define AML_EXT_FROM_BCD_OP 0x28
-#define AML_EXT_TO_BCD_OP 0x29
-#define AML_EXT_UNLOAD_OP 0x2a
-#define AML_EXT_REVISION_OP 0x30
-#define AML_EXT_DEBUG_OP 0x31
-#define AML_EXT_FATAL_OP 0x32
-#define AML_EXT_TIMER_OP 0x33
-#define AML_EXT_REGION_OP 0x80
-#define AML_EXT_FIELD_OP 0x81
-#define AML_EXT_DEVICE_OP 0x82
-#define AML_EXT_PROCESSOR_OP 0x83
-#define AML_EXT_POWER_RES_OP 0x84
-#define AML_EXT_THERMAL_ZONE_OP 0x85
-#define AML_EXT_INDEX_FIELD_OP 0x86
-#define AML_EXT_BANK_FIELD_OP 0x87
-#define AML_EXT_DATA_REGION_OP 0x88
+#define AML_EXT_MUTEX_OP 0x01
+#define AML_EXT_EVENT_OP 0x02
+#define AML_EXT_COND_REF_OF_OP 0x12
+#define AML_EXT_CREATE_FIELD_OP 0x13
+#define AML_EXT_LOAD_TABLE_OP 0x1f
+#define AML_EXT_LOAD_OP 0x20
+#define AML_EXT_STALL_OP 0x21
+#define AML_EXT_SLEEP_OP 0x22
+#define AML_EXT_ACQUIRE_OP 0x23
+#define AML_EXT_SIGNAL_OP 0x24
+#define AML_EXT_WAIT_OP 0x25
+#define AML_EXT_RESET_OP 0x26
+#define AML_EXT_RELEASE_OP 0x27
+#define AML_EXT_FROM_BCD_OP 0x28
+#define AML_EXT_TO_BCD_OP 0x29
+#define AML_EXT_UNLOAD_OP 0x2a
+#define AML_EXT_REVISION_OP 0x30
+#define AML_EXT_DEBUG_OP 0x31
+#define AML_EXT_FATAL_OP 0x32
+#define AML_EXT_TIMER_OP 0x33
+#define AML_EXT_REGION_OP 0x80
+#define AML_EXT_FIELD_OP 0x81
+#define AML_EXT_DEVICE_OP 0x82
+#define AML_EXT_PROCESSOR_OP 0x83
+#define AML_EXT_POWER_RES_OP 0x84
+#define AML_EXT_THERMAL_ZONE_OP 0x85
+#define AML_EXT_INDEX_FIELD_OP 0x86
+#define AML_EXT_BANK_FIELD_OP 0x87
+#define AML_EXT_DATA_REGION_OP 0x88
//
// FieldElement OpCode
//
-#define AML_FIELD_RESERVED_OP 0x00
-#define AML_FIELD_ACCESS_OP 0x01
-#define AML_FIELD_CONNECTION_OP 0x02
-#define AML_FIELD_EXT_ACCESS_OP 0x03
+#define AML_FIELD_RESERVED_OP 0x00
+#define AML_FIELD_ACCESS_OP 0x01
+#define AML_FIELD_CONNECTION_OP 0x02
+#define AML_FIELD_EXT_ACCESS_OP 0x03
+
+//
+// AML Name segment definitions
+//
+#define AML_NAME_SEG_SIZE 4
#endif
diff --git a/sys/contrib/edk2/Include/IndustryStandard/Bluetooth.h b/sys/contrib/edk2/Include/IndustryStandard/Bluetooth.h
index 96940129ff7c..c22dbff9b75f 100644
--- a/sys/contrib/edk2/Include/IndustryStandard/Bluetooth.h
+++ b/sys/contrib/edk2/Include/IndustryStandard/Bluetooth.h
@@ -19,17 +19,17 @@ typedef struct {
///
/// 48bit Bluetooth device address.
///
- UINT8 Address[6];
+ UINT8 Address[6];
} BLUETOOTH_ADDRESS;
///
/// BLUETOOTH_CLASS_OF_DEVICE. See Bluetooth specification for detail.
///
typedef struct {
- UINT8 FormatType:2;
- UINT8 MinorDeviceClass: 6;
- UINT16 MajorDeviceClass: 5;
- UINT16 MajorServiceClass:11;
+ UINT8 FormatType : 2;
+ UINT8 MinorDeviceClass : 6;
+ UINT16 MajorDeviceClass : 5;
+ UINT16 MajorServiceClass : 11;
} BLUETOOTH_CLASS_OF_DEVICE;
///
@@ -39,18 +39,18 @@ typedef struct {
///
/// 48-bit Bluetooth device address
///
- UINT8 Address[6];
+ UINT8 Address[6];
///
/// 0x00 - Public Device Address
/// 0x01 - Random Device Address
///
- UINT8 Type;
+ UINT8 Type;
} BLUETOOTH_LE_ADDRESS;
#pragma pack()
-#define BLUETOOTH_HCI_COMMAND_LOCAL_READABLE_NAME_MAX_SIZE 248
+#define BLUETOOTH_HCI_COMMAND_LOCAL_READABLE_NAME_MAX_SIZE 248
-#define BLUETOOTH_HCI_LINK_KEY_SIZE 16
+#define BLUETOOTH_HCI_LINK_KEY_SIZE 16
#endif
diff --git a/sys/contrib/edk2/Include/Library/BaseLib.h b/sys/contrib/edk2/Include/Library/BaseLib.h
index 762cb9ac3abb..4563006af3c3 100644
--- a/sys/contrib/edk2/Include/Library/BaseLib.h
+++ b/sys/contrib/edk2/Include/Library/BaseLib.h
@@ -2,10 +2,12 @@
Provides string functions, linked list functions, math functions, synchronization
functions, file path functions, and CPU architecture-specific functions.
-Copyright (c) 2006 - 2019, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2006 - 2021, Intel Corporation. All rights reserved.<BR>
Portions copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>
Copyright (c) Microsoft Corporation.<BR>
Portions Copyright (c) 2020, Hewlett Packard Enterprise Development LP. All rights reserved.<BR>
+Portions Copyright (c) 2022, Loongson Technology Corporation Limited. All rights reserved.<BR>
+Copyright (c) 2023 - 2024, Arm Limited. All rights reserved.<BR>
SPDX-License-Identifier: BSD-2-Clause-Patent
@@ -22,16 +24,16 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
/// The IA-32 architecture context buffer used by SetJump() and LongJump().
///
typedef struct {
- UINT32 Ebx;
- UINT32 Esi;
- UINT32 Edi;
- UINT32 Ebp;
- UINT32 Esp;
- UINT32 Eip;
- UINT32 Ssp;
+ UINT32 Ebx;
+ UINT32 Esi;
+ UINT32 Edi;
+ UINT32 Ebp;
+ UINT32 Esp;
+ UINT32 Eip;
+ UINT32 Ssp;
} BASE_LIBRARY_JUMP_BUFFER;
-#define BASE_LIBRARY_JUMP_BUFFER_ALIGNMENT 4
+#define BASE_LIBRARY_JUMP_BUFFER_ALIGNMENT 4
#endif // defined (MDE_CPU_IA32)
@@ -40,22 +42,22 @@ typedef struct {
/// The x64 architecture context buffer used by SetJump() and LongJump().
///
typedef struct {
- UINT64 Rbx;
- UINT64 Rsp;
- UINT64 Rbp;
- UINT64 Rdi;
- UINT64 Rsi;
- UINT64 R12;
- UINT64 R13;
- UINT64 R14;
- UINT64 R15;
- UINT64 Rip;
- UINT64 MxCsr;
- UINT8 XmmBuffer[160]; ///< XMM6-XMM15.
- UINT64 Ssp;
+ UINT64 Rbx;
+ UINT64 Rsp;
+ UINT64 Rbp;
+ UINT64 Rdi;
+ UINT64 Rsi;
+ UINT64 R12;
+ UINT64 R13;
+ UINT64 R14;
+ UINT64 R15;
+ UINT64 Rip;
+ UINT64 MxCsr;
+ UINT8 XmmBuffer[160]; ///< XMM6-XMM15.
+ UINT64 Ssp;
} BASE_LIBRARY_JUMP_BUFFER;
-#define BASE_LIBRARY_JUMP_BUFFER_ALIGNMENT 8
+#define BASE_LIBRARY_JUMP_BUFFER_ALIGNMENT 8
#endif // defined (MDE_CPU_X64)
@@ -64,14 +66,14 @@ typedef struct {
/// The EBC context buffer used by SetJump() and LongJump().
///
typedef struct {
- UINT64 R0;
- UINT64 R1;
- UINT64 R2;
- UINT64 R3;
- UINT64 IP;
+ UINT64 R0;
+ UINT64 R1;
+ UINT64 R2;
+ UINT64 R3;
+ UINT64 IP;
} BASE_LIBRARY_JUMP_BUFFER;
-#define BASE_LIBRARY_JUMP_BUFFER_ALIGNMENT 8
+#define BASE_LIBRARY_JUMP_BUFFER_ALIGNMENT 8
#endif // defined (MDE_CPU_EBC)
@@ -91,9 +93,9 @@ typedef struct {
UINT32 R14;
} BASE_LIBRARY_JUMP_BUFFER;
-#define BASE_LIBRARY_JUMP_BUFFER_ALIGNMENT 4
+#define BASE_LIBRARY_JUMP_BUFFER_ALIGNMENT 4
-#endif // defined (MDE_CPU_ARM)
+#endif // defined (MDE_CPU_ARM)
#if defined (MDE_CPU_AARCH64)
typedef struct {
@@ -123,40 +125,482 @@ typedef struct {
UINT64 D15;
} BASE_LIBRARY_JUMP_BUFFER;
-#define BASE_LIBRARY_JUMP_BUFFER_ALIGNMENT 8
+#define BASE_LIBRARY_JUMP_BUFFER_ALIGNMENT 8
-#endif // defined (MDE_CPU_AARCH64)
+/**
+ Reads the current value of CNTPCT_EL0 register.
+
+ Reads and returns the current value of CNTPCT_EL0.
+ This function is only available on AARCH64.
+
+ @return The current value of CNTPCT_EL0
+**/
+UINT64
+EFIAPI
+ArmReadCntPctReg (
+ VOID
+ );
+
+//
+// Bit shifts for the ID_AA64ISAR0_EL1 register.
+//
+#define ARM_ID_AA64ISAR0_EL1_AES_SHIFT (4U)
+#define ARM_ID_AA64ISAR0_EL1_SHA1_SHIFT (8U)
+#define ARM_ID_AA64ISAR0_EL1_SHA2_SHIFT (12U)
+#define ARM_ID_AA64ISAR0_EL1_CRC32_SHIFT (16U)
+#define ARM_ID_AA64ISAR0_EL1_ATOMIC_SHIFT (20U)
+#define ARM_ID_AA64ISAR0_EL1_RDM_SHIFT (28U)
+#define ARM_ID_AA64ISAR0_EL1_SHA3_SHIFT (32U)
+#define ARM_ID_AA64ISAR0_EL1_SM3_SHIFT (36U)
+#define ARM_ID_AA64ISAR0_EL1_SM4_SHIFT (40U)
+#define ARM_ID_AA64ISAR0_EL1_DP_SHIFT (44U)
+#define ARM_ID_AA64ISAR0_EL1_FHM_SHIFT (48U)
+#define ARM_ID_AA64ISAR0_EL1_TS_SHIFT (52U)
+#define ARM_ID_AA64ISAR0_EL1_TLB_SHIFT (56U)
+#define ARM_ID_AA64ISAR0_EL1_RNDR_SHIFT (60U)
+
+//
+// Bit masks for the ID_AA64ISAR0_EL1 fields.
+//
+#define ARM_ID_AA64ISAR0_EL1_AES_MASK (0xFU)
+#define ARM_ID_AA64ISAR0_EL1_SHA1_MASK (0xFU)
+#define ARM_ID_AA64ISAR0_EL1_SHA2_MASK (0xFU)
+#define ARM_ID_AA64ISAR0_EL1_CRC32_MASK (0xFU)
+#define ARM_ID_AA64ISAR0_EL1_ATOMIC_MASK (0xFU)
+#define ARM_ID_AA64ISAR0_EL1_RDM_MASK (0xFU)
+#define ARM_ID_AA64ISAR0_EL1_SHA3_MASK (0xFU)
+#define ARM_ID_AA64ISAR0_EL1_SM3_MASK (0xFU)
+#define ARM_ID_AA64ISAR0_EL1_SM4_MASK (0xFU)
+#define ARM_ID_AA64ISAR0_EL1_DP_MASK (0xFU)
+#define ARM_ID_AA64ISAR0_EL1_FHM_MASK (0xFU)
+#define ARM_ID_AA64ISAR0_EL1_TS_MASK (0xFU)
+#define ARM_ID_AA64ISAR0_EL1_TLB_MASK (0xFU)
+#define ARM_ID_AA64ISAR0_EL1_RNDR_MASK (0xFU)
+
+//
+// Bit masks for the ID_AA64ISAR0_EL1 field values.
+//
+#define ARM_ID_AA64ISAR0_EL1_AES_FEAT_AES_MASK (0x1U)
+#define ARM_ID_AA64ISAR0_EL1_AES_FEAT_PMULL_MASK (0x2U)
+#define ARM_ID_AA64ISAR0_EL1_SHA1_FEAT_SHA1_MASK (0x1U)
+#define ARM_ID_AA64ISAR0_EL1_SHA2_FEAT_SHA256_MASK (0x1U)
+#define ARM_ID_AA64ISAR0_EL1_SHA2_FEAT_SHA512_MASK (0x2U)
+#define ARM_ID_AA64ISAR0_EL1_CRC32_HAVE_CRC32_MASK (0x1U)
+#define ARM_ID_AA64ISAR0_EL1_ATOMIC_FEAT_LSE_MASK (0x2U)
+#define ARM_ID_AA64ISAR0_EL1_RDM_FEAT_RDM_MASK (0x1U)
+#define ARM_ID_AA64ISAR0_EL1_SHA3_FEAT_SHA3_MASK (0x1U)
+#define ARM_ID_AA64ISAR0_EL1_SM3_FEAT_SM3_MASK (0x1U)
+#define ARM_ID_AA64ISAR0_EL1_SM4_FEAT_SM4_MASK (0x1U)
+#define ARM_ID_AA64ISAR0_EL1_DP_FEAT_DOTPROD_MASK (0x1U)
+#define ARM_ID_AA64ISAR0_EL1_FHM_FEAT_FHM_MASK (0x1U)
+#define ARM_ID_AA64ISAR0_EL1_TS_FEAT_FLAGM_MASK (0x1U)
+#define ARM_ID_AA64ISAR0_EL1_TS_FEAT_FLAGM2_MASK (0x2U)
+#define ARM_ID_AA64ISAR0_EL1_TLB_FEAT_TLBIOS_MASK (0x1U)
+#define ARM_ID_AA64ISAR0_EL1_TLB_FEAT_TLBIRANGE_MASK (0x2U)
+#define ARM_ID_AA64ISAR0_EL1_RNDR_FEAT_RNG_MASK (0x1U)
+
+/**
+ Reads the current value of ID_AA64ISAR0_EL1 register.
+
+ Reads and returns the current value of ID_AA64ISAR0_EL1.
+ This function is only available on AARCH64.
+
+ @return The current value of ID_AA64ISAR0_EL1
+**/
+UINT64
+EFIAPI
+ArmReadIdAA64Isar0Reg (
+ VOID
+ );
+
+#endif // defined (MDE_CPU_AARCH64)
#if defined (MDE_CPU_RISCV64)
///
/// The RISC-V architecture context buffer used by SetJump() and LongJump().
///
typedef struct {
- UINT64 RA;
- UINT64 S0;
- UINT64 S1;
- UINT64 S2;
- UINT64 S3;
- UINT64 S4;
- UINT64 S5;
- UINT64 S6;
- UINT64 S7;
- UINT64 S8;
- UINT64 S9;
- UINT64 S10;
- UINT64 S11;
- UINT64 SP;
+ UINT64 RA;
+ UINT64 S0;
+ UINT64 S1;
+ UINT64 S2;
+ UINT64 S3;
+ UINT64 S4;
+ UINT64 S5;
+ UINT64 S6;
+ UINT64 S7;
+ UINT64 S8;
+ UINT64 S9;
+ UINT64 S10;
+ UINT64 S11;
+ UINT64 SP;
} BASE_LIBRARY_JUMP_BUFFER;
-#define BASE_LIBRARY_JUMP_BUFFER_ALIGNMENT 8
+#define BASE_LIBRARY_JUMP_BUFFER_ALIGNMENT 8
+
+VOID
+RiscVSetSupervisorScratch (
+ IN UINT64
+ );
+
+UINT64
+RiscVGetSupervisorScratch (
+ VOID
+ );
+
+VOID
+RiscVSetSupervisorStvec (
+ IN UINT64
+ );
+
+UINT64
+RiscVGetSupervisorStvec (
+ VOID
+ );
+
+UINT64
+RiscVGetSupervisorTrapCause (
+ VOID
+ );
+
+VOID
+RiscVSetSupervisorAddressTranslationRegister (
+ IN UINT64
+ );
+
+UINT64
+RiscVGetSupervisorAddressTranslationRegister (
+ VOID
+ );
+
+UINT64
+RiscVReadTimer (
+ VOID
+ );
+
+VOID
+RiscVSetSupervisorTimeCompareRegister (
+ IN UINT64
+ );
+
+VOID
+RiscVEnableTimerInterrupt (
+ VOID
+ );
+
+VOID
+RiscVDisableTimerInterrupt (
+ VOID
+ );
+
+VOID
+RiscVClearPendingTimerInterrupt (
+ VOID
+ );
+
+/**
+ RISC-V invalidate instruction cache.
+
+**/
+VOID
+EFIAPI
+RiscVInvalidateInstCacheFenceAsm (
+ VOID
+ );
+
+/**
+ RISC-V invalidate data cache.
+
+**/
+VOID
+EFIAPI
+RiscVInvalidateDataCacheFenceAsm (
+ VOID
+ );
+
+/**
+ RISC-V flush cache block. Atomically perform a clean operation
+ followed by an invalidate operation
+
+**/
+VOID
+EFIAPI
+RiscVCpuCacheFlushCmoAsm (
+ IN UINTN
+ );
+
+/**
+Perform a write transfer to another cache or to memory if the
+data in the copy of the cache block have been modified by a store
+operation
+
+**/
+VOID
+EFIAPI
+RiscVCpuCacheCleanCmoAsm (
+ IN UINTN
+ );
+
+/**
+Deallocate the copy of the cache block
+
+**/
+VOID
+EFIAPI
+RiscVCpuCacheInvalCmoAsm (
+ IN UINTN
+ );
#endif // defined (MDE_CPU_RISCV64)
+#if defined (MDE_CPU_LOONGARCH64)
+///
+/// The LoongArch architecture context buffer used by SetJump() and LongJump()
+///
+typedef struct {
+ UINT64 S0;
+ UINT64 S1;
+ UINT64 S2;
+ UINT64 S3;
+ UINT64 S4;
+ UINT64 S5;
+ UINT64 S6;
+ UINT64 S7;
+ UINT64 S8;
+ UINT64 SP;
+ UINT64 FP;
+ UINT64 RA;
+} BASE_LIBRARY_JUMP_BUFFER;
+
+#define BASE_LIBRARY_JUMP_BUFFER_ALIGNMENT 8
+
+/*
+ * Set the exception base address for LoongArch.
+ *
+ * @param ExceptionBaseAddress The exception base address, must be aligned greater than or qeual to 4K .
+ */
+VOID
+SetExceptionBaseAddress (
+ IN UINT64
+ );
+
+/*
+ * Set the TlbRebase address for LoongArch.
+ *
+ * @param TlbRebaseAddress The TlbRebase address, must be aligned greater than or qeual to 4K .
+ */
+VOID
+SetTlbRebaseAddress (
+ IN UINT64
+ );
+
+/**
+ Enables local CPU interrupts.
+
+ @param Needs to enable local interrupt bit.
+**/
+VOID
+EnableLocalInterrupts (
+ IN UINT16
+ );
+
+/**
+ Disables local CPU interrupts.
+
+ @param Needs to disable local interrupt bit.
+**/
+VOID
+DisableLocalInterrupts (
+ IN UINT16
+ );
+
+/**
+ Read CPUCFG register.
+
+ @param Index Specifies the register number of the CPUCFG to read the data.
+ @param Data A pointer to the variable used to store the CPUCFG register value.
+**/
+VOID
+AsmCpucfg (
+ IN UINT32 Index,
+ OUT UINT32 *Data
+ );
+
+/**
+ Gets the timer count value.
+
+ @param[] VOID
+ @retval timer count value.
+
+**/
+UINTN
+AsmReadStableCounter (
+ VOID
+ );
+
+/**
+ CSR read operation.
+
+ @param[in] Select CSR read instruction select values.
+
+ @return The return value of csrrd instruction, return -1 means no CSR instruction
+ is found.
+**/
+UINTN
+CsrRead (
+ IN UINT16 Select
+ );
+
+/**
+ CSR write operation.
+
+ @param[in] Select CSR write instruction select values.
+ @param[in] Value The csrwr will write the value.
+
+ @return The return value of csrwr instruction, that is, store the old value of
+ the register, return -1 means no CSR instruction is found.
+**/
+UINTN
+CsrWrite (
+ IN UINT16 Select,
+ IN UINTN Value
+ );
+
+/**
+ CSR exchange operation.
+
+ @param[in] Select CSR exchange instruction select values.
+ @param[in] Value The csrxchg will write the value.
+ @param[in] Mask The csrxchg mask value.
+
+ @return The return value of csrxchg instruction, that is, store the old value of
+ the register, return -1 means no CSR instruction is found.
+**/
+UINTN
+CsrXChg (
+ IN UINT16 Select,
+ IN UINTN Value,
+ IN UINTN Mask
+ );
+
+/**
+ IO CSR read byte operation.
+
+ @param[in] Select IO CSR read instruction select values.
+
+ @return The return value of iocsrrd.b instruction.
+
+**/
+UINT8
+IoCsrRead8 (
+ IN UINTN Select
+ );
+
+/**
+ IO CSR read half word operation.
+
+ @param[in] Select IO CSR read instruction select values.
+
+ @return The return value of iocsrrd.h instruction.
+
+**/
+UINT16
+IoCsrRead16 (
+ IN UINTN Select
+ );
+
+/**
+ IO CSR read word operation.
+
+ @param[in] Select IO CSR read instruction select values.
+
+ @return The return value of iocsrrd.w instruction.
+
+**/
+UINT32
+IoCsrRead32 (
+ IN UINTN Select
+ );
+
+/**
+ IO CSR read double word operation. Only for LoongArch64.
+
+ @param[in] Select IO CSR read instruction select values.
+
+ @return The return value of iocsrrd.d instruction.
+
+**/
+UINT64
+IoCsrRead64 (
+ IN UINTN Select
+ );
+
+/**
+ IO CSR write byte operation.
+
+ @param[in] Select IO CSR write instruction select values.
+ @param[in] Value The iocsrwr.b will write the value.
+
+ @return VOID.
+
+**/
+VOID
+IoCsrWrite8 (
+ IN UINTN Select,
+ IN UINT8 Value
+ );
+
+/**
+ IO CSR write half word operation.
+
+ @param[in] Select IO CSR write instruction select values.
+ @param[in] Value The iocsrwr.h will write the value.
+
+ @return VOID.
+
+**/
+VOID
+IoCsrWrite16 (
+ IN UINTN Select,
+ IN UINT16 Value
+ );
+
+/**
+ IO CSR write word operation.
+
+ @param[in] Select IO CSR write instruction select values.
+ @param[in] Value The iocsrwr.w will write the value.
+
+ @return VOID.
+
+**/
+VOID
+IoCsrWrite32 (
+ IN UINTN Select,
+ IN UINT32 Value
+ );
+
+/**
+ IO CSR write double word operation. Only for LoongArch64.
+
+ @param[in] Select IO CSR write instruction select values.
+ @param[in] Value The iocsrwr.d will write the value.
+
+ @return VOID.
+
+**/
+VOID
+IoCsrWrite64 (
+ IN UINTN Select,
+ IN UINT64 Value
+ );
+
+#endif // defined (MDE_CPU_LOONGARCH64)
+
//
// String Services
//
-
/**
Returns the length of a Null-terminated Unicode string.
@@ -176,8 +620,8 @@ typedef struct {
UINTN
EFIAPI
StrnLenS (
- IN CONST CHAR16 *String,
- IN UINTN MaxSize
+ IN CONST CHAR16 *String,
+ IN UINTN MaxSize
);
/**
@@ -204,8 +648,8 @@ StrnLenS (
UINTN
EFIAPI
StrnSizeS (
- IN CONST CHAR16 *String,
- IN UINTN MaxSize
+ IN CONST CHAR16 *String,
+ IN UINTN MaxSize
);
/**
@@ -237,9 +681,9 @@ StrnSizeS (
RETURN_STATUS
EFIAPI
StrCpyS (
- OUT CHAR16 *Destination,
- IN UINTN DestMax,
- IN CONST CHAR16 *Source
+ OUT CHAR16 *Destination,
+ IN UINTN DestMax,
+ IN CONST CHAR16 *Source
);
/**
@@ -274,10 +718,10 @@ StrCpyS (
RETURN_STATUS
EFIAPI
StrnCpyS (
- OUT CHAR16 *Destination,
- IN UINTN DestMax,
- IN CONST CHAR16 *Source,
- IN UINTN Length
+ OUT CHAR16 *Destination,
+ IN UINTN DestMax,
+ IN CONST CHAR16 *Source,
+ IN UINTN Length
);
/**
@@ -312,9 +756,9 @@ StrnCpyS (
RETURN_STATUS
EFIAPI
StrCatS (
- IN OUT CHAR16 *Destination,
- IN UINTN DestMax,
- IN CONST CHAR16 *Source
+ IN OUT CHAR16 *Destination,
+ IN UINTN DestMax,
+ IN CONST CHAR16 *Source
);
/**
@@ -352,10 +796,10 @@ StrCatS (
RETURN_STATUS
EFIAPI
StrnCatS (
- IN OUT CHAR16 *Destination,
- IN UINTN DestMax,
- IN CONST CHAR16 *Source,
- IN UINTN Length
+ IN OUT CHAR16 *Destination,
+ IN UINTN DestMax,
+ IN CONST CHAR16 *Source,
+ IN UINTN Length
);
/**
@@ -404,9 +848,9 @@ StrnCatS (
RETURN_STATUS
EFIAPI
StrDecimalToUintnS (
- IN CONST CHAR16 *String,
- OUT CHAR16 **EndPointer, OPTIONAL
- OUT UINTN *Data
+ IN CONST CHAR16 *String,
+ OUT CHAR16 **EndPointer OPTIONAL,
+ OUT UINTN *Data
);
/**
@@ -455,9 +899,9 @@ StrDecimalToUintnS (
RETURN_STATUS
EFIAPI
StrDecimalToUint64S (
- IN CONST CHAR16 *String,
- OUT CHAR16 **EndPointer, OPTIONAL
- OUT UINT64 *Data
+ IN CONST CHAR16 *String,
+ OUT CHAR16 **EndPointer OPTIONAL,
+ OUT UINT64 *Data
);
/**
@@ -511,9 +955,9 @@ StrDecimalToUint64S (
RETURN_STATUS
EFIAPI
StrHexToUintnS (
- IN CONST CHAR16 *String,
- OUT CHAR16 **EndPointer, OPTIONAL
- OUT UINTN *Data
+ IN CONST CHAR16 *String,
+ OUT CHAR16 **EndPointer OPTIONAL,
+ OUT UINTN *Data
);
/**
@@ -567,9 +1011,9 @@ StrHexToUintnS (
RETURN_STATUS
EFIAPI
StrHexToUint64S (
- IN CONST CHAR16 *String,
- OUT CHAR16 **EndPointer, OPTIONAL
- OUT UINT64 *Data
+ IN CONST CHAR16 *String,
+ OUT CHAR16 **EndPointer OPTIONAL,
+ OUT UINT64 *Data
);
/**
@@ -589,8 +1033,8 @@ StrHexToUint64S (
UINTN
EFIAPI
AsciiStrnLenS (
- IN CONST CHAR8 *String,
- IN UINTN MaxSize
+ IN CONST CHAR8 *String,
+ IN UINTN MaxSize
);
/**
@@ -615,8 +1059,8 @@ AsciiStrnLenS (
UINTN
EFIAPI
AsciiStrnSizeS (
- IN CONST CHAR8 *String,
- IN UINTN MaxSize
+ IN CONST CHAR8 *String,
+ IN UINTN MaxSize
);
/**
@@ -801,9 +1245,9 @@ AsciiStrnCatS (
RETURN_STATUS
EFIAPI
AsciiStrDecimalToUintnS (
- IN CONST CHAR8 *String,
- OUT CHAR8 **EndPointer, OPTIONAL
- OUT UINTN *Data
+ IN CONST CHAR8 *String,
+ OUT CHAR8 **EndPointer OPTIONAL,
+ OUT UINTN *Data
);
/**
@@ -850,9 +1294,9 @@ AsciiStrDecimalToUintnS (
RETURN_STATUS
EFIAPI
AsciiStrDecimalToUint64S (
- IN CONST CHAR8 *String,
- OUT CHAR8 **EndPointer, OPTIONAL
- OUT UINT64 *Data
+ IN CONST CHAR8 *String,
+ OUT CHAR8 **EndPointer OPTIONAL,
+ OUT UINT64 *Data
);
/**
@@ -903,9 +1347,9 @@ AsciiStrDecimalToUint64S (
RETURN_STATUS
EFIAPI
AsciiStrHexToUintnS (
- IN CONST CHAR8 *String,
- OUT CHAR8 **EndPointer, OPTIONAL
- OUT UINTN *Data
+ IN CONST CHAR8 *String,
+ OUT CHAR8 **EndPointer OPTIONAL,
+ OUT UINTN *Data
);
/**
@@ -956,88 +1400,11 @@ AsciiStrHexToUintnS (
RETURN_STATUS
EFIAPI
AsciiStrHexToUint64S (
- IN CONST CHAR8 *String,
- OUT CHAR8 **EndPointer, OPTIONAL
- OUT UINT64 *Data
+ IN CONST CHAR8 *String,
+ OUT CHAR8 **EndPointer OPTIONAL,
+ OUT UINT64 *Data
);
-
-#ifndef DISABLE_NEW_DEPRECATED_INTERFACES
-
-/**
- [ATTENTION] This function is deprecated for security reason.
-
- Copies one Null-terminated Unicode string to another Null-terminated Unicode
- string and returns the new Unicode string.
-
- This function copies the contents of the Unicode string Source to the Unicode
- string Destination, and returns Destination. If Source and Destination
- overlap, then the results are undefined.
-
- If Destination is NULL, then ASSERT().
- If Destination is not aligned on a 16-bit boundary, then ASSERT().
- If Source is NULL, then ASSERT().
- If Source is not aligned on a 16-bit boundary, then ASSERT().
- If Source and Destination overlap, then ASSERT().
- If PcdMaximumUnicodeStringLength is not zero, and Source contains more than
- PcdMaximumUnicodeStringLength Unicode characters not including the
- Null-terminator, then ASSERT().
-
- @param Destination The pointer to a Null-terminated Unicode string.
- @param Source The pointer to a Null-terminated Unicode string.
-
- @return Destination.
-
-**/
-CHAR16 *
-EFIAPI
-StrCpy (
- OUT CHAR16 *Destination,
- IN CONST CHAR16 *Source
- );
-
-
-/**
- [ATTENTION] This function is deprecated for security reason.
-
- Copies up to a specified length from one Null-terminated Unicode string to
- another Null-terminated Unicode string and returns the new Unicode string.
-
- This function copies the contents of the Unicode string Source to the Unicode
- string Destination, and returns Destination. At most, Length Unicode
- characters are copied from Source to Destination. If Length is 0, then
- Destination is returned unmodified. If Length is greater that the number of
- Unicode characters in Source, then Destination is padded with Null Unicode
- characters. If Source and Destination overlap, then the results are
- undefined.
-
- If Length > 0 and Destination is NULL, then ASSERT().
- If Length > 0 and Destination is not aligned on a 16-bit boundary, then ASSERT().
- If Length > 0 and Source is NULL, then ASSERT().
- If Length > 0 and Source is not aligned on a 16-bit boundary, then ASSERT().
- If Source and Destination overlap, then ASSERT().
- If PcdMaximumUnicodeStringLength is not zero, and Length is greater than
- PcdMaximumUnicodeStringLength, then ASSERT().
- If PcdMaximumUnicodeStringLength is not zero, and Source contains more than
- PcdMaximumUnicodeStringLength Unicode characters, not including the Null-terminator,
- then ASSERT().
-
- @param Destination The pointer to a Null-terminated Unicode string.
- @param Source The pointer to a Null-terminated Unicode string.
- @param Length The maximum number of Unicode characters to copy.
-
- @return Destination.
-
-**/
-CHAR16 *
-EFIAPI
-StrnCpy (
- OUT CHAR16 *Destination,
- IN CONST CHAR16 *Source,
- IN UINTN Length
- );
-#endif // !defined (DISABLE_NEW_DEPRECATED_INTERFACES)
-
/**
Returns the length of a Null-terminated Unicode string.
@@ -1058,10 +1425,9 @@ StrnCpy (
UINTN
EFIAPI
StrLen (
- IN CONST CHAR16 *String
+ IN CONST CHAR16 *String
);
-
/**
Returns the size of a Null-terminated Unicode string in bytes, including the
Null terminator.
@@ -1083,10 +1449,9 @@ StrLen (
UINTN
EFIAPI
StrSize (
- IN CONST CHAR16 *String
+ IN CONST CHAR16 *String
);
-
/**
Compares two Null-terminated Unicode strings, and returns the difference
between the first mismatched Unicode characters.
@@ -1118,11 +1483,10 @@ StrSize (
INTN
EFIAPI
StrCmp (
- IN CONST CHAR16 *FirstString,
- IN CONST CHAR16 *SecondString
+ IN CONST CHAR16 *FirstString,
+ IN CONST CHAR16 *SecondString
);
-
/**
Compares up to a specified length the contents of two Null-terminated Unicode strings,
and returns the difference between the first mismatched Unicode characters.
@@ -1158,105 +1522,11 @@ StrCmp (
INTN
EFIAPI
StrnCmp (
- IN CONST CHAR16 *FirstString,
- IN CONST CHAR16 *SecondString,
- IN UINTN Length
- );
-
-
-#ifndef DISABLE_NEW_DEPRECATED_INTERFACES
-
-/**
- [ATTENTION] This function is deprecated for security reason.
-
- Concatenates one Null-terminated Unicode string to another Null-terminated
- Unicode string, and returns the concatenated Unicode string.
-
- This function concatenates two Null-terminated Unicode strings. The contents
- of Null-terminated Unicode string Source are concatenated to the end of
- Null-terminated Unicode string Destination. The Null-terminated concatenated
- Unicode String is returned. If Source and Destination overlap, then the
- results are undefined.
-
- If Destination is NULL, then ASSERT().
- If Destination is not aligned on a 16-bit boundary, then ASSERT().
- If Source is NULL, then ASSERT().
- If Source is not aligned on a 16-bit boundary, then ASSERT().
- If Source and Destination overlap, then ASSERT().
- If PcdMaximumUnicodeStringLength is not zero, and Destination contains more
- than PcdMaximumUnicodeStringLength Unicode characters, not including the
- Null-terminator, then ASSERT().
- If PcdMaximumUnicodeStringLength is not zero, and Source contains more than
- PcdMaximumUnicodeStringLength Unicode characters, not including the
- Null-terminator, then ASSERT().
- If PcdMaximumUnicodeStringLength is not zero, and concatenating Destination
- and Source results in a Unicode string with more than
- PcdMaximumUnicodeStringLength Unicode characters, not including the
- Null-terminator, then ASSERT().
-
- @param Destination The pointer to a Null-terminated Unicode string.
- @param Source The pointer to a Null-terminated Unicode string.
-
- @return Destination.
-
-**/
-CHAR16 *
-EFIAPI
-StrCat (
- IN OUT CHAR16 *Destination,
- IN CONST CHAR16 *Source
+ IN CONST CHAR16 *FirstString,
+ IN CONST CHAR16 *SecondString,
+ IN UINTN Length
);
-
-/**
- [ATTENTION] This function is deprecated for security reason.
-
- Concatenates up to a specified length one Null-terminated Unicode to the end
- of another Null-terminated Unicode string, and returns the concatenated
- Unicode string.
-
- This function concatenates two Null-terminated Unicode strings. The contents
- of Null-terminated Unicode string Source are concatenated to the end of
- Null-terminated Unicode string Destination, and Destination is returned. At
- most, Length Unicode characters are concatenated from Source to the end of
- Destination, and Destination is always Null-terminated. If Length is 0, then
- Destination is returned unmodified. If Source and Destination overlap, then
- the results are undefined.
-
- If Destination is NULL, then ASSERT().
- If Length > 0 and Destination is not aligned on a 16-bit boundary, then ASSERT().
- If Length > 0 and Source is NULL, then ASSERT().
- If Length > 0 and Source is not aligned on a 16-bit boundary, then ASSERT().
- If Source and Destination overlap, then ASSERT().
- If PcdMaximumUnicodeStringLength is not zero, and Length is greater than
- PcdMaximumUnicodeStringLength, then ASSERT().
- If PcdMaximumUnicodeStringLength is not zero, and Destination contains more
- than PcdMaximumUnicodeStringLength Unicode characters, not including the
- Null-terminator, then ASSERT().
- If PcdMaximumUnicodeStringLength is not zero, and Source contains more than
- PcdMaximumUnicodeStringLength Unicode characters, not including the
- Null-terminator, then ASSERT().
- If PcdMaximumUnicodeStringLength is not zero, and concatenating Destination
- and Source results in a Unicode string with more than PcdMaximumUnicodeStringLength
- Unicode characters, not including the Null-terminator, then ASSERT().
-
- @param Destination The pointer to a Null-terminated Unicode string.
- @param Source The pointer to a Null-terminated Unicode string.
- @param Length The maximum number of Unicode characters to concatenate from
- Source.
-
- @return Destination.
-
-**/
-CHAR16 *
-EFIAPI
-StrnCat (
- IN OUT CHAR16 *Destination,
- IN CONST CHAR16 *Source,
- IN UINTN Length
- );
-#endif // !defined (DISABLE_NEW_DEPRECATED_INTERFACES)
-
/**
Returns the first occurrence of a Null-terminated Unicode sub-string
in a Null-terminated Unicode string.
@@ -1285,8 +1555,8 @@ StrnCat (
CHAR16 *
EFIAPI
StrStr (
- IN CONST CHAR16 *String,
- IN CONST CHAR16 *SearchString
+ IN CONST CHAR16 *String,
+ IN CONST CHAR16 *SearchString
);
/**
@@ -1326,7 +1596,7 @@ StrStr (
UINTN
EFIAPI
StrDecimalToUintn (
- IN CONST CHAR16 *String
+ IN CONST CHAR16 *String
);
/**
@@ -1366,10 +1636,9 @@ StrDecimalToUintn (
UINT64
EFIAPI
StrDecimalToUint64 (
- IN CONST CHAR16 *String
+ IN CONST CHAR16 *String
);
-
/**
Convert a Null-terminated Unicode hexadecimal string to a value of type UINTN.
@@ -1408,10 +1677,9 @@ StrDecimalToUint64 (
UINTN
EFIAPI
StrHexToUintn (
- IN CONST CHAR16 *String
+ IN CONST CHAR16 *String
);
-
/**
Convert a Null-terminated Unicode hexadecimal string to a value of type UINT64.
@@ -1450,7 +1718,7 @@ StrHexToUintn (
UINT64
EFIAPI
StrHexToUint64 (
- IN CONST CHAR16 *String
+ IN CONST CHAR16 *String
);
/**
@@ -1506,10 +1774,10 @@ StrHexToUint64 (
RETURN_STATUS
EFIAPI
StrToIpv6Address (
- IN CONST CHAR16 *String,
- OUT CHAR16 **EndPointer, OPTIONAL
- OUT IPv6_ADDRESS *Address,
- OUT UINT8 *PrefixLength OPTIONAL
+ IN CONST CHAR16 *String,
+ OUT CHAR16 **EndPointer OPTIONAL,
+ OUT IPv6_ADDRESS *Address,
+ OUT UINT8 *PrefixLength OPTIONAL
);
/**
@@ -1556,10 +1824,10 @@ StrToIpv6Address (
RETURN_STATUS
EFIAPI
StrToIpv4Address (
- IN CONST CHAR16 *String,
- OUT CHAR16 **EndPointer, OPTIONAL
- OUT IPv4_ADDRESS *Address,
- OUT UINT8 *PrefixLength OPTIONAL
+ IN CONST CHAR16 *String,
+ OUT CHAR16 **EndPointer OPTIONAL,
+ OUT IPv4_ADDRESS *Address,
+ OUT UINT8 *PrefixLength OPTIONAL
);
#define GUID_STRING_LENGTH 36
@@ -1609,8 +1877,8 @@ StrToIpv4Address (
RETURN_STATUS
EFIAPI
StrToGuid (
- IN CONST CHAR16 *String,
- OUT GUID *Guid
+ IN CONST CHAR16 *String,
+ OUT GUID *Guid
);
/**
@@ -1649,58 +1917,12 @@ StrToGuid (
RETURN_STATUS
EFIAPI
StrHexToBytes (
- IN CONST CHAR16 *String,
- IN UINTN Length,
- OUT UINT8 *Buffer,
- IN UINTN MaxBufferSize
+ IN CONST CHAR16 *String,
+ IN UINTN Length,
+ OUT UINT8 *Buffer,
+ IN UINTN MaxBufferSize
);
-#ifndef DISABLE_NEW_DEPRECATED_INTERFACES
-
-/**
- [ATTENTION] This function is deprecated for security reason.
-
- Convert a Null-terminated Unicode string to a Null-terminated
- ASCII string and returns the ASCII string.
-
- This function converts the content of the Unicode string Source
- to the ASCII string Destination by copying the lower 8 bits of
- each Unicode character. It returns Destination.
-
- The caller is responsible to make sure Destination points to a buffer with size
- equal or greater than ((StrLen (Source) + 1) * sizeof (CHAR8)) in bytes.
-
- If any Unicode characters in Source contain non-zero value in
- the upper 8 bits, then ASSERT().
-
- If Destination is NULL, then ASSERT().
- If Source is NULL, then ASSERT().
- If Source is not aligned on a 16-bit boundary, then ASSERT().
- If Source and Destination overlap, then ASSERT().
-
- If PcdMaximumUnicodeStringLength is not zero, and Source contains
- more than PcdMaximumUnicodeStringLength Unicode characters not including
- the Null-terminator, then ASSERT().
-
- If PcdMaximumAsciiStringLength is not zero, and Source contains more
- than PcdMaximumAsciiStringLength Unicode characters not including the
- Null-terminator, then ASSERT().
-
- @param Source The pointer to a Null-terminated Unicode string.
- @param Destination The pointer to a Null-terminated ASCII string.
-
- @return Destination.
-
-**/
-CHAR8 *
-EFIAPI
-UnicodeStrToAsciiStr (
- IN CONST CHAR16 *Source,
- OUT CHAR8 *Destination
- );
-
-#endif // !defined (DISABLE_NEW_DEPRECATED_INTERFACES)
-
/**
Convert a Null-terminated Unicode string to a Null-terminated
ASCII string.
@@ -1744,9 +1966,9 @@ UnicodeStrToAsciiStr (
RETURN_STATUS
EFIAPI
UnicodeStrToAsciiStrS (
- IN CONST CHAR16 *Source,
- OUT CHAR8 *Destination,
- IN UINTN DestMax
+ IN CONST CHAR16 *Source,
+ OUT CHAR8 *Destination,
+ IN UINTN DestMax
);
/**
@@ -1795,84 +2017,13 @@ UnicodeStrToAsciiStrS (
RETURN_STATUS
EFIAPI
UnicodeStrnToAsciiStrS (
- IN CONST CHAR16 *Source,
- IN UINTN Length,
- OUT CHAR8 *Destination,
- IN UINTN DestMax,
- OUT UINTN *DestinationLength
+ IN CONST CHAR16 *Source,
+ IN UINTN Length,
+ OUT CHAR8 *Destination,
+ IN UINTN DestMax,
+ OUT UINTN *DestinationLength
);
-#ifndef DISABLE_NEW_DEPRECATED_INTERFACES
-
-/**
- [ATTENTION] This function is deprecated for security reason.
-
- Copies one Null-terminated ASCII string to another Null-terminated ASCII
- string and returns the new ASCII string.
-
- This function copies the contents of the ASCII string Source to the ASCII
- string Destination, and returns Destination. If Source and Destination
- overlap, then the results are undefined.
-
- If Destination is NULL, then ASSERT().
- If Source is NULL, then ASSERT().
- If Source and Destination overlap, then ASSERT().
- If PcdMaximumAsciiStringLength is not zero and Source contains more than
- PcdMaximumAsciiStringLength ASCII characters not including the Null-terminator,
- then ASSERT().
-
- @param Destination The pointer to a Null-terminated ASCII string.
- @param Source The pointer to a Null-terminated ASCII string.
-
- @return Destination
-
-**/
-CHAR8 *
-EFIAPI
-AsciiStrCpy (
- OUT CHAR8 *Destination,
- IN CONST CHAR8 *Source
- );
-
-
-/**
- [ATTENTION] This function is deprecated for security reason.
-
- Copies up to a specified length one Null-terminated ASCII string to another
- Null-terminated ASCII string and returns the new ASCII string.
-
- This function copies the contents of the ASCII string Source to the ASCII
- string Destination, and returns Destination. At most, Length ASCII characters
- are copied from Source to Destination. If Length is 0, then Destination is
- returned unmodified. If Length is greater that the number of ASCII characters
- in Source, then Destination is padded with Null ASCII characters. If Source
- and Destination overlap, then the results are undefined.
-
- If Destination is NULL, then ASSERT().
- If Source is NULL, then ASSERT().
- If Source and Destination overlap, then ASSERT().
- If PcdMaximumAsciiStringLength is not zero, and Length is greater than
- PcdMaximumAsciiStringLength, then ASSERT().
- If PcdMaximumAsciiStringLength is not zero, and Source contains more than
- PcdMaximumAsciiStringLength ASCII characters, not including the Null-terminator,
- then ASSERT().
-
- @param Destination The pointer to a Null-terminated ASCII string.
- @param Source The pointer to a Null-terminated ASCII string.
- @param Length The maximum number of ASCII characters to copy.
-
- @return Destination
-
-**/
-CHAR8 *
-EFIAPI
-AsciiStrnCpy (
- OUT CHAR8 *Destination,
- IN CONST CHAR8 *Source,
- IN UINTN Length
- );
-#endif // !defined (DISABLE_NEW_DEPRECATED_INTERFACES)
-
/**
Returns the length of a Null-terminated ASCII string.
@@ -1893,10 +2044,9 @@ AsciiStrnCpy (
UINTN
EFIAPI
AsciiStrLen (
- IN CONST CHAR8 *String
+ IN CONST CHAR8 *String
);
-
/**
Returns the size of a Null-terminated ASCII string in bytes, including the
Null terminator.
@@ -1917,10 +2067,9 @@ AsciiStrLen (
UINTN
EFIAPI
AsciiStrSize (
- IN CONST CHAR8 *String
+ IN CONST CHAR8 *String
);
-
/**
Compares two Null-terminated ASCII strings, and returns the difference
between the first mismatched ASCII characters.
@@ -1950,11 +2099,10 @@ AsciiStrSize (
INTN
EFIAPI
AsciiStrCmp (
- IN CONST CHAR8 *FirstString,
- IN CONST CHAR8 *SecondString
+ IN CONST CHAR8 *FirstString,
+ IN CONST CHAR8 *SecondString
);
-
/**
Performs a case insensitive comparison of two Null-terminated ASCII strings,
and returns the difference between the first mismatched ASCII characters.
@@ -1987,11 +2135,10 @@ AsciiStrCmp (
INTN
EFIAPI
AsciiStriCmp (
- IN CONST CHAR8 *FirstString,
- IN CONST CHAR8 *SecondString
+ IN CONST CHAR8 *FirstString,
+ IN CONST CHAR8 *SecondString
);
-
/**
Compares two Null-terminated ASCII strings with maximum lengths, and returns
the difference between the first mismatched ASCII characters.
@@ -2025,98 +2172,11 @@ AsciiStriCmp (
INTN
EFIAPI
AsciiStrnCmp (
- IN CONST CHAR8 *FirstString,
- IN CONST CHAR8 *SecondString,
- IN UINTN Length
+ IN CONST CHAR8 *FirstString,
+ IN CONST CHAR8 *SecondString,
+ IN UINTN Length
);
-
-#ifndef DISABLE_NEW_DEPRECATED_INTERFACES
-
-/**
- [ATTENTION] This function is deprecated for security reason.
-
- Concatenates one Null-terminated ASCII string to another Null-terminated
- ASCII string, and returns the concatenated ASCII string.
-
- This function concatenates two Null-terminated ASCII strings. The contents of
- Null-terminated ASCII string Source are concatenated to the end of Null-
- terminated ASCII string Destination. The Null-terminated concatenated ASCII
- String is returned.
-
- If Destination is NULL, then ASSERT().
- If Source is NULL, then ASSERT().
- If PcdMaximumAsciiStringLength is not zero and Destination contains more than
- PcdMaximumAsciiStringLength ASCII characters not including the Null-terminator,
- then ASSERT().
- If PcdMaximumAsciiStringLength is not zero and Source contains more than
- PcdMaximumAsciiStringLength ASCII characters not including the Null-terminator,
- then ASSERT().
- If PcdMaximumAsciiStringLength is not zero and concatenating Destination and
- Source results in a ASCII string with more than PcdMaximumAsciiStringLength
- ASCII characters, then ASSERT().
-
- @param Destination The pointer to a Null-terminated ASCII string.
- @param Source The pointer to a Null-terminated ASCII string.
-
- @return Destination
-
-**/
-CHAR8 *
-EFIAPI
-AsciiStrCat (
- IN OUT CHAR8 *Destination,
- IN CONST CHAR8 *Source
- );
-
-
-/**
- [ATTENTION] This function is deprecated for security reason.
-
- Concatenates up to a specified length one Null-terminated ASCII string to
- the end of another Null-terminated ASCII string, and returns the
- concatenated ASCII string.
-
- This function concatenates two Null-terminated ASCII strings. The contents
- of Null-terminated ASCII string Source are concatenated to the end of Null-
- terminated ASCII string Destination, and Destination is returned. At most,
- Length ASCII characters are concatenated from Source to the end of
- Destination, and Destination is always Null-terminated. If Length is 0, then
- Destination is returned unmodified. If Source and Destination overlap, then
- the results are undefined.
-
- If Length > 0 and Destination is NULL, then ASSERT().
- If Length > 0 and Source is NULL, then ASSERT().
- If Source and Destination overlap, then ASSERT().
- If PcdMaximumAsciiStringLength is not zero, and Length is greater than
- PcdMaximumAsciiStringLength, then ASSERT().
- If PcdMaximumAsciiStringLength is not zero, and Destination contains more than
- PcdMaximumAsciiStringLength ASCII characters, not including the Null-terminator,
- then ASSERT().
- If PcdMaximumAsciiStringLength is not zero, and Source contains more than
- PcdMaximumAsciiStringLength ASCII characters, not including the Null-terminator,
- then ASSERT().
- If PcdMaximumAsciiStringLength is not zero, and concatenating Destination and
- Source results in a ASCII string with more than PcdMaximumAsciiStringLength
- ASCII characters, not including the Null-terminator, then ASSERT().
-
- @param Destination The pointer to a Null-terminated ASCII string.
- @param Source The pointer to a Null-terminated ASCII string.
- @param Length The maximum number of ASCII characters to concatenate from
- Source.
-
- @return Destination
-
-**/
-CHAR8 *
-EFIAPI
-AsciiStrnCat (
- IN OUT CHAR8 *Destination,
- IN CONST CHAR8 *Source,
- IN UINTN Length
- );
-#endif // !defined (DISABLE_NEW_DEPRECATED_INTERFACES)
-
/**
Returns the first occurrence of a Null-terminated ASCII sub-string
in a Null-terminated ASCII string.
@@ -2144,11 +2204,10 @@ AsciiStrnCat (
CHAR8 *
EFIAPI
AsciiStrStr (
- IN CONST CHAR8 *String,
- IN CONST CHAR8 *SearchString
+ IN CONST CHAR8 *String,
+ IN CONST CHAR8 *SearchString
);
-
/**
Convert a Null-terminated ASCII decimal string to a value of type
UINTN.
@@ -2182,10 +2241,9 @@ AsciiStrStr (
UINTN
EFIAPI
AsciiStrDecimalToUintn (
- IN CONST CHAR8 *String
+ IN CONST CHAR8 *String
);
-
/**
Convert a Null-terminated ASCII decimal string to a value of type
UINT64.
@@ -2219,10 +2277,9 @@ AsciiStrDecimalToUintn (
UINT64
EFIAPI
AsciiStrDecimalToUint64 (
- IN CONST CHAR8 *String
+ IN CONST CHAR8 *String
);
-
/**
Convert a Null-terminated ASCII hexadecimal string to a value of type UINTN.
@@ -2260,10 +2317,9 @@ AsciiStrDecimalToUint64 (
UINTN
EFIAPI
AsciiStrHexToUintn (
- IN CONST CHAR8 *String
+ IN CONST CHAR8 *String
);
-
/**
Convert a Null-terminated ASCII hexadecimal string to a value of type UINT64.
@@ -2301,7 +2357,7 @@ AsciiStrHexToUintn (
UINT64
EFIAPI
AsciiStrHexToUint64 (
- IN CONST CHAR8 *String
+ IN CONST CHAR8 *String
);
/**
@@ -2355,10 +2411,10 @@ AsciiStrHexToUint64 (
RETURN_STATUS
EFIAPI
AsciiStrToIpv6Address (
- IN CONST CHAR8 *String,
- OUT CHAR8 **EndPointer, OPTIONAL
- OUT IPv6_ADDRESS *Address,
- OUT UINT8 *PrefixLength OPTIONAL
+ IN CONST CHAR8 *String,
+ OUT CHAR8 **EndPointer OPTIONAL,
+ OUT IPv6_ADDRESS *Address,
+ OUT UINT8 *PrefixLength OPTIONAL
);
/**
@@ -2403,10 +2459,10 @@ AsciiStrToIpv6Address (
RETURN_STATUS
EFIAPI
AsciiStrToIpv4Address (
- IN CONST CHAR8 *String,
- OUT CHAR8 **EndPointer, OPTIONAL
- OUT IPv4_ADDRESS *Address,
- OUT UINT8 *PrefixLength OPTIONAL
+ IN CONST CHAR8 *String,
+ OUT CHAR8 **EndPointer OPTIONAL,
+ OUT IPv4_ADDRESS *Address,
+ OUT UINT8 *PrefixLength OPTIONAL
);
/**
@@ -2452,8 +2508,8 @@ AsciiStrToIpv4Address (
RETURN_STATUS
EFIAPI
AsciiStrToGuid (
- IN CONST CHAR8 *String,
- OUT GUID *Guid
+ IN CONST CHAR8 *String,
+ OUT GUID *Guid
);
/**
@@ -2490,52 +2546,12 @@ AsciiStrToGuid (
RETURN_STATUS
EFIAPI
AsciiStrHexToBytes (
- IN CONST CHAR8 *String,
- IN UINTN Length,
- OUT UINT8 *Buffer,
- IN UINTN MaxBufferSize
+ IN CONST CHAR8 *String,
+ IN UINTN Length,
+ OUT UINT8 *Buffer,
+ IN UINTN MaxBufferSize
);
-#ifndef DISABLE_NEW_DEPRECATED_INTERFACES
-
-/**
- [ATTENTION] This function is deprecated for security reason.
-
- Convert one Null-terminated ASCII string to a Null-terminated
- Unicode string and returns the Unicode string.
-
- This function converts the contents of the ASCII string Source to the Unicode
- string Destination, and returns Destination. The function terminates the
- Unicode string Destination by appending a Null-terminator character at the end.
- The caller is responsible to make sure Destination points to a buffer with size
- equal or greater than ((AsciiStrLen (Source) + 1) * sizeof (CHAR16)) in bytes.
-
- If Destination is NULL, then ASSERT().
- If Destination is not aligned on a 16-bit boundary, then ASSERT().
- If Source is NULL, then ASSERT().
- If Source and Destination overlap, then ASSERT().
- If PcdMaximumAsciiStringLength is not zero, and Source contains more than
- PcdMaximumAsciiStringLength ASCII characters not including the Null-terminator,
- then ASSERT().
- If PcdMaximumUnicodeStringLength is not zero, and Source contains more than
- PcdMaximumUnicodeStringLength ASCII characters not including the
- Null-terminator, then ASSERT().
-
- @param Source The pointer to a Null-terminated ASCII string.
- @param Destination The pointer to a Null-terminated Unicode string.
-
- @return Destination.
-
-**/
-CHAR16 *
-EFIAPI
-AsciiStrToUnicodeStr (
- IN CONST CHAR8 *Source,
- OUT CHAR16 *Destination
- );
-
-#endif // !defined (DISABLE_NEW_DEPRECATED_INTERFACES)
-
/**
Convert one Null-terminated ASCII string to a Null-terminated
Unicode string.
@@ -2575,9 +2591,9 @@ AsciiStrToUnicodeStr (
RETURN_STATUS
EFIAPI
AsciiStrToUnicodeStrS (
- IN CONST CHAR8 *Source,
- OUT CHAR16 *Destination,
- IN UINTN DestMax
+ IN CONST CHAR8 *Source,
+ OUT CHAR16 *Destination,
+ IN UINTN DestMax
);
/**
@@ -2625,11 +2641,11 @@ AsciiStrToUnicodeStrS (
RETURN_STATUS
EFIAPI
AsciiStrnToUnicodeStrS (
- IN CONST CHAR8 *Source,
- IN UINTN Length,
- OUT CHAR16 *Destination,
- IN UINTN DestMax,
- OUT UINTN *DestinationLength
+ IN CONST CHAR8 *Source,
+ IN UINTN Length,
+ OUT CHAR16 *Destination,
+ IN UINTN DestMax,
+ OUT UINTN *DestinationLength
);
/**
@@ -2650,7 +2666,7 @@ AsciiStrnToUnicodeStrS (
CHAR16
EFIAPI
CharToUpper (
- IN CHAR16 Char
+ IN CHAR16 Char
);
/**
@@ -2669,7 +2685,7 @@ CharToUpper (
CHAR8
EFIAPI
AsciiCharToUpper (
- IN CHAR8 Chr
+ IN CHAR8 Chr
);
/**
@@ -2695,7 +2711,7 @@ RETURN_STATUS
EFIAPI
Base64Encode (
IN CONST UINT8 *Source,
- IN UINTN SourceLength,
+ IN UINTN SourceLength,
OUT CHAR8 *Destination OPTIONAL,
IN OUT UINTN *DestinationSize
);
@@ -2785,10 +2801,10 @@ Base64Encode (
RETURN_STATUS
EFIAPI
Base64Decode (
- IN CONST CHAR8 *Source OPTIONAL,
- IN UINTN SourceSize,
- OUT UINT8 *Destination OPTIONAL,
- IN OUT UINTN *DestinationSize
+ IN CONST CHAR8 *Source OPTIONAL,
+ IN UINTN SourceSize,
+ OUT UINT8 *Destination OPTIONAL,
+ IN OUT UINTN *DestinationSize
);
/**
@@ -2807,10 +2823,9 @@ Base64Decode (
UINT8
EFIAPI
DecimalToBcd8 (
- IN UINT8 Value
+ IN UINT8 Value
);
-
/**
Converts an 8-bit BCD value to an 8-bit value.
@@ -2828,7 +2843,7 @@ DecimalToBcd8 (
UINT8
EFIAPI
BcdToDecimal8 (
- IN UINT8 Value
+ IN UINT8 Value
);
//
@@ -2845,8 +2860,8 @@ BcdToDecimal8 (
**/
BOOLEAN
EFIAPI
-PathRemoveLastItem(
- IN OUT CHAR16 *Path
+PathRemoveLastItem (
+ IN OUT CHAR16 *Path
);
/**
@@ -2862,10 +2877,10 @@ PathRemoveLastItem(
@return Returns Path, otherwise returns NULL to indicate that an error has occurred.
**/
-CHAR16*
+CHAR16 *
EFIAPI
-PathCleanUpDirectories(
- IN CHAR16 *Path
+PathCleanUpDirectories (
+ IN CHAR16 *Path
);
//
@@ -2937,11 +2952,10 @@ PathCleanUpDirectories(
BOOLEAN
EFIAPI
IsNodeInList (
- IN CONST LIST_ENTRY *FirstEntry,
- IN CONST LIST_ENTRY *SecondEntry
+ IN CONST LIST_ENTRY *FirstEntry,
+ IN CONST LIST_ENTRY *SecondEntry
);
-
/**
Initializes the head node of a doubly linked list, and returns the pointer to
the head node of the doubly linked list.
@@ -2961,10 +2975,9 @@ IsNodeInList (
LIST_ENTRY *
EFIAPI
InitializeListHead (
- IN OUT LIST_ENTRY *ListHead
+ IN OUT LIST_ENTRY *ListHead
);
-
/**
Adds a node to the beginning of a doubly linked list, and returns the pointer
to the head node of the doubly linked list.
@@ -2990,11 +3003,10 @@ InitializeListHead (
LIST_ENTRY *
EFIAPI
InsertHeadList (
- IN OUT LIST_ENTRY *ListHead,
- IN OUT LIST_ENTRY *Entry
+ IN OUT LIST_ENTRY *ListHead,
+ IN OUT LIST_ENTRY *Entry
);
-
/**
Adds a node to the end of a doubly linked list, and returns the pointer to
the head node of the doubly linked list.
@@ -3020,11 +3032,10 @@ InsertHeadList (
LIST_ENTRY *
EFIAPI
InsertTailList (
- IN OUT LIST_ENTRY *ListHead,
- IN OUT LIST_ENTRY *Entry
+ IN OUT LIST_ENTRY *ListHead,
+ IN OUT LIST_ENTRY *Entry
);
-
/**
Retrieves the first node of a doubly linked list.
@@ -3048,10 +3059,9 @@ InsertTailList (
LIST_ENTRY *
EFIAPI
GetFirstNode (
- IN CONST LIST_ENTRY *List
+ IN CONST LIST_ENTRY *List
);
-
/**
Retrieves the next node of a doubly linked list.
@@ -3076,11 +3086,10 @@ GetFirstNode (
LIST_ENTRY *
EFIAPI
GetNextNode (
- IN CONST LIST_ENTRY *List,
- IN CONST LIST_ENTRY *Node
+ IN CONST LIST_ENTRY *List,
+ IN CONST LIST_ENTRY *Node
);
-
/**
Retrieves the previous node of a doubly linked list.
@@ -3105,11 +3114,10 @@ GetNextNode (
LIST_ENTRY *
EFIAPI
GetPreviousNode (
- IN CONST LIST_ENTRY *List,
- IN CONST LIST_ENTRY *Node
+ IN CONST LIST_ENTRY *List,
+ IN CONST LIST_ENTRY *Node
);
-
/**
Checks to see if a doubly linked list is empty or not.
@@ -3132,10 +3140,9 @@ GetPreviousNode (
BOOLEAN
EFIAPI
IsListEmpty (
- IN CONST LIST_ENTRY *ListHead
+ IN CONST LIST_ENTRY *ListHead
);
-
/**
Determines if a node in a doubly linked list is the head node of a the same
doubly linked list. This function is typically used to terminate a loop that
@@ -3165,11 +3172,10 @@ IsListEmpty (
BOOLEAN
EFIAPI
IsNull (
- IN CONST LIST_ENTRY *List,
- IN CONST LIST_ENTRY *Node
+ IN CONST LIST_ENTRY *List,
+ IN CONST LIST_ENTRY *Node
);
-
/**
Determines if a node the last node in a doubly linked list.
@@ -3196,11 +3202,10 @@ IsNull (
BOOLEAN
EFIAPI
IsNodeAtEnd (
- IN CONST LIST_ENTRY *List,
- IN CONST LIST_ENTRY *Node
+ IN CONST LIST_ENTRY *List,
+ IN CONST LIST_ENTRY *Node
);
-
/**
Swaps the location of two nodes in a doubly linked list, and returns the
first node after the swap.
@@ -3230,11 +3235,10 @@ IsNodeAtEnd (
LIST_ENTRY *
EFIAPI
SwapListEntries (
- IN OUT LIST_ENTRY *FirstEntry,
- IN OUT LIST_ENTRY *SecondEntry
+ IN OUT LIST_ENTRY *FirstEntry,
+ IN OUT LIST_ENTRY *SecondEntry
);
-
/**
Removes a node from a doubly linked list, and returns the node that follows
the removed node.
@@ -3259,7 +3263,7 @@ SwapListEntries (
LIST_ENTRY *
EFIAPI
RemoveEntryList (
- IN CONST LIST_ENTRY *Entry
+ IN CONST LIST_ENTRY *Entry
);
//
@@ -3267,6 +3271,56 @@ RemoveEntryList (
//
/**
+ Prototype for comparison function for any two element types.
+
+ @param[in] Buffer1 The pointer to first buffer.
+ @param[in] Buffer2 The pointer to second buffer.
+
+ @retval 0 Buffer1 equal to Buffer2.
+ @return <0 Buffer1 is less than Buffer2.
+ @return >0 Buffer1 is greater than Buffer2.
+**/
+typedef
+INTN
+(EFIAPI *BASE_SORT_COMPARE)(
+ IN CONST VOID *Buffer1,
+ IN CONST VOID *Buffer2
+ );
+
+/**
+ This function is identical to perform QuickSort,
+ except that is uses the pre-allocated buffer so the in place sorting does not need to
+ allocate and free buffers constantly.
+
+ Each element must be equal sized.
+
+ if BufferToSort is NULL, then ASSERT.
+ if CompareFunction is NULL, then ASSERT.
+ if BufferOneElement is NULL, then ASSERT.
+ if ElementSize is < 1, then ASSERT.
+
+ if Count is < 2 then perform no action.
+
+ @param[in, out] BufferToSort on call a Buffer of (possibly sorted) elements
+ on return a buffer of sorted elements
+ @param[in] Count the number of elements in the buffer to sort
+ @param[in] ElementSize Size of an element in bytes
+ @param[in] CompareFunction The function to call to perform the comparison
+ of any 2 elements
+ @param[out] BufferOneElement Caller provided buffer whose size equals to ElementSize.
+ It's used by QuickSort() for swapping in sorting.
+**/
+VOID
+EFIAPI
+QuickSort (
+ IN OUT VOID *BufferToSort,
+ IN CONST UINTN Count,
+ IN CONST UINTN ElementSize,
+ IN BASE_SORT_COMPARE CompareFunction,
+ OUT VOID *BufferOneElement
+ );
+
+/**
Shifts a 64-bit integer left between 0 and 63 bits. The low bits are filled
with zeros. The shifted value is returned.
@@ -3284,11 +3338,10 @@ RemoveEntryList (
UINT64
EFIAPI
LShiftU64 (
- IN UINT64 Operand,
- IN UINTN Count
+ IN UINT64 Operand,
+ IN UINTN Count
);
-
/**
Shifts a 64-bit integer right between 0 and 63 bits. This high bits are
filled with zeros. The shifted value is returned.
@@ -3307,11 +3360,10 @@ LShiftU64 (
UINT64
EFIAPI
RShiftU64 (
- IN UINT64 Operand,
- IN UINTN Count
+ IN UINT64 Operand,
+ IN UINTN Count
);
-
/**
Shifts a 64-bit integer right between 0 and 63 bits. The high bits are filled
with original integer's bit 63. The shifted value is returned.
@@ -3330,11 +3382,10 @@ RShiftU64 (
UINT64
EFIAPI
ARShiftU64 (
- IN UINT64 Operand,
- IN UINTN Count
+ IN UINT64 Operand,
+ IN UINTN Count
);
-
/**
Rotates a 32-bit integer left between 0 and 31 bits, filling the low bits
with the high bits that were rotated.
@@ -3354,11 +3405,10 @@ ARShiftU64 (
UINT32
EFIAPI
LRotU32 (
- IN UINT32 Operand,
- IN UINTN Count
+ IN UINT32 Operand,
+ IN UINTN Count
);
-
/**
Rotates a 32-bit integer right between 0 and 31 bits, filling the high bits
with the low bits that were rotated.
@@ -3378,11 +3428,10 @@ LRotU32 (
UINT32
EFIAPI
RRotU32 (
- IN UINT32 Operand,
- IN UINTN Count
+ IN UINT32 Operand,
+ IN UINTN Count
);
-
/**
Rotates a 64-bit integer left between 0 and 63 bits, filling the low bits
with the high bits that were rotated.
@@ -3402,11 +3451,10 @@ RRotU32 (
UINT64
EFIAPI
LRotU64 (
- IN UINT64 Operand,
- IN UINTN Count
+ IN UINT64 Operand,
+ IN UINTN Count
);
-
/**
Rotates a 64-bit integer right between 0 and 63 bits, filling the high bits
with the high low bits that were rotated.
@@ -3426,11 +3474,10 @@ LRotU64 (
UINT64
EFIAPI
RRotU64 (
- IN UINT64 Operand,
- IN UINTN Count
+ IN UINT64 Operand,
+ IN UINTN Count
);
-
/**
Returns the bit position of the lowest bit set in a 32-bit value.
@@ -3447,10 +3494,9 @@ RRotU64 (
INTN
EFIAPI
LowBitSet32 (
- IN UINT32 Operand
+ IN UINT32 Operand
);
-
/**
Returns the bit position of the lowest bit set in a 64-bit value.
@@ -3468,10 +3514,9 @@ LowBitSet32 (
INTN
EFIAPI
LowBitSet64 (
- IN UINT64 Operand
+ IN UINT64 Operand
);
-
/**
Returns the bit position of the highest bit set in a 32-bit value. Equivalent
to log2(x).
@@ -3489,10 +3534,9 @@ LowBitSet64 (
INTN
EFIAPI
HighBitSet32 (
- IN UINT32 Operand
+ IN UINT32 Operand
);
-
/**
Returns the bit position of the highest bit set in a 64-bit value. Equivalent
to log2(x).
@@ -3510,10 +3554,9 @@ HighBitSet32 (
INTN
EFIAPI
HighBitSet64 (
- IN UINT64 Operand
+ IN UINT64 Operand
);
-
/**
Returns the value of the highest bit set in a 32-bit value. Equivalent to
1 << log2(x).
@@ -3530,10 +3573,9 @@ HighBitSet64 (
UINT32
EFIAPI
GetPowerOfTwo32 (
- IN UINT32 Operand
+ IN UINT32 Operand
);
-
/**
Returns the value of the highest bit set in a 64-bit value. Equivalent to
1 << log2(x).
@@ -3550,10 +3592,9 @@ GetPowerOfTwo32 (
UINT64
EFIAPI
GetPowerOfTwo64 (
- IN UINT64 Operand
+ IN UINT64 Operand
);
-
/**
Switches the endianness of a 16-bit integer.
@@ -3569,10 +3610,9 @@ GetPowerOfTwo64 (
UINT16
EFIAPI
SwapBytes16 (
- IN UINT16 Value
+ IN UINT16 Value
);
-
/**
Switches the endianness of a 32-bit integer.
@@ -3588,10 +3628,9 @@ SwapBytes16 (
UINT32
EFIAPI
SwapBytes32 (
- IN UINT32 Value
+ IN UINT32 Value
);
-
/**
Switches the endianness of a 64-bit integer.
@@ -3607,10 +3646,9 @@ SwapBytes32 (
UINT64
EFIAPI
SwapBytes64 (
- IN UINT64 Value
+ IN UINT64 Value
);
-
/**
Multiples a 64-bit unsigned integer by a 32-bit unsigned integer and
generates a 64-bit unsigned result.
@@ -3628,11 +3666,10 @@ SwapBytes64 (
UINT64
EFIAPI
MultU64x32 (
- IN UINT64 Multiplicand,
- IN UINT32 Multiplier
+ IN UINT64 Multiplicand,
+ IN UINT32 Multiplier
);
-
/**
Multiples a 64-bit unsigned integer by a 64-bit unsigned integer and
generates a 64-bit unsigned result.
@@ -3650,11 +3687,10 @@ MultU64x32 (
UINT64
EFIAPI
MultU64x64 (
- IN UINT64 Multiplicand,
- IN UINT64 Multiplier
+ IN UINT64 Multiplicand,
+ IN UINT64 Multiplier
);
-
/**
Multiples a 64-bit signed integer by a 64-bit signed integer and generates a
64-bit signed result.
@@ -3672,11 +3708,10 @@ MultU64x64 (
INT64
EFIAPI
MultS64x64 (
- IN INT64 Multiplicand,
- IN INT64 Multiplier
+ IN INT64 Multiplicand,
+ IN INT64 Multiplier
);
-
/**
Divides a 64-bit unsigned integer by a 32-bit unsigned integer and generates
a 64-bit unsigned result.
@@ -3696,11 +3731,10 @@ MultS64x64 (
UINT64
EFIAPI
DivU64x32 (
- IN UINT64 Dividend,
- IN UINT32 Divisor
+ IN UINT64 Dividend,
+ IN UINT32 Divisor
);
-
/**
Divides a 64-bit unsigned integer by a 32-bit unsigned integer and generates
a 32-bit unsigned remainder.
@@ -3720,11 +3754,10 @@ DivU64x32 (
UINT32
EFIAPI
ModU64x32 (
- IN UINT64 Dividend,
- IN UINT32 Divisor
+ IN UINT64 Dividend,
+ IN UINT32 Divisor
);
-
/**
Divides a 64-bit unsigned integer by a 32-bit unsigned integer and generates
a 64-bit unsigned result and an optional 32-bit unsigned remainder.
@@ -3747,12 +3780,11 @@ ModU64x32 (
UINT64
EFIAPI
DivU64x32Remainder (
- IN UINT64 Dividend,
- IN UINT32 Divisor,
- OUT UINT32 *Remainder OPTIONAL
+ IN UINT64 Dividend,
+ IN UINT32 Divisor,
+ OUT UINT32 *Remainder OPTIONAL
);
-
/**
Divides a 64-bit unsigned integer by a 64-bit unsigned integer and generates
a 64-bit unsigned result and an optional 64-bit unsigned remainder.
@@ -3775,12 +3807,11 @@ DivU64x32Remainder (
UINT64
EFIAPI
DivU64x64Remainder (
- IN UINT64 Dividend,
- IN UINT64 Divisor,
- OUT UINT64 *Remainder OPTIONAL
+ IN UINT64 Dividend,
+ IN UINT64 Divisor,
+ OUT UINT64 *Remainder OPTIONAL
);
-
/**
Divides a 64-bit signed integer by a 64-bit signed integer and generates a
64-bit signed result and a optional 64-bit signed remainder.
@@ -3807,12 +3838,11 @@ DivU64x64Remainder (
INT64
EFIAPI
DivS64x64Remainder (
- IN INT64 Dividend,
- IN INT64 Divisor,
- OUT INT64 *Remainder OPTIONAL
+ IN INT64 Dividend,
+ IN INT64 Divisor,
+ OUT INT64 *Remainder OPTIONAL
);
-
/**
Reads a 16-bit value from memory that may be unaligned.
@@ -3829,10 +3859,9 @@ DivS64x64Remainder (
UINT16
EFIAPI
ReadUnaligned16 (
- IN CONST UINT16 *Buffer
+ IN CONST UINT16 *Buffer
);
-
/**
Writes a 16-bit value to memory that may be unaligned.
@@ -3851,11 +3880,10 @@ ReadUnaligned16 (
UINT16
EFIAPI
WriteUnaligned16 (
- OUT UINT16 *Buffer,
- IN UINT16 Value
+ OUT UINT16 *Buffer,
+ IN UINT16 Value
);
-
/**
Reads a 24-bit value from memory that may be unaligned.
@@ -3872,10 +3900,9 @@ WriteUnaligned16 (
UINT32
EFIAPI
ReadUnaligned24 (
- IN CONST UINT32 *Buffer
+ IN CONST UINT32 *Buffer
);
-
/**
Writes a 24-bit value to memory that may be unaligned.
@@ -3894,11 +3921,10 @@ ReadUnaligned24 (
UINT32
EFIAPI
WriteUnaligned24 (
- OUT UINT32 *Buffer,
- IN UINT32 Value
+ OUT UINT32 *Buffer,
+ IN UINT32 Value
);
-
/**
Reads a 32-bit value from memory that may be unaligned.
@@ -3915,10 +3941,9 @@ WriteUnaligned24 (
UINT32
EFIAPI
ReadUnaligned32 (
- IN CONST UINT32 *Buffer
+ IN CONST UINT32 *Buffer
);
-
/**
Writes a 32-bit value to memory that may be unaligned.
@@ -3937,11 +3962,10 @@ ReadUnaligned32 (
UINT32
EFIAPI
WriteUnaligned32 (
- OUT UINT32 *Buffer,
- IN UINT32 Value
+ OUT UINT32 *Buffer,
+ IN UINT32 Value
);
-
/**
Reads a 64-bit value from memory that may be unaligned.
@@ -3958,10 +3982,9 @@ WriteUnaligned32 (
UINT64
EFIAPI
ReadUnaligned64 (
- IN CONST UINT64 *Buffer
+ IN CONST UINT64 *Buffer
);
-
/**
Writes a 64-bit value to memory that may be unaligned.
@@ -3980,11 +4003,10 @@ ReadUnaligned64 (
UINT64
EFIAPI
WriteUnaligned64 (
- OUT UINT64 *Buffer,
- IN UINT64 Value
+ OUT UINT64 *Buffer,
+ IN UINT64 Value
);
-
//
// Bit Field Functions
//
@@ -4011,12 +4033,11 @@ WriteUnaligned64 (
UINT8
EFIAPI
BitFieldRead8 (
- IN UINT8 Operand,
- IN UINTN StartBit,
- IN UINTN EndBit
+ IN UINT8 Operand,
+ IN UINTN StartBit,
+ IN UINTN EndBit
);
-
/**
Writes a bit field to an 8-bit value, and returns the result.
@@ -4043,13 +4064,12 @@ BitFieldRead8 (
UINT8
EFIAPI
BitFieldWrite8 (
- IN UINT8 Operand,
- IN UINTN StartBit,
- IN UINTN EndBit,
- IN UINT8 Value
+ IN UINT8 Operand,
+ IN UINTN StartBit,
+ IN UINTN EndBit,
+ IN UINT8 Value
);
-
/**
Reads a bit field from an 8-bit value, performs a bitwise OR, and returns the
result.
@@ -4077,13 +4097,12 @@ BitFieldWrite8 (
UINT8
EFIAPI
BitFieldOr8 (
- IN UINT8 Operand,
- IN UINTN StartBit,
- IN UINTN EndBit,
- IN UINT8 OrData
+ IN UINT8 Operand,
+ IN UINTN StartBit,
+ IN UINTN EndBit,
+ IN UINT8 OrData
);
-
/**
Reads a bit field from an 8-bit value, performs a bitwise AND, and returns
the result.
@@ -4111,13 +4130,12 @@ BitFieldOr8 (
UINT8
EFIAPI
BitFieldAnd8 (
- IN UINT8 Operand,
- IN UINTN StartBit,
- IN UINTN EndBit,
- IN UINT8 AndData
+ IN UINT8 Operand,
+ IN UINTN StartBit,
+ IN UINTN EndBit,
+ IN UINT8 AndData
);
-
/**
Reads a bit field from an 8-bit value, performs a bitwise AND followed by a
bitwise OR, and returns the result.
@@ -4148,14 +4166,13 @@ BitFieldAnd8 (
UINT8
EFIAPI
BitFieldAndThenOr8 (
- IN UINT8 Operand,
- IN UINTN StartBit,
- IN UINTN EndBit,
- IN UINT8 AndData,
- IN UINT8 OrData
+ IN UINT8 Operand,
+ IN UINTN StartBit,
+ IN UINTN EndBit,
+ IN UINT8 AndData,
+ IN UINT8 OrData
);
-
/**
Returns a bit field from a 16-bit value.
@@ -4178,12 +4195,11 @@ BitFieldAndThenOr8 (
UINT16
EFIAPI
BitFieldRead16 (
- IN UINT16 Operand,
- IN UINTN StartBit,
- IN UINTN EndBit
+ IN UINT16 Operand,
+ IN UINTN StartBit,
+ IN UINTN EndBit
);
-
/**
Writes a bit field to a 16-bit value, and returns the result.
@@ -4210,13 +4226,12 @@ BitFieldRead16 (
UINT16
EFIAPI
BitFieldWrite16 (
- IN UINT16 Operand,
- IN UINTN StartBit,
- IN UINTN EndBit,
- IN UINT16 Value
+ IN UINT16 Operand,
+ IN UINTN StartBit,
+ IN UINTN EndBit,
+ IN UINT16 Value
);
-
/**
Reads a bit field from a 16-bit value, performs a bitwise OR, and returns the
result.
@@ -4244,13 +4259,12 @@ BitFieldWrite16 (
UINT16
EFIAPI
BitFieldOr16 (
- IN UINT16 Operand,
- IN UINTN StartBit,
- IN UINTN EndBit,
- IN UINT16 OrData
+ IN UINT16 Operand,
+ IN UINTN StartBit,
+ IN UINTN EndBit,
+ IN UINT16 OrData
);
-
/**
Reads a bit field from a 16-bit value, performs a bitwise AND, and returns
the result.
@@ -4278,13 +4292,12 @@ BitFieldOr16 (
UINT16
EFIAPI
BitFieldAnd16 (
- IN UINT16 Operand,
- IN UINTN StartBit,
- IN UINTN EndBit,
- IN UINT16 AndData
+ IN UINT16 Operand,
+ IN UINTN StartBit,
+ IN UINTN EndBit,
+ IN UINT16 AndData
);
-
/**
Reads a bit field from a 16-bit value, performs a bitwise AND followed by a
bitwise OR, and returns the result.
@@ -4315,14 +4328,13 @@ BitFieldAnd16 (
UINT16
EFIAPI
BitFieldAndThenOr16 (
- IN UINT16 Operand,
- IN UINTN StartBit,
- IN UINTN EndBit,
- IN UINT16 AndData,
- IN UINT16 OrData
+ IN UINT16 Operand,
+ IN UINTN StartBit,
+ IN UINTN EndBit,
+ IN UINT16 AndData,
+ IN UINT16 OrData
);
-
/**
Returns a bit field from a 32-bit value.
@@ -4345,12 +4357,11 @@ BitFieldAndThenOr16 (
UINT32
EFIAPI
BitFieldRead32 (
- IN UINT32 Operand,
- IN UINTN StartBit,
- IN UINTN EndBit
+ IN UINT32 Operand,
+ IN UINTN StartBit,
+ IN UINTN EndBit
);
-
/**
Writes a bit field to a 32-bit value, and returns the result.
@@ -4377,13 +4388,12 @@ BitFieldRead32 (
UINT32
EFIAPI
BitFieldWrite32 (
- IN UINT32 Operand,
- IN UINTN StartBit,
- IN UINTN EndBit,
- IN UINT32 Value
+ IN UINT32 Operand,
+ IN UINTN StartBit,
+ IN UINTN EndBit,
+ IN UINT32 Value
);
-
/**
Reads a bit field from a 32-bit value, performs a bitwise OR, and returns the
result.
@@ -4411,13 +4421,12 @@ BitFieldWrite32 (
UINT32
EFIAPI
BitFieldOr32 (
- IN UINT32 Operand,
- IN UINTN StartBit,
- IN UINTN EndBit,
- IN UINT32 OrData
+ IN UINT32 Operand,
+ IN UINTN StartBit,
+ IN UINTN EndBit,
+ IN UINT32 OrData
);
-
/**
Reads a bit field from a 32-bit value, performs a bitwise AND, and returns
the result.
@@ -4445,13 +4454,12 @@ BitFieldOr32 (
UINT32
EFIAPI
BitFieldAnd32 (
- IN UINT32 Operand,
- IN UINTN StartBit,
- IN UINTN EndBit,
- IN UINT32 AndData
+ IN UINT32 Operand,
+ IN UINTN StartBit,
+ IN UINTN EndBit,
+ IN UINT32 AndData
);
-
/**
Reads a bit field from a 32-bit value, performs a bitwise AND followed by a
bitwise OR, and returns the result.
@@ -4482,14 +4490,13 @@ BitFieldAnd32 (
UINT32
EFIAPI
BitFieldAndThenOr32 (
- IN UINT32 Operand,
- IN UINTN StartBit,
- IN UINTN EndBit,
- IN UINT32 AndData,
- IN UINT32 OrData
+ IN UINT32 Operand,
+ IN UINTN StartBit,
+ IN UINTN EndBit,
+ IN UINT32 AndData,
+ IN UINT32 OrData
);
-
/**
Returns a bit field from a 64-bit value.
@@ -4512,12 +4519,11 @@ BitFieldAndThenOr32 (
UINT64
EFIAPI
BitFieldRead64 (
- IN UINT64 Operand,
- IN UINTN StartBit,
- IN UINTN EndBit
+ IN UINT64 Operand,
+ IN UINTN StartBit,
+ IN UINTN EndBit
);
-
/**
Writes a bit field to a 64-bit value, and returns the result.
@@ -4544,13 +4550,12 @@ BitFieldRead64 (
UINT64
EFIAPI
BitFieldWrite64 (
- IN UINT64 Operand,
- IN UINTN StartBit,
- IN UINTN EndBit,
- IN UINT64 Value
+ IN UINT64 Operand,
+ IN UINTN StartBit,
+ IN UINTN EndBit,
+ IN UINT64 Value
);
-
/**
Reads a bit field from a 64-bit value, performs a bitwise OR, and returns the
result.
@@ -4578,13 +4583,12 @@ BitFieldWrite64 (
UINT64
EFIAPI
BitFieldOr64 (
- IN UINT64 Operand,
- IN UINTN StartBit,
- IN UINTN EndBit,
- IN UINT64 OrData
+ IN UINT64 Operand,
+ IN UINTN StartBit,
+ IN UINTN EndBit,
+ IN UINT64 OrData
);
-
/**
Reads a bit field from a 64-bit value, performs a bitwise AND, and returns
the result.
@@ -4612,13 +4616,12 @@ BitFieldOr64 (
UINT64
EFIAPI
BitFieldAnd64 (
- IN UINT64 Operand,
- IN UINTN StartBit,
- IN UINTN EndBit,
- IN UINT64 AndData
+ IN UINT64 Operand,
+ IN UINTN StartBit,
+ IN UINTN EndBit,
+ IN UINT64 AndData
);
-
/**
Reads a bit field from a 64-bit value, performs a bitwise AND followed by a
bitwise OR, and returns the result.
@@ -4649,11 +4652,11 @@ BitFieldAnd64 (
UINT64
EFIAPI
BitFieldAndThenOr64 (
- IN UINT64 Operand,
- IN UINTN StartBit,
- IN UINTN EndBit,
- IN UINT64 AndData,
- IN UINT64 OrData
+ IN UINT64 Operand,
+ IN UINTN StartBit,
+ IN UINTN EndBit,
+ IN UINT64 AndData,
+ IN UINT64 OrData
);
/**
@@ -4679,9 +4682,9 @@ BitFieldAndThenOr64 (
UINT8
EFIAPI
BitFieldCountOnes32 (
- IN UINT32 Operand,
- IN UINTN StartBit,
- IN UINTN EndBit
+ IN UINT32 Operand,
+ IN UINTN StartBit,
+ IN UINTN EndBit
);
/**
@@ -4707,9 +4710,9 @@ BitFieldCountOnes32 (
UINT8
EFIAPI
BitFieldCountOnes64 (
- IN UINT64 Operand,
- IN UINTN StartBit,
- IN UINTN EndBit
+ IN UINT64 Operand,
+ IN UINTN StartBit,
+ IN UINTN EndBit
);
//
@@ -4737,11 +4740,10 @@ BitFieldCountOnes64 (
UINT8
EFIAPI
CalculateSum8 (
- IN CONST UINT8 *Buffer,
- IN UINTN Length
+ IN CONST UINT8 *Buffer,
+ IN UINTN Length
);
-
/**
Returns the two's complement checksum of all elements in a buffer
of 8-bit values.
@@ -4763,11 +4765,10 @@ CalculateSum8 (
UINT8
EFIAPI
CalculateCheckSum8 (
- IN CONST UINT8 *Buffer,
- IN UINTN Length
+ IN CONST UINT8 *Buffer,
+ IN UINTN Length
);
-
/**
Returns the sum of all elements in a buffer of 16-bit values. During
calculation, the carry bits are dropped.
@@ -4790,11 +4791,10 @@ CalculateCheckSum8 (
UINT16
EFIAPI
CalculateSum16 (
- IN CONST UINT16 *Buffer,
- IN UINTN Length
+ IN CONST UINT16 *Buffer,
+ IN UINTN Length
);
-
/**
Returns the two's complement checksum of all elements in a buffer of
16-bit values.
@@ -4818,11 +4818,10 @@ CalculateSum16 (
UINT16
EFIAPI
CalculateCheckSum16 (
- IN CONST UINT16 *Buffer,
- IN UINTN Length
+ IN CONST UINT16 *Buffer,
+ IN UINTN Length
);
-
/**
Returns the sum of all elements in a buffer of 32-bit values. During
calculation, the carry bits are dropped.
@@ -4845,11 +4844,10 @@ CalculateCheckSum16 (
UINT32
EFIAPI
CalculateSum32 (
- IN CONST UINT32 *Buffer,
- IN UINTN Length
+ IN CONST UINT32 *Buffer,
+ IN UINTN Length
);
-
/**
Returns the two's complement checksum of all elements in a buffer of
32-bit values.
@@ -4873,11 +4871,10 @@ CalculateSum32 (
UINT32
EFIAPI
CalculateCheckSum32 (
- IN CONST UINT32 *Buffer,
- IN UINTN Length
+ IN CONST UINT32 *Buffer,
+ IN UINTN Length
);
-
/**
Returns the sum of all elements in a buffer of 64-bit values. During
calculation, the carry bits are dropped.
@@ -4900,11 +4897,10 @@ CalculateCheckSum32 (
UINT64
EFIAPI
CalculateSum64 (
- IN CONST UINT64 *Buffer,
- IN UINTN Length
+ IN CONST UINT64 *Buffer,
+ IN UINTN Length
);
-
/**
Returns the two's complement checksum of all elements in a buffer of
64-bit values.
@@ -4928,8 +4924,8 @@ CalculateSum64 (
UINT64
EFIAPI
CalculateCheckSum64 (
- IN CONST UINT64 *Buffer,
- IN UINTN Length
+ IN CONST UINT64 *Buffer,
+ IN UINTN Length
);
/**
@@ -4947,9 +4943,65 @@ CalculateCheckSum64 (
**/
UINT32
EFIAPI
-CalculateCrc32(
- IN VOID *Buffer,
- IN UINTN Length
+CalculateCrc32 (
+ IN VOID *Buffer,
+ IN UINTN Length
+ );
+
+/**
+ Calculates the CRC16-ANSI checksum of the given buffer.
+
+ @param[in] Buffer Pointer to the buffer.
+ @param[in] Length Length of the buffer, in bytes.
+ @param[in] InitialValue Initial value of the CRC.
+
+ @return The CRC16-ANSI checksum.
+**/
+UINT16
+EFIAPI
+CalculateCrc16Ansi (
+ IN CONST VOID *Buffer,
+ IN UINTN Length,
+ IN UINT16 InitialValue
+ );
+
+//
+// Initial value for the CRC16-ANSI algorithm, when no prior checksum has been calculated.
+//
+#define CRC16ANSI_INIT 0xffff
+
+/**
+ Calculates the CRC32c checksum of the given buffer.
+
+ @param[in] Buffer Pointer to the buffer.
+ @param[in] Length Length of the buffer, in bytes.
+ @param[in] InitialValue Initial value of the CRC.
+
+ @return The CRC32c checksum.
+**/
+UINT32
+EFIAPI
+CalculateCrc32c (
+ IN CONST VOID *Buffer,
+ IN UINTN Length,
+ IN UINT32 InitialValue
+ );
+
+/**
+ Calculates the CRC16-CCITT-FALSE checksum of the given buffer.
+
+ @param[in] Buffer Pointer to the buffer.
+ @param[in] Length Length of the buffer, in bytes.
+ @param[in] InitialValue Initial value of the CRC.
+
+ @return The CRC16-CCITT-FALSE checksum.
+**/
+UINT16
+EFIAPI
+CalculateCrc16CcittF (
+ IN CONST VOID *Buffer,
+ IN UINTN Length,
+ IN UINT16 InitialValue
);
//
@@ -4961,16 +5013,14 @@ CalculateCrc32(
@param Context1 Context1 parameter passed into SwitchStack().
@param Context2 Context2 parameter passed into SwitchStack().
-
**/
typedef
VOID
(EFIAPI *SWITCH_STACK_ENTRY_POINT)(
- IN VOID *Context1, OPTIONAL
+ IN VOID *Context1 OPTIONAL,
IN VOID *Context2 OPTIONAL
);
-
/**
Used to serialize load and store operations.
@@ -4984,7 +5034,6 @@ MemoryFence (
VOID
);
-
/**
Saves the current CPU context that can be restored with a call to LongJump()
and returns 0.
@@ -5013,7 +5062,6 @@ SetJump (
OUT BASE_LIBRARY_JUMP_BUFFER *JumpBuffer
);
-
/**
Restores the CPU context that was saved with SetJump().
@@ -5037,7 +5085,6 @@ LongJump (
IN UINTN Value
);
-
/**
Enables CPU interrupts.
@@ -5048,7 +5095,6 @@ EnableInterrupts (
VOID
);
-
/**
Disables CPU interrupts.
@@ -5059,7 +5105,6 @@ DisableInterrupts (
VOID
);
-
/**
Disables CPU interrupts and returns the interrupt state prior to the disable
operation.
@@ -5074,7 +5119,6 @@ SaveAndDisableInterrupts (
VOID
);
-
/**
Enables CPU interrupts for the smallest window required to capture any
pending interrupts.
@@ -5086,7 +5130,6 @@ EnableDisableInterrupts (
VOID
);
-
/**
Retrieves the current CPU interrupt state.
@@ -5103,7 +5146,6 @@ GetInterruptState (
VOID
);
-
/**
Set the current CPU interrupt state.
@@ -5121,10 +5163,9 @@ GetInterruptState (
BOOLEAN
EFIAPI
SetInterruptState (
- IN BOOLEAN InterruptState
+ IN BOOLEAN InterruptState
);
-
/**
Requests CPU to pause for a short period of time.
@@ -5138,7 +5179,6 @@ CpuPause (
VOID
);
-
/**
Transfers control to a function starting with a new stack.
@@ -5172,13 +5212,12 @@ VOID
EFIAPI
SwitchStack (
IN SWITCH_STACK_ENTRY_POINT EntryPoint,
- IN VOID *Context1, OPTIONAL
- IN VOID *Context2, OPTIONAL
+ IN VOID *Context1 OPTIONAL,
+ IN VOID *Context2 OPTIONAL,
IN VOID *NewStack,
...
);
-
/**
Generates a breakpoint on the CPU.
@@ -5192,7 +5231,6 @@ CpuBreakpoint (
VOID
);
-
/**
Executes an infinite loop.
@@ -5208,7 +5246,6 @@ CpuDeadLoop (
VOID
);
-
/**
Uses as a barrier to stop speculative execution.
@@ -5222,6 +5259,153 @@ SpeculationBarrier (
VOID
);
+/**
+ The TDCALL instruction causes a VM exit to the Intel TDX module. It is
+ used to call guest-side Intel TDX functions, either local or a TD exit
+ to the host VMM, as selected by Leaf.
+
+ @param[in] Leaf Leaf number of TDCALL instruction
+ @param[in] Arg1 Arg1
+ @param[in] Arg2 Arg2
+ @param[in] Arg3 Arg3
+ @param[in,out] Results Returned result of the Leaf function
+
+ @return 0 A successful call
+ @return Other See individual leaf functions
+**/
+UINTN
+EFIAPI
+TdCall (
+ IN UINT64 Leaf,
+ IN UINT64 Arg1,
+ IN UINT64 Arg2,
+ IN UINT64 Arg3,
+ IN OUT VOID *Results
+ );
+
+/**
+ TDVMALL is a leaf function 0 for TDCALL. It helps invoke services from the
+ host VMM to pass/receive information.
+
+ @param[in] Leaf Number of sub-functions
+ @param[in] Arg1 Arg1
+ @param[in] Arg2 Arg2
+ @param[in] Arg3 Arg3
+ @param[in] Arg4 Arg4
+ @param[in,out] Results Returned result of the sub-function
+
+ @return 0 A successful call
+ @return Other See individual sub-functions
+
+**/
+UINTN
+EFIAPI
+TdVmCall (
+ IN UINT64 Leaf,
+ IN UINT64 Arg1,
+ IN UINT64 Arg2,
+ IN UINT64 Arg3,
+ IN UINT64 Arg4,
+ IN OUT VOID *Results
+ );
+
+/**
+ Probe if TD is enabled.
+
+ @return TRUE TD is enabled.
+ @return FALSE TD is not enabled.
+**/
+BOOLEAN
+EFIAPI
+TdIsEnabled (
+ VOID
+ );
+
+#if defined (MDE_CPU_X64)
+//
+// The page size for the PVALIDATE instruction
+//
+typedef enum {
+ PvalidatePageSize4K = 0,
+ PvalidatePageSize2MB,
+} PVALIDATE_PAGE_SIZE;
+
+//
+// PVALIDATE Return Code.
+//
+#define PVALIDATE_RET_SUCCESS 0
+#define PVALIDATE_RET_FAIL_INPUT 1
+#define PVALIDATE_RET_SIZE_MISMATCH 6
+
+//
+// The PVALIDATE instruction did not make any changes to the RMP entry.
+//
+#define PVALIDATE_RET_NO_RMPUPDATE 255
+
+/**
+ Execute a PVALIDATE instruction to validate or to rescinds validation of a guest
+ page's RMP entry.
+
+ The instruction is available only when CPUID Fn8000_001F_EAX[SNP]=1.
+
+ The function is available on X64.
+
+ @param[in] PageSize The page size to use.
+ @param[in] Validate If TRUE, validate the guest virtual address
+ otherwise invalidate the guest virtual address.
+ @param[in] Address The guest virtual address.
+
+ @retval PVALIDATE_RET_SUCCESS The PVALIDATE instruction succeeded, and
+ updated the RMP entry.
+ @retval PVALIDATE_RET_NO_RMPUPDATE The PVALIDATE instruction succeeded, but
+ did not update the RMP entry.
+ @return Failure code from the PVALIDATE
+ instruction.
+**/
+UINT32
+EFIAPI
+AsmPvalidate (
+ IN PVALIDATE_PAGE_SIZE PageSize,
+ IN BOOLEAN Validate,
+ IN PHYSICAL_ADDRESS Address
+ );
+
+//
+// RDX settings for RMPADJUST
+//
+#define RMPADJUST_VMPL_MAX 3
+#define RMPADJUST_VMPL_MASK 0xFF
+#define RMPADJUST_VMPL_SHIFT 0
+#define RMPADJUST_PERMISSION_MASK_MASK 0xFF
+#define RMPADJUST_PERMISSION_MASK_SHIFT 8
+#define RMPADJUST_VMSA_PAGE_BIT BIT16
+
+/**
+ Adjusts the permissions of an SEV-SNP guest page.
+
+ Executes a RMPADJUST instruction with the register state specified by Rax,
+ Rcx, and Rdx. Returns Eax. This function is only available on X64.
+
+ The instruction is available only when CPUID Fn8000_001F_EAX[SNP]=1.
+
+ @param[in] Rax The value to load into RAX before executing the RMPADJUST
+ instruction.
+ @param[in] Rcx The value to load into RCX before executing the RMPADJUST
+ instruction.
+ @param[in] Rdx The value to load into RDX before executing the RMPADJUST
+ instruction.
+
+ @return Eax
+**/
+UINT32
+EFIAPI
+AsmRmpAdjust (
+ IN UINT64 Rax,
+ IN UINT64 Rcx,
+ IN UINT64 Rdx
+ );
+
+#endif
#if defined (MDE_CPU_IA32) || defined (MDE_CPU_X64)
///
@@ -5230,21 +5414,21 @@ SpeculationBarrier (
///
typedef union {
struct {
- UINT32 CF:1; ///< Carry Flag.
- UINT32 Reserved_0:1; ///< Reserved.
- UINT32 PF:1; ///< Parity Flag.
- UINT32 Reserved_1:1; ///< Reserved.
- UINT32 AF:1; ///< Auxiliary Carry Flag.
- UINT32 Reserved_2:1; ///< Reserved.
- UINT32 ZF:1; ///< Zero Flag.
- UINT32 SF:1; ///< Sign Flag.
- UINT32 TF:1; ///< Trap Flag.
- UINT32 IF:1; ///< Interrupt Enable Flag.
- UINT32 DF:1; ///< Direction Flag.
- UINT32 OF:1; ///< Overflow Flag.
- UINT32 IOPL:2; ///< I/O Privilege Level.
- UINT32 NT:1; ///< Nested Task.
- UINT32 Reserved_3:1; ///< Reserved.
+ UINT32 CF : 1; ///< Carry Flag.
+ UINT32 Reserved_0 : 1; ///< Reserved.
+ UINT32 PF : 1; ///< Parity Flag.
+ UINT32 Reserved_1 : 1; ///< Reserved.
+ UINT32 AF : 1; ///< Auxiliary Carry Flag.
+ UINT32 Reserved_2 : 1; ///< Reserved.
+ UINT32 ZF : 1; ///< Zero Flag.
+ UINT32 SF : 1; ///< Sign Flag.
+ UINT32 TF : 1; ///< Trap Flag.
+ UINT32 IF : 1; ///< Interrupt Enable Flag.
+ UINT32 DF : 1; ///< Direction Flag.
+ UINT32 OF : 1; ///< Overflow Flag.
+ UINT32 IOPL : 2; ///< I/O Privilege Level.
+ UINT32 NT : 1; ///< Nested Task.
+ UINT32 Reserved_3 : 1; ///< Reserved.
} Bits;
UINT16 Uint16;
} IA32_FLAGS16;
@@ -5256,30 +5440,30 @@ typedef union {
///
typedef union {
struct {
- UINT32 CF:1; ///< Carry Flag.
- UINT32 Reserved_0:1; ///< Reserved.
- UINT32 PF:1; ///< Parity Flag.
- UINT32 Reserved_1:1; ///< Reserved.
- UINT32 AF:1; ///< Auxiliary Carry Flag.
- UINT32 Reserved_2:1; ///< Reserved.
- UINT32 ZF:1; ///< Zero Flag.
- UINT32 SF:1; ///< Sign Flag.
- UINT32 TF:1; ///< Trap Flag.
- UINT32 IF:1; ///< Interrupt Enable Flag.
- UINT32 DF:1; ///< Direction Flag.
- UINT32 OF:1; ///< Overflow Flag.
- UINT32 IOPL:2; ///< I/O Privilege Level.
- UINT32 NT:1; ///< Nested Task.
- UINT32 Reserved_3:1; ///< Reserved.
- UINT32 RF:1; ///< Resume Flag.
- UINT32 VM:1; ///< Virtual 8086 Mode.
- UINT32 AC:1; ///< Alignment Check.
- UINT32 VIF:1; ///< Virtual Interrupt Flag.
- UINT32 VIP:1; ///< Virtual Interrupt Pending.
- UINT32 ID:1; ///< ID Flag.
- UINT32 Reserved_4:10; ///< Reserved.
+ UINT32 CF : 1; ///< Carry Flag.
+ UINT32 Reserved_0 : 1; ///< Reserved.
+ UINT32 PF : 1; ///< Parity Flag.
+ UINT32 Reserved_1 : 1; ///< Reserved.
+ UINT32 AF : 1; ///< Auxiliary Carry Flag.
+ UINT32 Reserved_2 : 1; ///< Reserved.
+ UINT32 ZF : 1; ///< Zero Flag.
+ UINT32 SF : 1; ///< Sign Flag.
+ UINT32 TF : 1; ///< Trap Flag.
+ UINT32 IF : 1; ///< Interrupt Enable Flag.
+ UINT32 DF : 1; ///< Direction Flag.
+ UINT32 OF : 1; ///< Overflow Flag.
+ UINT32 IOPL : 2; ///< I/O Privilege Level.
+ UINT32 NT : 1; ///< Nested Task.
+ UINT32 Reserved_3 : 1; ///< Reserved.
+ UINT32 RF : 1; ///< Resume Flag.
+ UINT32 VM : 1; ///< Virtual 8086 Mode.
+ UINT32 AC : 1; ///< Alignment Check.
+ UINT32 VIF : 1; ///< Virtual Interrupt Flag.
+ UINT32 VIP : 1; ///< Virtual Interrupt Pending.
+ UINT32 ID : 1; ///< ID Flag.
+ UINT32 Reserved_4 : 10; ///< Reserved.
} Bits;
- UINTN UintN;
+ UINTN UintN;
} IA32_EFLAGS32;
///
@@ -5289,22 +5473,22 @@ typedef union {
///
typedef union {
struct {
- UINT32 PE:1; ///< Protection Enable.
- UINT32 MP:1; ///< Monitor Coprocessor.
- UINT32 EM:1; ///< Emulation.
- UINT32 TS:1; ///< Task Switched.
- UINT32 ET:1; ///< Extension Type.
- UINT32 NE:1; ///< Numeric Error.
- UINT32 Reserved_0:10; ///< Reserved.
- UINT32 WP:1; ///< Write Protect.
- UINT32 Reserved_1:1; ///< Reserved.
- UINT32 AM:1; ///< Alignment Mask.
- UINT32 Reserved_2:10; ///< Reserved.
- UINT32 NW:1; ///< Mot Write-through.
- UINT32 CD:1; ///< Cache Disable.
- UINT32 PG:1; ///< Paging.
+ UINT32 PE : 1; ///< Protection Enable.
+ UINT32 MP : 1; ///< Monitor Coprocessor.
+ UINT32 EM : 1; ///< Emulation.
+ UINT32 TS : 1; ///< Task Switched.
+ UINT32 ET : 1; ///< Extension Type.
+ UINT32 NE : 1; ///< Numeric Error.
+ UINT32 Reserved_0 : 10; ///< Reserved.
+ UINT32 WP : 1; ///< Write Protect.
+ UINT32 Reserved_1 : 1; ///< Reserved.
+ UINT32 AM : 1; ///< Alignment Mask.
+ UINT32 Reserved_2 : 10; ///< Reserved.
+ UINT32 NW : 1; ///< Mot Write-through.
+ UINT32 CD : 1; ///< Cache Disable.
+ UINT32 PG : 1; ///< Paging.
} Bits;
- UINTN UintN;
+ UINTN UintN;
} IA32_CR0;
///
@@ -5314,36 +5498,36 @@ typedef union {
///
typedef union {
struct {
- UINT32 VME:1; ///< Virtual-8086 Mode Extensions.
- UINT32 PVI:1; ///< Protected-Mode Virtual Interrupts.
- UINT32 TSD:1; ///< Time Stamp Disable.
- UINT32 DE:1; ///< Debugging Extensions.
- UINT32 PSE:1; ///< Page Size Extensions.
- UINT32 PAE:1; ///< Physical Address Extension.
- UINT32 MCE:1; ///< Machine Check Enable.
- UINT32 PGE:1; ///< Page Global Enable.
- UINT32 PCE:1; ///< Performance Monitoring Counter
- ///< Enable.
- UINT32 OSFXSR:1; ///< Operating System Support for
- ///< FXSAVE and FXRSTOR instructions
- UINT32 OSXMMEXCPT:1; ///< Operating System Support for
- ///< Unmasked SIMD Floating Point
- ///< Exceptions.
- UINT32 UMIP:1; ///< User-Mode Instruction Prevention.
- UINT32 LA57:1; ///< Linear Address 57bit.
- UINT32 VMXE:1; ///< VMX Enable.
- UINT32 SMXE:1; ///< SMX Enable.
- UINT32 Reserved_3:1; ///< Reserved.
- UINT32 FSGSBASE:1; ///< FSGSBASE Enable.
- UINT32 PCIDE:1; ///< PCID Enable.
- UINT32 OSXSAVE:1; ///< XSAVE and Processor Extended States Enable.
- UINT32 Reserved_4:1; ///< Reserved.
- UINT32 SMEP:1; ///< SMEP Enable.
- UINT32 SMAP:1; ///< SMAP Enable.
- UINT32 PKE:1; ///< Protection-Key Enable.
- UINT32 Reserved_5:9; ///< Reserved.
+ UINT32 VME : 1; ///< Virtual-8086 Mode Extensions.
+ UINT32 PVI : 1; ///< Protected-Mode Virtual Interrupts.
+ UINT32 TSD : 1; ///< Time Stamp Disable.
+ UINT32 DE : 1; ///< Debugging Extensions.
+ UINT32 PSE : 1; ///< Page Size Extensions.
+ UINT32 PAE : 1; ///< Physical Address Extension.
+ UINT32 MCE : 1; ///< Machine Check Enable.
+ UINT32 PGE : 1; ///< Page Global Enable.
+ UINT32 PCE : 1; ///< Performance Monitoring Counter
+ ///< Enable.
+ UINT32 OSFXSR : 1; ///< Operating System Support for
+ ///< FXSAVE and FXRSTOR instructions
+ UINT32 OSXMMEXCPT : 1; ///< Operating System Support for
+ ///< Unmasked SIMD Floating Point
+ ///< Exceptions.
+ UINT32 UMIP : 1; ///< User-Mode Instruction Prevention.
+ UINT32 LA57 : 1; ///< Linear Address 57bit.
+ UINT32 VMXE : 1; ///< VMX Enable.
+ UINT32 SMXE : 1; ///< SMX Enable.
+ UINT32 Reserved_3 : 1; ///< Reserved.
+ UINT32 FSGSBASE : 1; ///< FSGSBASE Enable.
+ UINT32 PCIDE : 1; ///< PCID Enable.
+ UINT32 OSXSAVE : 1; ///< XSAVE and Processor Extended States Enable.
+ UINT32 Reserved_4 : 1; ///< Reserved.
+ UINT32 SMEP : 1; ///< SMEP Enable.
+ UINT32 SMAP : 1; ///< SMAP Enable.
+ UINT32 PKE : 1; ///< Protection-Key Enable.
+ UINT32 Reserved_5 : 9; ///< Reserved.
} Bits;
- UINTN UintN;
+ UINTN UintN;
} IA32_CR4;
///
@@ -5351,32 +5535,32 @@ typedef union {
///
typedef union {
struct {
- UINT32 LimitLow:16;
- UINT32 BaseLow:16;
- UINT32 BaseMid:8;
- UINT32 Type:4;
- UINT32 S:1;
- UINT32 DPL:2;
- UINT32 P:1;
- UINT32 LimitHigh:4;
- UINT32 AVL:1;
- UINT32 L:1;
- UINT32 DB:1;
- UINT32 G:1;
- UINT32 BaseHigh:8;
+ UINT32 LimitLow : 16;
+ UINT32 BaseLow : 16;
+ UINT32 BaseMid : 8;
+ UINT32 Type : 4;
+ UINT32 S : 1;
+ UINT32 DPL : 2;
+ UINT32 P : 1;
+ UINT32 LimitHigh : 4;
+ UINT32 AVL : 1;
+ UINT32 L : 1;
+ UINT32 DB : 1;
+ UINT32 G : 1;
+ UINT32 BaseHigh : 8;
} Bits;
- UINT64 Uint64;
+ UINT64 Uint64;
} IA32_SEGMENT_DESCRIPTOR;
///
/// Byte packed structure for an IDTR, GDTR, LDTR descriptor.
///
-#pragma pack (1)
+ #pragma pack (1)
typedef struct {
- UINT16 Limit;
- UINTN Base;
+ UINT16 Limit;
+ UINTN Base;
} IA32_DESCRIPTOR;
-#pragma pack ()
+ #pragma pack ()
#define IA32_IDT_GATE_TYPE_TASK 0x85
#define IA32_IDT_GATE_TYPE_INTERRUPT_16 0x86
@@ -5384,25 +5568,25 @@ typedef struct {
#define IA32_IDT_GATE_TYPE_INTERRUPT_32 0x8E
#define IA32_IDT_GATE_TYPE_TRAP_32 0x8F
-#define IA32_GDT_TYPE_TSS 0x9
-#define IA32_GDT_ALIGNMENT 8
+#define IA32_GDT_TYPE_TSS 0x9
+#define IA32_GDT_ALIGNMENT 8
-#if defined (MDE_CPU_IA32)
+ #if defined (MDE_CPU_IA32)
///
/// Byte packed structure for an IA-32 Interrupt Gate Descriptor.
///
typedef union {
struct {
- UINT32 OffsetLow:16; ///< Offset bits 15..0.
- UINT32 Selector:16; ///< Selector.
- UINT32 Reserved_0:8; ///< Reserved.
- UINT32 GateType:8; ///< Gate Type. See #defines above.
- UINT32 OffsetHigh:16; ///< Offset bits 31..16.
+ UINT32 OffsetLow : 16; ///< Offset bits 15..0.
+ UINT32 Selector : 16; ///< Selector.
+ UINT32 Reserved_0 : 8; ///< Reserved.
+ UINT32 GateType : 8; ///< Gate Type. See #defines above.
+ UINT32 OffsetHigh : 16; ///< Offset bits 31..16.
} Bits;
- UINT64 Uint64;
+ UINT64 Uint64;
} IA32_IDT_GATE_DESCRIPTOR;
-#pragma pack (1)
+ #pragma pack (1)
//
// IA32 Task-State Segment Definition
//
@@ -5449,46 +5633,46 @@ typedef struct {
typedef union {
struct {
- UINT32 LimitLow:16; ///< Segment Limit 15..00
- UINT32 BaseLow:16; ///< Base Address 15..00
- UINT32 BaseMid:8; ///< Base Address 23..16
- UINT32 Type:4; ///< Type (1 0 B 1)
- UINT32 Reserved_43:1; ///< 0
- UINT32 DPL:2; ///< Descriptor Privilege Level
- UINT32 P:1; ///< Segment Present
- UINT32 LimitHigh:4; ///< Segment Limit 19..16
- UINT32 AVL:1; ///< Available for use by system software
- UINT32 Reserved_52:2; ///< 0 0
- UINT32 G:1; ///< Granularity
- UINT32 BaseHigh:8; ///< Base Address 31..24
+ UINT32 LimitLow : 16; ///< Segment Limit 15..00
+ UINT32 BaseLow : 16; ///< Base Address 15..00
+ UINT32 BaseMid : 8; ///< Base Address 23..16
+ UINT32 Type : 4; ///< Type (1 0 B 1)
+ UINT32 Reserved_43 : 1; ///< 0
+ UINT32 DPL : 2; ///< Descriptor Privilege Level
+ UINT32 P : 1; ///< Segment Present
+ UINT32 LimitHigh : 4; ///< Segment Limit 19..16
+ UINT32 AVL : 1; ///< Available for use by system software
+ UINT32 Reserved_52 : 2; ///< 0 0
+ UINT32 G : 1; ///< Granularity
+ UINT32 BaseHigh : 8; ///< Base Address 31..24
} Bits;
- UINT64 Uint64;
+ UINT64 Uint64;
} IA32_TSS_DESCRIPTOR;
-#pragma pack ()
+ #pragma pack ()
-#endif // defined (MDE_CPU_IA32)
+ #endif // defined (MDE_CPU_IA32)
-#if defined (MDE_CPU_X64)
+ #if defined (MDE_CPU_X64)
///
/// Byte packed structure for an x64 Interrupt Gate Descriptor.
///
typedef union {
struct {
- UINT32 OffsetLow:16; ///< Offset bits 15..0.
- UINT32 Selector:16; ///< Selector.
- UINT32 Reserved_0:8; ///< Reserved.
- UINT32 GateType:8; ///< Gate Type. See #defines above.
- UINT32 OffsetHigh:16; ///< Offset bits 31..16.
- UINT32 OffsetUpper:32; ///< Offset bits 63..32.
- UINT32 Reserved_1:32; ///< Reserved.
+ UINT32 OffsetLow : 16; ///< Offset bits 15..0.
+ UINT32 Selector : 16; ///< Selector.
+ UINT32 Reserved_0 : 8; ///< Reserved.
+ UINT32 GateType : 8; ///< Gate Type. See #defines above.
+ UINT32 OffsetHigh : 16; ///< Offset bits 31..16.
+ UINT32 OffsetUpper : 32; ///< Offset bits 63..32.
+ UINT32 Reserved_1 : 32; ///< Reserved.
} Bits;
struct {
- UINT64 Uint64;
- UINT64 Uint64_1;
+ UINT64 Uint64;
+ UINT64 Uint64_1;
} Uint128;
} IA32_IDT_GATE_DESCRIPTOR;
-#pragma pack (1)
+ #pragma pack (1)
//
// IA32 Task-State Segment Definition
//
@@ -5506,116 +5690,116 @@ typedef struct {
typedef union {
struct {
- UINT32 LimitLow:16; ///< Segment Limit 15..00
- UINT32 BaseLow:16; ///< Base Address 15..00
- UINT32 BaseMidl:8; ///< Base Address 23..16
- UINT32 Type:4; ///< Type (1 0 B 1)
- UINT32 Reserved_43:1; ///< 0
- UINT32 DPL:2; ///< Descriptor Privilege Level
- UINT32 P:1; ///< Segment Present
- UINT32 LimitHigh:4; ///< Segment Limit 19..16
- UINT32 AVL:1; ///< Available for use by system software
- UINT32 Reserved_52:2; ///< 0 0
- UINT32 G:1; ///< Granularity
- UINT32 BaseMidh:8; ///< Base Address 31..24
- UINT32 BaseHigh:32; ///< Base Address 63..32
- UINT32 Reserved_96:32; ///< Reserved
+ UINT32 LimitLow : 16; ///< Segment Limit 15..00
+ UINT32 BaseLow : 16; ///< Base Address 15..00
+ UINT32 BaseMidl : 8; ///< Base Address 23..16
+ UINT32 Type : 4; ///< Type (1 0 B 1)
+ UINT32 Reserved_43 : 1; ///< 0
+ UINT32 DPL : 2; ///< Descriptor Privilege Level
+ UINT32 P : 1; ///< Segment Present
+ UINT32 LimitHigh : 4; ///< Segment Limit 19..16
+ UINT32 AVL : 1; ///< Available for use by system software
+ UINT32 Reserved_52 : 2; ///< 0 0
+ UINT32 G : 1; ///< Granularity
+ UINT32 BaseMidh : 8; ///< Base Address 31..24
+ UINT32 BaseHigh : 32; ///< Base Address 63..32
+ UINT32 Reserved_96 : 32; ///< Reserved
} Bits;
struct {
- UINT64 Uint64;
- UINT64 Uint64_1;
+ UINT64 Uint64;
+ UINT64 Uint64_1;
} Uint128;
} IA32_TSS_DESCRIPTOR;
-#pragma pack ()
+ #pragma pack ()
-#endif // defined (MDE_CPU_X64)
+ #endif // defined (MDE_CPU_X64)
///
/// Byte packed structure for an FP/SSE/SSE2 context.
///
typedef struct {
- UINT8 Buffer[512];
+ UINT8 Buffer[512];
} IA32_FX_BUFFER;
///
/// Structures for the 16-bit real mode thunks.
///
typedef struct {
- UINT32 Reserved1;
- UINT32 Reserved2;
- UINT32 Reserved3;
- UINT32 Reserved4;
- UINT8 BL;
- UINT8 BH;
- UINT16 Reserved5;
- UINT8 DL;
- UINT8 DH;
- UINT16 Reserved6;
- UINT8 CL;
- UINT8 CH;
- UINT16 Reserved7;
- UINT8 AL;
- UINT8 AH;
- UINT16 Reserved8;
+ UINT32 Reserved1;
+ UINT32 Reserved2;
+ UINT32 Reserved3;
+ UINT32 Reserved4;
+ UINT8 BL;
+ UINT8 BH;
+ UINT16 Reserved5;
+ UINT8 DL;
+ UINT8 DH;
+ UINT16 Reserved6;
+ UINT8 CL;
+ UINT8 CH;
+ UINT16 Reserved7;
+ UINT8 AL;
+ UINT8 AH;
+ UINT16 Reserved8;
} IA32_BYTE_REGS;
typedef struct {
- UINT16 DI;
- UINT16 Reserved1;
- UINT16 SI;
- UINT16 Reserved2;
- UINT16 BP;
- UINT16 Reserved3;
- UINT16 SP;
- UINT16 Reserved4;
- UINT16 BX;
- UINT16 Reserved5;
- UINT16 DX;
- UINT16 Reserved6;
- UINT16 CX;
- UINT16 Reserved7;
- UINT16 AX;
- UINT16 Reserved8;
+ UINT16 DI;
+ UINT16 Reserved1;
+ UINT16 SI;
+ UINT16 Reserved2;
+ UINT16 BP;
+ UINT16 Reserved3;
+ UINT16 SP;
+ UINT16 Reserved4;
+ UINT16 BX;
+ UINT16 Reserved5;
+ UINT16 DX;
+ UINT16 Reserved6;
+ UINT16 CX;
+ UINT16 Reserved7;
+ UINT16 AX;
+ UINT16 Reserved8;
} IA32_WORD_REGS;
typedef struct {
- UINT32 EDI;
- UINT32 ESI;
- UINT32 EBP;
- UINT32 ESP;
- UINT32 EBX;
- UINT32 EDX;
- UINT32 ECX;
- UINT32 EAX;
- UINT16 DS;
- UINT16 ES;
- UINT16 FS;
- UINT16 GS;
- IA32_EFLAGS32 EFLAGS;
- UINT32 Eip;
- UINT16 CS;
- UINT16 SS;
+ UINT32 EDI;
+ UINT32 ESI;
+ UINT32 EBP;
+ UINT32 ESP;
+ UINT32 EBX;
+ UINT32 EDX;
+ UINT32 ECX;
+ UINT32 EAX;
+ UINT16 DS;
+ UINT16 ES;
+ UINT16 FS;
+ UINT16 GS;
+ IA32_EFLAGS32 EFLAGS;
+ UINT32 Eip;
+ UINT16 CS;
+ UINT16 SS;
} IA32_DWORD_REGS;
typedef union {
- IA32_DWORD_REGS E;
- IA32_WORD_REGS X;
- IA32_BYTE_REGS H;
+ IA32_DWORD_REGS E;
+ IA32_WORD_REGS X;
+ IA32_BYTE_REGS H;
} IA32_REGISTER_SET;
///
/// Byte packed structure for an 16-bit real mode thunks.
///
typedef struct {
- IA32_REGISTER_SET *RealModeState;
- VOID *RealModeBuffer;
- UINT32 RealModeBufferSize;
- UINT32 ThunkAttributes;
+ IA32_REGISTER_SET *RealModeState;
+ VOID *RealModeBuffer;
+ UINT32 RealModeBufferSize;
+ UINT32 ThunkAttributes;
} THUNK_CONTEXT;
-#define THUNK_ATTRIBUTE_BIG_REAL_MODE 0x00000001
-#define THUNK_ATTRIBUTE_DISABLE_A20_MASK_INT_15 0x00000002
-#define THUNK_ATTRIBUTE_DISABLE_A20_MASK_KBD_CTRL 0x00000004
+#define THUNK_ATTRIBUTE_BIG_REAL_MODE 0x00000001
+#define THUNK_ATTRIBUTE_DISABLE_A20_MASK_INT_15 0x00000002
+#define THUNK_ATTRIBUTE_DISABLE_A20_MASK_KBD_CTRL 0x00000004
///
/// Type definition for representing labels in NASM source code that allow for
@@ -5629,7 +5813,9 @@ typedef struct {
/// edk2 coding style for function (or pointer-to-function) typedefs. The VOID
/// return type and the VOID argument list are merely artifacts.
///
-typedef VOID (X86_ASSEMBLY_PATCH_LABEL) (VOID);
+typedef VOID (X86_ASSEMBLY_PATCH_LABEL) (
+ VOID
+ );
/**
Retrieves CPUID information.
@@ -5659,14 +5845,13 @@ typedef VOID (X86_ASSEMBLY_PATCH_LABEL) (VOID);
UINT32
EFIAPI
AsmCpuid (
- IN UINT32 Index,
- OUT UINT32 *Eax, OPTIONAL
- OUT UINT32 *Ebx, OPTIONAL
- OUT UINT32 *Ecx, OPTIONAL
- OUT UINT32 *Edx OPTIONAL
+ IN UINT32 Index,
+ OUT UINT32 *Eax OPTIONAL,
+ OUT UINT32 *Ebx OPTIONAL,
+ OUT UINT32 *Ecx OPTIONAL,
+ OUT UINT32 *Edx OPTIONAL
);
-
/**
Retrieves CPUID information using an extended leaf identifier.
@@ -5702,15 +5887,14 @@ AsmCpuid (
UINT32
EFIAPI
AsmCpuidEx (
- IN UINT32 Index,
- IN UINT32 SubIndex,
- OUT UINT32 *Eax, OPTIONAL
- OUT UINT32 *Ebx, OPTIONAL
- OUT UINT32 *Ecx, OPTIONAL
- OUT UINT32 *Edx OPTIONAL
+ IN UINT32 Index,
+ IN UINT32 SubIndex,
+ OUT UINT32 *Eax OPTIONAL,
+ OUT UINT32 *Ebx OPTIONAL,
+ OUT UINT32 *Ecx OPTIONAL,
+ OUT UINT32 *Edx OPTIONAL
);
-
/**
Set CD bit and clear NW bit of CR0 followed by a WBINVD.
@@ -5724,7 +5908,6 @@ AsmDisableCache (
VOID
);
-
/**
Perform a WBINVD and clear both the CD and NW bits of CR0.
@@ -5738,7 +5921,6 @@ AsmEnableCache (
VOID
);
-
/**
Returns the lower 32-bits of a Machine Specific Register(MSR).
@@ -5756,10 +5938,9 @@ AsmEnableCache (
UINT32
EFIAPI
AsmReadMsr32 (
- IN UINT32 Index
+ IN UINT32 Index
);
-
/**
Writes a 32-bit value to a Machine Specific Register(MSR), and returns the value.
The upper 32-bits of the MSR are set to zero.
@@ -5780,11 +5961,10 @@ AsmReadMsr32 (
UINT32
EFIAPI
AsmWriteMsr32 (
- IN UINT32 Index,
- IN UINT32 Value
+ IN UINT32 Index,
+ IN UINT32 Value
);
-
/**
Reads a 64-bit MSR, performs a bitwise OR on the lower 32-bits, and
writes the result back to the 64-bit MSR.
@@ -5807,11 +5987,10 @@ AsmWriteMsr32 (
UINT32
EFIAPI
AsmMsrOr32 (
- IN UINT32 Index,
- IN UINT32 OrData
+ IN UINT32 Index,
+ IN UINT32 OrData
);
-
/**
Reads a 64-bit MSR, performs a bitwise AND on the lower 32-bits, and writes
the result back to the 64-bit MSR.
@@ -5834,11 +6013,10 @@ AsmMsrOr32 (
UINT32
EFIAPI
AsmMsrAnd32 (
- IN UINT32 Index,
- IN UINT32 AndData
+ IN UINT32 Index,
+ IN UINT32 AndData
);
-
/**
Reads a 64-bit MSR, performs a bitwise AND followed by a bitwise OR
on the lower 32-bits, and writes the result back to the 64-bit MSR.
@@ -5864,12 +6042,11 @@ AsmMsrAnd32 (
UINT32
EFIAPI
AsmMsrAndThenOr32 (
- IN UINT32 Index,
- IN UINT32 AndData,
- IN UINT32 OrData
+ IN UINT32 Index,
+ IN UINT32 AndData,
+ IN UINT32 OrData
);
-
/**
Reads a bit field of an MSR.
@@ -5895,12 +6072,11 @@ AsmMsrAndThenOr32 (
UINT32
EFIAPI
AsmMsrBitFieldRead32 (
- IN UINT32 Index,
- IN UINTN StartBit,
- IN UINTN EndBit
+ IN UINT32 Index,
+ IN UINTN StartBit,
+ IN UINTN EndBit
);
-
/**
Writes a bit field to an MSR.
@@ -5929,13 +6105,12 @@ AsmMsrBitFieldRead32 (
UINT32
EFIAPI
AsmMsrBitFieldWrite32 (
- IN UINT32 Index,
- IN UINTN StartBit,
- IN UINTN EndBit,
- IN UINT32 Value
+ IN UINT32 Index,
+ IN UINTN StartBit,
+ IN UINTN EndBit,
+ IN UINT32 Value
);
-
/**
Reads a bit field in a 64-bit MSR, performs a bitwise OR, and writes the
result back to the bit field in the 64-bit MSR.
@@ -5966,13 +6141,12 @@ AsmMsrBitFieldWrite32 (
UINT32
EFIAPI
AsmMsrBitFieldOr32 (
- IN UINT32 Index,
- IN UINTN StartBit,
- IN UINTN EndBit,
- IN UINT32 OrData
+ IN UINT32 Index,
+ IN UINTN StartBit,
+ IN UINTN EndBit,
+ IN UINT32 OrData
);
-
/**
Reads a bit field in a 64-bit MSR, performs a bitwise AND, and writes the
result back to the bit field in the 64-bit MSR.
@@ -6003,13 +6177,12 @@ AsmMsrBitFieldOr32 (
UINT32
EFIAPI
AsmMsrBitFieldAnd32 (
- IN UINT32 Index,
- IN UINTN StartBit,
- IN UINTN EndBit,
- IN UINT32 AndData
+ IN UINT32 Index,
+ IN UINTN StartBit,
+ IN UINTN EndBit,
+ IN UINT32 AndData
);
-
/**
Reads a bit field in a 64-bit MSR, performs a bitwise AND followed by a
bitwise OR, and writes the result back to the bit field in the
@@ -6044,14 +6217,13 @@ AsmMsrBitFieldAnd32 (
UINT32
EFIAPI
AsmMsrBitFieldAndThenOr32 (
- IN UINT32 Index,
- IN UINTN StartBit,
- IN UINTN EndBit,
- IN UINT32 AndData,
- IN UINT32 OrData
+ IN UINT32 Index,
+ IN UINTN StartBit,
+ IN UINTN EndBit,
+ IN UINT32 AndData,
+ IN UINT32 OrData
);
-
/**
Returns a 64-bit Machine Specific Register(MSR).
@@ -6069,10 +6241,9 @@ AsmMsrBitFieldAndThenOr32 (
UINT64
EFIAPI
AsmReadMsr64 (
- IN UINT32 Index
+ IN UINT32 Index
);
-
/**
Writes a 64-bit value to a Machine Specific Register(MSR), and returns the
value.
@@ -6093,11 +6264,10 @@ AsmReadMsr64 (
UINT64
EFIAPI
AsmWriteMsr64 (
- IN UINT32 Index,
- IN UINT64 Value
+ IN UINT32 Index,
+ IN UINT64 Value
);
-
/**
Reads a 64-bit MSR, performs a bitwise OR, and writes the result
back to the 64-bit MSR.
@@ -6119,11 +6289,10 @@ AsmWriteMsr64 (
UINT64
EFIAPI
AsmMsrOr64 (
- IN UINT32 Index,
- IN UINT64 OrData
+ IN UINT32 Index,
+ IN UINT64 OrData
);
-
/**
Reads a 64-bit MSR, performs a bitwise AND, and writes the result back to the
64-bit MSR.
@@ -6145,11 +6314,10 @@ AsmMsrOr64 (
UINT64
EFIAPI
AsmMsrAnd64 (
- IN UINT32 Index,
- IN UINT64 AndData
+ IN UINT32 Index,
+ IN UINT64 AndData
);
-
/**
Reads a 64-bit MSR, performs a bitwise AND followed by a bitwise
OR, and writes the result back to the 64-bit MSR.
@@ -6174,12 +6342,11 @@ AsmMsrAnd64 (
UINT64
EFIAPI
AsmMsrAndThenOr64 (
- IN UINT32 Index,
- IN UINT64 AndData,
- IN UINT64 OrData
+ IN UINT32 Index,
+ IN UINT64 AndData,
+ IN UINT64 OrData
);
-
/**
Reads a bit field of an MSR.
@@ -6205,12 +6372,11 @@ AsmMsrAndThenOr64 (
UINT64
EFIAPI
AsmMsrBitFieldRead64 (
- IN UINT32 Index,
- IN UINTN StartBit,
- IN UINTN EndBit
+ IN UINT32 Index,
+ IN UINTN StartBit,
+ IN UINTN EndBit
);
-
/**
Writes a bit field to an MSR.
@@ -6238,13 +6404,12 @@ AsmMsrBitFieldRead64 (
UINT64
EFIAPI
AsmMsrBitFieldWrite64 (
- IN UINT32 Index,
- IN UINTN StartBit,
- IN UINTN EndBit,
- IN UINT64 Value
+ IN UINT32 Index,
+ IN UINTN StartBit,
+ IN UINTN EndBit,
+ IN UINT64 Value
);
-
/**
Reads a bit field in a 64-bit MSR, performs a bitwise OR, and
writes the result back to the bit field in the 64-bit MSR.
@@ -6275,13 +6440,12 @@ AsmMsrBitFieldWrite64 (
UINT64
EFIAPI
AsmMsrBitFieldOr64 (
- IN UINT32 Index,
- IN UINTN StartBit,
- IN UINTN EndBit,
- IN UINT64 OrData
+ IN UINT32 Index,
+ IN UINTN StartBit,
+ IN UINTN EndBit,
+ IN UINT64 OrData
);
-
/**
Reads a bit field in a 64-bit MSR, performs a bitwise AND, and writes the
result back to the bit field in the 64-bit MSR.
@@ -6312,13 +6476,12 @@ AsmMsrBitFieldOr64 (
UINT64
EFIAPI
AsmMsrBitFieldAnd64 (
- IN UINT32 Index,
- IN UINTN StartBit,
- IN UINTN EndBit,
- IN UINT64 AndData
+ IN UINT32 Index,
+ IN UINTN StartBit,
+ IN UINTN EndBit,
+ IN UINT64 AndData
);
-
/**
Reads a bit field in a 64-bit MSR, performs a bitwise AND followed by a
bitwise OR, and writes the result back to the bit field in the
@@ -6352,14 +6515,13 @@ AsmMsrBitFieldAnd64 (
UINT64
EFIAPI
AsmMsrBitFieldAndThenOr64 (
- IN UINT32 Index,
- IN UINTN StartBit,
- IN UINTN EndBit,
- IN UINT64 AndData,
- IN UINT64 OrData
+ IN UINT32 Index,
+ IN UINTN StartBit,
+ IN UINTN EndBit,
+ IN UINT64 AndData,
+ IN UINT64 OrData
);
-
/**
Reads the current value of the EFLAGS register.
@@ -6376,7 +6538,6 @@ AsmReadEflags (
VOID
);
-
/**
Reads the current value of the Control Register 0 (CR0).
@@ -6393,7 +6554,6 @@ AsmReadCr0 (
VOID
);
-
/**
Reads the current value of the Control Register 2 (CR2).
@@ -6410,7 +6570,6 @@ AsmReadCr2 (
VOID
);
-
/**
Reads the current value of the Control Register 3 (CR3).
@@ -6427,7 +6586,6 @@ AsmReadCr3 (
VOID
);
-
/**
Reads the current value of the Control Register 4 (CR4).
@@ -6444,7 +6602,6 @@ AsmReadCr4 (
VOID
);
-
/**
Writes a value to Control Register 0 (CR0).
@@ -6462,7 +6619,6 @@ AsmWriteCr0 (
UINTN Cr0
);
-
/**
Writes a value to Control Register 2 (CR2).
@@ -6480,7 +6636,6 @@ AsmWriteCr2 (
UINTN Cr2
);
-
/**
Writes a value to Control Register 3 (CR3).
@@ -6498,7 +6653,6 @@ AsmWriteCr3 (
UINTN Cr3
);
-
/**
Writes a value to Control Register 4 (CR4).
@@ -6516,7 +6670,6 @@ AsmWriteCr4 (
UINTN Cr4
);
-
/**
Reads the current value of Debug Register 0 (DR0).
@@ -6533,7 +6686,6 @@ AsmReadDr0 (
VOID
);
-
/**
Reads the current value of Debug Register 1 (DR1).
@@ -6550,7 +6702,6 @@ AsmReadDr1 (
VOID
);
-
/**
Reads the current value of Debug Register 2 (DR2).
@@ -6567,7 +6718,6 @@ AsmReadDr2 (
VOID
);
-
/**
Reads the current value of Debug Register 3 (DR3).
@@ -6584,7 +6734,6 @@ AsmReadDr3 (
VOID
);
-
/**
Reads the current value of Debug Register 4 (DR4).
@@ -6601,7 +6750,6 @@ AsmReadDr4 (
VOID
);
-
/**
Reads the current value of Debug Register 5 (DR5).
@@ -6618,7 +6766,6 @@ AsmReadDr5 (
VOID
);
-
/**
Reads the current value of Debug Register 6 (DR6).
@@ -6635,7 +6782,6 @@ AsmReadDr6 (
VOID
);
-
/**
Reads the current value of Debug Register 7 (DR7).
@@ -6652,7 +6798,6 @@ AsmReadDr7 (
VOID
);
-
/**
Writes a value to Debug Register 0 (DR0).
@@ -6670,7 +6815,6 @@ AsmWriteDr0 (
UINTN Dr0
);
-
/**
Writes a value to Debug Register 1 (DR1).
@@ -6688,7 +6832,6 @@ AsmWriteDr1 (
UINTN Dr1
);
-
/**
Writes a value to Debug Register 2 (DR2).
@@ -6706,7 +6849,6 @@ AsmWriteDr2 (
UINTN Dr2
);
-
/**
Writes a value to Debug Register 3 (DR3).
@@ -6724,7 +6866,6 @@ AsmWriteDr3 (
UINTN Dr3
);
-
/**
Writes a value to Debug Register 4 (DR4).
@@ -6742,7 +6883,6 @@ AsmWriteDr4 (
UINTN Dr4
);
-
/**
Writes a value to Debug Register 5 (DR5).
@@ -6760,7 +6900,6 @@ AsmWriteDr5 (
UINTN Dr5
);
-
/**
Writes a value to Debug Register 6 (DR6).
@@ -6778,7 +6917,6 @@ AsmWriteDr6 (
UINTN Dr6
);
-
/**
Writes a value to Debug Register 7 (DR7).
@@ -6796,7 +6934,6 @@ AsmWriteDr7 (
UINTN Dr7
);
-
/**
Reads the current value of Code Segment Register (CS).
@@ -6812,7 +6949,6 @@ AsmReadCs (
VOID
);
-
/**
Reads the current value of Data Segment Register (DS).
@@ -6828,7 +6964,6 @@ AsmReadDs (
VOID
);
-
/**
Reads the current value of Extra Segment Register (ES).
@@ -6844,7 +6979,6 @@ AsmReadEs (
VOID
);
-
/**
Reads the current value of FS Data Segment Register (FS).
@@ -6860,7 +6994,6 @@ AsmReadFs (
VOID
);
-
/**
Reads the current value of GS Data Segment Register (GS).
@@ -6876,7 +7009,6 @@ AsmReadGs (
VOID
);
-
/**
Reads the current value of Stack Segment Register (SS).
@@ -6892,7 +7024,6 @@ AsmReadSs (
VOID
);
-
/**
Reads the current value of Task Register (TR).
@@ -6908,7 +7039,6 @@ AsmReadTr (
VOID
);
-
/**
Reads the current Global Descriptor Table Register(GDTR) descriptor.
@@ -6923,10 +7053,9 @@ AsmReadTr (
VOID
EFIAPI
AsmReadGdtr (
- OUT IA32_DESCRIPTOR *Gdtr
+ OUT IA32_DESCRIPTOR *Gdtr
);
-
/**
Writes the current Global Descriptor Table Register (GDTR) descriptor.
@@ -6941,10 +7070,9 @@ AsmReadGdtr (
VOID
EFIAPI
AsmWriteGdtr (
- IN CONST IA32_DESCRIPTOR *Gdtr
+ IN CONST IA32_DESCRIPTOR *Gdtr
);
-
/**
Reads the current Interrupt Descriptor Table Register(IDTR) descriptor.
@@ -6959,10 +7087,9 @@ AsmWriteGdtr (
VOID
EFIAPI
AsmReadIdtr (
- OUT IA32_DESCRIPTOR *Idtr
+ OUT IA32_DESCRIPTOR *Idtr
);
-
/**
Writes the current Interrupt Descriptor Table Register(IDTR) descriptor.
@@ -6977,10 +7104,9 @@ AsmReadIdtr (
VOID
EFIAPI
AsmWriteIdtr (
- IN CONST IA32_DESCRIPTOR *Idtr
+ IN CONST IA32_DESCRIPTOR *Idtr
);
-
/**
Reads the current Local Descriptor Table Register(LDTR) selector.
@@ -6996,7 +7122,6 @@ AsmReadLdtr (
VOID
);
-
/**
Writes the current Local Descriptor Table Register (LDTR) selector.
@@ -7009,10 +7134,9 @@ AsmReadLdtr (
VOID
EFIAPI
AsmWriteLdtr (
- IN UINT16 Ldtr
+ IN UINT16 Ldtr
);
-
/**
Save the current floating point/SSE/SSE2 context to a buffer.
@@ -7029,10 +7153,9 @@ AsmWriteLdtr (
VOID
EFIAPI
AsmFxSave (
- OUT IA32_FX_BUFFER *Buffer
+ OUT IA32_FX_BUFFER *Buffer
);
-
/**
Restores the current floating point/SSE/SSE2 context from a buffer.
@@ -7050,10 +7173,9 @@ AsmFxSave (
VOID
EFIAPI
AsmFxRestore (
- IN CONST IA32_FX_BUFFER *Buffer
+ IN CONST IA32_FX_BUFFER *Buffer
);
-
/**
Reads the current value of 64-bit MMX Register #0 (MM0).
@@ -7069,7 +7191,6 @@ AsmReadMm0 (
VOID
);
-
/**
Reads the current value of 64-bit MMX Register #1 (MM1).
@@ -7085,7 +7206,6 @@ AsmReadMm1 (
VOID
);
-
/**
Reads the current value of 64-bit MMX Register #2 (MM2).
@@ -7101,7 +7221,6 @@ AsmReadMm2 (
VOID
);
-
/**
Reads the current value of 64-bit MMX Register #3 (MM3).
@@ -7117,7 +7236,6 @@ AsmReadMm3 (
VOID
);
-
/**
Reads the current value of 64-bit MMX Register #4 (MM4).
@@ -7133,7 +7251,6 @@ AsmReadMm4 (
VOID
);
-
/**
Reads the current value of 64-bit MMX Register #5 (MM5).
@@ -7149,7 +7266,6 @@ AsmReadMm5 (
VOID
);
-
/**
Reads the current value of 64-bit MMX Register #6 (MM6).
@@ -7165,7 +7281,6 @@ AsmReadMm6 (
VOID
);
-
/**
Reads the current value of 64-bit MMX Register #7 (MM7).
@@ -7181,7 +7296,6 @@ AsmReadMm7 (
VOID
);
-
/**
Writes the current value of 64-bit MMX Register #0 (MM0).
@@ -7194,10 +7308,9 @@ AsmReadMm7 (
VOID
EFIAPI
AsmWriteMm0 (
- IN UINT64 Value
+ IN UINT64 Value
);
-
/**
Writes the current value of 64-bit MMX Register #1 (MM1).
@@ -7210,10 +7323,9 @@ AsmWriteMm0 (
VOID
EFIAPI
AsmWriteMm1 (
- IN UINT64 Value
+ IN UINT64 Value
);
-
/**
Writes the current value of 64-bit MMX Register #2 (MM2).
@@ -7226,10 +7338,9 @@ AsmWriteMm1 (
VOID
EFIAPI
AsmWriteMm2 (
- IN UINT64 Value
+ IN UINT64 Value
);
-
/**
Writes the current value of 64-bit MMX Register #3 (MM3).
@@ -7242,10 +7353,9 @@ AsmWriteMm2 (
VOID
EFIAPI
AsmWriteMm3 (
- IN UINT64 Value
+ IN UINT64 Value
);
-
/**
Writes the current value of 64-bit MMX Register #4 (MM4).
@@ -7258,10 +7368,9 @@ AsmWriteMm3 (
VOID
EFIAPI
AsmWriteMm4 (
- IN UINT64 Value
+ IN UINT64 Value
);
-
/**
Writes the current value of 64-bit MMX Register #5 (MM5).
@@ -7274,10 +7383,9 @@ AsmWriteMm4 (
VOID
EFIAPI
AsmWriteMm5 (
- IN UINT64 Value
+ IN UINT64 Value
);
-
/**
Writes the current value of 64-bit MMX Register #6 (MM6).
@@ -7290,10 +7398,9 @@ AsmWriteMm5 (
VOID
EFIAPI
AsmWriteMm6 (
- IN UINT64 Value
+ IN UINT64 Value
);
-
/**
Writes the current value of 64-bit MMX Register #7 (MM7).
@@ -7306,10 +7413,9 @@ AsmWriteMm6 (
VOID
EFIAPI
AsmWriteMm7 (
- IN UINT64 Value
+ IN UINT64 Value
);
-
/**
Reads the current value of Time Stamp Counter (TSC).
@@ -7325,7 +7431,6 @@ AsmReadTsc (
VOID
);
-
/**
Reads the current value of a Performance Counter (PMC).
@@ -7340,10 +7445,9 @@ AsmReadTsc (
UINT64
EFIAPI
AsmReadPmc (
- IN UINT32 Index
+ IN UINT32 Index
);
-
/**
Sets up a monitor buffer that is used by AsmMwait().
@@ -7363,12 +7467,11 @@ AsmReadPmc (
UINTN
EFIAPI
AsmMonitor (
- IN UINTN Eax,
- IN UINTN Ecx,
- IN UINTN Edx
+ IN UINTN Eax,
+ IN UINTN Ecx,
+ IN UINTN Edx
);
-
/**
Executes an MWAIT instruction.
@@ -7386,11 +7489,10 @@ AsmMonitor (
UINTN
EFIAPI
AsmMwait (
- IN UINTN Eax,
- IN UINTN Ecx
+ IN UINTN Eax,
+ IN UINTN Ecx
);
-
/**
Executes a WBINVD instruction.
@@ -7404,7 +7506,6 @@ AsmWbinvd (
VOID
);
-
/**
Executes a INVD instruction.
@@ -7418,7 +7519,6 @@ AsmInvd (
VOID
);
-
/**
Flushes a cache line from all the instruction and data caches within the
coherency domain of the CPU.
@@ -7437,10 +7537,9 @@ AsmInvd (
VOID *
EFIAPI
AsmFlushCacheLine (
- IN VOID *LinearAddress
+ IN VOID *LinearAddress
);
-
/**
Enables the 32-bit paging mode on the CPU.
@@ -7482,12 +7581,11 @@ VOID
EFIAPI
AsmEnablePaging32 (
IN SWITCH_STACK_ENTRY_POINT EntryPoint,
- IN VOID *Context1, OPTIONAL
- IN VOID *Context2, OPTIONAL
+ IN VOID *Context1 OPTIONAL,
+ IN VOID *Context2 OPTIONAL,
IN VOID *NewStack
);
-
/**
Disables the 32-bit paging mode on the CPU.
@@ -7526,12 +7624,11 @@ VOID
EFIAPI
AsmDisablePaging32 (
IN SWITCH_STACK_ENTRY_POINT EntryPoint,
- IN VOID *Context1, OPTIONAL
- IN VOID *Context2, OPTIONAL
+ IN VOID *Context1 OPTIONAL,
+ IN VOID *Context2 OPTIONAL,
IN VOID *NewStack
);
-
/**
Enables the 64-bit paging mode on the CPU.
@@ -7567,14 +7664,13 @@ AsmDisablePaging32 (
VOID
EFIAPI
AsmEnablePaging64 (
- IN UINT16 Cs,
- IN UINT64 EntryPoint,
- IN UINT64 Context1, OPTIONAL
- IN UINT64 Context2, OPTIONAL
- IN UINT64 NewStack
+ IN UINT16 Cs,
+ IN UINT64 EntryPoint,
+ IN UINT64 Context1 OPTIONAL,
+ IN UINT64 Context2 OPTIONAL,
+ IN UINT64 NewStack
);
-
/**
Disables the 64-bit paging mode on the CPU.
@@ -7608,14 +7704,13 @@ AsmEnablePaging64 (
VOID
EFIAPI
AsmDisablePaging64 (
- IN UINT16 Cs,
- IN UINT32 EntryPoint,
- IN UINT32 Context1, OPTIONAL
- IN UINT32 Context2, OPTIONAL
- IN UINT32 NewStack
+ IN UINT16 Cs,
+ IN UINT32 EntryPoint,
+ IN UINT32 Context1 OPTIONAL,
+ IN UINT32 Context2 OPTIONAL,
+ IN UINT32 NewStack
);
-
//
// 16-bit thunking services
//
@@ -7644,11 +7739,10 @@ AsmDisablePaging64 (
VOID
EFIAPI
AsmGetThunk16Properties (
- OUT UINT32 *RealModeBufferSize,
- OUT UINT32 *ExtraStackSize
+ OUT UINT32 *RealModeBufferSize,
+ OUT UINT32 *ExtraStackSize
);
-
/**
Prepares all structures a code required to use AsmThunk16().
@@ -7666,10 +7760,9 @@ AsmGetThunk16Properties (
VOID
EFIAPI
AsmPrepareThunk16 (
- IN OUT THUNK_CONTEXT *ThunkContext
+ IN OUT THUNK_CONTEXT *ThunkContext
);
-
/**
Transfers control to a 16-bit real mode entry point and returns the results.
@@ -7726,10 +7819,9 @@ AsmPrepareThunk16 (
VOID
EFIAPI
AsmThunk16 (
- IN OUT THUNK_CONTEXT *ThunkContext
+ IN OUT THUNK_CONTEXT *ThunkContext
);
-
/**
Prepares all structures and code for a 16-bit real mode thunk, transfers
control to a 16-bit real mode entry point, and returns the results.
@@ -7753,7 +7845,7 @@ AsmThunk16 (
VOID
EFIAPI
AsmPrepareAndThunk16 (
- IN OUT THUNK_CONTEXT *ThunkContext
+ IN OUT THUNK_CONTEXT *ThunkContext
);
/**
@@ -7770,7 +7862,7 @@ AsmPrepareAndThunk16 (
BOOLEAN
EFIAPI
AsmRdRand16 (
- OUT UINT16 *Rand
+ OUT UINT16 *Rand
);
/**
@@ -7787,7 +7879,7 @@ AsmRdRand16 (
BOOLEAN
EFIAPI
AsmRdRand32 (
- OUT UINT32 *Rand
+ OUT UINT32 *Rand
);
/**
@@ -7804,7 +7896,7 @@ AsmRdRand32 (
BOOLEAN
EFIAPI
AsmRdRand64 (
- OUT UINT64 *Rand
+ OUT UINT64 *Rand
);
/**
@@ -7815,7 +7907,7 @@ AsmRdRand64 (
VOID
EFIAPI
AsmWriteTr (
- IN UINT16 Selector
+ IN UINT16 Selector
);
/**
@@ -7832,6 +7924,98 @@ AsmLfence (
);
/**
+ Executes a XGETBV instruction
+
+ Executes a XGETBV instruction. This function is only available on IA-32 and
+ x64.
+
+ @param[in] Index Extended control register index
+
+ @return The current value of the extended control register
+**/
+UINT64
+EFIAPI
+AsmXGetBv (
+ IN UINT32 Index
+ );
+
+/**
+ Executes a XSETBV instruction to write a 64-bit value to a Extended Control
+ Register(XCR), and returns the value.
+
+ Writes the 64-bit value specified by Value to the XCR specified by Index. The
+ 64-bit value written to the XCR is returned. No parameter checking is
+ performed on Index or Value, and some of these may cause CPU exceptions. The
+ caller must either guarantee that Index and Value are valid, or the caller
+ must establish proper exception handlers. This function is only available on
+ IA-32 and x64.
+
+ @param Index The 32-bit XCR index to write.
+ @param Value The 64-bit value to write to the XCR.
+
+ @return Value
+
+**/
+UINT64
+EFIAPI
+AsmXSetBv (
+ IN UINT32 Index,
+ IN UINT64 Value
+ );
+
+/**
+ Executes a VMGEXIT instruction (VMMCALL with a REP prefix)
+
+ Executes a VMGEXIT instruction. This function is only available on IA-32 and
+ x64.
+
+**/
+VOID
+EFIAPI
+AsmVmgExit (
+ VOID
+ );
+
+///
+/// The structure used to supply and return data to and from the SVSM.
+///
+typedef struct {
+ VOID *Caa;
+ UINT64 RaxIn;
+ UINT64 RcxIn;
+ UINT64 RdxIn;
+ UINT64 R8In;
+ UINT64 R9In;
+ UINT64 RaxOut;
+ UINT64 RcxOut;
+ UINT64 RdxOut;
+ UINT64 R8Out;
+ UINT64 R9Out;
+ UINT8 *CallPending;
+} SVSM_CALL_DATA;
+
+/**
+ Executes a VMGEXIT instruction (VMMCALL with a REP prefix) with arguments
+ and return code
+
+ Executes a VMGEXIT instruction placing the specified arguments in the
+ corresponding registers before invocation. Upon return an XCHG is done to
+ atomically clear and retrieve the SVSM call pending value. The returned RAX
+ register value becomes the function return code. This function is intended
+ for use with an SVSM. This function is only available on IA-32 and x64.
+
+ @param[in,out] SvsmCallPending Pointer to the location of the SVSM call data
+
+ @return Value of the RAX register on return
+
+**/
+UINT32
+EFIAPI
+AsmVmgExitSvsm (
+ IN OUT SVSM_CALL_DATA *SvsmCallData
+ );
+
+/**
Patch the immediate operand of an IA32 or X64 instruction such that the byte,
word, dword or qword operand is encoded at the end of the instruction's
binary representation.
@@ -7868,9 +8052,9 @@ AsmLfence (
VOID
EFIAPI
PatchInstructionX86 (
- OUT X86_ASSEMBLY_PATCH_LABEL *InstructionEnd,
- IN UINT64 PatchValue,
- IN UINTN ValueSize
+ OUT X86_ASSEMBLY_PATCH_LABEL *InstructionEnd,
+ IN UINT64 PatchValue,
+ IN UINTN ValueSize
);
#endif // defined (MDE_CPU_IA32) || defined (MDE_CPU_X64)
diff --git a/sys/contrib/edk2/Include/Library/DebugLib.h b/sys/contrib/edk2/Include/Library/DebugLib.h
index d71dacd79d4a..83cacfe7570b 100644
--- a/sys/contrib/edk2/Include/Library/DebugLib.h
+++ b/sys/contrib/edk2/Include/Library/DebugLib.h
@@ -8,6 +8,13 @@
of size reduction when compiler optimization is disabled. If MDEPKG_NDEBUG is
defined, then debug and assert related macros wrapped by it are the NULL implementations.
+ The implementations of the macros used when MDEPKG_NDEBUG is defined rely on the fact that
+ directly unreachable code is pruned, even with compiler optimization disabled (which has
+ been confirmed by generated code size tests on supported compilers). The advantage of
+ implementations which consume their arguments within directly unreachable code is that
+ compilers understand this, and stop warning about variables which would become unused when
+ MDEPKG_NDEBUG is defined if the macros had completely empty definitions.
+
Copyright (c) 2006 - 2020, Intel Corporation. All rights reserved.<BR>
SPDX-License-Identifier: BSD-2-Clause-Patent
@@ -29,26 +36,28 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
//
// Declare bits for PcdDebugPrintErrorLevel and the ErrorLevel parameter of DebugPrint()
//
-#define DEBUG_INIT 0x00000001 // Initialization
-#define DEBUG_WARN 0x00000002 // Warnings
-#define DEBUG_LOAD 0x00000004 // Load events
-#define DEBUG_FS 0x00000008 // EFI File system
-#define DEBUG_POOL 0x00000010 // Alloc & Free (pool)
-#define DEBUG_PAGE 0x00000020 // Alloc & Free (page)
-#define DEBUG_INFO 0x00000040 // Informational debug messages
-#define DEBUG_DISPATCH 0x00000080 // PEI/DXE/SMM Dispatchers
-#define DEBUG_VARIABLE 0x00000100 // Variable
-#define DEBUG_BM 0x00000400 // Boot Manager
-#define DEBUG_BLKIO 0x00001000 // BlkIo Driver
-#define DEBUG_NET 0x00004000 // Network Io Driver
-#define DEBUG_UNDI 0x00010000 // UNDI Driver
-#define DEBUG_LOADFILE 0x00020000 // LoadFile
-#define DEBUG_EVENT 0x00080000 // Event messages
-#define DEBUG_GCD 0x00100000 // Global Coherency Database changes
-#define DEBUG_CACHE 0x00200000 // Memory range cachability changes
-#define DEBUG_VERBOSE 0x00400000 // Detailed debug messages that may
- // significantly impact boot performance
-#define DEBUG_ERROR 0x80000000 // Error
+#define DEBUG_INIT 0x00000001 // Initialization
+#define DEBUG_WARN 0x00000002 // Warnings
+#define DEBUG_LOAD 0x00000004 // Load events
+#define DEBUG_FS 0x00000008 // EFI File system
+#define DEBUG_POOL 0x00000010 // Alloc & Free (pool)
+#define DEBUG_PAGE 0x00000020 // Alloc & Free (page)
+#define DEBUG_INFO 0x00000040 // Informational debug messages
+#define DEBUG_DISPATCH 0x00000080 // PEI/DXE/SMM Dispatchers
+#define DEBUG_VARIABLE 0x00000100 // Variable
+#define DEBUG_BM 0x00000400 // Boot Manager
+#define DEBUG_BLKIO 0x00001000 // BlkIo Driver
+#define DEBUG_NET 0x00004000 // Network Io Driver
+#define DEBUG_UNDI 0x00010000 // UNDI Driver
+#define DEBUG_LOADFILE 0x00020000 // LoadFile
+#define DEBUG_EVENT 0x00080000 // Event messages
+#define DEBUG_GCD 0x00100000 // Global Coherency Database changes
+#define DEBUG_CACHE 0x00200000 // Memory range cachability changes
+#define DEBUG_VERBOSE 0x00400000 // Detailed debug messages that may
+ // significantly impact boot performance
+#define DEBUG_MANAGEABILITY 0x00800000 // Detailed debug and payload manageability messages
+ // related to modules such as Redfish, IPMI, MCTP etc.
+#define DEBUG_ERROR 0x80000000 // Error
//
// Aliases of debug message mask bits
@@ -71,6 +80,41 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
#define EFI_D_VERBOSE DEBUG_VERBOSE
#define EFI_D_ERROR DEBUG_ERROR
+//
+// Source file line number.
+// Default is use the to compiler provided __LINE__ macro value. The __LINE__
+// mapping can be overriden by predefining DEBUG_LINE_NUMBER
+//
+// Defining DEBUG_LINE_NUMBER to a fixed value is useful when comparing builds
+// across source code formatting changes that may add/remove lines in a source
+// file.
+//
+#ifdef DEBUG_LINE_NUMBER
+#else
+#define DEBUG_LINE_NUMBER __LINE__
+#endif
+
+/**
+ Macro that converts a Boolean expression to a Null-terminated ASCII string.
+
+ The default is to use the C pre-processor stringizing operator '#' to add
+ quotes around the C expression. If DEBUG_EXPRESSION_STRING_VALUE is defined
+ then the C expression is converted to the fixed string value.
+
+ Defining DEBUG_EXPRESSION_STRING_VALUE to a fixed value is useful when
+ comparing builds across source code formatting changes that may make
+ changes to spaces or parenthesis in a Boolean expression.
+
+ @param Expression Boolean expression.
+
+**/
+
+#ifdef DEBUG_EXPRESSION_STRING_VALUE
+#define DEBUG_EXPRESSION_STRING(Expression) DEBUG_EXPRESSION_STRING_VALUE
+#else
+#define DEBUG_EXPRESSION_STRING(Expression) #Expression
+#endif
+
/**
Prints a debug message to the debug output device if the specified error level is enabled.
@@ -94,7 +138,6 @@ DebugPrint (
...
);
-
/**
Prints a debug message to the debug output device if the specified
error level is enabled.
@@ -113,12 +156,11 @@ DebugPrint (
VOID
EFIAPI
DebugVPrint (
- IN UINTN ErrorLevel,
- IN CONST CHAR8 *Format,
- IN VA_LIST VaListMarker
+ IN UINTN ErrorLevel,
+ IN CONST CHAR8 *Format,
+ IN VA_LIST VaListMarker
);
-
/**
Prints a debug message to the debug output device if the specified
error level is enabled.
@@ -139,12 +181,11 @@ DebugVPrint (
VOID
EFIAPI
DebugBPrint (
- IN UINTN ErrorLevel,
- IN CONST CHAR8 *Format,
- IN BASE_LIST BaseListMarker
+ IN UINTN ErrorLevel,
+ IN CONST CHAR8 *Format,
+ IN BASE_LIST BaseListMarker
);
-
/**
Prints an assert message containing a filename, line number, and description.
This may be followed by a breakpoint or a dead loop.
@@ -174,7 +215,6 @@ DebugAssert (
IN CONST CHAR8 *Description
);
-
/**
Fills a target buffer with PcdDebugClearMemoryValue, and returns the target buffer.
@@ -197,7 +237,6 @@ DebugClearMemory (
IN UINTN Length
);
-
/**
Returns TRUE if ASSERT() macros are enabled.
@@ -214,7 +253,6 @@ DebugAssertEnabled (
VOID
);
-
/**
Returns TRUE if DEBUG() macros are enabled.
@@ -231,7 +269,6 @@ DebugPrintEnabled (
VOID
);
-
/**
Returns TRUE if DEBUG_CODE() macros are enabled.
@@ -248,7 +285,6 @@ DebugCodeEnabled (
VOID
);
-
/**
Returns TRUE if DEBUG_CLEAR_MEMORY() macro is enabled.
@@ -277,7 +313,7 @@ DebugClearMemoryEnabled (
BOOLEAN
EFIAPI
DebugPrintLevelEnabled (
- IN CONST UINTN ErrorLevel
+ IN CONST UINTN ErrorLevel
);
/**
@@ -289,13 +325,43 @@ DebugPrintLevelEnabled (
@param Expression Boolean expression that evaluated to FALSE
**/
-#if defined(__clang__) && defined(__FILE_NAME__)
-#define _ASSERT(Expression) DebugAssert (__FILE_NAME__, __LINE__, #Expression)
+#if defined (EDKII_UNIT_TEST_FRAMEWORK_ENABLED)
+
+/**
+ Unit test library replacement for DebugAssert() in DebugLib.
+
+ If FileName is NULL, then a <FileName> string of "(NULL) Filename" is printed.
+ If Description is NULL, then a <Description> string of "(NULL) Description" is printed.
+
+ @param FileName The pointer to the name of the source file that generated the assert condition.
+ @param LineNumber The line number in the source file that generated the assert condition
+ @param Description The pointer to the description of the assert condition.
+
+**/
+VOID
+EFIAPI
+UnitTestDebugAssert (
+ IN CONST CHAR8 *FileName,
+ IN UINTN LineNumber,
+ IN CONST CHAR8 *Description
+ );
+
+ #if defined (_ASSERT)
+ #undef _ASSERT
+ #endif
+ #if defined (__FILE_NAME__)
+#define _ASSERT(Expression) UnitTestDebugAssert (__FILE_NAME__, DEBUG_LINE_NUMBER, DEBUG_EXPRESSION_STRING (Expression))
+ #else
+#define _ASSERT(Expression) UnitTestDebugAssert (__FILE__, DEBUG_LINE_NUMBER, DEBUG_EXPRESSION_STRING (Expression))
+ #endif
#else
-#define _ASSERT(Expression) DebugAssert (__FILE__, __LINE__, #Expression)
+ #if defined (__FILE_NAME__)
+#define _ASSERT(Expression) DebugAssert (__FILE_NAME__, DEBUG_LINE_NUMBER, DEBUG_EXPRESSION_STRING (Expression))
+ #else
+#define _ASSERT(Expression) DebugAssert (__FILE__, DEBUG_LINE_NUMBER, DEBUG_EXPRESSION_STRING (Expression))
+ #endif
#endif
-
/**
Internal worker macro that calls DebugPrint().
@@ -309,16 +375,16 @@ DebugPrintLevelEnabled (
**/
-#if !defined(MDE_CPU_EBC) && (!defined (_MSC_VER) || _MSC_VER > 1400)
- #define _DEBUG_PRINT(PrintLevel, ...) \
+#if !defined (MDE_CPU_EBC) && (!defined (_MSC_VER) || _MSC_VER > 1400)
+#define _DEBUG_PRINT(PrintLevel, ...) \
do { \
if (DebugPrintLevelEnabled (PrintLevel)) { \
DebugPrint (PrintLevel, ##__VA_ARGS__); \
} \
} while (FALSE)
- #define _DEBUG(Expression) _DEBUG_PRINT Expression
+#define _DEBUGLIB_DEBUG(Expression) _DEBUG_PRINT Expression
#else
-#define _DEBUG(Expression) DebugPrint Expression
+#define _DEBUGLIB_DEBUG(Expression) DebugPrint Expression
#endif
/**
@@ -333,8 +399,8 @@ DebugPrintLevelEnabled (
@param Expression Boolean expression.
**/
-#if !defined(MDEPKG_NDEBUG)
- #define ASSERT(Expression) \
+#if !defined (MDEPKG_NDEBUG)
+#define ASSERT(Expression) \
do { \
if (DebugAssertEnabled ()) { \
if (!(Expression)) { \
@@ -344,7 +410,12 @@ DebugPrintLevelEnabled (
} \
} while (FALSE)
#else
- #define ASSERT(Expression)
+#define ASSERT(Expression) \
+ do { \
+ if (FALSE) { \
+ (VOID) (Expression); \
+ } \
+ } while (FALSE)
#endif
/**
@@ -359,15 +430,20 @@ DebugPrintLevelEnabled (
**/
-#if !defined(MDEPKG_NDEBUG)
- #define DEBUG(Expression) \
+#if !defined (MDEPKG_NDEBUG)
+#define DEBUG(Expression) \
do { \
if (DebugPrintEnabled ()) { \
- _DEBUG (Expression); \
+ _DEBUGLIB_DEBUG (Expression); \
} \
} while (FALSE)
#else
- #define DEBUG(Expression)
+#define DEBUG(Expression) \
+ do { \
+ if (FALSE) { \
+ _DEBUGLIB_DEBUG (Expression); \
+ } \
+ } while (FALSE)
#endif
/**
@@ -382,18 +458,23 @@ DebugPrintLevelEnabled (
@param StatusParameter EFI_STATUS value to evaluate.
**/
-#if !defined(MDEPKG_NDEBUG)
- #define ASSERT_EFI_ERROR(StatusParameter) \
+#if !defined (MDEPKG_NDEBUG)
+#define ASSERT_EFI_ERROR(StatusParameter) \
do { \
if (DebugAssertEnabled ()) { \
if (EFI_ERROR (StatusParameter)) { \
- DEBUG ((EFI_D_ERROR, "\nASSERT_EFI_ERROR (Status = %r)\n", StatusParameter)); \
+ DEBUG ((DEBUG_ERROR, "\nASSERT_EFI_ERROR (Status = %r)\n", StatusParameter)); \
_ASSERT (!EFI_ERROR (StatusParameter)); \
} \
} \
} while (FALSE)
#else
- #define ASSERT_EFI_ERROR(StatusParameter)
+#define ASSERT_EFI_ERROR(StatusParameter) \
+ do { \
+ if (FALSE) { \
+ (VOID) (StatusParameter); \
+ } \
+ } while (FALSE)
#endif
/**
@@ -408,8 +489,8 @@ DebugPrintLevelEnabled (
@param StatusParameter RETURN_STATUS value to evaluate.
**/
-#if !defined(MDEPKG_NDEBUG)
- #define ASSERT_RETURN_ERROR(StatusParameter) \
+#if !defined (MDEPKG_NDEBUG)
+#define ASSERT_RETURN_ERROR(StatusParameter) \
do { \
if (DebugAssertEnabled ()) { \
if (RETURN_ERROR (StatusParameter)) { \
@@ -420,7 +501,12 @@ DebugPrintLevelEnabled (
} \
} while (FALSE)
#else
- #define ASSERT_RETURN_ERROR(StatusParameter)
+#define ASSERT_RETURN_ERROR(StatusParameter) \
+ do { \
+ if (FALSE) { \
+ (VOID) (StatusParameter); \
+ } \
+ } while (FALSE)
#endif
/**
@@ -445,8 +531,8 @@ DebugPrintLevelEnabled (
@param Guid The pointer to a protocol GUID.
**/
-#if !defined(MDEPKG_NDEBUG)
- #define ASSERT_PROTOCOL_ALREADY_INSTALLED(Handle, Guid) \
+#if !defined (MDEPKG_NDEBUG)
+#define ASSERT_PROTOCOL_ALREADY_INSTALLED(Handle, Guid) \
do { \
if (DebugAssertEnabled ()) { \
VOID *Instance; \
@@ -463,7 +549,7 @@ DebugPrintLevelEnabled (
} \
} while (FALSE)
#else
- #define ASSERT_PROTOCOL_ALREADY_INSTALLED(Handle, Guid)
+#define ASSERT_PROTOCOL_ALREADY_INSTALLED(Handle, Guid)
#endif
/**
@@ -475,8 +561,10 @@ DebugPrintLevelEnabled (
are not included in a module.
**/
-#define DEBUG_CODE_BEGIN() do { if (DebugCodeEnabled ()) { UINT8 __DebugCodeLocal
-
+#define DEBUG_CODE_BEGIN() \
+ do { \
+ if (DebugCodeEnabled ()) { \
+ do { } while (FALSE)
/**
The macro that marks the end of debug source code.
@@ -487,8 +575,9 @@ DebugPrintLevelEnabled (
are not included in a module.
**/
-#define DEBUG_CODE_END() __DebugCodeLocal = 0; __DebugCodeLocal++; } } while (FALSE)
-
+#define DEBUG_CODE_END() \
+ } \
+ } while (FALSE)
/**
The macro that declares a section of debug source code.
@@ -503,7 +592,6 @@ DebugPrintLevelEnabled (
Expression \
DEBUG_CODE_END ()
-
/**
The macro that calls DebugClearMemory() to clear a buffer to a default value.
@@ -521,7 +609,6 @@ DebugPrintLevelEnabled (
} \
} while (FALSE)
-
/**
Macro that calls DebugAssert() if the containing record does not have a
matching signature. If the signatures matches, then a pointer to the data
@@ -533,8 +620,12 @@ DebugPrintLevelEnabled (
If MDEPKG_NDEBUG is defined or the DEBUG_PROPERTY_DEBUG_ASSERT_ENABLED bit
of PcdDebugProperyMask is clear, then this macro computes the offset, in bytes,
of the field specified by Field from the beginning of the data structure specified
- by TYPE. This offset is subtracted from Record, and is used to return a pointer
- to a data structure of the type specified by TYPE.
+ by TYPE. This offset is subtracted from Record, and is used to compute a pointer
+ to a data structure of the type specified by TYPE. The Signature field of the
+ data structure specified by TYPE is compared to TestSignature. If the signatures
+ match, then a pointer to the pointer to a data structure of the type specified by
+ TYPE is returned. If the signatures do not match, then NULL is returned to
+ signify that the passed in data structure is invalid.
If MDEPKG_NDEBUG is not defined and the DEBUG_PROPERTY_DEBUG_ASSERT_ENABLED bit
of PcdDebugProperyMask is set, then this macro computes the offset, in bytes,
@@ -564,13 +655,17 @@ DebugPrintLevelEnabled (
@param TestSignature The 32-bit signature value to match.
**/
-#if !defined(MDEPKG_NDEBUG)
- #define CR(Record, TYPE, Field, TestSignature) \
+#if !defined (MDEPKG_NDEBUG)
+#define CR(Record, TYPE, Field, TestSignature) \
(DebugAssertEnabled () && (BASE_CR (Record, TYPE, Field)->Signature != TestSignature)) ? \
(TYPE *) (_ASSERT (CR has Bad Signature), Record) : \
+ (BASE_CR (Record, TYPE, Field)->Signature != TestSignature) ? \
+ NULL : \
BASE_CR (Record, TYPE, Field)
#else
- #define CR(Record, TYPE, Field, TestSignature) \
+#define CR(Record, TYPE, Field, TestSignature) \
+ (BASE_CR (Record, TYPE, Field)->Signature != TestSignature) ? \
+ NULL : \
BASE_CR (Record, TYPE, Field)
#endif
diff --git a/sys/contrib/edk2/Include/Library/DevicePathLib.h b/sys/contrib/edk2/Include/Library/DevicePathLib.h
index 687b5b30dda0..36469687c72c 100644
--- a/sys/contrib/edk2/Include/Library/DevicePathLib.h
+++ b/sys/contrib/edk2/Include/Library/DevicePathLib.h
@@ -12,7 +12,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
#ifndef __DEVICE_PATH_LIB_H__
#define __DEVICE_PATH_LIB_H__
-#define END_DEVICE_PATH_LENGTH (sizeof (EFI_DEVICE_PATH_PROTOCOL))
+#define END_DEVICE_PATH_LENGTH (sizeof (EFI_DEVICE_PATH_PROTOCOL))
/**
Determine whether a given device path is valid.
@@ -33,8 +33,8 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
BOOLEAN
EFIAPI
IsDevicePathValid (
- IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath,
- IN UINTN MaxSize
+ IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath,
+ IN UINTN MaxSize
);
/**
@@ -292,7 +292,7 @@ DuplicateDevicePath (
EFI_DEVICE_PATH_PROTOCOL *
EFIAPI
AppendDevicePath (
- IN CONST EFI_DEVICE_PATH_PROTOCOL *FirstDevicePath, OPTIONAL
+ IN CONST EFI_DEVICE_PATH_PROTOCOL *FirstDevicePath OPTIONAL,
IN CONST EFI_DEVICE_PATH_PROTOCOL *SecondDevicePath OPTIONAL
);
@@ -324,7 +324,7 @@ AppendDevicePath (
EFI_DEVICE_PATH_PROTOCOL *
EFIAPI
AppendDevicePathNode (
- IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath, OPTIONAL
+ IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath OPTIONAL,
IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePathNode OPTIONAL
);
@@ -352,7 +352,7 @@ AppendDevicePathNode (
EFI_DEVICE_PATH_PROTOCOL *
EFIAPI
AppendDevicePathInstance (
- IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath, OPTIONAL
+ IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath OPTIONAL,
IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePathInstance OPTIONAL
);
@@ -384,8 +384,8 @@ AppendDevicePathInstance (
EFI_DEVICE_PATH_PROTOCOL *
EFIAPI
GetNextDevicePathInstance (
- IN OUT EFI_DEVICE_PATH_PROTOCOL **DevicePath,
- OUT UINTN *Size
+ IN OUT EFI_DEVICE_PATH_PROTOCOL **DevicePath,
+ OUT UINTN *Size
);
/**
@@ -409,9 +409,9 @@ GetNextDevicePathInstance (
EFI_DEVICE_PATH_PROTOCOL *
EFIAPI
CreateDeviceNode (
- IN UINT8 NodeType,
- IN UINT8 NodeSubType,
- IN UINT16 NodeLength
+ IN UINT8 NodeType,
+ IN UINT8 NodeSubType,
+ IN UINT16 NodeLength
);
/**
@@ -447,7 +447,7 @@ IsDevicePathMultiInstance (
EFI_DEVICE_PATH_PROTOCOL *
EFIAPI
DevicePathFromHandle (
- IN EFI_HANDLE Handle
+ IN EFI_HANDLE Handle
);
/**
@@ -474,8 +474,8 @@ DevicePathFromHandle (
EFI_DEVICE_PATH_PROTOCOL *
EFIAPI
FileDevicePath (
- IN EFI_HANDLE Device, OPTIONAL
- IN CONST CHAR16 *FileName
+ IN EFI_HANDLE Device OPTIONAL,
+ IN CONST CHAR16 *FileName
);
/**
@@ -496,9 +496,9 @@ FileDevicePath (
CHAR16 *
EFIAPI
ConvertDevicePathToText (
- IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath,
- IN BOOLEAN DisplayOnly,
- IN BOOLEAN AllowShortcuts
+ IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath,
+ IN BOOLEAN DisplayOnly,
+ IN BOOLEAN AllowShortcuts
);
/**
@@ -538,7 +538,7 @@ ConvertDeviceNodeToText (
EFI_DEVICE_PATH_PROTOCOL *
EFIAPI
ConvertTextToDeviceNode (
- IN CONST CHAR16 *TextDeviceNode
+ IN CONST CHAR16 *TextDeviceNode
);
/**
@@ -555,7 +555,7 @@ ConvertTextToDeviceNode (
EFI_DEVICE_PATH_PROTOCOL *
EFIAPI
ConvertTextToDevicePath (
- IN CONST CHAR16 *TextDevicePath
+ IN CONST CHAR16 *TextDevicePath
);
#endif
diff --git a/sys/contrib/edk2/Include/Library/MemoryAllocationLib.h b/sys/contrib/edk2/Include/Library/MemoryAllocationLib.h
index 14efb568955a..fd36433690a4 100644
--- a/sys/contrib/edk2/Include/Library/MemoryAllocationLib.h
+++ b/sys/contrib/edk2/Include/Library/MemoryAllocationLib.h
@@ -481,7 +481,7 @@ ReallocateReservedPool (
VOID
EFIAPI
FreePool (
- IN VOID *Buffer
+ IN VOID *Buffer
);
#endif
diff --git a/sys/contrib/edk2/Include/Library/PcdLib.h b/sys/contrib/edk2/Include/Library/PcdLib.h
index 7a4a1bdaa3d8..27f2e5a5e500 100644
--- a/sys/contrib/edk2/Include/Library/PcdLib.h
+++ b/sys/contrib/edk2/Include/Library/PcdLib.h
@@ -22,7 +22,6 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
#ifndef __PCD_LIB_H__
#define __PCD_LIB_H__
-
/**
Retrieves a token number based on a token name.
@@ -34,8 +33,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
@return The token number associated with the PCD.
**/
-#define PcdToken(TokenName) _PCD_TOKEN_##TokenName
-
+#define PcdToken(TokenName) _PCD_TOKEN_##TokenName
/**
Retrieves a Boolean PCD feature flag based on a token name.
@@ -49,8 +47,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
@return Boolean value for the PCD feature flag.
**/
-#define FeaturePcdGet(TokenName) _PCD_GET_MODE_BOOL_##TokenName
-
+#define FeaturePcdGet(TokenName) _PCD_GET_MODE_BOOL_##TokenName
/**
Retrieves an 8-bit fixed PCD token value based on a token name.
@@ -64,8 +61,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
@return 8-bit value for the token specified by TokenName.
**/
-#define FixedPcdGet8(TokenName) _PCD_VALUE_##TokenName
-
+#define FixedPcdGet8(TokenName) _PCD_VALUE_##TokenName
/**
Retrieves a 16-bit fixed PCD token value based on a token name.
@@ -79,8 +75,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
@return 16-bit value for the token specified by TokenName.
**/
-#define FixedPcdGet16(TokenName) _PCD_VALUE_##TokenName
-
+#define FixedPcdGet16(TokenName) _PCD_VALUE_##TokenName
/**
Retrieves a 32-bit fixed PCD token value based on a token name.
@@ -94,8 +89,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
@return 32-bit value for the token specified by TokenName.
**/
-#define FixedPcdGet32(TokenName) _PCD_VALUE_##TokenName
-
+#define FixedPcdGet32(TokenName) _PCD_VALUE_##TokenName
/**
Retrieves a 64-bit fixed PCD token value based on a token name.
@@ -109,8 +103,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
@return 64-bit value for the token specified by TokenName.
**/
-#define FixedPcdGet64(TokenName) _PCD_VALUE_##TokenName
-
+#define FixedPcdGet64(TokenName) _PCD_VALUE_##TokenName
/**
Retrieves a Boolean fixed PCD token value based on a token name.
@@ -124,8 +117,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
@return The Boolean value for the token.
**/
-#define FixedPcdGetBool(TokenName) _PCD_VALUE_##TokenName
-
+#define FixedPcdGetBool(TokenName) _PCD_VALUE_##TokenName
/**
Retrieves a pointer to a fixed PCD token buffer based on a token name.
@@ -139,8 +131,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
@return A pointer to the buffer.
**/
-#define FixedPcdGetPtr(TokenName) ((VOID *)_PCD_VALUE_##TokenName)
-
+#define FixedPcdGetPtr(TokenName) ((VOID *)_PCD_VALUE_##TokenName)
/**
Retrieves an 8-bit binary patchable PCD token value based on a token name.
@@ -154,7 +145,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
@return An 8-bit binary patchable PCD token value.
**/
-#define PatchPcdGet8(TokenName) _gPcd_BinaryPatch_##TokenName
+#define PatchPcdGet8(TokenName) _gPcd_BinaryPatch_##TokenName
/**
Retrieves a 16-bit binary patchable PCD token value based on a token name.
@@ -168,8 +159,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
@return A 16-bit binary patchable PCD token value.
**/
-#define PatchPcdGet16(TokenName) _gPcd_BinaryPatch_##TokenName
-
+#define PatchPcdGet16(TokenName) _gPcd_BinaryPatch_##TokenName
/**
Retrieves a 32-bit binary patchable PCD token value based on a token name.
@@ -183,8 +173,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
@return A 32-bit binary patchable PCD token value.
**/
-#define PatchPcdGet32(TokenName) _gPcd_BinaryPatch_##TokenName
-
+#define PatchPcdGet32(TokenName) _gPcd_BinaryPatch_##TokenName
/**
Retrieves a 64-bit binary patchable PCD token value based on a token name.
@@ -198,8 +187,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
@return A 64-bit binary patchable PCD token value.
**/
-#define PatchPcdGet64(TokenName) _gPcd_BinaryPatch_##TokenName
-
+#define PatchPcdGet64(TokenName) _gPcd_BinaryPatch_##TokenName
/**
Retrieves a Boolean binary patchable PCD token value based on a token name.
@@ -213,8 +201,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
@return The Boolean value for the token.
**/
-#define PatchPcdGetBool(TokenName) _gPcd_BinaryPatch_##TokenName
-
+#define PatchPcdGetBool(TokenName) _gPcd_BinaryPatch_##TokenName
/**
Retrieves a pointer to a binary patchable PCD token buffer based on a token name.
@@ -228,8 +215,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
@return A pointer to the buffer for the token.
**/
-#define PatchPcdGetPtr(TokenName) ((VOID *)_gPcd_BinaryPatch_##TokenName)
-
+#define PatchPcdGetPtr(TokenName) ((VOID *)_gPcd_BinaryPatch_##TokenName)
/**
Sets an 8-bit binary patchable PCD token value based on a token name.
@@ -244,8 +230,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
@return Return the Value that was set.
**/
-#define PatchPcdSet8(TokenName, Value) (_gPcd_BinaryPatch_##TokenName = (Value))
-
+#define PatchPcdSet8(TokenName, Value) (_gPcd_BinaryPatch_##TokenName = (Value))
/**
Sets a 16-bit binary patchable PCD token value based on a token name.
@@ -260,8 +245,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
@return Return the Value that was set.
**/
-#define PatchPcdSet16(TokenName, Value) (_gPcd_BinaryPatch_##TokenName = (Value))
-
+#define PatchPcdSet16(TokenName, Value) (_gPcd_BinaryPatch_##TokenName = (Value))
/**
Sets a 32-bit binary patchable PCD token value based on a token name.
@@ -276,8 +260,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
@return Return the Value that was set.
**/
-#define PatchPcdSet32(TokenName, Value) (_gPcd_BinaryPatch_##TokenName = (Value))
-
+#define PatchPcdSet32(TokenName, Value) (_gPcd_BinaryPatch_##TokenName = (Value))
/**
Sets a 64-bit binary patchable PCD token value based on a token name.
@@ -292,8 +275,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
@return Return the Value that was set.
**/
-#define PatchPcdSet64(TokenName, Value) (_gPcd_BinaryPatch_##TokenName = (Value))
-
+#define PatchPcdSet64(TokenName, Value) (_gPcd_BinaryPatch_##TokenName = (Value))
/**
Sets a Boolean binary patchable PCD token value based on a token name.
@@ -308,8 +290,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
@return Return the Value that was set.
**/
-#define PatchPcdSetBool(TokenName, Value) (_gPcd_BinaryPatch_##TokenName = (Value))
-
+#define PatchPcdSetBool(TokenName, Value) (_gPcd_BinaryPatch_##TokenName = (Value))
/**
Sets a pointer to a binary patchable PCD token buffer based on a token name.
@@ -340,6 +321,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
(Size), \
(Buffer) \
)
+
/**
Retrieves an 8-bit PCD token value based on a token name.
@@ -351,8 +333,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
@return 8-bit value for the token specified by TokenName.
**/
-#define PcdGet8(TokenName) _PCD_GET_MODE_8_##TokenName
-
+#define PcdGet8(TokenName) _PCD_GET_MODE_8_##TokenName
/**
Retrieves a 16-bit PCD token value based on a token name.
@@ -365,8 +346,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
@return 16-bit value for the token specified by TokenName.
**/
-#define PcdGet16(TokenName) _PCD_GET_MODE_16_##TokenName
-
+#define PcdGet16(TokenName) _PCD_GET_MODE_16_##TokenName
/**
Retrieves a 32-bit PCD token value based on a token name.
@@ -379,8 +359,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
@return 32-bit value for the token specified by TokenName.
**/
-#define PcdGet32(TokenName) _PCD_GET_MODE_32_##TokenName
-
+#define PcdGet32(TokenName) _PCD_GET_MODE_32_##TokenName
/**
Retrieves a 64-bit PCD token value based on a token name.
@@ -393,8 +372,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
@return 64-bit value for the token specified by TokenName.
**/
-#define PcdGet64(TokenName) _PCD_GET_MODE_64_##TokenName
-
+#define PcdGet64(TokenName) _PCD_GET_MODE_64_##TokenName
/**
Retrieves a pointer to a PCD token buffer based on a token name.
@@ -407,8 +385,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
@return A pointer to the buffer.
**/
-#define PcdGetPtr(TokenName) _PCD_GET_MODE_PTR_##TokenName
-
+#define PcdGetPtr(TokenName) _PCD_GET_MODE_PTR_##TokenName
/**
Retrieves a Boolean PCD token value based on a token name.
@@ -421,8 +398,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
@return A Boolean PCD token value.
**/
-#define PcdGetBool(TokenName) _PCD_GET_MODE_BOOL_##TokenName
-
+#define PcdGetBool(TokenName) _PCD_GET_MODE_BOOL_##TokenName
/**
Retrieves the size of a fixed PCD token based on a token name.
@@ -435,8 +411,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
@return Return the size
**/
-#define FixedPcdGetSize(TokenName) _PCD_SIZE_##TokenName
-
+#define FixedPcdGetSize(TokenName) _PCD_SIZE_##TokenName
/**
Retrieves the size of a binary patchable PCD token based on a token name.
@@ -449,8 +424,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
@return Return the size
**/
-#define PatchPcdGetSize(TokenName) _gPcd_BinaryPatch_Size_##TokenName
-
+#define PatchPcdGetSize(TokenName) _gPcd_BinaryPatch_Size_##TokenName
/**
Retrieves the size of the PCD token based on a token name.
@@ -463,8 +437,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
@return Return the size
**/
-#define PcdGetSize(TokenName) _PCD_GET_MODE_SIZE_##TokenName
-
+#define PcdGetSize(TokenName) _PCD_GET_MODE_SIZE_##TokenName
/**
Retrieve the size of a given PCD token.
@@ -479,107 +452,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
@return Return the size.
**/
-#define PcdGetExSize(Guid, TokenName) LibPcdGetExSize ((Guid), PcdTokenEx(Guid,TokenName))
-
-#ifndef DISABLE_NEW_DEPRECATED_INTERFACES
-/**
- Sets an 8-bit PCD token value based on a token name.
-
- Sets the 8-bit value for the token specified by TokenName. Value is returned.
- If TokenName is not a valid token in the token space, then the module will not build.
-
- @param TokenName The name of the PCD token to retrieve a current value for.
- @param Value The 8-bit value to set.
-
- @return Return the Value that was set.
-
-**/
-#define PcdSet8(TokenName, Value) _PCD_SET_MODE_8_##TokenName ((Value))
-
-
-/**
- Sets a 16-bit PCD token value based on a token name.
-
- Sets the 16-bit value for the token specified by TokenName. Value is returned.
- If TokenName is not a valid token in the token space, then the module will not build.
-
- @param TokenName The name of the PCD token to retrieve a current value for.
- @param Value The 16-bit value to set.
-
- @return Return the Value that was set.
-
-**/
-#define PcdSet16(TokenName, Value) _PCD_SET_MODE_16_##TokenName ((Value))
-
-
-/**
- Sets a 32-bit PCD token value based on a token name.
-
- Sets the 32-bit value for the token specified by TokenName. Value is returned.
- If TokenName is not a valid token in the token space, then the module will not build.
-
- @param TokenName The name of the PCD token to retrieve a current value for.
- @param Value The 32-bit value to set.
-
- @return Return the Value that was set.
-
-**/
-#define PcdSet32(TokenName, Value) _PCD_SET_MODE_32_##TokenName ((Value))
-
-
-/**
- Sets a 64-bit PCD token value based on a token name.
-
- Sets the 64-bit value for the token specified by TokenName. Value is returned.
- If TokenName is not a valid token in the token space, then the module will not build.
-
- @param TokenName The name of the PCD token to retrieve a current value for.
- @param Value The 64-bit value to set.
-
- @return Return the Value that was set.
-
-**/
-#define PcdSet64(TokenName, Value) _PCD_SET_MODE_64_##TokenName ((Value))
-
-
-/**
- Sets a pointer to a PCD token buffer based on a token name.
-
- Sets the buffer for the token specified by TokenName. Buffer is returned.
- If SizeOfBuffer is greater than the maximum size supported by TokenName,
- then set SizeOfBuffer to the maximum size supported by TokenName and return NULL
- to indicate that the set operation was not actually performed. If SizeOfBuffer
- is set to MAX_ADDRESS, then SizeOfBuffer must be set to the maximum size supported
- by TokenName and NULL must be returned.
- If TokenName is not a valid token in the token space, then the module will not build.
-
- If SizeOfBuffer is NULL, then ASSERT().
- If SizeOfBuffer > 0 and Buffer is NULL, then ASSERT().
-
- @param TokenName The name of the PCD token to set the current value for.
- @param SizeOfBuffer A pointer to the size, in bytes, of Buffer.
- @param Buffer A pointer to the buffer to set.
-
- @return Return the pointer to the Buffer that was set.
-
-**/
-#define PcdSetPtr(TokenName, SizeOfBuffer, Buffer) \
- _PCD_SET_MODE_PTR_##TokenName ((SizeOfBuffer), (Buffer))
-
-/**
- Sets a Boolean PCD token value based on a token name.
-
- Sets the Boolean value for the token specified by TokenName. Value is returned.
- If TokenName is not a valid token in the token space, then the module will not build.
-
- @param TokenName The name of the PCD token to set the current value for.
- @param Buffer The Boolean value to set.
-
- @return Return the Value that was set.
-
-**/
-#define PcdSetBool(TokenName, Value) _PCD_SET_MODE_BOOL_##TokenName ((Value))
-#endif
+#define PcdGetExSize(Guid, TokenName) LibPcdGetExSize ((Guid), PcdTokenEx(Guid,TokenName))
/**
Sets a 8-bit PCD token value based on a token name.
@@ -593,7 +466,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
@return The status of the set operation.
**/
-#define PcdSet8S(TokenName, Value) _PCD_SET_MODE_8_S_##TokenName ((Value))
+#define PcdSet8S(TokenName, Value) _PCD_SET_MODE_8_S_##TokenName ((Value))
/**
Sets a 16-bit PCD token value based on a token name.
@@ -607,7 +480,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
@return The status of the set operation.
**/
-#define PcdSet16S(TokenName, Value) _PCD_SET_MODE_16_S_##TokenName ((Value))
+#define PcdSet16S(TokenName, Value) _PCD_SET_MODE_16_S_##TokenName ((Value))
/**
Sets a 32-bit PCD token value based on a token name.
@@ -621,7 +494,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
@return The status of the set operation.
**/
-#define PcdSet32S(TokenName, Value) _PCD_SET_MODE_32_S_##TokenName ((Value))
+#define PcdSet32S(TokenName, Value) _PCD_SET_MODE_32_S_##TokenName ((Value))
/**
Sets a 64-bit PCD token value based on a token name.
@@ -635,7 +508,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
@return The status of the set operation.
**/
-#define PcdSet64S(TokenName, Value) _PCD_SET_MODE_64_S_##TokenName ((Value))
+#define PcdSet64S(TokenName, Value) _PCD_SET_MODE_64_S_##TokenName ((Value))
/**
Sets a pointer to a PCD token buffer based on a token name.
@@ -661,8 +534,6 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
#define PcdSetPtrS(TokenName, SizeOfBuffer, Buffer) \
_PCD_SET_MODE_PTR_S_##TokenName ((SizeOfBuffer), (Buffer))
-
-
/**
Sets a boolean PCD token value based on a token name.
@@ -675,7 +546,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
@return The status of the set operation.
**/
-#define PcdSetBoolS(TokenName, Value) _PCD_SET_MODE_BOOL_S_##TokenName ((Value))
+#define PcdSetBoolS(TokenName, Value) _PCD_SET_MODE_BOOL_S_##TokenName ((Value))
/**
Retrieves a token number based on a GUID and a token name.
@@ -690,7 +561,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
@return Return the token number.
**/
-#define PcdTokenEx(Guid,TokenName) _PCD_TOKEN_EX_##TokenName(Guid)
+#define PcdTokenEx(Guid, TokenName) _PCD_TOKEN_EX_##TokenName(Guid)
/**
Retrieves an 8-bit PCD token value based on a GUID and a token name.
@@ -708,7 +579,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
@return An 8-bit PCD token value.
**/
-#define PcdGetEx8(Guid, TokenName) LibPcdGetEx8 ((Guid), PcdTokenEx(Guid,TokenName))
+#define PcdGetEx8(Guid, TokenName) LibPcdGetEx8 ((Guid), PcdTokenEx(Guid,TokenName))
/**
Retrieves a 16-bit PCD token value based on a GUID and a token name.
@@ -726,8 +597,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
@return A 16-bit PCD token value.
**/
-#define PcdGetEx16(Guid, TokenName) LibPcdGetEx16 ((Guid), PcdTokenEx(Guid,TokenName))
-
+#define PcdGetEx16(Guid, TokenName) LibPcdGetEx16 ((Guid), PcdTokenEx(Guid,TokenName))
/**
Retrieves a 32-bit PCD token value based on a GUID and a token name.
@@ -745,8 +615,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
@return A 32-bit PCD token value.
**/
-#define PcdGetEx32(Guid, TokenName) LibPcdGetEx32 ((Guid), PcdTokenEx(Guid,TokenName))
-
+#define PcdGetEx32(Guid, TokenName) LibPcdGetEx32 ((Guid), PcdTokenEx(Guid,TokenName))
/**
Retrieves a 64-bit PCD token value based on a GUID and a token name.
@@ -764,8 +633,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
@return A 64-bit PCD token value.
**/
-#define PcdGetEx64(Guid, TokenName) LibPcdGetEx64 ((Guid), PcdTokenEx(Guid,TokenName))
-
+#define PcdGetEx64(Guid, TokenName) LibPcdGetEx64 ((Guid), PcdTokenEx(Guid,TokenName))
/**
Retrieves a pointer to a PCD token buffer based on a GUID and a token name.
@@ -783,8 +651,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
@return A pointer to a PCD token buffer.
**/
-#define PcdGetExPtr(Guid, TokenName) LibPcdGetExPtr ((Guid), PcdTokenEx(Guid,TokenName))
-
+#define PcdGetExPtr(Guid, TokenName) LibPcdGetExPtr ((Guid), PcdTokenEx(Guid,TokenName))
/**
Retrieves a Boolean PCD token value based on a GUID and a token name.
@@ -802,140 +669,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
@return A Boolean PCD token value.
**/
-#define PcdGetExBool(Guid, TokenName) LibPcdGetExBool ((Guid), PcdTokenEx(Guid,TokenName))
-
-
-
-#ifndef DISABLE_NEW_DEPRECATED_INTERFACES
-/**
- Sets an 8-bit PCD token value based on a GUID and a token name.
-
- Sets the 8-bit value for the token specified by Guid and TokenName. Value is returned.
- If TokenName is not a valid token in the token space specified by Guid,
- then the module will not build.
-
- If Guid is NULL, then ASSERT().
-
- @param Guid Pointer to a 128-bit unique value that designates
- which namespace to retrieve a value from.
- @param TokenName The name of the PCD token to set the current value for.
- @param Value The 8-bit value to set.
-
- @return Return the Value that was set.
-
-**/
-#define PcdSetEx8(Guid, TokenName, Value) LibPcdSetEx8 ((Guid), PcdTokenEx(Guid,TokenName), (Value))
-
-
-/**
- Sets a 16-bit PCD token value based on a GUID and a token name.
-
- Sets the 16-bit value for the token specified by Guid and TokenName. Value is returned.
- If TokenName is not a valid token in the token space specified by Guid,
- then the module will not build.
-
- If Guid is NULL, then ASSERT().
-
- @param Guid Pointer to a 128-bit unique value that designates
- which namespace to retrieve a value from.
- @param TokenName The name of the PCD token to set the current value for.
- @param Value The 16-bit value to set.
-
- @return Return the Value that was set.
-
-**/
-#define PcdSetEx16(Guid, TokenName, Value) LibPcdSetEx16 ((Guid), PcdTokenEx(Guid,TokenName), (Value))
-
-
-/**
- Sets a 32-bit PCD token value based on a GUID and a token name.
-
- Sets the 32-bit value for the token specified by Guid and TokenName. Value is returned.
- If TokenName is not a valid token in the token space specified by Guid,
- then the module will not build.
-
- If Guid is NULL, then ASSERT().
-
- @param Guid Pointer to a 128-bit unique value that designates
- which namespace to retrieve a value from.
- @param TokenName The name of the PCD token to set the current value for.
- @param Value The 32-bit value to set.
-
- @return Return the Value that was set.
-
-**/
-#define PcdSetEx32(Guid, TokenName, Value) LibPcdSetEx32 ((Guid), PcdTokenEx(Guid,TokenName), (Value))
-
-
-/**
- Sets a 64-bit PCD token value based on a GUID and a token name.
-
- Sets the 64-bit value for the token specified by Guid and TokenName. Value is returned.
- If TokenName is not a valid token in the token space specified by Guid,
- then the module will not build.
-
- If Guid is NULL, then ASSERT().
-
- @param Guid Pointer to a 128-bit unique value that designates
- which namespace to retrieve a value from.
- @param TokenName The name of the PCD token to set the current value for.
- @param Value The 64-bit value to set.
-
- @return Return the Value that was set.
-
-**/
-#define PcdSetEx64(Guid, TokenName, Value) LibPcdSetEx64 ((Guid), PcdTokenEx(Guid,TokenName), (Value))
-
-
-/**
- Sets a pointer to a PCD token buffer based on a GUID and a token name.
-
- Sets the buffer for the token specified by Guid and TokenName. Buffer is returned.
- If SizeOfBuffer is greater than the maximum size supported by Guid and TokenName,
- then set SizeOfBuffer to the maximum size supported by Guid and TokenName and return
- NULL to indicate that the set operation was not actually performed. If SizeOfBuffer
- is set to MAX_ADDRESS, then SizeOfBuffer must be set to the maximum size supported by
- Guid and TokenName and NULL must be returned.
- If TokenName is not a valid token in the token space specified by Guid,
- then the module will not build.
-
- If Guid is NULL, then ASSERT().
- If SizeOfBuffer is NULL, then ASSERT().
- If SizeOfBuffer > 0 and Buffer is NULL, then ASSERT().
-
- @param Guid Pointer to a 128-bit unique value that designates
- which namespace to retrieve a value from.
- @param TokenName The name of the PCD token to set the current value for.
- @param SizeOfBuffer A pointer to the size, in bytes, of Buffer.
- @param Buffer Pointer to the buffer to set.
-
- @return Return the pointer to the Buffer that was set.
-
-**/
-#define PcdSetExPtr(Guid, TokenName, SizeOfBuffer, Buffer) \
- LibPcdSetExPtr ((Guid), PcdTokenEx(Guid,TokenName), (SizeOfBuffer), (Buffer))
-
-
-/**
- Sets a Boolean PCD token value based on a GUID and a token name.
-
- Sets the Boolean value for the token specified by Guid and TokenName. Value is returned.
- If TokenName is not a valid token in the token space specified by Guid,
- then the module will not build.
-
- If Guid is NULL, then ASSERT().
-
- @param Guid Pointer to a 128-bit unique value that designates
- which namespace to retrieve a value from.
- @param TokenName The name of the PCD token to set the current value for.
- @param Value The Boolean value to set.
-
- @return Return the Value that was set.
-
-**/
-#define PcdSetExBool(Guid, TokenName, Value) \
- LibPcdSetExBool((Guid), PcdTokenEx(Guid,TokenName), (Value))
-#endif
+#define PcdGetExBool(Guid, TokenName) LibPcdGetExBool ((Guid), PcdTokenEx(Guid,TokenName))
/**
Sets an 8-bit PCD token value based on a GUID and a token name.
@@ -954,7 +688,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
@return The status of the set operation.
**/
-#define PcdSetEx8S(Guid, TokenName, Value) LibPcdSetEx8S ((Guid), PcdTokenEx(Guid,TokenName), (Value))
+#define PcdSetEx8S(Guid, TokenName, Value) LibPcdSetEx8S ((Guid), PcdTokenEx(Guid,TokenName), (Value))
/**
Sets an 16-bit PCD token value based on a GUID and a token name.
@@ -973,7 +707,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
@return The status of the set operation.
**/
-#define PcdSetEx16S(Guid, TokenName, Value) LibPcdSetEx16S ((Guid), PcdTokenEx(Guid,TokenName), (Value))
+#define PcdSetEx16S(Guid, TokenName, Value) LibPcdSetEx16S ((Guid), PcdTokenEx(Guid,TokenName), (Value))
/**
Sets an 32-bit PCD token value based on a GUID and a token name.
@@ -992,7 +726,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
@return The status of the set operation.
**/
-#define PcdSetEx32S(Guid, TokenName, Value) LibPcdSetEx32S ((Guid), PcdTokenEx(Guid,TokenName), (Value))
+#define PcdSetEx32S(Guid, TokenName, Value) LibPcdSetEx32S ((Guid), PcdTokenEx(Guid,TokenName), (Value))
/**
Sets an 64-bit PCD token value based on a GUID and a token name.
@@ -1011,7 +745,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
@return The status of the set operation.
**/
-#define PcdSetEx64S(Guid, TokenName, Value) LibPcdSetEx64S ((Guid), PcdTokenEx(Guid,TokenName), (Value))
+#define PcdSetEx64S(Guid, TokenName, Value) LibPcdSetEx64S ((Guid), PcdTokenEx(Guid,TokenName), (Value))
/**
Sets a pointer to a PCD token buffer based on a GUID and a token name.
@@ -1041,7 +775,6 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
#define PcdSetExPtrS(Guid, TokenName, SizeOfBuffer, Buffer) \
LibPcdSetExPtrS ((Guid), PcdTokenEx(Guid,TokenName), (SizeOfBuffer), (Buffer))
-
/**
Sets an boolean PCD token value based on a GUID and a token name.
@@ -1076,10 +809,9 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
UINTN
EFIAPI
LibPcdSetSku (
- IN UINTN SkuId
+ IN UINTN SkuId
);
-
/**
This function provides a means by which to retrieve a value for a given PCD token.
@@ -1093,10 +825,9 @@ LibPcdSetSku (
UINT8
EFIAPI
LibPcdGet8 (
- IN UINTN TokenNumber
+ IN UINTN TokenNumber
);
-
/**
This function provides a means by which to retrieve a value for a given PCD token.
@@ -1110,10 +841,9 @@ LibPcdGet8 (
UINT16
EFIAPI
LibPcdGet16 (
- IN UINTN TokenNumber
+ IN UINTN TokenNumber
);
-
/**
This function provides a means by which to retrieve a value for a given PCD token.
@@ -1127,10 +857,9 @@ LibPcdGet16 (
UINT32
EFIAPI
LibPcdGet32 (
- IN UINTN TokenNumber
+ IN UINTN TokenNumber
);
-
/**
This function provides a means by which to retrieve a value for a given PCD token.
@@ -1144,10 +873,9 @@ LibPcdGet32 (
UINT64
EFIAPI
LibPcdGet64 (
- IN UINTN TokenNumber
+ IN UINTN TokenNumber
);
-
/**
This function provides a means by which to retrieve a value for a given PCD token.
@@ -1161,10 +889,9 @@ LibPcdGet64 (
VOID *
EFIAPI
LibPcdGetPtr (
- IN UINTN TokenNumber
+ IN UINTN TokenNumber
);
-
/**
This function provides a means by which to retrieve a value for a given PCD token.
@@ -1178,10 +905,9 @@ LibPcdGetPtr (
BOOLEAN
EFIAPI
LibPcdGetBool (
- IN UINTN TokenNumber
+ IN UINTN TokenNumber
);
-
/**
This function provides a means by which to retrieve the size of a given PCD token.
@@ -1193,10 +919,9 @@ LibPcdGetBool (
UINTN
EFIAPI
LibPcdGetSize (
- IN UINTN TokenNumber
+ IN UINTN TokenNumber
);
-
/**
This function provides a means by which to retrieve a value for a given PCD token.
@@ -1214,11 +939,10 @@ LibPcdGetSize (
UINT8
EFIAPI
LibPcdGetEx8 (
- IN CONST GUID *Guid,
- IN UINTN TokenNumber
+ IN CONST GUID *Guid,
+ IN UINTN TokenNumber
);
-
/**
This function provides a means by which to retrieve a value for a given PCD token.
@@ -1236,11 +960,10 @@ LibPcdGetEx8 (
UINT16
EFIAPI
LibPcdGetEx16 (
- IN CONST GUID *Guid,
- IN UINTN TokenNumber
+ IN CONST GUID *Guid,
+ IN UINTN TokenNumber
);
-
/**
Returns the 32-bit value for the token specified by TokenNumber and Guid.
If Guid is NULL, then ASSERT().
@@ -1255,11 +978,10 @@ LibPcdGetEx16 (
UINT32
EFIAPI
LibPcdGetEx32 (
- IN CONST GUID *Guid,
- IN UINTN TokenNumber
+ IN CONST GUID *Guid,
+ IN UINTN TokenNumber
);
-
/**
This function provides a means by which to retrieve a value for a given PCD token.
@@ -1277,11 +999,10 @@ LibPcdGetEx32 (
UINT64
EFIAPI
LibPcdGetEx64 (
- IN CONST GUID *Guid,
- IN UINTN TokenNumber
+ IN CONST GUID *Guid,
+ IN UINTN TokenNumber
);
-
/**
This function provides a means by which to retrieve a value for a given PCD token.
@@ -1299,11 +1020,10 @@ LibPcdGetEx64 (
VOID *
EFIAPI
LibPcdGetExPtr (
- IN CONST GUID *Guid,
- IN UINTN TokenNumber
+ IN CONST GUID *Guid,
+ IN UINTN TokenNumber
);
-
/**
This function provides a means by which to retrieve a value for a given PCD token.
@@ -1321,11 +1041,10 @@ LibPcdGetExPtr (
BOOLEAN
EFIAPI
LibPcdGetExBool (
- IN CONST GUID *Guid,
- IN UINTN TokenNumber
+ IN CONST GUID *Guid,
+ IN UINTN TokenNumber
);
-
/**
This function provides a means by which to retrieve the size of a given PCD token.
@@ -1343,300 +1062,10 @@ LibPcdGetExBool (
UINTN
EFIAPI
LibPcdGetExSize (
- IN CONST GUID *Guid,
- IN UINTN TokenNumber
+ IN CONST GUID *Guid,
+ IN UINTN TokenNumber
);
-
-#ifndef DISABLE_NEW_DEPRECATED_INTERFACES
-/**
- This function provides a means by which to set a value for a given PCD token.
-
- Sets the 8-bit value for the token specified by TokenNumber
- to the value specified by Value. Value is returned.
-
- @param[in] TokenNumber The PCD token number to set a current value for.
- @param[in] Value The 8-bit value to set.
-
- @return Return the Value that was set.
-
-**/
-UINT8
-EFIAPI
-LibPcdSet8 (
- IN UINTN TokenNumber,
- IN UINT8 Value
- );
-
-
-/**
- This function provides a means by which to set a value for a given PCD token.
-
- Sets the 16-bit value for the token specified by TokenNumber
- to the value specified by Value. Value is returned.
-
- @param[in] TokenNumber The PCD token number to set a current value for.
- @param[in] Value The 16-bit value to set.
-
- @return Return the Value that was set.
-
-**/
-UINT16
-EFIAPI
-LibPcdSet16 (
- IN UINTN TokenNumber,
- IN UINT16 Value
- );
-
-
-/**
- This function provides a means by which to set a value for a given PCD token.
-
- Sets the 32-bit value for the token specified by TokenNumber
- to the value specified by Value. Value is returned.
-
- @param[in] TokenNumber The PCD token number to set a current value for.
- @param[in] Value The 32-bit value to set.
-
- @return Return the Value that was set.
-
-**/
-UINT32
-EFIAPI
-LibPcdSet32 (
- IN UINTN TokenNumber,
- IN UINT32 Value
- );
-
-
-/**
- This function provides a means by which to set a value for a given PCD token.
-
- Sets the 64-bit value for the token specified by TokenNumber
- to the value specified by Value. Value is returned.
-
- @param[in] TokenNumber The PCD token number to set a current value for.
- @param[in] Value The 64-bit value to set.
-
- @return Return the Value that was set.
-
-**/
-UINT64
-EFIAPI
-LibPcdSet64 (
- IN UINTN TokenNumber,
- IN UINT64 Value
- );
-
-
-/**
- This function provides a means by which to set a value for a given PCD token.
-
- Sets a buffer for the token specified by TokenNumber to the value
- specified by Buffer and SizeOfBuffer. Buffer is returned.
- If SizeOfBuffer is greater than the maximum size support by TokenNumber,
- then set SizeOfBuffer to the maximum size supported by TokenNumber and
- return NULL to indicate that the set operation was not actually performed.
-
- If SizeOfBuffer is set to MAX_ADDRESS, then SizeOfBuffer must be set to the
- maximum size supported by TokenName and NULL must be returned.
-
- If SizeOfBuffer is NULL, then ASSERT().
- If SizeOfBuffer > 0 and Buffer is NULL, then ASSERT().
-
- @param[in] TokenNumber The PCD token number to set a current value for.
- @param[in, out] SizeOfBuffer The size, in bytes, of Buffer.
- @param[in] Buffer A pointer to the buffer to set.
-
- @return Return the pointer for the Buffer that was set.
-
-**/
-VOID *
-EFIAPI
-LibPcdSetPtr (
- IN UINTN TokenNumber,
- IN OUT UINTN *SizeOfBuffer,
- IN CONST VOID *Buffer
- );
-
-
-/**
- This function provides a means by which to set a value for a given PCD token.
-
- Sets the Boolean value for the token specified by TokenNumber
- to the value specified by Value. Value is returned.
-
- @param[in] TokenNumber The PCD token number to set a current value for.
- @param[in] Value The boolean value to set.
-
- @return Return the Value that was set.
-
-**/
-BOOLEAN
-EFIAPI
-LibPcdSetBool (
- IN UINTN TokenNumber,
- IN BOOLEAN Value
- );
-
-
-/**
- This function provides a means by which to set a value for a given PCD token.
-
- Sets the 8-bit value for the token specified by TokenNumber and
- Guid to the value specified by Value. Value is returned.
-
- If Guid is NULL, then ASSERT().
-
- @param[in] Guid Pointer to a 128-bit unique value that
- designates which namespace to set a value from.
- @param[in] TokenNumber The PCD token number to set a current value for.
- @param[in] Value The 8-bit value to set.
-
- @return Return the Value that was set.
-
-**/
-UINT8
-EFIAPI
-LibPcdSetEx8 (
- IN CONST GUID *Guid,
- IN UINTN TokenNumber,
- IN UINT8 Value
- );
-
-
-/**
- This function provides a means by which to set a value for a given PCD token.
-
- Sets the 16-bit value for the token specified by TokenNumber and
- Guid to the value specified by Value. Value is returned.
-
- If Guid is NULL, then ASSERT().
-
- @param[in] Guid Pointer to a 128-bit unique value that
- designates which namespace to set a value from.
- @param[in] TokenNumber The PCD token number to set a current value for.
- @param[in] Value The 16-bit value to set.
-
- @return Return the Value that was set.
-
-**/
-UINT16
-EFIAPI
-LibPcdSetEx16 (
- IN CONST GUID *Guid,
- IN UINTN TokenNumber,
- IN UINT16 Value
- );
-
-
-/**
- This function provides a means by which to set a value for a given PCD token.
-
- Sets the 32-bit value for the token specified by TokenNumber and
- Guid to the value specified by Value. Value is returned.
-
- If Guid is NULL, then ASSERT().
-
- @param[in] Guid Pointer to a 128-bit unique value that
- designates which namespace to set a value from.
- @param[in] TokenNumber The PCD token number to set a current value for.
- @param[in] Value The 32-bit value to set.
-
- @return Return the Value that was set.
-
-**/
-UINT32
-EFIAPI
-LibPcdSetEx32 (
- IN CONST GUID *Guid,
- IN UINTN TokenNumber,
- IN UINT32 Value
- );
-
-
-/**
- This function provides a means by which to set a value for a given PCD token.
-
- Sets the 64-bit value for the token specified by TokenNumber and
- Guid to the value specified by Value. Value is returned.
-
- If Guid is NULL, then ASSERT().
-
- @param[in] Guid Pointer to a 128-bit unique value that
- designates which namespace to set a value from.
- @param[in] TokenNumber The PCD token number to set a current value for.
- @param[in] Value The 64-bit value to set.
-
- @return Return the Value that was set.
-
-**/
-UINT64
-EFIAPI
-LibPcdSetEx64 (
- IN CONST GUID *Guid,
- IN UINTN TokenNumber,
- IN UINT64 Value
- );
-
-
-/**
- This function provides a means by which to set a value for a given PCD token.
-
- Sets a buffer for the token specified by TokenNumber to the value specified by
- Buffer and SizeOfBuffer. Buffer is returned. If SizeOfBuffer is greater than
- the maximum size support by TokenNumber, then set SizeOfBuffer to the maximum size
- supported by TokenNumber and return NULL to indicate that the set operation
- was not actually performed.
-
- If Guid is NULL, then ASSERT().
- If SizeOfBuffer is NULL, then ASSERT().
- If SizeOfBuffer > 0 and Buffer is NULL, then ASSERT().
-
- @param[in] Guid Pointer to a 128-bit unique value that
- designates which namespace to set a value from.
- @param[in] TokenNumber The PCD token number to set a current value for.
- @param[in, out] SizeOfBuffer The size, in bytes, of Buffer.
- @param[in] Buffer A pointer to the buffer to set.
-
- @return Return the pointer to the Buffer that was set.
-
-**/
-VOID *
-EFIAPI
-LibPcdSetExPtr (
- IN CONST GUID *Guid,
- IN UINTN TokenNumber,
- IN OUT UINTN *SizeOfBuffer,
- IN VOID *Buffer
- );
-
-
-/**
- This function provides a means by which to set a value for a given PCD token.
-
- Sets the Boolean value for the token specified by TokenNumber and
- Guid to the value specified by Value. Value is returned.
-
- If Guid is NULL, then ASSERT().
-
- @param[in] Guid Pointer to a 128-bit unique value that
- designates which namespace to set a value from.
- @param[in] TokenNumber The PCD token number to set a current value for.
- @param[in] Value The Boolean value to set.
-
- @return Return the Value that was set.
-
-**/
-BOOLEAN
-EFIAPI
-LibPcdSetExBool (
- IN CONST GUID *Guid,
- IN UINTN TokenNumber,
- IN BOOLEAN Value
- );
-#endif
-
/**
This function provides a means by which to set a value for a given PCD token.
@@ -1652,8 +1081,8 @@ LibPcdSetExBool (
RETURN_STATUS
EFIAPI
LibPcdSet8S (
- IN UINTN TokenNumber,
- IN UINT8 Value
+ IN UINTN TokenNumber,
+ IN UINT8 Value
);
/**
@@ -1671,8 +1100,8 @@ LibPcdSet8S (
RETURN_STATUS
EFIAPI
LibPcdSet16S (
- IN UINTN TokenNumber,
- IN UINT16 Value
+ IN UINTN TokenNumber,
+ IN UINT16 Value
);
/**
@@ -1690,8 +1119,8 @@ LibPcdSet16S (
RETURN_STATUS
EFIAPI
LibPcdSet32S (
- IN UINTN TokenNumber,
- IN UINT32 Value
+ IN UINTN TokenNumber,
+ IN UINT32 Value
);
/**
@@ -1709,8 +1138,8 @@ LibPcdSet32S (
RETURN_STATUS
EFIAPI
LibPcdSet64S (
- IN UINTN TokenNumber,
- IN UINT64 Value
+ IN UINTN TokenNumber,
+ IN UINT64 Value
);
/**
@@ -1738,9 +1167,9 @@ LibPcdSet64S (
RETURN_STATUS
EFIAPI
LibPcdSetPtrS (
- IN UINTN TokenNumber,
- IN OUT UINTN *SizeOfBuffer,
- IN CONST VOID *Buffer
+ IN UINTN TokenNumber,
+ IN OUT UINTN *SizeOfBuffer,
+ IN CONST VOID *Buffer
);
/**
@@ -1758,8 +1187,8 @@ LibPcdSetPtrS (
RETURN_STATUS
EFIAPI
LibPcdSetBoolS (
- IN UINTN TokenNumber,
- IN BOOLEAN Value
+ IN UINTN TokenNumber,
+ IN BOOLEAN Value
);
/**
@@ -1781,9 +1210,9 @@ LibPcdSetBoolS (
RETURN_STATUS
EFIAPI
LibPcdSetEx8S (
- IN CONST GUID *Guid,
- IN UINTN TokenNumber,
- IN UINT8 Value
+ IN CONST GUID *Guid,
+ IN UINTN TokenNumber,
+ IN UINT8 Value
);
/**
@@ -1805,9 +1234,9 @@ LibPcdSetEx8S (
RETURN_STATUS
EFIAPI
LibPcdSetEx16S (
- IN CONST GUID *Guid,
- IN UINTN TokenNumber,
- IN UINT16 Value
+ IN CONST GUID *Guid,
+ IN UINTN TokenNumber,
+ IN UINT16 Value
);
/**
@@ -1829,9 +1258,9 @@ LibPcdSetEx16S (
RETURN_STATUS
EFIAPI
LibPcdSetEx32S (
- IN CONST GUID *Guid,
- IN UINTN TokenNumber,
- IN UINT32 Value
+ IN CONST GUID *Guid,
+ IN UINTN TokenNumber,
+ IN UINT32 Value
);
/**
@@ -1853,9 +1282,9 @@ LibPcdSetEx32S (
RETURN_STATUS
EFIAPI
LibPcdSetEx64S (
- IN CONST GUID *Guid,
- IN UINTN TokenNumber,
- IN UINT64 Value
+ IN CONST GUID *Guid,
+ IN UINTN TokenNumber,
+ IN UINT64 Value
);
/**
@@ -1883,10 +1312,10 @@ LibPcdSetEx64S (
RETURN_STATUS
EFIAPI
LibPcdSetExPtrS (
- IN CONST GUID *Guid,
- IN UINTN TokenNumber,
- IN OUT UINTN *SizeOfBuffer,
- IN VOID *Buffer
+ IN CONST GUID *Guid,
+ IN UINTN TokenNumber,
+ IN OUT UINTN *SizeOfBuffer,
+ IN VOID *Buffer
);
/**
@@ -1908,9 +1337,9 @@ LibPcdSetExPtrS (
RETURN_STATUS
EFIAPI
LibPcdSetExBoolS (
- IN CONST GUID *Guid,
- IN UINTN TokenNumber,
- IN BOOLEAN Value
+ IN CONST GUID *Guid,
+ IN UINTN TokenNumber,
+ IN BOOLEAN Value
);
/**
@@ -1932,13 +1361,12 @@ LibPcdSetExBoolS (
typedef
VOID
(EFIAPI *PCD_CALLBACK)(
- IN CONST GUID *CallBackGuid, OPTIONAL
+ IN CONST GUID *CallBackGuid OPTIONAL,
IN UINTN CallBackToken,
IN OUT VOID *TokenData,
IN UINTN TokenDataSize
);
-
/**
Set up a notification function that is called when a specified token is set.
@@ -1958,12 +1386,11 @@ VOID
VOID
EFIAPI
LibPcdCallbackOnSet (
- IN CONST GUID *Guid, OPTIONAL
- IN UINTN TokenNumber,
- IN PCD_CALLBACK NotificationFunction
+ IN CONST GUID *Guid OPTIONAL,
+ IN UINTN TokenNumber,
+ IN PCD_CALLBACK NotificationFunction
);
-
/**
Disable a notification function that was established with LibPcdCallbackonSet().
@@ -1980,12 +1407,11 @@ LibPcdCallbackOnSet (
VOID
EFIAPI
LibPcdCancelCallback (
- IN CONST GUID *Guid, OPTIONAL
- IN UINTN TokenNumber,
- IN PCD_CALLBACK NotificationFunction
+ IN CONST GUID *Guid OPTIONAL,
+ IN UINTN TokenNumber,
+ IN PCD_CALLBACK NotificationFunction
);
-
/**
Retrieves the next token in a token space.
@@ -2008,12 +1434,10 @@ LibPcdCancelCallback (
UINTN
EFIAPI
LibPcdGetNextToken (
- IN CONST GUID *Guid, OPTIONAL
- IN UINTN TokenNumber
+ IN CONST GUID *Guid OPTIONAL,
+ IN UINTN TokenNumber
);
-
-
/**
Used to retrieve the list of available PCD token space GUIDs.
@@ -2033,7 +1457,6 @@ LibPcdGetNextTokenSpace (
IN CONST GUID *TokenSpaceGuid
);
-
/**
Sets a value of a patchable PCD entry that is type pointer.
@@ -2060,10 +1483,10 @@ LibPcdGetNextTokenSpace (
VOID *
EFIAPI
LibPatchPcdSetPtr (
- OUT VOID *PatchVariable,
- IN UINTN MaximumDatumSize,
- IN OUT UINTN *SizeOfBuffer,
- IN CONST VOID *Buffer
+ OUT VOID *PatchVariable,
+ IN UINTN MaximumDatumSize,
+ IN OUT UINTN *SizeOfBuffer,
+ IN CONST VOID *Buffer
);
/**
@@ -2092,10 +1515,10 @@ LibPatchPcdSetPtr (
RETURN_STATUS
EFIAPI
LibPatchPcdSetPtrS (
- OUT VOID *PatchVariable,
- IN UINTN MaximumDatumSize,
- IN OUT UINTN *SizeOfBuffer,
- IN CONST VOID *Buffer
+ OUT VOID *PatchVariable,
+ IN UINTN MaximumDatumSize,
+ IN OUT UINTN *SizeOfBuffer,
+ IN CONST VOID *Buffer
);
/**
@@ -2126,11 +1549,11 @@ LibPatchPcdSetPtrS (
VOID *
EFIAPI
LibPatchPcdSetPtrAndSize (
- OUT VOID *PatchVariable,
- OUT UINTN *SizeOfPatchVariable,
- IN UINTN MaximumDatumSize,
- IN OUT UINTN *SizeOfBuffer,
- IN CONST VOID *Buffer
+ OUT VOID *PatchVariable,
+ OUT UINTN *SizeOfPatchVariable,
+ IN UINTN MaximumDatumSize,
+ IN OUT UINTN *SizeOfBuffer,
+ IN CONST VOID *Buffer
);
/**
@@ -2161,11 +1584,11 @@ LibPatchPcdSetPtrAndSize (
RETURN_STATUS
EFIAPI
LibPatchPcdSetPtrAndSizeS (
- OUT VOID *PatchVariable,
- OUT UINTN *SizeOfPatchVariable,
- IN UINTN MaximumDatumSize,
- IN OUT UINTN *SizeOfBuffer,
- IN CONST VOID *Buffer
+ OUT VOID *PatchVariable,
+ OUT UINTN *SizeOfPatchVariable,
+ IN UINTN MaximumDatumSize,
+ IN OUT UINTN *SizeOfBuffer,
+ IN CONST VOID *Buffer
);
typedef enum {
@@ -2182,22 +1605,21 @@ typedef struct {
/// The returned information associated with the requested TokenNumber. If
/// TokenNumber is 0, then PcdType is set to PCD_TYPE_8.
///
- PCD_TYPE PcdType;
+ PCD_TYPE PcdType;
///
/// The size of the data in bytes associated with the TokenNumber specified. If
/// TokenNumber is 0, then PcdSize is set 0.
///
- UINTN PcdSize;
+ UINTN PcdSize;
///
/// The null-terminated ASCII string associated with a given token. If the
/// TokenNumber specified was 0, then this field corresponds to the null-terminated
/// ASCII string associated with the token's namespace Guid. If NULL, there is no
/// name associated with this request.
///
- CHAR8 *PcdName;
+ CHAR8 *PcdName;
} PCD_INFO;
-
/**
Retrieve additional information associated with a PCD token.
@@ -2213,8 +1635,8 @@ typedef struct {
VOID
EFIAPI
LibPcdGetInfo (
- IN UINTN TokenNumber,
- OUT PCD_INFO *PcdInfo
+ IN UINTN TokenNumber,
+ OUT PCD_INFO *PcdInfo
);
/**
@@ -2233,9 +1655,9 @@ LibPcdGetInfo (
VOID
EFIAPI
LibPcdGetInfoEx (
- IN CONST GUID *Guid,
- IN UINTN TokenNumber,
- OUT PCD_INFO *PcdInfo
+ IN CONST GUID *Guid,
+ IN UINTN TokenNumber,
+ OUT PCD_INFO *PcdInfo
);
/**
diff --git a/sys/contrib/edk2/Include/Library/PrintLib.h b/sys/contrib/edk2/Include/Library/PrintLib.h
index 8548e1ce5b62..7ac92ecf35a8 100644
--- a/sys/contrib/edk2/Include/Library/PrintLib.h
+++ b/sys/contrib/edk2/Include/Library/PrintLib.h
@@ -192,10 +192,10 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
/// Flags bitmask values use in UnicodeValueToString() and
/// AsciiValueToString()
///
-#define LEFT_JUSTIFY 0x01
-#define COMMA_TYPE 0x08
-#define PREFIX_ZERO 0x20
-#define RADIX_HEX 0x80
+#define LEFT_JUSTIFY 0x01
+#define COMMA_TYPE 0x08
+#define PREFIX_ZERO 0x20
+#define RADIX_HEX 0x80
/**
Produces a Null-terminated Unicode string in an output buffer based on
@@ -485,62 +485,6 @@ UnicodeSPrintAsciiFormat (
...
);
-#ifndef DISABLE_NEW_DEPRECATED_INTERFACES
-
-/**
- [ATTENTION] This function is deprecated for security reason.
-
- Converts a decimal value to a Null-terminated Unicode string.
-
- Converts the decimal number specified by Value to a Null-terminated Unicode
- string specified by Buffer containing at most Width characters. No padding of spaces
- is ever performed. If Width is 0 then a width of MAXIMUM_VALUE_CHARACTERS is assumed.
- The number of Unicode characters in Buffer is returned, not including the Null-terminator.
- If the conversion contains more than Width characters, then only the first
- Width characters are returned, and the total number of characters
- required to perform the conversion is returned.
- Additional conversion parameters are specified in Flags.
-
- The Flags bit LEFT_JUSTIFY is always ignored.
- All conversions are left justified in Buffer.
- If Width is 0, PREFIX_ZERO is ignored in Flags.
- If COMMA_TYPE is set in Flags, then PREFIX_ZERO is ignored in Flags, and commas
- are inserted every 3rd digit starting from the right.
- If RADIX_HEX is set in Flags, then the output buffer will be
- formatted in hexadecimal format.
- If Value is < 0 and RADIX_HEX is not set in Flags, then the fist character in Buffer is a '-'.
- If PREFIX_ZERO is set in Flags and PREFIX_ZERO is not being ignored,
- then Buffer is padded with '0' characters so the combination of the optional '-'
- sign character, '0' characters, digit characters for Value, and the Null-terminator
- add up to Width characters.
- If both COMMA_TYPE and RADIX_HEX are set in Flags, then ASSERT().
- If Buffer is NULL, then ASSERT().
- If Buffer is not aligned on a 16-bit boundary, then ASSERT().
- If unsupported bits are set in Flags, then ASSERT().
- If both COMMA_TYPE and RADIX_HEX are set in Flags, then ASSERT().
- If Width >= MAXIMUM_VALUE_CHARACTERS, then ASSERT()
-
- @param Buffer The pointer to the output buffer for the produced Null-terminated
- Unicode string.
- @param Flags The bitmask of flags that specify left justification, zero pad, and commas.
- @param Value The 64-bit signed value to convert to a string.
- @param Width The maximum number of Unicode characters to place in Buffer, not including
- the Null-terminator.
-
- @return The number of Unicode characters in Buffer, not including the Null-terminator.
-
-**/
-UINTN
-EFIAPI
-UnicodeValueToString (
- IN OUT CHAR16 *Buffer,
- IN UINTN Flags,
- IN INT64 Value,
- IN UINTN Width
- );
-
-#endif
-
/**
Converts a decimal value to a Null-terminated Unicode string.
@@ -642,10 +586,10 @@ UnicodeValueToStringS (
UINTN
EFIAPI
AsciiVSPrint (
- OUT CHAR8 *StartOfBuffer,
- IN UINTN BufferSize,
- IN CONST CHAR8 *FormatString,
- IN VA_LIST Marker
+ OUT CHAR8 *StartOfBuffer,
+ IN UINTN BufferSize,
+ IN CONST CHAR8 *FormatString,
+ IN VA_LIST Marker
);
/**
@@ -686,10 +630,10 @@ AsciiVSPrint (
UINTN
EFIAPI
AsciiBSPrint (
- OUT CHAR8 *StartOfBuffer,
- IN UINTN BufferSize,
- IN CONST CHAR8 *FormatString,
- IN BASE_LIST Marker
+ OUT CHAR8 *StartOfBuffer,
+ IN UINTN BufferSize,
+ IN CONST CHAR8 *FormatString,
+ IN BASE_LIST Marker
);
/**
@@ -882,61 +826,6 @@ AsciiSPrintUnicodeFormat (
...
);
-#ifndef DISABLE_NEW_DEPRECATED_INTERFACES
-
-/**
- [ATTENTION] This function is deprecated for security reason.
-
- Converts a decimal value to a Null-terminated ASCII string.
-
- Converts the decimal number specified by Value to a Null-terminated ASCII string
- specified by Buffer containing at most Width characters. No padding of spaces
- is ever performed.
- If Width is 0 then a width of MAXIMUM_VALUE_CHARACTERS is assumed.
- The number of ASCII characters in Buffer is returned, not including the Null-terminator.
- If the conversion contains more than Width characters, then only the first Width
- characters are returned, and the total number of characters required to perform
- the conversion is returned.
- Additional conversion parameters are specified in Flags.
- The Flags bit LEFT_JUSTIFY is always ignored.
- All conversions are left justified in Buffer.
- If Width is 0, PREFIX_ZERO is ignored in Flags.
- If COMMA_TYPE is set in Flags, then PREFIX_ZERO is ignored in Flags, and commas
- are inserted every 3rd digit starting from the right.
- If RADIX_HEX is set in Flags, then the output buffer will be
- formatted in hexadecimal format.
- If Value is < 0 and RADIX_HEX is not set in Flags, then the fist character in Buffer is a '-'.
- If PREFIX_ZERO is set in Flags and PREFIX_ZERO is not being ignored,
- then Buffer is padded with '0' characters so the combination of the optional '-'
- sign character, '0' characters, digit characters for Value, and the Null-terminator
- add up to Width characters.
-
- If Buffer is NULL, then ASSERT().
- If unsupported bits are set in Flags, then ASSERT().
- If both COMMA_TYPE and RADIX_HEX are set in Flags, then ASSERT().
- If Width >= MAXIMUM_VALUE_CHARACTERS, then ASSERT()
-
- @param Buffer A pointer to the output buffer for the produced Null-terminated
- ASCII string.
- @param Flags The bitmask of flags that specify left justification, zero pad, and commas.
- @param Value The 64-bit signed value to convert to a string.
- @param Width The maximum number of ASCII characters to place in Buffer, not including
- the Null-terminator.
-
- @return The number of ASCII characters in Buffer, not including the Null-terminator.
-
-**/
-UINTN
-EFIAPI
-AsciiValueToString (
- OUT CHAR8 *Buffer,
- IN UINTN Flags,
- IN INT64 Value,
- IN UINTN Width
- );
-
-#endif
-
/**
Converts a decimal value to a Null-terminated Ascii string.
@@ -989,11 +878,11 @@ AsciiValueToString (
RETURN_STATUS
EFIAPI
AsciiValueToStringS (
- IN OUT CHAR8 *Buffer,
- IN UINTN BufferSize,
- IN UINTN Flags,
- IN INT64 Value,
- IN UINTN Width
+ IN OUT CHAR8 *Buffer,
+ IN UINTN BufferSize,
+ IN UINTN Flags,
+ IN INT64 Value,
+ IN UINTN Width
);
/**
@@ -1016,7 +905,7 @@ AsciiValueToStringS (
UINTN
EFIAPI
SPrintLength (
- IN CONST CHAR16 *FormatString,
+ IN CONST CHAR16 *FormatString,
IN VA_LIST Marker
);
@@ -1038,8 +927,8 @@ SPrintLength (
UINTN
EFIAPI
SPrintLengthAsciiFormat (
- IN CONST CHAR8 *FormatString,
- IN VA_LIST Marker
+ IN CONST CHAR8 *FormatString,
+ IN VA_LIST Marker
);
#endif
diff --git a/sys/contrib/edk2/Include/Library/UefiBootServicesTableLib.h b/sys/contrib/edk2/Include/Library/UefiBootServicesTableLib.h
index 499071bc04b9..b2e019e25cf7 100644
--- a/sys/contrib/edk2/Include/Library/UefiBootServicesTableLib.h
+++ b/sys/contrib/edk2/Include/Library/UefiBootServicesTableLib.h
@@ -13,12 +13,12 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
///
/// Cache the Image Handle
///
-extern EFI_HANDLE gImageHandle;
+extern EFI_HANDLE gImageHandle;
///
/// Cache pointer to the EFI System Table
///
-extern EFI_SYSTEM_TABLE *gST;
+extern EFI_SYSTEM_TABLE *gST;
///
/// Cache pointer to the EFI Boot Services Table
diff --git a/sys/contrib/edk2/Include/Protocol/DebugPort.h b/sys/contrib/edk2/Include/Protocol/DebugPort.h
index d3aa3bbf2a4f..d3eebb9912d6 100644
--- a/sys/contrib/edk2/Include/Protocol/DebugPort.h
+++ b/sys/contrib/edk2/Include/Protocol/DebugPort.h
@@ -12,7 +12,6 @@
#ifndef __DEBUG_PORT_H__
#define __DEBUG_PORT_H__
-
///
/// DebugPortIo protocol {EBA4E8D2-3858-41EC-A281-2647BA9660D0}
///
@@ -21,7 +20,7 @@
0xEBA4E8D2, 0x3858, 0x41EC, {0xA2, 0x81, 0x26, 0x47, 0xBA, 0x96, 0x60, 0xD0 } \
}
-extern EFI_GUID gEfiDebugPortProtocolGuid;
+extern EFI_GUID gEfiDebugPortProtocolGuid;
typedef struct _EFI_DEBUGPORT_PROTOCOL EFI_DEBUGPORT_PROTOCOL;
@@ -111,30 +110,30 @@ EFI_STATUS
/// This protocol provides the communication link between the debug agent and the remote host.
///
struct _EFI_DEBUGPORT_PROTOCOL {
- EFI_DEBUGPORT_RESET Reset;
- EFI_DEBUGPORT_WRITE Write;
- EFI_DEBUGPORT_READ Read;
- EFI_DEBUGPORT_POLL Poll;
+ EFI_DEBUGPORT_RESET Reset;
+ EFI_DEBUGPORT_WRITE Write;
+ EFI_DEBUGPORT_READ Read;
+ EFI_DEBUGPORT_POLL Poll;
};
//
// DEBUGPORT variable definitions...
//
-#define EFI_DEBUGPORT_VARIABLE_NAME L"DEBUGPORT"
-#define EFI_DEBUGPORT_VARIABLE_GUID EFI_DEBUGPORT_PROTOCOL_GUID
+#define EFI_DEBUGPORT_VARIABLE_NAME L"DEBUGPORT"
+#define EFI_DEBUGPORT_VARIABLE_GUID EFI_DEBUGPORT_PROTOCOL_GUID
extern EFI_GUID gEfiDebugPortVariableGuid;
//
// DebugPort device path definitions...
//
-#define DEVICE_PATH_MESSAGING_DEBUGPORT EFI_DEBUGPORT_PROTOCOL_GUID
+#define DEVICE_PATH_MESSAGING_DEBUGPORT EFI_DEBUGPORT_PROTOCOL_GUID
extern EFI_GUID gEfiDebugPortDevicePathGuid;
typedef struct {
- EFI_DEVICE_PATH_PROTOCOL Header;
- EFI_GUID Guid;
+ EFI_DEVICE_PATH_PROTOCOL Header;
+ EFI_GUID Guid;
} DEBUGPORT_DEVICE_PATH;
#endif
diff --git a/sys/contrib/edk2/Include/Protocol/DevicePath.h b/sys/contrib/edk2/Include/Protocol/DevicePath.h
index 5eeca70c8bce..ca90982dd132 100644
--- a/sys/contrib/edk2/Include/Protocol/DevicePath.h
+++ b/sys/contrib/edk2/Include/Protocol/DevicePath.h
@@ -41,97 +41,96 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
that make up the Device Path.
**/
typedef struct {
- UINT8 Type; ///< 0x01 Hardware Device Path.
+ UINT8 Type; ///< 0x01 Hardware Device Path.
///< 0x02 ACPI Device Path.
///< 0x03 Messaging Device Path.
///< 0x04 Media Device Path.
///< 0x05 BIOS Boot Specification Device Path.
///< 0x7F End of Hardware Device Path.
- UINT8 SubType; ///< Varies by Type
+ UINT8 SubType; ///< Varies by Type
///< 0xFF End Entire Device Path, or
///< 0x01 End This Instance of a Device Path and start a new
///< Device Path.
- UINT8 Length[2]; ///< Specific Device Path data. Type and Sub-Type define
- ///< type of data. Size of data is included in Length.
-
+ UINT8 Length[2]; ///< Specific Device Path data. Type and Sub-Type define
+ ///< type of data. Size of data is included in Length.
} EFI_DEVICE_PATH_PROTOCOL;
///
/// Device Path protocol definition for backward-compatible with EFI1.1.
///
-typedef EFI_DEVICE_PATH_PROTOCOL EFI_DEVICE_PATH;
+typedef EFI_DEVICE_PATH_PROTOCOL EFI_DEVICE_PATH;
///
/// Hardware Device Paths.
///
-#define HARDWARE_DEVICE_PATH 0x01
+#define HARDWARE_DEVICE_PATH 0x01
///
/// PCI Device Path SubType.
///
-#define HW_PCI_DP 0x01
+#define HW_PCI_DP 0x01
///
/// PCI Device Path.
///
typedef struct {
- EFI_DEVICE_PATH_PROTOCOL Header;
+ EFI_DEVICE_PATH_PROTOCOL Header;
///
/// PCI Function Number.
///
- UINT8 Function;
+ UINT8 Function;
///
/// PCI Device Number.
///
- UINT8 Device;
+ UINT8 Device;
} PCI_DEVICE_PATH;
///
/// PCCARD Device Path SubType.
///
-#define HW_PCCARD_DP 0x02
+#define HW_PCCARD_DP 0x02
///
/// PCCARD Device Path.
///
typedef struct {
- EFI_DEVICE_PATH_PROTOCOL Header;
+ EFI_DEVICE_PATH_PROTOCOL Header;
///
/// Function Number (0 = First Function).
///
- UINT8 FunctionNumber;
+ UINT8 FunctionNumber;
} PCCARD_DEVICE_PATH;
///
/// Memory Mapped Device Path SubType.
///
-#define HW_MEMMAP_DP 0x03
+#define HW_MEMMAP_DP 0x03
///
/// Memory Mapped Device Path.
///
typedef struct {
- EFI_DEVICE_PATH_PROTOCOL Header;
+ EFI_DEVICE_PATH_PROTOCOL Header;
///
/// EFI_MEMORY_TYPE
///
- UINT32 MemoryType;
+ UINT32 MemoryType;
///
/// Starting Memory Address.
///
- EFI_PHYSICAL_ADDRESS StartingAddress;
+ EFI_PHYSICAL_ADDRESS StartingAddress;
///
/// Ending Memory Address.
///
- EFI_PHYSICAL_ADDRESS EndingAddress;
+ EFI_PHYSICAL_ADDRESS EndingAddress;
} MEMMAP_DEVICE_PATH;
///
/// Hardware Vendor Device Path SubType.
///
-#define HW_VENDOR_DP 0x04
+#define HW_VENDOR_DP 0x04
///
/// The Vendor Device Path allows the creation of vendor-defined Device Paths. A vendor must
@@ -139,11 +138,11 @@ typedef struct {
/// contents on the n bytes that follow in the Vendor Device Path node.
///
typedef struct {
- EFI_DEVICE_PATH_PROTOCOL Header;
+ EFI_DEVICE_PATH_PROTOCOL Header;
///
/// Vendor-assigned GUID that defines the data that follows.
///
- EFI_GUID Guid;
+ EFI_GUID Guid;
///
/// Vendor-defined variable size data.
///
@@ -152,56 +151,56 @@ typedef struct {
///
/// Controller Device Path SubType.
///
-#define HW_CONTROLLER_DP 0x05
+#define HW_CONTROLLER_DP 0x05
///
/// Controller Device Path.
///
typedef struct {
- EFI_DEVICE_PATH_PROTOCOL Header;
+ EFI_DEVICE_PATH_PROTOCOL Header;
///
/// Controller number.
///
- UINT32 ControllerNumber;
+ UINT32 ControllerNumber;
} CONTROLLER_DEVICE_PATH;
///
/// BMC Device Path SubType.
///
-#define HW_BMC_DP 0x06
+#define HW_BMC_DP 0x06
///
/// BMC Device Path.
///
typedef struct {
- EFI_DEVICE_PATH_PROTOCOL Header;
+ EFI_DEVICE_PATH_PROTOCOL Header;
///
/// Interface Type.
///
- UINT8 InterfaceType;
+ UINT8 InterfaceType;
///
/// Base Address.
///
- UINT8 BaseAddress[8];
+ UINT8 BaseAddress[8];
} BMC_DEVICE_PATH;
///
/// ACPI Device Paths.
///
-#define ACPI_DEVICE_PATH 0x02
+#define ACPI_DEVICE_PATH 0x02
///
/// ACPI Device Path SubType.
///
-#define ACPI_DP 0x01
+#define ACPI_DP 0x01
typedef struct {
- EFI_DEVICE_PATH_PROTOCOL Header;
+ EFI_DEVICE_PATH_PROTOCOL Header;
///
/// Device's PnP hardware ID stored in a numeric 32-bit
/// compressed EISA-type ID. This value must match the
/// corresponding _HID in the ACPI name space.
///
- UINT32 HID;
+ UINT32 HID;
///
/// Unique ID that is required by ACPI if two devices have the
/// same _HID. This value must also match the corresponding
@@ -209,34 +208,34 @@ typedef struct {
/// numeric value type of _UID is supported. Thus, strings must
/// not be used for the _UID in the ACPI name space.
///
- UINT32 UID;
+ UINT32 UID;
} ACPI_HID_DEVICE_PATH;
///
/// Expanded ACPI Device Path SubType.
///
-#define ACPI_EXTENDED_DP 0x02
+#define ACPI_EXTENDED_DP 0x02
typedef struct {
- EFI_DEVICE_PATH_PROTOCOL Header;
+ EFI_DEVICE_PATH_PROTOCOL Header;
///
/// Device's PnP hardware ID stored in a numeric 32-bit
/// compressed EISA-type ID. This value must match the
/// corresponding _HID in the ACPI name space.
///
- UINT32 HID;
+ UINT32 HID;
///
/// Unique ID that is required by ACPI if two devices have the
/// same _HID. This value must also match the corresponding
/// _UID/_HID pair in the ACPI name space.
///
- UINT32 UID;
+ UINT32 UID;
///
/// Device's compatible PnP hardware ID stored in a numeric
/// 32-bit compressed EISA-type ID. This value must match at
/// least one of the compatible device IDs returned by the
/// corresponding _CID in the ACPI name space.
///
- UINT32 CID;
+ UINT32 CID;
///
/// Optional variable length _HIDSTR.
/// Optional variable length _UIDSTR.
@@ -251,18 +250,18 @@ typedef struct {
// bits[31:16] - binary number
// Compressed ASCII is 5 bits per character 0b00001 = 'A' 0b11010 = 'Z'
//
-#define PNP_EISA_ID_CONST 0x41d0
-#define EISA_ID(_Name, _Num) ((UINT32)((_Name) | (_Num) << 16))
-#define EISA_PNP_ID(_PNPId) (EISA_ID(PNP_EISA_ID_CONST, (_PNPId)))
-#define EFI_PNP_ID(_PNPId) (EISA_ID(PNP_EISA_ID_CONST, (_PNPId)))
+#define PNP_EISA_ID_CONST 0x41d0
+#define EISA_ID(_Name, _Num) ((UINT32)((_Name) | (_Num) << 16))
+#define EISA_PNP_ID(_PNPId) (EISA_ID(PNP_EISA_ID_CONST, (_PNPId)))
+#define EFI_PNP_ID(_PNPId) (EISA_ID(PNP_EISA_ID_CONST, (_PNPId)))
-#define PNP_EISA_ID_MASK 0xffff
-#define EISA_ID_TO_NUM(_Id) ((_Id) >> 16)
+#define PNP_EISA_ID_MASK 0xffff
+#define EISA_ID_TO_NUM(_Id) ((_Id) >> 16)
///
/// ACPI _ADR Device Path SubType.
///
-#define ACPI_ADR_DP 0x03
+#define ACPI_ADR_DP 0x03
///
/// The _ADR device path is used to contain video output device attributes to support the Graphics
@@ -270,13 +269,13 @@ typedef struct {
/// devices are displaying the same output.
///
typedef struct {
- EFI_DEVICE_PATH_PROTOCOL Header;
+ EFI_DEVICE_PATH_PROTOCOL Header;
///
/// _ADR value. For video output devices the value of this
/// field comes from Table B-2 of the ACPI 3.0 specification. At
/// least one _ADR value is required.
///
- UINT32 ADR;
+ UINT32 ADR;
//
// This device path may optionally contain more than one _ADR entry.
//
@@ -285,16 +284,16 @@ typedef struct {
///
/// ACPI NVDIMM Device Path SubType.
///
-#define ACPI_NVDIMM_DP 0x04
+#define ACPI_NVDIMM_DP 0x04
///
///
typedef struct {
- EFI_DEVICE_PATH_PROTOCOL Header;
+ EFI_DEVICE_PATH_PROTOCOL Header;
///
/// NFIT Device Handle, the _ADR of the NVDIMM device.
/// The value of this field comes from Section 9.20.3 of the ACPI 6.2A specification.
///
- UINT32 NFITDeviceHandle;
+ UINT32 NFITDeviceHandle;
} ACPI_NVDIMM_DEVICE_PATH;
#define ACPI_ADR_DISPLAY_TYPE_OTHER 0
@@ -319,171 +318,171 @@ typedef struct {
/// system. This Device Path can describe physical messaging information like SCSI ID, or abstract
/// information like networking protocol IP addresses.
///
-#define MESSAGING_DEVICE_PATH 0x03
+#define MESSAGING_DEVICE_PATH 0x03
///
/// ATAPI Device Path SubType
///
-#define MSG_ATAPI_DP 0x01
+#define MSG_ATAPI_DP 0x01
typedef struct {
- EFI_DEVICE_PATH_PROTOCOL Header;
+ EFI_DEVICE_PATH_PROTOCOL Header;
///
/// Set to zero for primary, or one for secondary.
///
- UINT8 PrimarySecondary;
+ UINT8 PrimarySecondary;
///
/// Set to zero for master, or one for slave mode.
///
- UINT8 SlaveMaster;
+ UINT8 SlaveMaster;
///
/// Logical Unit Number.
///
- UINT16 Lun;
+ UINT16 Lun;
} ATAPI_DEVICE_PATH;
///
/// SCSI Device Path SubType.
///
-#define MSG_SCSI_DP 0x02
+#define MSG_SCSI_DP 0x02
typedef struct {
- EFI_DEVICE_PATH_PROTOCOL Header;
+ EFI_DEVICE_PATH_PROTOCOL Header;
///
/// Target ID on the SCSI bus (PUN).
///
- UINT16 Pun;
+ UINT16 Pun;
///
/// Logical Unit Number (LUN).
///
- UINT16 Lun;
+ UINT16 Lun;
} SCSI_DEVICE_PATH;
///
/// Fibre Channel SubType.
///
-#define MSG_FIBRECHANNEL_DP 0x03
+#define MSG_FIBRECHANNEL_DP 0x03
typedef struct {
- EFI_DEVICE_PATH_PROTOCOL Header;
+ EFI_DEVICE_PATH_PROTOCOL Header;
///
/// Reserved for the future.
///
- UINT32 Reserved;
+ UINT32 Reserved;
///
/// Fibre Channel World Wide Number.
///
- UINT64 WWN;
+ UINT64 WWN;
///
/// Fibre Channel Logical Unit Number.
///
- UINT64 Lun;
+ UINT64 Lun;
} FIBRECHANNEL_DEVICE_PATH;
///
/// Fibre Channel Ex SubType.
///
-#define MSG_FIBRECHANNELEX_DP 0x15
+#define MSG_FIBRECHANNELEX_DP 0x15
typedef struct {
- EFI_DEVICE_PATH_PROTOCOL Header;
+ EFI_DEVICE_PATH_PROTOCOL Header;
///
/// Reserved for the future.
///
- UINT32 Reserved;
+ UINT32 Reserved;
///
/// 8 byte array containing Fibre Channel End Device Port Name.
///
- UINT8 WWN[8];
+ UINT8 WWN[8];
///
/// 8 byte array containing Fibre Channel Logical Unit Number.
///
- UINT8 Lun[8];
+ UINT8 Lun[8];
} FIBRECHANNELEX_DEVICE_PATH;
///
/// 1394 Device Path SubType
///
-#define MSG_1394_DP 0x04
+#define MSG_1394_DP 0x04
typedef struct {
- EFI_DEVICE_PATH_PROTOCOL Header;
+ EFI_DEVICE_PATH_PROTOCOL Header;
///
/// Reserved for the future.
///
- UINT32 Reserved;
+ UINT32 Reserved;
///
/// 1394 Global Unique ID (GUID).
///
- UINT64 Guid;
+ UINT64 Guid;
} F1394_DEVICE_PATH;
///
/// USB Device Path SubType.
///
-#define MSG_USB_DP 0x05
+#define MSG_USB_DP 0x05
typedef struct {
- EFI_DEVICE_PATH_PROTOCOL Header;
+ EFI_DEVICE_PATH_PROTOCOL Header;
///
/// USB Parent Port Number.
///
- UINT8 ParentPortNumber;
+ UINT8 ParentPortNumber;
///
/// USB Interface Number.
///
- UINT8 InterfaceNumber;
+ UINT8 InterfaceNumber;
} USB_DEVICE_PATH;
///
/// USB Class Device Path SubType.
///
-#define MSG_USB_CLASS_DP 0x0f
+#define MSG_USB_CLASS_DP 0x0f
typedef struct {
- EFI_DEVICE_PATH_PROTOCOL Header;
+ EFI_DEVICE_PATH_PROTOCOL Header;
///
/// Vendor ID assigned by USB-IF. A value of 0xFFFF will
/// match any Vendor ID.
///
- UINT16 VendorId;
+ UINT16 VendorId;
///
/// Product ID assigned by USB-IF. A value of 0xFFFF will
/// match any Product ID.
///
- UINT16 ProductId;
+ UINT16 ProductId;
///
/// The class code assigned by the USB-IF. A value of 0xFF
/// will match any class code.
///
- UINT8 DeviceClass;
+ UINT8 DeviceClass;
///
/// The subclass code assigned by the USB-IF. A value of
/// 0xFF will match any subclass code.
///
- UINT8 DeviceSubClass;
+ UINT8 DeviceSubClass;
///
/// The protocol code assigned by the USB-IF. A value of
/// 0xFF will match any protocol code.
///
- UINT8 DeviceProtocol;
+ UINT8 DeviceProtocol;
} USB_CLASS_DEVICE_PATH;
///
/// USB WWID Device Path SubType.
///
-#define MSG_USB_WWID_DP 0x10
+#define MSG_USB_WWID_DP 0x10
///
/// This device path describes a USB device using its serial number.
///
typedef struct {
- EFI_DEVICE_PATH_PROTOCOL Header;
+ EFI_DEVICE_PATH_PROTOCOL Header;
///
/// USB interface number.
///
- UINT16 InterfaceNumber;
+ UINT16 InterfaceNumber;
///
/// USB vendor id of the device.
///
- UINT16 VendorId;
+ UINT16 VendorId;
///
/// USB product id of the device.
///
- UINT16 ProductId;
+ UINT16 ProductId;
///
/// Last 64-or-fewer UTF-16 characters of the USB
/// serial number. The length of the string is
@@ -498,136 +497,136 @@ typedef struct {
///
#define MSG_DEVICE_LOGICAL_UNIT_DP 0x11
typedef struct {
- EFI_DEVICE_PATH_PROTOCOL Header;
+ EFI_DEVICE_PATH_PROTOCOL Header;
///
/// Logical Unit Number for the interface.
///
- UINT8 Lun;
+ UINT8 Lun;
} DEVICE_LOGICAL_UNIT_DEVICE_PATH;
///
/// SATA Device Path SubType.
///
-#define MSG_SATA_DP 0x12
+#define MSG_SATA_DP 0x12
typedef struct {
- EFI_DEVICE_PATH_PROTOCOL Header;
+ EFI_DEVICE_PATH_PROTOCOL Header;
///
/// The HBA port number that facilitates the connection to the
/// device or a port multiplier. The value 0xFFFF is reserved.
///
- UINT16 HBAPortNumber;
+ UINT16 HBAPortNumber;
///
/// The Port multiplier port number that facilitates the connection
/// to the device. Must be set to 0xFFFF if the device is directly
/// connected to the HBA.
///
- UINT16 PortMultiplierPortNumber;
+ UINT16 PortMultiplierPortNumber;
///
/// Logical Unit Number.
///
- UINT16 Lun;
+ UINT16 Lun;
} SATA_DEVICE_PATH;
///
/// Flag for if the device is directly connected to the HBA.
///
-#define SATA_HBA_DIRECT_CONNECT_FLAG 0x8000
+#define SATA_HBA_DIRECT_CONNECT_FLAG 0x8000
///
/// I2O Device Path SubType.
///
-#define MSG_I2O_DP 0x06
+#define MSG_I2O_DP 0x06
typedef struct {
- EFI_DEVICE_PATH_PROTOCOL Header;
+ EFI_DEVICE_PATH_PROTOCOL Header;
///
/// Target ID (TID) for a device.
///
- UINT32 Tid;
+ UINT32 Tid;
} I2O_DEVICE_PATH;
///
/// MAC Address Device Path SubType.
///
-#define MSG_MAC_ADDR_DP 0x0b
+#define MSG_MAC_ADDR_DP 0x0b
typedef struct {
- EFI_DEVICE_PATH_PROTOCOL Header;
+ EFI_DEVICE_PATH_PROTOCOL Header;
///
/// The MAC address for a network interface padded with 0s.
///
- EFI_MAC_ADDRESS MacAddress;
+ EFI_MAC_ADDRESS MacAddress;
///
/// Network interface type(i.e. 802.3, FDDI).
///
- UINT8 IfType;
+ UINT8 IfType;
} MAC_ADDR_DEVICE_PATH;
///
/// IPv4 Device Path SubType
///
-#define MSG_IPv4_DP 0x0c
+#define MSG_IPv4_DP 0x0c
typedef struct {
- EFI_DEVICE_PATH_PROTOCOL Header;
+ EFI_DEVICE_PATH_PROTOCOL Header;
///
/// The local IPv4 address.
///
- EFI_IPv4_ADDRESS LocalIpAddress;
+ EFI_IPv4_ADDRESS LocalIpAddress;
///
/// The remote IPv4 address.
///
- EFI_IPv4_ADDRESS RemoteIpAddress;
+ EFI_IPv4_ADDRESS RemoteIpAddress;
///
/// The local port number.
///
- UINT16 LocalPort;
+ UINT16 LocalPort;
///
/// The remote port number.
///
- UINT16 RemotePort;
+ UINT16 RemotePort;
///
/// The network protocol(i.e. UDP, TCP).
///
- UINT16 Protocol;
+ UINT16 Protocol;
///
/// 0x00 - The Source IP Address was assigned though DHCP.
/// 0x01 - The Source IP Address is statically bound.
///
- BOOLEAN StaticIpAddress;
+ BOOLEAN StaticIpAddress;
///
/// The gateway IP address
///
- EFI_IPv4_ADDRESS GatewayIpAddress;
+ EFI_IPv4_ADDRESS GatewayIpAddress;
///
/// The subnet mask
///
- EFI_IPv4_ADDRESS SubnetMask;
+ EFI_IPv4_ADDRESS SubnetMask;
} IPv4_DEVICE_PATH;
///
/// IPv6 Device Path SubType.
///
-#define MSG_IPv6_DP 0x0d
+#define MSG_IPv6_DP 0x0d
typedef struct {
- EFI_DEVICE_PATH_PROTOCOL Header;
+ EFI_DEVICE_PATH_PROTOCOL Header;
///
/// The local IPv6 address.
///
- EFI_IPv6_ADDRESS LocalIpAddress;
+ EFI_IPv6_ADDRESS LocalIpAddress;
///
/// The remote IPv6 address.
///
- EFI_IPv6_ADDRESS RemoteIpAddress;
+ EFI_IPv6_ADDRESS RemoteIpAddress;
///
/// The local port number.
///
- UINT16 LocalPort;
+ UINT16 LocalPort;
///
/// The remote port number.
///
- UINT16 RemotePort;
+ UINT16 RemotePort;
///
/// The network protocol(i.e. UDP, TCP).
///
- UINT16 Protocol;
+ UINT16 Protocol;
///
/// 0x00 - The Local IP Address was manually configured.
/// 0x01 - The Local IP Address is assigned through IPv6
@@ -635,23 +634,23 @@ typedef struct {
/// 0x02 - The Local IP Address is assigned through IPv6
/// stateful configuration.
///
- UINT8 IpAddressOrigin;
+ UINT8 IpAddressOrigin;
///
/// The prefix length
///
- UINT8 PrefixLength;
+ UINT8 PrefixLength;
///
/// The gateway IP address
///
- EFI_IPv6_ADDRESS GatewayIpAddress;
+ EFI_IPv6_ADDRESS GatewayIpAddress;
} IPv6_DEVICE_PATH;
///
/// InfiniBand Device Path SubType.
///
-#define MSG_INFINIBAND_DP 0x09
+#define MSG_INFINIBAND_DP 0x09
typedef struct {
- EFI_DEVICE_PATH_PROTOCOL Header;
+ EFI_DEVICE_PATH_PROTOCOL Header;
///
/// Flags to help identify/manage InfiniBand device path elements:
/// Bit 0 - IOC/Service (0b = IOC, 1b = Service).
@@ -661,24 +660,24 @@ typedef struct {
/// Bit 4 - Network Protocol.
/// All other bits are reserved.
///
- UINT32 ResourceFlags;
+ UINT32 ResourceFlags;
///
/// 128-bit Global Identifier for remote fabric port.
///
- UINT8 PortGid[16];
+ UINT8 PortGid[16];
///
/// 64-bit unique identifier to remote IOC or server process.
/// Interpretation of field specified by Resource Flags (bit 0).
///
- UINT64 ServiceId;
+ UINT64 ServiceId;
///
/// 64-bit persistent ID of remote IOC port.
///
- UINT64 TargetPortId;
+ UINT64 TargetPortId;
///
/// 64-bit persistent ID of remote device.
///
- UINT64 DeviceId;
+ UINT64 DeviceId;
} INFINIBAND_DEVICE_PATH;
#define INFINIBAND_RESOURCE_FLAG_IOC_SERVICE 0x01
@@ -690,23 +689,23 @@ typedef struct {
///
/// UART Device Path SubType.
///
-#define MSG_UART_DP 0x0e
+#define MSG_UART_DP 0x0e
typedef struct {
- EFI_DEVICE_PATH_PROTOCOL Header;
+ EFI_DEVICE_PATH_PROTOCOL Header;
///
/// Reserved.
///
- UINT32 Reserved;
+ UINT32 Reserved;
///
/// The baud rate setting for the UART style device. A value of 0
/// means that the device's default baud rate will be used.
///
- UINT64 BaudRate;
+ UINT64 BaudRate;
///
/// The number of data bits for the UART style device. A value
/// of 0 means that the device's default number of data bits will be used.
///
- UINT8 DataBits;
+ UINT8 DataBits;
///
/// The parity setting for the UART style device.
/// Parity 0x00 - Default Parity.
@@ -716,7 +715,7 @@ typedef struct {
/// Parity 0x04 - Mark Parity.
/// Parity 0x05 - Space Parity.
///
- UINT8 Parity;
+ UINT8 Parity;
///
/// The number of stop bits for the UART style device.
/// Stop Bits 0x00 - Default Stop Bits.
@@ -724,205 +723,225 @@ typedef struct {
/// Stop Bits 0x02 - 1.5 Stop Bits.
/// Stop Bits 0x03 - 2 Stop Bits.
///
- UINT8 StopBits;
+ UINT8 StopBits;
} UART_DEVICE_PATH;
///
/// NVDIMM Namespace Device Path SubType.
///
-#define NVDIMM_NAMESPACE_DP 0x20
+#define NVDIMM_NAMESPACE_DP 0x20
typedef struct {
- EFI_DEVICE_PATH_PROTOCOL Header;
+ EFI_DEVICE_PATH_PROTOCOL Header;
///
/// Namespace unique label identifier UUID.
///
- EFI_GUID Uuid;
+ EFI_GUID Uuid;
} NVDIMM_NAMESPACE_DEVICE_PATH;
//
// Use VENDOR_DEVICE_PATH struct
//
-#define MSG_VENDOR_DP 0x0a
-typedef VENDOR_DEVICE_PATH VENDOR_DEFINED_DEVICE_PATH;
+#define MSG_VENDOR_DP 0x0a
+typedef VENDOR_DEVICE_PATH VENDOR_DEFINED_DEVICE_PATH;
-#define DEVICE_PATH_MESSAGING_PC_ANSI EFI_PC_ANSI_GUID
-#define DEVICE_PATH_MESSAGING_VT_100 EFI_VT_100_GUID
-#define DEVICE_PATH_MESSAGING_VT_100_PLUS EFI_VT_100_PLUS_GUID
-#define DEVICE_PATH_MESSAGING_VT_UTF8 EFI_VT_UTF8_GUID
+#define DEVICE_PATH_MESSAGING_PC_ANSI EFI_PC_ANSI_GUID
+#define DEVICE_PATH_MESSAGING_VT_100 EFI_VT_100_GUID
+#define DEVICE_PATH_MESSAGING_VT_100_PLUS EFI_VT_100_PLUS_GUID
+#define DEVICE_PATH_MESSAGING_VT_UTF8 EFI_VT_UTF8_GUID
///
/// A new device path node is defined to declare flow control characteristics.
/// UART Flow Control Messaging Device Path
///
typedef struct {
- EFI_DEVICE_PATH_PROTOCOL Header;
+ EFI_DEVICE_PATH_PROTOCOL Header;
///
/// DEVICE_PATH_MESSAGING_UART_FLOW_CONTROL GUID.
///
- EFI_GUID Guid;
+ EFI_GUID Guid;
///
/// Bitmap of supported flow control types.
/// Bit 0 set indicates hardware flow control.
/// Bit 1 set indicates Xon/Xoff flow control.
/// All other bits are reserved and are clear.
///
- UINT32 FlowControlMap;
+ UINT32 FlowControlMap;
} UART_FLOW_CONTROL_DEVICE_PATH;
-#define UART_FLOW_CONTROL_HARDWARE 0x00000001
-#define UART_FLOW_CONTROL_XON_XOFF 0x00000010
+#define UART_FLOW_CONTROL_HARDWARE 0x00000001
+#define UART_FLOW_CONTROL_XON_XOFF 0x00000010
-#define DEVICE_PATH_MESSAGING_SAS EFI_SAS_DEVICE_PATH_GUID
+#define DEVICE_PATH_MESSAGING_SAS EFI_SAS_DEVICE_PATH_GUID
///
/// Serial Attached SCSI (SAS) Device Path.
///
typedef struct {
- EFI_DEVICE_PATH_PROTOCOL Header;
+ EFI_DEVICE_PATH_PROTOCOL Header;
///
/// DEVICE_PATH_MESSAGING_SAS GUID.
///
- EFI_GUID Guid;
+ EFI_GUID Guid;
///
/// Reserved for future use.
///
- UINT32 Reserved;
+ UINT32 Reserved;
///
/// SAS Address for Serial Attached SCSI Target.
///
- UINT64 SasAddress;
+ UINT64 SasAddress;
///
/// SAS Logical Unit Number.
///
- UINT64 Lun;
+ UINT64 Lun;
///
/// More Information about the device and its interconnect.
///
- UINT16 DeviceTopology;
+ UINT16 DeviceTopology;
///
/// Relative Target Port (RTP).
///
- UINT16 RelativeTargetPort;
+ UINT16 RelativeTargetPort;
} SAS_DEVICE_PATH;
///
/// Serial Attached SCSI (SAS) Ex Device Path SubType
///
-#define MSG_SASEX_DP 0x16
+#define MSG_SASEX_DP 0x16
typedef struct {
- EFI_DEVICE_PATH_PROTOCOL Header;
+ EFI_DEVICE_PATH_PROTOCOL Header;
///
/// 8-byte array of the SAS Address for Serial Attached SCSI Target Port.
///
- UINT8 SasAddress[8];
+ UINT8 SasAddress[8];
///
/// 8-byte array of the SAS Logical Unit Number.
///
- UINT8 Lun[8];
+ UINT8 Lun[8];
///
/// More Information about the device and its interconnect.
///
- UINT16 DeviceTopology;
+ UINT16 DeviceTopology;
///
/// Relative Target Port (RTP).
///
- UINT16 RelativeTargetPort;
+ UINT16 RelativeTargetPort;
} SASEX_DEVICE_PATH;
///
/// NvmExpress Namespace Device Path SubType.
///
-#define MSG_NVME_NAMESPACE_DP 0x17
+#define MSG_NVME_NAMESPACE_DP 0x17
typedef struct {
- EFI_DEVICE_PATH_PROTOCOL Header;
- UINT32 NamespaceId;
- UINT64 NamespaceUuid;
+ EFI_DEVICE_PATH_PROTOCOL Header;
+ UINT32 NamespaceId;
+ UINT64 NamespaceUuid;
} NVME_NAMESPACE_DEVICE_PATH;
///
+/// NVMe over Fabric (NVMe-oF) Namespace Device Path SubType.
+///
+#define MSG_NVME_OF_NAMESPACE_DP 0x22
+typedef struct {
+ EFI_DEVICE_PATH_PROTOCOL Header;
+ ///
+ /// Namespace Identifier Type (NIDT)
+ ///
+ UINT8 NamespaceIdType;
+ ///
+ /// Namespace Identifier (NID)
+ ///
+ UINT8 NamespaceId[16];
+ ///
+ /// Unique identifier of an NVM subsystem
+ ///
+ CHAR8 SubsystemNqn[];
+} NVME_OF_NAMESPACE_DEVICE_PATH;
+
+///
/// DNS Device Path SubType
///
-#define MSG_DNS_DP 0x1F
+#define MSG_DNS_DP 0x1F
typedef struct {
- EFI_DEVICE_PATH_PROTOCOL Header;
+ EFI_DEVICE_PATH_PROTOCOL Header;
///
/// Indicates the DNS server address is IPv4 or IPv6 address.
///
- UINT8 IsIPv6;
+ UINT8 IsIPv6;
///
/// Instance of the DNS server address.
///
- EFI_IP_ADDRESS DnsServerIp[];
+ EFI_IP_ADDRESS DnsServerIp[];
} DNS_DEVICE_PATH;
///
/// Uniform Resource Identifiers (URI) Device Path SubType
///
-#define MSG_URI_DP 0x18
+#define MSG_URI_DP 0x18
typedef struct {
- EFI_DEVICE_PATH_PROTOCOL Header;
+ EFI_DEVICE_PATH_PROTOCOL Header;
///
/// Instance of the URI pursuant to RFC 3986.
///
- CHAR8 Uri[];
+ CHAR8 Uri[];
} URI_DEVICE_PATH;
///
/// Universal Flash Storage (UFS) Device Path SubType.
///
-#define MSG_UFS_DP 0x19
+#define MSG_UFS_DP 0x19
typedef struct {
- EFI_DEVICE_PATH_PROTOCOL Header;
+ EFI_DEVICE_PATH_PROTOCOL Header;
///
/// Target ID on the UFS bus (PUN).
///
- UINT8 Pun;
+ UINT8 Pun;
///
/// Logical Unit Number (LUN).
///
- UINT8 Lun;
+ UINT8 Lun;
} UFS_DEVICE_PATH;
///
/// SD (Secure Digital) Device Path SubType.
///
-#define MSG_SD_DP 0x1A
+#define MSG_SD_DP 0x1A
typedef struct {
- EFI_DEVICE_PATH_PROTOCOL Header;
- UINT8 SlotNumber;
+ EFI_DEVICE_PATH_PROTOCOL Header;
+ UINT8 SlotNumber;
} SD_DEVICE_PATH;
///
/// EMMC (Embedded MMC) Device Path SubType.
///
-#define MSG_EMMC_DP 0x1D
+#define MSG_EMMC_DP 0x1D
typedef struct {
- EFI_DEVICE_PATH_PROTOCOL Header;
- UINT8 SlotNumber;
+ EFI_DEVICE_PATH_PROTOCOL Header;
+ UINT8 SlotNumber;
} EMMC_DEVICE_PATH;
///
/// iSCSI Device Path SubType
///
-#define MSG_ISCSI_DP 0x13
+#define MSG_ISCSI_DP 0x13
typedef struct {
- EFI_DEVICE_PATH_PROTOCOL Header;
+ EFI_DEVICE_PATH_PROTOCOL Header;
///
/// Network Protocol (0 = TCP, 1+ = reserved).
///
- UINT16 NetworkProtocol;
+ UINT16 NetworkProtocol;
///
/// iSCSI Login Options.
///
- UINT16 LoginOption;
+ UINT16 LoginOption;
///
/// iSCSI Logical Unit Number.
///
- UINT64 Lun;
+ UINT64 Lun;
///
/// iSCSI Target Portal group tag the initiator intends
/// to establish a session with.
///
- UINT16 TargetPortalGroupTag;
+ UINT16 TargetPortalGroupTag;
///
/// iSCSI NodeTarget Name. The length of the name
/// is determined by subtracting the offset of this field from Length.
@@ -930,90 +949,90 @@ typedef struct {
/// CHAR8 iSCSI Target Name.
} ISCSI_DEVICE_PATH;
-#define ISCSI_LOGIN_OPTION_NO_HEADER_DIGEST 0x0000
-#define ISCSI_LOGIN_OPTION_HEADER_DIGEST_USING_CRC32C 0x0002
-#define ISCSI_LOGIN_OPTION_NO_DATA_DIGEST 0x0000
-#define ISCSI_LOGIN_OPTION_DATA_DIGEST_USING_CRC32C 0x0008
-#define ISCSI_LOGIN_OPTION_AUTHMETHOD_CHAP 0x0000
-#define ISCSI_LOGIN_OPTION_AUTHMETHOD_NON 0x1000
-#define ISCSI_LOGIN_OPTION_CHAP_BI 0x0000
-#define ISCSI_LOGIN_OPTION_CHAP_UNI 0x2000
+#define ISCSI_LOGIN_OPTION_NO_HEADER_DIGEST 0x0000
+#define ISCSI_LOGIN_OPTION_HEADER_DIGEST_USING_CRC32C 0x0002
+#define ISCSI_LOGIN_OPTION_NO_DATA_DIGEST 0x0000
+#define ISCSI_LOGIN_OPTION_DATA_DIGEST_USING_CRC32C 0x0008
+#define ISCSI_LOGIN_OPTION_AUTHMETHOD_CHAP 0x0000
+#define ISCSI_LOGIN_OPTION_AUTHMETHOD_NON 0x1000
+#define ISCSI_LOGIN_OPTION_CHAP_BI 0x0000
+#define ISCSI_LOGIN_OPTION_CHAP_UNI 0x2000
///
/// VLAN Device Path SubType.
///
-#define MSG_VLAN_DP 0x14
+#define MSG_VLAN_DP 0x14
typedef struct {
- EFI_DEVICE_PATH_PROTOCOL Header;
+ EFI_DEVICE_PATH_PROTOCOL Header;
///
/// VLAN identifier (0-4094).
///
- UINT16 VlanId;
+ UINT16 VlanId;
} VLAN_DEVICE_PATH;
///
/// Bluetooth Device Path SubType.
///
-#define MSG_BLUETOOTH_DP 0x1b
+#define MSG_BLUETOOTH_DP 0x1b
typedef struct {
- EFI_DEVICE_PATH_PROTOCOL Header;
+ EFI_DEVICE_PATH_PROTOCOL Header;
///
/// 48bit Bluetooth device address.
///
- BLUETOOTH_ADDRESS BD_ADDR;
+ BLUETOOTH_ADDRESS BD_ADDR;
} BLUETOOTH_DEVICE_PATH;
///
/// Wi-Fi Device Path SubType.
///
-#define MSG_WIFI_DP 0x1C
+#define MSG_WIFI_DP 0x1C
typedef struct {
- EFI_DEVICE_PATH_PROTOCOL Header;
+ EFI_DEVICE_PATH_PROTOCOL Header;
///
/// Service set identifier. A 32-byte octets string.
///
- UINT8 SSId[32];
+ UINT8 SSId[32];
} WIFI_DEVICE_PATH;
///
/// Bluetooth LE Device Path SubType.
///
-#define MSG_BLUETOOTH_LE_DP 0x1E
+#define MSG_BLUETOOTH_LE_DP 0x1E
typedef struct {
- EFI_DEVICE_PATH_PROTOCOL Header;
- BLUETOOTH_LE_ADDRESS Address;
+ EFI_DEVICE_PATH_PROTOCOL Header;
+ BLUETOOTH_LE_ADDRESS Address;
} BLUETOOTH_LE_DEVICE_PATH;
//
// Media Device Path
//
-#define MEDIA_DEVICE_PATH 0x04
+#define MEDIA_DEVICE_PATH 0x04
///
/// Hard Drive Media Device Path SubType.
///
-#define MEDIA_HARDDRIVE_DP 0x01
+#define MEDIA_HARDDRIVE_DP 0x01
///
/// The Hard Drive Media Device Path is used to represent a partition on a hard drive.
///
typedef struct {
- EFI_DEVICE_PATH_PROTOCOL Header;
+ EFI_DEVICE_PATH_PROTOCOL Header;
///
/// Describes the entry in a partition table, starting with entry 1.
/// Partition number zero represents the entire device. Valid
/// partition numbers for a MBR partition are [1, 4]. Valid
/// partition numbers for a GPT partition are [1, NumberOfPartitionEntries].
///
- UINT32 PartitionNumber;
+ UINT32 PartitionNumber;
///
/// Starting LBA of the partition on the hard drive.
///
- UINT64 PartitionStart;
+ UINT64 PartitionStart;
///
/// Size of the partition in units of Logical Blocks.
///
- UINT64 PartitionSize;
+ UINT64 PartitionSize;
///
/// Signature unique to this partition:
/// If SignatureType is 0, this field has to be initialized with 16 zeros.
@@ -1021,68 +1040,68 @@ typedef struct {
/// The other 12 bytes are initialized with zeros.
/// If SignatureType is 2, this field contains a 16 byte signature.
///
- UINT8 Signature[16];
+ UINT8 Signature[16];
///
/// Partition Format: (Unused values reserved).
/// 0x01 - PC-AT compatible legacy MBR.
/// 0x02 - GUID Partition Table.
///
- UINT8 MBRType;
+ UINT8 MBRType;
///
/// Type of Disk Signature: (Unused values reserved).
/// 0x00 - No Disk Signature.
/// 0x01 - 32-bit signature from address 0x1b8 of the type 0x01 MBR.
/// 0x02 - GUID signature.
///
- UINT8 SignatureType;
+ UINT8 SignatureType;
} HARDDRIVE_DEVICE_PATH;
-#define MBR_TYPE_PCAT 0x01
-#define MBR_TYPE_EFI_PARTITION_TABLE_HEADER 0x02
+#define MBR_TYPE_PCAT 0x01
+#define MBR_TYPE_EFI_PARTITION_TABLE_HEADER 0x02
-#define NO_DISK_SIGNATURE 0x00
-#define SIGNATURE_TYPE_MBR 0x01
-#define SIGNATURE_TYPE_GUID 0x02
+#define NO_DISK_SIGNATURE 0x00
+#define SIGNATURE_TYPE_MBR 0x01
+#define SIGNATURE_TYPE_GUID 0x02
///
/// CD-ROM Media Device Path SubType.
///
-#define MEDIA_CDROM_DP 0x02
+#define MEDIA_CDROM_DP 0x02
///
/// The CD-ROM Media Device Path is used to define a system partition that exists on a CD-ROM.
///
typedef struct {
- EFI_DEVICE_PATH_PROTOCOL Header;
+ EFI_DEVICE_PATH_PROTOCOL Header;
///
/// Boot Entry number from the Boot Catalog. The Initial/Default entry is defined as zero.
///
- UINT32 BootEntry;
+ UINT32 BootEntry;
///
/// Starting RBA of the partition on the medium. CD-ROMs use Relative logical Block Addressing.
///
- UINT64 PartitionStart;
+ UINT64 PartitionStart;
///
/// Size of the partition in units of Blocks, also called Sectors.
///
- UINT64 PartitionSize;
+ UINT64 PartitionSize;
} CDROM_DEVICE_PATH;
//
// Use VENDOR_DEVICE_PATH struct
//
-#define MEDIA_VENDOR_DP 0x03 ///< Media vendor device path subtype.
+#define MEDIA_VENDOR_DP 0x03 ///< Media vendor device path subtype.
///
/// File Path Media Device Path SubType
///
-#define MEDIA_FILEPATH_DP 0x04
+#define MEDIA_FILEPATH_DP 0x04
typedef struct {
- EFI_DEVICE_PATH_PROTOCOL Header;
+ EFI_DEVICE_PATH_PROTOCOL Header;
///
/// A NULL-terminated Path string including directory and file names.
///
- CHAR16 PathName[1];
+ CHAR16 PathName[1];
} FILEPATH_DEVICE_PATH;
#define SIZE_OF_FILEPATH_DEVICE_PATH OFFSET_OF(FILEPATH_DEVICE_PATH,PathName)
@@ -1090,7 +1109,7 @@ typedef struct {
///
/// Media Protocol Device Path SubType.
///
-#define MEDIA_PROTOCOL_DP 0x05
+#define MEDIA_PROTOCOL_DP 0x05
///
/// The Media Protocol Device Path is used to denote the protocol that is being
@@ -1098,157 +1117,156 @@ typedef struct {
/// Many protocols are inherent to the style of device path.
///
typedef struct {
- EFI_DEVICE_PATH_PROTOCOL Header;
+ EFI_DEVICE_PATH_PROTOCOL Header;
///
/// The ID of the protocol.
///
- EFI_GUID Protocol;
+ EFI_GUID Protocol;
} MEDIA_PROTOCOL_DEVICE_PATH;
///
/// PIWG Firmware File SubType.
///
-#define MEDIA_PIWG_FW_FILE_DP 0x06
+#define MEDIA_PIWG_FW_FILE_DP 0x06
///
/// This device path is used by systems implementing the UEFI PI Specification 1.0 to describe a firmware file.
///
typedef struct {
- EFI_DEVICE_PATH_PROTOCOL Header;
+ EFI_DEVICE_PATH_PROTOCOL Header;
///
/// Firmware file name
///
- EFI_GUID FvFileName;
+ EFI_GUID FvFileName;
} MEDIA_FW_VOL_FILEPATH_DEVICE_PATH;
///
/// PIWG Firmware Volume Device Path SubType.
///
-#define MEDIA_PIWG_FW_VOL_DP 0x07
+#define MEDIA_PIWG_FW_VOL_DP 0x07
///
/// This device path is used by systems implementing the UEFI PI Specification 1.0 to describe a firmware volume.
///
typedef struct {
- EFI_DEVICE_PATH_PROTOCOL Header;
+ EFI_DEVICE_PATH_PROTOCOL Header;
///
/// Firmware volume name.
///
- EFI_GUID FvName;
+ EFI_GUID FvName;
} MEDIA_FW_VOL_DEVICE_PATH;
///
/// Media relative offset range device path.
///
-#define MEDIA_RELATIVE_OFFSET_RANGE_DP 0x08
+#define MEDIA_RELATIVE_OFFSET_RANGE_DP 0x08
///
/// Used to describe the offset range of media relative.
///
typedef struct {
- EFI_DEVICE_PATH_PROTOCOL Header;
- UINT32 Reserved;
- UINT64 StartingOffset;
- UINT64 EndingOffset;
+ EFI_DEVICE_PATH_PROTOCOL Header;
+ UINT32 Reserved;
+ UINT64 StartingOffset;
+ UINT64 EndingOffset;
} MEDIA_RELATIVE_OFFSET_RANGE_DEVICE_PATH;
///
/// This GUID defines a RAM Disk supporting a raw disk format in volatile memory.
///
-#define EFI_VIRTUAL_DISK_GUID EFI_ACPI_6_0_NFIT_GUID_RAM_DISK_SUPPORTING_VIRTUAL_DISK_REGION_VOLATILE
+#define EFI_VIRTUAL_DISK_GUID EFI_ACPI_6_0_NFIT_GUID_RAM_DISK_SUPPORTING_VIRTUAL_DISK_REGION_VOLATILE
-extern EFI_GUID gEfiVirtualDiskGuid;
+extern EFI_GUID gEfiVirtualDiskGuid;
///
/// This GUID defines a RAM Disk supporting an ISO image in volatile memory.
///
-#define EFI_VIRTUAL_CD_GUID EFI_ACPI_6_0_NFIT_GUID_RAM_DISK_SUPPORTING_VIRTUAL_CD_REGION_VOLATILE
+#define EFI_VIRTUAL_CD_GUID EFI_ACPI_6_0_NFIT_GUID_RAM_DISK_SUPPORTING_VIRTUAL_CD_REGION_VOLATILE
-extern EFI_GUID gEfiVirtualCdGuid;
+extern EFI_GUID gEfiVirtualCdGuid;
///
/// This GUID defines a RAM Disk supporting a raw disk format in persistent memory.
///
-#define EFI_PERSISTENT_VIRTUAL_DISK_GUID EFI_ACPI_6_0_NFIT_GUID_RAM_DISK_SUPPORTING_VIRTUAL_DISK_REGION_PERSISTENT
+#define EFI_PERSISTENT_VIRTUAL_DISK_GUID EFI_ACPI_6_0_NFIT_GUID_RAM_DISK_SUPPORTING_VIRTUAL_DISK_REGION_PERSISTENT
-extern EFI_GUID gEfiPersistentVirtualDiskGuid;
+extern EFI_GUID gEfiPersistentVirtualDiskGuid;
///
/// This GUID defines a RAM Disk supporting an ISO image in persistent memory.
///
-#define EFI_PERSISTENT_VIRTUAL_CD_GUID EFI_ACPI_6_0_NFIT_GUID_RAM_DISK_SUPPORTING_VIRTUAL_CD_REGION_PERSISTENT
+#define EFI_PERSISTENT_VIRTUAL_CD_GUID EFI_ACPI_6_0_NFIT_GUID_RAM_DISK_SUPPORTING_VIRTUAL_CD_REGION_PERSISTENT
-extern EFI_GUID gEfiPersistentVirtualCdGuid;
+extern EFI_GUID gEfiPersistentVirtualCdGuid;
///
/// Media ram disk device path.
///
-#define MEDIA_RAM_DISK_DP 0x09
+#define MEDIA_RAM_DISK_DP 0x09
///
/// Used to describe the ram disk device path.
///
typedef struct {
- EFI_DEVICE_PATH_PROTOCOL Header;
+ EFI_DEVICE_PATH_PROTOCOL Header;
///
/// Starting Memory Address.
///
- UINT32 StartingAddr[2];
+ UINT32 StartingAddr[2];
///
/// Ending Memory Address.
///
- UINT32 EndingAddr[2];
+ UINT32 EndingAddr[2];
///
/// GUID that defines the type of the RAM Disk.
///
- EFI_GUID TypeGuid;
+ EFI_GUID TypeGuid;
///
/// RAM Diskinstance number, if supported. The default value is zero.
///
- UINT16 Instance;
+ UINT16 Instance;
} MEDIA_RAM_DISK_DEVICE_PATH;
///
/// BIOS Boot Specification Device Path.
///
-#define BBS_DEVICE_PATH 0x05
+#define BBS_DEVICE_PATH 0x05
///
/// BIOS Boot Specification Device Path SubType.
///
-#define BBS_BBS_DP 0x01
+#define BBS_BBS_DP 0x01
///
/// This Device Path is used to describe the booting of non-EFI-aware operating systems.
///
typedef struct {
- EFI_DEVICE_PATH_PROTOCOL Header;
+ EFI_DEVICE_PATH_PROTOCOL Header;
///
/// Device Type as defined by the BIOS Boot Specification.
///
- UINT16 DeviceType;
+ UINT16 DeviceType;
///
/// Status Flags as defined by the BIOS Boot Specification.
///
- UINT16 StatusFlag;
+ UINT16 StatusFlag;
///
/// Null-terminated ASCII string that describes the boot device to a user.
///
- CHAR8 String[1];
+ CHAR8 String[1];
} BBS_BBS_DEVICE_PATH;
//
// DeviceType definitions - from BBS specification
//
-#define BBS_TYPE_FLOPPY 0x01
-#define BBS_TYPE_HARDDRIVE 0x02
-#define BBS_TYPE_CDROM 0x03
-#define BBS_TYPE_PCMCIA 0x04
-#define BBS_TYPE_USB 0x05
-#define BBS_TYPE_EMBEDDED_NETWORK 0x06
-#define BBS_TYPE_BEV 0x80
-#define BBS_TYPE_UNKNOWN 0xFF
-
+#define BBS_TYPE_FLOPPY 0x01
+#define BBS_TYPE_HARDDRIVE 0x02
+#define BBS_TYPE_CDROM 0x03
+#define BBS_TYPE_PCMCIA 0x04
+#define BBS_TYPE_USB 0x05
+#define BBS_TYPE_EMBEDDED_NETWORK 0x06
+#define BBS_TYPE_BEV 0x80
+#define BBS_TYPE_UNKNOWN 0xFF
///
/// Union of all possible Device Paths and pointers to Device Paths.
@@ -1289,6 +1307,7 @@ typedef union {
SAS_DEVICE_PATH Sas;
SASEX_DEVICE_PATH SasEx;
NVME_NAMESPACE_DEVICE_PATH NvmeNamespace;
+ NVME_OF_NAMESPACE_DEVICE_PATH NvmeOfNamespace;
DNS_DEVICE_PATH Dns;
URI_DEVICE_PATH Uri;
BLUETOOTH_DEVICE_PATH Bluetooth;
@@ -1309,8 +1328,6 @@ typedef union {
BBS_BBS_DEVICE_PATH Bbs;
} EFI_DEV_PATH;
-
-
typedef union {
EFI_DEVICE_PATH_PROTOCOL *DevPath;
PCI_DEVICE_PATH *Pci;
@@ -1347,6 +1364,7 @@ typedef union {
SAS_DEVICE_PATH *Sas;
SASEX_DEVICE_PATH *SasEx;
NVME_NAMESPACE_DEVICE_PATH *NvmeNamespace;
+ NVME_OF_NAMESPACE_DEVICE_PATH *NvmeOfNamespace;
DNS_DEVICE_PATH *Dns;
URI_DEVICE_PATH *Uri;
BLUETOOTH_DEVICE_PATH *Bluetooth;
@@ -1370,10 +1388,10 @@ typedef union {
#pragma pack()
-#define END_DEVICE_PATH_TYPE 0x7f
-#define END_ENTIRE_DEVICE_PATH_SUBTYPE 0xFF
-#define END_INSTANCE_DEVICE_PATH_SUBTYPE 0x01
+#define END_DEVICE_PATH_TYPE 0x7f
+#define END_ENTIRE_DEVICE_PATH_SUBTYPE 0xFF
+#define END_INSTANCE_DEVICE_PATH_SUBTYPE 0x01
-extern EFI_GUID gEfiDevicePathProtocolGuid;
+extern EFI_GUID gEfiDevicePathProtocolGuid;
#endif
diff --git a/sys/contrib/edk2/Include/Protocol/DevicePathFromText.h b/sys/contrib/edk2/Include/Protocol/DevicePathFromText.h
index 998fa5cd6562..1357720dec17 100644
--- a/sys/contrib/edk2/Include/Protocol/DevicePathFromText.h
+++ b/sys/contrib/edk2/Include/Protocol/DevicePathFromText.h
@@ -30,12 +30,11 @@
**/
typedef
-EFI_DEVICE_PATH_PROTOCOL*
+EFI_DEVICE_PATH_PROTOCOL *
(EFIAPI *EFI_DEVICE_PATH_FROM_TEXT_NODE)(
IN CONST CHAR16 *TextDeviceNode
);
-
/**
Convert text to the binary representation of a device node.
@@ -48,7 +47,7 @@ EFI_DEVICE_PATH_PROTOCOL*
**/
typedef
-EFI_DEVICE_PATH_PROTOCOL*
+EFI_DEVICE_PATH_PROTOCOL *
(EFIAPI *EFI_DEVICE_PATH_FROM_TEXT_PATH)(
IN CONST CHAR16 *TextDevicePath
);
@@ -57,10 +56,10 @@ EFI_DEVICE_PATH_PROTOCOL*
/// This protocol converts text to device paths and device nodes.
///
typedef struct {
- EFI_DEVICE_PATH_FROM_TEXT_NODE ConvertTextToDeviceNode;
- EFI_DEVICE_PATH_FROM_TEXT_PATH ConvertTextToDevicePath;
+ EFI_DEVICE_PATH_FROM_TEXT_NODE ConvertTextToDeviceNode;
+ EFI_DEVICE_PATH_FROM_TEXT_PATH ConvertTextToDevicePath;
} EFI_DEVICE_PATH_FROM_TEXT_PROTOCOL;
-extern EFI_GUID gEfiDevicePathFromTextProtocolGuid;
+extern EFI_GUID gEfiDevicePathFromTextProtocolGuid;
#endif
diff --git a/sys/contrib/edk2/Include/Protocol/DevicePathToText.h b/sys/contrib/edk2/Include/Protocol/DevicePathToText.h
index 4a8cdaffb330..08fd9f3e90a6 100644
--- a/sys/contrib/edk2/Include/Protocol/DevicePathToText.h
+++ b/sys/contrib/edk2/Include/Protocol/DevicePathToText.h
@@ -34,7 +34,7 @@
**/
typedef
-CHAR16*
+CHAR16 *
(EFIAPI *EFI_DEVICE_PATH_TO_TEXT_NODE)(
IN CONST EFI_DEVICE_PATH_PROTOCOL *DeviceNode,
IN BOOLEAN DisplayOnly,
@@ -57,7 +57,7 @@ CHAR16*
**/
typedef
-CHAR16*
+CHAR16 *
(EFIAPI *EFI_DEVICE_PATH_TO_TEXT_PATH)(
IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath,
IN BOOLEAN DisplayOnly,
@@ -68,12 +68,10 @@ CHAR16*
/// This protocol converts device paths and device nodes to text.
///
typedef struct {
- EFI_DEVICE_PATH_TO_TEXT_NODE ConvertDeviceNodeToText;
- EFI_DEVICE_PATH_TO_TEXT_PATH ConvertDevicePathToText;
+ EFI_DEVICE_PATH_TO_TEXT_NODE ConvertDeviceNodeToText;
+ EFI_DEVICE_PATH_TO_TEXT_PATH ConvertDevicePathToText;
} EFI_DEVICE_PATH_TO_TEXT_PROTOCOL;
-extern EFI_GUID gEfiDevicePathToTextProtocolGuid;
+extern EFI_GUID gEfiDevicePathToTextProtocolGuid;
#endif
-
-
diff --git a/sys/contrib/edk2/Include/Protocol/DevicePathUtilities.h b/sys/contrib/edk2/Include/Protocol/DevicePathUtilities.h
index 68c91f05f1a0..bcc515f9c8ca 100644
--- a/sys/contrib/edk2/Include/Protocol/DevicePathUtilities.h
+++ b/sys/contrib/edk2/Include/Protocol/DevicePathUtilities.h
@@ -33,7 +33,6 @@ UINTN
IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath
);
-
/**
Create a duplicate of the specified path.
@@ -44,7 +43,7 @@ UINTN
**/
typedef
-EFI_DEVICE_PATH_PROTOCOL*
+EFI_DEVICE_PATH_PROTOCOL *
(EFIAPI *EFI_DEVICE_PATH_UTILS_DUP_DEVICE_PATH)(
IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath
);
@@ -63,7 +62,7 @@ EFI_DEVICE_PATH_PROTOCOL*
**/
typedef
-EFI_DEVICE_PATH_PROTOCOL*
+EFI_DEVICE_PATH_PROTOCOL *
(EFIAPI *EFI_DEVICE_PATH_UTILS_APPEND_PATH)(
IN CONST EFI_DEVICE_PATH_PROTOCOL *Src1,
IN CONST EFI_DEVICE_PATH_PROTOCOL *Src2
@@ -83,7 +82,7 @@ EFI_DEVICE_PATH_PROTOCOL*
**/
typedef
-EFI_DEVICE_PATH_PROTOCOL*
+EFI_DEVICE_PATH_PROTOCOL *
(EFIAPI *EFI_DEVICE_PATH_UTILS_APPEND_NODE)(
IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath,
IN CONST EFI_DEVICE_PATH_PROTOCOL *DeviceNode
@@ -100,7 +99,7 @@ EFI_DEVICE_PATH_PROTOCOL*
**/
typedef
-EFI_DEVICE_PATH_PROTOCOL*
+EFI_DEVICE_PATH_PROTOCOL *
(EFIAPI *EFI_DEVICE_PATH_UTILS_APPEND_INSTANCE)(
IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath,
IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePathInstance
@@ -123,7 +122,7 @@ EFI_DEVICE_PATH_PROTOCOL*
**/
typedef
-EFI_DEVICE_PATH_PROTOCOL*
+EFI_DEVICE_PATH_PROTOCOL *
(EFIAPI *EFI_DEVICE_PATH_UTILS_GET_NEXT_INSTANCE)(
IN OUT EFI_DEVICE_PATH_PROTOCOL **DevicePathInstance,
OUT UINTN *DevicePathInstanceSize
@@ -145,12 +144,12 @@ EFI_DEVICE_PATH_PROTOCOL*
**/
typedef
-EFI_DEVICE_PATH_PROTOCOL*
+EFI_DEVICE_PATH_PROTOCOL *
(EFIAPI *EFI_DEVICE_PATH_UTILS_CREATE_NODE)(
IN UINT8 NodeType,
IN UINT8 NodeSubType,
IN UINT16 NodeLength
-);
+ );
/**
Returns whether a device path is multi-instance.
@@ -171,16 +170,16 @@ BOOLEAN
/// This protocol is used to creates and manipulates device paths and device nodes.
///
typedef struct {
- EFI_DEVICE_PATH_UTILS_GET_DEVICE_PATH_SIZE GetDevicePathSize;
- EFI_DEVICE_PATH_UTILS_DUP_DEVICE_PATH DuplicateDevicePath;
- EFI_DEVICE_PATH_UTILS_APPEND_PATH AppendDevicePath;
- EFI_DEVICE_PATH_UTILS_APPEND_NODE AppendDeviceNode;
- EFI_DEVICE_PATH_UTILS_APPEND_INSTANCE AppendDevicePathInstance;
- EFI_DEVICE_PATH_UTILS_GET_NEXT_INSTANCE GetNextDevicePathInstance;
- EFI_DEVICE_PATH_UTILS_IS_MULTI_INSTANCE IsDevicePathMultiInstance;
- EFI_DEVICE_PATH_UTILS_CREATE_NODE CreateDeviceNode;
+ EFI_DEVICE_PATH_UTILS_GET_DEVICE_PATH_SIZE GetDevicePathSize;
+ EFI_DEVICE_PATH_UTILS_DUP_DEVICE_PATH DuplicateDevicePath;
+ EFI_DEVICE_PATH_UTILS_APPEND_PATH AppendDevicePath;
+ EFI_DEVICE_PATH_UTILS_APPEND_NODE AppendDeviceNode;
+ EFI_DEVICE_PATH_UTILS_APPEND_INSTANCE AppendDevicePathInstance;
+ EFI_DEVICE_PATH_UTILS_GET_NEXT_INSTANCE GetNextDevicePathInstance;
+ EFI_DEVICE_PATH_UTILS_IS_MULTI_INSTANCE IsDevicePathMultiInstance;
+ EFI_DEVICE_PATH_UTILS_CREATE_NODE CreateDeviceNode;
} EFI_DEVICE_PATH_UTILITIES_PROTOCOL;
-extern EFI_GUID gEfiDevicePathUtilitiesProtocolGuid;
+extern EFI_GUID gEfiDevicePathUtilitiesProtocolGuid;
#endif
diff --git a/sys/contrib/edk2/Include/Protocol/SimpleTextIn.h b/sys/contrib/edk2/Include/Protocol/SimpleTextIn.h
index e6884d89c1c8..3d1833ead97b 100644
--- a/sys/contrib/edk2/Include/Protocol/SimpleTextIn.h
+++ b/sys/contrib/edk2/Include/Protocol/SimpleTextIn.h
@@ -17,24 +17,24 @@
0x387477c1, 0x69c7, 0x11d2, {0x8e, 0x39, 0x0, 0xa0, 0xc9, 0x69, 0x72, 0x3b } \
}
-typedef struct _EFI_SIMPLE_TEXT_INPUT_PROTOCOL EFI_SIMPLE_TEXT_INPUT_PROTOCOL;
+typedef struct _EFI_SIMPLE_TEXT_INPUT_PROTOCOL EFI_SIMPLE_TEXT_INPUT_PROTOCOL;
///
/// Protocol GUID name defined in EFI1.1.
///
-#define SIMPLE_INPUT_PROTOCOL EFI_SIMPLE_TEXT_INPUT_PROTOCOL_GUID
+#define SIMPLE_INPUT_PROTOCOL EFI_SIMPLE_TEXT_INPUT_PROTOCOL_GUID
///
/// Protocol name in EFI1.1 for backward-compatible.
///
-typedef struct _EFI_SIMPLE_TEXT_INPUT_PROTOCOL SIMPLE_INPUT_INTERFACE;
+typedef struct _EFI_SIMPLE_TEXT_INPUT_PROTOCOL SIMPLE_INPUT_INTERFACE;
///
/// The keystroke information for the key that was pressed.
///
typedef struct {
- UINT16 ScanCode;
- CHAR16 UnicodeChar;
+ UINT16 ScanCode;
+ CHAR16 UnicodeChar;
} EFI_INPUT_KEY;
//
@@ -100,6 +100,7 @@ EFI_STATUS
@retval EFI_NOT_READY There was no keystroke data available.
@retval EFI_DEVICE_ERROR The keystroke information was not returned due to
hardware errors.
+ @retval EFI_UNSUPPORTED The device does not support the ability to read keystroke data.
**/
typedef
@@ -114,14 +115,14 @@ EFI_STATUS
/// It is the minimum required protocol for ConsoleIn.
///
struct _EFI_SIMPLE_TEXT_INPUT_PROTOCOL {
- EFI_INPUT_RESET Reset;
- EFI_INPUT_READ_KEY ReadKeyStroke;
+ EFI_INPUT_RESET Reset;
+ EFI_INPUT_READ_KEY ReadKeyStroke;
///
/// Event to use with WaitForEvent() to wait for a key to be available
///
- EFI_EVENT WaitForKey;
+ EFI_EVENT WaitForKey;
};
-extern EFI_GUID gEfiSimpleTextInProtocolGuid;
+extern EFI_GUID gEfiSimpleTextInProtocolGuid;
#endif
diff --git a/sys/contrib/edk2/Include/Protocol/SimpleTextInEx.h b/sys/contrib/edk2/Include/Protocol/SimpleTextInEx.h
index f6a80e7c4f4d..225d0d29b76f 100644
--- a/sys/contrib/edk2/Include/Protocol/SimpleTextInEx.h
+++ b/sys/contrib/edk2/Include/Protocol/SimpleTextInEx.h
@@ -18,7 +18,6 @@
#define EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL_GUID \
{0xdd9e7534, 0x7762, 0x4698, { 0x8c, 0x14, 0xf5, 0x85, 0x17, 0xa6, 0x25, 0xaa } }
-
typedef struct _EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL;
/**
@@ -51,8 +50,7 @@ EFI_STATUS
(EFIAPI *EFI_INPUT_RESET_EX)(
IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This,
IN BOOLEAN ExtendedVerification
-);
-
+ );
///
/// EFI_KEY_TOGGLE_STATE. The toggle states are defined.
@@ -68,25 +66,25 @@ typedef struct _EFI_KEY_STATE {
/// returned value is valid only if the high
/// order bit has been set.
///
- UINT32 KeyShiftState;
+ UINT32 KeyShiftState;
///
/// Reflects the current internal state of
/// various toggled attributes. The returned
/// value is valid only if the high order
/// bit has been set.
///
- EFI_KEY_TOGGLE_STATE KeyToggleState;
+ EFI_KEY_TOGGLE_STATE KeyToggleState;
} EFI_KEY_STATE;
typedef struct {
///
/// The EFI scan code and Unicode value returned from the input device.
///
- EFI_INPUT_KEY Key;
+ EFI_INPUT_KEY Key;
///
/// The current state of various toggled attributes as well as input modifier values.
///
- EFI_KEY_STATE KeyState;
+ EFI_KEY_STATE KeyState;
} EFI_KEY_DATA;
//
@@ -95,55 +93,55 @@ typedef struct {
//
// Shift state
//
-#define EFI_SHIFT_STATE_VALID 0x80000000
-#define EFI_RIGHT_SHIFT_PRESSED 0x00000001
-#define EFI_LEFT_SHIFT_PRESSED 0x00000002
-#define EFI_RIGHT_CONTROL_PRESSED 0x00000004
-#define EFI_LEFT_CONTROL_PRESSED 0x00000008
-#define EFI_RIGHT_ALT_PRESSED 0x00000010
-#define EFI_LEFT_ALT_PRESSED 0x00000020
-#define EFI_RIGHT_LOGO_PRESSED 0x00000040
-#define EFI_LEFT_LOGO_PRESSED 0x00000080
-#define EFI_MENU_KEY_PRESSED 0x00000100
-#define EFI_SYS_REQ_PRESSED 0x00000200
+#define EFI_SHIFT_STATE_VALID 0x80000000
+#define EFI_RIGHT_SHIFT_PRESSED 0x00000001
+#define EFI_LEFT_SHIFT_PRESSED 0x00000002
+#define EFI_RIGHT_CONTROL_PRESSED 0x00000004
+#define EFI_LEFT_CONTROL_PRESSED 0x00000008
+#define EFI_RIGHT_ALT_PRESSED 0x00000010
+#define EFI_LEFT_ALT_PRESSED 0x00000020
+#define EFI_RIGHT_LOGO_PRESSED 0x00000040
+#define EFI_LEFT_LOGO_PRESSED 0x00000080
+#define EFI_MENU_KEY_PRESSED 0x00000100
+#define EFI_SYS_REQ_PRESSED 0x00000200
//
// Toggle state
//
-#define EFI_TOGGLE_STATE_VALID 0x80
-#define EFI_KEY_STATE_EXPOSED 0x40
-#define EFI_SCROLL_LOCK_ACTIVE 0x01
-#define EFI_NUM_LOCK_ACTIVE 0x02
-#define EFI_CAPS_LOCK_ACTIVE 0x04
+#define EFI_TOGGLE_STATE_VALID 0x80
+#define EFI_KEY_STATE_EXPOSED 0x40
+#define EFI_SCROLL_LOCK_ACTIVE 0x01
+#define EFI_NUM_LOCK_ACTIVE 0x02
+#define EFI_CAPS_LOCK_ACTIVE 0x04
//
// EFI Scan codes
//
-#define SCAN_F11 0x0015
-#define SCAN_F12 0x0016
-#define SCAN_PAUSE 0x0048
-#define SCAN_F13 0x0068
-#define SCAN_F14 0x0069
-#define SCAN_F15 0x006A
-#define SCAN_F16 0x006B
-#define SCAN_F17 0x006C
-#define SCAN_F18 0x006D
-#define SCAN_F19 0x006E
-#define SCAN_F20 0x006F
-#define SCAN_F21 0x0070
-#define SCAN_F22 0x0071
-#define SCAN_F23 0x0072
-#define SCAN_F24 0x0073
-#define SCAN_MUTE 0x007F
-#define SCAN_VOLUME_UP 0x0080
-#define SCAN_VOLUME_DOWN 0x0081
-#define SCAN_BRIGHTNESS_UP 0x0100
-#define SCAN_BRIGHTNESS_DOWN 0x0101
-#define SCAN_SUSPEND 0x0102
-#define SCAN_HIBERNATE 0x0103
-#define SCAN_TOGGLE_DISPLAY 0x0104
-#define SCAN_RECOVERY 0x0105
-#define SCAN_EJECT 0x0106
+#define SCAN_F11 0x0015
+#define SCAN_F12 0x0016
+#define SCAN_PAUSE 0x0048
+#define SCAN_F13 0x0068
+#define SCAN_F14 0x0069
+#define SCAN_F15 0x006A
+#define SCAN_F16 0x006B
+#define SCAN_F17 0x006C
+#define SCAN_F18 0x006D
+#define SCAN_F19 0x006E
+#define SCAN_F20 0x006F
+#define SCAN_F21 0x0070
+#define SCAN_F22 0x0071
+#define SCAN_F23 0x0072
+#define SCAN_F24 0x0073
+#define SCAN_MUTE 0x007F
+#define SCAN_VOLUME_UP 0x0080
+#define SCAN_VOLUME_DOWN 0x0081
+#define SCAN_BRIGHTNESS_UP 0x0100
+#define SCAN_BRIGHTNESS_DOWN 0x0101
+#define SCAN_SUSPEND 0x0102
+#define SCAN_HIBERNATE 0x0103
+#define SCAN_TOGGLE_DISPLAY 0x0104
+#define SCAN_RECOVERY 0x0105
+#define SCAN_EJECT 0x0106
/**
The function reads the next keystroke from the input device. If
@@ -188,6 +186,7 @@ typedef struct {
@retval EFI_NOT_READY There was no keystroke data available.
@retval EFI_DEVICE_ERROR The keystroke information was not returned due to
hardware errors.
+ @retval EFI_UNSUPPORTED The device does not support the ability to read keystroke data.
**/
@@ -196,7 +195,7 @@ EFI_STATUS
(EFIAPI *EFI_INPUT_READ_KEY_EX)(
IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This,
OUT EFI_KEY_DATA *KeyData
-);
+ );
/**
The SetState() function allows the input device hardware to
@@ -223,7 +222,7 @@ EFI_STATUS
(EFIAPI *EFI_SET_STATE)(
IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This,
IN EFI_KEY_TOGGLE_STATE *KeyToggleState
-);
+ );
///
/// The function will be called when the key sequence is typed specified by KeyData.
@@ -232,7 +231,7 @@ typedef
EFI_STATUS
(EFIAPI *EFI_KEY_NOTIFY_FUNCTION)(
IN EFI_KEY_DATA *KeyData
-);
+ );
/**
The RegisterKeystrokeNotify() function registers a function
@@ -267,7 +266,7 @@ EFI_STATUS
IN EFI_KEY_DATA *KeyData,
IN EFI_KEY_NOTIFY_FUNCTION KeyNotificationFunction,
OUT VOID **NotifyHandle
-);
+ );
/**
The UnregisterKeystrokeNotify() function removes the
@@ -289,8 +288,7 @@ EFI_STATUS
(EFIAPI *EFI_UNREGISTER_KEYSTROKE_NOTIFY)(
IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This,
IN VOID *NotificationHandle
-);
-
+ );
///
/// The EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL is used on the ConsoleIn
@@ -298,20 +296,18 @@ EFI_STATUS
/// which allows a variety of extended shift state information to be
/// returned.
///
-struct _EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL{
- EFI_INPUT_RESET_EX Reset;
- EFI_INPUT_READ_KEY_EX ReadKeyStrokeEx;
+struct _EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL {
+ EFI_INPUT_RESET_EX Reset;
+ EFI_INPUT_READ_KEY_EX ReadKeyStrokeEx;
///
/// Event to use with WaitForEvent() to wait for a key to be available.
///
- EFI_EVENT WaitForKeyEx;
- EFI_SET_STATE SetState;
- EFI_REGISTER_KEYSTROKE_NOTIFY RegisterKeyNotify;
- EFI_UNREGISTER_KEYSTROKE_NOTIFY UnregisterKeyNotify;
+ EFI_EVENT WaitForKeyEx;
+ EFI_SET_STATE SetState;
+ EFI_REGISTER_KEYSTROKE_NOTIFY RegisterKeyNotify;
+ EFI_UNREGISTER_KEYSTROKE_NOTIFY UnregisterKeyNotify;
};
-
-extern EFI_GUID gEfiSimpleTextInputExProtocolGuid;
+extern EFI_GUID gEfiSimpleTextInputExProtocolGuid;
#endif
-
diff --git a/sys/contrib/edk2/Include/Protocol/SimpleTextOut.h b/sys/contrib/edk2/Include/Protocol/SimpleTextOut.h
index 18438d3533ef..c490607077d4 100644
--- a/sys/contrib/edk2/Include/Protocol/SimpleTextOut.h
+++ b/sys/contrib/edk2/Include/Protocol/SimpleTextOut.h
@@ -22,17 +22,17 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
///
/// Protocol GUID defined in EFI1.1.
///
-#define SIMPLE_TEXT_OUTPUT_PROTOCOL EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL_GUID
+#define SIMPLE_TEXT_OUTPUT_PROTOCOL EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL_GUID
typedef struct _EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL;
///
/// Backward-compatible with EFI1.1.
///
-typedef EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL SIMPLE_TEXT_OUTPUT_INTERFACE;
+typedef EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL SIMPLE_TEXT_OUTPUT_INTERFACE;
//
-// Define's for required EFI Unicode Box Draw characters
+// Defines for required EFI Unicode Box Draw characters
//
#define BOXDRAW_HORIZONTAL 0x2500
#define BOXDRAW_VERTICAL 0x2502
@@ -84,39 +84,39 @@ typedef EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL SIMPLE_TEXT_OUTPUT_INTERFACE;
//
// EFI Required Geometric Shapes Code Chart
//
-#define GEOMETRICSHAPE_UP_TRIANGLE 0x25b2
-#define GEOMETRICSHAPE_RIGHT_TRIANGLE 0x25ba
-#define GEOMETRICSHAPE_DOWN_TRIANGLE 0x25bc
-#define GEOMETRICSHAPE_LEFT_TRIANGLE 0x25c4
+#define GEOMETRICSHAPE_UP_TRIANGLE 0x25b2
+#define GEOMETRICSHAPE_RIGHT_TRIANGLE 0x25ba
+#define GEOMETRICSHAPE_DOWN_TRIANGLE 0x25bc
+#define GEOMETRICSHAPE_LEFT_TRIANGLE 0x25c4
//
// EFI Required Arrow shapes
//
-#define ARROW_LEFT 0x2190
-#define ARROW_UP 0x2191
-#define ARROW_RIGHT 0x2192
-#define ARROW_DOWN 0x2193
+#define ARROW_LEFT 0x2190
+#define ARROW_UP 0x2191
+#define ARROW_RIGHT 0x2192
+#define ARROW_DOWN 0x2193
//
// EFI Console Colours
//
-#define EFI_BLACK 0x00
-#define EFI_BLUE 0x01
-#define EFI_GREEN 0x02
-#define EFI_CYAN (EFI_BLUE | EFI_GREEN)
-#define EFI_RED 0x04
-#define EFI_MAGENTA (EFI_BLUE | EFI_RED)
-#define EFI_BROWN (EFI_GREEN | EFI_RED)
-#define EFI_LIGHTGRAY (EFI_BLUE | EFI_GREEN | EFI_RED)
-#define EFI_BRIGHT 0x08
-#define EFI_DARKGRAY (EFI_BLACK | EFI_BRIGHT)
-#define EFI_LIGHTBLUE (EFI_BLUE | EFI_BRIGHT)
-#define EFI_LIGHTGREEN (EFI_GREEN | EFI_BRIGHT)
-#define EFI_LIGHTCYAN (EFI_CYAN | EFI_BRIGHT)
-#define EFI_LIGHTRED (EFI_RED | EFI_BRIGHT)
-#define EFI_LIGHTMAGENTA (EFI_MAGENTA | EFI_BRIGHT)
-#define EFI_YELLOW (EFI_BROWN | EFI_BRIGHT)
-#define EFI_WHITE (EFI_BLUE | EFI_GREEN | EFI_RED | EFI_BRIGHT)
+#define EFI_BLACK 0x00
+#define EFI_BLUE 0x01
+#define EFI_GREEN 0x02
+#define EFI_CYAN (EFI_BLUE | EFI_GREEN)
+#define EFI_RED 0x04
+#define EFI_MAGENTA (EFI_BLUE | EFI_RED)
+#define EFI_BROWN (EFI_GREEN | EFI_RED)
+#define EFI_LIGHTGRAY (EFI_BLUE | EFI_GREEN | EFI_RED)
+#define EFI_BRIGHT 0x08
+#define EFI_DARKGRAY (EFI_BLACK | EFI_BRIGHT)
+#define EFI_LIGHTBLUE (EFI_BLUE | EFI_BRIGHT)
+#define EFI_LIGHTGREEN (EFI_GREEN | EFI_BRIGHT)
+#define EFI_LIGHTCYAN (EFI_CYAN | EFI_BRIGHT)
+#define EFI_LIGHTRED (EFI_RED | EFI_BRIGHT)
+#define EFI_LIGHTMAGENTA (EFI_MAGENTA | EFI_BRIGHT)
+#define EFI_YELLOW (EFI_BROWN | EFI_BRIGHT)
+#define EFI_WHITE (EFI_BLUE | EFI_GREEN | EFI_RED | EFI_BRIGHT)
//
// Macro to accept color values in their raw form to create
@@ -129,7 +129,7 @@ typedef EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL SIMPLE_TEXT_OUTPUT_INTERFACE;
//
// Do not use EFI_BACKGROUND_xxx values with this macro.
//
-#define EFI_TEXT_ATTR(Foreground,Background) ((Foreground) | ((Background) << 4))
+#define EFI_TEXT_ATTR(Foreground, Background) ((Foreground) | ((Background) << 4))
#define EFI_BACKGROUND_BLACK 0x00
#define EFI_BACKGROUND_BLUE 0x10
@@ -151,7 +151,7 @@ typedef EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL SIMPLE_TEXT_OUTPUT_INTERFACE;
#define EFI_WIDE_ATTRIBUTE 0x80
/**
- Reset the text output device hardware and optionaly run diagnostics
+ Reset the text output device hardware and optionally run diagnostics
@param This The protocol instance pointer.
@param ExtendedVerification Driver may perform more exhaustive verification
@@ -350,7 +350,7 @@ typedef struct {
///
/// The number of modes supported by QueryMode () and SetMode ().
///
- INT32 MaxMode;
+ INT32 MaxMode;
//
// current settings
@@ -359,23 +359,23 @@ typedef struct {
///
/// The text mode of the output device(s).
///
- INT32 Mode;
+ INT32 Mode;
///
/// The current character output attribute.
///
- INT32 Attribute;
+ INT32 Attribute;
///
/// The cursor's column.
///
- INT32 CursorColumn;
+ INT32 CursorColumn;
///
/// The cursor's row.
///
- INT32 CursorRow;
+ INT32 CursorRow;
///
- /// The cursor is currently visbile or not.
+ /// The cursor is currently visible or not.
///
- BOOLEAN CursorVisible;
+ BOOLEAN CursorVisible;
} EFI_SIMPLE_TEXT_OUTPUT_MODE;
///
@@ -385,25 +385,25 @@ typedef struct {
/// devices is at least 80 x 25 characters.
///
struct _EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL {
- EFI_TEXT_RESET Reset;
+ EFI_TEXT_RESET Reset;
- EFI_TEXT_STRING OutputString;
- EFI_TEXT_TEST_STRING TestString;
+ EFI_TEXT_STRING OutputString;
+ EFI_TEXT_TEST_STRING TestString;
- EFI_TEXT_QUERY_MODE QueryMode;
- EFI_TEXT_SET_MODE SetMode;
- EFI_TEXT_SET_ATTRIBUTE SetAttribute;
+ EFI_TEXT_QUERY_MODE QueryMode;
+ EFI_TEXT_SET_MODE SetMode;
+ EFI_TEXT_SET_ATTRIBUTE SetAttribute;
- EFI_TEXT_CLEAR_SCREEN ClearScreen;
- EFI_TEXT_SET_CURSOR_POSITION SetCursorPosition;
- EFI_TEXT_ENABLE_CURSOR EnableCursor;
+ EFI_TEXT_CLEAR_SCREEN ClearScreen;
+ EFI_TEXT_SET_CURSOR_POSITION SetCursorPosition;
+ EFI_TEXT_ENABLE_CURSOR EnableCursor;
///
/// Pointer to SIMPLE_TEXT_OUTPUT_MODE data.
///
- EFI_SIMPLE_TEXT_OUTPUT_MODE *Mode;
+ EFI_SIMPLE_TEXT_OUTPUT_MODE *Mode;
};
-extern EFI_GUID gEfiSimpleTextOutProtocolGuid;
+extern EFI_GUID gEfiSimpleTextOutProtocolGuid;
#endif
diff --git a/sys/contrib/edk2/Include/Uefi.h b/sys/contrib/edk2/Include/Uefi.h
index dd0ece6103a2..7a1c3655c15c 100644
--- a/sys/contrib/edk2/Include/Uefi.h
+++ b/sys/contrib/edk2/Include/Uefi.h
@@ -18,4 +18,3 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
#include <Uefi/UefiSpec.h>
#endif
-
diff --git a/sys/contrib/edk2/Include/Uefi/UefiBaseType.h b/sys/contrib/edk2/Include/Uefi/UefiBaseType.h
index 6a2f33039377..d1900b8d5b6f 100644
--- a/sys/contrib/edk2/Include/Uefi/UefiBaseType.h
+++ b/sys/contrib/edk2/Include/Uefi/UefiBaseType.h
@@ -1,9 +1,10 @@
/** @file
Defines data types and constants introduced in UEFI.
-Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2006 - 2021, Intel Corporation. All rights reserved.<BR>
Portions copyright (c) 2011 - 2016, ARM Ltd. All rights reserved.<BR>
Copyright (c) 2020, Hewlett Packard Enterprise Development LP. All rights reserved.<BR>
+Copyright (c) 2022, Loongson Technology Corporation Limited. All rights reserved.<BR>
SPDX-License-Identifier: BSD-2-Clause-Patent
@@ -21,37 +22,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 +66,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 +93,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 +101,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.
///@{
@@ -142,22 +141,24 @@ typedef union {
#define EFI_END_OF_FILE RETURN_END_OF_FILE
#define EFI_INVALID_LANGUAGE RETURN_INVALID_LANGUAGE
#define EFI_COMPROMISED_DATA RETURN_COMPROMISED_DATA
+#define EFI_IP_ADDRESS_CONFLICT RETURN_IP_ADDRESS_CONFLICT
#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 EFI_WARN_RESET_REQUIRED RETURN_WARN_RESET_REQUIRED
///@}
///
/// 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 +172,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 +182,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 +215,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,51 +249,77 @@ typedef union {
#define EFI_IMAGE_MACHINE_RISCV64 0x5064
#define EFI_IMAGE_MACHINE_RISCV128 0x5128
-#if defined (MDE_CPU_IA32)
+///
+/// PE32+ Machine type for LoongArch 32/64 images.
+///
+#define EFI_IMAGE_MACHINE_LOONGARCH32 0x6232
+#define EFI_IMAGE_MACHINE_LOONGARCH64 0x6264
+
+#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_LOONGARCH64)
+
+#define EFI_IMAGE_MACHINE_TYPE_SUPPORTED(Machine) \
+ ((Machine) == EFI_IMAGE_MACHINE_LOONGARCH64)
+
+#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
+ #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
diff --git a/sys/contrib/edk2/Include/Uefi/UefiGpt.h b/sys/contrib/edk2/Include/Uefi/UefiGpt.h
index af0556131b00..70e03e76c945 100644
--- a/sys/contrib/edk2/Include/Uefi/UefiGpt.h
+++ b/sys/contrib/edk2/Include/Uefi/UefiGpt.h
@@ -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
-
-
diff --git a/sys/contrib/edk2/Include/Uefi/UefiInternalFormRepresentation.h b/sys/contrib/edk2/Include/Uefi/UefiInternalFormRepresentation.h
index 0c7835c8e432..5e1f364275ee 100644
--- a/sys/contrib/edk2/Include/Uefi/UefiInternalFormRepresentation.h
+++ b/sys/contrib/edk2/Include/Uefi/UefiInternalFormRepresentation.h
@@ -20,8 +20,8 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
///
/// The following types are currently defined:
///
-typedef VOID* EFI_HII_HANDLE;
-typedef CHAR16* EFI_STRING;
+typedef VOID *EFI_HII_HANDLE;
+typedef CHAR16 *EFI_STRING;
typedef UINT16 EFI_IMAGE_ID;
typedef UINT16 EFI_QUESTION_ID;
typedef UINT16 EFI_STRING_ID;
@@ -29,11 +29,9 @@ typedef UINT16 EFI_FORM_ID;
typedef UINT16 EFI_VARSTORE_ID;
typedef UINT16 EFI_ANIMATION_ID;
-typedef UINT16 EFI_DEFAULT_ID;
-
-typedef UINT32 EFI_HII_FONT_STYLE;
-
+typedef UINT16 EFI_DEFAULT_ID;
+typedef UINT32 EFI_HII_FONT_STYLE;
#pragma pack(1)
@@ -46,35 +44,35 @@ typedef UINT32 EFI_HII_FONT_STYLE;
/// The header found at the start of each package list.
///
typedef struct {
- EFI_GUID PackageListGuid;
- UINT32 PackageLength;
+ EFI_GUID PackageListGuid;
+ UINT32 PackageLength;
} EFI_HII_PACKAGE_LIST_HEADER;
///
/// The header found at the start of each package.
///
typedef struct {
- UINT32 Length:24;
- UINT32 Type:8;
+ UINT32 Length : 24;
+ UINT32 Type : 8;
// UINT8 Data[...];
} EFI_HII_PACKAGE_HEADER;
//
// Value of HII package type
//
-#define EFI_HII_PACKAGE_TYPE_ALL 0x00
-#define EFI_HII_PACKAGE_TYPE_GUID 0x01
-#define EFI_HII_PACKAGE_FORMS 0x02
-#define EFI_HII_PACKAGE_STRINGS 0x04
-#define EFI_HII_PACKAGE_FONTS 0x05
-#define EFI_HII_PACKAGE_IMAGES 0x06
-#define EFI_HII_PACKAGE_SIMPLE_FONTS 0x07
-#define EFI_HII_PACKAGE_DEVICE_PATH 0x08
-#define EFI_HII_PACKAGE_KEYBOARD_LAYOUT 0x09
-#define EFI_HII_PACKAGE_ANIMATIONS 0x0A
-#define EFI_HII_PACKAGE_END 0xDF
-#define EFI_HII_PACKAGE_TYPE_SYSTEM_BEGIN 0xE0
-#define EFI_HII_PACKAGE_TYPE_SYSTEM_END 0xFF
+#define EFI_HII_PACKAGE_TYPE_ALL 0x00
+#define EFI_HII_PACKAGE_TYPE_GUID 0x01
+#define EFI_HII_PACKAGE_FORMS 0x02
+#define EFI_HII_PACKAGE_STRINGS 0x04
+#define EFI_HII_PACKAGE_FONTS 0x05
+#define EFI_HII_PACKAGE_IMAGES 0x06
+#define EFI_HII_PACKAGE_SIMPLE_FONTS 0x07
+#define EFI_HII_PACKAGE_DEVICE_PATH 0x08
+#define EFI_HII_PACKAGE_KEYBOARD_LAYOUT 0x09
+#define EFI_HII_PACKAGE_ANIMATIONS 0x0A
+#define EFI_HII_PACKAGE_END 0xDF
+#define EFI_HII_PACKAGE_TYPE_SYSTEM_BEGIN 0xE0
+#define EFI_HII_PACKAGE_TYPE_SYSTEM_END 0xFF
//
// Definitions for Simplified Font Package
@@ -83,10 +81,10 @@ typedef struct {
///
/// Contents of EFI_NARROW_GLYPH.Attributes.
///@{
-#define EFI_GLYPH_NON_SPACING 0x01
-#define EFI_GLYPH_WIDE 0x02
-#define EFI_GLYPH_HEIGHT 19
-#define EFI_GLYPH_WIDTH 8
+#define EFI_GLYPH_NON_SPACING 0x01
+#define EFI_GLYPH_WIDE 0x02
+#define EFI_GLYPH_HEIGHT 19
+#define EFI_GLYPH_WIDTH 8
///@}
///
@@ -97,17 +95,17 @@ typedef struct {
/// The Unicode representation of the glyph. The term weight is the
/// technical term for a character code.
///
- CHAR16 UnicodeWeight;
+ CHAR16 UnicodeWeight;
///
/// The data element containing the glyph definitions.
///
- UINT8 Attributes;
+ UINT8 Attributes;
///
/// The column major glyph representation of the character. Bits
/// with values of one indicate that the corresponding pixel is to be
/// on when normally displayed; those with zero are off.
///
- UINT8 GlyphCol1[EFI_GLYPH_HEIGHT];
+ UINT8 GlyphCol1[EFI_GLYPH_HEIGHT];
} EFI_NARROW_GLYPH;
///
@@ -119,29 +117,29 @@ typedef struct {
/// The Unicode representation of the glyph. The term weight is the
/// technical term for a character code.
///
- CHAR16 UnicodeWeight;
+ CHAR16 UnicodeWeight;
///
/// The data element containing the glyph definitions.
///
- UINT8 Attributes;
+ UINT8 Attributes;
///
/// The column major glyph representation of the character. Bits
/// with values of one indicate that the corresponding pixel is to be
/// on when normally displayed; those with zero are off.
///
- UINT8 GlyphCol1[EFI_GLYPH_HEIGHT];
+ UINT8 GlyphCol1[EFI_GLYPH_HEIGHT];
///
/// The column major glyph representation of the character. Bits
/// with values of one indicate that the corresponding pixel is to be
/// on when normally displayed; those with zero are off.
///
- UINT8 GlyphCol2[EFI_GLYPH_HEIGHT];
+ UINT8 GlyphCol2[EFI_GLYPH_HEIGHT];
///
/// Ensures that sizeof (EFI_WIDE_GLYPH) is twice the
/// sizeof (EFI_NARROW_GLYPH). The contents of Pad must
/// be zero.
///
- UINT8 Pad[3];
+ UINT8 Pad[3];
} EFI_WIDE_GLYPH;
///
@@ -149,9 +147,9 @@ typedef struct {
/// followed by a series of glyph structures.
///
typedef struct _EFI_HII_SIMPLE_FONT_PACKAGE_HDR {
- EFI_HII_PACKAGE_HEADER Header;
- UINT16 NumberOfNarrowGlyphs;
- UINT16 NumberOfWideGlyphs;
+ EFI_HII_PACKAGE_HEADER Header;
+ UINT16 NumberOfNarrowGlyphs;
+ UINT16 NumberOfWideGlyphs;
// EFI_NARROW_GLYPH NarrowGlyphs[];
// EFI_WIDE_GLYPH WideGlyphs[];
} EFI_HII_SIMPLE_FONT_PACKAGE_HDR;
@@ -164,21 +162,21 @@ typedef struct _EFI_HII_SIMPLE_FONT_PACKAGE_HDR {
//
// Value for font style
//
-#define EFI_HII_FONT_STYLE_NORMAL 0x00000000
-#define EFI_HII_FONT_STYLE_BOLD 0x00000001
-#define EFI_HII_FONT_STYLE_ITALIC 0x00000002
-#define EFI_HII_FONT_STYLE_EMBOSS 0x00010000
-#define EFI_HII_FONT_STYLE_OUTLINE 0x00020000
-#define EFI_HII_FONT_STYLE_SHADOW 0x00040000
-#define EFI_HII_FONT_STYLE_UNDERLINE 0x00080000
-#define EFI_HII_FONT_STYLE_DBL_UNDER 0x00100000
+#define EFI_HII_FONT_STYLE_NORMAL 0x00000000
+#define EFI_HII_FONT_STYLE_BOLD 0x00000001
+#define EFI_HII_FONT_STYLE_ITALIC 0x00000002
+#define EFI_HII_FONT_STYLE_EMBOSS 0x00010000
+#define EFI_HII_FONT_STYLE_OUTLINE 0x00020000
+#define EFI_HII_FONT_STYLE_SHADOW 0x00040000
+#define EFI_HII_FONT_STYLE_UNDERLINE 0x00080000
+#define EFI_HII_FONT_STYLE_DBL_UNDER 0x00100000
typedef struct _EFI_HII_GLYPH_INFO {
- UINT16 Width;
- UINT16 Height;
- INT16 OffsetX;
- INT16 OffsetY;
- INT16 AdvanceX;
+ UINT16 Width;
+ UINT16 Height;
+ INT16 OffsetX;
+ INT16 OffsetY;
+ INT16 AdvanceX;
} EFI_HII_GLYPH_INFO;
///
@@ -188,33 +186,33 @@ typedef struct _EFI_HII_GLYPH_INFO {
/// information, the glyph bitmaps and the character map.
///
typedef struct _EFI_HII_FONT_PACKAGE_HDR {
- EFI_HII_PACKAGE_HEADER Header;
- UINT32 HdrSize;
- UINT32 GlyphBlockOffset;
- EFI_HII_GLYPH_INFO Cell;
- EFI_HII_FONT_STYLE FontStyle;
- CHAR16 FontFamily[1];
+ EFI_HII_PACKAGE_HEADER Header;
+ UINT32 HdrSize;
+ UINT32 GlyphBlockOffset;
+ EFI_HII_GLYPH_INFO Cell;
+ EFI_HII_FONT_STYLE FontStyle;
+ CHAR16 FontFamily[1];
} EFI_HII_FONT_PACKAGE_HDR;
//
// Value of different glyph info block types
//
-#define EFI_HII_GIBT_END 0x00
-#define EFI_HII_GIBT_GLYPH 0x10
-#define EFI_HII_GIBT_GLYPHS 0x11
-#define EFI_HII_GIBT_GLYPH_DEFAULT 0x12
-#define EFI_HII_GIBT_GLYPHS_DEFAULT 0x13
-#define EFI_HII_GIBT_GLYPH_VARIABILITY 0x14
-#define EFI_HII_GIBT_DUPLICATE 0x20
-#define EFI_HII_GIBT_SKIP2 0x21
-#define EFI_HII_GIBT_SKIP1 0x22
-#define EFI_HII_GIBT_DEFAULTS 0x23
-#define EFI_HII_GIBT_EXT1 0x30
-#define EFI_HII_GIBT_EXT2 0x31
-#define EFI_HII_GIBT_EXT4 0x32
+#define EFI_HII_GIBT_END 0x00
+#define EFI_HII_GIBT_GLYPH 0x10
+#define EFI_HII_GIBT_GLYPHS 0x11
+#define EFI_HII_GIBT_GLYPH_DEFAULT 0x12
+#define EFI_HII_GIBT_GLYPHS_DEFAULT 0x13
+#define EFI_HII_GIBT_GLYPH_VARIABILITY 0x14
+#define EFI_HII_GIBT_DUPLICATE 0x20
+#define EFI_HII_GIBT_SKIP2 0x21
+#define EFI_HII_GIBT_SKIP1 0x22
+#define EFI_HII_GIBT_DEFAULTS 0x23
+#define EFI_HII_GIBT_EXT1 0x30
+#define EFI_HII_GIBT_EXT2 0x31
+#define EFI_HII_GIBT_EXT4 0x32
typedef struct _EFI_HII_GLYPH_BLOCK {
- UINT8 BlockType;
+ UINT8 BlockType;
} EFI_HII_GLYPH_BLOCK;
//
@@ -281,7 +279,7 @@ typedef struct _EFI_HII_GIBT_VARIABILITY_BLOCK {
EFI_HII_GLYPH_BLOCK Header;
EFI_HII_GLYPH_INFO Cell;
UINT8 GlyphPackInBits;
- UINT8 BitmapData [1];
+ UINT8 BitmapData[1];
} EFI_HII_GIBT_VARIABILITY_BLOCK;
typedef struct _EFI_HII_GIBT_SKIP1_BLOCK {
@@ -304,7 +302,7 @@ typedef struct _EFI_HII_GIBT_SKIP2_BLOCK {
/// associated with the package list.
///
typedef struct _EFI_HII_DEVICE_PATH_PACKAGE_HDR {
- EFI_HII_PACKAGE_HEADER Header;
+ EFI_HII_PACKAGE_HEADER Header;
// EFI_DEVICE_PATH_PROTOCOL DevicePath[];
} EFI_HII_DEVICE_PATH_PACKAGE_HDR;
@@ -317,8 +315,8 @@ typedef struct _EFI_HII_DEVICE_PATH_PACKAGE_HDR {
/// The GUID package is used to carry data where the format is defined by a GUID.
///
typedef struct _EFI_HII_GUID_PACKAGE_HDR {
- EFI_HII_PACKAGE_HEADER Header;
- EFI_GUID Guid;
+ EFI_HII_PACKAGE_HEADER Header;
+ EFI_GUID Guid;
// Data per GUID definition may follow
} EFI_HII_GUID_PACKAGE_HDR;
@@ -327,45 +325,45 @@ typedef struct _EFI_HII_GUID_PACKAGE_HDR {
// Section 27.3.6
//
-#define UEFI_CONFIG_LANG "x-UEFI"
-#define UEFI_CONFIG_LANG_2 "x-i-UEFI"
+#define UEFI_CONFIG_LANG "x-UEFI"
+#define UEFI_CONFIG_LANG_2 "x-i-UEFI"
///
/// The fixed header consists of a standard record header and then the string identifiers
/// contained in this section and the offsets of the string and language information.
///
typedef struct _EFI_HII_STRING_PACKAGE_HDR {
- EFI_HII_PACKAGE_HEADER Header;
- UINT32 HdrSize;
- UINT32 StringInfoOffset;
- CHAR16 LanguageWindow[16];
- EFI_STRING_ID LanguageName;
- CHAR8 Language[1];
+ EFI_HII_PACKAGE_HEADER Header;
+ UINT32 HdrSize;
+ UINT32 StringInfoOffset;
+ CHAR16 LanguageWindow[16];
+ EFI_STRING_ID LanguageName;
+ CHAR8 Language[1];
} EFI_HII_STRING_PACKAGE_HDR;
typedef struct {
- UINT8 BlockType;
+ UINT8 BlockType;
} EFI_HII_STRING_BLOCK;
//
// Value of different string information block types
//
-#define EFI_HII_SIBT_END 0x00
-#define EFI_HII_SIBT_STRING_SCSU 0x10
-#define EFI_HII_SIBT_STRING_SCSU_FONT 0x11
-#define EFI_HII_SIBT_STRINGS_SCSU 0x12
-#define EFI_HII_SIBT_STRINGS_SCSU_FONT 0x13
-#define EFI_HII_SIBT_STRING_UCS2 0x14
-#define EFI_HII_SIBT_STRING_UCS2_FONT 0x15
-#define EFI_HII_SIBT_STRINGS_UCS2 0x16
-#define EFI_HII_SIBT_STRINGS_UCS2_FONT 0x17
-#define EFI_HII_SIBT_DUPLICATE 0x20
-#define EFI_HII_SIBT_SKIP2 0x21
-#define EFI_HII_SIBT_SKIP1 0x22
-#define EFI_HII_SIBT_EXT1 0x30
-#define EFI_HII_SIBT_EXT2 0x31
-#define EFI_HII_SIBT_EXT4 0x32
-#define EFI_HII_SIBT_FONT 0x40
+#define EFI_HII_SIBT_END 0x00
+#define EFI_HII_SIBT_STRING_SCSU 0x10
+#define EFI_HII_SIBT_STRING_SCSU_FONT 0x11
+#define EFI_HII_SIBT_STRINGS_SCSU 0x12
+#define EFI_HII_SIBT_STRINGS_SCSU_FONT 0x13
+#define EFI_HII_SIBT_STRING_UCS2 0x14
+#define EFI_HII_SIBT_STRING_UCS2_FONT 0x15
+#define EFI_HII_SIBT_STRINGS_UCS2 0x16
+#define EFI_HII_SIBT_STRINGS_UCS2_FONT 0x17
+#define EFI_HII_SIBT_DUPLICATE 0x20
+#define EFI_HII_SIBT_SKIP2 0x21
+#define EFI_HII_SIBT_SKIP1 0x22
+#define EFI_HII_SIBT_EXT1 0x30
+#define EFI_HII_SIBT_EXT2 0x31
+#define EFI_HII_SIBT_EXT4 0x32
+#define EFI_HII_SIBT_FONT 0x40
//
// Definition of different string information block types
@@ -399,11 +397,11 @@ typedef struct _EFI_HII_SIBT_EXT4_BLOCK {
} EFI_HII_SIBT_EXT4_BLOCK;
typedef struct _EFI_HII_SIBT_FONT_BLOCK {
- EFI_HII_SIBT_EXT2_BLOCK Header;
- UINT8 FontId;
- UINT16 FontSize;
- EFI_HII_FONT_STYLE FontStyle;
- CHAR16 FontName[1];
+ EFI_HII_SIBT_EXT2_BLOCK Header;
+ UINT8 FontId;
+ UINT16 FontSize;
+ EFI_HII_FONT_STYLE FontStyle;
+ CHAR16 FontName[1];
} EFI_HII_SIBT_FONT_BLOCK;
typedef struct _EFI_HII_SIBT_SKIP1_BLOCK {
@@ -470,163 +468,163 @@ typedef struct _EFI_HII_SIBT_STRINGS_UCS2_FONT_BLOCK {
//
typedef struct _EFI_HII_IMAGE_PACKAGE_HDR {
- EFI_HII_PACKAGE_HEADER Header;
- UINT32 ImageInfoOffset;
- UINT32 PaletteInfoOffset;
+ EFI_HII_PACKAGE_HEADER Header;
+ UINT32 ImageInfoOffset;
+ UINT32 PaletteInfoOffset;
} EFI_HII_IMAGE_PACKAGE_HDR;
typedef struct _EFI_HII_IMAGE_BLOCK {
- UINT8 BlockType;
+ UINT8 BlockType;
} EFI_HII_IMAGE_BLOCK;
//
// Value of different image information block types
//
-#define EFI_HII_IIBT_END 0x00
-#define EFI_HII_IIBT_IMAGE_1BIT 0x10
-#define EFI_HII_IIBT_IMAGE_1BIT_TRANS 0x11
-#define EFI_HII_IIBT_IMAGE_4BIT 0x12
-#define EFI_HII_IIBT_IMAGE_4BIT_TRANS 0x13
-#define EFI_HII_IIBT_IMAGE_8BIT 0x14
-#define EFI_HII_IIBT_IMAGE_8BIT_TRANS 0x15
-#define EFI_HII_IIBT_IMAGE_24BIT 0x16
-#define EFI_HII_IIBT_IMAGE_24BIT_TRANS 0x17
-#define EFI_HII_IIBT_IMAGE_JPEG 0x18
-#define EFI_HII_IIBT_IMAGE_PNG 0x19
-#define EFI_HII_IIBT_DUPLICATE 0x20
-#define EFI_HII_IIBT_SKIP2 0x21
-#define EFI_HII_IIBT_SKIP1 0x22
-#define EFI_HII_IIBT_EXT1 0x30
-#define EFI_HII_IIBT_EXT2 0x31
-#define EFI_HII_IIBT_EXT4 0x32
+#define EFI_HII_IIBT_END 0x00
+#define EFI_HII_IIBT_IMAGE_1BIT 0x10
+#define EFI_HII_IIBT_IMAGE_1BIT_TRANS 0x11
+#define EFI_HII_IIBT_IMAGE_4BIT 0x12
+#define EFI_HII_IIBT_IMAGE_4BIT_TRANS 0x13
+#define EFI_HII_IIBT_IMAGE_8BIT 0x14
+#define EFI_HII_IIBT_IMAGE_8BIT_TRANS 0x15
+#define EFI_HII_IIBT_IMAGE_24BIT 0x16
+#define EFI_HII_IIBT_IMAGE_24BIT_TRANS 0x17
+#define EFI_HII_IIBT_IMAGE_JPEG 0x18
+#define EFI_HII_IIBT_IMAGE_PNG 0x19
+#define EFI_HII_IIBT_DUPLICATE 0x20
+#define EFI_HII_IIBT_SKIP2 0x21
+#define EFI_HII_IIBT_SKIP1 0x22
+#define EFI_HII_IIBT_EXT1 0x30
+#define EFI_HII_IIBT_EXT2 0x31
+#define EFI_HII_IIBT_EXT4 0x32
//
// Definition of different image information block types
//
typedef struct _EFI_HII_IIBT_END_BLOCK {
- EFI_HII_IMAGE_BLOCK Header;
+ EFI_HII_IMAGE_BLOCK Header;
} EFI_HII_IIBT_END_BLOCK;
typedef struct _EFI_HII_IIBT_EXT1_BLOCK {
- EFI_HII_IMAGE_BLOCK Header;
- UINT8 BlockType2;
- UINT8 Length;
+ EFI_HII_IMAGE_BLOCK Header;
+ UINT8 BlockType2;
+ UINT8 Length;
} EFI_HII_IIBT_EXT1_BLOCK;
typedef struct _EFI_HII_IIBT_EXT2_BLOCK {
- EFI_HII_IMAGE_BLOCK Header;
- UINT8 BlockType2;
- UINT16 Length;
+ EFI_HII_IMAGE_BLOCK Header;
+ UINT8 BlockType2;
+ UINT16 Length;
} EFI_HII_IIBT_EXT2_BLOCK;
typedef struct _EFI_HII_IIBT_EXT4_BLOCK {
- EFI_HII_IMAGE_BLOCK Header;
- UINT8 BlockType2;
- UINT32 Length;
+ EFI_HII_IMAGE_BLOCK Header;
+ UINT8 BlockType2;
+ UINT32 Length;
} EFI_HII_IIBT_EXT4_BLOCK;
typedef struct _EFI_HII_IIBT_IMAGE_1BIT_BASE {
- UINT16 Width;
- UINT16 Height;
- UINT8 Data[1];
+ UINT16 Width;
+ UINT16 Height;
+ UINT8 Data[1];
} EFI_HII_IIBT_IMAGE_1BIT_BASE;
typedef struct _EFI_HII_IIBT_IMAGE_1BIT_BLOCK {
- EFI_HII_IMAGE_BLOCK Header;
- UINT8 PaletteIndex;
- EFI_HII_IIBT_IMAGE_1BIT_BASE Bitmap;
+ EFI_HII_IMAGE_BLOCK Header;
+ UINT8 PaletteIndex;
+ EFI_HII_IIBT_IMAGE_1BIT_BASE Bitmap;
} EFI_HII_IIBT_IMAGE_1BIT_BLOCK;
typedef struct _EFI_HII_IIBT_IMAGE_1BIT_TRANS_BLOCK {
- EFI_HII_IMAGE_BLOCK Header;
- UINT8 PaletteIndex;
- EFI_HII_IIBT_IMAGE_1BIT_BASE Bitmap;
+ EFI_HII_IMAGE_BLOCK Header;
+ UINT8 PaletteIndex;
+ EFI_HII_IIBT_IMAGE_1BIT_BASE Bitmap;
} EFI_HII_IIBT_IMAGE_1BIT_TRANS_BLOCK;
typedef struct _EFI_HII_RGB_PIXEL {
- UINT8 b;
- UINT8 g;
- UINT8 r;
+ UINT8 b;
+ UINT8 g;
+ UINT8 r;
} EFI_HII_RGB_PIXEL;
typedef struct _EFI_HII_IIBT_IMAGE_24BIT_BASE {
- UINT16 Width;
- UINT16 Height;
- EFI_HII_RGB_PIXEL Bitmap[1];
+ UINT16 Width;
+ UINT16 Height;
+ EFI_HII_RGB_PIXEL Bitmap[1];
} EFI_HII_IIBT_IMAGE_24BIT_BASE;
typedef struct _EFI_HII_IIBT_IMAGE_24BIT_BLOCK {
- EFI_HII_IMAGE_BLOCK Header;
- EFI_HII_IIBT_IMAGE_24BIT_BASE Bitmap;
+ EFI_HII_IMAGE_BLOCK Header;
+ EFI_HII_IIBT_IMAGE_24BIT_BASE Bitmap;
} EFI_HII_IIBT_IMAGE_24BIT_BLOCK;
typedef struct _EFI_HII_IIBT_IMAGE_24BIT_TRANS_BLOCK {
- EFI_HII_IMAGE_BLOCK Header;
- EFI_HII_IIBT_IMAGE_24BIT_BASE Bitmap;
+ EFI_HII_IMAGE_BLOCK Header;
+ EFI_HII_IIBT_IMAGE_24BIT_BASE Bitmap;
} EFI_HII_IIBT_IMAGE_24BIT_TRANS_BLOCK;
typedef struct _EFI_HII_IIBT_IMAGE_4BIT_BASE {
- UINT16 Width;
- UINT16 Height;
- UINT8 Data[1];
+ UINT16 Width;
+ UINT16 Height;
+ UINT8 Data[1];
} EFI_HII_IIBT_IMAGE_4BIT_BASE;
typedef struct _EFI_HII_IIBT_IMAGE_4BIT_BLOCK {
- EFI_HII_IMAGE_BLOCK Header;
- UINT8 PaletteIndex;
- EFI_HII_IIBT_IMAGE_4BIT_BASE Bitmap;
+ EFI_HII_IMAGE_BLOCK Header;
+ UINT8 PaletteIndex;
+ EFI_HII_IIBT_IMAGE_4BIT_BASE Bitmap;
} EFI_HII_IIBT_IMAGE_4BIT_BLOCK;
typedef struct _EFI_HII_IIBT_IMAGE_4BIT_TRANS_BLOCK {
- EFI_HII_IMAGE_BLOCK Header;
- UINT8 PaletteIndex;
- EFI_HII_IIBT_IMAGE_4BIT_BASE Bitmap;
+ EFI_HII_IMAGE_BLOCK Header;
+ UINT8 PaletteIndex;
+ EFI_HII_IIBT_IMAGE_4BIT_BASE Bitmap;
} EFI_HII_IIBT_IMAGE_4BIT_TRANS_BLOCK;
typedef struct _EFI_HII_IIBT_IMAGE_8BIT_BASE {
- UINT16 Width;
- UINT16 Height;
- UINT8 Data[1];
+ UINT16 Width;
+ UINT16 Height;
+ UINT8 Data[1];
} EFI_HII_IIBT_IMAGE_8BIT_BASE;
typedef struct _EFI_HII_IIBT_IMAGE_8BIT_PALETTE_BLOCK {
- EFI_HII_IMAGE_BLOCK Header;
- UINT8 PaletteIndex;
- EFI_HII_IIBT_IMAGE_8BIT_BASE Bitmap;
+ EFI_HII_IMAGE_BLOCK Header;
+ UINT8 PaletteIndex;
+ EFI_HII_IIBT_IMAGE_8BIT_BASE Bitmap;
} EFI_HII_IIBT_IMAGE_8BIT_BLOCK;
typedef struct _EFI_HII_IIBT_IMAGE_8BIT_TRANS_BLOCK {
- EFI_HII_IMAGE_BLOCK Header;
- UINT8 PaletteIndex;
- EFI_HII_IIBT_IMAGE_8BIT_BASE Bitmap;
+ EFI_HII_IMAGE_BLOCK Header;
+ UINT8 PaletteIndex;
+ EFI_HII_IIBT_IMAGE_8BIT_BASE Bitmap;
} EFI_HII_IIBT_IMAGE_8BIT_TRAN_BLOCK;
typedef struct _EFI_HII_IIBT_DUPLICATE_BLOCK {
- EFI_HII_IMAGE_BLOCK Header;
- EFI_IMAGE_ID ImageId;
+ EFI_HII_IMAGE_BLOCK Header;
+ EFI_IMAGE_ID ImageId;
} EFI_HII_IIBT_DUPLICATE_BLOCK;
typedef struct _EFI_HII_IIBT_JPEG_BLOCK {
- EFI_HII_IMAGE_BLOCK Header;
- UINT32 Size;
- UINT8 Data[1];
+ EFI_HII_IMAGE_BLOCK Header;
+ UINT32 Size;
+ UINT8 Data[1];
} EFI_HII_IIBT_JPEG_BLOCK;
typedef struct _EFI_HII_IIBT_PNG_BLOCK {
- EFI_HII_IMAGE_BLOCK Header;
- UINT32 Size;
- UINT8 Data[1];
+ EFI_HII_IMAGE_BLOCK Header;
+ UINT32 Size;
+ UINT8 Data[1];
} EFI_HII_IIBT_PNG_BLOCK;
typedef struct _EFI_HII_IIBT_SKIP1_BLOCK {
- EFI_HII_IMAGE_BLOCK Header;
- UINT8 SkipCount;
+ EFI_HII_IMAGE_BLOCK Header;
+ UINT8 SkipCount;
} EFI_HII_IIBT_SKIP1_BLOCK;
typedef struct _EFI_HII_IIBT_SKIP2_BLOCK {
- EFI_HII_IMAGE_BLOCK Header;
- UINT16 SkipCount;
+ EFI_HII_IMAGE_BLOCK Header;
+ UINT16 SkipCount;
} EFI_HII_IIBT_SKIP2_BLOCK;
//
@@ -634,12 +632,12 @@ typedef struct _EFI_HII_IIBT_SKIP2_BLOCK {
//
typedef struct _EFI_HII_IMAGE_PALETTE_INFO_HEADER {
- UINT16 PaletteCount;
+ UINT16 PaletteCount;
} EFI_HII_IMAGE_PALETTE_INFO_HEADER;
typedef struct _EFI_HII_IMAGE_PALETTE_INFO {
- UINT16 PaletteSize;
- EFI_HII_RGB_PIXEL PaletteValue[1];
+ UINT16 PaletteSize;
+ EFI_HII_RGB_PIXEL PaletteValue[1];
} EFI_HII_IMAGE_PALETTE_INFO;
//
@@ -651,146 +649,146 @@ typedef struct _EFI_HII_IMAGE_PALETTE_INFO {
/// The Form package is used to carry form-based encoding data.
///
typedef struct _EFI_HII_FORM_PACKAGE_HDR {
- EFI_HII_PACKAGE_HEADER Header;
+ EFI_HII_PACKAGE_HEADER Header;
// EFI_IFR_OP_HEADER OpCodeHeader;
// More op-codes follow
} EFI_HII_FORM_PACKAGE_HDR;
typedef struct {
- UINT8 Hour;
- UINT8 Minute;
- UINT8 Second;
+ UINT8 Hour;
+ UINT8 Minute;
+ UINT8 Second;
} EFI_HII_TIME;
typedef struct {
- UINT16 Year;
- UINT8 Month;
- UINT8 Day;
+ UINT16 Year;
+ UINT8 Month;
+ UINT8 Day;
} EFI_HII_DATE;
typedef struct {
- EFI_QUESTION_ID QuestionId;
- EFI_FORM_ID FormId;
- EFI_GUID FormSetGuid;
- EFI_STRING_ID DevicePath;
+ EFI_QUESTION_ID QuestionId;
+ EFI_FORM_ID FormId;
+ EFI_GUID FormSetGuid;
+ EFI_STRING_ID DevicePath;
} EFI_HII_REF;
typedef union {
- UINT8 u8;
- UINT16 u16;
- UINT32 u32;
- UINT64 u64;
- BOOLEAN b;
- EFI_HII_TIME time;
- EFI_HII_DATE date;
- EFI_STRING_ID string; ///< EFI_IFR_TYPE_STRING, EFI_IFR_TYPE_ACTION
- EFI_HII_REF ref; ///< EFI_IFR_TYPE_REF
+ UINT8 u8;
+ UINT16 u16;
+ UINT32 u32;
+ UINT64 u64;
+ BOOLEAN b;
+ EFI_HII_TIME time;
+ EFI_HII_DATE date;
+ EFI_STRING_ID string; ///< EFI_IFR_TYPE_STRING, EFI_IFR_TYPE_ACTION
+ EFI_HII_REF ref; ///< EFI_IFR_TYPE_REF
// UINT8 buffer[]; ///< EFI_IFR_TYPE_BUFFER
} EFI_IFR_TYPE_VALUE;
//
// IFR Opcodes
//
-#define EFI_IFR_FORM_OP 0x01
-#define EFI_IFR_SUBTITLE_OP 0x02
-#define EFI_IFR_TEXT_OP 0x03
-#define EFI_IFR_IMAGE_OP 0x04
-#define EFI_IFR_ONE_OF_OP 0x05
-#define EFI_IFR_CHECKBOX_OP 0x06
-#define EFI_IFR_NUMERIC_OP 0x07
-#define EFI_IFR_PASSWORD_OP 0x08
-#define EFI_IFR_ONE_OF_OPTION_OP 0x09
-#define EFI_IFR_SUPPRESS_IF_OP 0x0A
-#define EFI_IFR_LOCKED_OP 0x0B
-#define EFI_IFR_ACTION_OP 0x0C
-#define EFI_IFR_RESET_BUTTON_OP 0x0D
-#define EFI_IFR_FORM_SET_OP 0x0E
-#define EFI_IFR_REF_OP 0x0F
-#define EFI_IFR_NO_SUBMIT_IF_OP 0x10
-#define EFI_IFR_INCONSISTENT_IF_OP 0x11
-#define EFI_IFR_EQ_ID_VAL_OP 0x12
-#define EFI_IFR_EQ_ID_ID_OP 0x13
-#define EFI_IFR_EQ_ID_VAL_LIST_OP 0x14
-#define EFI_IFR_AND_OP 0x15
-#define EFI_IFR_OR_OP 0x16
-#define EFI_IFR_NOT_OP 0x17
-#define EFI_IFR_RULE_OP 0x18
-#define EFI_IFR_GRAY_OUT_IF_OP 0x19
-#define EFI_IFR_DATE_OP 0x1A
-#define EFI_IFR_TIME_OP 0x1B
-#define EFI_IFR_STRING_OP 0x1C
-#define EFI_IFR_REFRESH_OP 0x1D
-#define EFI_IFR_DISABLE_IF_OP 0x1E
-#define EFI_IFR_ANIMATION_OP 0x1F
-#define EFI_IFR_TO_LOWER_OP 0x20
-#define EFI_IFR_TO_UPPER_OP 0x21
-#define EFI_IFR_MAP_OP 0x22
-#define EFI_IFR_ORDERED_LIST_OP 0x23
-#define EFI_IFR_VARSTORE_OP 0x24
-#define EFI_IFR_VARSTORE_NAME_VALUE_OP 0x25
-#define EFI_IFR_VARSTORE_EFI_OP 0x26
-#define EFI_IFR_VARSTORE_DEVICE_OP 0x27
-#define EFI_IFR_VERSION_OP 0x28
-#define EFI_IFR_END_OP 0x29
-#define EFI_IFR_MATCH_OP 0x2A
-#define EFI_IFR_GET_OP 0x2B
-#define EFI_IFR_SET_OP 0x2C
-#define EFI_IFR_READ_OP 0x2D
-#define EFI_IFR_WRITE_OP 0x2E
-#define EFI_IFR_EQUAL_OP 0x2F
-#define EFI_IFR_NOT_EQUAL_OP 0x30
-#define EFI_IFR_GREATER_THAN_OP 0x31
-#define EFI_IFR_GREATER_EQUAL_OP 0x32
-#define EFI_IFR_LESS_THAN_OP 0x33
-#define EFI_IFR_LESS_EQUAL_OP 0x34
-#define EFI_IFR_BITWISE_AND_OP 0x35
-#define EFI_IFR_BITWISE_OR_OP 0x36
-#define EFI_IFR_BITWISE_NOT_OP 0x37
-#define EFI_IFR_SHIFT_LEFT_OP 0x38
-#define EFI_IFR_SHIFT_RIGHT_OP 0x39
-#define EFI_IFR_ADD_OP 0x3A
-#define EFI_IFR_SUBTRACT_OP 0x3B
-#define EFI_IFR_MULTIPLY_OP 0x3C
-#define EFI_IFR_DIVIDE_OP 0x3D
-#define EFI_IFR_MODULO_OP 0x3E
-#define EFI_IFR_RULE_REF_OP 0x3F
-#define EFI_IFR_QUESTION_REF1_OP 0x40
-#define EFI_IFR_QUESTION_REF2_OP 0x41
-#define EFI_IFR_UINT8_OP 0x42
-#define EFI_IFR_UINT16_OP 0x43
-#define EFI_IFR_UINT32_OP 0x44
-#define EFI_IFR_UINT64_OP 0x45
-#define EFI_IFR_TRUE_OP 0x46
-#define EFI_IFR_FALSE_OP 0x47
-#define EFI_IFR_TO_UINT_OP 0x48
-#define EFI_IFR_TO_STRING_OP 0x49
-#define EFI_IFR_TO_BOOLEAN_OP 0x4A
-#define EFI_IFR_MID_OP 0x4B
-#define EFI_IFR_FIND_OP 0x4C
-#define EFI_IFR_TOKEN_OP 0x4D
-#define EFI_IFR_STRING_REF1_OP 0x4E
-#define EFI_IFR_STRING_REF2_OP 0x4F
-#define EFI_IFR_CONDITIONAL_OP 0x50
-#define EFI_IFR_QUESTION_REF3_OP 0x51
-#define EFI_IFR_ZERO_OP 0x52
-#define EFI_IFR_ONE_OP 0x53
-#define EFI_IFR_ONES_OP 0x54
-#define EFI_IFR_UNDEFINED_OP 0x55
-#define EFI_IFR_LENGTH_OP 0x56
-#define EFI_IFR_DUP_OP 0x57
-#define EFI_IFR_THIS_OP 0x58
-#define EFI_IFR_SPAN_OP 0x59
-#define EFI_IFR_VALUE_OP 0x5A
-#define EFI_IFR_DEFAULT_OP 0x5B
-#define EFI_IFR_DEFAULTSTORE_OP 0x5C
-#define EFI_IFR_FORM_MAP_OP 0x5D
-#define EFI_IFR_CATENATE_OP 0x5E
-#define EFI_IFR_GUID_OP 0x5F
-#define EFI_IFR_SECURITY_OP 0x60
-#define EFI_IFR_MODAL_TAG_OP 0x61
-#define EFI_IFR_REFRESH_ID_OP 0x62
-#define EFI_IFR_WARNING_IF_OP 0x63
-#define EFI_IFR_MATCH2_OP 0x64
+#define EFI_IFR_FORM_OP 0x01
+#define EFI_IFR_SUBTITLE_OP 0x02
+#define EFI_IFR_TEXT_OP 0x03
+#define EFI_IFR_IMAGE_OP 0x04
+#define EFI_IFR_ONE_OF_OP 0x05
+#define EFI_IFR_CHECKBOX_OP 0x06
+#define EFI_IFR_NUMERIC_OP 0x07
+#define EFI_IFR_PASSWORD_OP 0x08
+#define EFI_IFR_ONE_OF_OPTION_OP 0x09
+#define EFI_IFR_SUPPRESS_IF_OP 0x0A
+#define EFI_IFR_LOCKED_OP 0x0B
+#define EFI_IFR_ACTION_OP 0x0C
+#define EFI_IFR_RESET_BUTTON_OP 0x0D
+#define EFI_IFR_FORM_SET_OP 0x0E
+#define EFI_IFR_REF_OP 0x0F
+#define EFI_IFR_NO_SUBMIT_IF_OP 0x10
+#define EFI_IFR_INCONSISTENT_IF_OP 0x11
+#define EFI_IFR_EQ_ID_VAL_OP 0x12
+#define EFI_IFR_EQ_ID_ID_OP 0x13
+#define EFI_IFR_EQ_ID_VAL_LIST_OP 0x14
+#define EFI_IFR_AND_OP 0x15
+#define EFI_IFR_OR_OP 0x16
+#define EFI_IFR_NOT_OP 0x17
+#define EFI_IFR_RULE_OP 0x18
+#define EFI_IFR_GRAY_OUT_IF_OP 0x19
+#define EFI_IFR_DATE_OP 0x1A
+#define EFI_IFR_TIME_OP 0x1B
+#define EFI_IFR_STRING_OP 0x1C
+#define EFI_IFR_REFRESH_OP 0x1D
+#define EFI_IFR_DISABLE_IF_OP 0x1E
+#define EFI_IFR_ANIMATION_OP 0x1F
+#define EFI_IFR_TO_LOWER_OP 0x20
+#define EFI_IFR_TO_UPPER_OP 0x21
+#define EFI_IFR_MAP_OP 0x22
+#define EFI_IFR_ORDERED_LIST_OP 0x23
+#define EFI_IFR_VARSTORE_OP 0x24
+#define EFI_IFR_VARSTORE_NAME_VALUE_OP 0x25
+#define EFI_IFR_VARSTORE_EFI_OP 0x26
+#define EFI_IFR_VARSTORE_DEVICE_OP 0x27
+#define EFI_IFR_VERSION_OP 0x28
+#define EFI_IFR_END_OP 0x29
+#define EFI_IFR_MATCH_OP 0x2A
+#define EFI_IFR_GET_OP 0x2B
+#define EFI_IFR_SET_OP 0x2C
+#define EFI_IFR_READ_OP 0x2D
+#define EFI_IFR_WRITE_OP 0x2E
+#define EFI_IFR_EQUAL_OP 0x2F
+#define EFI_IFR_NOT_EQUAL_OP 0x30
+#define EFI_IFR_GREATER_THAN_OP 0x31
+#define EFI_IFR_GREATER_EQUAL_OP 0x32
+#define EFI_IFR_LESS_THAN_OP 0x33
+#define EFI_IFR_LESS_EQUAL_OP 0x34
+#define EFI_IFR_BITWISE_AND_OP 0x35
+#define EFI_IFR_BITWISE_OR_OP 0x36
+#define EFI_IFR_BITWISE_NOT_OP 0x37
+#define EFI_IFR_SHIFT_LEFT_OP 0x38
+#define EFI_IFR_SHIFT_RIGHT_OP 0x39
+#define EFI_IFR_ADD_OP 0x3A
+#define EFI_IFR_SUBTRACT_OP 0x3B
+#define EFI_IFR_MULTIPLY_OP 0x3C
+#define EFI_IFR_DIVIDE_OP 0x3D
+#define EFI_IFR_MODULO_OP 0x3E
+#define EFI_IFR_RULE_REF_OP 0x3F
+#define EFI_IFR_QUESTION_REF1_OP 0x40
+#define EFI_IFR_QUESTION_REF2_OP 0x41
+#define EFI_IFR_UINT8_OP 0x42
+#define EFI_IFR_UINT16_OP 0x43
+#define EFI_IFR_UINT32_OP 0x44
+#define EFI_IFR_UINT64_OP 0x45
+#define EFI_IFR_TRUE_OP 0x46
+#define EFI_IFR_FALSE_OP 0x47
+#define EFI_IFR_TO_UINT_OP 0x48
+#define EFI_IFR_TO_STRING_OP 0x49
+#define EFI_IFR_TO_BOOLEAN_OP 0x4A
+#define EFI_IFR_MID_OP 0x4B
+#define EFI_IFR_FIND_OP 0x4C
+#define EFI_IFR_TOKEN_OP 0x4D
+#define EFI_IFR_STRING_REF1_OP 0x4E
+#define EFI_IFR_STRING_REF2_OP 0x4F
+#define EFI_IFR_CONDITIONAL_OP 0x50
+#define EFI_IFR_QUESTION_REF3_OP 0x51
+#define EFI_IFR_ZERO_OP 0x52
+#define EFI_IFR_ONE_OP 0x53
+#define EFI_IFR_ONES_OP 0x54
+#define EFI_IFR_UNDEFINED_OP 0x55
+#define EFI_IFR_LENGTH_OP 0x56
+#define EFI_IFR_DUP_OP 0x57
+#define EFI_IFR_THIS_OP 0x58
+#define EFI_IFR_SPAN_OP 0x59
+#define EFI_IFR_VALUE_OP 0x5A
+#define EFI_IFR_DEFAULT_OP 0x5B
+#define EFI_IFR_DEFAULTSTORE_OP 0x5C
+#define EFI_IFR_FORM_MAP_OP 0x5D
+#define EFI_IFR_CATENATE_OP 0x5E
+#define EFI_IFR_GUID_OP 0x5F
+#define EFI_IFR_SECURITY_OP 0x60
+#define EFI_IFR_MODAL_TAG_OP 0x61
+#define EFI_IFR_REFRESH_ID_OP 0x62
+#define EFI_IFR_WARNING_IF_OP 0x63
+#define EFI_IFR_MATCH2_OP 0x64
//
// Definitions of IFR Standard Headers
@@ -798,530 +796,530 @@ typedef union {
//
typedef struct _EFI_IFR_OP_HEADER {
- UINT8 OpCode;
- UINT8 Length:7;
- UINT8 Scope:1;
+ UINT8 OpCode;
+ UINT8 Length : 7;
+ UINT8 Scope : 1;
} EFI_IFR_OP_HEADER;
typedef struct _EFI_IFR_STATEMENT_HEADER {
- EFI_STRING_ID Prompt;
- EFI_STRING_ID Help;
+ EFI_STRING_ID Prompt;
+ EFI_STRING_ID Help;
} EFI_IFR_STATEMENT_HEADER;
typedef struct _EFI_IFR_QUESTION_HEADER {
- EFI_IFR_STATEMENT_HEADER Header;
- EFI_QUESTION_ID QuestionId;
- EFI_VARSTORE_ID VarStoreId;
+ EFI_IFR_STATEMENT_HEADER Header;
+ EFI_QUESTION_ID QuestionId;
+ EFI_VARSTORE_ID VarStoreId;
union {
- EFI_STRING_ID VarName;
- UINT16 VarOffset;
+ EFI_STRING_ID VarName;
+ UINT16 VarOffset;
} VarStoreInfo;
- UINT8 Flags;
+ UINT8 Flags;
} EFI_IFR_QUESTION_HEADER;
//
// Flag values of EFI_IFR_QUESTION_HEADER
//
-#define EFI_IFR_FLAG_READ_ONLY 0x01
-#define EFI_IFR_FLAG_CALLBACK 0x04
-#define EFI_IFR_FLAG_RESET_REQUIRED 0x10
-#define EFI_IFR_FLAG_REST_STYLE 0x20
-#define EFI_IFR_FLAG_RECONNECT_REQUIRED 0x40
-#define EFI_IFR_FLAG_OPTIONS_ONLY 0x80
+#define EFI_IFR_FLAG_READ_ONLY 0x01
+#define EFI_IFR_FLAG_CALLBACK 0x04
+#define EFI_IFR_FLAG_RESET_REQUIRED 0x10
+#define EFI_IFR_FLAG_REST_STYLE 0x20
+#define EFI_IFR_FLAG_RECONNECT_REQUIRED 0x40
+#define EFI_IFR_FLAG_OPTIONS_ONLY 0x80
//
// Definition for Opcode Reference
// Section 27.3.8.3
//
typedef struct _EFI_IFR_DEFAULTSTORE {
- EFI_IFR_OP_HEADER Header;
- EFI_STRING_ID DefaultName;
- UINT16 DefaultId;
+ EFI_IFR_OP_HEADER Header;
+ EFI_STRING_ID DefaultName;
+ UINT16 DefaultId;
} EFI_IFR_DEFAULTSTORE;
//
// Default Identifier of default store
//
-#define EFI_HII_DEFAULT_CLASS_STANDARD 0x0000
-#define EFI_HII_DEFAULT_CLASS_MANUFACTURING 0x0001
-#define EFI_HII_DEFAULT_CLASS_SAFE 0x0002
-#define EFI_HII_DEFAULT_CLASS_PLATFORM_BEGIN 0x4000
-#define EFI_HII_DEFAULT_CLASS_PLATFORM_END 0x7fff
-#define EFI_HII_DEFAULT_CLASS_HARDWARE_BEGIN 0x8000
-#define EFI_HII_DEFAULT_CLASS_HARDWARE_END 0xbfff
-#define EFI_HII_DEFAULT_CLASS_FIRMWARE_BEGIN 0xc000
-#define EFI_HII_DEFAULT_CLASS_FIRMWARE_END 0xffff
+#define EFI_HII_DEFAULT_CLASS_STANDARD 0x0000
+#define EFI_HII_DEFAULT_CLASS_MANUFACTURING 0x0001
+#define EFI_HII_DEFAULT_CLASS_SAFE 0x0002
+#define EFI_HII_DEFAULT_CLASS_PLATFORM_BEGIN 0x4000
+#define EFI_HII_DEFAULT_CLASS_PLATFORM_END 0x7fff
+#define EFI_HII_DEFAULT_CLASS_HARDWARE_BEGIN 0x8000
+#define EFI_HII_DEFAULT_CLASS_HARDWARE_END 0xbfff
+#define EFI_HII_DEFAULT_CLASS_FIRMWARE_BEGIN 0xc000
+#define EFI_HII_DEFAULT_CLASS_FIRMWARE_END 0xffff
typedef struct _EFI_IFR_VARSTORE {
- EFI_IFR_OP_HEADER Header;
- EFI_GUID Guid;
- EFI_VARSTORE_ID VarStoreId;
- UINT16 Size;
- UINT8 Name[1];
+ EFI_IFR_OP_HEADER Header;
+ EFI_GUID Guid;
+ EFI_VARSTORE_ID VarStoreId;
+ UINT16 Size;
+ UINT8 Name[1];
} EFI_IFR_VARSTORE;
typedef struct _EFI_IFR_VARSTORE_EFI {
- EFI_IFR_OP_HEADER Header;
- EFI_VARSTORE_ID VarStoreId;
- EFI_GUID Guid;
- UINT32 Attributes;
- UINT16 Size;
- UINT8 Name[1];
+ EFI_IFR_OP_HEADER Header;
+ EFI_VARSTORE_ID VarStoreId;
+ EFI_GUID Guid;
+ UINT32 Attributes;
+ UINT16 Size;
+ UINT8 Name[1];
} EFI_IFR_VARSTORE_EFI;
typedef struct _EFI_IFR_VARSTORE_NAME_VALUE {
- EFI_IFR_OP_HEADER Header;
- EFI_VARSTORE_ID VarStoreId;
- EFI_GUID Guid;
+ EFI_IFR_OP_HEADER Header;
+ EFI_VARSTORE_ID VarStoreId;
+ EFI_GUID Guid;
} EFI_IFR_VARSTORE_NAME_VALUE;
typedef struct _EFI_IFR_FORM_SET {
- EFI_IFR_OP_HEADER Header;
- EFI_GUID Guid;
- EFI_STRING_ID FormSetTitle;
- EFI_STRING_ID Help;
- UINT8 Flags;
+ EFI_IFR_OP_HEADER Header;
+ EFI_GUID Guid;
+ EFI_STRING_ID FormSetTitle;
+ EFI_STRING_ID Help;
+ UINT8 Flags;
// EFI_GUID ClassGuid[];
} EFI_IFR_FORM_SET;
typedef struct _EFI_IFR_END {
- EFI_IFR_OP_HEADER Header;
+ EFI_IFR_OP_HEADER Header;
} EFI_IFR_END;
typedef struct _EFI_IFR_FORM {
- EFI_IFR_OP_HEADER Header;
- UINT16 FormId;
- EFI_STRING_ID FormTitle;
+ EFI_IFR_OP_HEADER Header;
+ UINT16 FormId;
+ EFI_STRING_ID FormTitle;
} EFI_IFR_FORM;
typedef struct _EFI_IFR_IMAGE {
- EFI_IFR_OP_HEADER Header;
- EFI_IMAGE_ID Id;
+ EFI_IFR_OP_HEADER Header;
+ EFI_IMAGE_ID Id;
} EFI_IFR_IMAGE;
typedef struct _EFI_IFR_MODAL_TAG {
- EFI_IFR_OP_HEADER Header;
+ EFI_IFR_OP_HEADER Header;
} EFI_IFR_MODAL_TAG;
typedef struct _EFI_IFR_LOCKED {
- EFI_IFR_OP_HEADER Header;
+ EFI_IFR_OP_HEADER Header;
} EFI_IFR_LOCKED;
typedef struct _EFI_IFR_RULE {
- EFI_IFR_OP_HEADER Header;
- UINT8 RuleId;
+ EFI_IFR_OP_HEADER Header;
+ UINT8 RuleId;
} EFI_IFR_RULE;
typedef struct _EFI_IFR_DEFAULT {
- EFI_IFR_OP_HEADER Header;
- UINT16 DefaultId;
- UINT8 Type;
- EFI_IFR_TYPE_VALUE Value;
+ EFI_IFR_OP_HEADER Header;
+ UINT16 DefaultId;
+ UINT8 Type;
+ EFI_IFR_TYPE_VALUE Value;
} EFI_IFR_DEFAULT;
typedef struct _EFI_IFR_DEFAULT_2 {
- EFI_IFR_OP_HEADER Header;
- UINT16 DefaultId;
- UINT8 Type;
+ EFI_IFR_OP_HEADER Header;
+ UINT16 DefaultId;
+ UINT8 Type;
} EFI_IFR_DEFAULT_2;
typedef struct _EFI_IFR_VALUE {
- EFI_IFR_OP_HEADER Header;
+ EFI_IFR_OP_HEADER Header;
} EFI_IFR_VALUE;
typedef struct _EFI_IFR_SUBTITLE {
- EFI_IFR_OP_HEADER Header;
- EFI_IFR_STATEMENT_HEADER Statement;
- UINT8 Flags;
+ EFI_IFR_OP_HEADER Header;
+ EFI_IFR_STATEMENT_HEADER Statement;
+ UINT8 Flags;
} EFI_IFR_SUBTITLE;
-#define EFI_IFR_FLAGS_HORIZONTAL 0x01
+#define EFI_IFR_FLAGS_HORIZONTAL 0x01
typedef struct _EFI_IFR_CHECKBOX {
- EFI_IFR_OP_HEADER Header;
- EFI_IFR_QUESTION_HEADER Question;
- UINT8 Flags;
+ EFI_IFR_OP_HEADER Header;
+ EFI_IFR_QUESTION_HEADER Question;
+ UINT8 Flags;
} EFI_IFR_CHECKBOX;
-#define EFI_IFR_CHECKBOX_DEFAULT 0x01
-#define EFI_IFR_CHECKBOX_DEFAULT_MFG 0x02
+#define EFI_IFR_CHECKBOX_DEFAULT 0x01
+#define EFI_IFR_CHECKBOX_DEFAULT_MFG 0x02
typedef struct _EFI_IFR_TEXT {
- EFI_IFR_OP_HEADER Header;
- EFI_IFR_STATEMENT_HEADER Statement;
- EFI_STRING_ID TextTwo;
+ EFI_IFR_OP_HEADER Header;
+ EFI_IFR_STATEMENT_HEADER Statement;
+ EFI_STRING_ID TextTwo;
} EFI_IFR_TEXT;
typedef struct _EFI_IFR_REF {
- EFI_IFR_OP_HEADER Header;
- EFI_IFR_QUESTION_HEADER Question;
- EFI_FORM_ID FormId;
+ EFI_IFR_OP_HEADER Header;
+ EFI_IFR_QUESTION_HEADER Question;
+ EFI_FORM_ID FormId;
} EFI_IFR_REF;
typedef struct _EFI_IFR_REF2 {
- EFI_IFR_OP_HEADER Header;
- EFI_IFR_QUESTION_HEADER Question;
- EFI_FORM_ID FormId;
- EFI_QUESTION_ID QuestionId;
+ EFI_IFR_OP_HEADER Header;
+ EFI_IFR_QUESTION_HEADER Question;
+ EFI_FORM_ID FormId;
+ EFI_QUESTION_ID QuestionId;
} EFI_IFR_REF2;
typedef struct _EFI_IFR_REF3 {
- EFI_IFR_OP_HEADER Header;
- EFI_IFR_QUESTION_HEADER Question;
- EFI_FORM_ID FormId;
- EFI_QUESTION_ID QuestionId;
- EFI_GUID FormSetId;
+ EFI_IFR_OP_HEADER Header;
+ EFI_IFR_QUESTION_HEADER Question;
+ EFI_FORM_ID FormId;
+ EFI_QUESTION_ID QuestionId;
+ EFI_GUID FormSetId;
} EFI_IFR_REF3;
typedef struct _EFI_IFR_REF4 {
- EFI_IFR_OP_HEADER Header;
- EFI_IFR_QUESTION_HEADER Question;
- EFI_FORM_ID FormId;
- EFI_QUESTION_ID QuestionId;
- EFI_GUID FormSetId;
- EFI_STRING_ID DevicePath;
+ EFI_IFR_OP_HEADER Header;
+ EFI_IFR_QUESTION_HEADER Question;
+ EFI_FORM_ID FormId;
+ EFI_QUESTION_ID QuestionId;
+ EFI_GUID FormSetId;
+ EFI_STRING_ID DevicePath;
} EFI_IFR_REF4;
typedef struct _EFI_IFR_REF5 {
- EFI_IFR_OP_HEADER Header;
- EFI_IFR_QUESTION_HEADER Question;
+ EFI_IFR_OP_HEADER Header;
+ EFI_IFR_QUESTION_HEADER Question;
} EFI_IFR_REF5;
typedef struct _EFI_IFR_RESET_BUTTON {
- EFI_IFR_OP_HEADER Header;
- EFI_IFR_STATEMENT_HEADER Statement;
- EFI_DEFAULT_ID DefaultId;
+ EFI_IFR_OP_HEADER Header;
+ EFI_IFR_STATEMENT_HEADER Statement;
+ EFI_DEFAULT_ID DefaultId;
} EFI_IFR_RESET_BUTTON;
typedef struct _EFI_IFR_ACTION {
- EFI_IFR_OP_HEADER Header;
- EFI_IFR_QUESTION_HEADER Question;
- EFI_STRING_ID QuestionConfig;
+ EFI_IFR_OP_HEADER Header;
+ EFI_IFR_QUESTION_HEADER Question;
+ EFI_STRING_ID QuestionConfig;
} EFI_IFR_ACTION;
typedef struct _EFI_IFR_ACTION_1 {
- EFI_IFR_OP_HEADER Header;
- EFI_IFR_QUESTION_HEADER Question;
+ EFI_IFR_OP_HEADER Header;
+ EFI_IFR_QUESTION_HEADER Question;
} EFI_IFR_ACTION_1;
typedef struct _EFI_IFR_DATE {
- EFI_IFR_OP_HEADER Header;
- EFI_IFR_QUESTION_HEADER Question;
- UINT8 Flags;
+ EFI_IFR_OP_HEADER Header;
+ EFI_IFR_QUESTION_HEADER Question;
+ UINT8 Flags;
} EFI_IFR_DATE;
//
// Flags that describe the behavior of the question.
//
-#define EFI_QF_DATE_YEAR_SUPPRESS 0x01
-#define EFI_QF_DATE_MONTH_SUPPRESS 0x02
-#define EFI_QF_DATE_DAY_SUPPRESS 0x04
+#define EFI_QF_DATE_YEAR_SUPPRESS 0x01
+#define EFI_QF_DATE_MONTH_SUPPRESS 0x02
+#define EFI_QF_DATE_DAY_SUPPRESS 0x04
-#define EFI_QF_DATE_STORAGE 0x30
-#define QF_DATE_STORAGE_NORMAL 0x00
-#define QF_DATE_STORAGE_TIME 0x10
-#define QF_DATE_STORAGE_WAKEUP 0x20
+#define EFI_QF_DATE_STORAGE 0x30
+#define QF_DATE_STORAGE_NORMAL 0x00
+#define QF_DATE_STORAGE_TIME 0x10
+#define QF_DATE_STORAGE_WAKEUP 0x20
typedef union {
struct {
- UINT8 MinValue;
- UINT8 MaxValue;
- UINT8 Step;
+ UINT8 MinValue;
+ UINT8 MaxValue;
+ UINT8 Step;
} u8;
struct {
- UINT16 MinValue;
- UINT16 MaxValue;
- UINT16 Step;
+ UINT16 MinValue;
+ UINT16 MaxValue;
+ UINT16 Step;
} u16;
struct {
- UINT32 MinValue;
- UINT32 MaxValue;
- UINT32 Step;
+ UINT32 MinValue;
+ UINT32 MaxValue;
+ UINT32 Step;
} u32;
struct {
- UINT64 MinValue;
- UINT64 MaxValue;
- UINT64 Step;
+ UINT64 MinValue;
+ UINT64 MaxValue;
+ UINT64 Step;
} u64;
} MINMAXSTEP_DATA;
typedef struct _EFI_IFR_NUMERIC {
- EFI_IFR_OP_HEADER Header;
- EFI_IFR_QUESTION_HEADER Question;
- UINT8 Flags;
- MINMAXSTEP_DATA data;
+ EFI_IFR_OP_HEADER Header;
+ EFI_IFR_QUESTION_HEADER Question;
+ UINT8 Flags;
+ MINMAXSTEP_DATA data;
} EFI_IFR_NUMERIC;
//
// Flags related to the numeric question
//
-#define EFI_IFR_NUMERIC_SIZE 0x03
-#define EFI_IFR_NUMERIC_SIZE_1 0x00
-#define EFI_IFR_NUMERIC_SIZE_2 0x01
-#define EFI_IFR_NUMERIC_SIZE_4 0x02
-#define EFI_IFR_NUMERIC_SIZE_8 0x03
+#define EFI_IFR_NUMERIC_SIZE 0x03
+#define EFI_IFR_NUMERIC_SIZE_1 0x00
+#define EFI_IFR_NUMERIC_SIZE_2 0x01
+#define EFI_IFR_NUMERIC_SIZE_4 0x02
+#define EFI_IFR_NUMERIC_SIZE_8 0x03
-#define EFI_IFR_DISPLAY 0x30
-#define EFI_IFR_DISPLAY_INT_DEC 0x00
-#define EFI_IFR_DISPLAY_UINT_DEC 0x10
-#define EFI_IFR_DISPLAY_UINT_HEX 0x20
+#define EFI_IFR_DISPLAY 0x30
+#define EFI_IFR_DISPLAY_INT_DEC 0x00
+#define EFI_IFR_DISPLAY_UINT_DEC 0x10
+#define EFI_IFR_DISPLAY_UINT_HEX 0x20
typedef struct _EFI_IFR_ONE_OF {
- EFI_IFR_OP_HEADER Header;
- EFI_IFR_QUESTION_HEADER Question;
- UINT8 Flags;
- MINMAXSTEP_DATA data;
+ EFI_IFR_OP_HEADER Header;
+ EFI_IFR_QUESTION_HEADER Question;
+ UINT8 Flags;
+ MINMAXSTEP_DATA data;
} EFI_IFR_ONE_OF;
typedef struct _EFI_IFR_STRING {
- EFI_IFR_OP_HEADER Header;
- EFI_IFR_QUESTION_HEADER Question;
- UINT8 MinSize;
- UINT8 MaxSize;
- UINT8 Flags;
+ EFI_IFR_OP_HEADER Header;
+ EFI_IFR_QUESTION_HEADER Question;
+ UINT8 MinSize;
+ UINT8 MaxSize;
+ UINT8 Flags;
} EFI_IFR_STRING;
-#define EFI_IFR_STRING_MULTI_LINE 0x01
+#define EFI_IFR_STRING_MULTI_LINE 0x01
typedef struct _EFI_IFR_PASSWORD {
- EFI_IFR_OP_HEADER Header;
- EFI_IFR_QUESTION_HEADER Question;
- UINT16 MinSize;
- UINT16 MaxSize;
+ EFI_IFR_OP_HEADER Header;
+ EFI_IFR_QUESTION_HEADER Question;
+ UINT16 MinSize;
+ UINT16 MaxSize;
} EFI_IFR_PASSWORD;
typedef struct _EFI_IFR_ORDERED_LIST {
- EFI_IFR_OP_HEADER Header;
- EFI_IFR_QUESTION_HEADER Question;
- UINT8 MaxContainers;
- UINT8 Flags;
+ EFI_IFR_OP_HEADER Header;
+ EFI_IFR_QUESTION_HEADER Question;
+ UINT8 MaxContainers;
+ UINT8 Flags;
} EFI_IFR_ORDERED_LIST;
-#define EFI_IFR_UNIQUE_SET 0x01
-#define EFI_IFR_NO_EMPTY_SET 0x02
+#define EFI_IFR_UNIQUE_SET 0x01
+#define EFI_IFR_NO_EMPTY_SET 0x02
typedef struct _EFI_IFR_TIME {
- EFI_IFR_OP_HEADER Header;
- EFI_IFR_QUESTION_HEADER Question;
- UINT8 Flags;
+ EFI_IFR_OP_HEADER Header;
+ EFI_IFR_QUESTION_HEADER Question;
+ UINT8 Flags;
} EFI_IFR_TIME;
//
// A bit-mask that determines which unique settings are active for this opcode.
//
-#define QF_TIME_HOUR_SUPPRESS 0x01
-#define QF_TIME_MINUTE_SUPPRESS 0x02
-#define QF_TIME_SECOND_SUPPRESS 0x04
+#define QF_TIME_HOUR_SUPPRESS 0x01
+#define QF_TIME_MINUTE_SUPPRESS 0x02
+#define QF_TIME_SECOND_SUPPRESS 0x04
-#define QF_TIME_STORAGE 0x30
-#define QF_TIME_STORAGE_NORMAL 0x00
-#define QF_TIME_STORAGE_TIME 0x10
-#define QF_TIME_STORAGE_WAKEUP 0x20
+#define QF_TIME_STORAGE 0x30
+#define QF_TIME_STORAGE_NORMAL 0x00
+#define QF_TIME_STORAGE_TIME 0x10
+#define QF_TIME_STORAGE_WAKEUP 0x20
typedef struct _EFI_IFR_DISABLE_IF {
- EFI_IFR_OP_HEADER Header;
+ EFI_IFR_OP_HEADER Header;
} EFI_IFR_DISABLE_IF;
typedef struct _EFI_IFR_SUPPRESS_IF {
- EFI_IFR_OP_HEADER Header;
+ EFI_IFR_OP_HEADER Header;
} EFI_IFR_SUPPRESS_IF;
typedef struct _EFI_IFR_GRAY_OUT_IF {
- EFI_IFR_OP_HEADER Header;
+ EFI_IFR_OP_HEADER Header;
} EFI_IFR_GRAY_OUT_IF;
typedef struct _EFI_IFR_INCONSISTENT_IF {
- EFI_IFR_OP_HEADER Header;
- EFI_STRING_ID Error;
+ EFI_IFR_OP_HEADER Header;
+ EFI_STRING_ID Error;
} EFI_IFR_INCONSISTENT_IF;
typedef struct _EFI_IFR_NO_SUBMIT_IF {
- EFI_IFR_OP_HEADER Header;
- EFI_STRING_ID Error;
+ EFI_IFR_OP_HEADER Header;
+ EFI_STRING_ID Error;
} EFI_IFR_NO_SUBMIT_IF;
typedef struct _EFI_IFR_WARNING_IF {
- EFI_IFR_OP_HEADER Header;
- EFI_STRING_ID Warning;
- UINT8 TimeOut;
+ EFI_IFR_OP_HEADER Header;
+ EFI_STRING_ID Warning;
+ UINT8 TimeOut;
} EFI_IFR_WARNING_IF;
typedef struct _EFI_IFR_REFRESH {
- EFI_IFR_OP_HEADER Header;
- UINT8 RefreshInterval;
+ EFI_IFR_OP_HEADER Header;
+ UINT8 RefreshInterval;
} EFI_IFR_REFRESH;
typedef struct _EFI_IFR_VARSTORE_DEVICE {
- EFI_IFR_OP_HEADER Header;
- EFI_STRING_ID DevicePath;
+ EFI_IFR_OP_HEADER Header;
+ EFI_STRING_ID DevicePath;
} EFI_IFR_VARSTORE_DEVICE;
typedef struct _EFI_IFR_ONE_OF_OPTION {
- EFI_IFR_OP_HEADER Header;
- EFI_STRING_ID Option;
- UINT8 Flags;
- UINT8 Type;
- EFI_IFR_TYPE_VALUE Value;
+ EFI_IFR_OP_HEADER Header;
+ EFI_STRING_ID Option;
+ UINT8 Flags;
+ UINT8 Type;
+ EFI_IFR_TYPE_VALUE Value;
} EFI_IFR_ONE_OF_OPTION;
//
// Types of the option's value.
//
-#define EFI_IFR_TYPE_NUM_SIZE_8 0x00
-#define EFI_IFR_TYPE_NUM_SIZE_16 0x01
-#define EFI_IFR_TYPE_NUM_SIZE_32 0x02
-#define EFI_IFR_TYPE_NUM_SIZE_64 0x03
-#define EFI_IFR_TYPE_BOOLEAN 0x04
-#define EFI_IFR_TYPE_TIME 0x05
-#define EFI_IFR_TYPE_DATE 0x06
-#define EFI_IFR_TYPE_STRING 0x07
-#define EFI_IFR_TYPE_OTHER 0x08
-#define EFI_IFR_TYPE_UNDEFINED 0x09
-#define EFI_IFR_TYPE_ACTION 0x0A
-#define EFI_IFR_TYPE_BUFFER 0x0B
-#define EFI_IFR_TYPE_REF 0x0C
-
-#define EFI_IFR_OPTION_DEFAULT 0x10
-#define EFI_IFR_OPTION_DEFAULT_MFG 0x20
+#define EFI_IFR_TYPE_NUM_SIZE_8 0x00
+#define EFI_IFR_TYPE_NUM_SIZE_16 0x01
+#define EFI_IFR_TYPE_NUM_SIZE_32 0x02
+#define EFI_IFR_TYPE_NUM_SIZE_64 0x03
+#define EFI_IFR_TYPE_BOOLEAN 0x04
+#define EFI_IFR_TYPE_TIME 0x05
+#define EFI_IFR_TYPE_DATE 0x06
+#define EFI_IFR_TYPE_STRING 0x07
+#define EFI_IFR_TYPE_OTHER 0x08
+#define EFI_IFR_TYPE_UNDEFINED 0x09
+#define EFI_IFR_TYPE_ACTION 0x0A
+#define EFI_IFR_TYPE_BUFFER 0x0B
+#define EFI_IFR_TYPE_REF 0x0C
+
+#define EFI_IFR_OPTION_DEFAULT 0x10
+#define EFI_IFR_OPTION_DEFAULT_MFG 0x20
typedef struct _EFI_IFR_GUID {
- EFI_IFR_OP_HEADER Header;
- EFI_GUID Guid;
- //Optional Data Follows
+ EFI_IFR_OP_HEADER Header;
+ EFI_GUID Guid;
+ // Optional Data Follows
} EFI_IFR_GUID;
typedef struct _EFI_IFR_REFRESH_ID {
- EFI_IFR_OP_HEADER Header;
- EFI_GUID RefreshEventGroupId;
+ EFI_IFR_OP_HEADER Header;
+ EFI_GUID RefreshEventGroupId;
} EFI_IFR_REFRESH_ID;
typedef struct _EFI_IFR_DUP {
- EFI_IFR_OP_HEADER Header;
+ EFI_IFR_OP_HEADER Header;
} EFI_IFR_DUP;
typedef struct _EFI_IFR_EQ_ID_ID {
- EFI_IFR_OP_HEADER Header;
- EFI_QUESTION_ID QuestionId1;
- EFI_QUESTION_ID QuestionId2;
+ EFI_IFR_OP_HEADER Header;
+ EFI_QUESTION_ID QuestionId1;
+ EFI_QUESTION_ID QuestionId2;
} EFI_IFR_EQ_ID_ID;
typedef struct _EFI_IFR_EQ_ID_VAL {
- EFI_IFR_OP_HEADER Header;
- EFI_QUESTION_ID QuestionId;
- UINT16 Value;
+ EFI_IFR_OP_HEADER Header;
+ EFI_QUESTION_ID QuestionId;
+ UINT16 Value;
} EFI_IFR_EQ_ID_VAL;
typedef struct _EFI_IFR_EQ_ID_VAL_LIST {
- EFI_IFR_OP_HEADER Header;
- EFI_QUESTION_ID QuestionId;
- UINT16 ListLength;
- UINT16 ValueList[1];
+ EFI_IFR_OP_HEADER Header;
+ EFI_QUESTION_ID QuestionId;
+ UINT16 ListLength;
+ UINT16 ValueList[1];
} EFI_IFR_EQ_ID_VAL_LIST;
typedef struct _EFI_IFR_UINT8 {
- EFI_IFR_OP_HEADER Header;
- UINT8 Value;
+ EFI_IFR_OP_HEADER Header;
+ UINT8 Value;
} EFI_IFR_UINT8;
typedef struct _EFI_IFR_UINT16 {
- EFI_IFR_OP_HEADER Header;
- UINT16 Value;
+ EFI_IFR_OP_HEADER Header;
+ UINT16 Value;
} EFI_IFR_UINT16;
typedef struct _EFI_IFR_UINT32 {
- EFI_IFR_OP_HEADER Header;
- UINT32 Value;
+ EFI_IFR_OP_HEADER Header;
+ UINT32 Value;
} EFI_IFR_UINT32;
typedef struct _EFI_IFR_UINT64 {
- EFI_IFR_OP_HEADER Header;
- UINT64 Value;
+ EFI_IFR_OP_HEADER Header;
+ UINT64 Value;
} EFI_IFR_UINT64;
typedef struct _EFI_IFR_QUESTION_REF1 {
- EFI_IFR_OP_HEADER Header;
- EFI_QUESTION_ID QuestionId;
+ EFI_IFR_OP_HEADER Header;
+ EFI_QUESTION_ID QuestionId;
} EFI_IFR_QUESTION_REF1;
typedef struct _EFI_IFR_QUESTION_REF2 {
- EFI_IFR_OP_HEADER Header;
+ EFI_IFR_OP_HEADER Header;
} EFI_IFR_QUESTION_REF2;
typedef struct _EFI_IFR_QUESTION_REF3 {
- EFI_IFR_OP_HEADER Header;
+ EFI_IFR_OP_HEADER Header;
} EFI_IFR_QUESTION_REF3;
typedef struct _EFI_IFR_QUESTION_REF3_2 {
- EFI_IFR_OP_HEADER Header;
- EFI_STRING_ID DevicePath;
+ EFI_IFR_OP_HEADER Header;
+ EFI_STRING_ID DevicePath;
} EFI_IFR_QUESTION_REF3_2;
typedef struct _EFI_IFR_QUESTION_REF3_3 {
- EFI_IFR_OP_HEADER Header;
- EFI_STRING_ID DevicePath;
- EFI_GUID Guid;
+ EFI_IFR_OP_HEADER Header;
+ EFI_STRING_ID DevicePath;
+ EFI_GUID Guid;
} EFI_IFR_QUESTION_REF3_3;
typedef struct _EFI_IFR_RULE_REF {
- EFI_IFR_OP_HEADER Header;
- UINT8 RuleId;
+ EFI_IFR_OP_HEADER Header;
+ UINT8 RuleId;
} EFI_IFR_RULE_REF;
typedef struct _EFI_IFR_STRING_REF1 {
- EFI_IFR_OP_HEADER Header;
- EFI_STRING_ID StringId;
+ EFI_IFR_OP_HEADER Header;
+ EFI_STRING_ID StringId;
} EFI_IFR_STRING_REF1;
typedef struct _EFI_IFR_STRING_REF2 {
- EFI_IFR_OP_HEADER Header;
+ EFI_IFR_OP_HEADER Header;
} EFI_IFR_STRING_REF2;
typedef struct _EFI_IFR_THIS {
- EFI_IFR_OP_HEADER Header;
+ EFI_IFR_OP_HEADER Header;
} EFI_IFR_THIS;
typedef struct _EFI_IFR_TRUE {
- EFI_IFR_OP_HEADER Header;
+ EFI_IFR_OP_HEADER Header;
} EFI_IFR_TRUE;
typedef struct _EFI_IFR_FALSE {
- EFI_IFR_OP_HEADER Header;
+ EFI_IFR_OP_HEADER Header;
} EFI_IFR_FALSE;
typedef struct _EFI_IFR_ONE {
- EFI_IFR_OP_HEADER Header;
+ EFI_IFR_OP_HEADER Header;
} EFI_IFR_ONE;
typedef struct _EFI_IFR_ONES {
- EFI_IFR_OP_HEADER Header;
+ EFI_IFR_OP_HEADER Header;
} EFI_IFR_ONES;
typedef struct _EFI_IFR_ZERO {
- EFI_IFR_OP_HEADER Header;
+ EFI_IFR_OP_HEADER Header;
} EFI_IFR_ZERO;
typedef struct _EFI_IFR_UNDEFINED {
- EFI_IFR_OP_HEADER Header;
+ EFI_IFR_OP_HEADER Header;
} EFI_IFR_UNDEFINED;
typedef struct _EFI_IFR_VERSION {
- EFI_IFR_OP_HEADER Header;
+ EFI_IFR_OP_HEADER Header;
} EFI_IFR_VERSION;
typedef struct _EFI_IFR_LENGTH {
- EFI_IFR_OP_HEADER Header;
+ EFI_IFR_OP_HEADER Header;
} EFI_IFR_LENGTH;
typedef struct _EFI_IFR_NOT {
- EFI_IFR_OP_HEADER Header;
+ EFI_IFR_OP_HEADER Header;
} EFI_IFR_NOT;
typedef struct _EFI_IFR_BITWISE_NOT {
- EFI_IFR_OP_HEADER Header;
+ EFI_IFR_OP_HEADER Header;
} EFI_IFR_BITWISE_NOT;
typedef struct _EFI_IFR_TO_BOOLEAN {
- EFI_IFR_OP_HEADER Header;
+ EFI_IFR_OP_HEADER Header;
} EFI_IFR_TO_BOOLEAN;
///
@@ -1332,10 +1330,10 @@ typedef struct _EFI_IFR_TO_BOOLEAN {
/// 2 = hexadecimal (lower-case alpha).
/// 3 = hexadecimal (upper-case alpha).
///@{
-#define EFI_IFR_STRING_UNSIGNED_DEC 0
-#define EFI_IFR_STRING_SIGNED_DEC 1
-#define EFI_IFR_STRING_LOWERCASE_HEX 2
-#define EFI_IFR_STRING_UPPERCASE_HEX 3
+#define EFI_IFR_STRING_UNSIGNED_DEC 0
+#define EFI_IFR_STRING_SIGNED_DEC 1
+#define EFI_IFR_STRING_LOWERCASE_HEX 2
+#define EFI_IFR_STRING_UPPERCASE_HEX 3
///@}
///
@@ -1343,110 +1341,110 @@ typedef struct _EFI_IFR_TO_BOOLEAN {
/// 0 = ASCII.
/// 8 = Unicode.
///@{
-#define EFI_IFR_STRING_ASCII 0
-#define EFI_IFR_STRING_UNICODE 8
+#define EFI_IFR_STRING_ASCII 0
+#define EFI_IFR_STRING_UNICODE 8
///@}
typedef struct _EFI_IFR_TO_STRING {
- EFI_IFR_OP_HEADER Header;
- UINT8 Format;
+ EFI_IFR_OP_HEADER Header;
+ UINT8 Format;
} EFI_IFR_TO_STRING;
typedef struct _EFI_IFR_TO_UINT {
- EFI_IFR_OP_HEADER Header;
+ EFI_IFR_OP_HEADER Header;
} EFI_IFR_TO_UINT;
typedef struct _EFI_IFR_TO_UPPER {
- EFI_IFR_OP_HEADER Header;
+ EFI_IFR_OP_HEADER Header;
} EFI_IFR_TO_UPPER;
typedef struct _EFI_IFR_TO_LOWER {
- EFI_IFR_OP_HEADER Header;
+ EFI_IFR_OP_HEADER Header;
} EFI_IFR_TO_LOWER;
typedef struct _EFI_IFR_ADD {
- EFI_IFR_OP_HEADER Header;
+ EFI_IFR_OP_HEADER Header;
} EFI_IFR_ADD;
typedef struct _EFI_IFR_AND {
- EFI_IFR_OP_HEADER Header;
+ EFI_IFR_OP_HEADER Header;
} EFI_IFR_AND;
typedef struct _EFI_IFR_BITWISE_AND {
- EFI_IFR_OP_HEADER Header;
+ EFI_IFR_OP_HEADER Header;
} EFI_IFR_BITWISE_AND;
typedef struct _EFI_IFR_BITWISE_OR {
- EFI_IFR_OP_HEADER Header;
+ EFI_IFR_OP_HEADER Header;
} EFI_IFR_BITWISE_OR;
typedef struct _EFI_IFR_CATENATE {
- EFI_IFR_OP_HEADER Header;
+ EFI_IFR_OP_HEADER Header;
} EFI_IFR_CATENATE;
typedef struct _EFI_IFR_DIVIDE {
- EFI_IFR_OP_HEADER Header;
+ EFI_IFR_OP_HEADER Header;
} EFI_IFR_DIVIDE;
typedef struct _EFI_IFR_EQUAL {
- EFI_IFR_OP_HEADER Header;
+ EFI_IFR_OP_HEADER Header;
} EFI_IFR_EQUAL;
typedef struct _EFI_IFR_GREATER_EQUAL {
- EFI_IFR_OP_HEADER Header;
+ EFI_IFR_OP_HEADER Header;
} EFI_IFR_GREATER_EQUAL;
typedef struct _EFI_IFR_GREATER_THAN {
- EFI_IFR_OP_HEADER Header;
+ EFI_IFR_OP_HEADER Header;
} EFI_IFR_GREATER_THAN;
typedef struct _EFI_IFR_LESS_EQUAL {
- EFI_IFR_OP_HEADER Header;
+ EFI_IFR_OP_HEADER Header;
} EFI_IFR_LESS_EQUAL;
typedef struct _EFI_IFR_LESS_THAN {
- EFI_IFR_OP_HEADER Header;
+ EFI_IFR_OP_HEADER Header;
} EFI_IFR_LESS_THAN;
typedef struct _EFI_IFR_MATCH {
- EFI_IFR_OP_HEADER Header;
+ EFI_IFR_OP_HEADER Header;
} EFI_IFR_MATCH;
typedef struct _EFI_IFR_MATCH2 {
- EFI_IFR_OP_HEADER Header;
- EFI_GUID SyntaxType;
+ EFI_IFR_OP_HEADER Header;
+ EFI_GUID SyntaxType;
} EFI_IFR_MATCH2;
typedef struct _EFI_IFR_MULTIPLY {
- EFI_IFR_OP_HEADER Header;
+ EFI_IFR_OP_HEADER Header;
} EFI_IFR_MULTIPLY;
typedef struct _EFI_IFR_MODULO {
- EFI_IFR_OP_HEADER Header;
+ EFI_IFR_OP_HEADER Header;
} EFI_IFR_MODULO;
typedef struct _EFI_IFR_NOT_EQUAL {
- EFI_IFR_OP_HEADER Header;
+ EFI_IFR_OP_HEADER Header;
} EFI_IFR_NOT_EQUAL;
typedef struct _EFI_IFR_OR {
- EFI_IFR_OP_HEADER Header;
+ EFI_IFR_OP_HEADER Header;
} EFI_IFR_OR;
typedef struct _EFI_IFR_SHIFT_LEFT {
- EFI_IFR_OP_HEADER Header;
+ EFI_IFR_OP_HEADER Header;
} EFI_IFR_SHIFT_LEFT;
typedef struct _EFI_IFR_SHIFT_RIGHT {
- EFI_IFR_OP_HEADER Header;
+ EFI_IFR_OP_HEADER Header;
} EFI_IFR_SHIFT_RIGHT;
typedef struct _EFI_IFR_SUBTRACT {
- EFI_IFR_OP_HEADER Header;
+ EFI_IFR_OP_HEADER Header;
} EFI_IFR_SUBTRACT;
typedef struct _EFI_IFR_CONDITIONAL {
- EFI_IFR_OP_HEADER Header;
+ EFI_IFR_OP_HEADER Header;
} EFI_IFR_CONDITIONAL;
//
@@ -1456,39 +1454,39 @@ typedef struct _EFI_IFR_CONDITIONAL {
#define EFI_IFR_FF_CASE_INSENSITIVE 0x01
typedef struct _EFI_IFR_FIND {
- EFI_IFR_OP_HEADER Header;
- UINT8 Format;
+ EFI_IFR_OP_HEADER Header;
+ UINT8 Format;
} EFI_IFR_FIND;
typedef struct _EFI_IFR_MID {
- EFI_IFR_OP_HEADER Header;
+ EFI_IFR_OP_HEADER Header;
} EFI_IFR_MID;
typedef struct _EFI_IFR_TOKEN {
- EFI_IFR_OP_HEADER Header;
+ EFI_IFR_OP_HEADER Header;
} EFI_IFR_TOKEN;
//
// Flags specifying whether to find the first matching string
// or the first non-matching string.
//
-#define EFI_IFR_FLAGS_FIRST_MATCHING 0x00
-#define EFI_IFR_FLAGS_FIRST_NON_MATCHING 0x01
+#define EFI_IFR_FLAGS_FIRST_MATCHING 0x00
+#define EFI_IFR_FLAGS_FIRST_NON_MATCHING 0x01
typedef struct _EFI_IFR_SPAN {
- EFI_IFR_OP_HEADER Header;
- UINT8 Flags;
+ EFI_IFR_OP_HEADER Header;
+ UINT8 Flags;
} EFI_IFR_SPAN;
typedef struct _EFI_IFR_SECURITY {
///
/// Standard opcode header, where Header.Op = EFI_IFR_SECURITY_OP.
///
- EFI_IFR_OP_HEADER Header;
+ EFI_IFR_OP_HEADER Header;
///
/// Security permission level.
///
- EFI_GUID Permissions;
+ EFI_GUID Permissions;
} EFI_IFR_SECURITY;
typedef struct _EFI_IFR_FORM_MAP_METHOD {
@@ -1496,12 +1494,12 @@ typedef struct _EFI_IFR_FORM_MAP_METHOD {
/// The string identifier which provides the human-readable name of
/// the configuration method for this standards map form.
///
- EFI_STRING_ID MethodTitle;
+ EFI_STRING_ID MethodTitle;
///
/// Identifier which uniquely specifies the configuration methods
/// associated with this standards map form.
///
- EFI_GUID MethodIdentifier;
+ EFI_GUID MethodIdentifier;
} EFI_IFR_FORM_MAP_METHOD;
typedef struct _EFI_IFR_FORM_MAP {
@@ -1509,11 +1507,11 @@ typedef struct _EFI_IFR_FORM_MAP {
/// The sequence that defines the type of opcode as well as the length
/// of the opcode being defined. Header.OpCode = EFI_IFR_FORM_MAP_OP.
///
- EFI_IFR_OP_HEADER Header;
+ EFI_IFR_OP_HEADER Header;
///
/// The unique identifier for this particular form.
///
- EFI_FORM_ID FormId;
+ EFI_FORM_ID FormId;
///
/// One or more configuration method's name and unique identifier.
///
@@ -1525,12 +1523,12 @@ typedef struct _EFI_IFR_SET {
/// The sequence that defines the type of opcode as well as the length
/// of the opcode being defined. Header.OpCode = EFI_IFR_SET_OP.
///
- EFI_IFR_OP_HEADER Header;
+ EFI_IFR_OP_HEADER Header;
///
/// Specifies the identifier of a previously declared variable store to
/// use when storing the question's value.
///
- EFI_VARSTORE_ID VarStoreId;
+ EFI_VARSTORE_ID VarStoreId;
union {
///
/// A 16-bit Buffer Storage offset.
@@ -1544,7 +1542,7 @@ typedef struct _EFI_IFR_SET {
///
/// Specifies the type used for storage.
///
- UINT8 VarStoreType;
+ UINT8 VarStoreType;
} EFI_IFR_SET;
typedef struct _EFI_IFR_GET {
@@ -1552,12 +1550,12 @@ typedef struct _EFI_IFR_GET {
/// The sequence that defines the type of opcode as well as the length
/// of the opcode being defined. Header.OpCode = EFI_IFR_GET_OP.
///
- EFI_IFR_OP_HEADER Header;
+ EFI_IFR_OP_HEADER Header;
///
/// Specifies the identifier of a previously declared variable store to
/// use when retrieving the value.
///
- EFI_VARSTORE_ID VarStoreId;
+ EFI_VARSTORE_ID VarStoreId;
union {
///
/// A 16-bit Buffer Storage offset.
@@ -1571,19 +1569,19 @@ typedef struct _EFI_IFR_GET {
///
/// Specifies the type used for storage.
///
- UINT8 VarStoreType;
+ UINT8 VarStoreType;
} EFI_IFR_GET;
typedef struct _EFI_IFR_READ {
- EFI_IFR_OP_HEADER Header;
+ EFI_IFR_OP_HEADER Header;
} EFI_IFR_READ;
typedef struct _EFI_IFR_WRITE {
- EFI_IFR_OP_HEADER Header;
+ EFI_IFR_OP_HEADER Header;
} EFI_IFR_WRITE;
typedef struct _EFI_IFR_MAP {
- EFI_IFR_OP_HEADER Header;
+ EFI_IFR_OP_HEADER Header;
} EFI_IFR_MAP;
//
// Definitions for Keyboard Package
@@ -1698,44 +1696,54 @@ typedef enum {
EfiKeyF12,
EfiKeyPrint,
EfiKeySLck,
- EfiKeyPause
+ EfiKeyPause,
+ EfiKeyIntl0,
+ EfiKeyIntl1,
+ EfiKeyIntl2,
+ EfiKeyIntl3,
+ EfiKeyIntl4,
+ EfiKeyIntl5,
+ EfiKeyIntl6,
+ EfiKeyIntl7,
+ EfiKeyIntl8,
+ EfiKeyIntl9
} EFI_KEY;
typedef struct {
///
/// Used to describe a physical key on a keyboard.
///
- EFI_KEY Key;
+ EFI_KEY Key;
///
/// Unicode character code for the Key.
///
- CHAR16 Unicode;
+ CHAR16 Unicode;
///
/// Unicode character code for the key with the shift key being held down.
///
- CHAR16 ShiftedUnicode;
+ CHAR16 ShiftedUnicode;
///
/// Unicode character code for the key with the Alt-GR being held down.
///
- CHAR16 AltGrUnicode;
+ CHAR16 AltGrUnicode;
///
/// Unicode character code for the key with the Alt-GR and shift keys being held down.
///
- CHAR16 ShiftedAltGrUnicode;
+ CHAR16 ShiftedAltGrUnicode;
///
/// Modifier keys are defined to allow for special functionality that is not necessarily
/// accomplished by a printable character. Many of these modifier keys are flags to toggle
/// certain state bits on and off inside of a keyboard driver.
///
- UINT16 Modifier;
- UINT16 AffectedAttribute;
+ UINT16 Modifier;
+ UINT16 AffectedAttribute;
} EFI_KEY_DESCRIPTOR;
///
/// A key which is affected by all the standard shift modifiers.
/// Most keys would be expected to have this bit active.
///
-#define EFI_AFFECTED_BY_STANDARD_SHIFT 0x0001
+#define EFI_AFFECTED_BY_STANDARD_SHIFT 0x0001
///
/// This key is affected by the caps lock so that if a keyboard driver
@@ -1743,65 +1751,65 @@ typedef struct {
/// versus an "a" character. Having this bit turned on would tell
/// the keyboard driver to use the appropriate shifted state or not.
///
-#define EFI_AFFECTED_BY_CAPS_LOCK 0x0002
+#define EFI_AFFECTED_BY_CAPS_LOCK 0x0002
///
/// Similar to the case of CAPS lock, if this bit is active, the key
/// is affected by the num lock being turned on.
///
-#define EFI_AFFECTED_BY_NUM_LOCK 0x0004
+#define EFI_AFFECTED_BY_NUM_LOCK 0x0004
typedef struct {
- UINT16 LayoutLength;
- EFI_GUID Guid;
- UINT32 LayoutDescriptorStringOffset;
- UINT8 DescriptorCount;
+ UINT16 LayoutLength;
+ EFI_GUID Guid;
+ UINT32 LayoutDescriptorStringOffset;
+ UINT8 DescriptorCount;
// EFI_KEY_DESCRIPTOR Descriptors[];
} EFI_HII_KEYBOARD_LAYOUT;
typedef struct {
- EFI_HII_PACKAGE_HEADER Header;
- UINT16 LayoutCount;
+ EFI_HII_PACKAGE_HEADER Header;
+ UINT16 LayoutCount;
// EFI_HII_KEYBOARD_LAYOUT Layout[];
} EFI_HII_KEYBOARD_PACKAGE_HDR;
//
// Modifier values
//
-#define EFI_NULL_MODIFIER 0x0000
-#define EFI_LEFT_CONTROL_MODIFIER 0x0001
-#define EFI_RIGHT_CONTROL_MODIFIER 0x0002
-#define EFI_LEFT_ALT_MODIFIER 0x0003
-#define EFI_RIGHT_ALT_MODIFIER 0x0004
-#define EFI_ALT_GR_MODIFIER 0x0005
-#define EFI_INSERT_MODIFIER 0x0006
-#define EFI_DELETE_MODIFIER 0x0007
-#define EFI_PAGE_DOWN_MODIFIER 0x0008
-#define EFI_PAGE_UP_MODIFIER 0x0009
-#define EFI_HOME_MODIFIER 0x000A
-#define EFI_END_MODIFIER 0x000B
-#define EFI_LEFT_SHIFT_MODIFIER 0x000C
-#define EFI_RIGHT_SHIFT_MODIFIER 0x000D
-#define EFI_CAPS_LOCK_MODIFIER 0x000E
-#define EFI_NUM_LOCK_MODIFIER 0x000F
-#define EFI_LEFT_ARROW_MODIFIER 0x0010
-#define EFI_RIGHT_ARROW_MODIFIER 0x0011
-#define EFI_DOWN_ARROW_MODIFIER 0x0012
-#define EFI_UP_ARROW_MODIFIER 0x0013
-#define EFI_NS_KEY_MODIFIER 0x0014
-#define EFI_NS_KEY_DEPENDENCY_MODIFIER 0x0015
-#define EFI_FUNCTION_KEY_ONE_MODIFIER 0x0016
-#define EFI_FUNCTION_KEY_TWO_MODIFIER 0x0017
-#define EFI_FUNCTION_KEY_THREE_MODIFIER 0x0018
-#define EFI_FUNCTION_KEY_FOUR_MODIFIER 0x0019
-#define EFI_FUNCTION_KEY_FIVE_MODIFIER 0x001A
-#define EFI_FUNCTION_KEY_SIX_MODIFIER 0x001B
-#define EFI_FUNCTION_KEY_SEVEN_MODIFIER 0x001C
-#define EFI_FUNCTION_KEY_EIGHT_MODIFIER 0x001D
-#define EFI_FUNCTION_KEY_NINE_MODIFIER 0x001E
-#define EFI_FUNCTION_KEY_TEN_MODIFIER 0x001F
-#define EFI_FUNCTION_KEY_ELEVEN_MODIFIER 0x0020
-#define EFI_FUNCTION_KEY_TWELVE_MODIFIER 0x0021
+#define EFI_NULL_MODIFIER 0x0000
+#define EFI_LEFT_CONTROL_MODIFIER 0x0001
+#define EFI_RIGHT_CONTROL_MODIFIER 0x0002
+#define EFI_LEFT_ALT_MODIFIER 0x0003
+#define EFI_RIGHT_ALT_MODIFIER 0x0004
+#define EFI_ALT_GR_MODIFIER 0x0005
+#define EFI_INSERT_MODIFIER 0x0006
+#define EFI_DELETE_MODIFIER 0x0007
+#define EFI_PAGE_DOWN_MODIFIER 0x0008
+#define EFI_PAGE_UP_MODIFIER 0x0009
+#define EFI_HOME_MODIFIER 0x000A
+#define EFI_END_MODIFIER 0x000B
+#define EFI_LEFT_SHIFT_MODIFIER 0x000C
+#define EFI_RIGHT_SHIFT_MODIFIER 0x000D
+#define EFI_CAPS_LOCK_MODIFIER 0x000E
+#define EFI_NUM_LOCK_MODIFIER 0x000F
+#define EFI_LEFT_ARROW_MODIFIER 0x0010
+#define EFI_RIGHT_ARROW_MODIFIER 0x0011
+#define EFI_DOWN_ARROW_MODIFIER 0x0012
+#define EFI_UP_ARROW_MODIFIER 0x0013
+#define EFI_NS_KEY_MODIFIER 0x0014
+#define EFI_NS_KEY_DEPENDENCY_MODIFIER 0x0015
+#define EFI_FUNCTION_KEY_ONE_MODIFIER 0x0016
+#define EFI_FUNCTION_KEY_TWO_MODIFIER 0x0017
+#define EFI_FUNCTION_KEY_THREE_MODIFIER 0x0018
+#define EFI_FUNCTION_KEY_FOUR_MODIFIER 0x0019
+#define EFI_FUNCTION_KEY_FIVE_MODIFIER 0x001A
+#define EFI_FUNCTION_KEY_SIX_MODIFIER 0x001B
+#define EFI_FUNCTION_KEY_SEVEN_MODIFIER 0x001C
+#define EFI_FUNCTION_KEY_EIGHT_MODIFIER 0x001D
+#define EFI_FUNCTION_KEY_NINE_MODIFIER 0x001E
+#define EFI_FUNCTION_KEY_TEN_MODIFIER 0x001F
+#define EFI_FUNCTION_KEY_ELEVEN_MODIFIER 0x0020
+#define EFI_FUNCTION_KEY_TWELVE_MODIFIER 0x0021
//
// Keys that have multiple control functions based on modifier
@@ -1810,15 +1818,15 @@ typedef struct {
// is still a nonprinting character, but might have an alternate
// control function like SYSREQUEST
//
-#define EFI_PRINT_MODIFIER 0x0022
-#define EFI_SYS_REQUEST_MODIFIER 0x0023
-#define EFI_SCROLL_LOCK_MODIFIER 0x0024
-#define EFI_PAUSE_MODIFIER 0x0025
-#define EFI_BREAK_MODIFIER 0x0026
+#define EFI_PRINT_MODIFIER 0x0022
+#define EFI_SYS_REQUEST_MODIFIER 0x0023
+#define EFI_SCROLL_LOCK_MODIFIER 0x0024
+#define EFI_PAUSE_MODIFIER 0x0025
+#define EFI_BREAK_MODIFIER 0x0026
-#define EFI_LEFT_LOGO_MODIFIER 0x0027
-#define EFI_RIGHT_LOGO_MODIFIER 0x0028
-#define EFI_MENU_MODIFIER 0x0029
+#define EFI_LEFT_LOGO_MODIFIER 0x0027
+#define EFI_RIGHT_LOGO_MODIFIER 0x0028
+#define EFI_MENU_MODIFIER 0x0029
///
/// Animation IFR opcode
@@ -1828,11 +1836,11 @@ typedef struct _EFI_IFR_ANIMATION {
/// Standard opcode header, where Header.OpCode is
/// EFI_IFR_ANIMATION_OP.
///
- EFI_IFR_OP_HEADER Header;
+ EFI_IFR_OP_HEADER Header;
///
/// Animation identifier in the HII database.
///
- EFI_ANIMATION_ID Id;
+ EFI_ANIMATION_ID Id;
} EFI_IFR_ANIMATION;
///
@@ -1842,12 +1850,12 @@ typedef struct _EFI_HII_ANIMATION_PACKAGE_HDR {
///
/// Standard package header, where Header.Type = EFI_HII_PACKAGE_ANIMATIONS.
///
- EFI_HII_PACKAGE_HEADER Header;
+ EFI_HII_PACKAGE_HEADER Header;
///
/// Offset, relative to this header, of the animation information. If
/// this is zero, then there are no animation sequences in the package.
///
- UINT32 AnimationInfoOffset;
+ UINT32 AnimationInfoOffset;
} EFI_HII_ANIMATION_PACKAGE_HDR;
///
@@ -1855,26 +1863,26 @@ typedef struct _EFI_HII_ANIMATION_PACKAGE_HDR {
/// with each block prefixed by a single byte header EFI_HII_ANIMATION_BLOCK.
///
typedef struct _EFI_HII_ANIMATION_BLOCK {
- UINT8 BlockType;
- //UINT8 BlockBody[];
+ UINT8 BlockType;
+ // UINT8 BlockBody[];
} EFI_HII_ANIMATION_BLOCK;
///
/// Animation block types.
///
-#define EFI_HII_AIBT_END 0x00
-#define EFI_HII_AIBT_OVERLAY_IMAGES 0x10
-#define EFI_HII_AIBT_CLEAR_IMAGES 0x11
-#define EFI_HII_AIBT_RESTORE_SCRN 0x12
-#define EFI_HII_AIBT_OVERLAY_IMAGES_LOOP 0x18
-#define EFI_HII_AIBT_CLEAR_IMAGES_LOOP 0x19
-#define EFI_HII_AIBT_RESTORE_SCRN_LOOP 0x1A
-#define EFI_HII_AIBT_DUPLICATE 0x20
-#define EFI_HII_AIBT_SKIP2 0x21
-#define EFI_HII_AIBT_SKIP1 0x22
-#define EFI_HII_AIBT_EXT1 0x30
-#define EFI_HII_AIBT_EXT2 0x31
-#define EFI_HII_AIBT_EXT4 0x32
+#define EFI_HII_AIBT_END 0x00
+#define EFI_HII_AIBT_OVERLAY_IMAGES 0x10
+#define EFI_HII_AIBT_CLEAR_IMAGES 0x11
+#define EFI_HII_AIBT_RESTORE_SCRN 0x12
+#define EFI_HII_AIBT_OVERLAY_IMAGES_LOOP 0x18
+#define EFI_HII_AIBT_CLEAR_IMAGES_LOOP 0x19
+#define EFI_HII_AIBT_RESTORE_SCRN_LOOP 0x1A
+#define EFI_HII_AIBT_DUPLICATE 0x20
+#define EFI_HII_AIBT_SKIP2 0x21
+#define EFI_HII_AIBT_SKIP1 0x22
+#define EFI_HII_AIBT_EXT1 0x30
+#define EFI_HII_AIBT_EXT2 0x31
+#define EFI_HII_AIBT_EXT4 0x32
///
/// Extended block headers used for variable sized animation records
@@ -1885,45 +1893,45 @@ typedef struct _EFI_HII_AIBT_EXT1_BLOCK {
///
/// Standard animation header, where Header.BlockType = EFI_HII_AIBT_EXT1.
///
- EFI_HII_ANIMATION_BLOCK Header;
+ EFI_HII_ANIMATION_BLOCK Header;
///
/// The block type.
///
- UINT8 BlockType2;
+ UINT8 BlockType2;
///
/// Size of the animation block, in bytes, including the animation block header.
///
- UINT8 Length;
+ UINT8 Length;
} EFI_HII_AIBT_EXT1_BLOCK;
typedef struct _EFI_HII_AIBT_EXT2_BLOCK {
///
/// Standard animation header, where Header.BlockType = EFI_HII_AIBT_EXT2.
///
- EFI_HII_ANIMATION_BLOCK Header;
+ EFI_HII_ANIMATION_BLOCK Header;
///
/// The block type
///
- UINT8 BlockType2;
+ UINT8 BlockType2;
///
/// Size of the animation block, in bytes, including the animation block header.
///
- UINT16 Length;
+ UINT16 Length;
} EFI_HII_AIBT_EXT2_BLOCK;
typedef struct _EFI_HII_AIBT_EXT4_BLOCK {
///
/// Standard animation header, where Header.BlockType = EFI_HII_AIBT_EXT4.
///
- EFI_HII_ANIMATION_BLOCK Header;
+ EFI_HII_ANIMATION_BLOCK Header;
///
/// The block type
///
- UINT8 BlockType2;
+ UINT8 BlockType2;
///
/// Size of the animation block, in bytes, including the animation block header.
///
- UINT32 Length;
+ UINT32 Length;
} EFI_HII_AIBT_EXT4_BLOCK;
typedef struct _EFI_HII_ANIMATION_CELL {
@@ -1931,23 +1939,23 @@ typedef struct _EFI_HII_ANIMATION_CELL {
/// The X offset from the upper left hand corner of the logical
/// window to position the indexed image.
///
- UINT16 OffsetX;
+ UINT16 OffsetX;
///
/// The Y offset from the upper left hand corner of the logical
/// window to position the indexed image.
///
- UINT16 OffsetY;
+ UINT16 OffsetY;
///
/// The image to display at the specified offset from the upper left
/// hand corner of the logical window.
///
- EFI_IMAGE_ID ImageId;
+ EFI_IMAGE_ID ImageId;
///
/// The number of milliseconds to delay after displaying the indexed
/// image and before continuing on to the next linked image. If value
/// is zero, no delay.
///
- UINT16 Delay;
+ UINT16 Delay;
} EFI_HII_ANIMATION_CELL;
///
@@ -1963,24 +1971,24 @@ typedef struct _EFI_HII_AIBT_OVERLAY_IMAGES_BLOCK {
/// image that can be displayed alone. If the value is zero, no image
/// is displayed.
///
- EFI_IMAGE_ID DftImageId;
+ EFI_IMAGE_ID DftImageId;
///
/// The overall width of the set of images (logical window width).
///
- UINT16 Width;
+ UINT16 Width;
///
/// The overall height of the set of images (logical window height).
///
- UINT16 Height;
+ UINT16 Height;
///
/// The number of EFI_HII_ANIMATION_CELL contained in the
/// animation sequence.
///
- UINT16 CellCount;
+ UINT16 CellCount;
///
/// An array of CellCount animation cells.
///
- EFI_HII_ANIMATION_CELL AnimationCell[1];
+ EFI_HII_ANIMATION_CELL AnimationCell[1];
} EFI_HII_AIBT_OVERLAY_IMAGES_BLOCK;
///
@@ -1997,29 +2005,29 @@ typedef struct _EFI_HII_AIBT_CLEAR_IMAGES_BLOCK {
/// image that can be displayed alone. If the value is zero, no image
/// is displayed.
///
- EFI_IMAGE_ID DftImageId;
+ EFI_IMAGE_ID DftImageId;
///
/// The overall width of the set of images (logical window width).
///
- UINT16 Width;
+ UINT16 Width;
///
/// The overall height of the set of images (logical window height).
///
- UINT16 Height;
+ UINT16 Height;
///
/// The number of EFI_HII_ANIMATION_CELL contained in the
/// animation sequence.
///
- UINT16 CellCount;
+ UINT16 CellCount;
///
/// The color to clear the logical window to before displaying the
/// indexed image.
///
- EFI_HII_RGB_PIXEL BackgndColor;
+ EFI_HII_RGB_PIXEL BackgndColor;
///
/// An array of CellCount animation cells.
///
- EFI_HII_ANIMATION_CELL AnimationCell[1];
+ EFI_HII_ANIMATION_CELL AnimationCell[1];
} EFI_HII_AIBT_CLEAR_IMAGES_BLOCK;
///
@@ -2036,45 +2044,45 @@ typedef struct _EFI_HII_AIBT_RESTORE_SCRN_BLOCK {
/// image that can be displayed alone. If the value is zero, no image
/// is displayed.
///
- EFI_IMAGE_ID DftImageId;
+ EFI_IMAGE_ID DftImageId;
///
/// The overall width of the set of images (logical window width).
///
- UINT16 Width;
+ UINT16 Width;
///
/// The overall height of the set of images (logical window height).
///
- UINT16 Height;
+ UINT16 Height;
///
/// The number of EFI_HII_ANIMATION_CELL contained in the
/// animation sequence.
///
- UINT16 CellCount;
+ UINT16 CellCount;
///
/// An array of CellCount animation cells.
///
- EFI_HII_ANIMATION_CELL AnimationCell[1];
+ EFI_HII_ANIMATION_CELL AnimationCell[1];
} EFI_HII_AIBT_RESTORE_SCRN_BLOCK;
///
/// An animation block to describe an animation sequence that continuously cycles,
/// and where one image is simply displayed over the previous image.
///
-typedef EFI_HII_AIBT_OVERLAY_IMAGES_BLOCK EFI_HII_AIBT_OVERLAY_IMAGES_LOOP_BLOCK;
+typedef EFI_HII_AIBT_OVERLAY_IMAGES_BLOCK EFI_HII_AIBT_OVERLAY_IMAGES_LOOP_BLOCK;
///
/// An animation block to describe an animation sequence that continuously cycles,
/// and where the logical window is cleared to the specified color before
/// the next image is displayed.
///
-typedef EFI_HII_AIBT_CLEAR_IMAGES_BLOCK EFI_HII_AIBT_CLEAR_IMAGES_LOOP_BLOCK;
+typedef EFI_HII_AIBT_CLEAR_IMAGES_BLOCK EFI_HII_AIBT_CLEAR_IMAGES_LOOP_BLOCK;
///
/// An animation block to describe an animation sequence that continuously cycles,
/// and where the screen is restored to the original state before
/// the next image is displayed.
///
-typedef EFI_HII_AIBT_RESTORE_SCRN_BLOCK EFI_HII_AIBT_RESTORE_SCRN_LOOP_BLOCK;
+typedef EFI_HII_AIBT_RESTORE_SCRN_BLOCK EFI_HII_AIBT_RESTORE_SCRN_LOOP_BLOCK;
///
/// Assigns a new character value to a previously defined animation sequence.
@@ -2084,7 +2092,7 @@ typedef struct _EFI_HII_AIBT_DUPLICATE_BLOCK {
/// The previously defined animation ID with the exact same
/// animation information.
///
- EFI_ANIMATION_ID AnimationId;
+ EFI_ANIMATION_ID AnimationId;
} EFI_HII_AIBT_DUPLICATE_BLOCK;
///
@@ -2094,7 +2102,7 @@ typedef struct _EFI_HII_AIBT_SKIP1_BLOCK {
///
/// The unsigned 8-bit value to add to AnimationIdCurrent.
///
- UINT8 SkipCount;
+ UINT8 SkipCount;
} EFI_HII_AIBT_SKIP1_BLOCK;
///
@@ -2104,13 +2112,11 @@ typedef struct _EFI_HII_AIBT_SKIP2_BLOCK {
///
/// The unsigned 16-bit value to add to AnimationIdCurrent.
///
- UINT16 SkipCount;
+ UINT16 SkipCount;
} EFI_HII_AIBT_SKIP2_BLOCK;
#pragma pack()
-
-
///
/// References to string tokens must use this macro to enable scanning for
/// token usages.
@@ -2119,12 +2125,12 @@ typedef struct _EFI_HII_AIBT_SKIP2_BLOCK {
/// STRING_TOKEN is not defined in UEFI specification. But it is placed
/// here for the easy access by C files and VFR source files.
///
-#define STRING_TOKEN(t) t
+#define STRING_TOKEN(t) t
///
/// IMAGE_TOKEN is not defined in UEFI specification. But it is placed
/// here for the easy access by C files and VFR source files.
///
-#define IMAGE_TOKEN(t) t
+#define IMAGE_TOKEN(t) t
#endif
diff --git a/sys/contrib/edk2/Include/Uefi/UefiMultiPhase.h b/sys/contrib/edk2/Include/Uefi/UefiMultiPhase.h
index dd97e4e3bfe4..6e3ae7ad541c 100644
--- a/sys/contrib/edk2/Include/Uefi/UefiMultiPhase.h
+++ b/sys/contrib/edk2/Include/Uefi/UefiMultiPhase.h
@@ -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.
///
@@ -103,7 +103,27 @@ typedef enum {
/// however it happens to also support byte-addressable non-volatility.
///
EfiPersistentMemory,
- EfiMaxMemoryType
+ ///
+ /// A memory region that describes system memory that has not been accepted
+ /// by a corresponding call to the underlying isolation architecture.
+ ///
+ EfiUnacceptedMemoryType,
+ EfiMaxMemoryType,
+ //
+ // +---------------------------------------------------+
+ // | 0..(EfiMaxMemoryType - 1) - Normal memory type |
+ // +---------------------------------------------------+
+ // | EfiMaxMemoryType..0x6FFFFFFF - Invalid |
+ // +---------------------------------------------------+
+ // | 0x70000000..0x7FFFFFFF - OEM reserved |
+ // +---------------------------------------------------+
+ // | 0x80000000..0xFFFFFFFF - OS reserved |
+ // +---------------------------------------------------+
+ //
+ MEMORY_TYPE_OEM_RESERVED_MIN = 0x70000000,
+ MEMORY_TYPE_OEM_RESERVED_MAX = 0x7FFFFFFF,
+ MEMORY_TYPE_OS_RESERVED_MIN = 0x80000000,
+ MEMORY_TYPE_OS_RESERVED_MAX = 0xFFFFFFFF
} EFI_MEMORY_TYPE;
///
@@ -148,27 +168,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 +213,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 +222,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 +238,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
diff --git a/sys/contrib/edk2/Include/Uefi/UefiPxe.h b/sys/contrib/edk2/Include/Uefi/UefiPxe.h
index 6b92b3e44e4b..f55f16aa31ef 100644
--- a/sys/contrib/edk2/Include/Uefi/UefiPxe.h
+++ b/sys/contrib/edk2/Include/Uefi/UefiPxe.h
@@ -26,15 +26,15 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
///
/// UNDI ROM ID and devive ID signature.
///
-#define PXE_BUSTYPE_PXE PXE_BUSTYPE ('!', 'P', 'X', 'E')
+#define PXE_BUSTYPE_PXE PXE_BUSTYPE ('!', 'P', 'X', 'E')
///
/// BUS ROM ID signatures.
///
-#define PXE_BUSTYPE_PCI PXE_BUSTYPE ('P', 'C', 'I', 'R')
-#define PXE_BUSTYPE_PC_CARD PXE_BUSTYPE ('P', 'C', 'C', 'R')
-#define PXE_BUSTYPE_USB PXE_BUSTYPE ('U', 'S', 'B', 'R')
-#define PXE_BUSTYPE_1394 PXE_BUSTYPE ('1', '3', '9', '4')
+#define PXE_BUSTYPE_PCI PXE_BUSTYPE ('P', 'C', 'I', 'R')
+#define PXE_BUSTYPE_PC_CARD PXE_BUSTYPE ('P', 'C', 'C', 'R')
+#define PXE_BUSTYPE_USB PXE_BUSTYPE ('U', 'S', 'B', 'R')
+#define PXE_BUSTYPE_1394 PXE_BUSTYPE ('1', '3', '9', '4')
#define PXE_SWAP_UINT16(n) ((((PXE_UINT16) (n) & 0x00FF) << 8) | (((PXE_UINT16) (n) & 0xFF00) >> 8))
@@ -54,31 +54,30 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
(((PXE_UINT64)(n) & 0x00FF000000000000ULL) >> 40) | \
(((PXE_UINT64)(n) & 0xFF00000000000000ULL) >> 56))
-
#define PXE_CPBSIZE_NOT_USED 0 ///< zero
#define PXE_DBSIZE_NOT_USED 0 ///< zero
#define PXE_CPBADDR_NOT_USED (PXE_UINT64) 0 ///< zero
#define PXE_DBADDR_NOT_USED (PXE_UINT64) 0 ///< zero
#define PXE_CONST CONST
-#define PXE_VOLATILE volatile
+#define PXE_VOLATILE volatile
-typedef VOID PXE_VOID;
-typedef UINT8 PXE_UINT8;
-typedef UINT16 PXE_UINT16;
-typedef UINT32 PXE_UINT32;
-typedef UINTN PXE_UINTN;
+typedef VOID PXE_VOID;
+typedef UINT8 PXE_UINT8;
+typedef UINT16 PXE_UINT16;
+typedef UINT32 PXE_UINT32;
+typedef UINTN PXE_UINTN;
///
/// Typedef unsigned long PXE_UINT64.
///
-typedef UINT64 PXE_UINT64;
+typedef UINT64 PXE_UINT64;
typedef PXE_UINT8 PXE_BOOL;
-#define PXE_FALSE 0 ///< zero
-#define PXE_TRUE (!PXE_FALSE)
+#define PXE_FALSE 0 ///< zero
+#define PXE_TRUE (!PXE_FALSE)
-typedef PXE_UINT16 PXE_OPCODE;
+typedef PXE_UINT16 PXE_OPCODE;
///
/// Return UNDI operational state.
@@ -93,7 +92,7 @@ typedef PXE_UINT16 PXE_OPCODE;
///
/// Change UNDI operational state from Started to Stopped.
///
-#define PXE_OPCODE_STOP 0x0002
+#define PXE_OPCODE_STOP 0x0002
///
/// Get UNDI initialization information.
@@ -108,7 +107,7 @@ typedef PXE_UINT16 PXE_OPCODE;
///
/// Changed UNDI operational state from Started to Initialized.
///
-#define PXE_OPCODE_INITIALIZE 0x0005
+#define PXE_OPCODE_INITIALIZE 0x0005
///
/// Re-initialize the NIC H/W.
@@ -118,7 +117,7 @@ typedef PXE_UINT16 PXE_OPCODE;
///
/// Change the UNDI operational state from Initialized to Started.
///
-#define PXE_OPCODE_SHUTDOWN 0x0007
+#define PXE_OPCODE_SHUTDOWN 0x0007
///
/// Read & change state of external interrupt enables.
@@ -138,7 +137,7 @@ typedef PXE_UINT16 PXE_OPCODE;
///
/// Read traffic statistics.
///
-#define PXE_OPCODE_STATISTICS 0x000B
+#define PXE_OPCODE_STATISTICS 0x000B
///
/// Convert multicast IP address to multicast MAC address.
@@ -148,12 +147,12 @@ typedef PXE_UINT16 PXE_OPCODE;
///
/// Read or change non-volatile storage on the NIC.
///
-#define PXE_OPCODE_NVDATA 0x000D
+#define PXE_OPCODE_NVDATA 0x000D
///
/// Get & clear interrupt status.
///
-#define PXE_OPCODE_GET_STATUS 0x000E
+#define PXE_OPCODE_GET_STATUS 0x000E
///
/// Fill media header in packet for transmit.
@@ -163,7 +162,7 @@ typedef PXE_UINT16 PXE_OPCODE;
///
/// Transmit packet(s).
///
-#define PXE_OPCODE_TRANSMIT 0x0010
+#define PXE_OPCODE_TRANSMIT 0x0010
///
/// Receive packet.
@@ -173,9 +172,9 @@ typedef PXE_UINT16 PXE_OPCODE;
///
/// Last valid PXE UNDI OpCode number.
///
-#define PXE_OPCODE_LAST_VALID 0x0011
+#define PXE_OPCODE_LAST_VALID 0x0011
-typedef PXE_UINT16 PXE_OPFLAGS;
+typedef PXE_UINT16 PXE_OPFLAGS;
#define PXE_OPFLAGS_NOT_USED 0x0000
@@ -231,16 +230,16 @@ typedef PXE_UINT16 PXE_OPFLAGS;
/// Select whether to enable or disable external interrupt signals.
/// Setting both enable and disable will return PXE_STATCODE_INVALID_OPFLAGS.
///
-#define PXE_OPFLAGS_INTERRUPT_OPMASK 0xC000
-#define PXE_OPFLAGS_INTERRUPT_ENABLE 0x8000
-#define PXE_OPFLAGS_INTERRUPT_DISABLE 0x4000
-#define PXE_OPFLAGS_INTERRUPT_READ 0x0000
+#define PXE_OPFLAGS_INTERRUPT_OPMASK 0xC000
+#define PXE_OPFLAGS_INTERRUPT_ENABLE 0x8000
+#define PXE_OPFLAGS_INTERRUPT_DISABLE 0x4000
+#define PXE_OPFLAGS_INTERRUPT_READ 0x0000
///
/// Enable receive interrupts. An external interrupt will be generated
/// after a complete non-error packet has been received.
///
-#define PXE_OPFLAGS_INTERRUPT_RECEIVE 0x0001
+#define PXE_OPFLAGS_INTERRUPT_RECEIVE 0x0001
///
/// Enable transmit interrupts. An external interrupt will be generated
@@ -252,7 +251,7 @@ typedef PXE_UINT16 PXE_OPFLAGS;
/// Enable command interrupts. An external interrupt will be generated
/// when command execution stops.
///
-#define PXE_OPFLAGS_INTERRUPT_COMMAND 0x0004
+#define PXE_OPFLAGS_INTERRUPT_COMMAND 0x0004
///
/// Generate software interrupt. Setting this bit generates an external
@@ -276,7 +275,7 @@ typedef PXE_UINT16 PXE_OPFLAGS;
/// To reset the contents of the multicast MAC address filter list,
/// set this OpFlag:
///
-#define PXE_OPFLAGS_RECEIVE_FILTER_RESET_MCAST_LIST 0x2000
+#define PXE_OPFLAGS_RECEIVE_FILTER_RESET_MCAST_LIST 0x2000
///
/// Enable unicast packet receiving. Packets sent to the current station
@@ -295,7 +294,7 @@ typedef PXE_UINT16 PXE_OPFLAGS;
/// of the multicast MAC addresses in the multicast MAC address filter
/// list will be received. If the filter list is empty, no multicast
///
-#define PXE_OPFLAGS_RECEIVE_FILTER_FILTERED_MULTICAST 0x0004
+#define PXE_OPFLAGS_RECEIVE_FILTER_FILTERED_MULTICAST 0x0004
///
/// Enable promiscuous packet receiving. All packets will be received.
@@ -337,9 +336,9 @@ typedef PXE_UINT16 PXE_OPFLAGS;
///
/// Select the type of non-volatile data operation.
///
-#define PXE_OPFLAGS_NVDATA_OPMASK 0x0001
-#define PXE_OPFLAGS_NVDATA_READ 0x0000
-#define PXE_OPFLAGS_NVDATA_WRITE 0x0001
+#define PXE_OPFLAGS_NVDATA_OPMASK 0x0001
+#define PXE_OPFLAGS_NVDATA_READ 0x0000
+#define PXE_OPFLAGS_NVDATA_WRITE 0x0001
///
/// UNDI Get Status.
@@ -360,12 +359,12 @@ typedef PXE_UINT16 PXE_OPFLAGS;
/// buffers. Do not plan on getting one buffer per interrupt. Some
/// NICs and UNDIs may transmit multiple buffers per interrupt.
///
-#define PXE_OPFLAGS_GET_TRANSMITTED_BUFFERS 0x0002
+#define PXE_OPFLAGS_GET_TRANSMITTED_BUFFERS 0x0002
///
/// Return current media status.
///
-#define PXE_OPFLAGS_GET_MEDIA_STATUS 0x0004
+#define PXE_OPFLAGS_GET_MEDIA_STATUS 0x0004
///
/// UNDI Fill Header.
@@ -386,9 +385,9 @@ typedef PXE_UINT16 PXE_OPFLAGS;
#define PXE_OPFLAGS_TRANSMIT_BLOCK 0x0001
#define PXE_OPFLAGS_TRANSMIT_DONT_BLOCK 0x0000
-#define PXE_OPFLAGS_TRANSMIT_OPMASK 0x0002
-#define PXE_OPFLAGS_TRANSMIT_FRAGMENTED 0x0002
-#define PXE_OPFLAGS_TRANSMIT_WHOLE 0x0000
+#define PXE_OPFLAGS_TRANSMIT_OPMASK 0x0002
+#define PXE_OPFLAGS_TRANSMIT_FRAGMENTED 0x0002
+#define PXE_OPFLAGS_TRANSMIT_WHOLE 0x0000
///
/// UNDI Receive.
@@ -399,7 +398,7 @@ typedef PXE_UINT16 PXE_OPFLAGS;
///
/// PXE STATFLAGS.
///
-typedef PXE_UINT16 PXE_STATFLAGS;
+typedef PXE_UINT16 PXE_STATFLAGS;
#define PXE_STATFLAGS_INITIALIZE 0x0000
@@ -419,10 +418,10 @@ typedef PXE_UINT16 PXE_STATFLAGS;
///
/// UNDI Get State.
///
-#define PXE_STATFLAGS_GET_STATE_MASK 0x0003
-#define PXE_STATFLAGS_GET_STATE_INITIALIZED 0x0002
-#define PXE_STATFLAGS_GET_STATE_STARTED 0x0001
-#define PXE_STATFLAGS_GET_STATE_STOPPED 0x0000
+#define PXE_STATFLAGS_GET_STATE_MASK 0x0003
+#define PXE_STATFLAGS_GET_STATE_INITIALIZED 0x0002
+#define PXE_STATFLAGS_GET_STATE_STARTED 0x0001
+#define PXE_STATFLAGS_GET_STATE_STOPPED 0x0000
///
/// UNDI Start.
@@ -462,7 +461,7 @@ typedef PXE_UINT16 PXE_STATFLAGS;
///
/// If set, receive interrupts are enabled.
///
-#define PXE_STATFLAGS_INTERRUPT_RECEIVE 0x0001
+#define PXE_STATFLAGS_INTERRUPT_RECEIVE 0x0001
///
/// If set, transmit interrupts are enabled.
@@ -472,7 +471,7 @@ typedef PXE_UINT16 PXE_STATFLAGS;
///
/// If set, command interrupts are enabled.
///
-#define PXE_STATFLAGS_INTERRUPT_COMMAND 0x0004
+#define PXE_STATFLAGS_INTERRUPT_COMMAND 0x0004
///
/// UNDI Receive Filters.
@@ -492,7 +491,7 @@ typedef PXE_UINT16 PXE_STATFLAGS;
/// If set, multicast packets that match up with the multicast address
/// filter list will be received.
///
-#define PXE_STATFLAGS_RECEIVE_FILTER_FILTERED_MULTICAST 0x0004
+#define PXE_STATFLAGS_RECEIVE_FILTER_FILTERED_MULTICAST 0x0004
///
/// If set, all packets will be received.
@@ -534,8 +533,8 @@ typedef PXE_UINT16 PXE_STATFLAGS;
///
/// Use to determine if an interrupt has occurred.
///
-#define PXE_STATFLAGS_GET_STATUS_INTERRUPT_MASK 0x000F
-#define PXE_STATFLAGS_GET_STATUS_NO_INTERRUPTS 0x0000
+#define PXE_STATFLAGS_GET_STATUS_INTERRUPT_MASK 0x000F
+#define PXE_STATFLAGS_GET_STATUS_NO_INTERRUPTS 0x0000
///
/// If set, at least one receive interrupt occurred.
@@ -545,7 +544,7 @@ typedef PXE_UINT16 PXE_STATFLAGS;
///
/// If set, at least one transmit interrupt occurred.
///
-#define PXE_STATFLAGS_GET_STATUS_TRANSMIT 0x0002
+#define PXE_STATFLAGS_GET_STATUS_TRANSMIT 0x0002
///
/// If set, at least one command interrupt occurred.
@@ -555,7 +554,7 @@ typedef PXE_UINT16 PXE_STATFLAGS;
///
/// If set, at least one software interrupt occurred.
///
-#define PXE_STATFLAGS_GET_STATUS_SOFTWARE 0x0008
+#define PXE_STATFLAGS_GET_STATUS_SOFTWARE 0x0008
///
/// This flag is set if the transmitted buffer queue is empty. This flag
@@ -587,20 +586,20 @@ typedef PXE_UINT16 PXE_STATFLAGS;
///
/// UNDI Receive
-///.
+/// .
///
/// No additional StatFlags.
///
-typedef PXE_UINT16 PXE_STATCODE;
+typedef PXE_UINT16 PXE_STATCODE;
-#define PXE_STATCODE_INITIALIZE 0x0000
+#define PXE_STATCODE_INITIALIZE 0x0000
///
/// Common StatCodes returned by all UNDI commands, UNDI protocol functions
/// and BC protocol functions.
///
-#define PXE_STATCODE_SUCCESS 0x0000
+#define PXE_STATCODE_SUCCESS 0x0000
#define PXE_STATCODE_INVALID_CDB 0x0001
#define PXE_STATCODE_INVALID_CPB 0x0002
@@ -622,20 +621,20 @@ typedef PXE_UINT16 PXE_STATCODE;
#define PXE_STATCODE_NOT_ENOUGH_MEMORY 0x0012
#define PXE_STATCODE_NO_DATA 0x0013
-typedef PXE_UINT16 PXE_IFNUM;
+typedef PXE_UINT16 PXE_IFNUM;
///
/// This interface number must be passed to the S/W UNDI Start command.
///
-#define PXE_IFNUM_START 0x0000
+#define PXE_IFNUM_START 0x0000
///
/// This interface number is returned by the S/W UNDI Get State and
/// Start commands if information in the CDB, CPB or DB is invalid.
///
-#define PXE_IFNUM_INVALID 0x0000
+#define PXE_IFNUM_INVALID 0x0000
-typedef PXE_UINT16 PXE_CONTROL;
+typedef PXE_UINT16 PXE_CONTROL;
///
/// Setting this flag directs the UNDI to queue this command for later
@@ -644,7 +643,7 @@ typedef PXE_UINT16 PXE_CONTROL;
/// is returned. If the queue is full, a PXE_STATCODE_CDB_QUEUE_FULL
/// error is returned.
///
-#define PXE_CONTROL_QUEUE_IF_BUSY 0x0002
+#define PXE_CONTROL_QUEUE_IF_BUSY 0x0002
///
/// These two bit values are used to determine if there are more UNDI
@@ -656,26 +655,26 @@ typedef PXE_UINT16 PXE_CONTROL;
#define PXE_CONTROL_LINK 0x0001
#define PXE_CONTROL_LAST_CDB_IN_LIST 0x0000
-typedef PXE_UINT8 PXE_FRAME_TYPE;
+typedef PXE_UINT8 PXE_FRAME_TYPE;
-#define PXE_FRAME_TYPE_NONE 0x00
-#define PXE_FRAME_TYPE_UNICAST 0x01
-#define PXE_FRAME_TYPE_BROADCAST 0x02
-#define PXE_FRAME_TYPE_FILTERED_MULTICAST 0x03
-#define PXE_FRAME_TYPE_PROMISCUOUS 0x04
-#define PXE_FRAME_TYPE_PROMISCUOUS_MULTICAST 0x05
+#define PXE_FRAME_TYPE_NONE 0x00
+#define PXE_FRAME_TYPE_UNICAST 0x01
+#define PXE_FRAME_TYPE_BROADCAST 0x02
+#define PXE_FRAME_TYPE_FILTERED_MULTICAST 0x03
+#define PXE_FRAME_TYPE_PROMISCUOUS 0x04
+#define PXE_FRAME_TYPE_PROMISCUOUS_MULTICAST 0x05
-#define PXE_FRAME_TYPE_MULTICAST PXE_FRAME_TYPE_FILTERED_MULTICAST
+#define PXE_FRAME_TYPE_MULTICAST PXE_FRAME_TYPE_FILTERED_MULTICAST
-typedef PXE_UINT32 PXE_IPV4;
+typedef PXE_UINT32 PXE_IPV4;
-typedef PXE_UINT32 PXE_IPV6[4];
+typedef PXE_UINT32 PXE_IPV6[4];
#define PXE_MAC_LENGTH 32
-typedef PXE_UINT8 PXE_MAC_ADDR[PXE_MAC_LENGTH];
+typedef PXE_UINT8 PXE_MAC_ADDR[PXE_MAC_LENGTH];
-typedef PXE_UINT8 PXE_IFTYPE;
-typedef UINT16 PXE_MEDIA_PROTOCOL;
+typedef PXE_UINT8 PXE_IFTYPE;
+typedef UINT16 PXE_MEDIA_PROTOCOL;
///
/// This information is from the ARP section of RFC 1700.
@@ -709,16 +708,16 @@ typedef UINT16 PXE_MEDIA_PROTOCOL;
#define PXE_IFTYPE_FIBRE_CHANNEL 0x12
typedef struct s_pxe_hw_undi {
- PXE_UINT32 Signature; ///< PXE_ROMID_SIGNATURE.
- PXE_UINT8 Len; ///< sizeof(PXE_HW_UNDI).
- PXE_UINT8 Fudge; ///< makes 8-bit cksum equal zero.
- PXE_UINT8 Rev; ///< PXE_ROMID_REV.
- PXE_UINT8 IFcnt; ///< physical connector count lower byte.
- PXE_UINT8 MajorVer; ///< PXE_ROMID_MAJORVER.
- PXE_UINT8 MinorVer; ///< PXE_ROMID_MINORVER.
- PXE_UINT8 IFcntExt; ///< physical connector count upper byte.
- PXE_UINT8 reserved; ///< zero, not used.
- PXE_UINT32 Implementation; ///< implementation flags.
+ PXE_UINT32 Signature; ///< PXE_ROMID_SIGNATURE.
+ PXE_UINT8 Len; ///< sizeof(PXE_HW_UNDI).
+ PXE_UINT8 Fudge; ///< makes 8-bit cksum equal zero.
+ PXE_UINT8 Rev; ///< PXE_ROMID_REV.
+ PXE_UINT8 IFcnt; ///< physical connector count lower byte.
+ PXE_UINT8 MajorVer; ///< PXE_ROMID_MAJORVER.
+ PXE_UINT8 MinorVer; ///< PXE_ROMID_MINORVER.
+ PXE_UINT8 IFcntExt; ///< physical connector count upper byte.
+ PXE_UINT8 reserved; ///< zero, not used.
+ PXE_UINT32 Implementation; ///< implementation flags.
///< reserved ///< vendor use.
///< UINT32 Status; ///< status port.
///< UINT32 Command; ///< command port.
@@ -742,32 +741,32 @@ typedef struct s_pxe_hw_undi {
///
/// If set, last command failed.
///
-#define PXE_HWSTAT_COMMAND_FAILED 0x20000000
+#define PXE_HWSTAT_COMMAND_FAILED 0x20000000
///
/// If set, identifies enabled receive filters.
///
-#define PXE_HWSTAT_PROMISCUOUS_MULTICAST_RX_ENABLED 0x00001000
-#define PXE_HWSTAT_PROMISCUOUS_RX_ENABLED 0x00000800
-#define PXE_HWSTAT_BROADCAST_RX_ENABLED 0x00000400
-#define PXE_HWSTAT_MULTICAST_RX_ENABLED 0x00000200
-#define PXE_HWSTAT_UNICAST_RX_ENABLED 0x00000100
+#define PXE_HWSTAT_PROMISCUOUS_MULTICAST_RX_ENABLED 0x00001000
+#define PXE_HWSTAT_PROMISCUOUS_RX_ENABLED 0x00000800
+#define PXE_HWSTAT_BROADCAST_RX_ENABLED 0x00000400
+#define PXE_HWSTAT_MULTICAST_RX_ENABLED 0x00000200
+#define PXE_HWSTAT_UNICAST_RX_ENABLED 0x00000100
///
/// If set, identifies enabled external interrupts.
///
-#define PXE_HWSTAT_SOFTWARE_INT_ENABLED 0x00000080
-#define PXE_HWSTAT_TX_COMPLETE_INT_ENABLED 0x00000040
-#define PXE_HWSTAT_PACKET_RX_INT_ENABLED 0x00000020
-#define PXE_HWSTAT_CMD_COMPLETE_INT_ENABLED 0x00000010
+#define PXE_HWSTAT_SOFTWARE_INT_ENABLED 0x00000080
+#define PXE_HWSTAT_TX_COMPLETE_INT_ENABLED 0x00000040
+#define PXE_HWSTAT_PACKET_RX_INT_ENABLED 0x00000020
+#define PXE_HWSTAT_CMD_COMPLETE_INT_ENABLED 0x00000010
///
/// If set, identifies pending interrupts.
///
-#define PXE_HWSTAT_SOFTWARE_INT_PENDING 0x00000008
-#define PXE_HWSTAT_TX_COMPLETE_INT_PENDING 0x00000004
-#define PXE_HWSTAT_PACKET_RX_INT_PENDING 0x00000002
-#define PXE_HWSTAT_CMD_COMPLETE_INT_PENDING 0x00000001
+#define PXE_HWSTAT_SOFTWARE_INT_PENDING 0x00000008
+#define PXE_HWSTAT_TX_COMPLETE_INT_PENDING 0x00000004
+#define PXE_HWSTAT_PACKET_RX_INT_PENDING 0x00000002
+#define PXE_HWSTAT_CMD_COMPLETE_INT_PENDING 0x00000001
///
/// Command port definitions.
@@ -783,19 +782,19 @@ typedef struct s_pxe_hw_undi {
///
/// Use these to enable/disable receive filters.
///
-#define PXE_HWCMD_PROMISCUOUS_MULTICAST_RX_ENABLE 0x00001000
-#define PXE_HWCMD_PROMISCUOUS_RX_ENABLE 0x00000800
-#define PXE_HWCMD_BROADCAST_RX_ENABLE 0x00000400
-#define PXE_HWCMD_MULTICAST_RX_ENABLE 0x00000200
-#define PXE_HWCMD_UNICAST_RX_ENABLE 0x00000100
+#define PXE_HWCMD_PROMISCUOUS_MULTICAST_RX_ENABLE 0x00001000
+#define PXE_HWCMD_PROMISCUOUS_RX_ENABLE 0x00000800
+#define PXE_HWCMD_BROADCAST_RX_ENABLE 0x00000400
+#define PXE_HWCMD_MULTICAST_RX_ENABLE 0x00000200
+#define PXE_HWCMD_UNICAST_RX_ENABLE 0x00000100
///
/// Use these to enable/disable external interrupts.
///
-#define PXE_HWCMD_SOFTWARE_INT_ENABLE 0x00000080
-#define PXE_HWCMD_TX_COMPLETE_INT_ENABLE 0x00000040
-#define PXE_HWCMD_PACKET_RX_INT_ENABLE 0x00000020
-#define PXE_HWCMD_CMD_COMPLETE_INT_ENABLE 0x00000010
+#define PXE_HWCMD_SOFTWARE_INT_ENABLE 0x00000080
+#define PXE_HWCMD_TX_COMPLETE_INT_ENABLE 0x00000040
+#define PXE_HWCMD_PACKET_RX_INT_ENABLE 0x00000020
+#define PXE_HWCMD_CMD_COMPLETE_INT_ENABLE 0x00000010
///
/// Use these to clear pending external interrupts.
@@ -806,44 +805,44 @@ typedef struct s_pxe_hw_undi {
#define PXE_HWCMD_CLEAR_CMD_COMPLETE_INT 0x00000001
typedef struct s_pxe_sw_undi {
- PXE_UINT32 Signature; ///< PXE_ROMID_SIGNATURE.
- PXE_UINT8 Len; ///< sizeof(PXE_SW_UNDI).
- PXE_UINT8 Fudge; ///< makes 8-bit cksum zero.
- PXE_UINT8 Rev; ///< PXE_ROMID_REV.
- PXE_UINT8 IFcnt; ///< physical connector count lower byte.
- PXE_UINT8 MajorVer; ///< PXE_ROMID_MAJORVER.
- PXE_UINT8 MinorVer; ///< PXE_ROMID_MINORVER.
- PXE_UINT8 IFcntExt; ///< physical connector count upper byte.
- PXE_UINT8 reserved1; ///< zero, not used.
- PXE_UINT32 Implementation; ///< Implementation flags.
- PXE_UINT64 EntryPoint; ///< API entry point.
- PXE_UINT8 reserved2[3]; ///< zero, not used.
- PXE_UINT8 BusCnt; ///< number of bustypes supported.
- PXE_UINT32 BusType[1]; ///< list of supported bustypes.
+ PXE_UINT32 Signature; ///< PXE_ROMID_SIGNATURE.
+ PXE_UINT8 Len; ///< sizeof(PXE_SW_UNDI).
+ PXE_UINT8 Fudge; ///< makes 8-bit cksum zero.
+ PXE_UINT8 Rev; ///< PXE_ROMID_REV.
+ PXE_UINT8 IFcnt; ///< physical connector count lower byte.
+ PXE_UINT8 MajorVer; ///< PXE_ROMID_MAJORVER.
+ PXE_UINT8 MinorVer; ///< PXE_ROMID_MINORVER.
+ PXE_UINT8 IFcntExt; ///< physical connector count upper byte.
+ PXE_UINT8 reserved1; ///< zero, not used.
+ PXE_UINT32 Implementation; ///< Implementation flags.
+ PXE_UINT64 EntryPoint; ///< API entry point.
+ PXE_UINT8 reserved2[3]; ///< zero, not used.
+ PXE_UINT8 BusCnt; ///< number of bustypes supported.
+ PXE_UINT32 BusType[1]; ///< list of supported bustypes.
} PXE_SW_UNDI;
typedef union u_pxe_undi {
- PXE_HW_UNDI hw;
- PXE_SW_UNDI sw;
+ PXE_HW_UNDI hw;
+ PXE_SW_UNDI sw;
} PXE_UNDI;
///
/// Signature of !PXE structure.
///
-#define PXE_ROMID_SIGNATURE PXE_BUSTYPE ('!', 'P', 'X', 'E')
+#define PXE_ROMID_SIGNATURE PXE_BUSTYPE ('!', 'P', 'X', 'E')
///
/// !PXE structure format revision
-///.
-#define PXE_ROMID_REV 0x02
+/// .
+#define PXE_ROMID_REV 0x02
///
/// UNDI command interface revision. These are the values that get sent
/// in option 94 (Client Network Interface Identifier) in the DHCP Discover
/// and PXE Boot Server Request packets.
///
-#define PXE_ROMID_MAJORVER 0x03
-#define PXE_ROMID_MINORVER 0x01
+#define PXE_ROMID_MAJORVER 0x03
+#define PXE_ROMID_MINORVER 0x01
///
/// Implementation flags.
@@ -872,21 +871,21 @@ typedef union u_pxe_undi {
#define PXE_ROMID_IMP_CMD_COMPLETE_INT_SUPPORTED 0x00000001
typedef struct s_pxe_cdb {
- PXE_OPCODE OpCode;
- PXE_OPFLAGS OpFlags;
- PXE_UINT16 CPBsize;
- PXE_UINT16 DBsize;
- PXE_UINT64 CPBaddr;
- PXE_UINT64 DBaddr;
- PXE_STATCODE StatCode;
- PXE_STATFLAGS StatFlags;
- PXE_UINT16 IFnum;
- PXE_CONTROL Control;
+ PXE_OPCODE OpCode;
+ PXE_OPFLAGS OpFlags;
+ PXE_UINT16 CPBsize;
+ PXE_UINT16 DBsize;
+ PXE_UINT64 CPBaddr;
+ PXE_UINT64 DBaddr;
+ PXE_STATCODE StatCode;
+ PXE_STATFLAGS StatFlags;
+ PXE_UINT16 IFnum;
+ PXE_CONTROL Control;
} PXE_CDB;
typedef union u_pxe_ip_addr {
- PXE_IPV6 IPv6;
- PXE_IPV4 IPv4;
+ PXE_IPV6 IPv6;
+ PXE_IPV4 IPv4;
} PXE_IP_ADDR;
typedef union pxe_device {
@@ -901,26 +900,24 @@ typedef union pxe_device {
/// See S/W UNDI ROMID structure definition for PCI and
/// PCC BusType definitions.
///
- PXE_UINT32 BusType;
+ PXE_UINT32 BusType;
///
/// Bus, device & function numbers that locate this device.
///
- PXE_UINT16 Bus;
- PXE_UINT8 Device;
- PXE_UINT8 Function;
- }
- PCI, PCC;
-
+ PXE_UINT16 Bus;
+ PXE_UINT8 Device;
+ PXE_UINT8 Function;
+ } PCI, PCC;
} PXE_DEVICE;
///
/// cpb and db definitions
///
-#define MAX_PCI_CONFIG_LEN 64 ///< # of dwords.
-#define MAX_EEPROM_LEN 128 ///< # of dwords.
-#define MAX_XMIT_BUFFERS 32 ///< recycling Q length for xmit_done.
-#define MAX_MCAST_ADDRESS_CNT 8
+#define MAX_PCI_CONFIG_LEN 64 ///< # of dwords.
+#define MAX_EEPROM_LEN 128 ///< # of dwords.
+#define MAX_XMIT_BUFFERS 32 ///< recycling Q length for xmit_done.
+#define MAX_MCAST_ADDRESS_CNT 8
typedef struct s_pxe_cpb_start_30 {
///
@@ -933,7 +930,7 @@ typedef struct s_pxe_cpb_start_30 {
///
/// This field cannot be set to zero.
///
- UINT64 Delay;
+ UINT64 Delay;
///
/// PXE_VOID Block(UINT32 enable);
@@ -949,7 +946,7 @@ typedef struct s_pxe_cpb_start_30 {
///
/// This field cannot be set to zero.
///
- UINT64 Block;
+ UINT64 Block;
///
/// PXE_VOID Virt2Phys(UINT64 virtual, UINT64 physical_ptr);
@@ -963,7 +960,7 @@ typedef struct s_pxe_cpb_start_30 {
/// This field can be set to zero if virtual and physical addresses
/// are equal.
///
- UINT64 Virt2Phys;
+ UINT64 Virt2Phys;
///
/// PXE_VOID Mem_IO(UINT8 read_write, UINT8 len, UINT64 port,
/// UINT64 buf_addr);
@@ -974,7 +971,7 @@ typedef struct s_pxe_cpb_start_30 {
///
/// This field can not be set to zero.
///
- UINT64 Mem_IO;
+ UINT64 Mem_IO;
} PXE_CPB_START_30;
typedef struct s_pxe_cpb_start_31 {
@@ -988,7 +985,7 @@ typedef struct s_pxe_cpb_start_31 {
///
/// This field cannot be set to zero.
///
- UINT64 Delay;
+ UINT64 Delay;
///
/// PXE_VOID Block(UINT64 unq_id, UINT32 enable);
@@ -1004,7 +1001,7 @@ typedef struct s_pxe_cpb_start_31 {
///
/// This field cannot be set to zero.
///
- UINT64 Block;
+ UINT64 Block;
///
/// PXE_VOID Virt2Phys(UINT64 UnqId, UINT64 virtual, UINT64 physical_ptr);
@@ -1018,7 +1015,7 @@ typedef struct s_pxe_cpb_start_31 {
/// This field can be set to zero if virtual and physical addresses
/// are equal.
///
- UINT64 Virt2Phys;
+ UINT64 Virt2Phys;
///
/// PXE_VOID Mem_IO(UINT64 UnqId, UINT8 read_write, UINT8 len, UINT64 port,
/// UINT64 buf_addr);
@@ -1029,7 +1026,7 @@ typedef struct s_pxe_cpb_start_31 {
///
/// This field can not be set to zero.
///
- UINT64 Mem_IO;
+ UINT64 Mem_IO;
///
/// PXE_VOID Map_Mem(UINT64 unq_id, UINT64 virtual_addr, UINT32 size,
/// UINT32 Direction, UINT64 mapped_addr);
@@ -1046,7 +1043,7 @@ typedef struct s_pxe_cpb_start_31 {
///
/// This field can be set to zero if there is no mapping service available.
///
- UINT64 Map_Mem;
+ UINT64 Map_Mem;
///
/// PXE_VOID UnMap_Mem(UINT64 unq_id, UINT64 virtual_addr, UINT32 size,
@@ -1057,7 +1054,7 @@ typedef struct s_pxe_cpb_start_31 {
///
/// This field can be set to zero if there is no unmapping service available.
///
- UINT64 UnMap_Mem;
+ UINT64 UnMap_Mem;
///
/// PXE_VOID Sync_Mem(UINT64 unq_id, UINT64 virtual,
@@ -1069,7 +1066,7 @@ typedef struct s_pxe_cpb_start_31 {
///
/// This field can be set to zero if there is no service available.
///
- UINT64 Sync_Mem;
+ UINT64 Sync_Mem;
///
/// protocol driver can provide anything for this Unique_ID, UNDI remembers
@@ -1077,19 +1074,19 @@ typedef struct s_pxe_cpb_start_31 {
/// the ifnum and gives it back as a parameter to all the call-back routines
/// when calling for that interface!
///
- UINT64 Unique_ID;
+ UINT64 Unique_ID;
} PXE_CPB_START_31;
-#define TO_AND_FROM_DEVICE 0
-#define FROM_DEVICE 1
-#define TO_DEVICE 2
+#define TO_AND_FROM_DEVICE 0
+#define FROM_DEVICE 1
+#define TO_DEVICE 2
-#define PXE_DELAY_MILLISECOND 1000
-#define PXE_DELAY_SECOND 1000000
-#define PXE_IO_READ 0
-#define PXE_IO_WRITE 1
-#define PXE_MEM_READ 2
-#define PXE_MEM_WRITE 4
+#define PXE_DELAY_MILLISECOND 1000
+#define PXE_DELAY_SECOND 1000000
+#define PXE_IO_READ 0
+#define PXE_IO_WRITE 1
+#define PXE_MEM_READ 2
+#define PXE_MEM_WRITE 4
typedef struct s_pxe_db_get_init_info {
///
@@ -1100,47 +1097,47 @@ typedef struct s_pxe_db_get_init_info {
/// If MemoryRequired is zero, the UNDI does not need and will not
/// use system memory to receive and transmit packets.
///
- PXE_UINT32 MemoryRequired;
+ PXE_UINT32 MemoryRequired;
///
/// Maximum frame data length for Tx/Rx excluding the media header.
///
- PXE_UINT32 FrameDataLen;
+ PXE_UINT32 FrameDataLen;
///
/// Supported link speeds are in units of mega bits. Common ethernet
/// values are 10, 100 and 1000. Unused LinkSpeeds[] entries are zero
/// filled.
///
- PXE_UINT32 LinkSpeeds[4];
+ PXE_UINT32 LinkSpeeds[4];
///
/// Number of non-volatile storage items.
///
- PXE_UINT32 NvCount;
+ PXE_UINT32 NvCount;
///
/// Width of non-volatile storage item in bytes. 0, 1, 2 or 4
///
- PXE_UINT16 NvWidth;
+ PXE_UINT16 NvWidth;
///
/// Media header length. This is the typical media header length for
/// this UNDI. This information is needed when allocating receive
/// and transmit buffers.
///
- PXE_UINT16 MediaHeaderLen;
+ PXE_UINT16 MediaHeaderLen;
///
/// Number of bytes in the NIC hardware (MAC) address.
///
- PXE_UINT16 HWaddrLen;
+ PXE_UINT16 HWaddrLen;
///
/// Maximum number of multicast MAC addresses in the multicast
/// MAC address filter list.
///
- PXE_UINT16 MCastFilterCnt;
+ PXE_UINT16 MCastFilterCnt;
///
/// Default number and size of transmit and receive buffers that will
@@ -1149,63 +1146,63 @@ typedef struct s_pxe_db_get_init_info {
/// command. If MemoryRequired is zero, this allocation will come out of
/// memory on the NIC.
///
- PXE_UINT16 TxBufCnt;
- PXE_UINT16 TxBufSize;
- PXE_UINT16 RxBufCnt;
- PXE_UINT16 RxBufSize;
+ PXE_UINT16 TxBufCnt;
+ PXE_UINT16 TxBufSize;
+ PXE_UINT16 RxBufCnt;
+ PXE_UINT16 RxBufSize;
///
/// Hardware interface types defined in the Assigned Numbers RFC
/// and used in DHCP and ARP packets.
/// See the PXE_IFTYPE typedef and PXE_IFTYPE_xxx macros.
///
- PXE_UINT8 IFtype;
+ PXE_UINT8 IFtype;
///
/// Supported duplex. See PXE_DUPLEX_xxxxx #defines below.
///
- PXE_UINT8 SupportedDuplexModes;
+ PXE_UINT8 SupportedDuplexModes;
///
/// Supported loopback options. See PXE_LOOPBACK_xxxxx #defines below.
///
- PXE_UINT8 SupportedLoopBackModes;
+ PXE_UINT8 SupportedLoopBackModes;
} PXE_DB_GET_INIT_INFO;
-#define PXE_MAX_TXRX_UNIT_ETHER 1500
+#define PXE_MAX_TXRX_UNIT_ETHER 1500
-#define PXE_HWADDR_LEN_ETHER 0x0006
-#define PXE_MAC_HEADER_LEN_ETHER 0x000E
+#define PXE_HWADDR_LEN_ETHER 0x0006
+#define PXE_MAC_HEADER_LEN_ETHER 0x000E
#define PXE_DUPLEX_ENABLE_FULL_SUPPORTED 1
#define PXE_DUPLEX_FORCE_FULL_SUPPORTED 2
-#define PXE_LOOPBACK_INTERNAL_SUPPORTED 1
-#define PXE_LOOPBACK_EXTERNAL_SUPPORTED 2
+#define PXE_LOOPBACK_INTERNAL_SUPPORTED 1
+#define PXE_LOOPBACK_EXTERNAL_SUPPORTED 2
typedef struct s_pxe_pci_config_info {
///
/// This is the flag field for the PXE_DB_GET_CONFIG_INFO union.
/// For PCI bus devices, this field is set to PXE_BUSTYPE_PCI.
///
- UINT32 BusType;
+ UINT32 BusType;
///
/// This identifies the PCI network device that this UNDI interface.
/// is bound to.
///
- UINT16 Bus;
- UINT8 Device;
- UINT8 Function;
+ UINT16 Bus;
+ UINT8 Device;
+ UINT8 Function;
///
/// This is a copy of the PCI configuration space for this
/// network device.
///
union {
- UINT8 Byte[256];
- UINT16 Word[128];
- UINT32 Dword[64];
+ UINT8 Byte[256];
+ UINT16 Word[128];
+ UINT32 Dword[64];
} Config;
} PXE_PCI_CONFIG_INFO;
@@ -1214,30 +1211,30 @@ typedef struct s_pxe_pcc_config_info {
/// This is the flag field for the PXE_DB_GET_CONFIG_INFO union.
/// For PCC bus devices, this field is set to PXE_BUSTYPE_PCC.
///
- PXE_UINT32 BusType;
+ PXE_UINT32 BusType;
///
/// This identifies the PCC network device that this UNDI interface
/// is bound to.
///
- PXE_UINT16 Bus;
- PXE_UINT8 Device;
- PXE_UINT8 Function;
+ PXE_UINT16 Bus;
+ PXE_UINT8 Device;
+ PXE_UINT8 Function;
///
/// This is a copy of the PCC configuration space for this
/// network device.
///
union {
- PXE_UINT8 Byte[256];
- PXE_UINT16 Word[128];
- PXE_UINT32 Dword[64];
+ PXE_UINT8 Byte[256];
+ PXE_UINT16 Word[128];
+ PXE_UINT32 Dword[64];
} Config;
} PXE_PCC_CONFIG_INFO;
typedef union u_pxe_db_get_config_info {
- PXE_PCI_CONFIG_INFO pci;
- PXE_PCC_CONFIG_INFO pcc;
+ PXE_PCI_CONFIG_INFO pci;
+ PXE_PCC_CONFIG_INFO pcc;
} PXE_DB_GET_CONFIG_INFO;
typedef struct s_pxe_cpb_initialize {
@@ -1246,20 +1243,20 @@ typedef struct s_pxe_cpb_initialize {
/// be in contiguous physical memory and cannot be swapped out. The UNDI
/// will be using this for transmit and receive buffering.
///
- PXE_UINT64 MemoryAddr;
+ PXE_UINT64 MemoryAddr;
///
/// MemoryLength must be greater than or equal to MemoryRequired
/// returned by the Get Init Info command.
///
- PXE_UINT32 MemoryLength;
+ PXE_UINT32 MemoryLength;
///
/// Desired link speed in Mbit/sec. Common ethernet values are 10, 100
/// and 1000. Setting a value of zero will auto-detect and/or use the
/// default link speed (operation depends on UNDI/NIC functionality).
///
- PXE_UINT32 LinkSpeed;
+ PXE_UINT32 LinkSpeed;
///
/// Suggested number and size of receive and transmit buffers to
@@ -1271,29 +1268,29 @@ typedef struct s_pxe_cpb_initialize {
/// If these fields are set to zero, the UNDI will allocate buffer
/// counts and sizes as it sees fit.
///
- PXE_UINT16 TxBufCnt;
- PXE_UINT16 TxBufSize;
- PXE_UINT16 RxBufCnt;
- PXE_UINT16 RxBufSize;
+ PXE_UINT16 TxBufCnt;
+ PXE_UINT16 TxBufSize;
+ PXE_UINT16 RxBufCnt;
+ PXE_UINT16 RxBufSize;
///
/// The following configuration parameters are optional and must be zero
/// to use the default values.
///
- PXE_UINT8 DuplexMode;
+ PXE_UINT8 DuplexMode;
- PXE_UINT8 LoopBackMode;
+ PXE_UINT8 LoopBackMode;
} PXE_CPB_INITIALIZE;
-#define PXE_DUPLEX_DEFAULT 0x00
-#define PXE_FORCE_FULL_DUPLEX 0x01
-#define PXE_ENABLE_FULL_DUPLEX 0x02
-#define PXE_FORCE_HALF_DUPLEX 0x04
-#define PXE_DISABLE_FULL_DUPLEX 0x08
+#define PXE_DUPLEX_DEFAULT 0x00
+#define PXE_FORCE_FULL_DUPLEX 0x01
+#define PXE_ENABLE_FULL_DUPLEX 0x02
+#define PXE_FORCE_HALF_DUPLEX 0x04
+#define PXE_DISABLE_FULL_DUPLEX 0x08
-#define LOOPBACK_NORMAL 0
-#define LOOPBACK_INTERNAL 1
-#define LOOPBACK_EXTERNAL 2
+#define LOOPBACK_NORMAL 0
+#define LOOPBACK_INTERNAL 1
+#define LOOPBACK_EXTERNAL 2
typedef struct s_pxe_db_initialize {
///
@@ -1304,16 +1301,16 @@ typedef struct s_pxe_db_initialize {
/// Memory used by the UNDI and network device is allocated from the
/// lowest memory buffer address.
///
- PXE_UINT32 MemoryUsed;
+ PXE_UINT32 MemoryUsed;
///
/// Actual number and size of receive and transmit buffers that were
/// allocated.
///
- PXE_UINT16 TxBufCnt;
- PXE_UINT16 TxBufSize;
- PXE_UINT16 RxBufCnt;
- PXE_UINT16 RxBufSize;
+ PXE_UINT16 TxBufCnt;
+ PXE_UINT16 TxBufSize;
+ PXE_UINT16 RxBufCnt;
+ PXE_UINT16 RxBufSize;
} PXE_DB_INITIALIZE;
typedef struct s_pxe_cpb_receive_filters {
@@ -1321,14 +1318,14 @@ typedef struct s_pxe_cpb_receive_filters {
/// List of multicast MAC addresses. This list, if present, will
/// replace the existing multicast MAC address filter list.
///
- PXE_MAC_ADDR MCastList[MAX_MCAST_ADDRESS_CNT];
+ PXE_MAC_ADDR MCastList[MAX_MCAST_ADDRESS_CNT];
} PXE_CPB_RECEIVE_FILTERS;
typedef struct s_pxe_db_receive_filters {
///
/// Filtered multicast MAC address list.
///
- PXE_MAC_ADDR MCastList[MAX_MCAST_ADDRESS_CNT];
+ PXE_MAC_ADDR MCastList[MAX_MCAST_ADDRESS_CNT];
} PXE_DB_RECEIVE_FILTERS;
typedef struct s_pxe_cpb_station_address {
@@ -1336,24 +1333,24 @@ typedef struct s_pxe_cpb_station_address {
/// If supplied and supported, the current station MAC address
/// will be changed.
///
- PXE_MAC_ADDR StationAddr;
+ PXE_MAC_ADDR StationAddr;
} PXE_CPB_STATION_ADDRESS;
typedef struct s_pxe_dpb_station_address {
///
/// Current station MAC address.
///
- PXE_MAC_ADDR StationAddr;
+ PXE_MAC_ADDR StationAddr;
///
/// Station broadcast MAC address.
///
- PXE_MAC_ADDR BroadcastAddr;
+ PXE_MAC_ADDR BroadcastAddr;
///
/// Permanent station MAC address.
///
- PXE_MAC_ADDR PermanentAddr;
+ PXE_MAC_ADDR PermanentAddr;
} PXE_DB_STATION_ADDRESS;
typedef struct s_pxe_db_statistics {
@@ -1366,12 +1363,12 @@ typedef struct s_pxe_db_statistics {
/// If bit 0x21 is set, Data[0x21] is collected.
/// Etc.
///
- PXE_UINT64 Supported;
+ PXE_UINT64 Supported;
///
/// Statistic data.
///
- PXE_UINT64 Data[64];
+ PXE_UINT64 Data[64];
} PXE_DB_STATISTICS;
///
@@ -1383,7 +1380,7 @@ typedef struct s_pxe_db_statistics {
///
/// Number of valid frames received and copied into receive buffers.
///
-#define PXE_STATISTICS_RX_GOOD_FRAMES 0x01
+#define PXE_STATISTICS_RX_GOOD_FRAMES 0x01
///
/// Number of frames below the minimum length for the media.
@@ -1395,7 +1392,7 @@ typedef struct s_pxe_db_statistics {
/// Number of frames longer than the maxminum length for the
/// media. This would be >1500 for ethernet.
///
-#define PXE_STATISTICS_RX_OVERSIZE_FRAMES 0x03
+#define PXE_STATISTICS_RX_OVERSIZE_FRAMES 0x03
///
/// Valid frames that were dropped because receive buffers were full.
@@ -1426,7 +1423,7 @@ typedef struct s_pxe_db_statistics {
/// Total number of bytes received. Includes frames with errors
/// and dropped frames.
///
-#define PXE_STATISTICS_RX_TOTAL_BYTES 0x09
+#define PXE_STATISTICS_RX_TOTAL_BYTES 0x09
///
/// Transmit statistics.
@@ -1445,45 +1442,45 @@ typedef struct s_pxe_db_statistics {
///
/// Number of collisions detection on this subnet.
///
-#define PXE_STATISTICS_COLLISIONS 0x14
+#define PXE_STATISTICS_COLLISIONS 0x14
///
/// Number of frames destined for unsupported protocol.
///
-#define PXE_STATISTICS_UNSUPPORTED_PROTOCOL 0x15
+#define PXE_STATISTICS_UNSUPPORTED_PROTOCOL 0x15
///
/// Number of valid frames received that were duplicated.
///
-#define PXE_STATISTICS_RX_DUPLICATED_FRAMES 0x16
+#define PXE_STATISTICS_RX_DUPLICATED_FRAMES 0x16
///
/// Number of encrypted frames received that failed to decrypt.
///
-#define PXE_STATISTICS_RX_DECRYPT_ERROR_FRAMES 0x17
+#define PXE_STATISTICS_RX_DECRYPT_ERROR_FRAMES 0x17
///
/// Number of frames that failed to transmit after exceeding the retry limit.
///
-#define PXE_STATISTICS_TX_ERROR_FRAMES 0x18
+#define PXE_STATISTICS_TX_ERROR_FRAMES 0x18
///
/// Number of frames transmitted successfully after more than one attempt.
///
-#define PXE_STATISTICS_TX_RETRY_FRAMES 0x19
+#define PXE_STATISTICS_TX_RETRY_FRAMES 0x19
typedef struct s_pxe_cpb_mcast_ip_to_mac {
///
/// Multicast IP address to be converted to multicast MAC address.
///
- PXE_IP_ADDR IP;
+ PXE_IP_ADDR IP;
} PXE_CPB_MCAST_IP_TO_MAC;
typedef struct s_pxe_db_mcast_ip_to_mac {
///
/// Multicast MAC address.
///
- PXE_MAC_ADDR MAC;
+ PXE_MAC_ADDR MAC;
} PXE_DB_MCAST_IP_TO_MAC;
typedef struct s_pxe_cpb_nvdata_sparse {
@@ -1494,15 +1491,15 @@ typedef struct s_pxe_cpb_nvdata_sparse {
///
/// Non-volatile storage address to be changed.
///
- PXE_UINT32 Addr;
+ PXE_UINT32 Addr;
///
/// Data item to write into above storage address.
///
union {
- PXE_UINT8 Byte;
- PXE_UINT16 Word;
- PXE_UINT32 Dword;
+ PXE_UINT8 Byte;
+ PXE_UINT16 Word;
+ PXE_UINT32 Dword;
} Data;
} Item[MAX_EEPROM_LEN];
} PXE_CPB_NVDATA_SPARSE;
@@ -1515,17 +1512,17 @@ typedef union u_pxe_cpb_nvdata_bulk {
///
/// Array of byte-wide data items.
///
- PXE_UINT8 Byte[MAX_EEPROM_LEN << 2];
+ PXE_UINT8 Byte[MAX_EEPROM_LEN << 2];
///
/// Array of word-wide data items.
///
- PXE_UINT16 Word[MAX_EEPROM_LEN << 1];
+ PXE_UINT16 Word[MAX_EEPROM_LEN << 1];
///
/// Array of dword-wide data items.
///
- PXE_UINT32 Dword[MAX_EEPROM_LEN];
+ PXE_UINT32 Dword[MAX_EEPROM_LEN];
} PXE_CPB_NVDATA_BULK;
typedef struct s_pxe_db_nvdata {
@@ -1536,17 +1533,17 @@ typedef struct s_pxe_db_nvdata {
///
/// Array of byte-wide data items.
///
- PXE_UINT8 Byte[MAX_EEPROM_LEN << 2];
+ PXE_UINT8 Byte[MAX_EEPROM_LEN << 2];
///
/// Array of word-wide data items.
///
- PXE_UINT16 Word[MAX_EEPROM_LEN << 1];
+ PXE_UINT16 Word[MAX_EEPROM_LEN << 1];
///
/// Array of dword-wide data items.
///
- PXE_UINT32 Dword[MAX_EEPROM_LEN];
+ PXE_UINT32 Dword[MAX_EEPROM_LEN];
} Data;
} PXE_DB_NVDATA;
@@ -1555,17 +1552,17 @@ typedef struct s_pxe_db_get_status {
/// Length of next receive frame (header + data). If this is zero,
/// there is no next receive frame available.
///
- PXE_UINT32 RxFrameLen;
+ PXE_UINT32 RxFrameLen;
///
/// Reserved, set to zero.
///
- PXE_UINT32 reserved;
+ PXE_UINT32 reserved;
///
/// Addresses of transmitted buffers that need to be recycled.
///
- PXE_UINT64 TxBuffer[MAX_XMIT_BUFFERS];
+ PXE_UINT64 TxBuffer[MAX_XMIT_BUFFERS];
} PXE_DB_GET_STATUS;
typedef struct s_pxe_cpb_fill_header {
@@ -1573,71 +1570,71 @@ typedef struct s_pxe_cpb_fill_header {
/// Source and destination MAC addresses. These will be copied into
/// the media header without doing byte swapping.
///
- PXE_MAC_ADDR SrcAddr;
- PXE_MAC_ADDR DestAddr;
+ PXE_MAC_ADDR SrcAddr;
+ PXE_MAC_ADDR DestAddr;
///
/// Address of first byte of media header. The first byte of packet data
/// follows the last byte of the media header.
///
- PXE_UINT64 MediaHeader;
+ PXE_UINT64 MediaHeader;
///
/// Length of packet data in bytes (not including the media header).
///
- PXE_UINT32 PacketLen;
+ PXE_UINT32 PacketLen;
///
/// Protocol type. This will be copied into the media header without
/// doing byte swapping. Protocol type numbers can be obtained from
/// the Assigned Numbers RFC 1700.
///
- PXE_UINT16 Protocol;
+ PXE_UINT16 Protocol;
///
/// Length of the media header in bytes.
///
- PXE_UINT16 MediaHeaderLen;
+ PXE_UINT16 MediaHeaderLen;
} PXE_CPB_FILL_HEADER;
-#define PXE_PROTOCOL_ETHERNET_IP 0x0800
-#define PXE_PROTOCOL_ETHERNET_ARP 0x0806
-#define MAX_XMIT_FRAGMENTS 16
+#define PXE_PROTOCOL_ETHERNET_IP 0x0800
+#define PXE_PROTOCOL_ETHERNET_ARP 0x0806
+#define MAX_XMIT_FRAGMENTS 16
typedef struct s_pxe_cpb_fill_header_fragmented {
///
/// Source and destination MAC addresses. These will be copied into
/// the media header without doing byte swapping.
///
- PXE_MAC_ADDR SrcAddr;
- PXE_MAC_ADDR DestAddr;
+ PXE_MAC_ADDR SrcAddr;
+ PXE_MAC_ADDR DestAddr;
///
/// Length of packet data in bytes (not including the media header).
///
- PXE_UINT32 PacketLen;
+ PXE_UINT32 PacketLen;
///
/// Protocol type. This will be copied into the media header without
/// doing byte swapping. Protocol type numbers can be obtained from
/// the Assigned Numbers RFC 1700.
///
- PXE_MEDIA_PROTOCOL Protocol;
+ PXE_MEDIA_PROTOCOL Protocol;
///
/// Length of the media header in bytes.
///
- PXE_UINT16 MediaHeaderLen;
+ PXE_UINT16 MediaHeaderLen;
///
/// Number of packet fragment descriptors.
///
- PXE_UINT16 FragCnt;
+ PXE_UINT16 FragCnt;
///
/// Reserved, must be set to zero.
///
- PXE_UINT16 reserved;
+ PXE_UINT16 reserved;
///
/// Array of packet fragment descriptors. The first byte of the media
@@ -1647,60 +1644,59 @@ typedef struct s_pxe_cpb_fill_header_fragmented {
///
/// Address of this packet fragment.
///
- PXE_UINT64 FragAddr;
+ PXE_UINT64 FragAddr;
///
/// Length of this packet fragment.
///
- PXE_UINT32 FragLen;
+ PXE_UINT32 FragLen;
///
/// Reserved, must be set to zero.
///
- PXE_UINT32 reserved;
+ PXE_UINT32 reserved;
} FragDesc[MAX_XMIT_FRAGMENTS];
-}
-PXE_CPB_FILL_HEADER_FRAGMENTED;
+} PXE_CPB_FILL_HEADER_FRAGMENTED;
typedef struct s_pxe_cpb_transmit {
///
/// Address of first byte of frame buffer. This is also the first byte
/// of the media header.
///
- PXE_UINT64 FrameAddr;
+ PXE_UINT64 FrameAddr;
///
/// Length of the data portion of the frame buffer in bytes. Do not
/// include the length of the media header.
///
- PXE_UINT32 DataLen;
+ PXE_UINT32 DataLen;
///
/// Length of the media header in bytes.
///
- PXE_UINT16 MediaheaderLen;
+ PXE_UINT16 MediaheaderLen;
///
/// Reserved, must be zero.
///
- PXE_UINT16 reserved;
+ PXE_UINT16 reserved;
} PXE_CPB_TRANSMIT;
typedef struct s_pxe_cpb_transmit_fragments {
///
/// Length of packet data in bytes (not including the media header).
///
- PXE_UINT32 FrameLen;
+ PXE_UINT32 FrameLen;
///
/// Length of the media header in bytes.
///
- PXE_UINT16 MediaheaderLen;
+ PXE_UINT16 MediaheaderLen;
///
/// Number of packet fragment descriptors.
///
- PXE_UINT16 FragCnt;
+ PXE_UINT16 FragCnt;
///
/// Array of frame fragment descriptors. The first byte of the first
@@ -1710,75 +1706,73 @@ typedef struct s_pxe_cpb_transmit_fragments {
///
/// Address of this frame fragment.
///
- PXE_UINT64 FragAddr;
+ PXE_UINT64 FragAddr;
///
/// Length of this frame fragment.
///
- PXE_UINT32 FragLen;
+ PXE_UINT32 FragLen;
///
/// Reserved, must be set to zero.
///
- PXE_UINT32 reserved;
+ PXE_UINT32 reserved;
} FragDesc[MAX_XMIT_FRAGMENTS];
-}
-PXE_CPB_TRANSMIT_FRAGMENTS;
+} PXE_CPB_TRANSMIT_FRAGMENTS;
typedef struct s_pxe_cpb_receive {
///
/// Address of first byte of receive buffer. This is also the first byte
/// of the frame header.
///
- PXE_UINT64 BufferAddr;
+ PXE_UINT64 BufferAddr;
///
/// Length of receive buffer. This must be large enough to hold the
/// received frame (media header + data). If the length of smaller than
/// the received frame, data will be lost.
///
- PXE_UINT32 BufferLen;
+ PXE_UINT32 BufferLen;
///
/// Reserved, must be set to zero.
///
- PXE_UINT32 reserved;
+ PXE_UINT32 reserved;
} PXE_CPB_RECEIVE;
typedef struct s_pxe_db_receive {
///
/// Source and destination MAC addresses from media header.
///
- PXE_MAC_ADDR SrcAddr;
- PXE_MAC_ADDR DestAddr;
+ PXE_MAC_ADDR SrcAddr;
+ PXE_MAC_ADDR DestAddr;
///
/// Length of received frame. May be larger than receive buffer size.
/// The receive buffer will not be overwritten. This is how to tell
/// if data was lost because the receive buffer was too small.
///
- PXE_UINT32 FrameLen;
+ PXE_UINT32 FrameLen;
///
/// Protocol type from media header.
///
- PXE_MEDIA_PROTOCOL Protocol;
+ PXE_MEDIA_PROTOCOL Protocol;
///
/// Length of media header in received frame.
///
- PXE_UINT16 MediaHeaderLen;
+ PXE_UINT16 MediaHeaderLen;
///
/// Type of receive frame.
///
- PXE_FRAME_TYPE Type;
+ PXE_FRAME_TYPE Type;
///
/// Reserved, must be zero.
///
- PXE_UINT8 reserved[7];
-
+ PXE_UINT8 reserved[7];
} PXE_DB_RECEIVE;
#pragma pack()
diff --git a/sys/contrib/edk2/Include/Uefi/UefiSpec.h b/sys/contrib/edk2/Include/Uefi/UefiSpec.h
index 0e165478d6c3..d469d2a36ce0 100644
--- a/sys/contrib/edk2/Include/Uefi/UefiSpec.h
+++ b/sys/contrib/edk2/Include/Uefi/UefiSpec.h
@@ -5,8 +5,9 @@
If a code construct is defined in the UEFI 2.7 specification it must be included
by this include file.
-Copyright (c) 2006 - 2019, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2006 - 2021, Intel Corporation. All rights reserved.<BR>
Portions Copyright (c) 2020, Hewlett Packard Enterprise Development LP. All rights reserved.<BR>
+Copyright (c) 2022, Loongson Technology Corporation Limited. All rights reserved.<BR>
SPDX-License-Identifier: BSD-2-Clause-Patent
@@ -59,31 +60,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,26 +94,58 @@ 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
+// protected with the CPU's memory cryptographic
// capabilities. If this flag is clear, the memory region is not
-// capable of being protected with the CPU?s memory
+// capable of being protected with the CPU's memory
// cryptographic capabilities or the CPU does not support CPU
// memory cryptographic capabilities.
//
-#define EFI_MEMORY_CPU_CRYPTO 0x0000000000080000ULL
+#define EFI_MEMORY_CPU_CRYPTO 0x0000000000080000ULL
+
+//
+// If this flag is set, the memory region is present and capable of having
+// memory dynamically removed from the platform. This attribute serves as
+// a hint to the OS prior to its ACPI subsystem initialization to avoid
+// allocating this memory for core OS data or code that cannot be dynamically
+// relocated at runtime. If this flag is clear, the memory region is not
+// capable of being dynamically removed from the platform at runtime.
+//
+#define EFI_MEMORY_HOT_PLUGGABLE 0x0000000000100000
//
// Runtime memory attribute
//
-#define EFI_MEMORY_RUNTIME 0x8000000000000000ULL
+#define EFI_MEMORY_RUNTIME 0x8000000000000000ULL
+
+//
+// If this flag is set, the memory region is
+// described with additional ISA-specific memory attributes
+// as specified in EFI_MEMORY_ISA_MASK.
+//
+#define EFI_MEMORY_ISA_VALID 0x4000000000000000ULL
+
+//
+// Defines the bits reserved for describing optional ISA-specific cacheability
+// attributes that are not covered by the standard UEFI Memory Attributes cacheability
+// bits (EFI_MEMORY_UC, EFI_MEMORY_WC, EFI_MEMORY_WT, EFI_MEMORY_WB and EFI_MEMORY_UCE).
+// See Calling Conventions for further ISA-specific enumeration of these bits.
+//
+#define EFI_MEMORY_ISA_MASK 0x0FFFF00000000000ULL
+
+//
+// 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)
///
/// Memory descriptor version number.
///
-#define EFI_MEMORY_DESCRIPTOR_VERSION 1
+#define EFI_MEMORY_DESCRIPTOR_VERSION 1
///
/// Definition of an EFI memory descriptor.
@@ -123,32 +156,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;
/**
@@ -297,6 +330,9 @@ EFI_STATUS
map that requires a mapping.
@retval EFI_NOT_FOUND A virtual address was supplied for an address that is not found
in the memory map.
+ @retval EFI_UNSUPPORTED This call is not supported by this platform at the time the call is made.
+ The platform should describe this runtime service as unsupported at runtime
+ via an EFI_RT_PROPERTIES_TABLE configuration table.
**/
typedef
@@ -337,8 +373,8 @@ typedef
EFI_STATUS
(EFIAPI *EFI_CONNECT_CONTROLLER)(
IN EFI_HANDLE ControllerHandle,
- IN EFI_HANDLE *DriverImageHandle, OPTIONAL
- IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath, OPTIONAL
+ IN EFI_HANDLE *DriverImageHandle OPTIONAL,
+ IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath OPTIONAL,
IN BOOLEAN Recursive
);
@@ -370,16 +406,14 @@ typedef
EFI_STATUS
(EFIAPI *EFI_DISCONNECT_CONTROLLER)(
IN EFI_HANDLE ControllerHandle,
- IN EFI_HANDLE DriverImageHandle, OPTIONAL
+ IN EFI_HANDLE DriverImageHandle OPTIONAL,
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.
@@ -389,11 +423,14 @@ EFI_STATUS
for the new virtual address mappings being applied.
@retval EFI_SUCCESS The pointer pointed to by Address was modified.
- @retval EFI_INVALID_PARAMETER 1) Address is NULL.
- 2) *Address is NULL and DebugDisposition does
- not have the EFI_OPTIONAL_PTR bit set.
@retval EFI_NOT_FOUND The pointer pointed to by Address was not found to be part
of the current memory map. This is normally fatal.
+ @retval EFI_INVALID_PARAMETER Address is NULL.
+ @retval EFI_INVALID_PARAMETER *Address is NULL and DebugDisposition does
+ not have the EFI_OPTIONAL_PTR bit set.
+ @retval EFI_UNSUPPORTED This call is not supported by this platform at the time the call is made.
+ The platform should describe this runtime service as unsupported at runtime
+ via an EFI_RT_PROPERTIES_TABLE configuration table.
**/
typedef
@@ -403,27 +440,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
@@ -461,8 +496,8 @@ EFI_STATUS
(EFIAPI *EFI_CREATE_EVENT)(
IN UINT32 Type,
IN EFI_TPL NotifyTpl,
- IN EFI_EVENT_NOTIFY NotifyFunction,
- IN VOID *NotifyContext,
+ IN EFI_EVENT_NOTIFY NotifyFunction OPTIONAL,
+ IN VOID *NotifyContext OPTIONAL,
OUT EFI_EVENT *Event
);
@@ -604,15 +639,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.
@@ -662,6 +695,10 @@ VOID
@retval EFI_INVALID_PARAMETER The DataSize is not too small and Data is NULL.
@retval EFI_DEVICE_ERROR The variable could not be retrieved due to a hardware error.
@retval EFI_SECURITY_VIOLATION The variable could not be retrieved due to an authentication failure.
+ @retval EFI_UNSUPPORTED After ExitBootServices() has been called, this return code may be returned
+ if no variable storage is supported. The platform should describe this
+ runtime service as unsupported at runtime via an EFI_RT_PROPERTIES_TABLE
+ configuration table.
**/
typedef
@@ -669,7 +706,7 @@ EFI_STATUS
(EFIAPI *EFI_GET_VARIABLE)(
IN CHAR16 *VariableName,
IN EFI_GUID *VendorGuid,
- OUT UINT32 *Attributes, OPTIONAL
+ OUT UINT32 *Attributes OPTIONAL,
IN OUT UINTN *DataSize,
OUT VOID *Data OPTIONAL
);
@@ -698,6 +735,10 @@ EFI_STATUS
@retval EFI_INVALID_PARAMETER Null-terminator is not found in the first VariableNameSize bytes of
the input VariableName buffer.
@retval EFI_DEVICE_ERROR The variable could not be retrieved due to a hardware error.
+ @retval EFI_UNSUPPORTED After ExitBootServices() has been called, this return code may be returned
+ if no variable storage is supported. The platform should describe this
+ runtime service as unsupported at runtime via an EFI_RT_PROPERTIES_TABLE
+ configuration table.
**/
typedef
@@ -740,6 +781,9 @@ EFI_STATUS
but the AuthInfo does NOT pass the validation check carried out by the firmware.
@retval EFI_NOT_FOUND The variable trying to be updated or deleted was not found.
+ @retval EFI_UNSUPPORTED This call is not supported by this platform at the time the call is made.
+ The platform should describe this runtime service as unsupported at runtime
+ via an EFI_RT_PROPERTIES_TABLE configuration table.
**/
typedef
@@ -752,7 +796,6 @@ EFI_STATUS
IN VOID *Data
);
-
///
/// This provides the capabilities of the
/// real time clock device as exposed through the EFI interfaces.
@@ -764,14 +807,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
@@ -779,7 +822,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;
/**
@@ -793,6 +836,9 @@ typedef struct {
@retval EFI_SUCCESS The operation completed successfully.
@retval EFI_INVALID_PARAMETER Time is NULL.
@retval EFI_DEVICE_ERROR The time could not be retrieved due to hardware error.
+ @retval EFI_UNSUPPORTED This call is not supported by this platform at the time the call is made.
+ The platform should describe this runtime service as unsupported at runtime
+ via an EFI_RT_PROPERTIES_TABLE configuration table.
**/
typedef
@@ -810,6 +856,9 @@ EFI_STATUS
@retval EFI_SUCCESS The operation completed successfully.
@retval EFI_INVALID_PARAMETER A time field is out of range.
@retval EFI_DEVICE_ERROR The time could not be set due due to hardware error.
+ @retval EFI_UNSUPPORTED This call is not supported by this platform at the time the call is made.
+ The platform should describe this runtime service as unsupported at runtime
+ via an EFI_RT_PROPERTIES_TABLE configuration table.
**/
typedef
@@ -830,7 +879,9 @@ EFI_STATUS
@retval EFI_INVALID_PARAMETER Pending is NULL.
@retval EFI_INVALID_PARAMETER Time is NULL.
@retval EFI_DEVICE_ERROR The wakeup time could not be retrieved due to a hardware error.
- @retval EFI_UNSUPPORTED A wakeup timer is not supported on this platform.
+ @retval EFI_UNSUPPORTED This call is not supported by this platform at the time the call is made.
+ The platform should describe this runtime service as unsupported at runtime
+ via an EFI_RT_PROPERTIES_TABLE configuration table.
**/
typedef
@@ -852,7 +903,9 @@ EFI_STATUS
Enable is FALSE, then the wakeup alarm was disabled.
@retval EFI_INVALID_PARAMETER A time field is out of range.
@retval EFI_DEVICE_ERROR The wakeup time could not be set due to a hardware error.
- @retval EFI_UNSUPPORTED A wakeup timer is not supported on this platform.
+ @retval EFI_UNSUPPORTED This call is not supported by this platform at the time the call is made.
+ The platform should describe this runtime service as unsupported at runtime
+ via an EFI_RT_PROPERTIES_TABLE configuration table.
**/
typedef
@@ -897,7 +950,7 @@ EFI_STATUS
(EFIAPI *EFI_IMAGE_LOAD)(
IN BOOLEAN BootPolicy,
IN EFI_HANDLE ParentImageHandle,
- IN EFI_DEVICE_PATH_PROTOCOL *DevicePath,
+ IN EFI_DEVICE_PATH_PROTOCOL *DevicePath OPTIONAL,
IN VOID *SourceBuffer OPTIONAL,
IN UINTN SourceSize,
OUT EFI_HANDLE *ImageHandle
@@ -1074,6 +1127,9 @@ EFI_STATUS
@retval EFI_SUCCESS The next high monotonic count was returned.
@retval EFI_INVALID_PARAMETER HighCount is NULL.
@retval EFI_DEVICE_ERROR The device is not functioning properly.
+ @retval EFI_UNSUPPORTED This call is not supported by this platform at the time the call is made.
+ The platform should describe this runtime service as unsupported at runtime
+ via an EFI_RT_PROPERTIES_TABLE configuration table.
**/
typedef
@@ -1292,12 +1348,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
@@ -1331,13 +1387,12 @@ EFI_STATUS
(EFIAPI *EFI_OPEN_PROTOCOL)(
IN EFI_HANDLE Handle,
IN EFI_GUID *Protocol,
- OUT VOID **Interface, OPTIONAL
+ OUT VOID **Interface OPTIONAL,
IN EFI_HANDLE AgentHandle,
IN EFI_HANDLE ControllerHandle,
IN UINT32 Attributes
);
-
/**
Closes a protocol on a handle that was opened using OpenProtocol().
@@ -1372,10 +1427,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;
/**
@@ -1499,8 +1554,8 @@ typedef
EFI_STATUS
(EFIAPI *EFI_LOCATE_HANDLE)(
IN EFI_LOCATE_SEARCH_TYPE SearchType,
- IN EFI_GUID *Protocol, OPTIONAL
- IN VOID *SearchKey, OPTIONAL
+ IN EFI_GUID *Protocol OPTIONAL,
+ IN VOID *SearchKey OPTIONAL,
IN OUT UINTN *BufferSize,
OUT EFI_HANDLE *Buffer
);
@@ -1572,8 +1627,8 @@ typedef
EFI_STATUS
(EFIAPI *EFI_LOCATE_HANDLE_BUFFER)(
IN EFI_LOCATE_SEARCH_TYPE SearchType,
- IN EFI_GUID *Protocol, OPTIONAL
- IN VOID *SearchKey, OPTIONAL
+ IN EFI_GUID *Protocol OPTIONAL,
+ IN VOID *SearchKey OPTIONAL,
OUT UINTN *NoHandles,
OUT EFI_HANDLE **Buffer
);
@@ -1599,7 +1654,7 @@ typedef
EFI_STATUS
(EFIAPI *EFI_LOCATE_PROTOCOL)(
IN EFI_GUID *Protocol,
- IN VOID *Registration, OPTIONAL
+ IN VOID *Registration OPTIONAL,
OUT VOID **Interface
);
@@ -1610,20 +1665,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;
@@ -1634,23 +1689,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.
+ /// Size in bytes of the capsule (including capsule header).
///
- UINT32 CapsuleImageSize;
+ UINT32 CapsuleImageSize;
} EFI_CAPSULE_HEADER;
///
@@ -1662,16 +1717,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
@@ -1701,6 +1756,9 @@ typedef struct {
in runtime. The caller may resubmit the capsule prior to ExitBootServices().
@retval EFI_OUT_OF_RESOURCES When ExitBootServices() has not been previously called then this error indicates
the capsule is compatible with this platform but there are insufficient resources to process.
+ @retval EFI_UNSUPPORTED This call is not supported by this platform at the time the call is made.
+ The platform should describe this runtime service as unsupported at runtime
+ via an EFI_RT_PROPERTIES_TABLE configuration table.
**/
typedef
@@ -1732,6 +1790,9 @@ EFI_STATUS
in runtime. The caller may resubmit the capsule prior to ExitBootServices().
@retval EFI_OUT_OF_RESOURCES When ExitBootServices() has not been previously called then this error indicates
the capsule is compatible with this platform but there are insufficient resources to process.
+ @retval EFI_UNSUPPORTED This call is not supported by this platform at the time the call is made.
+ The platform should describe this runtime service as unsupported at runtime
+ via an EFI_RT_PROPERTIES_TABLE configuration table.
**/
typedef
@@ -1788,21 +1849,24 @@ EFI_STATUS
//
// EFI Runtime Services Table
//
-#define EFI_SYSTEM_TABLE_SIGNATURE SIGNATURE_64 ('I','B','I',' ','S','Y','S','T')
-#define EFI_2_80_SYSTEM_TABLE_REVISION ((2 << 16) | (80))
-#define EFI_2_70_SYSTEM_TABLE_REVISION ((2 << 16) | (70))
-#define EFI_2_60_SYSTEM_TABLE_REVISION ((2 << 16) | (60))
-#define EFI_2_50_SYSTEM_TABLE_REVISION ((2 << 16) | (50))
-#define EFI_2_40_SYSTEM_TABLE_REVISION ((2 << 16) | (40))
-#define EFI_2_31_SYSTEM_TABLE_REVISION ((2 << 16) | (31))
-#define EFI_2_30_SYSTEM_TABLE_REVISION ((2 << 16) | (30))
-#define EFI_2_20_SYSTEM_TABLE_REVISION ((2 << 16) | (20))
-#define EFI_2_10_SYSTEM_TABLE_REVISION ((2 << 16) | (10))
-#define EFI_2_00_SYSTEM_TABLE_REVISION ((2 << 16) | (00))
-#define EFI_1_10_SYSTEM_TABLE_REVISION ((1 << 16) | (10))
-#define EFI_1_02_SYSTEM_TABLE_REVISION ((1 << 16) | (02))
-#define EFI_SYSTEM_TABLE_REVISION EFI_2_70_SYSTEM_TABLE_REVISION
-#define EFI_SPECIFICATION_VERSION EFI_SYSTEM_TABLE_REVISION
+#define EFI_SYSTEM_TABLE_SIGNATURE SIGNATURE_64 ('I','B','I',' ','S','Y','S','T')
+#define EFI_2_110_SYSTEM_TABLE_REVISION ((2 << 16) | (110))
+#define EFI_2_100_SYSTEM_TABLE_REVISION ((2 << 16) | (100))
+#define EFI_2_90_SYSTEM_TABLE_REVISION ((2 << 16) | (90))
+#define EFI_2_80_SYSTEM_TABLE_REVISION ((2 << 16) | (80))
+#define EFI_2_70_SYSTEM_TABLE_REVISION ((2 << 16) | (70))
+#define EFI_2_60_SYSTEM_TABLE_REVISION ((2 << 16) | (60))
+#define EFI_2_50_SYSTEM_TABLE_REVISION ((2 << 16) | (50))
+#define EFI_2_40_SYSTEM_TABLE_REVISION ((2 << 16) | (40))
+#define EFI_2_31_SYSTEM_TABLE_REVISION ((2 << 16) | (31))
+#define EFI_2_30_SYSTEM_TABLE_REVISION ((2 << 16) | (30))
+#define EFI_2_20_SYSTEM_TABLE_REVISION ((2 << 16) | (20))
+#define EFI_2_10_SYSTEM_TABLE_REVISION ((2 << 16) | (10))
+#define EFI_2_00_SYSTEM_TABLE_REVISION ((2 << 16) | (00))
+#define EFI_1_10_SYSTEM_TABLE_REVISION ((1 << 16) | (10))
+#define EFI_1_02_SYSTEM_TABLE_REVISION ((1 << 16) | (02))
+#define EFI_SYSTEM_TABLE_REVISION EFI_2_70_SYSTEM_TABLE_REVISION
+#define EFI_SPECIFICATION_VERSION EFI_SYSTEM_TABLE_REVISION
#define EFI_RUNTIME_SERVICES_SIGNATURE SIGNATURE_64 ('R','U','N','T','S','E','R','V')
#define EFI_RUNTIME_SERVICES_REVISION EFI_SPECIFICATION_VERSION
@@ -1814,50 +1878,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.
@@ -1866,95 +1929,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;
///
@@ -1965,11 +2028,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;
///
@@ -1979,63 +2042,67 @@ 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_SIMPLE_TEXT_INPUT_PROTOCOL and EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL. If
+ /// there is no active console, these protocols must still be present.
///
- 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.
+ /// The handle for the active console output device. This handle must support the
+ /// EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL. If there is no active console, these protocols
+ /// must still be present.
///
- 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.
+ /// This handle must support the EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL. If there
+ /// is no active console, this protocol must still be present.
///
- 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;
/**
@@ -2070,13 +2137,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.
@@ -2108,18 +2175,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
@@ -2129,40 +2196,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;
///
@@ -2173,56 +2240,61 @@ 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"
-
-#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
+#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_LOONGARCH64 L"\\EFI\\BOOT\\BOOTLOONGARCH64.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
+ #elif defined (MDE_CPU_LOONGARCH64)
+#define EFI_REMOVABLE_MEDIA_FILE_NAME EFI_REMOVABLE_MEDIA_FILE_NAME_LOONGARCH64
+ #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>
diff --git a/sys/contrib/edk2/MdePkg.dec b/sys/contrib/edk2/MdePkg.dec
index 2aa923068047..a509b51cf2a3 100644
--- a/sys/contrib/edk2/MdePkg.dec
+++ b/sys/contrib/edk2/MdePkg.dec
@@ -4,9 +4,14 @@
# It also provides the definitions(including PPIs/PROTOCOLs/GUIDs) of
# EFI1.10/UEFI2.7/PI1.7 and some Industry Standards.
#
-# Copyright (c) 2007 - 2019, Intel Corporation. All rights reserved.<BR>
+# Copyright (c) 2007 - 2024, Intel Corporation. All rights reserved.<BR>
# Portions copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>
-# (C) Copyright 2016 - 2020 Hewlett Packard Enterprise Development LP<BR>
+# (C) Copyright 2016 - 2021 Hewlett Packard Enterprise Development LP<BR>
+# Copyright (c) 2022, Loongson Technology Corporation Limited. All rights reserved.<BR>
+# Copyright (c) 2021 - 2022, Arm Limited. All rights reserved.<BR>
+# Copyright (C) 2023 Advanced Micro Devices, Inc. All rights reserved.<BR>
+# Copyright (c) 2023, Ampere Computing LLC. All rights reserved.<BR>
+# Copyright (c) Microsoft Corporation.<BR>
#
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
@@ -23,6 +28,9 @@
[Includes]
Include
+ Test/UnitTest/Include
+ Test/Mock/Include
+ Library/MipiSysTLib/mipisyst/library/include
[Includes.IA32]
Include/Ia32
@@ -42,6 +50,9 @@
[Includes.RISCV64]
Include/RiscV64
+[Includes.LOONGARCH64]
+ Include/LoongArch64
+
[LibraryClasses]
## @libraryclass Provides most usb APIs to support the Hid requests defined in Usb Hid 1.1 spec
# and the standard requests defined in Usb 1.1 spec.
@@ -251,6 +262,61 @@
#
UnitTestLib|Include/Library/UnitTestLib.h
+ ## @libraryclass Provides service to get the manufacturer given JEP106 bytes.
+ JedecJep106Lib|Include/Library/JedecJep106Lib.h
+
+ ## @libraryclass Extension to BaseLib for host based unit tests that allows a
+ # subset of BaseLib services to be hooked for emulation.
+ #
+ UnitTestHostBaseLib|Test/UnitTest/Include/Library/UnitTestHostBaseLib.h
+
+ ## @libraryclass This library provides an interface to request non-MMRAM pages to be mapped
+ # or unblocked from inside MM environment.
+ #
+ MmUnblockMemoryLib|Include/Library/MmUnblockMemoryLib.h
+
+ ## @libraryclass This library provides interfances to filter and trace port IO/MMIO/MSR access.
+ #
+ #
+ RegisterFilterLib|Include/Library/RegisterFilterLib.h
+
+ ## @libraryclass This library provides interfances to probe ConfidentialComputing guest type.
+ #
+ #
+ CcProbeLib|Include/Library/CcProbeLib.h
+
+ ## @libraryclass Provides function for SMM CPU Rendezvous Library.
+ SmmCpuRendezvousLib|Include/Library/SmmCpuRendezvousLib.h
+
+ ## @libraryclass Provides services to generate Entropy using a TRNG.
+ #
+ ArmTrngLib|Include/Library/ArmTrngLib.h
+
+ ## @libraryclass Provides APIs for third-party library libfdt.
+ #
+ FdtLib|Include/Library/FdtLib.h
+
+ ## @libraryclass Provides general mipi sys-T services.
+ #
+ MipiSysTLib|Include/Library/MipiSysTLib.h
+
+ ## @libraryclass Provides API to output Trace Hub debug message.
+ #
+ TraceHubDebugSysTLib|Include/Library/TraceHubDebugSysTLib.h
+
+ ## @libraryclass Provides a hook called when a stack cookie check fails.
+ #
+ StackCheckFailureHookLib|Include/Library/StackCheckFailureHookLib.h
+
+ ## @libraryclass Provides stack cookie checking functionality
+ #
+ StackCheckLib|Include/Library/StackCheckLib.h
+
+[LibraryClasses.IA32, LibraryClasses.X64, LibraryClasses.AARCH64]
+ ## @libraryclass Provides services to generate random number.
+ #
+ RngLib|Include/Library/RngLib.h
+
[LibraryClasses.IA32, LibraryClasses.X64]
## @libraryclass Abstracts both S/W SMI generation and detection.
##
@@ -272,13 +338,26 @@
#
SmmPeriodicSmiLib|Include/Library/SmmPeriodicSmiLib.h
- ## @libraryclass Provides services to generate random number.
- #
- RngLib|Include/Library/RngLib.h
-
## @libraryclass Provides services to log the SMI handler registration.
SmiHandlerProfileLib|Include/Library/SmiHandlerProfileLib.h
+ ## @libraryclass Provides function to support TDX processing.
+ TdxLib|Include/Library/TdxLib.h
+
+[LibraryClasses.X64]
+ ## @libraryclass Defines a set of interfaces for the MM core entrypoint. The ARM/AARCH64 version lives in ArmPkg
+ #
+ StandaloneMmCoreEntryPoint|Include/Library/StandaloneMmCoreEntryPoint.h
+
+[LibraryClasses.RISCV64]
+ ## @libraryclass Provides function to make ecalls to SBI
+ BaseRiscVSbiLib|Include/Library/BaseRiscVSbiLib.h
+
+[LibraryClasses.ARM, LibraryClasses.AARCH64]
+ ## @libraryclass Provides an interface to Arm registers.
+ #
+ ArmLib|Include/Library/ArmLib.h
+
[Guids]
#
# GUID defined in UEFI2.1/UEFI2.0/EFI1.1
@@ -377,10 +456,16 @@
gEfiEventReadyToBootGuid = { 0x7CE88FB3, 0x4BD7, 0x4679, { 0x87, 0xA8, 0xA8, 0xD8, 0xDE, 0xE5, 0x0D, 0x2B }}
## Include/Guid/EventGroup.h
+ gEfiEventAfterReadyToBootGuid = { 0x3a2a00ad, 0x98b9, 0x4cdf, { 0xa4, 0x78, 0x70, 0x27, 0x77, 0xf1, 0xc1, 0x0b }}
+
+ ## Include/Guid/EventGroup.h
gEfiEventMemoryMapChangeGuid = { 0x78BEE926, 0x692F, 0x48FD, { 0x9E, 0xDB, 0x01, 0x42, 0x2E, 0xF0, 0xD7, 0xAB }}
## Include/Guid/EventGroup.h
- gEfiEventVirtualAddressChangeGuid = { 0x13FA7698, 0xC831, 0x49C7, { 0x87, 0xEA, 0x8F, 0x43, 0xFC, 0xC2, 0x51, 0x96 }}
+ gEfiEventVirtualAddressChangeGuid = { 0x13FA7698, 0xC831, 0x49C7, { 0x87, 0xEA, 0x8F, 0x43, 0xFC, 0xC2, 0x51, 0x96 }}
+
+ ## Include/Guid/EventGroup.h
+ gEfiEventBeforeExitBootServicesGuid = { 0x8BE0E274, 0x3970, 0x4B44, { 0x80, 0xC5, 0x1A, 0xB9, 0x50, 0x2F, 0x3B, 0xFC }}
## Include/Guid/EventGroup.h
gEfiEventExitBootServicesGuid = { 0x27ABF055, 0xB1B8, 0x4C26, { 0x80, 0x48, 0x74, 0x8F, 0x37, 0xBA, 0xA2, 0xDF }}
@@ -554,6 +639,7 @@
gEfiCertSha384Guid = { 0xff3e5307, 0x9fd0, 0x48c9, {0x85, 0xf1, 0x8a, 0xd5, 0x6c, 0x70, 0x1e, 0x1 }}
gEfiCertSha512Guid = { 0x93e0fae, 0xa6c4, 0x4f50, {0x9f, 0x1b, 0xd4, 0x1e, 0x2b, 0x89, 0xc1, 0x9a }}
gEfiCertPkcs7Guid = { 0x4aafd29d, 0x68df, 0x49ee, {0x8a, 0xa9, 0x34, 0x7d, 0x37, 0x56, 0x65, 0xa7 }}
+ gEfiCertSm3Guid = { 0x57347f87, 0x7a9b, 0x403a, {0xb9, 0x3c, 0xdc, 0x4a, 0xfb, 0x7a, 0x0e, 0xbc }}
## Include/Protocol/Hash.h
gEfiHashAlgorithmSha1NoPadGuid = { 0x24c5dc2f, 0x53e2, 0x40ca, { 0x9e, 0xd6, 0xa5, 0xd9, 0xa4, 0x9f, 0x46, 0x3b }}
@@ -569,6 +655,7 @@
gEfiCertX509Sha256Guid = { 0x3bd2a492, 0x96c0, 0x4079, {0xb4, 0x20, 0xfc, 0xf9, 0x8e, 0xf1, 0x03, 0xed }}
gEfiCertX509Sha384Guid = { 0x7076876e, 0x80c2, 0x4ee6, {0xaa, 0xd2, 0x28, 0xb3, 0x49, 0xa6, 0x86, 0x5b }}
gEfiCertX509Sha512Guid = { 0x446dbf63, 0x2502, 0x4cda, {0xbc, 0xfa, 0x24, 0x65, 0xd2, 0xb0, 0xfe, 0x9d }}
+ gEfiCertX509Sm3Guid = { 0x60d807e5, 0x10b4, 0x49a9, {0x93, 0x31, 0xe4, 0x04, 0x37, 0x88, 0x8d, 0x37 }}
## Include/Protocol/Rng.h
gEfiRngAlgorithmSp80090Hash256Guid = { 0xa7af67cb, 0x603b, 0x4d42, {0xba, 0x21, 0x70, 0xbf, 0xb6, 0x29, 0x3f, 0x96 }}
@@ -577,6 +664,7 @@
gEfiRngAlgorithmX9313DesGuid = { 0x63c4785a, 0xca34, 0x4012, {0xa3, 0xc8, 0x0b, 0x6a, 0x32, 0x4f, 0x55, 0x46 }}
gEfiRngAlgorithmX931AesGuid = { 0xacd03321, 0x777e, 0x4d3d, {0xb1, 0xc8, 0x20, 0xcf, 0xd8, 0x88, 0x20, 0xc9 }}
gEfiRngAlgorithmRaw = { 0xe43176d7, 0xb6e8, 0x4827, {0xb7, 0x84, 0x7f, 0xfd, 0xc4, 0xb6, 0x85, 0x61 }}
+ gEfiRngAlgorithmArmRndr = { 0x43d2fde3, 0x9d4e, 0x4d79, {0x02, 0x96, 0xa8, 0x9b, 0xca, 0x78, 0x08, 0x41 }}
## Include/Protocol/AdapterInformation.h
gEfiAdapterInfoMediaStateGuid = { 0xD7C74207, 0xA831, 0x4A26, {0xB1, 0xF5, 0xD1, 0x93, 0x06, 0x5C, 0xE8, 0xB6 }}
@@ -626,6 +714,7 @@
gEfiBootManagerPolicyConsoleGuid = { 0xCAB0E94C, 0xE15F, 0x11E3, { 0x91, 0x8D, 0xB8, 0xE8, 0x56, 0x2C, 0xBA, 0xFA }}
gEfiBootManagerPolicyNetworkGuid = { 0xD04159DC, 0xE15F, 0x11E3, { 0xB2, 0x61, 0xB8, 0xE8, 0x56, 0x2C, 0xBA, 0xFA }}
gEfiBootManagerPolicyConnectAllGuid = { 0x113B2126, 0xFC8A, 0x11E3, { 0xBD, 0x6C, 0xB8, 0xE8, 0x56, 0x2C, 0xBA, 0xFA }}
+ gEfiBootManagerPolicyStorageGuid = { 0xCD68FE79, 0xD3CB, 0x436E, { 0xA8, 0x50, 0xF4, 0x43, 0xC8, 0x8C, 0xFB, 0x49 }}
## Include/Protocol/DevicePath.h
gEfiVirtualDiskGuid = { 0x77AB535A, 0x45FC, 0x624B, {0x55, 0x60, 0xF7, 0xB2, 0x81, 0xD1, 0xF9, 0x6E }}
@@ -663,13 +752,32 @@
gEfiJsonCapsuleIdGuid = { 0x67d6f4cd, 0xd6b8, 0x4573, { 0xbf, 0x4a, 0xde, 0x5e, 0x25, 0x2d, 0x61, 0xae }}
## Include/Guid/HiiPlatformSetupFormset.h
- gEfiHiiResetStyleFormsetGuid = { 0x790217bd, 0xbecf, 0x485b, { 0x91, 0x70, 0x5f, 0xf7, 0x11, 0x31, 0x8b, 0x27 }}
+ gEfiHiiRestStyleFormsetGuid = { 0x790217bd, 0xbecf, 0x485b, { 0x91, 0x70, 0x5f, 0xf7, 0x11, 0x31, 0x8b, 0x27 }}
# GUIDs defined in UEFI2.8a
#
## Include/Guid/RtPropertiesTable.h
gEfiRtPropertiesTableGuid = { 0xeb66918a, 0x7eef, 0x402a, { 0x84, 0x2e, 0x93, 0x1d, 0x21, 0xc3, 0x8a, 0xe9 }}
+ ## Include/Protocol/SerilaIo.h
+ gEfiSerialTerminalDeviceTypeGuid = { 0x6AD9A60F, 0x5815, 0x4C7C, { 0x8A, 0x10, 0x50, 0x53, 0xD2, 0xBF, 0x7A, 0x1B }}
+
+ # GUIDs defined in UEFI2.10
+ #
+ ## GUID used to specify section with devdb content
+ ## Include/Guid/DeviceAuthentication.h
+ gEfiDeviceSignatureDatabaseGuid = { 0xb9c2b4f4, 0xbf5f, 0x462d, {0x8a, 0xdf, 0xc5, 0xc7, 0xa, 0xc3, 0x5d, 0xad }}
+
+ ## Include/Guid/ConformanceProfiles.h
+ gEfiConfProfilesTableGuid = { 0x36122546, 0xf7e7, 0x4c8f, { 0xbd, 0x9b, 0xeb, 0x85, 0x25, 0xb5, 0x0c, 0x0b }}
+ gEfiConfProfilesUefiSpecGuid = { 0x523c91af, 0xa195, 0x4382, { 0x81, 0x8d, 0x29, 0x5f, 0xe4, 0x00, 0x64, 0x65 }}
+
+ # GUIDs defined in EBBR
+ #
+ ## Include/Guid/ConformanceProfiles.h
+ gEfiConfProfilesEbbrSpec21Guid = { 0xcce33c35, 0x74ac, 0x4087, { 0xbc, 0xe7, 0x8b, 0x29, 0xb0, 0x2e, 0xeb, 0x27 }}
+ gEfiConfProfilesEbbrSpec22Guid = { 0x9073eed4, 0xe50d, 0x11ee, { 0xb8, 0xb0, 0x8b, 0x68, 0xda, 0x62, 0xfc, 0x80 }}
+
#
# GUID defined in PI1.0
#
@@ -798,6 +906,14 @@
#
gTianoCustomDecompressGuid = { 0xA31280AD, 0x481E, 0x41B6, { 0x95, 0xE8, 0x12, 0x7F, 0x4C, 0x98, 0x47, 0x79 }}
+ #
+ # GUID used to provide initrd to linux via LoadFile2 protocol
+ #
+ gLinuxEfiInitrdMediaGuid = {0x5568e427, 0x68fc, 0x4f3d, {0xac, 0x74, 0xca, 0x55, 0x52, 0x31, 0xcc, 0x68}}
+
+ ## Include/Protocol/CcMeasurement.h
+ gEfiCcFinalEventsTableGuid = { 0xdd4a4648, 0x2de7, 0x4665, { 0x96, 0x4d, 0x21, 0xd9, 0xef, 0x5f, 0xb4, 0x46 }}
+
[Guids.IA32, Guids.X64]
## Include/Guid/Cper.h
gEfiIa32X64ErrorTypeCacheCheckGuid = { 0xA55701F5, 0xE3EF, 0x43de, { 0xAC, 0x72, 0x24, 0x9B, 0x57, 0x3F, 0xAD, 0x2C }}
@@ -963,6 +1079,12 @@
## Include/Ppi/MmControl.h
gEfiPeiMmControlPpiGuid = { 0x61c68702, 0x4d7e, 0x4f43, { 0x8d, 0xef, 0xa7, 0x43, 0x5, 0xce, 0x74, 0xc5 }}
+ ## Include/Ppi/MmConfiguration.h
+ gEfiPeiMmConfigurationPpi = { 0xc109319, 0xc149, 0x450e, { 0xa3, 0xe3, 0xb9, 0xba, 0xdd, 0x9d, 0xc3, 0xa4 } }
+
+ ## Include/Ppi/MmCommunication.h
+ gEfiPeiMmCommunicationPpiGuid = { 0xae933e1c, 0xcc47, 0x4e38, { 0x8f, 0xe, 0xe2, 0xf6, 0x1d, 0x26, 0x5, 0xdf } }
+
#
# PPIs defined in PI 1.7.
#
@@ -973,13 +1095,22 @@
## Include/Ppi/DelayedDispatch.h
gEfiPeiDelayedDispatchPpiGuid = { 0x869c711d, 0x649c, 0x44fe, { 0x8b, 0x9e, 0x2c, 0xbb, 0x29, 0x11, 0xc3, 0xe6 }}
+ ## Include/Ppi/Rng.h
+ gEfiRngPpiGuid = { 0xeaed0a7e, 0x1a70, 0x4c2b, { 0x85, 0x58, 0x37, 0x17, 0x74, 0x56, 0xd8, 0x06 }}
+
[Protocols]
+ ## Include/Protocol/MemoryAccept.h
+ gEdkiiMemoryAcceptProtocolGuid = { 0x38c74800, 0x5590, 0x4db4, { 0xa0, 0xf3, 0x67, 0x5d, 0x9b, 0x8e, 0x80, 0x26 }}
+
## Include/Protocol/Pcd.h
gPcdProtocolGuid = { 0x11B34006, 0xD85B, 0x4D0A, { 0xA2, 0x90, 0xD5, 0xA5, 0x71, 0x31, 0x0E, 0xF7 }}
## Include/Protocol/PcdInfo.h
gGetPcdInfoProtocolGuid = { 0x5be40f57, 0xfa68, 0x4610, { 0xbb, 0xbf, 0xe9, 0xc5, 0xfc, 0xda, 0xd3, 0x65 } }
+ ## Include/Protocol/CcMeasurement.h
+ gEfiCcMeasurementProtocolGuid = { 0x96751a3d, 0x72f4, 0x41a6, { 0xa7, 0x94, 0xed, 0x5d, 0x0e, 0x67, 0xae, 0x6b }}
+
#
# Protocols defined in PI1.0.
#
@@ -1274,6 +1405,10 @@
## Include/Protocol/MmCommunication.h
gEfiMmCommunicationProtocolGuid = { 0xc68ed8e2, 0x9dc6, 0x4cbd, { 0x9d, 0x94, 0xdb, 0x65, 0xac, 0xc5, 0xc3, 0x32 }}
+ ## This protocol is a MM protocol published by a standalone MM Foundation code if MM Foundation is loaded in PEI phase.
+ ## This protocol should be installed immediately after DXE IPL installs EFI_PEI_END_OF_PEI_PHASE_PPI
+ gEfiMmEndOfPeiProtocol = { 0xf33e1bf3, 0x980b, 0x4bfb, { 0xa2, 0x9a, 0xb2, 0x9c, 0x86, 0x45, 0x37, 0x32 }}
+
#
# Protocols defined in PI 1.6.
#
@@ -1840,6 +1975,22 @@
gEfiNvdimmLabelProtocolGuid = { 0xd40b6b80, 0x97d5, 0x4282, { 0xbb, 0x1d, 0x22, 0x3a, 0x16, 0x91, 0x80, 0x58 }}
#
+ # Protocols defined in UEFI2.8
+ #
+ ## Include/Protocol/RestEx.h
+ gEfiRestExProtocolGuid = { 0x55648b91, 0xe7d, 0x40a3, { 0xa9, 0xb3, 0xa8, 0x15, 0xd7, 0xea, 0xdf, 0x97 }}
+ gEfiRestExServiceBindingProtocolGuid = { 0x456bbe01, 0x99d0, 0x45ea, { 0xbb, 0x5f, 0x16, 0xd8, 0x4b, 0xed, 0xc5, 0x59 }}
+
+ ## Include/Protocol/RestJsonStructure.h
+ gEfiRestJsonStructureProtocolGuid = { 0xa9a048f6, 0x48a0, 0x4714, {0xb7, 0xda, 0xa9, 0xad,0x87, 0xd4, 0xda, 0xc9 }}
+
+ ## Include/Protocol/RedfishDiscover.h
+ gEfiRedfishDiscoverProtocolGuid = { 0x5db12509, 0x4550, 0x4347, { 0x96, 0xb3, 0x73, 0xc0, 0xff, 0x6e, 0x86, 0x9f }}
+
+ ## Include/Protocol/MemoryAttribute.h
+ gEfiMemoryAttributeProtocolGuid = { 0xf4560cf6, 0x40ec, 0x4b4a, { 0xa1, 0x92, 0xbf, 0x1d, 0x57, 0xd0, 0xb1, 0x89 }}
+
+ #
# Protocols defined in Shell2.0
#
## Include/Protocol/Shell.h
@@ -2087,8 +2238,15 @@
# @ValidList 0x80000003 | 0x3040003
gEfiMdePkgTokenSpaceGuid.PcdStatusCodeValueDxeDriverEnd|0x3040003|UINT32|0x30001014
- ## This flag is used to control build time optimization based on debug print level.
- # Its default value is 0xFFFFFFFF to expose all debug print level.
+ ## This flag is used to control fixed-at-build optimization of DEBUG_PRINT macros.<BR><BR>
+ # The default value is 0xFFFFFFFF, meaning that DEBUG_PRINT (...) always evaluates
+ # the macro arguments and always invokes DebugPrint (...). If you want to optimize
+ # messages, you might set this to a more restrictive value like 0x80000002 (optimize-out
+ # everything except errors and warnings).<BR><BR>
+ # This flag is consumed by DebugLib's DebugPrintLevelEnabled (Level) function. The
+ # DEBUG_PRINT (Level, Format, ...) macro in DebugLib.h calls DebugPrintLevelEnabled (Level)
+ # to filter the output, and most implementations of DebugPrintLevelEnabled (Level) simply
+ # return (Level & PcdFixedDebugPrintErrorLevel) != 0.<BR><BR>
# BIT0 - Initialization message.<BR>
# BIT1 - Warning message.<BR>
# BIT2 - Load Event message.<BR>
@@ -2107,6 +2265,7 @@
# BIT20 - Global Coherency Database changes message.<BR>
# BIT21 - Memory range cachability changes message.<BR>
# BIT22 - Detailed debug message.<BR>
+ # BIT23 - Manageability debug message.<BR>
# BIT31 - Error message.<BR>
# @Prompt Fixed Debug Message Print Level.
gEfiMdePkgTokenSpaceGuid.PcdFixedDebugPrintErrorLevel|0xFFFFFFFF|UINT32|0x30001016
@@ -2127,6 +2286,15 @@
# @Prompt Speculation Barrier Type.
gEfiMdePkgTokenSpaceGuid.PcdSpeculationBarrierType|0x01|UINT8|0x30001018
+ ## This PCD specifies the interrupt vector for stack cookie check failures
+ gEfiMdePkgTokenSpaceGuid.PcdStackCookieExceptionVector|0x42|UINT8|0x30001019
+
+ ## Enforces the use of Secure UEFI spec defined RNG algorithms.
+ # TRUE - Enforce the use of Secure UEFI spec defined RNG algorithms.
+ # FALSE - Do not enforce and depend on the default implementation of RNG algorithm from the provider.
+ # @Prompt Enforce the use of Secure UEFI spec defined RNG algorithms.
+ gEfiMdePkgTokenSpaceGuid.PcdEnforceSecureRngAlgorithms|TRUE|BOOLEAN|0x1000000D
+
[PcdsFixedAtBuild,PcdsPatchableInModule]
## Indicates the maximum length of unicode string used in the following
# BaseLib functions: StrLen(), StrSize(), StrCmp(), StrnCmp(), StrCpy(), StrnCpy()<BR><BR>
@@ -2162,17 +2330,30 @@
gEfiMdePkgTokenSpaceGuid.PcdSpinLockTimeout|10000000|UINT32|0x00000004
## The mask is used to control DebugLib behavior.<BR><BR>
- # BIT0 - Enable Debug Assert.<BR>
- # BIT1 - Enable Debug Print.<BR>
- # BIT2 - Enable Debug Code.<BR>
- # BIT3 - Enable Clear Memory.<BR>
- # BIT4 - Enable BreakPoint as ASSERT.<BR>
- # BIT5 - Enable DeadLoop as ASSERT.<BR>
+ # Note that if the MDEPKG_NDEBUG macro is defined, the ASSERT***, CR, and DEBUG macros will be
+ # no-ops regardless of this value.<BR>
+ # Note that MDEPKG_NDEBUG does not affect DEBUG_PRINT.<BR><BR>
+ # BIT0 - ASSERT_ENABLED: Enable the ASSERT*** and CR macros.<BR>
+ # BIT1 - PRINT_ENABLED: Enable the DEBUG macro (does not affect the DEBUG_PRINT macro).<BR>
+ # BIT2 - CODE_ENABLED: Enable the DEBUG_CODE_BEGIN macro.<BR>
+ # BIT3 - CLEAR_MEMORY_ENABLED: Enable the DEBUG_CLEAR_MEMORY macro.<BR>
+ # BIT4 - ASSERT_BREAKPOINT_ENABLED: Enable BreakPoint for failed ASSERT.<BR>
+ # BIT5 - ASSERT_DEADLOOP_ENABLED: Enable DeadLoop for failed ASSERT.<BR>
# @Prompt Debug Property.
# @Expression 0x80000002 | (gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask & 0xC0) == 0
gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask|0|UINT8|0x00000005
- ## This flag is used to control the print out Debug message.<BR><BR>
+ ## This flag is used to filter the output of the DEBUG_PRINT macro and DebugPrint functions.<BR><BR>
+ # The default value is 0x80000000, meaning that DebugPrint returns immediately for anything
+ # except errors. You might set this to a value like 0x80000002 to also enable warnings.<BR><BR>
+ # This flag is consumed by the BaseDebugPrintErrorLevelLib implementation of
+ # GetDebugPrintErrorLevel (). DebugLib's DebugPrint (Level, ...) functions return immediately if
+ # (GetDebugPrintErrorLevel() & Level) == 0. Other implementations of DebugPrintErrorLevelLib
+ # may provide different definitions of GetDebugPrintErrorLevel ().<BR><BR>
+ # Note that the DEBUG_PRINT macro also uses PcdFixedDebugPrintErrorLevel to determine whether
+ # or not it calls the DebugPrint function, so your message level needs to be enabled in both
+ # PcdFixedDebugPrintErrorLevel and PcdDebugPrintErrorLevel settings for the DEBUG_PRINT macro
+ # to work.<BR><BR>
# BIT0 - Initialization message.<BR>
# BIT1 - Warning message.<BR>
# BIT2 - Load Event message.<BR>
@@ -2191,6 +2372,7 @@
# BIT20 - Global Coherency Database changes message.<BR>
# BIT21 - Memory range cachability changes message.<BR>
# BIT22 - Detailed debug message.<BR>
+ # BIT23 - Manageability messages.<BR>
# BIT31 - Error message.<BR>
# @Prompt Debug Message Print Level.
# @Expression 0x80000002 | (gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel & 0x7F84AA00) == 0
@@ -2233,10 +2415,6 @@
# @ValidList 0x80000001 | 8, 16, 32
gEfiMdePkgTokenSpaceGuid.PcdPort80DataWidth|8|UINT8|0x0000002d
- ## This value is used to configure X86 Processor FSB clock.
- # @Prompt FSB Clock.
- gEfiMdePkgTokenSpaceGuid.PcdFSBClock|200000000|UINT32|0x0000000c
-
## The maximum printable number of characters. UefLib functions: AsciiPrint(), AsciiErrorPrint(),
# PrintXY(), AsciiPrintXY(), Print(), ErrorPrint() base on this PCD value to print characters.
# @Prompt Maximum Printable Number of Characters.
@@ -2260,11 +2438,105 @@
# @Prompt Memory Address of GuidedExtractHandler Table.
gEfiMdePkgTokenSpaceGuid.PcdGuidedExtractHandlerTableAddress|0x1000000|UINT64|0x30001015
+ ## This value is the IPMI KCS Interface I/O base address used to transmit IPMI commands.
+ # The value of 0xca2 is the default I/O base address defined in IPMI specification.
+ # @Prompt IPMI KCS Interface I/O Base Address
+ gEfiMdePkgTokenSpaceGuid.PcdIpmiKcsIoBaseAddress|0xca2|UINT16|0x00000031
+
+ ## This is SMBus slave address for the SSIF to the BMC.
+ # The recommended value defined by IPMI specification is 0x20 (section 12.12).
+ # @Prompt IPMI SSIF SMBus slave address
+ gEfiMdePkgTokenSpaceGuid.PcdIpmiSsifSmbusSlaveAddr|0x20|UINT8|0x00000032
+
+ ## This is the maximum number of IPMI SSIF request retries.
+ # The IPMI specification specified min value is 5 (section 12.17).
+ # @Prompt Number of IPMI SSIF request retries.
+ gEfiMdePkgTokenSpaceGuid.PcdIpmiSsifRequestRetryCount|0x05|UINT8|0x00000033
+
+ ## This is the required interval for each IPMI request retry.
+ # The IPMI specification specified a time range of 60ms to 250ms (section 12.17).
+ # The default setting is min.
+ # @Prompt Time between IPMI SSIF request retries.
+ gEfiMdePkgTokenSpaceGuid.PcdIpmiSsifRequestRetryIntervalMicrosecond|60000|UINT32|0x00000034
+
+ ## This value is the maximum retries of an IPMI SSIF response
+ # The default value is the same as the Linux Kernel ipmi_ssif driver.
+ # @Prompt Number of IPMI SSIF response retries.
+ gEfiMdePkgTokenSpaceGuid.PcdIpmiSsifResponseRetryCount|250|UINT8|0x00000035
+
+ ## This is the required interval for each IPMI response retry.
+ # The IPMI specification specified min value is 60ms (section 12.17).
+ # @Prompt Time-out for a response, internal
+ gEfiMdePkgTokenSpaceGuid.PcdIpmiSsifResponseRetryIntervalMicrosecond|60000|UINT32|0x00000036
+
+ ## This is requester's Software IDs for IPMI Serial.
+ # This byte is 20h when the BMC is the requester (section 14.4.3).
+ # @Prompt IPMI Serial requester Software ID
+ gEfiMdePkgTokenSpaceGuid.PcdIpmiSerialRequesterAddress|0x20|UINT8|0x00000050
+
+ ## This is responder's Software IDs for IPMI Serial.
+ # This byte is 20h when the BMC is the responder (section 14.4.3).
+ # @Prompt IPMI Serial responder Software ID
+ gEfiMdePkgTokenSpaceGuid.PcdIpmiSerialResponderAddress|0x20|UINT8|0x00000051
+
+ ## This is requester's LUN for IPMI Serial.
+ # @Prompt IPMI Serial requester LUN
+ gEfiMdePkgTokenSpaceGuid.PcdIpmiSerialRequesterLun|0x0|UINT8|0x00000052
+
+ ## This is responder's LUN for IPMI Serial.
+ # @Prompt IPMI Serial responder LUN
+ gEfiMdePkgTokenSpaceGuid.PcdIpmiSerialResponderLun|0x0|UINT8|0x00000053
+
+ ## This is the maximum number of IPMI Serial request retries.
+ # The IPMB specification specified min value is 5 (section 4).
+ # @Prompt Number of IPMI Serial request retries.
+ gEfiMdePkgTokenSpaceGuid.PcdIpmiSerialRequestRetryCount|5|UINT8|0x00000054
+
+ ## This is the required interval for each IPMI request retry.
+ # The IPMB specification specified min value is 60ms (section 4).
+ # @Prompt Time-out for a request, internal
+ gEfiMdePkgTokenSpaceGuid.PcdIpmiSerialRequestRetryInterval|60000|UINT32|0x00000055
+
+[PcdsFixedAtBuild.AARCH64, PcdsPatchableInModule.AARCH64]
+ ## GUID identifying the Rng algorithm implemented by CPU instruction.
+ # @Prompt CPU Rng algorithm's GUID.
+ gEfiMdePkgTokenSpaceGuid.PcdCpuRngSupportedAlgorithm|{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}|VOID*|0x00000037
+
+[PcdsFixedAtBuild.RISCV64, PcdsPatchableInModule.RISCV64]
+ #
+ # Configurability to override RISC-V CPU Features
+ # BIT 0 = Cache Management Operations. This bit is relevant only if
+ # previous stage has feature enabled and user wants to disable it.
+ # BIT 1 = Supervisor Time Compare (Sstc). This bit is relevant only if
+ # previous stage has feature enabled and user wants to disable it.
+ # BIT 2 = Page-Based Memory Types (Pbmt). This bit is relevant only if
+ # previous stage has feature enabled and user wants to disable it.
+ # BIT 3 = Zkr extension.This bit is relevant only if
+ # previous stage has feature enabled and user wants to disable it.
+ #
+ gEfiMdePkgTokenSpaceGuid.PcdRiscVFeatureOverride|0xFFFFFFFFFFFFFFFF|UINT64|0x69
+
[PcdsFixedAtBuild, PcdsPatchableInModule, PcdsDynamic, PcdsDynamicEx]
## This value is used to set the base address of PCI express hierarchy.
# @Prompt PCI Express Base Address.
gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress|0xE0000000|UINT64|0x0000000a
+ ## This value is used to set the base address of PCI MMIO window that provides I/O access.
+ # @Prompt PCI I/O Memory Map Window Base Address.
+ gEfiMdePkgTokenSpaceGuid.PcdPciIoTranslation|0x0|UINT64|0x00000040
+
+ ## This value is used for the 32-bit PCI memory map I/O base address translation.
+ # @Prompt 32-bit PCI Memory Map I/O Base Address translation.
+ gEfiMdePkgTokenSpaceGuid.PcdPciMmio32Translation|0x0|UINT64|0x00000041
+
+ ## This value is used for the 64-bit PCI memory map I/O base address translation.
+ # @Prompt 64-bit PCI Memory Map I/O Base Address translation.
+ gEfiMdePkgTokenSpaceGuid.PcdPciMmio64Translation|0x0|UINT64|0x00000042
+
+ ## This value is used to set the size of PCI express hierarchy. The default is 256 MB.
+ # @Prompt PCI Express Base Size.
+ gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseSize|0x10000000|UINT64|0x0000000f
+
## Default current ISO 639-2 language: English & French.
# @Prompt Default Value of LangCodes Variable.
gEfiMdePkgTokenSpaceGuid.PcdUefiVariableDefaultLangCodes|"engfraengfra"|VOID*|0x0000001c
@@ -2336,5 +2608,13 @@
# @Prompt Boot Timeout (s)
gEfiMdePkgTokenSpaceGuid.PcdPlatformBootTimeOut|0xffff|UINT16|0x0000002c
+ ## This value is used to configure X86 Processor FSB clock.
+ # @Prompt FSB Clock.
+ gEfiMdePkgTokenSpaceGuid.PcdFSBClock|200000000|UINT32|0x0000000c
+
+ ## This dynamic PCD indicates the memory encryption attribute of the guest.
+ # @Prompt Memory encryption attribute
+ gEfiMdePkgTokenSpaceGuid.PcdConfidentialComputingGuestAttr|0|UINT64|0x0000002e
+
[UserExtensions.TianoCore."ExtraFiles"]
MdePkgExtra.uni