X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=FmpDevicePkg%2FFmpDxe%2FFmpDxe.c;h=3544afd3dee744131f2bd3f1b129ff36ba64b4b3;hp=94fdf5608529c63254249c446584f29a88b004d5;hb=f1a921cab2b8d5ca587059795ff57d9fc92b8995;hpb=ebfac291bd0e57f1ef452fb2f3a402738165bf3b;ds=sidebyside diff --git a/FmpDevicePkg/FmpDxe/FmpDxe.c b/FmpDevicePkg/FmpDxe/FmpDxe.c index 94fdf56085..3544afd3de 100644 --- a/FmpDevicePkg/FmpDxe/FmpDxe.c +++ b/FmpDevicePkg/FmpDxe/FmpDxe.c @@ -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: