3 Work Area structure definition
5 Copyright (c) 2021, AMD Inc.
7 SPDX-License-Identifier: BSD-2-Clause-Patent
10 #ifndef __OVMF_WORK_AREA_H__
11 #define __OVMF_WORK_AREA_H__
13 #include <ConfidentialComputingGuestAttr.h>
16 // Confidential computing work area header definition. Any change
17 // to the structure need to be kept in sync with the
18 // PcdOvmfConfidentialComputingWorkAreaHeader.
20 // PcdOvmfConfidentialComputingWorkAreaHeader ==
21 // sizeof (CONFIDENTIAL_COMPUTING_WORK_AREA_HEADER)
22 // PcdOvmfConfidentialComputingWorkAreaHeader defined in:
23 // OvmfPkg/OvmfPkg.dec
24 // OvmfPkg/OvmfPkgDefines.fdf.inc
25 typedef struct _CONFIDENTIAL_COMPUTING_WORK_AREA_HEADER
{
28 } CONFIDENTIAL_COMPUTING_WORK_AREA_HEADER
;
31 // Internal structure for holding SEV-ES information needed during SEC phase
32 // and valid only during SEC phase and early PEI during platform
35 // This structure is also used by assembler files:
36 // OvmfPkg/ResetVector/ResetVector.nasmb
37 // OvmfPkg/ResetVector/Ia32/PageTables64.asm
38 // OvmfPkg/ResetVector/Ia32/Flat32ToFlat64.asm
39 // any changes must stay in sync with its usage.
41 typedef struct _SEC_SEV_ES_WORK_AREA
{
43 // Hold the SevStatus MSR value read by OvmfPkg/ResetVector/Ia32/AmdSev.c
45 UINT64 SevStatusMsrValue
;
49 UINT64 EncryptionMask
;
52 // Indicator that the VC handler is called. It is used during the SevFeature
53 // detection in OvmfPkg/ResetVector/Ia32/AmdSev.c
56 } SEC_SEV_ES_WORK_AREA
;
59 // The SEV work area definition.
61 typedef struct _SEV_WORK_AREA
{
62 CONFIDENTIAL_COMPUTING_WORK_AREA_HEADER Header
;
64 SEC_SEV_ES_WORK_AREA SevEsWorkArea
;
68 // The TDX work area definition
70 typedef struct _SEC_TDX_WORK_AREA
{
71 UINT32 PageTableReady
;
76 typedef struct _TDX_WORK_AREA
{
77 CONFIDENTIAL_COMPUTING_WORK_AREA_HEADER Header
;
78 SEC_TDX_WORK_AREA SecTdxWorkArea
;
82 CONFIDENTIAL_COMPUTING_WORK_AREA_HEADER Header
;
83 SEV_WORK_AREA SevWorkArea
;
84 TDX_WORK_AREA TdxWorkArea
;