From nobody Sat Nov 2 12:20:34 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 1490756647652154.5460379687138; Tue, 28 Mar 2017 20:04:07 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 4766221940D07; Tue, 28 Mar 2017 20:03:58 -0700 (PDT) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) (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 870CA21DFA7BD for ; Tue, 28 Mar 2017 20:03:55 -0700 (PDT) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga105.jf.intel.com with ESMTP; 28 Mar 2017 20:03:55 -0700 Received: from ray-dev.ccr.corp.intel.com ([10.239.9.25]) by orsmga001.jf.intel.com with ESMTP; 28 Mar 2017 20:03:54 -0700 X-Original-To: edk2-devel@lists.01.org X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.36,239,1486454400"; d="scan'208";a="1113146605" From: Ruiyu Ni To: edk2-devel@lists.01.org Date: Wed, 29 Mar 2017 11:03:42 +0800 Message-Id: <20170329030346.249872-7-ruiyu.ni@intel.com> X-Mailer: git-send-email 2.9.0.windows.1 In-Reply-To: <20170329030346.249872-1-ruiyu.ni@intel.com> References: <20170329030346.249872-1-ruiyu.ni@intel.com> Subject: [edk2] [PATCH 06/10] UefiCpuPkg/MtrrLib: Add MtrrLib prefix to several internal functions 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: Jeff Fan 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" Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni Cc: Jeff Fan --- UefiCpuPkg/Library/MtrrLib/MtrrLib.c | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/UefiCpuPkg/Library/MtrrLib/MtrrLib.c b/UefiCpuPkg/Library/Mtrr= Lib/MtrrLib.c index 4adc41f..d7e6f05 100644 --- a/UefiCpuPkg/Library/MtrrLib/MtrrLib.c +++ b/UefiCpuPkg/Library/MtrrLib/MtrrLib.c @@ -243,7 +243,7 @@ MtrrGetDefaultMemoryType ( =20 **/ VOID -PreMtrrChange ( +MtrrLibPreMtrrChange ( OUT MTRR_CONTEXT *MtrrContext ) { @@ -284,7 +284,7 @@ PreMtrrChange ( =20 **/ VOID -PostMtrrChangeEnableCache ( +MtrrLibPostMtrrChangeEnableCache ( IN MTRR_CONTEXT *MtrrContext ) { @@ -319,7 +319,7 @@ PostMtrrChangeEnableCache ( =20 **/ VOID -PostMtrrChange ( +MtrrLibPostMtrrChange ( IN MTRR_CONTEXT *MtrrContext ) { @@ -328,7 +328,7 @@ PostMtrrChange ( // AsmMsrBitFieldWrite64 (MTRR_LIB_IA32_MTRR_DEF_TYPE, 10, 11, 3); =20 - PostMtrrChangeEnableCache (MtrrContext); + MtrrLibPostMtrrChangeEnableCache (MtrrContext); } =20 /** @@ -1086,7 +1086,7 @@ MtrrLibInitializeMtrrMask ( =20 **/ UINT64 -MtrrPrecedence ( +MtrrLibPrecedence ( IN UINT64 MtrrType1, IN UINT64 MtrrType2 ) @@ -1245,7 +1245,7 @@ MtrrGetMemoryAttributeByAddressWorker ( if (Address >=3D VariableMtrr[Index].BaseAddress && Address < VariableMtrr[Index].BaseAddress+VariableMtrr[Index].Le= ngth) { TempMtrrType =3D VariableMtrr[Index].Type; - MtrrType =3D MtrrPrecedence (MtrrType, TempMtrrType); + MtrrType =3D MtrrLibPrecedence (MtrrType, TempMtrrType); } } } @@ -1791,7 +1791,7 @@ Done: for (Index =3D 0; Index < MTRR_NUMBER_OF_FIXED_MTRR; Index++) { if (FixedSettingsModified[Index]) { if (!MtrrContextValid) { - PreMtrrChange (&MtrrContext); + MtrrLibPreMtrrChange (&MtrrContext); MtrrContextValid =3D TRUE; } AsmWriteMsr64 ( @@ -1809,7 +1809,7 @@ Done: if (WorkingVariableSettings.Mtrr[Index].Base !=3D OriginalVariableSe= ttings.Mtrr[Index].Base || WorkingVariableSettings.Mtrr[Index].Mask !=3D OriginalVariableSe= ttings.Mtrr[Index].Mask ) { if (!MtrrContextValid) { - PreMtrrChange (&MtrrContext); + MtrrLibPreMtrrChange (&MtrrContext); MtrrContextValid =3D TRUE; } AsmWriteMsr64 ( @@ -1824,7 +1824,7 @@ Done: } } if (MtrrContextValid) { - PostMtrrChange (&MtrrContext); + MtrrLibPostMtrrChange (&MtrrContext); } =20 DEBUG((DEBUG_CACHE, " Status =3D %r\n", Status)); @@ -1971,9 +1971,9 @@ MtrrSetVariableMtrr ( return VariableSettings; } =20 - PreMtrrChange (&MtrrContext); + MtrrLibPreMtrrChange (&MtrrContext); MtrrSetVariableMtrrWorker (VariableSettings); - PostMtrrChange (&MtrrContext); + MtrrLibPostMtrrChange (&MtrrContext); MtrrDebugPrintAllMtrrs (); =20 return VariableSettings; @@ -2021,9 +2021,9 @@ MtrrSetFixedMtrr ( return FixedSettings; } =20 - PreMtrrChange (&MtrrContext); + MtrrLibPreMtrrChange (&MtrrContext); MtrrSetFixedMtrrWorker (FixedSettings); - PostMtrrChange (&MtrrContext); + MtrrLibPostMtrrChange (&MtrrContext); MtrrDebugPrintAllMtrrs (); =20 return FixedSettings; @@ -2091,7 +2091,7 @@ MtrrSetAllMtrrs ( return MtrrSetting; } =20 - PreMtrrChange (&MtrrContext); + MtrrLibPreMtrrChange (&MtrrContext); =20 // // Set fixed MTRRs @@ -2108,7 +2108,7 @@ MtrrSetAllMtrrs ( // AsmWriteMsr64 (MTRR_LIB_IA32_MTRR_DEF_TYPE, MtrrSetting->MtrrDefType); =20 - PostMtrrChangeEnableCache (&MtrrContext); + MtrrLibPostMtrrChangeEnableCache (&MtrrContext); =20 return MtrrSetting; } --=20 2.9.0.windows.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel