From nobody Tue May 7 18:37:30 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) smtp.mailfrom=edk2-devel-bounces@lists.01.org; dmarc=fail(p=none dis=none) header.from=intel.com Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 1532070968759319.4430376208064; Fri, 20 Jul 2018 00:16:08 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 92A942098EAD3; Fri, 20 Jul 2018 00:16:08 -0700 (PDT) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 46DD1202E5483 for ; Fri, 20 Jul 2018 00:16:07 -0700 (PDT) Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 20 Jul 2018 00:16:07 -0700 Received: from shwdeopenpsi068.ccr.corp.intel.com ([10.239.158.46]) by fmsmga008.fm.intel.com with ESMTP; 20 Jul 2018 00:16:06 -0700 X-Original-To: edk2-devel@lists.01.org Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) client-ip=198.145.21.10; envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org; Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=192.55.52.43; helo=mga05.intel.com; envelope-from=star.zeng@intel.com; receiver=edk2-devel@lists.01.org X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,377,1526367600"; d="scan'208";a="56464343" From: Star Zeng To: edk2-devel@lists.01.org Date: Fri, 20 Jul 2018 15:16:02 +0800 Message-Id: <1532070963-9512-2-git-send-email-star.zeng@intel.com> X-Mailer: git-send-email 2.7.0.windows.1 In-Reply-To: <1532070963-9512-1-git-send-email-star.zeng@intel.com> References: <1532070963-9512-1-git-send-email-star.zeng@intel.com> Subject: [edk2] [staging/FmpDevicePkg-master][PATCH V2 1/2] Remove PcdFmpDeviceSystemResetRequired from platform and Readme X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Michael D Kinney , Star Zeng MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail: RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D1040 FmpDxe will be updated to use Attributes to know whether reset is required and PcdFmpDeviceSystemResetRequired will be removed. Cc: Michael D Kinney Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Star Zeng --- Readme.md | 3 --- Vlv2TbltDevicePkg/FmpBlueSampleDevice.dsc | 6 ------ Vlv2TbltDevicePkg/FmpGreenSampleDevice.dsc | 6 ------ Vlv2TbltDevicePkg/FmpMinnowMaxSystem.dsc | 6 ------ Vlv2TbltDevicePkg/FmpRedSampleDevice.dsc | 6 ------ 5 files changed, 27 deletions(-) diff --git a/Readme.md b/Readme.md index bb6d0e1c2ac2..f4aecd7592f6 100644 --- a/Readme.md +++ b/Readme.md @@ -74,9 +74,6 @@ edk2/master. The target date for integration into edk2/m= aster is early August new information. =20 ## PCDs set per module -* PcdFmpDeviceSystemResetRequired - Indicates if a full - system reset is required before a firmware update to a - firmware devices takes effect * PcdFmpDeviceTestKeySha256Digest - The SHA-256 hash of a PKCS7 test key that is used to detect if a test key is being used to authenticate capsules. Test key detection diff --git a/Vlv2TbltDevicePkg/FmpBlueSampleDevice.dsc b/Vlv2TbltDevicePkg/= FmpBlueSampleDevice.dsc index 342fd982d2f9..d5183651ef7a 100644 --- a/Vlv2TbltDevicePkg/FmpBlueSampleDevice.dsc +++ b/Vlv2TbltDevicePkg/FmpBlueSampleDevice.dsc @@ -44,12 +44,6 @@ # !include Vlv2TbltDevicePkg/FmpCertificate.dsc =20 - # - # TRUE if system reset is required after sucessful capsule update - # FALSE if system reset is not required after sucessful capsule upda= te - # - gFmpDevicePkgTokenSpaceGuid.PcdFmpDeviceSystemResetRequired|TRUE - # # Generic libraries that are used "as is" by all FMP modules diff --git a/Vlv2TbltDevicePkg/FmpGreenSampleDevice.dsc b/Vlv2TbltDevicePkg= /FmpGreenSampleDevice.dsc index a9489972e69f..d8914e3f0ff1 100644 --- a/Vlv2TbltDevicePkg/FmpGreenSampleDevice.dsc +++ b/Vlv2TbltDevicePkg/FmpGreenSampleDevice.dsc @@ -44,12 +44,6 @@ # !include Vlv2TbltDevicePkg/FmpCertificate.dsc =20 - # - # TRUE if system reset is required after sucessful capsule update - # FALSE if system reset is not required after sucessful capsule upda= te - # - gFmpDevicePkgTokenSpaceGuid.PcdFmpDeviceSystemResetRequired|TRUE - # # Generic libraries that are used "as is" by all FMP modules diff --git a/Vlv2TbltDevicePkg/FmpMinnowMaxSystem.dsc b/Vlv2TbltDevicePkg/F= mpMinnowMaxSystem.dsc index a1f5b6a3c469..45a173099cb2 100644 --- a/Vlv2TbltDevicePkg/FmpMinnowMaxSystem.dsc +++ b/Vlv2TbltDevicePkg/FmpMinnowMaxSystem.dsc @@ -48,12 +48,6 @@ # !include Vlv2TbltDevicePkg/FmpCertificate.dsc =20 - # - # TRUE if system reset is required after sucessful capsule update - # FALSE if system reset is not required after sucessful capsule upda= te - # - gFmpDevicePkgTokenSpaceGuid.PcdFmpDeviceSystemResetRequired|TRUE - # # Generic libraries that are used "as is" by all FMP modules diff --git a/Vlv2TbltDevicePkg/FmpRedSampleDevice.dsc b/Vlv2TbltDevicePkg/F= mpRedSampleDevice.dsc index 53a7027676a2..0ddc6c4226fa 100644 --- a/Vlv2TbltDevicePkg/FmpRedSampleDevice.dsc +++ b/Vlv2TbltDevicePkg/FmpRedSampleDevice.dsc @@ -44,12 +44,6 @@ # !include Vlv2TbltDevicePkg/FmpCertificate.dsc =20 - # - # TRUE if system reset is required after sucessful capsule update - # FALSE if system reset is not required after sucessful capsule upda= te - # - gFmpDevicePkgTokenSpaceGuid.PcdFmpDeviceSystemResetRequired|TRUE - # # Generic libraries that are used "as is" by all FMP modules --=20 2.7.0.windows.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel From nobody Tue May 7 18:37:30 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) smtp.mailfrom=edk2-devel-bounces@lists.01.org; dmarc=fail(p=none dis=none) header.from=intel.com Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 1532070971283904.7694047252195; Fri, 20 Jul 2018 00:16:11 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id BF59B2098EAD9; Fri, 20 Jul 2018 00:16:09 -0700 (PDT) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 4673D2098EAD1 for ; Fri, 20 Jul 2018 00:16:08 -0700 (PDT) Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 20 Jul 2018 00:16:08 -0700 Received: from shwdeopenpsi068.ccr.corp.intel.com ([10.239.158.46]) by fmsmga008.fm.intel.com with ESMTP; 20 Jul 2018 00:16:07 -0700 X-Original-To: edk2-devel@lists.01.org Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) client-ip=198.145.21.10; envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org; Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=192.55.52.43; helo=mga05.intel.com; envelope-from=star.zeng@intel.com; receiver=edk2-devel@lists.01.org X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,377,1526367600"; d="scan'208";a="56464349" From: Star Zeng To: edk2-devel@lists.01.org Date: Fri, 20 Jul 2018 15:16:03 +0800 Message-Id: <1532070963-9512-3-git-send-email-star.zeng@intel.com> X-Mailer: git-send-email 2.7.0.windows.1 In-Reply-To: <1532070963-9512-1-git-send-email-star.zeng@intel.com> References: <1532070963-9512-1-git-send-email-star.zeng@intel.com> Subject: [edk2] [staging/FmpDevicePkg-master][PATCH V2 2/2] FmpDevicePkg FmpDxe: Use Attributes to know whether reset is required X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Michael D Kinney , Star Zeng MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail: RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D1040 Use Attributes to know whether reset is required and remove PcdFmpDeviceSystemResetRequired. Cc: Michael D Kinney Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Star Zeng Reviewed-by: Michael D Kinney --- FmpDevicePkg/FmpDevicePkg.dec | 7 ------- FmpDevicePkg/FmpDevicePkg.uni | 5 ----- FmpDevicePkg/FmpDxe/FmpDxe.c | 8 ++++++-- FmpDevicePkg/FmpDxe/FmpDxe.inf | 1 - FmpDevicePkg/FmpDxe/FmpDxeLib.inf | 1 - 5 files changed, 6 insertions(+), 16 deletions(-) diff --git a/FmpDevicePkg/FmpDevicePkg.dec b/FmpDevicePkg/FmpDevicePkg.dec index 9ea0d7335901..ad0730a53263 100644 --- a/FmpDevicePkg/FmpDevicePkg.dec +++ b/FmpDevicePkg/FmpDevicePkg.dec @@ -62,13 +62,6 @@ [Guids] gFmpDevicePkgTokenSpaceGuid =3D { 0x40b2d964, 0xfe11, 0x40dc, { 0x82, 0x= 83, 0x2e, 0xfb, 0xda, 0x29, 0x53, 0x56 } } =20 [PcdsFixedAtBuild] - ## Indicates if a full system reset is required before a firmware update= to a - # firmware devices takes effect.

