[edk2-devel] [Patch] MdeModulePkg/Capsule: Remove RT restriction in UpdateCapsule service.
Liming Gao
liming.gao at intel.com
Fri Feb 7 03:06:49 UTC 2020
Siyuan:
I suggest to introduce new FeaturePcd to control this behavior. And, PCD default value is FALSE to keep current behavior without change.
Thanks
Liming
> -----Original Message-----
> From: Fu, Siyuan <siyuan.fu at intel.com>
> Sent: Tuesday, February 4, 2020 10:37 AM
> To: devel at edk2.groups.io
> Cc: Wu, Hao A <hao.a.wu at intel.com>; Gao, Liming <liming.gao at intel.com>
> Subject: [Patch] MdeModulePkg/Capsule: Remove RT restriction in UpdateCapsule service.
>
> Current UpdateCapsule service will reject all non-reset capsule images and
> return EFI_OUT_OF_RESOURCE if the system is at runtime. This will block a
> platform CapsuleLib from implementing ProcessCapsuleImage() with runtime
> capsule processing capability. This patch removes this restriction.
>
> BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2501
>
> Cc: Hao A Wu <hao.a.wu at intel.com>
> Cc: Liming Gao <liming.gao at intel.com>
> Signed-off-by: Siyuan Fu <siyuan.fu at intel.com>
> ---
> MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleService.c | 8 ++------
> 1 file changed, 2 insertions(+), 6 deletions(-)
>
> diff --git a/MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleService.c
> b/MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleService.c
> index 77b8f00062..99a52f053d 100644
> --- a/MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleService.c
> +++ b/MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleService.c
> @@ -4,7 +4,7 @@
> It installs the Capsule Architectural Protocol defined in PI1.0a to signify
> the capsule runtime services are ready.
>
> -Copyright (c) 2006 - 2019, Intel Corporation. All rights reserved.<BR>
> +Copyright (c) 2006 - 2020, Intel Corporation. All rights reserved.<BR>
> SPDX-License-Identifier: BSD-2-Clause-Patent
>
> **/
> @@ -138,11 +138,7 @@ UpdateCapsule (
> // Platform specific update for the non-reset capsule image.
> //
> if ((CapsuleHeader->Flags & CAPSULE_FLAGS_PERSIST_ACROSS_RESET) == 0) {
> - if (EfiAtRuntime ()) {
> - Status = EFI_OUT_OF_RESOURCES;
> - } else {
> - Status = ProcessCapsuleImage(CapsuleHeader);
> - }
> + Status = ProcessCapsuleImage(CapsuleHeader);
> if (EFI_ERROR(Status)) {
> return Status;
> }
> --
> 2.19.1.windows.1
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#53987): https://edk2.groups.io/g/devel/message/53987
Mute This Topic: https://groups.io/mt/70964254/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-
More information about the edk2-devel-archive
mailing list