diff options
Diffstat (limited to 'OvmfPkg/IntelTdx/Sec')
-rw-r--r-- | OvmfPkg/IntelTdx/Sec/SecMain.c | 6 | ||||
-rw-r--r-- | OvmfPkg/IntelTdx/Sec/SecMain.inf | 1 |
2 files changed, 4 insertions, 3 deletions
diff --git a/OvmfPkg/IntelTdx/Sec/SecMain.c b/OvmfPkg/IntelTdx/Sec/SecMain.c index 26d56be..ab01ec9 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.
diff --git a/OvmfPkg/IntelTdx/Sec/SecMain.inf b/OvmfPkg/IntelTdx/Sec/SecMain.inf index df2e749..9cf1249 100644 --- a/OvmfPkg/IntelTdx/Sec/SecMain.inf +++ b/OvmfPkg/IntelTdx/Sec/SecMain.inf @@ -49,6 +49,7 @@ CpuExceptionHandlerLib
PeilessStartupLib
PlatformInitLib
+ CcProbeLib
[Pcd]
gUefiOvmfPkgTokenSpaceGuid.PcdOvmfSecPageTablesBase
|