- # TRUE - System reset is required.
- # FALSE - System reset is not required.
- # @Prompt FMP Device System Reset Required. - gFmpDevicePkgTokenSpaceGuid.PcdFmpDeviceSystemResetRequired|TRUE|BOOLEAN= |0x40000008 - ## The SHA-256 hash of a PKCS7 test key that is used to detect if a test= key # is being used to authenticate capsules. Test key detection is disabl= ed by # setting the value to {0}. diff --git a/FmpDevicePkg/FmpDevicePkg.uni b/FmpDevicePkg/FmpDevicePkg.uni index da31d0ac816a..fed1da48026e 100644 --- a/FmpDevicePkg/FmpDevicePkg.uni +++ b/FmpDevicePkg/FmpDevicePkg.uni @@ -22,11 +22,6 @@ =20 #string STR_PACKAGE_DESCRIPTION #language en-US "This package provides l= ibraries that support the implementation of a module that produces the Firm= ware Management Protocol to support the update of a system firmware compone= nt." =20 -#string STR_gFmpDevicePkgTokenSpaceGuid_PcdFmpDeviceSystemResetRequired_PR= OMPT #language en-US "FMP Device System Reset Required." -#string STR_gFmpDevicePkgTokenSpaceGuid_PcdFmpDeviceSystemResetRequired_HE= LP #language en-US "Indicates if a full system reset is required before = a firmware update to a firmware device takes effect.

