From 79019c7a42287e8591ec98487db0e849384a74e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Corvin=20K=C3=B6hne?= Date: Fri, 17 Sep 2021 07:37:24 +0200 Subject: [PATCH] OvmfPkg: set a default value for the WorkAreaHeader PCD MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-by: Jiewen Yao --- OvmfPkg/Include/WorkArea.h | 5 +++++ OvmfPkg/OvmfPkg.dec | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) 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]