TianoCore EDK2 master
Loading...
Searching...
No Matches
WorkArea.h
Go to the documentation of this file.
1
10#ifndef __OVMF_WORK_AREA_H__
11#define __OVMF_WORK_AREA_H__
12
15
16//
17// Confidential computing work area header definition. Any change
18// to the structure need to be kept in sync with the
19// PcdOvmfConfidentialComputingWorkAreaHeader.
20//
21// PcdOvmfConfidentialComputingWorkAreaHeader ==
22// sizeof (CONFIDENTIAL_COMPUTING_WORK_AREA_HEADER)
23// PcdOvmfConfidentialComputingWorkAreaHeader defined in:
24// OvmfPkg/OvmfPkg.dec
25// OvmfPkg/Include/Fdf/OvmfPkgDefines.fdf.inc
27 UINT8 GuestType;
28 UINT8 Reserved1[3];
30
31//
32// Internal structure for holding SEV-ES information needed during SEC phase
33// and valid only during SEC phase and early PEI during platform
34// initialization.
35//
36// This structure is also used by assembler files:
37// OvmfPkg/ResetVector/ResetVector.nasmb
38// OvmfPkg/ResetVector/Ia32/PageTables64.asm
39// OvmfPkg/ResetVector/Ia32/Flat32ToFlat64.asm
40// any changes must stay in sync with its usage.
41//
42typedef struct _SEC_SEV_ES_WORK_AREA {
43 //
44 // Hold the SevStatus MSR value read by OvmfPkg/ResetVector/Ia32/AmdSev.c
45 //
46 UINT64 SevStatusMsrValue;
47
48 UINT64 RandomData;
49
50 UINT64 EncryptionMask;
51
52 //
53 // Indicator that the VC handler is called. It is used during the SevFeature
54 // detection in OvmfPkg/ResetVector/Ia32/AmdSev.c
55 //
56 UINT8 ReceivedVc;
57 UINT8 Reserved[7];
58
59 // Used by SEC to generate Page State Change requests. This should be
60 // sized less than an equal to the GHCB shared buffer area to allow a
61 // single call to the hypervisor.
62 //
63 UINT8 WorkBuffer[1024];
65
66//
67// The SEV work area definition.
68//
69typedef struct _SEV_WORK_AREA {
71
72 SEC_SEV_ES_WORK_AREA SevEsWorkArea;
74
75//
76// Start of TDX Specific WorkArea definition
77//
78
79#define TDX_MEASUREMENT_TDHOB_BITMASK 0x1
80#define TDX_MEASUREMENT_CFVIMG_BITMASK 0x2
81
82typedef struct _TDX_MEASUREMENTS_DATA {
83 UINT32 MeasurementsBitmap;
84 UINT8 TdHobHashValue[SHA384_DIGEST_SIZE];
85 UINT8 CfvImgHashValue[SHA384_DIGEST_SIZE];
87
88//
89// The TDX work area definition
90//
91typedef struct _SEC_TDX_WORK_AREA {
92 UINT32 PageTableReady;
93 UINT32 Gpaw;
94 UINT64 HobList;
95 TDX_MEASUREMENTS_DATA TdxMeasurementsData;
97
98typedef struct _TDX_WORK_AREA {
100 SEC_TDX_WORK_AREA SecTdxWorkArea;
102
103//
104// End of TDX Specific WorkArea definition
105//
106
107typedef union {
109 SEV_WORK_AREA SevWorkArea;
110 TDX_WORK_AREA TdxWorkArea;
112
113#endif
#define SHA384_DIGEST_SIZE
Definition: BaseCryptLib.h:49