#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