some new definitions from edk2

Signed-off-by: SergeySlice <sergey.slice@gmail.com>
This commit is contained in:
SergeySlice 2022-12-10 12:28:44 +03:00
parent ff1681ad80
commit 629515fbfa
7 changed files with 121 additions and 8 deletions

View File

@ -73,9 +73,9 @@ SERIAL_DEV gSerialDevTemplate = {
1, // RegisterStride
0, // ClockRate
16, // ReceiveFifoDepth
{ 0, 0 }, // Receive;
{ 0, 0, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0} }, // Receive;
16, // TransmitFifoDepth
{ 0, 0 }, // Transmit;
{ 0, 0, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0} }, // Transmit;
FALSE, // SoftwareLoopbackEnable;
FALSE, // HardwareFlowControl;
NULL, // *ControllerNameTable;

View File

@ -304,7 +304,7 @@ typedef union {
UINT16 AtomicOpEgressBlocking : 1;
UINT16 IdoRequest : 1;
UINT16 IdoCompletion : 1;
UINT16 LtrMechanism : 2;
UINT16 LtrMechanism : 1;
UINT16 EmergencyPowerReductionRequest : 1;
UINT16 TenBitTagRequesterEnable : 1;
UINT16 Obff : 2;

View File

@ -78,6 +78,34 @@ typedef struct {
} PCI_EXPRESS_EXTENDED_CAPABILITIES_PHYSICAL_LAYER_16_0;
///@}
/// The Designated Vendor Specific Capability definitions
/// Based on section 7.9.6 of PCI Express Base Specification 4.0.
///@{
typedef union {
struct {
UINT32 DvsecVendorId : 16; //bit 0..15
UINT32 DvsecRevision : 4; //bit 16..19
UINT32 DvsecLength : 12; //bit 20..31
}Bits;
UINT32 Uint32;
}PCI_EXPRESS_DESIGNATED_VENDOR_SPECIFIC_HEADER_1;
typedef union {
struct {
UINT16 DvsecId : 16; //bit 0..15
}Bits;
UINT16 Uint16;
}PCI_EXPRESS_DESIGNATED_VENDOR_SPECIFIC_HEADER_2;
typedef struct {
PCI_EXPRESS_EXTENDED_CAPABILITIES_HEADER Header;
PCI_EXPRESS_DESIGNATED_VENDOR_SPECIFIC_HEADER_1 DesignatedVendorSpecificHeader1;
PCI_EXPRESS_DESIGNATED_VENDOR_SPECIFIC_HEADER_2 DesignatedVendorSpecificHeader2;
UINT8 DesignatedVendorSpecific[1];
}PCI_EXPRESS_EXTENDED_CAPABILITIES_DESIGNATED_VENDOR_SPECIFIC;
///@}
#pragma pack()
#endif

View File

@ -5442,10 +5442,19 @@ typedef union {
UINT32 OSXMMEXCPT:1; ///< Operating System Support for
///< Unmasked SIMD Floating Point
///< Exceptions.
UINT32 Reserved_2:1; ///< Reserved.
UINT32 UMIP:1; ///< User-Mode Instruction Prevention.
UINT32 LA57:1; ///< Linear Address 57bit.
UINT32 VMXE:1; ///< VMX Enable
UINT32 Reserved_1:18; ///< Reserved.
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;
} IA32_CR4;
@ -7935,6 +7944,37 @@ AsmLfence (
VOID
);
/**
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 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
);
/**
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

View File

@ -289,7 +289,39 @@ DebugPrintLevelEnabled (
@param Expression Boolean expression that evaluated to FALSE
**/
#define _ASSERT(Expression) DebugAssert (__FILE__, __LINE__, #Expression)
//#define _ASSERT(Expression) DebugAssert (__FILE__, __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(__clang__) && defined(__FILE_NAME__)
#define _ASSERT(Expression) UnitTestDebugAssert (__FILE_NAME__, __LINE__, #Expression)
#else
#define _ASSERT(Expression) UnitTestDebugAssert (__FILE__, __LINE__, #Expression)
#endif
#else
#if defined(__clang__) && defined(__FILE_NAME__)
#define _ASSERT(Expression) DebugAssert (__FILE_NAME__, __LINE__, #Expression)
#else
#define _ASSERT(Expression) DebugAssert (__FILE__, __LINE__, #Expression)
#endif
#endif
/**

View File

@ -107,6 +107,13 @@ typedef enum {
//
#define EFI_MEMORY_RUNTIME 0x8000000000000000ULL
//
// Attributes bitmasks, grouped by type
//
#define EFI_CACHE_ATTRIBUTE_MASK (EFI_MEMORY_UC | EFI_MEMORY_WC | EFI_MEMORY_WT | EFI_MEMORY_WB | EFI_MEMORY_UCE | EFI_MEMORY_WP)
#define EFI_MEMORY_ATTRIBUTE_MASK (EFI_MEMORY_RP | EFI_MEMORY_XP | EFI_MEMORY_RO | EFI_MEMORY_SP | EFI_MEMORY_CPU_CRYPTO)
///
/// Memory descriptor version number.
///
@ -1781,11 +1788,13 @@ EFI_STATUS
#define EFI_OS_INDICATIONS_FMP_CAPSULE_SUPPORTED 0x0000000000000008
#define EFI_OS_INDICATIONS_CAPSULE_RESULT_VAR_SUPPORTED 0x0000000000000010
#define EFI_OS_INDICATIONS_START_PLATFORM_RECOVERY 0x0000000000000040
#define EFI_OS_INDICATIONS_JSON_CONFIG_DATA_REFRESH 0x0000000000000080
//
// 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))
@ -2198,6 +2207,7 @@ typedef struct {
#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
@ -2208,6 +2218,9 @@ typedef struct {
#define EFI_REMOVABLE_MEDIA_FILE_NAME EFI_REMOVABLE_MEDIA_FILE_NAME_ARM
#elif defined (MDE_CPU_AARCH64)
#define EFI_REMOVABLE_MEDIA_FILE_NAME EFI_REMOVABLE_MEDIA_FILE_NAME_AARCH64
#elif defined (MDE_CPU_RISCV64)
#define EFI_REMOVABLE_MEDIA_FILE_NAME EFI_REMOVABLE_MEDIA_FILE_NAME_RISCV64
#else
#error Unknown Processor Type
#endif

@ -1 +1 @@
Subproject commit cde12f2c5b0efb2120f191eccaeb413f1465864e
Subproject commit 312958a5615e391d45e869ec9ff7db76b147f886