summaryrefslogtreecommitdiff
path: root/MdeModulePkg/Universal/CapsuleRuntimeDxe
diff options
context:
space:
mode:
authorStar Zeng <star.zeng@intel.com>2013-12-16 01:34:01 +0000
committerlzeng14 <lzeng14@6f19259b-4bc3-4df7-8a09-765794883524>2013-12-16 01:34:01 +0000
commitf67eb9d8ba27a9303a9081daa2db374a7b77fbf5 (patch)
treeda621cf89ec164f5b3c0cb5841a952641dea34d5 /MdeModulePkg/Universal/CapsuleRuntimeDxe
parent4374c2e535edad27d8c4c6516d2f1bb68403afca (diff)
downloadedk2-f67eb9d8ba27a9303a9081daa2db374a7b77fbf5.zip
edk2-f67eb9d8ba27a9303a9081daa2db374a7b77fbf5.tar.gz
edk2-f67eb9d8ba27a9303a9081daa2db374a7b77fbf5.tar.bz2
MdeModulePkg CapsuleRuntimeDxe: Get PcdMaxSizeNonPopulateCapsule and PcdMaxSizePopulateCapsule by PcdGet32 in EntryPoint.
PcdMaxSizeNonPopulateCapsule and PcdMaxSizePopulateCapsule are declared to support Dynamic, but used by FixedPcdGet32 in CapsuleRuntimeDxe. QueryCapsuleCapabilities is a runtime interface and PCD protocol can’t be used in runtime environment. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed by: Liming Gao <liming.gao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14988 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg/Universal/CapsuleRuntimeDxe')
-rw-r--r--MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleService.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleService.c b/MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleService.c
index 0861a64..61ee919 100644
--- a/MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleService.c
+++ b/MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleService.c
@@ -41,6 +41,9 @@ EFI_HANDLE mNewHandle = NULL;
//
UINTN mTimes = 0;
+UINT32 mMaxSizePopulateCapsule = 0;
+UINT32 mMaxSizeNonPopulateCapsule = 0;
+
/**
Create the variable to save the base address of page table and stack
for transferring into long mode in IA32 PEI.
@@ -339,13 +342,13 @@ QueryCapsuleCapabilities (
return EFI_UNSUPPORTED;
}
*ResetType = EfiResetWarm;
- *MaxiumCapsuleSize = FixedPcdGet32(PcdMaxSizePopulateCapsule);
+ *MaxiumCapsuleSize = (UINT64) mMaxSizePopulateCapsule;
} else {
//
// For non-reset capsule image.
//
*ResetType = EfiResetCold;
- *MaxiumCapsuleSize = FixedPcdGet32(PcdMaxSizeNonPopulateCapsule);
+ *MaxiumCapsuleSize = (UINT64) mMaxSizeNonPopulateCapsule;
}
return EFI_SUCCESS;
@@ -370,7 +373,10 @@ CapsuleServiceInitialize (
)
{
EFI_STATUS Status;
-
+
+ mMaxSizePopulateCapsule = PcdGet32(PcdMaxSizePopulateCapsule);
+ mMaxSizeNonPopulateCapsule = PcdGet32(PcdMaxSizeNonPopulateCapsule);
+
//
// When PEI phase is IA32, DXE phase is X64, it is possible that capsule data are
// put above 4GB, so capsule PEI will transfer to long mode to get capsule data.