From 09e4a8fd95de49929b726d0b4966c9ead3491789 Mon Sep 17 00:00:00 2001 From: Star Zeng Date: Fri, 7 Aug 2015 23:53:53 +0000 Subject: [PATCH] MdeModulePkg DxeIpl: Fix IA32 build failure with GCC 5.1.1 MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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: ‘PageTables’ 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: ‘PageTables’ was declared here UINTN PageTables; ^ cc1: all warnings being treated as errors Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Star Zeng Reviewed-by: Qiu Shumin git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18190 6f19259b-4bc3-4df7-8a09-765794883524 --- MdeModulePkg/Core/DxeIplPeim/Ia32/DxeLoadFunc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/MdeModulePkg/Core/DxeIplPeim/Ia32/DxeLoadFunc.c b/MdeModulePkg/Core/DxeIplPeim/Ia32/DxeLoadFunc.c index c1ff4b7e64..8ce72cb316 100644 --- a/MdeModulePkg/Core/DxeIplPeim/Ia32/DxeLoadFunc.c +++ b/MdeModulePkg/Core/DxeIplPeim/Ia32/DxeLoadFunc.c @@ -361,6 +361,7 @@ HandOffToDxeCore ( 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); -- 2.39.2