Revision: 18190
          http://sourceforge.net/p/edk2/code/18190
Author:   lzeng14
Date:     2015-08-07 23:53:53 +0000 (Fri, 07 Aug 2015)
Log Message:
-----------
MdeModulePkg DxeIpl: Fix IA32 build failure with GCC 5.1.1

Got the build failure feedback below, this patch is to fix that.

This broke the IA32 Ovmf build for me, with GCC 5.1.1 (Fedora 22):

/home/dwmw2/git/edk2/MdeModulePkg/Core/DxeIplPeim/Ia32/DxeLoadFunc.c:377:7:
error: ?\226?\128?\152PageTables?\226?\128?\153 may be used uninitialized in 
this function [-Werror=maybe-uninitialized]
       AsmWriteCr3 (PageTables);
       ^
/home/dwmw2/git/edk2/MdeModulePkg/Core/DxeIplPeim/Ia32/DxeLoadFunc.c:224:9:
note: ?\226?\128?\152PageTables?\226?\128?\153 was declared here
   UINTN                     PageTables;
         ^
cc1: all warnings being treated as errors

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.z...@intel.com>
Reviewed-by: Qiu Shumin <shumin....@intel.com>

Modified Paths:
--------------
    trunk/edk2/MdeModulePkg/Core/DxeIplPeim/Ia32/DxeLoadFunc.c

Modified: trunk/edk2/MdeModulePkg/Core/DxeIplPeim/Ia32/DxeLoadFunc.c
===================================================================
--- trunk/edk2/MdeModulePkg/Core/DxeIplPeim/Ia32/DxeLoadFunc.c  2015-08-07 
17:27:33 UTC (rev 18189)
+++ trunk/edk2/MdeModulePkg/Core/DxeIplPeim/Ia32/DxeLoadFunc.c  2015-08-07 
23:53:53 UTC (rev 18190)
@@ -361,6 +361,7 @@
     TopOfStack = BaseOfStack + EFI_SIZE_TO_PAGES (STACK_SIZE) * EFI_PAGE_SIZE 
- CPU_STACK_ALIGNMENT;
     TopOfStack = (EFI_PHYSICAL_ADDRESS) (UINTN) ALIGN_POINTER (TopOfStack, 
CPU_STACK_ALIGNMENT);
 
+    PageTables = 0;
     BuildPageTablesIa32Pae = (BOOLEAN) (PcdGetBool (PcdSetNxForStack) && 
IsIa32PaeSupport () && IsExecuteDisableBitAvailable ());
     if (BuildPageTablesIa32Pae) {
       PageTables = Create4GPageTablesIa32Pae (BaseOfStack, STACK_SIZE);


------------------------------------------------------------------------------
_______________________________________________
edk2-commits mailing list
edk2-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-commits

Reply via email to