Revision: 14988
          http://sourceforge.net/p/edk2/code/14988
Author:   lzeng14
Date:     2013-12-16 01:34:01 +0000 (Mon, 16 Dec 2013)
Log Message:
-----------
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?\226?\128?\153t be used in runtime environment.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <[email protected]>
Reviewed by: Liming Gao <[email protected]>

Modified Paths:
--------------
    trunk/edk2/MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleService.c

Modified: trunk/edk2/MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleService.c
===================================================================
--- trunk/edk2/MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleService.c        
2013-12-15 20:47:39 UTC (rev 14987)
+++ trunk/edk2/MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleService.c        
2013-12-16 01:34:01 UTC (rev 14988)
@@ -41,6 +41,9 @@
 //
 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 @@
       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 @@
   )
 {
   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.

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT 
organizations don't have a clear picture of how application performance 
affects their revenue. With AppDynamics, you get 100% visibility into your 
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
_______________________________________________
edk2-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-commits

Reply via email to