17UINT64 mTdSharedPageMask = 0;
18UINT32 mTdMaxVCpuNum = 0;
20BOOLEAN mTdDataReturned =
FALSE;
42 Status =
TdCall (TDCALL_TDINFO, 0, 0, 0, &TdReturnData);
43 if (Status == TDX_EXIT_REASON_SUCCESS) {
44 Gpaw = (UINT8)(TdReturnData.TdInfo.Gpaw & 0x3f);
45 mTdSharedPageMask = 1ULL << (Gpaw - 1);
46 mTdMaxVCpuNum = TdReturnData.TdInfo.MaxVcpus;
47 mTdVCpuNum = TdReturnData.TdInfo.NumVcpus;
48 mTdDataReturned =
TRUE;
50 DEBUG ((DEBUG_ERROR,
"Failed call TDCALL_TDINFO. %llx\n", Status));
51 mTdDataReturned =
FALSE;
54 return mTdDataReturned;
72 if (mTdDataReturned) {
73 return mTdSharedPageMask;
76 return GetTdInfo () ? mTdSharedPageMask : 0;
91 if (mTdDataReturned) {
110 if (mTdDataReturned) {
UINTN EFIAPI TdCall(IN UINT64 Leaf, IN UINT64 Arg1, IN UINT64 Arg2, IN UINT64 Arg3, IN OUT VOID *Results)
#define DEBUG(Expression)
UINT32 EFIAPI TdMaxVCpuNum(VOID)
UINT64 EFIAPI TdSharedPageMask(VOID)
UINT32 EFIAPI TdVCpuNum(VOID)