summaryrefslogtreecommitdiffstats
path: root/UefiCpuPkg
diff options
context:
space:
mode:
authorMin M Xu <min.m.xu@intel.com>2022-11-07 15:50:11 +0800
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2022-11-14 04:55:34 +0000
commit765ba5bf050022de8c44d93e467639d7f5fa237c (patch)
tree595d6a78c26daaf6cd1cad617f21bd6d4a3fb431 /UefiCpuPkg
parenta89f558d3c56d9c16e5f5b7d395c1aa36ccd38f2 (diff)
downloadedk2-765ba5bf050022de8c44d93e467639d7f5fa237c.tar.gz
edk2-765ba5bf050022de8c44d93e467639d7f5fa237c.tar.bz2
edk2-765ba5bf050022de8c44d93e467639d7f5fa237c.zip
OvmfPkg/UefiCpuPkg: Add CcExit prefix to the APIs of CcExitLib
BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=4123 APIs which are defined in CcExitLib.h are added with the CcExit prefix. This is to make the APIs' name more meaningful. This change impacts OvmfPkg/UefiCpuPkg. Cc: Eric Dong <eric.dong@intel.com> Cc: Ray Ni <ray.ni@intel.com> Cc: Brijesh Singh <brijesh.singh@amd.com> Cc: Erdem Aktas <erdemaktas@google.com> Cc: Gerd Hoffmann <kraxel@redhat.com> Cc: James Bottomley <jejb@linux.ibm.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Tom Lendacky <thomas.lendacky@amd.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com> Reviewed-by: Ray Ni <ray.ni@intel.com> Signed-off-by: Min Xu <min.m.xu@intel.com>
Diffstat (limited to 'UefiCpuPkg')
-rw-r--r--UefiCpuPkg/Include/Library/CcExitLib.h16
-rw-r--r--UefiCpuPkg/Library/CcExitLibNull/CcExitLibNull.c16
-rw-r--r--UefiCpuPkg/Library/CpuExceptionHandlerLib/PeiDxeSmmCpuException.c4
-rw-r--r--UefiCpuPkg/Library/CpuExceptionHandlerLib/SecPeiCpuException.c4
-rw-r--r--UefiCpuPkg/Library/MpInitLib/AmdSev.c8
-rw-r--r--UefiCpuPkg/Library/MpInitLib/DxeMpLib.c6
-rw-r--r--UefiCpuPkg/Library/MpInitLib/X64/AmdSev.c8
7 files changed, 31 insertions, 31 deletions
diff --git a/UefiCpuPkg/Include/Library/CcExitLib.h b/UefiCpuPkg/Include/Library/CcExitLib.h
index 1ae618c19b..3381d58369 100644
--- a/UefiCpuPkg/Include/Library/CcExitLib.h
+++ b/UefiCpuPkg/Include/Library/CcExitLib.h
@@ -41,7 +41,7 @@
**/
UINT64
EFIAPI
-VmgExit (
+CcExitVmgExit (
IN OUT GHCB *Ghcb,
IN UINT64 ExitCode,
IN UINT64 ExitInfo1,
@@ -56,12 +56,12 @@ VmgExit (
@param[in, out] Ghcb A pointer to the GHCB
@param[in, out] InterruptState A pointer to hold the current interrupt
- state, used for restoring in VmgDone ()
+ state, used for restoring in CcExitVmgDone ()
**/
VOID
EFIAPI
-VmgInit (
+CcExitVmgInit (
IN OUT GHCB *Ghcb,
IN OUT BOOLEAN *InterruptState
);
@@ -79,7 +79,7 @@ VmgInit (
**/
VOID
EFIAPI
-VmgDone (
+CcExitVmgDone (
IN OUT GHCB *Ghcb,
IN BOOLEAN InterruptState
);
@@ -96,7 +96,7 @@ VmgDone (
**/
VOID
EFIAPI
-VmgSetOffsetValid (
+CcExitVmgSetOffsetValid (
IN OUT GHCB *Ghcb,
IN GHCB_REGISTER Offset
);
@@ -116,7 +116,7 @@ VmgSetOffsetValid (
**/
BOOLEAN
EFIAPI
-VmgIsOffsetValid (
+CcExitVmgIsOffsetValid (
IN GHCB *Ghcb,
IN GHCB_REGISTER Offset
);
@@ -142,7 +142,7 @@ VmgIsOffsetValid (
**/
EFI_STATUS
EFIAPI
-VmgExitHandleVc (
+CcExitHandleVc (
IN OUT EFI_EXCEPTION_TYPE *ExceptionType,
IN OUT EFI_SYSTEM_CONTEXT SystemContext
);
@@ -168,7 +168,7 @@ VmgExitHandleVc (
**/
EFI_STATUS
EFIAPI
-VmTdExitHandleVe (
+CcExitHandleVe (
IN OUT EFI_EXCEPTION_TYPE *ExceptionType,
IN OUT EFI_SYSTEM_CONTEXT SystemContext
);
diff --git a/UefiCpuPkg/Library/CcExitLibNull/CcExitLibNull.c b/UefiCpuPkg/Library/CcExitLibNull/CcExitLibNull.c
index 79eca74e13..230e50705b 100644
--- a/UefiCpuPkg/Library/CcExitLibNull/CcExitLibNull.c
+++ b/UefiCpuPkg/Library/CcExitLibNull/CcExitLibNull.c
@@ -35,7 +35,7 @@
**/
UINT64
EFIAPI
-VmgExit (
+CcExitVmgExit (
IN OUT GHCB *Ghcb,
IN UINT64 ExitCode,
IN UINT64 ExitInfo1,
@@ -60,12 +60,12 @@ VmgExit (
@param[in, out] Ghcb A pointer to the GHCB
@param[in, out] InterruptState A pointer to hold the current interrupt
- state, used for restoring in VmgDone ()
+ state, used for restoring in CcExitVmgDone ()
**/
VOID
EFIAPI
-VmgInit (
+CcExitVmgInit (
IN OUT GHCB *Ghcb,
IN OUT BOOLEAN *InterruptState
)
@@ -85,7 +85,7 @@ VmgInit (
**/
VOID
EFIAPI
-VmgDone (
+CcExitVmgDone (
IN OUT GHCB *Ghcb,
IN BOOLEAN InterruptState
)
@@ -104,7 +104,7 @@ VmgDone (
**/
VOID
EFIAPI
-VmgSetOffsetValid (
+CcExitVmgSetOffsetValid (
IN OUT GHCB *Ghcb,
IN GHCB_REGISTER Offset
)
@@ -126,7 +126,7 @@ VmgSetOffsetValid (
**/
BOOLEAN
EFIAPI
-VmgIsOffsetValid (
+CcExitVmgIsOffsetValid (
IN GHCB *Ghcb,
IN GHCB_REGISTER Offset
)
@@ -155,7 +155,7 @@ VmgIsOffsetValid (
**/
EFI_STATUS
EFIAPI
-VmgExitHandleVc (
+CcExitHandleVc (
IN OUT EFI_EXCEPTION_TYPE *ExceptionType,
IN OUT EFI_SYSTEM_CONTEXT SystemContext
)
@@ -183,7 +183,7 @@ VmgExitHandleVc (
**/
EFI_STATUS
EFIAPI
-VmTdExitHandleVe (
+CcExitHandleVe (
IN OUT EFI_EXCEPTION_TYPE *ExceptionType,
IN OUT EFI_SYSTEM_CONTEXT SystemContext
)
diff --git a/UefiCpuPkg/Library/CpuExceptionHandlerLib/PeiDxeSmmCpuException.c b/UefiCpuPkg/Library/CpuExceptionHandlerLib/PeiDxeSmmCpuException.c
index 2b6d9da5c7..748cf8d3bf 100644
--- a/UefiCpuPkg/Library/CpuExceptionHandlerLib/PeiDxeSmmCpuException.c
+++ b/UefiCpuPkg/Library/CpuExceptionHandlerLib/PeiDxeSmmCpuException.c
@@ -40,7 +40,7 @@ CommonExceptionHandlerWorker (
// On other - ExceptionType contains (possibly new) exception
// value
//
- Status = VmgExitHandleVc (&ExceptionType, SystemContext);
+ Status = CcExitHandleVc (&ExceptionType, SystemContext);
if (!EFI_ERROR (Status)) {
return;
}
@@ -57,7 +57,7 @@ CommonExceptionHandlerWorker (
// On other - ExceptionType contains (possibly new) exception
// value
//
- Status = VmTdExitHandleVe (&ExceptionType, SystemContext);
+ Status = CcExitHandleVe (&ExceptionType, SystemContext);
if (!EFI_ERROR (Status)) {
return;
}
diff --git a/UefiCpuPkg/Library/CpuExceptionHandlerLib/SecPeiCpuException.c b/UefiCpuPkg/Library/CpuExceptionHandlerLib/SecPeiCpuException.c
index 0a9ea79f52..497cd16499 100644
--- a/UefiCpuPkg/Library/CpuExceptionHandlerLib/SecPeiCpuException.c
+++ b/UefiCpuPkg/Library/CpuExceptionHandlerLib/SecPeiCpuException.c
@@ -39,7 +39,7 @@ CommonExceptionHandler (
// On other - ExceptionType contains (possibly new) exception
// value
//
- Status = VmgExitHandleVc (&ExceptionType, SystemContext);
+ Status = CcExitHandleVc (&ExceptionType, SystemContext);
if (!EFI_ERROR (Status)) {
return;
}
@@ -57,7 +57,7 @@ CommonExceptionHandler (
// On other - ExceptionType contains (possibly new) exception
// value
//
- Status = VmTdExitHandleVe (&ExceptionType, SystemContext);
+ Status = CcExitHandleVe (&ExceptionType, SystemContext);
if (!EFI_ERROR (Status)) {
return;
}
diff --git a/UefiCpuPkg/Library/MpInitLib/AmdSev.c b/UefiCpuPkg/Library/MpInitLib/AmdSev.c
index 2dd8f4d746..ca9bfed7f3 100644
--- a/UefiCpuPkg/Library/MpInitLib/AmdSev.c
+++ b/UefiCpuPkg/Library/MpInitLib/AmdSev.c
@@ -209,7 +209,7 @@ SevEsPlaceApHlt (
Msr.GhcbPhysicalAddress = AsmReadMsr64 (MSR_SEV_ES_GHCB);
Ghcb = Msr.Ghcb;
- VmgInit (Ghcb, &InterruptState);
+ CcExitVmgInit (Ghcb, &InterruptState);
if (DoDecrement) {
DoDecrement = FALSE;
@@ -221,13 +221,13 @@ SevEsPlaceApHlt (
InterlockedDecrement ((UINT32 *)&CpuMpData->MpCpuExchangeInfo->NumApsExecuting);
}
- Status = VmgExit (Ghcb, SVM_EXIT_AP_RESET_HOLD, 0, 0);
+ Status = CcExitVmgExit (Ghcb, SVM_EXIT_AP_RESET_HOLD, 0, 0);
if ((Status == 0) && (Ghcb->SaveArea.SwExitInfo2 != 0)) {
- VmgDone (Ghcb, InterruptState);
+ CcExitVmgDone (Ghcb, InterruptState);
break;
}
- VmgDone (Ghcb, InterruptState);
+ CcExitVmgDone (Ghcb, InterruptState);
}
//
diff --git a/UefiCpuPkg/Library/MpInitLib/DxeMpLib.c b/UefiCpuPkg/Library/MpInitLib/DxeMpLib.c
index ef56af1f73..a84e9e33ba 100644
--- a/UefiCpuPkg/Library/MpInitLib/DxeMpLib.c
+++ b/UefiCpuPkg/Library/MpInitLib/DxeMpLib.c
@@ -222,9 +222,9 @@ GetSevEsAPMemory (
Msr.GhcbPhysicalAddress = AsmReadMsr64 (MSR_SEV_ES_GHCB);
Ghcb = Msr.Ghcb;
- VmgInit (Ghcb, &InterruptState);
- VmgExit (Ghcb, SVM_EXIT_AP_JUMP_TABLE, 0, (UINT64)(UINTN)StartAddress);
- VmgDone (Ghcb, InterruptState);
+ CcExitVmgInit (Ghcb, &InterruptState);
+ CcExitVmgExit (Ghcb, SVM_EXIT_AP_JUMP_TABLE, 0, (UINT64)(UINTN)StartAddress);
+ CcExitVmgDone (Ghcb, InterruptState);
return (UINTN)StartAddress;
}
diff --git a/UefiCpuPkg/Library/MpInitLib/X64/AmdSev.c b/UefiCpuPkg/Library/MpInitLib/X64/AmdSev.c
index 4c4f81af7c..bfda1e1903 100644
--- a/UefiCpuPkg/Library/MpInitLib/X64/AmdSev.c
+++ b/UefiCpuPkg/Library/MpInitLib/X64/AmdSev.c
@@ -150,16 +150,16 @@ SevSnpCreateSaveArea (
Msr.GhcbPhysicalAddress = AsmReadMsr64 (MSR_SEV_ES_GHCB);
Ghcb = Msr.Ghcb;
- VmgInit (Ghcb, &InterruptState);
+ CcExitVmgInit (Ghcb, &InterruptState);
Ghcb->SaveArea.Rax = SaveArea->SevFeatures;
- VmgSetOffsetValid (Ghcb, GhcbRax);
- VmgExitStatus = VmgExit (
+ CcExitVmgSetOffsetValid (Ghcb, GhcbRax);
+ VmgExitStatus = CcExitVmgExit (
Ghcb,
SVM_EXIT_SNP_AP_CREATION,
ExitInfo1,
ExitInfo2
);
- VmgDone (Ghcb, InterruptState);
+ CcExitVmgDone (Ghcb, InterruptState);
ASSERT (VmgExitStatus == 0);
if (VmgExitStatus != 0) {