UefiCpuPkg: Apply uncrustify changes

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3737

Apply uncrustify changes to .c/.h files in the UefiCpuPkg package

Cc: Andrew Fish <afish@apple.com>
Cc: Leif Lindholm <leif@nuviainc.com>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
Reviewed-by: Ray Ni <ray.ni@intel.com>
This commit is contained in:
Michael Kubacki
2021-12-05 14:54:17 -08:00
committed by mergify[bot]
parent 91415a36ae
commit 053e878bfb
143 changed files with 14130 additions and 13035 deletions

View File

@@ -52,19 +52,19 @@ typedef struct {
//
// Record the package count in this CPU.
//
UINT32 PackageCount;
UINT32 PackageCount;
//
// Record the max core count in this CPU.
// Different packages may have different core count, this value
// save the max core count in all the packages.
//
UINT32 MaxCoreCount;
UINT32 MaxCoreCount;
//
// Record the max thread count in this CPU.
// Different cores may have different thread count, this value
// save the max thread count in all the cores.
//
UINT32 MaxThreadCount;
UINT32 MaxThreadCount;
//
// This field points to an array.
// This array saves thread count (type UINT32) of each package.
@@ -74,7 +74,7 @@ typedef struct {
// therefore it doesn't need the dependency semaphores, it should set
// this field to 0.
//
EFI_PHYSICAL_ADDRESS ThreadCountPerPackage;
EFI_PHYSICAL_ADDRESS ThreadCountPerPackage;
//
// This field points to an array.
// This array saves thread count (type UINT8) of each core.
@@ -84,21 +84,21 @@ typedef struct {
// therefore it doesn't need the dependency semaphores, it should set
// this field to 0.
//
EFI_PHYSICAL_ADDRESS ThreadCountPerCore;
EFI_PHYSICAL_ADDRESS ThreadCountPerCore;
} CPU_STATUS_INFORMATION;
//
// Element of register table entry
//
typedef struct {
REGISTER_TYPE RegisterType; // offset 0 - 3
UINT32 Index; // offset 4 - 7
UINT8 ValidBitStart; // offset 8
UINT8 ValidBitLength; // offset 9
BOOLEAN TestThenWrite; // offset 10
UINT8 Reserved1; // offset 11
UINT32 HighIndex; // offset 12-15, only valid for MemoryMapped
UINT64 Value; // offset 16-23
REGISTER_TYPE RegisterType; // offset 0 - 3
UINT32 Index; // offset 4 - 7
UINT8 ValidBitStart; // offset 8
UINT8 ValidBitLength; // offset 9
BOOLEAN TestThenWrite; // offset 10
UINT8 Reserved1; // offset 11
UINT32 HighIndex; // offset 12-15, only valid for MemoryMapped
UINT64 Value; // offset 16-23
} CPU_REGISTER_TABLE_ENTRY;
//
@@ -109,20 +109,20 @@ typedef struct {
//
// The number of valid entries in the RegisterTableEntry buffer
//
UINT32 TableLength;
UINT32 NumberBeforeReset;
UINT32 TableLength;
UINT32 NumberBeforeReset;
//
// The size, in bytes, of the RegisterTableEntry buffer
//
UINT32 AllocatedSize;
UINT32 AllocatedSize;
//
// The initial APIC ID of the CPU this register table applies to
//
UINT32 InitialApicId;
UINT32 InitialApicId;
//
// Physical address of CPU_REGISTER_TABLE_ENTRY structures.
//
EFI_PHYSICAL_ADDRESS RegisterTableEntry;
EFI_PHYSICAL_ADDRESS RegisterTableEntry;
} CPU_REGISTER_TABLE;
//
@@ -151,11 +151,11 @@ typedef struct {
// If a register table is not required for any one of the CPUs, then
// RegisterTable may be set to 0.
//
EFI_PHYSICAL_ADDRESS RegisterTable;
EFI_PHYSICAL_ADDRESS RegisterTable;
//
// CPU information which is required when set the register table.
//
CPU_STATUS_INFORMATION CpuStatus;
CPU_STATUS_INFORMATION CpuStatus;
//
// Location info for each AP.
// It points to an array which saves all APs location info.
@@ -180,7 +180,7 @@ typedef struct {
// it is recommended that the buffer be zero-filled. This buffer is used to
// wake APs during an ACPI S3 resume.
//
EFI_PHYSICAL_ADDRESS StartupVector;
EFI_PHYSICAL_ADDRESS StartupVector;
//
// Physical address of structure of type IA32_DESCRIPTOR. The
// IA32_DESCRIPTOR structure provides the base address and length of a GDT
@@ -188,7 +188,7 @@ typedef struct {
// used during an ACPI S3 resume. This is typically the contents of the GDT
// used by the boot processor when the platform is booted.
//
EFI_PHYSICAL_ADDRESS GdtrProfile;
EFI_PHYSICAL_ADDRESS GdtrProfile;
//
// Physical address of structure of type IA32_DESCRIPTOR. The
// IA32_DESCRIPTOR structure provides the base address and length of an IDT.
@@ -196,31 +196,31 @@ typedef struct {
// used during an ACPI S3 resume. This is typically the contents of the IDT
// used by the boot processor when the platform is booted.
//
EFI_PHYSICAL_ADDRESS IdtrProfile;
EFI_PHYSICAL_ADDRESS IdtrProfile;
//
// Physical address of a buffer that is used as stacks during ACPI S3 resume.
// The total size of this buffer, in bytes, is NumberOfCpus * StackSize. This
// structure must be allocated from memory of type EfiACPIMemoryNVS.
//
EFI_PHYSICAL_ADDRESS StackAddress;
EFI_PHYSICAL_ADDRESS StackAddress;
//
// The size, in bytes, of the stack provided to each CPU during ACPI S3 resume.
//
UINT32 StackSize;
UINT32 StackSize;
//
// The number of CPUs. If a platform does not support hot plug CPUs, then
// this is the number of CPUs detected when the platform is booted, regardless
// of being enabled or disabled. If a platform does support hot plug CPUs,
// then this is the maximum number of CPUs that the platform supports.
//
UINT32 NumberOfCpus;
UINT32 NumberOfCpus;
//
// Physical address of structure of type MTRR_SETTINGS that contains a copy
// of the MTRR settings that are compatible with the MTRR settings used by
// the boot processor when the platform was booted. These MTRR settings are
// used during an ACPI S3 resume.
//
EFI_PHYSICAL_ADDRESS MtrrTable;
EFI_PHYSICAL_ADDRESS MtrrTable;
//
// Physical address of a buffer that contains the machine check handler that
// is used during an ACPI S3 Resume. In order for this machine check
@@ -228,18 +228,18 @@ typedef struct {
// vector in the IDT provided by IdtrProfile must be initialized to transfer
// control to this physical address.
//
EFI_PHYSICAL_ADDRESS ApMachineCheckHandlerBase;
EFI_PHYSICAL_ADDRESS ApMachineCheckHandlerBase;
//
// The size, in bytes, of the machine check handler that is used during an
// ACPI S3 Resume. If this field is 0, then a machine check handler is not
// provided.
//
UINT32 ApMachineCheckHandlerSize;
UINT32 ApMachineCheckHandlerSize;
//
// Data structure that is used for CPU feature initialization during ACPI S3
// resume.
//
CPU_FEATURE_INIT_DATA CpuFeatureInitData;
CPU_FEATURE_INIT_DATA CpuFeatureInitData;
} ACPI_CPU_DATA;
#endif

View File

@@ -9,7 +9,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
#ifndef _CPU_HOT_PLUG_DATA_H_
#define _CPU_HOT_PLUG_DATA_H_
#define CPU_HOT_PLUG_DATA_REVISION_1 0x00000001
#define CPU_HOT_PLUG_DATA_REVISION_1 0x00000001
typedef struct {
UINT32 Revision; // Used for version identification for this structure

View File

@@ -15,6 +15,6 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
{ 0xc77c3a41, 0x61ab, 0x4143, { 0x98, 0x3e, 0x33, 0x39, 0x28, 0x6, 0x28, 0xe5 } \
}
extern EFI_GUID gEdkiiCpuFeaturesInitDoneGuid;
extern EFI_GUID gEdkiiCpuFeaturesInitDoneGuid;
#endif

View File

@@ -15,6 +15,6 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
{ 0xa82485ce, 0xad6b, 0x4101, { 0x99, 0xd3, 0xe1, 0x35, 0x8c, 0x9e, 0x7e, 0x37 } \
}
extern EFI_GUID gEdkiiCpuFeaturesSetDoneGuid;
extern EFI_GUID gEdkiiCpuFeaturesSetDoneGuid;
#endif

View File

@@ -11,7 +11,7 @@
#ifndef _MICROCODE_PATCH_HOB_H_
#define _MICROCODE_PATCH_HOB_H_
extern EFI_GUID gEdkiiMicrocodePatchHobGuid;
extern EFI_GUID gEdkiiMicrocodePatchHobGuid;
//
// The EDKII microcode patch HOB will be produced by MpInitLib and it can be

View File

@@ -15,7 +15,7 @@
0x5802bce4, 0xeeee, 0x4e33, { 0xa1, 0x30, 0xeb, 0xad, 0x27, 0xf0, 0xe4, 0x39 } \
}
extern EFI_GUID gMsegSmramGuid;
extern EFI_GUID gMsegSmramGuid;
//
// The data portion of this HOB is type EFI_SMRAM_DESCRIPTOR

View File

@@ -13,49 +13,49 @@ typedef struct {
//
// Package number.
//
UINT32 Package;
UINT32 Package;
//
// Core type of logical processor.
// Value = CPUID.1Ah:EAX[31:24]
//
UINT8 CoreType;
UINT8 CoreType;
//
// Level of the cache that this package's this type of logical processor corresponds to.
// Value = CPUID.04h:EAX[07:05]
//
UINT8 CacheLevel : 3;
UINT8 CacheLevel : 3;
//
// Type of the cache that this package's this type of logical processor corresponds to.
// Value = CPUID.04h:EAX[04:00]
//
UINT8 CacheType : 5;
UINT8 CacheType : 5;
//
// Ways of associativity.
// Value = CPUID.04h:EBX[31:22]
//
UINT16 CacheWays : 10;
UINT16 CacheWays : 10;
//
// Fully associative cache.
// Value = CPUID.04h:EAX[09]
//
UINT16 FullyAssociativeCache : 1;
UINT16 FullyAssociativeCache : 1;
//
// Direct mapped cache.
// Value = CPUID.04h:EDX[02]
//
UINT16 DirectMappedCache : 1;
UINT16 Reserved : 4;
UINT16 DirectMappedCache : 1;
UINT16 Reserved : 4;
//
// Size of single cache that this package's this type of logical processor corresponds to.
// Value = (CPUID.04h:EBX[31:22] + 1) * (CPUID.04h:EBX[21:12] + 1) *
// (CPUID.04h:EBX[11:00] + 1) * (CPUID.04h:ECX[31:00] + 1)
//
UINT32 CacheSizeinKB;
UINT32 CacheSizeinKB;
//
// Number of the cache that this package's this type of logical processor corresponds to.
// Have subtracted the number of caches that are shared.
//
UINT16 CacheCount;
UINT16 CacheCount;
} CPU_CACHE_INFO;
/**
@@ -78,8 +78,8 @@ typedef struct {
EFI_STATUS
EFIAPI
GetCpuCacheInfo (
IN OUT CPU_CACHE_INFO *CpuCacheInfo,
IN OUT UINTN *CpuCacheInfoCount
IN OUT CPU_CACHE_INFO *CpuCacheInfo,
IN OUT UINTN *CpuCacheInfoCount
);
#endif

View File

@@ -38,7 +38,7 @@ GetLocalApicBaseAddress (
VOID
EFIAPI
SetLocalApicBaseAddress (
IN UINTN BaseAddress
IN UINTN BaseAddress
);
/**
@@ -120,8 +120,8 @@ GetApicVersion (
VOID
EFIAPI
SendFixedIpi (
IN UINT32 ApicId,
IN UINT8 Vector
IN UINT32 ApicId,
IN UINT8 Vector
);
/**
@@ -134,7 +134,7 @@ SendFixedIpi (
VOID
EFIAPI
SendFixedIpiAllExcludingSelf (
IN UINT8 Vector
IN UINT8 Vector
);
/**
@@ -147,7 +147,7 @@ SendFixedIpiAllExcludingSelf (
VOID
EFIAPI
SendSmiIpi (
IN UINT32 ApicId
IN UINT32 ApicId
);
/**
@@ -171,7 +171,7 @@ SendSmiIpiAllExcludingSelf (
VOID
EFIAPI
SendInitIpi (
IN UINT32 ApicId
IN UINT32 ApicId
);
/**
@@ -200,8 +200,8 @@ SendInitIpiAllExcludingSelf (
VOID
EFIAPI
SendInitSipiSipi (
IN UINT32 ApicId,
IN UINT32 StartupRoutine
IN UINT32 ApicId,
IN UINT32 StartupRoutine
);
/**
@@ -218,7 +218,7 @@ SendInitSipiSipi (
VOID
EFIAPI
SendInitSipiSipiAllExcludingSelf (
IN UINT32 StartupRoutine
IN UINT32 StartupRoutine
);
/**
@@ -296,10 +296,10 @@ GetApicTimerCurrentCount (
VOID
EFIAPI
InitializeApicTimer (
IN UINTN DivideValue,
IN UINT32 InitCount,
IN BOOLEAN PeriodicMode,
IN UINT8 Vector
IN UINTN DivideValue,
IN UINT32 InitCount,
IN BOOLEAN PeriodicMode,
IN UINT8 Vector
);
/**
@@ -453,5 +453,5 @@ GetProcessorLocation2ByApicId (
OUT UINT32 *Core OPTIONAL,
OUT UINT32 *Thread OPTIONAL
);
#endif
#endif

View File

@@ -52,7 +52,7 @@ GetProcessorMicrocodeCpuId (
UINT32
EFIAPI
GetMicrocodeLength (
IN CPU_MICROCODE_HEADER *Microcode
IN CPU_MICROCODE_HEADER *Microcode
);
/**
@@ -65,7 +65,7 @@ GetMicrocodeLength (
VOID
EFIAPI
LoadMicrocode (
IN CPU_MICROCODE_HEADER *Microcode
IN CPU_MICROCODE_HEADER *Microcode
);
/**
@@ -109,12 +109,12 @@ LoadMicrocode (
BOOLEAN
EFIAPI
IsValidMicrocode (
IN CPU_MICROCODE_HEADER *Microcode,
IN UINTN MicrocodeLength,
IN UINT32 MinimumRevision,
IN EDKII_PEI_MICROCODE_CPU_ID *MicrocodeCpuIds,
IN UINTN MicrocodeCpuIdCount,
IN BOOLEAN VerifyChecksum
IN CPU_MICROCODE_HEADER *Microcode,
IN UINTN MicrocodeLength,
IN UINT32 MinimumRevision,
IN EDKII_PEI_MICROCODE_CPU_ID *MicrocodeCpuIds,
IN UINTN MicrocodeCpuIdCount,
IN BOOLEAN VerifyChecksum
);
#endif

View File

@@ -54,8 +54,8 @@ MpInitLibInitialize (
EFI_STATUS
EFIAPI
MpInitLibGetNumberOfProcessors (
OUT UINTN *NumberOfProcessors OPTIONAL,
OUT UINTN *NumberOfEnabledProcessors OPTIONAL
OUT UINTN *NumberOfProcessors OPTIONAL,
OUT UINTN *NumberOfEnabledProcessors OPTIONAL
);
/**
@@ -161,12 +161,12 @@ MpInitLibGetProcessorInfo (
EFI_STATUS
EFIAPI
MpInitLibStartupAllAPs (
IN EFI_AP_PROCEDURE Procedure,
IN BOOLEAN SingleThread,
IN EFI_EVENT WaitEvent OPTIONAL,
IN UINTN TimeoutInMicroseconds,
IN VOID *ProcedureArgument OPTIONAL,
OUT UINTN **FailedCpuList OPTIONAL
IN EFI_AP_PROCEDURE Procedure,
IN BOOLEAN SingleThread,
IN EFI_EVENT WaitEvent OPTIONAL,
IN UINTN TimeoutInMicroseconds,
IN VOID *ProcedureArgument OPTIONAL,
OUT UINTN **FailedCpuList OPTIONAL
);
/**
@@ -243,12 +243,12 @@ MpInitLibStartupAllAPs (
EFI_STATUS
EFIAPI
MpInitLibStartupThisAP (
IN EFI_AP_PROCEDURE Procedure,
IN UINTN ProcessorNumber,
IN EFI_EVENT WaitEvent OPTIONAL,
IN UINTN TimeoutInMicroseconds,
IN VOID *ProcedureArgument OPTIONAL,
OUT BOOLEAN *Finished OPTIONAL
IN EFI_AP_PROCEDURE Procedure,
IN UINTN ProcessorNumber,
IN EFI_EVENT WaitEvent OPTIONAL,
IN UINTN TimeoutInMicroseconds,
IN VOID *ProcedureArgument OPTIONAL,
OUT BOOLEAN *Finished OPTIONAL
);
/**
@@ -280,8 +280,8 @@ MpInitLibStartupThisAP (
EFI_STATUS
EFIAPI
MpInitLibSwitchBSP (
IN UINTN ProcessorNumber,
IN BOOLEAN EnableOldBSP
IN UINTN ProcessorNumber,
IN BOOLEAN EnableOldBSP
);
/**
@@ -317,9 +317,9 @@ MpInitLibSwitchBSP (
EFI_STATUS
EFIAPI
MpInitLibEnableDisableAP (
IN UINTN ProcessorNumber,
IN BOOLEAN EnableAP,
IN UINT32 *HealthFlag OPTIONAL
IN UINTN ProcessorNumber,
IN BOOLEAN EnableAP,
IN UINT32 *HealthFlag OPTIONAL
);
/**
@@ -341,7 +341,7 @@ MpInitLibEnableDisableAP (
EFI_STATUS
EFIAPI
MpInitLibWhoAmI (
OUT UINTN *ProcessorNumber
OUT UINTN *ProcessorNumber
);
/**
@@ -373,9 +373,9 @@ MpInitLibWhoAmI (
EFI_STATUS
EFIAPI
MpInitLibStartupAllCPUs (
IN EFI_AP_PROCEDURE Procedure,
IN UINTN TimeoutInMicroseconds,
IN VOID *ProcedureArgument OPTIONAL
IN EFI_AP_PROCEDURE Procedure,
IN UINTN TimeoutInMicroseconds,
IN VOID *ProcedureArgument OPTIONAL
);
#endif

View File

@@ -24,27 +24,27 @@
//
#define RESERVED_FIRMWARE_VARIABLE_MTRR_NUMBER 2
#define MTRR_NUMBER_OF_FIXED_MTRR 11
#define MTRR_NUMBER_OF_FIXED_MTRR 11
//
// Structure to describe a fixed MTRR
//
typedef struct {
UINT32 Msr;
UINT32 BaseAddress;
UINT32 Length;
UINT32 Msr;
UINT32 BaseAddress;
UINT32 Length;
} FIXED_MTRR;
//
// Structure to describe a variable MTRR
//
typedef struct {
UINT64 BaseAddress;
UINT64 Length;
UINT64 Type;
UINT32 Msr;
BOOLEAN Valid;
BOOLEAN Used;
UINT64 BaseAddress;
UINT64 Length;
UINT64 Type;
UINT32 Msr;
BOOLEAN Valid;
BOOLEAN Used;
} VARIABLE_MTRR;
//
@@ -59,14 +59,14 @@ typedef struct _MTRR_VARIABLE_SETTING_ {
// Array for variable MTRRs
//
typedef struct _MTRR_VARIABLE_SETTINGS_ {
MTRR_VARIABLE_SETTING Mtrr[MTRR_NUMBER_OF_VARIABLE_MTRR];
MTRR_VARIABLE_SETTING Mtrr[MTRR_NUMBER_OF_VARIABLE_MTRR];
} MTRR_VARIABLE_SETTINGS;
//
// Array for fixed MTRRs
//
typedef struct _MTRR_FIXED_SETTINGS_ {
UINT64 Mtrr[MTRR_NUMBER_OF_FIXED_MTRR];
UINT64 Mtrr[MTRR_NUMBER_OF_FIXED_MTRR];
} MTRR_FIXED_SETTINGS;
//
@@ -98,9 +98,9 @@ typedef enum {
#define MTRR_CACHE_INVALID_TYPE 7
typedef struct {
UINT64 BaseAddress;
UINT64 Length;
MTRR_MEMORY_CACHE_TYPE Type;
UINT64 BaseAddress;
UINT64 Length;
MTRR_MEMORY_CACHE_TYPE Type;
} MTRR_MEMORY_RANGE;
/**
@@ -168,7 +168,6 @@ MtrrSetMemoryAttribute (
IN MTRR_MEMORY_CACHE_TYPE Attribute
);
/**
This function will get the memory cache type of the specific address.
This function is mainly for debugging purposes.
@@ -181,10 +180,9 @@ MtrrSetMemoryAttribute (
MTRR_MEMORY_CACHE_TYPE
EFIAPI
MtrrGetMemoryAttribute (
IN PHYSICAL_ADDRESS Address
IN PHYSICAL_ADDRESS Address
);
/**
This function gets the content in fixed MTRRs
@@ -193,13 +191,12 @@ MtrrGetMemoryAttribute (
@return The pointer of FixedSettings
**/
MTRR_FIXED_SETTINGS*
MTRR_FIXED_SETTINGS *
EFIAPI
MtrrGetFixedMtrr (
OUT MTRR_FIXED_SETTINGS *FixedSettings
OUT MTRR_FIXED_SETTINGS *FixedSettings
);
/**
This function gets the content in all MTRRs (variable and fixed)
@@ -211,10 +208,9 @@ MtrrGetFixedMtrr (
MTRR_SETTINGS *
EFIAPI
MtrrGetAllMtrrs (
OUT MTRR_SETTINGS *MtrrSetting
OUT MTRR_SETTINGS *MtrrSetting
);
/**
This function sets all MTRRs (variable and fixed)
@@ -226,10 +222,9 @@ MtrrGetAllMtrrs (
MTRR_SETTINGS *
EFIAPI
MtrrSetAllMtrrs (
IN MTRR_SETTINGS *MtrrSetting
IN MTRR_SETTINGS *MtrrSetting
);
/**
Get the attribute of variable MTRRs.
@@ -248,12 +243,11 @@ MtrrSetAllMtrrs (
UINT32
EFIAPI
MtrrGetMemoryAttributeInVariableMtrr (
IN UINT64 MtrrValidBitsMask,
IN UINT64 MtrrValidAddressMask,
OUT VARIABLE_MTRR *VariableMtrr
IN UINT64 MtrrValidBitsMask,
IN UINT64 MtrrValidAddressMask,
OUT VARIABLE_MTRR *VariableMtrr
);
/**
This function prints all MTRRs for debugging.
**/
@@ -355,10 +349,11 @@ MtrrSetMemoryAttributeInMtrrSettings (
RETURN_STATUS
EFIAPI
MtrrSetMemoryAttributesInMtrrSettings (
IN OUT MTRR_SETTINGS *MtrrSetting,
IN VOID *Scratch,
IN OUT UINTN *ScratchSize,
IN CONST MTRR_MEMORY_RANGE *Ranges,
IN UINTN RangeCount
IN OUT MTRR_SETTINGS *MtrrSetting,
IN VOID *Scratch,
IN OUT UINTN *ScratchSize,
IN CONST MTRR_MEMORY_RANGE *Ranges,
IN UINTN RangeCount
);
#endif // _MTRR_LIB_H_

View File

@@ -30,7 +30,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
EFI_PEI_PPI_DESCRIPTOR *
EFIAPI
SecPlatformMain (
IN OUT EFI_SEC_PEI_HAND_OFF *SecCoreData
IN OUT EFI_SEC_PEI_HAND_OFF *SecCoreData
);
/**
@@ -47,9 +47,9 @@ SecPlatformMain (
EFI_STATUS
EFIAPI
SecPlatformInformation (
IN CONST EFI_PEI_SERVICES **PeiServices,
IN OUT UINT64 *StructureSize,
OUT EFI_SEC_PLATFORM_INFORMATION_RECORD *PlatformInformationRecord
IN CONST EFI_PEI_SERVICES **PeiServices,
IN OUT UINT64 *StructureSize,
OUT EFI_SEC_PLATFORM_INFORMATION_RECORD *PlatformInformationRecord
);
/**

View File

@@ -20,62 +20,62 @@
/// modifiers of a CPU feature. When used in a list, the define value
/// CPU_FEATURE_END is used to terminate a list of CPU feature values.
/// @{
#define CPU_FEATURE_AESNI 0
#define CPU_FEATURE_TURBO_MODE 1
#define CPU_FEATURE_MWAIT 2
#define CPU_FEATURE_ACPI 3
#define CPU_FEATURE_EIST 4
#define CPU_FEATURE_RESERVED_5 5
#define CPU_FEATURE_FASTSTRINGS 6
#define CPU_FEATURE_VMX 7
#define CPU_FEATURE_SMX 8
#define CPU_FEATURE_LMCE 9
#define CPU_FEATURE_LOCK_FEATURE_CONTROL_REGISTER 10
#define CPU_FEATURE_LIMIT_CPUID_MAX_VAL 11
#define CPU_FEATURE_MCE 12
#define CPU_FEATURE_MCA 13
#define CPU_FEATURE_MCG_CTL 14
#define CPU_FEATURE_PENDING_BREAK 15
#define CPU_FEATURE_C1E 16
#define CPU_FEATURE_C1_AUTO_DEMOTION 17
#define CPU_FEATURE_C3_AUTO_DEMOTION 18
#define CPU_FEATURE_C1_UNDEMOTION 19
#define CPU_FEATURE_C3_UNDEMOTION 20
#define CPU_FEATURE_C_STATE 21
#define CPU_FEATURE_TM 22
#define CPU_FEATURE_TM2 23
#define CPU_FEATURE_X2APIC 24
#define CPU_FEATURE_RESERVED_25 25
#define CPU_FEATURE_RESERVED_26 26
#define CPU_FEATURE_RESERVED_27 27
#define CPU_FEATURE_RESERVED_28 28
#define CPU_FEATURE_RESERVED_29 29
#define CPU_FEATURE_RESERVED_30 30
#define CPU_FEATURE_RESERVED_31 31
#define CPU_FEATURE_AESNI 0
#define CPU_FEATURE_TURBO_MODE 1
#define CPU_FEATURE_MWAIT 2
#define CPU_FEATURE_ACPI 3
#define CPU_FEATURE_EIST 4
#define CPU_FEATURE_RESERVED_5 5
#define CPU_FEATURE_FASTSTRINGS 6
#define CPU_FEATURE_VMX 7
#define CPU_FEATURE_SMX 8
#define CPU_FEATURE_LMCE 9
#define CPU_FEATURE_LOCK_FEATURE_CONTROL_REGISTER 10
#define CPU_FEATURE_LIMIT_CPUID_MAX_VAL 11
#define CPU_FEATURE_MCE 12
#define CPU_FEATURE_MCA 13
#define CPU_FEATURE_MCG_CTL 14
#define CPU_FEATURE_PENDING_BREAK 15
#define CPU_FEATURE_C1E 16
#define CPU_FEATURE_C1_AUTO_DEMOTION 17
#define CPU_FEATURE_C3_AUTO_DEMOTION 18
#define CPU_FEATURE_C1_UNDEMOTION 19
#define CPU_FEATURE_C3_UNDEMOTION 20
#define CPU_FEATURE_C_STATE 21
#define CPU_FEATURE_TM 22
#define CPU_FEATURE_TM2 23
#define CPU_FEATURE_X2APIC 24
#define CPU_FEATURE_RESERVED_25 25
#define CPU_FEATURE_RESERVED_26 26
#define CPU_FEATURE_RESERVED_27 27
#define CPU_FEATURE_RESERVED_28 28
#define CPU_FEATURE_RESERVED_29 29
#define CPU_FEATURE_RESERVED_30 30
#define CPU_FEATURE_RESERVED_31 31
#define CPU_FEATURE_L2_PREFETCHER (32+0)
#define CPU_FEATURE_L1_DATA_PREFETCHER (32+1)
#define CPU_FEATURE_HARDWARE_PREFETCHER (32+2)
#define CPU_FEATURE_ADJACENT_CACHE_LINE_PREFETCH (32+3)
#define CPU_FEATURE_DCU_PREFETCHER (32+4)
#define CPU_FEATURE_IP_PREFETCHER (32+5)
#define CPU_FEATURE_MLC_STREAMER_PREFETCHER (32+6)
#define CPU_FEATURE_MLC_SPATIAL_PREFETCHER (32+7)
#define CPU_FEATURE_THREE_STRIKE_COUNTER (32+8)
#define CPU_FEATURE_APIC_TPR_UPDATE_MESSAGE (32+9)
#define CPU_FEATURE_ENERGY_PERFORMANCE_BIAS (32+10)
#define CPU_FEATURE_PPIN (32+11)
#define CPU_FEATURE_PROC_TRACE (32+12)
#define CPU_FEATURE_L2_PREFETCHER (32+0)
#define CPU_FEATURE_L1_DATA_PREFETCHER (32+1)
#define CPU_FEATURE_HARDWARE_PREFETCHER (32+2)
#define CPU_FEATURE_ADJACENT_CACHE_LINE_PREFETCH (32+3)
#define CPU_FEATURE_DCU_PREFETCHER (32+4)
#define CPU_FEATURE_IP_PREFETCHER (32+5)
#define CPU_FEATURE_MLC_STREAMER_PREFETCHER (32+6)
#define CPU_FEATURE_MLC_SPATIAL_PREFETCHER (32+7)
#define CPU_FEATURE_THREE_STRIKE_COUNTER (32+8)
#define CPU_FEATURE_APIC_TPR_UPDATE_MESSAGE (32+9)
#define CPU_FEATURE_ENERGY_PERFORMANCE_BIAS (32+10)
#define CPU_FEATURE_PPIN (32+11)
#define CPU_FEATURE_PROC_TRACE (32+12)
#define CPU_FEATURE_BEFORE_ALL BIT23
#define CPU_FEATURE_AFTER_ALL BIT24
#define CPU_FEATURE_THREAD_BEFORE BIT25
#define CPU_FEATURE_THREAD_AFTER BIT26
#define CPU_FEATURE_CORE_BEFORE BIT27
#define CPU_FEATURE_CORE_AFTER BIT28
#define CPU_FEATURE_PACKAGE_BEFORE BIT29
#define CPU_FEATURE_PACKAGE_AFTER BIT30
#define CPU_FEATURE_END MAX_UINT32
#define CPU_FEATURE_BEFORE_ALL BIT23
#define CPU_FEATURE_AFTER_ALL BIT24
#define CPU_FEATURE_THREAD_BEFORE BIT25
#define CPU_FEATURE_THREAD_AFTER BIT26
#define CPU_FEATURE_CORE_BEFORE BIT27
#define CPU_FEATURE_CORE_AFTER BIT28
#define CPU_FEATURE_PACKAGE_BEFORE BIT29
#define CPU_FEATURE_PACKAGE_AFTER BIT30
#define CPU_FEATURE_END MAX_UINT32
/// @}
///
@@ -85,28 +85,28 @@ typedef struct {
//
// Set to 1 when current processor is the first thread in the core it resides in.
//
UINT32 Thread : 1;
UINT32 Thread : 1;
//
// Set to 1 when current processor is a thread of the first core in the module it resides in.
//
UINT32 Core : 1;
UINT32 Core : 1;
//
// Set to 1 when current processor is a thread of the first module in the tile it resides in.
//
UINT32 Module : 1;
UINT32 Module : 1;
//
// Set to 1 when current processor is a thread of the first tile in the die it resides in.
//
UINT32 Tile : 1;
UINT32 Tile : 1;
//
// Set to 1 when current processor is a thread of the first die in the package it resides in.
//
UINT32 Die : 1;
UINT32 Die : 1;
//
// Set to 1 when current processor is a thread of the first package in the system.
//
UINT32 Package : 1;
UINT32 Reserved : 26;
UINT32 Package : 1;
UINT32 Reserved : 26;
} REGISTER_CPU_FEATURE_FIRST_PROCESSOR;
///
@@ -118,36 +118,36 @@ typedef struct {
///
/// The package that the CPU resides
///
EFI_PROCESSOR_INFORMATION ProcessorInfo;
EFI_PROCESSOR_INFORMATION ProcessorInfo;
///
/// The bit flag indicating whether the CPU is the first Thread/Core/Module/Tile/Die/Package in its parent scope.
///
REGISTER_CPU_FEATURE_FIRST_PROCESSOR First;
REGISTER_CPU_FEATURE_FIRST_PROCESSOR First;
///
/// The Display Family of the CPU computed from CPUID leaf CPUID_VERSION_INFO
///
UINT32 DisplayFamily;
UINT32 DisplayFamily;
///
/// The Display Model of the CPU computed from CPUID leaf CPUID_VERSION_INFO
///
UINT32 DisplayModel;
UINT32 DisplayModel;
///
/// The Stepping ID of the CPU computed from CPUID leaf CPUID_VERSION_INFO
///
UINT32 SteppingId;
UINT32 SteppingId;
///
/// The Processor Type of the CPU computed from CPUID leaf CPUID_VERSION_INFO
///
UINT32 ProcessorType;
UINT32 ProcessorType;
///
/// Bit field structured returned in ECX from CPUID leaf CPUID_VERSION_INFO
///
CPUID_VERSION_INFO_ECX CpuIdVersionInfoEcx;
CPUID_VERSION_INFO_ECX CpuIdVersionInfoEcx;
///
/// Bit field structured returned in EDX from CPUID leaf CPUID_VERSION_INFO
///
CPUID_VERSION_INFO_EDX CpuIdVersionInfoEdx;
CPUID_VERSION_INFO_EDX CpuIdVersionInfoEdx;
} REGISTER_CPU_FEATURE_INFORMATION;
/**
@@ -167,7 +167,7 @@ typedef struct {
BOOLEAN
EFIAPI
IsCpuFeatureSupported (
IN UINT32 Feature
IN UINT32 Feature
);
/**
@@ -184,7 +184,7 @@ IsCpuFeatureSupported (
BOOLEAN
EFIAPI
IsCpuFeatureInSetting (
IN UINT32 Feature
IN UINT32 Feature
);
/**
@@ -303,10 +303,10 @@ RETURN_STATUS
RETURN_STATUS
EFIAPI
RegisterCpuFeature (
IN CHAR8 *FeatureName OPTIONAL,
IN CPU_FEATURE_GET_CONFIG_DATA GetConfigDataFunc OPTIONAL,
IN CPU_FEATURE_SUPPORT SupportFunc OPTIONAL,
IN CPU_FEATURE_INITIALIZE InitializeFunc OPTIONAL,
IN CHAR8 *FeatureName OPTIONAL,
IN CPU_FEATURE_GET_CONFIG_DATA GetConfigDataFunc OPTIONAL,
IN CPU_FEATURE_SUPPORT SupportFunc OPTIONAL,
IN CPU_FEATURE_INITIALIZE InitializeFunc OPTIONAL,
...
);
@@ -348,7 +348,7 @@ CpuFeaturesInitialize (
VOID
EFIAPI
SwitchBspAfterFeaturesInitialize (
IN UINTN ProcessorNumber
IN UINTN ProcessorNumber
);
/**
@@ -368,11 +368,11 @@ SwitchBspAfterFeaturesInitialize (
VOID
EFIAPI
CpuRegisterTableWrite (
IN UINTN ProcessorNumber,
IN REGISTER_TYPE RegisterType,
IN UINT64 Index,
IN UINT64 ValueMask,
IN UINT64 Value
IN UINTN ProcessorNumber,
IN REGISTER_TYPE RegisterType,
IN UINT64 Index,
IN UINT64 ValueMask,
IN UINT64 Value
);
/**
@@ -394,11 +394,11 @@ CpuRegisterTableWrite (
VOID
EFIAPI
CpuRegisterTableTestThenWrite (
IN UINTN ProcessorNumber,
IN REGISTER_TYPE RegisterType,
IN UINT64 Index,
IN UINT64 ValueMask,
IN UINT64 Value
IN UINTN ProcessorNumber,
IN REGISTER_TYPE RegisterType,
IN UINT64 Index,
IN UINT64 ValueMask,
IN UINT64 Value
);
/**
@@ -418,11 +418,11 @@ CpuRegisterTableTestThenWrite (
VOID
EFIAPI
PreSmmCpuRegisterTableWrite (
IN UINTN ProcessorNumber,
IN REGISTER_TYPE RegisterType,
IN UINT64 Index,
IN UINT64 ValueMask,
IN UINT64 Value
IN UINTN ProcessorNumber,
IN REGISTER_TYPE RegisterType,
IN UINT64 Index,
IN UINT64 ValueMask,
IN UINT64 Value
);
/**

View File

@@ -408,7 +408,7 @@ SmmCpuFeaturesCompleteSmmReadyToLock (
VOID *
EFIAPI
SmmCpuFeaturesAllocatePageTableMemory (
IN UINTN Pages
IN UINTN Pages
);
#endif

View File

@@ -13,10 +13,10 @@
/// SMM Page Size Type
///
typedef enum {
SmmPageSize4K,
SmmPageSize2M,
SmmPageSize1G,
MaxSmmPageSizeType
SmmPageSize4K,
SmmPageSize2M,
SmmPageSize1G,
MaxSmmPageSizeType
} SMM_PAGE_SIZE_TYPE;
/**
@@ -74,7 +74,7 @@ ClearTopLevelSmiStatus (
EFI_STATUS
EFIAPI
PlatformSmmBspElection (
OUT BOOLEAN *IsBsp
OUT BOOLEAN *IsBsp
);
/**
@@ -94,10 +94,10 @@ PlatformSmmBspElection (
EFI_STATUS
EFIAPI
GetPlatformPageTableAttribute (
IN UINT64 Address,
OUT SMM_PAGE_SIZE_TYPE *PageSize,
OUT UINTN *NumOfPages,
OUT UINTN *PageAttribute
IN UINT64 Address,
OUT SMM_PAGE_SIZE_TYPE *PageSize,
OUT UINTN *NumOfPages,
OUT UINTN *PageAttribute
);
#endif

View File

@@ -13,8 +13,6 @@
#ifndef __UEFI_CPU_LIB_H__
#define __UEFI_CPU_LIB_H__
/**
Initializes floating point units for requirement of UEFI specification.

View File

@@ -15,7 +15,6 @@
#include <Protocol/DebugSupport.h>
#include <Register/Amd/Ghcb.h>
/**
Perform VMGEXIT.
@@ -38,10 +37,10 @@
UINT64
EFIAPI
VmgExit (
IN OUT GHCB *Ghcb,
IN UINT64 ExitCode,
IN UINT64 ExitInfo1,
IN UINT64 ExitInfo2
IN OUT GHCB *Ghcb,
IN UINT64 ExitCode,
IN UINT64 ExitInfo1,
IN UINT64 ExitInfo2
);
/**
@@ -58,8 +57,8 @@ VmgExit (
VOID
EFIAPI
VmgInit (
IN OUT GHCB *Ghcb,
IN OUT BOOLEAN *InterruptState
IN OUT GHCB *Ghcb,
IN OUT BOOLEAN *InterruptState
);
/**
@@ -76,8 +75,8 @@ VmgInit (
VOID
EFIAPI
VmgDone (
IN OUT GHCB *Ghcb,
IN BOOLEAN InterruptState
IN OUT GHCB *Ghcb,
IN BOOLEAN InterruptState
);
/**
@@ -93,8 +92,8 @@ VmgDone (
VOID
EFIAPI
VmgSetOffsetValid (
IN OUT GHCB *Ghcb,
IN GHCB_REGISTER Offset
IN OUT GHCB *Ghcb,
IN GHCB_REGISTER Offset
);
/**
@@ -113,8 +112,8 @@ VmgSetOffsetValid (
BOOLEAN
EFIAPI
VmgIsOffsetValid (
IN GHCB *Ghcb,
IN GHCB_REGISTER Offset
IN GHCB *Ghcb,
IN GHCB_REGISTER Offset
);
/**

View File

@@ -16,7 +16,7 @@
0x5cb9cb3d, 0x31a4, 0x480c, { 0x94, 0x98, 0x29, 0xd2, 0x69, 0xba, 0xcf, 0xba} \
}
typedef struct _EDKII_PEI_MP_SERVICES2_PPI EDKII_PEI_MP_SERVICES2_PPI;
typedef struct _EDKII_PEI_MP_SERVICES2_PPI EDKII_PEI_MP_SERVICES2_PPI;
/**
Get the number of CPU's.
@@ -35,7 +35,7 @@ typedef struct _EDKII_PEI_MP_SERVICES2_PPI EDKII_PEI_MP_SERVICES2_PPI;
**/
typedef
EFI_STATUS
(EFIAPI *EDKII_PEI_MP_SERVICES_GET_NUMBER_OF_PROCESSORS) (
(EFIAPI *EDKII_PEI_MP_SERVICES_GET_NUMBER_OF_PROCESSORS)(
IN EDKII_PEI_MP_SERVICES2_PPI *This,
OUT UINTN *NumberOfProcessors,
OUT UINTN *NumberOfEnabledProcessors
@@ -57,7 +57,7 @@ EFI_STATUS
**/
typedef
EFI_STATUS
(EFIAPI *EDKII_PEI_MP_SERVICES_GET_PROCESSOR_INFO) (
(EFIAPI *EDKII_PEI_MP_SERVICES_GET_PROCESSOR_INFO)(
IN EDKII_PEI_MP_SERVICES2_PPI *This,
IN UINTN ProcessorNumber,
OUT EFI_PROCESSOR_INFORMATION *ProcessorInfoBuffer
@@ -97,7 +97,7 @@ EFI_STATUS
**/
typedef
EFI_STATUS
(EFIAPI *EDKII_PEI_MP_SERVICES_STARTUP_ALL_APS) (
(EFIAPI *EDKII_PEI_MP_SERVICES_STARTUP_ALL_APS)(
IN EDKII_PEI_MP_SERVICES2_PPI *This,
IN EFI_AP_PROCEDURE Procedure,
IN BOOLEAN SingleThread,
@@ -139,7 +139,7 @@ EFI_STATUS
**/
typedef
EFI_STATUS
(EFIAPI *EDKII_PEI_MP_SERVICES_STARTUP_THIS_AP) (
(EFIAPI *EDKII_PEI_MP_SERVICES_STARTUP_THIS_AP)(
IN EDKII_PEI_MP_SERVICES2_PPI *This,
IN EFI_AP_PROCEDURE Procedure,
IN UINTN ProcessorNumber,
@@ -171,7 +171,7 @@ EFI_STATUS
**/
typedef
EFI_STATUS
(EFIAPI *EDKII_PEI_MP_SERVICES_SWITCH_BSP) (
(EFIAPI *EDKII_PEI_MP_SERVICES_SWITCH_BSP)(
IN EDKII_PEI_MP_SERVICES2_PPI *This,
IN UINTN ProcessorNumber,
IN BOOLEAN EnableOldBSP
@@ -205,7 +205,7 @@ EFI_STATUS
**/
typedef
EFI_STATUS
(EFIAPI *EDKII_PEI_MP_SERVICES_ENABLEDISABLEAP) (
(EFIAPI *EDKII_PEI_MP_SERVICES_ENABLEDISABLEAP)(
IN EDKII_PEI_MP_SERVICES2_PPI *This,
IN UINTN ProcessorNumber,
IN BOOLEAN EnableAP,
@@ -227,12 +227,11 @@ EFI_STATUS
**/
typedef
EFI_STATUS
(EFIAPI *EDKII_PEI_MP_SERVICES_WHOAMI) (
(EFIAPI *EDKII_PEI_MP_SERVICES_WHOAMI)(
IN EDKII_PEI_MP_SERVICES2_PPI *This,
OUT UINTN *ProcessorNumber
);
/**
Activate all of the application proessors.
@@ -256,7 +255,7 @@ EFI_STATUS
**/
typedef
EFI_STATUS
(EFIAPI *EDKII_PEI_MP_SERVICES_STARTUP_ALL_CPUS) (
(EFIAPI *EDKII_PEI_MP_SERVICES_STARTUP_ALL_CPUS)(
IN EDKII_PEI_MP_SERVICES2_PPI *This,
IN EFI_AP_PROCEDURE Procedure,
IN UINTN TimeoutInMicroSeconds,
@@ -264,16 +263,16 @@ EFI_STATUS
);
struct _EDKII_PEI_MP_SERVICES2_PPI {
EDKII_PEI_MP_SERVICES_GET_NUMBER_OF_PROCESSORS GetNumberOfProcessors;
EDKII_PEI_MP_SERVICES_GET_PROCESSOR_INFO GetProcessorInfo;
EDKII_PEI_MP_SERVICES_STARTUP_ALL_APS StartupAllAPs;
EDKII_PEI_MP_SERVICES_STARTUP_THIS_AP StartupThisAP;
EDKII_PEI_MP_SERVICES_SWITCH_BSP SwitchBSP;
EDKII_PEI_MP_SERVICES_ENABLEDISABLEAP EnableDisableAP;
EDKII_PEI_MP_SERVICES_WHOAMI WhoAmI;
EDKII_PEI_MP_SERVICES_STARTUP_ALL_CPUS StartupAllCPUs;
EDKII_PEI_MP_SERVICES_GET_NUMBER_OF_PROCESSORS GetNumberOfProcessors;
EDKII_PEI_MP_SERVICES_GET_PROCESSOR_INFO GetProcessorInfo;
EDKII_PEI_MP_SERVICES_STARTUP_ALL_APS StartupAllAPs;
EDKII_PEI_MP_SERVICES_STARTUP_THIS_AP StartupThisAP;
EDKII_PEI_MP_SERVICES_SWITCH_BSP SwitchBSP;
EDKII_PEI_MP_SERVICES_ENABLEDISABLEAP EnableDisableAP;
EDKII_PEI_MP_SERVICES_WHOAMI WhoAmI;
EDKII_PEI_MP_SERVICES_STARTUP_ALL_CPUS StartupAllCPUs;
};
extern EFI_GUID gEdkiiPeiMpServices2PpiGuid;
extern EFI_GUID gEdkiiPeiMpServices2PpiGuid;
#endif

View File

@@ -46,9 +46,9 @@ EFI_STATUS
/// Republish SEC PPIs
///
struct _REPUBLISH_SEC_PPI_PPI {
REPUBLISH_SEC_PPI_REPUBLISH_SEC_PPIS RepublishSecPpis;
REPUBLISH_SEC_PPI_REPUBLISH_SEC_PPIS RepublishSecPpis;
};
extern EFI_GUID gRepublishSecPpiPpiGuid;
extern EFI_GUID gRepublishSecPpiPpiGuid;
#endif

View File

@@ -14,11 +14,11 @@
0x430f6965, 0x9a69, 0x41c5, { 0x93, 0xed, 0x8b, 0xf0, 0x64, 0x35, 0xc1, 0xc6 } \
}
typedef struct _EDKII_PEI_SHADOW_MICROCODE_PPI EDKII_PEI_SHADOW_MICROCODE_PPI;
typedef struct _EDKII_PEI_SHADOW_MICROCODE_PPI EDKII_PEI_SHADOW_MICROCODE_PPI;
typedef struct {
UINT32 ProcessorSignature;
UINT8 PlatformId;
UINT32 ProcessorSignature;
UINT8 PlatformId;
} EDKII_PEI_MICROCODE_CPU_ID;
/**
@@ -44,7 +44,7 @@ typedef struct {
**/
typedef
EFI_STATUS
(EFIAPI *EDKII_PEI_SHADOW_MICROCODE) (
(EFIAPI *EDKII_PEI_SHADOW_MICROCODE)(
IN EDKII_PEI_SHADOW_MICROCODE_PPI *This,
IN UINTN CpuIdCount,
IN EDKII_PEI_MICROCODE_CPU_ID *MicrocodeCpuId,
@@ -57,10 +57,9 @@ EFI_STATUS
/// abstracts handling microcode shadow support.
///
struct _EDKII_PEI_SHADOW_MICROCODE_PPI {
EDKII_PEI_SHADOW_MICROCODE ShadowMicrocode;
EDKII_PEI_SHADOW_MICROCODE ShadowMicrocode;
};
extern EFI_GUID gEdkiiPeiShadowMicrocodePpiGuid;
extern EFI_GUID gEdkiiPeiShadowMicrocodePpiGuid;
#endif

View File

@@ -34,7 +34,7 @@
**/
typedef
EFI_STATUS
(EFIAPI *EFI_SM_MONITOR_LOAD_MONITOR) (
(EFIAPI *EFI_SM_MONITOR_LOAD_MONITOR)(
IN EFI_PHYSICAL_ADDRESS StmImage,
IN UINTN StmImageSize
);
@@ -54,7 +54,7 @@ EFI_STATUS
**/
typedef
EFI_STATUS
(EFIAPI *EFI_SM_MONITOR_ADD_PI_RESOURCE) (
(EFIAPI *EFI_SM_MONITOR_ADD_PI_RESOURCE)(
IN STM_RSC *ResourceList,
IN UINT32 NumEntries OPTIONAL
);
@@ -74,7 +74,7 @@ EFI_STATUS
**/
typedef
EFI_STATUS
(EFIAPI *EFI_SM_MONITOR_DELETE_PI_RESOURCE) (
(EFIAPI *EFI_SM_MONITOR_DELETE_PI_RESOURCE)(
IN STM_RSC *ResourceList OPTIONAL,
IN UINT32 NumEntries OPTIONAL
);
@@ -94,14 +94,14 @@ EFI_STATUS
**/
typedef
EFI_STATUS
(EFIAPI *EFI_SM_MONITOR_GET_PI_RESOURCE) (
(EFIAPI *EFI_SM_MONITOR_GET_PI_RESOURCE)(
OUT STM_RSC *ResourceList,
IN OUT UINT32 *ResourceSize
);
typedef UINT32 EFI_SM_MONITOR_STATE;
#define EFI_SM_MONITOR_STATE_ENABLED 0x1
#define EFI_SM_MONITOR_STATE_ACTIVATED 0x2
#define EFI_SM_MONITOR_STATE_ENABLED 0x1
#define EFI_SM_MONITOR_STATE_ACTIVATED 0x2
/**
@@ -112,7 +112,7 @@ typedef UINT32 EFI_SM_MONITOR_STATE;
**/
typedef
EFI_SM_MONITOR_STATE
(EFIAPI *EFI_SM_MONITOR_GET_MONITOR_STATE) (
(EFIAPI *EFI_SM_MONITOR_GET_MONITOR_STATE)(
VOID
);
@@ -120,16 +120,16 @@ typedef struct _EFI_SM_MONITOR_INIT_PROTOCOL {
//
// Valid at boot-time only
//
EFI_SM_MONITOR_LOAD_MONITOR LoadMonitor;
EFI_SM_MONITOR_ADD_PI_RESOURCE AddPiResource;
EFI_SM_MONITOR_DELETE_PI_RESOURCE DeletePiResource;
EFI_SM_MONITOR_GET_PI_RESOURCE GetPiResource;
EFI_SM_MONITOR_LOAD_MONITOR LoadMonitor;
EFI_SM_MONITOR_ADD_PI_RESOURCE AddPiResource;
EFI_SM_MONITOR_DELETE_PI_RESOURCE DeletePiResource;
EFI_SM_MONITOR_GET_PI_RESOURCE GetPiResource;
//
// Valid at runtime
//
EFI_SM_MONITOR_GET_MONITOR_STATE GetMonitorState;
EFI_SM_MONITOR_GET_MONITOR_STATE GetMonitorState;
} EFI_SM_MONITOR_INIT_PROTOCOL;
extern EFI_GUID gEfiSmMonitorInitProtocolGuid;
extern EFI_GUID gEfiSmMonitorInitProtocolGuid;
#endif

View File

@@ -44,7 +44,7 @@ typedef struct _EFI_SMM_CPU_SERVICE_PROTOCOL EFI_SMM_CPU_SERVICE_PROTOCOL;
**/
typedef
EFI_STATUS
(EFIAPI * EFI_SMM_GET_PROCESSOR_INFO) (
(EFIAPI *EFI_SMM_GET_PROCESSOR_INFO)(
IN CONST EFI_SMM_CPU_SERVICE_PROTOCOL *This,
IN UINTN ProcessorNumber,
OUT EFI_PROCESSOR_INFORMATION *ProcessorInfoBuffer
@@ -82,7 +82,7 @@ EFI_STATUS
**/
typedef
EFI_STATUS
(EFIAPI * EFI_SMM_SWITCH_BSP) (
(EFIAPI *EFI_SMM_SWITCH_BSP)(
IN CONST EFI_SMM_CPU_SERVICE_PROTOCOL *This,
IN UINTN ProcessorNumber
);
@@ -106,7 +106,7 @@ EFI_STATUS
**/
typedef
EFI_STATUS
(EFIAPI *EFI_SMM_ADD_PROCESSOR) (
(EFIAPI *EFI_SMM_ADD_PROCESSOR)(
IN CONST EFI_SMM_CPU_SERVICE_PROTOCOL *This,
IN UINT64 ProcessorId,
OUT UINTN *ProcessorNumber
@@ -128,7 +128,7 @@ EFI_STATUS
**/
typedef
EFI_STATUS
(EFIAPI *EFI_SMM_REMOVE_PROCESSOR) (
(EFIAPI *EFI_SMM_REMOVE_PROCESSOR)(
IN CONST EFI_SMM_CPU_SERVICE_PROTOCOL *This,
IN UINTN ProcessorNumber
);
@@ -156,7 +156,7 @@ EFI_STATUS
**/
typedef
EFI_STATUS
(EFIAPI * EFI_SMM_WHOAMI) (
(EFIAPI *EFI_SMM_WHOAMI)(
IN CONST EFI_SMM_CPU_SERVICE_PROTOCOL *This,
OUT UINTN *ProcessorNumber
);
@@ -180,7 +180,7 @@ EFI_STATUS
**/
typedef
EFI_STATUS
(EFIAPI *EFI_SMM_REGISTER_EXCEPTION_HANDLER) (
(EFIAPI *EFI_SMM_REGISTER_EXCEPTION_HANDLER)(
IN EFI_SMM_CPU_SERVICE_PROTOCOL *This,
IN EFI_EXCEPTION_TYPE ExceptionType,
IN EFI_CPU_INTERRUPT_HANDLER InterruptHandler
@@ -190,14 +190,14 @@ EFI_STATUS
// This protocol provides CPU services from SMM.
//
struct _EFI_SMM_CPU_SERVICE_PROTOCOL {
EFI_SMM_GET_PROCESSOR_INFO GetProcessorInfo;
EFI_SMM_SWITCH_BSP SwitchBsp;
EFI_SMM_ADD_PROCESSOR AddProcessor;
EFI_SMM_REMOVE_PROCESSOR RemoveProcessor;
EFI_SMM_WHOAMI WhoAmI;
EFI_SMM_REGISTER_EXCEPTION_HANDLER RegisterExceptionHandler;
EFI_SMM_GET_PROCESSOR_INFO GetProcessorInfo;
EFI_SMM_SWITCH_BSP SwitchBsp;
EFI_SMM_ADD_PROCESSOR AddProcessor;
EFI_SMM_REMOVE_PROCESSOR RemoveProcessor;
EFI_SMM_WHOAMI WhoAmI;
EFI_SMM_REGISTER_EXCEPTION_HANDLER RegisterExceptionHandler;
};
extern EFI_GUID gEfiSmmCpuServiceProtocolGuid;
extern EFI_GUID gEfiSmmCpuServiceProtocolGuid;
#endif

View File

@@ -11,4 +11,3 @@
#include <Register/Intel/LocalApic.h>
#endif