summaryrefslogtreecommitdiffstats
path: root/OvmfPkg/IntelTdx/Sec/SecMain.c
diff options
context:
space:
mode:
Diffstat (limited to 'OvmfPkg/IntelTdx/Sec/SecMain.c')
-rw-r--r--OvmfPkg/IntelTdx/Sec/SecMain.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/OvmfPkg/IntelTdx/Sec/SecMain.c b/OvmfPkg/IntelTdx/Sec/SecMain.c
index 26d56be335..ab01ec9ab1 100644
--- a/OvmfPkg/IntelTdx/Sec/SecMain.c
+++ b/OvmfPkg/IntelTdx/Sec/SecMain.c
@@ -25,7 +25,7 @@
#include <Library/CpuExceptionHandlerLib.h>
#include <IndustryStandard/Tdx.h>
#include <Library/PlatformInitLib.h>
-
+#include <Library/CcProbeLib.h>
#include <Library/PeilessStartupLib.h>
#define SEC_IDT_ENTRY_COUNT 34
@@ -61,7 +61,7 @@ SecCoreStartupWithStack (
UINT32 Index;
volatile UINT8 *Table;
- if (TdIsEnabled ()) {
+ if (CcProbe () == CcGuestTypeIntelTdx) {
//
// For Td guests, the memory map info is in TdHobLib. It should be processed
// first so that the memory is accepted. Otherwise access to the unaccepted
@@ -119,7 +119,7 @@ SecCoreStartupWithStack (
//
AsmWriteIdtr (&IdtDescriptor);
- if (TdIsEnabled ()) {
+ if (CcProbe () == CcGuestTypeIntelTdx) {
//
// InitializeCpuExceptionHandlers () should be called in Td guests so that
// #VE exceptions can be handled correctly.