From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 192.55.52.136, mailfrom: shenglei.zhang@intel.com) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by groups.io with SMTP; Wed, 14 Aug 2019 19:23:17 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 14 Aug 2019 19:23:16 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,387,1559545200"; d="scan'208";a="181745657" Received: from shenglei-dev.ccr.corp.intel.com ([10.239.158.52]) by orsmga006.jf.intel.com with ESMTP; 14 Aug 2019 19:23:15 -0700 From: "Zhang, Shenglei" To: devel@edk2.groups.io Cc: Dandan Bi , Liming Gao , Hao A Wu Subject: [PATCH v2 1/1] MdeModulePkg/DxeIplPeim: Initialize pointer PageMapLevel5Entry Date: Thu, 15 Aug 2019 10:23:14 +0800 Message-Id: <20190815022314.8244-1-shenglei.zhang@intel.com> X-Mailer: git-send-email 2.18.0.windows.1 Initialize PageMapLevel5Entry at the beginning of the function. This commit will fix a GCC 4.8.5 build failure introduced by commit b3527dedc3951f061c5a73cb4fb2b0f95f47e08b. OvmfPkg build failure wtih gcc 4.8.5 still exists at latest edk2 version. The commit 46f8a6891606746ca8b1e684ac379ce271306dc0 seems not to fix the build failure completely. Cc: Dandan Bi Cc: Liming Gao Cc: Hao A Wu Signed-off-by: Shenglei Zhang --- v2: Add comments to state why set initialize to NULL. MdeModulePkg/Core/DxeIplPeim/X64/VirtualMemory.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/MdeModulePkg/Core/DxeIplPeim/X64/VirtualMemory.c b/MdeModulePkg/Core/DxeIplPeim/X64/VirtualMemory.c index 2389f3eb485b..2f1038b1e67e 100644 --- a/MdeModulePkg/Core/DxeIplPeim/X64/VirtualMemory.c +++ b/MdeModulePkg/Core/DxeIplPeim/X64/VirtualMemory.c @@ -652,6 +652,11 @@ CreateIdentityMappingPageTables ( UINT64 AddressEncMask; IA32_CR4 Cr4; + // + // set PageMapLevel5Entry to suppress incorrect compiler/analyzer warnigns + // + PageMapLevel5Entry = NULL; + // // Make sure AddressEncMask is contained to smallest supported address field // -- 2.18.0.windows.1