summaryrefslogtreecommitdiff
path: root/MdeModulePkg/Universal/CapsulePei/Capsule.h
diff options
context:
space:
mode:
authorBret Barkelew <Bret.Barkelew@microsoft.com>2019-06-04 10:24:02 +0800
committerHao A Wu <hao.a.wu@intel.com>2019-06-24 09:18:31 +0800
commit27052c21c411394032b3ab1749cf410ea9934157 (patch)
tree5bd870a291a9b74f73818d173dfab64a69e06c50 /MdeModulePkg/Universal/CapsulePei/Capsule.h
parentba3aa1c4e727feef36cdaa28ea1c49f7a9f3d081 (diff)
downloadedk2-27052c21c411394032b3ab1749cf410ea9934157.zip
edk2-27052c21c411394032b3ab1749cf410ea9934157.tar.gz
edk2-27052c21c411394032b3ab1749cf410ea9934157.tar.bz2
MdeModulePkg/CapsulePei: Optimize the CapsulePei
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1853 Code change form Mu project: https://github.com/microsoft/mu_basecore/blob/release/201903/ MdeModulePkg/Universal/CapsulePei/UefiCapsule.c#L801 Separate the capsule check function from GetCapsuleDescriptors to AreCapsulesStaged. The original one is unclear. Avoid querying the capsule variable twice. Use a fixed array to cache the SG list during count the number of SG list. Then allocate memory buffer to save the SG list from array. Using MemoryAllocationLib instead of memory function in Pei services. Cc: Jian J Wang <jian.j.wang@intel.com> Cc: Hao A Wu <hao.a.wu@intel.com> Cc: Ray Ni <ray.ni@intel.com> Cc: Star Zeng <star.zeng@intel.com> Cc: Liming Gao <liming.gao@intel.com> Cc: Sean Brogan <sean.brogan@microsoft.com> Cc: Michael Turner <Michael.Turner@microsoft.com> Cc: Bret Barkelew <Bret.Barkelew@microsoft.com> Cc: Leif Lindholm <leif.lindholm@linaro.org> Signed-off-by: Zhichao gao <zhichao.gao@intel.com> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org> Reviewed-by: Hao A Wu <hao.a.wu@intel.com>
Diffstat (limited to 'MdeModulePkg/Universal/CapsulePei/Capsule.h')
-rw-r--r--MdeModulePkg/Universal/CapsulePei/Capsule.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/MdeModulePkg/Universal/CapsulePei/Capsule.h b/MdeModulePkg/Universal/CapsulePei/Capsule.h
index baf4042..3d9cab0 100644
--- a/MdeModulePkg/Universal/CapsulePei/Capsule.h
+++ b/MdeModulePkg/Universal/CapsulePei/Capsule.h
@@ -30,6 +30,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
#include <Library/PcdLib.h>
#include <Library/ReportStatusCodeLib.h>
#include <Library/DebugAgentLib.h>
+#include <Library/MemoryAllocationLib.h>
#include <IndustryStandard/PeImage.h>
#include "Common/CommonHeader.h"