\n" - = "TRUE - System reset is required.
\n" - = "FALSE - System reset is not required.
" - #string STR_gFmpDevicePkgTokenSpaceGuid_PcdFmpDeviceTestKeySha256Digest_PR= OMPT #language en-US "SHA-256 hash of PKCS7 test key." #string STR_gFmpDevicePkgTokenSpaceGuid_PcdFmpDeviceTestKeySha256Digest_HE= LP #language en-US "The SHA-256 hash of a PKCS7 test key that is used to= detect if a test key" = "is being used to authenticate capsules. Test key de= tection can be disabled" diff --git a/FmpDevicePkg/FmpDxe/FmpDxe.c b/FmpDevicePkg/FmpDxe/FmpDxe.c index 091f950b95b2..718054dea61e 100644 --- a/FmpDevicePkg/FmpDxe/FmpDxe.c +++ b/FmpDevicePkg/FmpDxe/FmpDxe.c @@ -898,6 +898,8 @@ SetTheImage ( UINT32 AllHeaderSize; UINT32 IncommingFwVersion; UINT32 LastAttemptStatus; + UINT64 AttributesSupported; + UINT64 AttributesSetting; =20 Status =3D EFI_SUCCESS; Updateable =3D 0; @@ -1110,9 +1112,11 @@ SetTheImage ( =20 // // Set flag so the descriptor is repopulated - // This only applied to devices that do not require system reboot + // This is only applied to devices that do not require system reboot // - if (!PcdGetBool (PcdFmpDeviceSystemResetRequired)) { + FmpDeviceGetAttributes (&AttributesSupported, &AttributesSetting); + if (((AttributesSupported & IMAGE_ATTRIBUTE_RESET_REQUIRED) =3D=3D 0) || + ((AttributesSetting & IMAGE_ATTRIBUTE_RESET_REQUIRED) =3D=3D 0)) { mDescriptorPopulated =3D FALSE; } =20 diff --git a/FmpDevicePkg/FmpDxe/FmpDxe.inf b/FmpDevicePkg/FmpDxe/FmpDxe.inf index 256c50bf0316..a5817f0a0dd0 100644 --- a/FmpDevicePkg/FmpDxe/FmpDxe.inf +++ b/FmpDevicePkg/FmpDxe/FmpDxe.inf @@ -76,7 +76,6 @@ [Protocols] gEdkiiFirmwareManagementProgressProtocolGuid ## PRODUCES =20 [Pcd] - gFmpDevicePkgTokenSpaceGuid.PcdFmpDeviceSystemResetRequired = ## CONSUMES gFmpDevicePkgTokenSpaceGuid.PcdFmpDeviceImageIdName = ## CONSUMES gFmpDevicePkgTokenSpaceGuid.PcdFmpDeviceBuildTimeLowestSupportedVersion = ## CONSUMES gFmpDevicePkgTokenSpaceGuid.PcdFmpDeviceLockEventGuid = ## CONSUMES diff --git a/FmpDevicePkg/FmpDxe/FmpDxeLib.inf b/FmpDevicePkg/FmpDxe/FmpDxe= Lib.inf index c8fe49e0c0d7..a011dcf4f2a0 100644 --- a/FmpDevicePkg/FmpDxe/FmpDxeLib.inf +++ b/FmpDevicePkg/FmpDxe/FmpDxeLib.inf @@ -76,7 +76,6 @@ [Protocols] gEdkiiFirmwareManagementProgressProtocolGuid ## PRODUCES =20 [Pcd] - gFmpDevicePkgTokenSpaceGuid.PcdFmpDeviceSystemResetRequired = ## CONSUMES gFmpDevicePkgTokenSpaceGuid.PcdFmpDeviceImageIdName = ## CONSUMES gFmpDevicePkgTokenSpaceGuid.PcdFmpDeviceBuildTimeLowestSupportedVersion = ## CONSUMES gFmpDevicePkgTokenSpaceGuid.PcdFmpDeviceLockEventGuid = ## CONSUMES --=20 2.7.0.windows.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel