MdeModulePkg/DxeCapsuleLibFmp: Add progress bar support

https://bugzilla.tianocore.org/show_bug.cgi?id=801

Based on content from the following branch/commits:
https://github.com/Microsoft/MS_UEFI/tree/share/MsCapsuleSupport

* Change Update_Image_Progress() to UpdateImageProcess()
* Call DisplayUpdateProgressLib from UpdateImageProgress().
* Split out a boot service and runtime version of
  UpdateImageProgress() so the DisplayUpdateProgressLib is
  not used at runtime.
* If gEdkiiFirmwareManagementProgressProtocolGuid is present,
  then use its progress bar color and watchdog timer value.
* If gEdkiiFirmwareManagementProgressProtocolGuid is not present,
  then use default progress bar color and 5 min watchdog timer.
* Remove Print() calls during capsule processing.  Instead,
  the DisplayUpdateProgressLib is used to inform the user
  of progress during a capsule update.

Cc: Star Zeng <star.zeng@intel.com>
Cc: Eric Dong <eric.dong@intel.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Sean Brogan <sean.brogan@microsoft.com>
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Tested-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Star Zeng <star.zeng@intel.com>
This commit is contained in:
Kinney, Michael D
2018-02-15 14:02:06 -08:00
parent f3100a1a2f
commit 5747610657
5 changed files with 131 additions and 36 deletions

View File

@@ -3,7 +3,7 @@
Dummy function for runtime module, because CapsuleDxeRuntime
does not need call ProcessCapsules().
Copyright (c) 2016, Intel Corporation. All rights reserved.<BR>
Copyright (c) 2016 - 2018, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -17,6 +17,25 @@
#include <PiDxe.h>
#include <Library/CapsuleLib.h>
/**
Function indicate the current completion progress of the firmware
update. Platform may override with own specific progress function.
@param[in] Completion A value between 1 and 100 indicating the current
completion progress of the firmware update
@retval EFI_SUCESS The capsule update progress was updated.
@retval EFI_INVALID_PARAMETER Completion is greater than 100%.
**/
EFI_STATUS
EFIAPI
UpdateImageProgress (
IN UINTN Completion
)
{
return EFI_SUCCESS;
}
/**
This routine is called to process capsules.