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__
14 // Guest type for the work area
17 GUEST_TYPE_NON_ENCRYPTED
,
23 // Confidential computing work area header definition. Any change
24 // to the structure need to be kept in sync with the
25 // PcdOvmfConfidentialComputingWorkAreaHeader.
27 // PcdOvmfConfidentialComputingWorkAreaHeader ==
28 // sizeof (CONFIDENTIAL_COMPUTING_WORK_AREA_HEADER)
29 // PcdOvmfConfidentialComputingWorkAreaHeader defined in:
30 // OvmfPkg/OvmfPkg.dec
31 // OvmfPkg/OvmfPkgDefines.fdf.inc
32 typedef struct _CONFIDENTIAL_COMPUTING_WORK_AREA_HEADER
{
35 } CONFIDENTIAL_COMPUTING_WORK_AREA_HEADER
;
38 // Internal structure for holding SEV-ES information needed during SEC phase
39 // and valid only during SEC phase and early PEI during platform
42 // This structure is also used by assembler files:
43 // OvmfPkg/ResetVector/ResetVector.nasmb
44 // OvmfPkg/ResetVector/Ia32/PageTables64.asm
45 // OvmfPkg/ResetVector/Ia32/Flat32ToFlat64.asm
46 // any changes must stay in sync with its usage.
48 typedef struct _SEC_SEV_ES_WORK_AREA
{
50 // Hold the SevStatus MSR value read by OvmfPkg/ResetVector/Ia32/AmdSev.c
52 UINT64 SevStatusMsrValue
;
56 UINT64 EncryptionMask
;
59 // Indicator that the VC handler is called. It is used during the SevFeature
60 // detection in OvmfPkg/ResetVector/Ia32/AmdSev.c
63 } SEC_SEV_ES_WORK_AREA
;
66 // The SEV work area definition.
68 typedef struct _SEV_WORK_AREA
{
69 CONFIDENTIAL_COMPUTING_WORK_AREA_HEADER Header
;
71 SEC_SEV_ES_WORK_AREA SevEsWorkArea
;
75 CONFIDENTIAL_COMPUTING_WORK_AREA_HEADER Header
;
76 SEV_WORK_AREA SevWorkArea
;