summaryrefslogtreecommitdiff
path: root/UefiCpuPkg/Library/MpInitLib/MpLib.h
diff options
context:
space:
mode:
Diffstat (limited to 'UefiCpuPkg/Library/MpInitLib/MpLib.h')
-rw-r--r--UefiCpuPkg/Library/MpInitLib/MpLib.h31
1 files changed, 23 insertions, 8 deletions
diff --git a/UefiCpuPkg/Library/MpInitLib/MpLib.h b/UefiCpuPkg/Library/MpInitLib/MpLib.h
index 145538b..5d10516 100644
--- a/UefiCpuPkg/Library/MpInitLib/MpLib.h
+++ b/UefiCpuPkg/Library/MpInitLib/MpLib.h
@@ -213,18 +213,23 @@ typedef struct {
UINTN StackStart;
UINTN StackSize;
UINTN CFunction;
+ //
+ // NumApsExecuting and ApIndex are used atomically (in the
+ // assembly code). To avoid split-lock violations, keep them
+ // naturally aligned within a single cacheline.
+ //
+ UINTN NumApsExecuting;
+ UINTN ApIndex;
IA32_DESCRIPTOR GdtrProfile;
IA32_DESCRIPTOR IdtrProfile;
UINTN BufferStart;
UINTN ModeOffset;
- UINTN ApIndex;
UINTN CodeSegment;
UINTN DataSegment;
UINTN EnableExecuteDisable;
UINTN Cr3;
UINTN InitFlag;
CPU_INFO_IN_HOB *CpuInfo;
- UINTN NumApsExecuting;
CPU_MP_DATA *CpuMpData;
UINTN InitializeFloatingPointUnitsAddress;
UINT32 ModeTransitionMemory;
@@ -239,6 +244,7 @@ typedef struct {
BOOLEAN SevSnpIsEnabled;
UINTN GhcbBase;
BOOLEAN ExtTopoAvail;
+ BOOLEAN SevSnpKnownInitApicId;
} MP_CPU_EXCHANGE_INFO;
#pragma pack()
@@ -527,7 +533,7 @@ GetNextMpHandOffHob (
@retval 0 Cannot find free memory below 4GB.
**/
UINTN
-AllocateCodeBuffer (
+AllocateCodePage (
IN UINTN BufferSize
);
@@ -895,7 +901,7 @@ ConfidentialComputingGuestHas (
@param[in] ExchangeInfo The pointer to CPU Exchange Data structure
**/
VOID
-FillExchangeInfoDataSevEs (
+FillExchangeInfoDataSevSnp (
IN volatile MP_CPU_EXCHANGE_INFO *ExchangeInfo
);
@@ -985,14 +991,23 @@ AllocateApLoopCodeBuffer (
/**
Remove Nx protection for the range specific by BaseAddress and Length.
- The PEI implementation uses CpuPageTableLib to change the attribute.
- The DXE implementation uses gDS to change the attribute.
-
@param[in] BaseAddress BaseAddress of the range.
@param[in] Length Length of the range.
**/
VOID
-RemoveNxprotection (
+RemoveNxProtection (
+ IN EFI_PHYSICAL_ADDRESS BaseAddress,
+ IN UINTN Length
+ );
+
+/**
+Add ReadOnly protection to the range specified by BaseAddress and Length.
+
+@param[in] BaseAddress BaseAddress of the range.
+@param[in] Length Length of the range.
+**/
+VOID
+ApplyRoProtection (
IN EFI_PHYSICAL_ADDRESS BaseAddress,
IN UINTN Length
);