]>
Commit | Line | Data |
---|---|---|
80e67af9 BS |
1 | /** @file\r |
2 | \r | |
3 | Work Area structure definition\r | |
4 | \r | |
5 | Copyright (c) 2021, AMD Inc.\r | |
6 | \r | |
7 | SPDX-License-Identifier: BSD-2-Clause-Patent\r | |
8 | **/\r | |
9 | \r | |
10 | #ifndef __OVMF_WORK_AREA_H__\r | |
11 | #define __OVMF_WORK_AREA_H__\r | |
12 | \r | |
13 | //\r | |
14 | // Guest type for the work area\r | |
15 | //\r | |
16 | typedef enum {\r | |
17 | GUEST_TYPE_NON_ENCRYPTED,\r | |
18 | GUEST_TYPE_AMD_SEV,\r | |
19 | GUEST_TYPE_INTEL_TDX,\r | |
80e67af9 BS |
20 | } GUEST_TYPE;\r |
21 | \r | |
22 | //\r | |
23 | // Confidential computing work area header definition. Any change\r | |
24 | // to the structure need to be kept in sync with the\r | |
25 | // PcdOvmfConfidentialComputingWorkAreaHeader.\r | |
26 | //\r | |
79019c7a CK |
27 | // PcdOvmfConfidentialComputingWorkAreaHeader ==\r |
28 | // sizeof (CONFIDENTIAL_COMPUTING_WORK_AREA_HEADER)\r | |
29 | // PcdOvmfConfidentialComputingWorkAreaHeader defined in:\r | |
30 | // OvmfPkg/OvmfPkg.dec\r | |
31 | // OvmfPkg/OvmfPkgDefines.fdf.inc\r | |
80e67af9 | 32 | typedef struct _CONFIDENTIAL_COMPUTING_WORK_AREA_HEADER {\r |
ac0a286f MK |
33 | UINT8 GuestType;\r |
34 | UINT8 Reserved1[3];\r | |
80e67af9 BS |
35 | } CONFIDENTIAL_COMPUTING_WORK_AREA_HEADER;\r |
36 | \r | |
37 | //\r | |
38 | // Internal structure for holding SEV-ES information needed during SEC phase\r | |
39 | // and valid only during SEC phase and early PEI during platform\r | |
40 | // initialization.\r | |
41 | //\r | |
42 | // This structure is also used by assembler files:\r | |
43 | // OvmfPkg/ResetVector/ResetVector.nasmb\r | |
44 | // OvmfPkg/ResetVector/Ia32/PageTables64.asm\r | |
45 | // OvmfPkg/ResetVector/Ia32/Flat32ToFlat64.asm\r | |
46 | // any changes must stay in sync with its usage.\r | |
47 | //\r | |
48 | typedef struct _SEC_SEV_ES_WORK_AREA {\r | |
ac0a286f MK |
49 | UINT8 SevEsEnabled;\r |
50 | UINT8 Reserved1[7];\r | |
80e67af9 | 51 | \r |
ac0a286f | 52 | UINT64 RandomData;\r |
80e67af9 | 53 | \r |
ac0a286f | 54 | UINT64 EncryptionMask;\r |
80e67af9 BS |
55 | } SEC_SEV_ES_WORK_AREA;\r |
56 | \r | |
57 | //\r | |
58 | // The SEV work area definition.\r | |
59 | //\r | |
60 | typedef struct _SEV_WORK_AREA {\r | |
ac0a286f | 61 | CONFIDENTIAL_COMPUTING_WORK_AREA_HEADER Header;\r |
80e67af9 | 62 | \r |
ac0a286f | 63 | SEC_SEV_ES_WORK_AREA SevEsWorkArea;\r |
80e67af9 BS |
64 | } SEV_WORK_AREA;\r |
65 | \r | |
66 | typedef union {\r | |
ac0a286f MK |
67 | CONFIDENTIAL_COMPUTING_WORK_AREA_HEADER Header;\r |
68 | SEV_WORK_AREA SevWorkArea;\r | |
80e67af9 BS |
69 | } OVMF_WORK_AREA;\r |
70 | \r | |
71 | #endif\r |