From nobody Sun May 19 02:06:41 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+80764+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+80764+1787277+3901457@groups.io ARC-Seal: i=1; a=rsa-sha256; t=1631783026; cv=none; d=zohomail.com; s=zohoarc; b=PM+97tLOrIgbt8UrD84E8y0ZcQ6/SDJ7xAU2VYlBzcCBLnPcemFkXO2FrSMb9LGga7UGH+ZTeUlqVrKq4L+D1LHnDK8tn4b0vhjHDfBWgVEbRV4vESF/ECTgysV6HCNWurJMVLsZEMAHVc7qEaks+lFUordOKmle52tKkGdAk1U= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1631783026; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Sender:Subject:To; bh=CVKdQIj05G6M3Z43dGSSO5utmVxFay4cQFTUhnw+umA=; b=XHNw2cmc6FiMYMd+TKINufDcdkDdMvfNNMc+B28ogliPvooTjpxOpOw/HuYRAQmpxUQnxWUCzzpuVd+8sbZ2zq/ZBLaaJQ1PLUNZidG5eM+02+N+7t8nBuXkHQlpl2zUFNfDY9hzsjcOGM5dK1YS7SlnbNbQjWxrU91uMCIolQg= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+80764+1787277+3901457@groups.io Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1631783026878443.43866873543095; Thu, 16 Sep 2021 02:03:46 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id fmvRYY1788612x6BDp1vRDuh; Thu, 16 Sep 2021 02:03:46 -0700 X-Received: from Internet2.beckhoff.com (Internet2.beckhoff.com [194.25.186.210]) by mx.groups.io with SMTP id smtpd.web09.8383.1631783025235692013 for ; Thu, 16 Sep 2021 02:03:45 -0700 X-Received: from 172.17.5.170 by Internet2.beckhoff.com (Tls12, Aes256, Sha384, DiffieHellmanEllipticKey256); Thu, 16 Sep 2021 09:03:43 GMT X-Received: from CorvinK-NB03.beckhoff.com (172.17.62.165) by ex04.beckhoff.com (172.17.5.170) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2308.14; Thu, 16 Sep 2021 11:03:42 +0200 From: =?UTF-8?B?Q29ydmluIEvDtmhuZQ==?= To: CC: , , , , , , =?UTF-8?q?Corvin=20K=C3=B6hne?= Subject: [edk2-devel] [PATCH v3] OvmfPkg: set a default value for the WorkAreaHeader PCD Date: Thu, 16 Sep 2021 11:03:04 +0200 Message-ID: <20210916090304.3312-1-c.koehne@beckhoff.com> MIME-Version: 1.0 X-Originating-IP: [172.17.62.165] X-ClientProxiedBy: ex03.beckhoff.com (172.17.2.169) To ex04.beckhoff.com (172.17.5.170) Precedence: Bulk List-Unsubscribe: List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,c.koehne@beckhoff.com X-Gm-Message-State: r4r5C2sck5TSoEszYR4o8yoZx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1631783026; bh=rtzuheJJf1D7muJToMsQ+9Bc/PeVk9OzFknjfaH9dyk=; h=CC:Content-Type:Date:From:Reply-To:Subject:To; b=IRb66DKpdzIWgPSSXnbJxRZdqnByL7nxU8YafQ2ZrWPhWX8jH7XKjGil72PNsr0SRUz J6lXmvWb42caA5spb0p/3pI4GheyUBKi+ifM6Nx7hkxDJJa2CceYckQCN/Jgg+I2HvU3V jgrsQe3F4K84vqLpX1YbcxSOHeaZp6d23dQ= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1631783027966100001 Content-Type: text/plain; charset="utf-8" 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=C3=B6hne Reviewed-by: Jiewen Yao --- OvmfPkg/Include/WorkArea.h | 4 ++++ OvmfPkg/OvmfPkg.dec | 7 ++++++- OvmfPkg/OvmfPkgDefines.fdf.inc | 6 ------ 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/OvmfPkg/Include/WorkArea.h b/OvmfPkg/Include/WorkArea.h index c16030e3ac..0f9b442e43 100644 --- a/OvmfPkg/Include/WorkArea.h +++ b/OvmfPkg/Include/WorkArea.h @@ -25,6 +25,10 @@ typedef enum { // to the structure need to be kept in sync with the // PcdOvmfConfidentialComputingWorkAreaHeader. // +// PcdOvmfConfidentialComputingWorkAreaHeader =3D=3D +// sizeof (CONFIDENTIAL_COMPUTING_WORK_AREA_HEADER) +// +// PcdOvmfConfidentialComputingWorkAreaHeader defined in OvmfPkg/OvmfPkg.d= ec typedef struct _CONFIDENTIAL_COMPUTING_WORK_AREA_HEADER { UINT8 GuestType; UINT8 Reserved1[3]; diff --git a/OvmfPkg/OvmfPkg.dec b/OvmfPkg/OvmfPkg.dec index c37dafad49..a5119b1909 100644 --- a/OvmfPkg/OvmfPkg.dec +++ b/OvmfPkg/OvmfPkg.dec @@ -338,7 +338,12 @@ # 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 + # + # PcdOvmfConfidentialComputingWorkAreaHeader =3D=3D + # sizeof (CONFIDENTIAL_COMPUTING_WORK_AREA_HEADER) + # + # CONFIDENTIAL_COMPUTING_WORK_AREA_HEADER defined in OvmfPkg/Include/Wor= kArea.h + gUefiOvmfPkgTokenSpaceGuid.PcdOvmfConfidentialComputingWorkAreaHeader|4|= UINT32|0x51 [PcdsDynamic, PcdsDynamicEx] diff --git a/OvmfPkg/OvmfPkgDefines.fdf.inc b/OvmfPkg/OvmfPkgDefines.fdf.inc index 3b5e452539..35fd454b97 100644 --- a/OvmfPkg/OvmfPkgDefines.fdf.inc +++ b/OvmfPkg/OvmfPkgDefines.fdf.inc @@ -82,12 +82,6 @@ SET gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwW= orkingSize =3D $(BLOCK_SIZ SET gUefiOvmfPkgTokenSpaceGuid.PcdOvmfFlashNvStorageFtwSpareBase =3D gUefi= OvmfPkgTokenSpaceGuid.PcdOvmfFlashNvStorageFtwWorkingBase + gEfiMdeModulePk= gTokenSpaceGuid.PcdFlashNvStorageFtwWorkingSize SET gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareSize =3D $(VAR= S_SPARE_SIZE) -# The OVMF WorkArea contains a fixed size header followed by the actual da= ta. -# The size of header is accessed through a fixed PCD in the reset vector c= ode. -# The value need to be kept in sync with the any changes to the Confidenti= al -# Computing Work Area header defined in the Include/WorkArea.h -SET gUefiOvmfPkgTokenSpaceGuid.PcdOvmfConfidentialComputingWorkAreaHeader = =3D 4 - !if $(SMM_REQUIRE) =3D=3D TRUE SET gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableBase64 =3D gUe= fiOvmfPkgTokenSpaceGuid.PcdOvmfFlashNvStorageVariableBase SET gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingBase =3D gUe= fiOvmfPkgTokenSpaceGuid.PcdOvmfFlashNvStorageFtwWorkingBase -- 2.11.0 Beckhoff Automation GmbH & Co. KG | Managing Director: Dipl. Phys. Hans Bec= khoff Registered office: Verl, Germany | Register court: Guetersloh HRA 7075 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#80764): https://edk2.groups.io/g/devel/message/80764 Mute This Topic: https://groups.io/mt/85647577/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-