#include <Library/CpuExceptionHandlerLib.h>\r
#include <IndustryStandard/Tdx.h>\r
#include <Library/PlatformInitLib.h>\r
-\r
+#include <Library/CcProbeLib.h>\r
#include <Library/PeilessStartupLib.h>\r
\r
#define SEC_IDT_ENTRY_COUNT 34\r
UINT32 Index;\r
volatile UINT8 *Table;\r
\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
//\r
AsmWriteIdtr (&IdtDescriptor);\r
\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
CpuExceptionHandlerLib\r
PeilessStartupLib\r
PlatformInitLib\r
+ CcProbeLib\r
\r
[Pcd]\r
gUefiOvmfPkgTokenSpaceGuid.PcdOvmfSecPageTablesBase\r
#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
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
}\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
LocalApicLib\r
MemEncryptSevLib\r
CpuExceptionHandlerLib\r
+ CcProbeLib\r
\r
[Ppis]\r
gEfiTemporaryRamSupportPpiGuid # PPI ALWAYS_PRODUCED\r