mirror of
https://github.com/acidanthera/audk.git
synced 2025-04-07 19:45:07 +02:00
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> Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com>
This commit is contained in:
parent
ebfac291bd
commit
f1a921cab2
@ -62,13 +62,6 @@
|
||||
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}.
|
||||
|
@ -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"
|
||||
|
@ -898,6 +898,9 @@ SetTheImage (
|
||||
UINT32 AllHeaderSize;
|
||||
UINT32 IncommingFwVersion;
|
||||
UINT32 LastAttemptStatus;
|
||||
EFI_STATUS GetAttributesStatus;
|
||||
UINT64 AttributesSupported;
|
||||
UINT64 AttributesSetting;
|
||||
|
||||
Status = EFI_SUCCESS;
|
||||
Updateable = 0;
|
||||
@ -1110,10 +1113,14 @@ 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 reset
|
||||
//
|
||||
if (!PcdGetBool (PcdFmpDeviceSystemResetRequired)) {
|
||||
mDescriptorPopulated = FALSE;
|
||||
GetAttributesStatus = FmpDeviceGetAttributes (&AttributesSupported, &AttributesSetting);
|
||||
if (!EFI_ERROR (GetAttributesStatus)) {
|
||||
if (((AttributesSupported & IMAGE_ATTRIBUTE_RESET_REQUIRED) == 0) ||
|
||||
((AttributesSetting & IMAGE_ATTRIBUTE_RESET_REQUIRED) == 0)) {
|
||||
mDescriptorPopulated = FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
cleanup:
|
||||
|
@ -76,7 +76,6 @@
|
||||
gEdkiiFirmwareManagementProgressProtocolGuid ## PRODUCES
|
||||
|
||||
[Pcd]
|
||||
gFmpDevicePkgTokenSpaceGuid.PcdFmpDeviceSystemResetRequired ## CONSUMES
|
||||
gFmpDevicePkgTokenSpaceGuid.PcdFmpDeviceImageIdName ## CONSUMES
|
||||
gFmpDevicePkgTokenSpaceGuid.PcdFmpDeviceBuildTimeLowestSupportedVersion ## CONSUMES
|
||||
gFmpDevicePkgTokenSpaceGuid.PcdFmpDeviceLockEventGuid ## CONSUMES
|
||||
|
@ -76,7 +76,6 @@
|
||||
gEdkiiFirmwareManagementProgressProtocolGuid ## PRODUCES
|
||||
|
||||
[Pcd]
|
||||
gFmpDevicePkgTokenSpaceGuid.PcdFmpDeviceSystemResetRequired ## CONSUMES
|
||||
gFmpDevicePkgTokenSpaceGuid.PcdFmpDeviceImageIdName ## CONSUMES
|
||||
gFmpDevicePkgTokenSpaceGuid.PcdFmpDeviceBuildTimeLowestSupportedVersion ## CONSUMES
|
||||
gFmpDevicePkgTokenSpaceGuid.PcdFmpDeviceLockEventGuid ## CONSUMES
|
||||
|
Loading…
x
Reference in New Issue
Block a user