TianoCore EDK2 master
Loading...
Searching...
No Matches
IntelTdx.c
Go to the documentation of this file.
1
10#include <PiPei.h>
11#include <Library/BaseLib.h>
12#include <Library/DebugLib.h>
13#include <Library/HobLib.h>
20#include <Library/TdxLib.h>
23#include <WorkArea.h>
25#include "Platform.h"
26
31VOID
33 VOID
34 )
35{
36 #ifdef MDE_CPU_X64
37 RETURN_STATUS PcdStatus;
38
39 if (!TdIsEnabled ()) {
40 return;
41 }
42
43 PcdStatus = PcdSet64S (PcdConfidentialComputingGuestAttr, CCAttrIntelTdx);
44 ASSERT_RETURN_ERROR (PcdStatus);
45
46 PcdStatus = PcdSet64S (PcdTdxSharedBitMask, TdSharedPageMask ());
47 ASSERT_RETURN_ERROR (PcdStatus);
48
49 #endif
50}
#define ASSERT_RETURN_ERROR(StatusParameter)
Definition: DebugLib.h:493
BOOLEAN EFIAPI TdIsEnabled()
Definition: IntelTdxNull.c:79
#define PcdSet64S(TokenName, Value)
Definition: PcdLib.h:511
VOID IntelTdxInitialize(VOID)
Definition: IntelTdx.c:32
UINT64 EFIAPI TdSharedPageMask(VOID)
Definition: TdInfo.c:68