Fix 64-bit bug in DxeIpl. You can't cast an & UINT64 to a UINT32 *, as the upper 32-bits do not get updated. In my case there was data on the stack for the upper 32-bits and it caused the size to be greater than 4GB. 


git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10659 6f19259b-4bc3-4df7-8a09-765794883524
diff --git a/MdeModulePkg/Core/DxeIplPeim/DxeLoad.c b/MdeModulePkg/Core/DxeIplPeim/DxeLoad.c
index 69bae04..87fc18c 100644
--- a/MdeModulePkg/Core/DxeIplPeim/DxeLoad.c
+++ b/MdeModulePkg/Core/DxeIplPeim/DxeLoad.c
@@ -510,10 +510,10 @@
   EFI_STATUS                      Status;

   UINT8                           *DstBuffer;

   UINT8                           *ScratchBuffer;

-  UINTN                           DstBufferSize;

+  UINT32                          DstBufferSize;

   UINT32                          ScratchBufferSize;

   EFI_COMMON_SECTION_HEADER       *Section;

-  UINTN                           SectionLength;

+  UINT32                          SectionLength;

 

   if (CompressionSection->CommonHeader.Type != EFI_SECTION_COMPRESSION) {

     ASSERT (FALSE);

@@ -535,8 +535,8 @@
       //

       Status = UefiDecompressGetInfo (

                  (UINT8 *) ((EFI_COMPRESSION_SECTION *) Section + 1),

-                 (UINT32) SectionLength - sizeof (EFI_COMPRESSION_SECTION),

-                 (UINT32 *) &DstBufferSize,

+                 SectionLength - sizeof (EFI_COMPRESSION_SECTION),

+                 &DstBufferSize,

                  &ScratchBufferSize

                  );

       if (EFI_ERROR (Status)) {