]> git.proxmox.com Git - mirror_edk2.git/commit
MdeModulePkg/CapsulePei: Optimize the CapsulePei
authorBret Barkelew <Bret.Barkelew@microsoft.com>
Tue, 4 Jun 2019 02:24:02 +0000 (10:24 +0800)
committerHao A Wu <hao.a.wu@intel.com>
Mon, 24 Jun 2019 01:18:31 +0000 (09:18 +0800)
commit27052c21c411394032b3ab1749cf410ea9934157
tree5bd870a291a9b74f73818d173dfab64a69e06c50
parentba3aa1c4e727feef36cdaa28ea1c49f7a9f3d081
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>
MdeModulePkg/Universal/CapsulePei/Capsule.h
MdeModulePkg/Universal/CapsulePei/CapsulePei.inf
MdeModulePkg/Universal/CapsulePei/UefiCapsule.c