summaryrefslogtreecommitdiffstats
path: root/MdeModulePkg/Include/Library
diff options
context:
space:
mode:
authorMichael D Kinney <michael.d.kinney@intel.com>2018-02-11 14:58:05 -0800
committerMichael D Kinney <michael.d.kinney@intel.com>2018-05-28 09:30:10 -0700
commit825d138f83f97910818228cd514d0aece01a3595 (patch)
treefb81649df5b4c8421903230e441799684cca12a2 /MdeModulePkg/Include/Library
parentd92336541782f9d51b6a6fb743e14d5ef754deeb (diff)
downloadedk2-825d138f83f97910818228cd514d0aece01a3595.tar.gz
edk2-825d138f83f97910818228cd514d0aece01a3595.tar.bz2
edk2-825d138f83f97910818228cd514d0aece01a3595.zip
MdeModulePkg: Add DisplayUpdateProgressLib class
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 Add the DisplayUpdateProgressLib class that is used to inform the user of progress during updates of firmware images in firmware devices. A platform specific instance of this library can be used to customize how the user is informed of progress. Add the EDK II Firmware Management Progress Protocol. This is an optional protocol that must be installed onto the same handle as a Firmware Management Protocol. This new protocol provides the color of a progress bar that allows different firmware devices to use different colors during a firmware update. It also provides a watchdog timer value in seconds that is armed each time the Progress() service passed into Firmware Management Protocol SetImage() is called. Cc: Sean Brogan <sean.brogan@microsoft.com> Cc: Star Zeng <star.zeng@intel.com> Cc: Eric Dong <eric.dong@intel.com> Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Reviewed-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
Diffstat (limited to 'MdeModulePkg/Include/Library')
-rw-r--r--MdeModulePkg/Include/Library/DisplayUpdateProgressLib.h65
1 files changed, 65 insertions, 0 deletions
diff --git a/MdeModulePkg/Include/Library/DisplayUpdateProgressLib.h b/MdeModulePkg/Include/Library/DisplayUpdateProgressLib.h
new file mode 100644
index 0000000000..ad1f2cae38
--- /dev/null
+++ b/MdeModulePkg/Include/Library/DisplayUpdateProgressLib.h
@@ -0,0 +1,65 @@
+/** @file
+ Provides services to display completion progress when processing a
+ firmware update that updates the firmware image in a firmware device.
+ A platform may provide its own instance of this library class to custoimize
+ how a user is informed of completion progress.
+
+ Copyright (c) 2016, Microsoft Corporation
+ Copyright (c) 2018, Intel Corporation. All rights reserved.<BR>
+
+ All rights reserved.
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+ OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+**/
+
+#ifndef __DISPLAY_PROGRESS_LIB__
+#define __DISPLAY_PROGRESS_LIB__
+
+#include <Protocol/GraphicsOutput.h>
+
+/**
+ Indicates the current completion progress of a firmware update.
+
+ @param[in] Completion A value between 0 and 100 indicating the current
+ completion progress of a firmware update. This
+ value must the the same or higher than previous
+ calls to this service. The first call of 0 or a
+ value of 0 after reaching a value of 100 resets
+ the progress indicator to 0.
+ @param[in] Color Color of the progress indicator. Only used when
+ Completion is 0 to set the color of the progress
+ indicator. If Color is NULL, then the default color
+ is used.
+
+ @retval EFI_SUCCESS Progress displayed successfully.
+ @retval EFI_INVALID_PARAMETER Completion is not in range 0..100.
+ @retval EFI_INVALID_PARAMETER Completion is less than Completion value from
+ a previous call to this service.
+ @retval EFI_NOT_READY The device used to indicate progress is not
+ available.
+**/
+EFI_STATUS
+EFIAPI
+DisplayUpdateProgress (
+ IN UINTN Completion,
+ IN EFI_GRAPHICS_OUTPUT_BLT_PIXEL_UNION *Color OPTIONAL
+ );
+
+#endif