]> git.proxmox.com Git - mirror_edk2.git/blobdiff - OvmfPkg/Sec/SecMain.c
OvmfPkg: Call CcProbe in SecMain.c instead of TsIsEnabled
[mirror_edk2.git] / OvmfPkg / Sec / SecMain.c
index ca9717a7b526f8544df0d54c6dee4381250ccff0..8949d10157087ba485dfd35aa70d7cbf761cb98d 100644 (file)
@@ -28,6 +28,7 @@
 #include <Library/CpuExceptionHandlerLib.h>\r
 #include <Ppi/TemporaryRamSupport.h>\r
 #include <Library/PlatformInitLib.h>\r
+#include <Library/CcProbeLib.h>\r
 #include "AmdSev.h"\r
 \r
 #define SEC_IDT_ENTRY_COUNT  34\r
@@ -738,7 +739,7 @@ SecCoreStartupWithStack (
   volatile UINT8        *Table;\r
 \r
  #if defined (TDX_GUEST_SUPPORTED)\r
-  if (TdIsEnabled ()) {\r
+  if (CcProbe () == CcGuestTypeIntelTdx) {\r
     //\r
     // For Td guests, the memory map info is in TdHobLib. It should be processed\r
     // first so that the memory is accepted. Otherwise access to the unaccepted\r
@@ -828,7 +829,7 @@ SecCoreStartupWithStack (
   }\r
 \r
  #if defined (TDX_GUEST_SUPPORTED)\r
-  if (TdIsEnabled ()) {\r
+  if (CcProbe () == CcGuestTypeIntelTdx) {\r
     //\r
     // InitializeCpuExceptionHandlers () should be called in Td guests so that\r
     // #VE exceptions can be handled correctly.\r