* [staging/FmpDevicePkg-master][PATCH V2 0/2] Remove PcdFmpDeviceSystemResetRequired
@ 2018-07-20 7:16 Star Zeng
2018-07-20 7:16 ` [staging/FmpDevicePkg-master][PATCH V2 1/2] Remove PcdFmpDeviceSystemResetRequired from platform and Readme Star Zeng
2018-07-20 7:16 ` [staging/FmpDevicePkg-master][PATCH V2 2/2] FmpDevicePkg FmpDxe: Use Attributes to know whether reset is required Star Zeng
0 siblings, 2 replies; 4+ messages in thread
From: Star Zeng @ 2018-07-20 7:16 UTC (permalink / raw)
To: edk2-devel; +Cc: Star Zeng, Michael D Kinney
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Star Zeng (2):
Remove PcdFmpDeviceSystemResetRequired from platform and Readme
FmpDevicePkg FmpDxe: Use Attributes to know whether reset is required
FmpDevicePkg/FmpDevicePkg.dec | 7 -------
FmpDevicePkg/FmpDevicePkg.uni | 5 -----
FmpDevicePkg/FmpDxe/FmpDxe.c | 8 ++++++--
FmpDevicePkg/FmpDxe/FmpDxe.inf | 1 -
FmpDevicePkg/FmpDxe/FmpDxeLib.inf | 1 -
Readme.md | 3 ---
Vlv2TbltDevicePkg/FmpBlueSampleDevice.dsc | 6 ------
Vlv2TbltDevicePkg/FmpGreenSampleDevice.dsc | 6 ------
Vlv2TbltDevicePkg/FmpMinnowMaxSystem.dsc | 6 ------
Vlv2TbltDevicePkg/FmpRedSampleDevice.dsc | 6 ------
10 files changed, 6 insertions(+), 43 deletions(-)
--
2.7.0.windows.1
^ permalink raw reply [flat|nested] 4+ messages in thread
* [staging/FmpDevicePkg-master][PATCH V2 1/2] Remove PcdFmpDeviceSystemResetRequired from platform and Readme
2018-07-20 7:16 [staging/FmpDevicePkg-master][PATCH V2 0/2] Remove PcdFmpDeviceSystemResetRequired Star Zeng
@ 2018-07-20 7:16 ` Star Zeng
2018-07-20 7:16 ` [staging/FmpDevicePkg-master][PATCH V2 2/2] FmpDevicePkg FmpDxe: Use Attributes to know whether reset is required Star Zeng
1 sibling, 0 replies; 4+ messages in thread
From: Star Zeng @ 2018-07-20 7:16 UTC (permalink / raw)
To: edk2-devel; +Cc: Star Zeng, Michael D Kinney
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1040
FmpDxe will be updated to use Attributes to know whether reset
is required and PcdFmpDeviceSystemResetRequired will be removed.
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Star Zeng <star.zeng@intel.com>
---
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/master is early August
new information.
## 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
- #
- # TRUE if system reset is required after sucessful capsule update
- # FALSE if system reset is not required after sucessful capsule update
- #
- gFmpDevicePkgTokenSpaceGuid.PcdFmpDeviceSystemResetRequired|TRUE
-
<LibraryClasses>
#
# 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
- #
- # TRUE if system reset is required after sucessful capsule update
- # FALSE if system reset is not required after sucessful capsule update
- #
- gFmpDevicePkgTokenSpaceGuid.PcdFmpDeviceSystemResetRequired|TRUE
-
<LibraryClasses>
#
# Generic libraries that are used "as is" by all FMP modules
diff --git a/Vlv2TbltDevicePkg/FmpMinnowMaxSystem.dsc b/Vlv2TbltDevicePkg/FmpMinnowMaxSystem.dsc
index a1f5b6a3c469..45a173099cb2 100644
--- a/Vlv2TbltDevicePkg/FmpMinnowMaxSystem.dsc
+++ b/Vlv2TbltDevicePkg/FmpMinnowMaxSystem.dsc
@@ -48,12 +48,6 @@
#
!include Vlv2TbltDevicePkg/FmpCertificate.dsc
- #
- # TRUE if system reset is required after sucessful capsule update
- # FALSE if system reset is not required after sucessful capsule update
- #
- gFmpDevicePkgTokenSpaceGuid.PcdFmpDeviceSystemResetRequired|TRUE
-
<LibraryClasses>
#
# Generic libraries that are used "as is" by all FMP modules
diff --git a/Vlv2TbltDevicePkg/FmpRedSampleDevice.dsc b/Vlv2TbltDevicePkg/FmpRedSampleDevice.dsc
index 53a7027676a2..0ddc6c4226fa 100644
--- a/Vlv2TbltDevicePkg/FmpRedSampleDevice.dsc
+++ b/Vlv2TbltDevicePkg/FmpRedSampleDevice.dsc
@@ -44,12 +44,6 @@
#
!include Vlv2TbltDevicePkg/FmpCertificate.dsc
- #
- # TRUE if system reset is required after sucessful capsule update
- # FALSE if system reset is not required after sucessful capsule update
- #
- gFmpDevicePkgTokenSpaceGuid.PcdFmpDeviceSystemResetRequired|TRUE
-
<LibraryClasses>
#
# Generic libraries that are used "as is" by all FMP modules
--
2.7.0.windows.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [staging/FmpDevicePkg-master][PATCH V2 2/2] FmpDevicePkg FmpDxe: Use Attributes to know whether reset is required
2018-07-20 7:16 [staging/FmpDevicePkg-master][PATCH V2 0/2] Remove PcdFmpDeviceSystemResetRequired Star Zeng
2018-07-20 7:16 ` [staging/FmpDevicePkg-master][PATCH V2 1/2] Remove PcdFmpDeviceSystemResetRequired from platform and Readme Star Zeng
@ 2018-07-20 7:16 ` Star Zeng
2018-07-28 6:05 ` Kinney, Michael D
1 sibling, 1 reply; 4+ messages in thread
From: Star Zeng @ 2018-07-20 7:16 UTC (permalink / raw)
To: edk2-devel; +Cc: Star Zeng, Michael D Kinney
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1040
Use Attributes to know whether reset is required and remove
PcdFmpDeviceSystemResetRequired.
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Star Zeng <star.zeng@intel.com>
---
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 = { 0x40b2d964, 0xfe11, 0x40dc, { 0x82, 0x83, 0x2e, 0xfb, 0xda, 0x29, 0x53, 0x56 } }
[PcdsFixedAtBuild]
- ## Indicates if a full system reset is required before a firmware update to a
- # firmware devices takes effect.<BR><BR>
- # TRUE - System reset is required.<BR>
- # FALSE - System reset is not required.<BR>
- # @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 disabled 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 @@
#string STR_PACKAGE_DESCRIPTION #language en-US "This package provides libraries that support the implementation of a module that produces the Firmware Management Protocol to support the update of a system firmware component."
-#string STR_gFmpDevicePkgTokenSpaceGuid_PcdFmpDeviceSystemResetRequired_PROMPT #language en-US "FMP Device System Reset Required."
-#string STR_gFmpDevicePkgTokenSpaceGuid_PcdFmpDeviceSystemResetRequired_HELP #language en-US "Indicates if a full system reset is required before a firmware update to a firmware device takes effect.<BR><BR>\n"
- "TRUE - System reset is required.<BR>\n"
- "FALSE - System reset is not required.<BR>"
-
#string STR_gFmpDevicePkgTokenSpaceGuid_PcdFmpDeviceTestKeySha256Digest_PROMPT #language en-US "SHA-256 hash of PKCS7 test key."
#string STR_gFmpDevicePkgTokenSpaceGuid_PcdFmpDeviceTestKeySha256Digest_HELP #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 detection 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;
Status = EFI_SUCCESS;
Updateable = 0;
@@ -1110,9 +1112,11 @@ SetTheImage (
//
// 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) == 0) ||
+ ((AttributesSetting & IMAGE_ATTRIBUTE_RESET_REQUIRED) == 0)) {
mDescriptorPopulated = FALSE;
}
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
[Pcd]
- gFmpDevicePkgTokenSpaceGuid.PcdFmpDeviceSystemResetRequired ## CONSUMES
gFmpDevicePkgTokenSpaceGuid.PcdFmpDeviceImageIdName ## CONSUMES
gFmpDevicePkgTokenSpaceGuid.PcdFmpDeviceBuildTimeLowestSupportedVersion ## CONSUMES
gFmpDevicePkgTokenSpaceGuid.PcdFmpDeviceLockEventGuid ## CONSUMES
diff --git a/FmpDevicePkg/FmpDxe/FmpDxeLib.inf b/FmpDevicePkg/FmpDxe/FmpDxeLib.inf
index c8fe49e0c0d7..a011dcf4f2a0 100644
--- a/FmpDevicePkg/FmpDxe/FmpDxeLib.inf
+++ b/FmpDevicePkg/FmpDxe/FmpDxeLib.inf
@@ -76,7 +76,6 @@ [Protocols]
gEdkiiFirmwareManagementProgressProtocolGuid ## PRODUCES
[Pcd]
- gFmpDevicePkgTokenSpaceGuid.PcdFmpDeviceSystemResetRequired ## CONSUMES
gFmpDevicePkgTokenSpaceGuid.PcdFmpDeviceImageIdName ## CONSUMES
gFmpDevicePkgTokenSpaceGuid.PcdFmpDeviceBuildTimeLowestSupportedVersion ## CONSUMES
gFmpDevicePkgTokenSpaceGuid.PcdFmpDeviceLockEventGuid ## CONSUMES
--
2.7.0.windows.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [staging/FmpDevicePkg-master][PATCH V2 2/2] FmpDevicePkg FmpDxe: Use Attributes to know whether reset is required
2018-07-20 7:16 ` [staging/FmpDevicePkg-master][PATCH V2 2/2] FmpDevicePkg FmpDxe: Use Attributes to know whether reset is required Star Zeng
@ 2018-07-28 6:05 ` Kinney, Michael D
0 siblings, 0 replies; 4+ messages in thread
From: Kinney, Michael D @ 2018-07-28 6:05 UTC (permalink / raw)
To: Zeng, Star, edk2-devel@lists.01.org, Kinney, Michael D
Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com>
Mike
> -----Original Message-----
> From: Zeng, Star
> Sent: Friday, July 20, 2018 12:16 AM
> To: edk2-devel@lists.01.org
> Cc: Zeng, Star <star.zeng@intel.com>; Kinney, Michael D
> <michael.d.kinney@intel.com>
> Subject: [staging/FmpDevicePkg-master][PATCH V2 2/2]
> FmpDevicePkg FmpDxe: Use Attributes to know whether
> reset is required
>
> REF:
> https://bugzilla.tianocore.org/show_bug.cgi?id=1040
>
> Use Attributes to know whether reset is required and
> remove
> PcdFmpDeviceSystemResetRequired.
>
> Cc: Michael D Kinney <michael.d.kinney@intel.com>
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Star Zeng <star.zeng@intel.com>
> ---
> 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 = { 0x40b2d964, 0xfe11,
> 0x40dc, { 0x82, 0x83, 0x2e, 0xfb, 0xda, 0x29, 0x53,
> 0x56 } }
>
> [PcdsFixedAtBuild]
> - ## Indicates if a full system reset is required
> before a firmware update to a
> - # firmware devices takes effect.<BR><BR>
> - # TRUE - System reset is required.<BR>
> - # FALSE - System reset is not required.<BR>
> - # @Prompt FMP Device System Reset Required.
> -
> gFmpDevicePkgTokenSpaceGuid.PcdFmpDeviceSystemResetRequ
> ired|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 disabled 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 @@
>
> #string STR_PACKAGE_DESCRIPTION #language en-US
> "This package provides libraries that support the
> implementation of a module that produces the Firmware
> Management Protocol to support the update of a system
> firmware component."
>
> -#string
> STR_gFmpDevicePkgTokenSpaceGuid_PcdFmpDeviceSystemReset
> Required_PROMPT #language en-US "FMP Device System
> Reset Required."
> -#string
> STR_gFmpDevicePkgTokenSpaceGuid_PcdFmpDeviceSystemReset
> Required_HELP #language en-US "Indicates if a full
> system reset is required before a firmware update to a
> firmware device takes effect.<BR><BR>\n"
> -
> "TRUE - System reset is required.<BR>\n"
> -
> "FALSE - System reset is not required.<BR>"
> -
> #string
> STR_gFmpDevicePkgTokenSpaceGuid_PcdFmpDeviceTestKeySha2
> 56Digest_PROMPT #language en-US "SHA-256 hash of PKCS7
> test key."
> #string
> STR_gFmpDevicePkgTokenSpaceGuid_PcdFmpDeviceTestKeySha2
> 56Digest_HELP #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
> detection 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;
>
> Status = EFI_SUCCESS;
> Updateable = 0;
> @@ -1110,9 +1112,11 @@ SetTheImage (
>
> //
> // 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) == 0) ||
> + ((AttributesSetting &
> IMAGE_ATTRIBUTE_RESET_REQUIRED) == 0)) {
> mDescriptorPopulated = FALSE;
> }
>
> 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
>
> [Pcd]
> -
> gFmpDevicePkgTokenSpaceGuid.PcdFmpDeviceSystemResetRequ
> ired ## CONSUMES
> gFmpDevicePkgTokenSpaceGuid.PcdFmpDeviceImageIdName
> ## CONSUMES
>
> gFmpDevicePkgTokenSpaceGuid.PcdFmpDeviceBuildTimeLowest
> SupportedVersion ## CONSUMES
>
> gFmpDevicePkgTokenSpaceGuid.PcdFmpDeviceLockEventGuid
> ## CONSUMES
> diff --git a/FmpDevicePkg/FmpDxe/FmpDxeLib.inf
> b/FmpDevicePkg/FmpDxe/FmpDxeLib.inf
> index c8fe49e0c0d7..a011dcf4f2a0 100644
> --- a/FmpDevicePkg/FmpDxe/FmpDxeLib.inf
> +++ b/FmpDevicePkg/FmpDxe/FmpDxeLib.inf
> @@ -76,7 +76,6 @@ [Protocols]
> gEdkiiFirmwareManagementProgressProtocolGuid ##
> PRODUCES
>
> [Pcd]
> -
> gFmpDevicePkgTokenSpaceGuid.PcdFmpDeviceSystemResetRequ
> ired ## CONSUMES
> gFmpDevicePkgTokenSpaceGuid.PcdFmpDeviceImageIdName
> ## CONSUMES
>
> gFmpDevicePkgTokenSpaceGuid.PcdFmpDeviceBuildTimeLowest
> SupportedVersion ## CONSUMES
>
> gFmpDevicePkgTokenSpaceGuid.PcdFmpDeviceLockEventGuid
> ## CONSUMES
> --
> 2.7.0.windows.1
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2018-07-28 6:06 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-07-20 7:16 [staging/FmpDevicePkg-master][PATCH V2 0/2] Remove PcdFmpDeviceSystemResetRequired Star Zeng
2018-07-20 7:16 ` [staging/FmpDevicePkg-master][PATCH V2 1/2] Remove PcdFmpDeviceSystemResetRequired from platform and Readme Star Zeng
2018-07-20 7:16 ` [staging/FmpDevicePkg-master][PATCH V2 2/2] FmpDevicePkg FmpDxe: Use Attributes to know whether reset is required Star Zeng
2018-07-28 6:05 ` Kinney, Michael D
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox