diff options
author | Corvin Köhne <c.koehne@beckhoff.com> | 2021-09-17 07:37:24 +0200 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2021-09-22 09:34:24 +0000 |
commit | 79019c7a42287e8591ec98487db0e849384a74e1 (patch) | |
tree | 73e2c3950219e5633a6dcc8cc54295aee466e8db | |
parent | f334c5a41dc4702b1c767c6614025aa2f802f9a4 (diff) | |
download | edk2-79019c7a42287e8591ec98487db0e849384a74e1.tar.gz edk2-79019c7a42287e8591ec98487db0e849384a74e1.tar.bz2 edk2-79019c7a42287e8591ec98487db0e849384a74e1.zip |
OvmfPkg: set a default value for the WorkAreaHeader PCD
SEC checks in IsSevGuest if the PCD defined WorkAreaHeader size
matches the size of the WorkAreaHeader struct definition. Set a
default value for the PCD to avoid unnecessary DSC/FDF file
changes in all OVMF DSC/FDF files.
Signed-off-by: Corvin Köhne <c.koehne@beckhoff.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
-rw-r--r-- | OvmfPkg/Include/WorkArea.h | 5 | ||||
-rw-r--r-- | OvmfPkg/OvmfPkg.dec | 2 |
2 files changed, 6 insertions, 1 deletions
diff --git a/OvmfPkg/Include/WorkArea.h b/OvmfPkg/Include/WorkArea.h index c16030e3ac..721d0f1a8d 100644 --- a/OvmfPkg/Include/WorkArea.h +++ b/OvmfPkg/Include/WorkArea.h @@ -25,6 +25,11 @@ typedef enum { // to the structure need to be kept in sync with the
// PcdOvmfConfidentialComputingWorkAreaHeader.
//
+// PcdOvmfConfidentialComputingWorkAreaHeader ==
+// sizeof (CONFIDENTIAL_COMPUTING_WORK_AREA_HEADER)
+// PcdOvmfConfidentialComputingWorkAreaHeader defined in:
+// OvmfPkg/OvmfPkg.dec
+// OvmfPkg/OvmfPkgDefines.fdf.inc
typedef struct _CONFIDENTIAL_COMPUTING_WORK_AREA_HEADER {
UINT8 GuestType;
UINT8 Reserved1[3];
diff --git a/OvmfPkg/OvmfPkg.dec b/OvmfPkg/OvmfPkg.dec index c37dafad49..1be8d5dccb 100644 --- a/OvmfPkg/OvmfPkg.dec +++ b/OvmfPkg/OvmfPkg.dec @@ -338,7 +338,7 @@ # The size of this header is used early boot, and is provided through
# a fixed PCD. It need to be kept in sync with any changes to the
# header definition.
- gUefiOvmfPkgTokenSpaceGuid.PcdOvmfConfidentialComputingWorkAreaHeader|0|UINT32|0x51
+ gUefiOvmfPkgTokenSpaceGuid.PcdOvmfConfidentialComputingWorkAreaHeader|4|UINT32|0x51
[PcdsDynamic, PcdsDynamicEx]
|