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
//\r
UINTN mTimes = 0;\r
\r
//\r
UINTN mTimes = 0;\r
\r
+UINT32 mMaxSizePopulateCapsule = 0;\r
+UINT32 mMaxSizeNonPopulateCapsule = 0;\r
+\r
/**\r
Create the variable to save the base address of page table and stack\r
for transferring into long mode in IA32 PEI.\r
/**\r
Create the variable to save the base address of page table and stack\r
for transferring into long mode in IA32 PEI.\r
return EFI_UNSUPPORTED;\r
}\r
*ResetType = EfiResetWarm;\r
return EFI_UNSUPPORTED;\r
}\r
*ResetType = EfiResetWarm;\r
- *MaxiumCapsuleSize = FixedPcdGet32(PcdMaxSizePopulateCapsule);\r
+ *MaxiumCapsuleSize = (UINT64) mMaxSizePopulateCapsule;\r
} else {\r
//\r
// For non-reset capsule image.\r
//\r
*ResetType = EfiResetCold;\r
} else {\r
//\r
// For non-reset capsule image.\r
//\r
*ResetType = EfiResetCold;\r
- *MaxiumCapsuleSize = FixedPcdGet32(PcdMaxSizeNonPopulateCapsule);\r
+ *MaxiumCapsuleSize = (UINT64) mMaxSizeNonPopulateCapsule;\r
}\r
\r
return EFI_SUCCESS;\r
}\r
\r
return EFI_SUCCESS;\r
)\r
{\r
EFI_STATUS Status;\r
)\r
{\r
EFI_STATUS Status;\r
+\r
+ mMaxSizePopulateCapsule = PcdGet32(PcdMaxSizePopulateCapsule);\r
+ mMaxSizeNonPopulateCapsule = PcdGet32(PcdMaxSizeNonPopulateCapsule);\r
+\r
//\r
// When PEI phase is IA32, DXE phase is X64, it is possible that capsule data are \r
// put above 4GB, so capsule PEI will transfer to long mode to get capsule data.\r
//\r
// When PEI phase is IA32, DXE phase is X64, it is possible that capsule data are \r
// put above 4GB, so capsule PEI will transfer to long mode to get capsule data.\r