From nobody Sun Apr 28 11:33:21 2024 Delivered-To: importer@patchew.org Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) client-ip=198.145.21.10; envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org; Authentication-Results: mx.zoho.com; spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) smtp.mailfrom=edk2-devel-bounces@lists.01.org; Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 149302426749645.5950660391934; Mon, 24 Apr 2017 01:57:47 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id A7DDC21954090; Mon, 24 Apr 2017 01:57:45 -0700 (PDT) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id C15EF2195407C for ; Mon, 24 Apr 2017 01:57:44 -0700 (PDT) Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 24 Apr 2017 01:57:44 -0700 Received: from shwde7172.ccr.corp.intel.com ([10.239.9.14]) by orsmga005.jf.intel.com with ESMTP; 24 Apr 2017 01:57:42 -0700 X-Original-To: edk2-devel@lists.01.org X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.37,243,1488873600"; d="scan'208";a="91417640" From: Liming Gao To: edk2-devel@lists.01.org Date: Mon, 24 Apr 2017 16:57:35 +0800 Message-Id: <1493024255-16560-1-git-send-email-liming.gao@intel.com> X-Mailer: git-send-email 2.8.0.windows.1 Subject: [edk2] [Patch] MdeModulePkg PiSmmIpl: Fix the issue in LMFA feature X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Star Zeng MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail: RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" SmramBase should be got from mLMFAConfigurationTable. Cc: Star Zeng Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Liming Gao Reviewed-by: Star Zeng --- MdeModulePkg/Core/PiSmmCore/PiSmmIpl.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/MdeModulePkg/Core/PiSmmCore/PiSmmIpl.c b/MdeModulePkg/Core/PiS= mmCore/PiSmmIpl.c index feb846e..2601275 100644 --- a/MdeModulePkg/Core/PiSmmCore/PiSmmIpl.c +++ b/MdeModulePkg/Core/PiSmmCore/PiSmmIpl.c @@ -263,6 +263,7 @@ EFI_PHYSICAL_ADDRESS mSmramCacheBase; UINT64 mSmramCacheSize; =20 EFI_SMM_COMMUNICATE_HEADER mCommunicateHeader; +EFI_LOAD_FIXED_ADDRESS_CONFIGURATION_TABLE *mLMFAConfigurationTable =3D= NULL; =20 // // Table of Protocol notification and GUIDed Event notifications that the = SMM IPL requires @@ -841,7 +842,7 @@ GetPeCoffImageFixLoadingAssignedAddress( =20 FixLoadingAddress =3D 0; Status =3D EFI_NOT_FOUND; - SmramBase =3D mCurrentSmramRange->CpuStart; + SmramBase =3D mLMFAConfigurationTable->SmramBase; // // Get PeHeader pointer // @@ -1519,7 +1520,6 @@ SmmIplEntry ( UINT64 MaxSize; VOID *Registration; UINT64 SmmCodeSize; - EFI_LOAD_FIXED_ADDRESS_CONFIGURATION_TABLE *LMFAConfigurationTable; EFI_CPU_ARCH_PROTOCOL *CpuArch; EFI_STATUS SetAttrStatus; EFI_SMRAM_DESCRIPTOR *SmramRangeSmmDriver; @@ -1623,14 +1623,14 @@ SmmIplEntry ( // Status =3D EfiGetSystemConfigurationTable ( &gLoadFixedAddressConfigurationTableGuid, - (VOID **) &LMFAConfigurationTable + (VOID **) &mLMFAConfigurationTable ); - if (!EFI_ERROR (Status) && LMFAConfigurationTable !=3D NULL) { - LMFAConfigurationTable->SmramBase =3D mCurrentSmramRange->CpuStart; + if (!EFI_ERROR (Status) && mLMFAConfigurationTable !=3D NULL) { + mLMFAConfigurationTable->SmramBase =3D mCurrentSmramRange->CpuStar= t; // // Print the SMRAM base // - DEBUG ((EFI_D_INFO, "LOADING MODULE FIXED INFO: TSEG BASE is %x. \= n", LMFAConfigurationTable->SmramBase)); + DEBUG ((EFI_D_INFO, "LOADING MODULE FIXED INFO: TSEG BASE is %x. \= n", mLMFAConfigurationTable->SmramBase)); } =20 // --=20 2.8.0.windows.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel