From: Ruiyu Ni <ruiyu.ni@intel.com>
To: edk2-devel@lists.01.org
Cc: Jeff Fan <jeff.fan@intel.com>
Subject: [PATCH 06/10] UefiCpuPkg/MtrrLib: Add MtrrLib prefix to several internal functions
Date: Fri, 2 Sep 2016 21:58:46 +0800 [thread overview]
Message-ID: <20160902135850.251164-7-ruiyu.ni@intel.com> (raw)
In-Reply-To: <20160902135850.251164-1-ruiyu.ni@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Cc: Jeff Fan <jeff.fan@intel.com>
---
UefiCpuPkg/Library/MtrrLib/MtrrLib.c | 30 +++++++++++++++---------------
1 file changed, 15 insertions(+), 15 deletions(-)
diff --git a/UefiCpuPkg/Library/MtrrLib/MtrrLib.c b/UefiCpuPkg/Library/MtrrLib/MtrrLib.c
index 4adc41f..d7e6f05 100644
--- a/UefiCpuPkg/Library/MtrrLib/MtrrLib.c
+++ b/UefiCpuPkg/Library/MtrrLib/MtrrLib.c
@@ -243,7 +243,7 @@ MtrrGetDefaultMemoryType (
**/
VOID
-PreMtrrChange (
+MtrrLibPreMtrrChange (
OUT MTRR_CONTEXT *MtrrContext
)
{
@@ -284,7 +284,7 @@ PreMtrrChange (
**/
VOID
-PostMtrrChangeEnableCache (
+MtrrLibPostMtrrChangeEnableCache (
IN MTRR_CONTEXT *MtrrContext
)
{
@@ -319,7 +319,7 @@ PostMtrrChangeEnableCache (
**/
VOID
-PostMtrrChange (
+MtrrLibPostMtrrChange (
IN MTRR_CONTEXT *MtrrContext
)
{
@@ -328,7 +328,7 @@ PostMtrrChange (
//
AsmMsrBitFieldWrite64 (MTRR_LIB_IA32_MTRR_DEF_TYPE, 10, 11, 3);
- PostMtrrChangeEnableCache (MtrrContext);
+ MtrrLibPostMtrrChangeEnableCache (MtrrContext);
}
/**
@@ -1086,7 +1086,7 @@ MtrrLibInitializeMtrrMask (
**/
UINT64
-MtrrPrecedence (
+MtrrLibPrecedence (
IN UINT64 MtrrType1,
IN UINT64 MtrrType2
)
@@ -1245,7 +1245,7 @@ MtrrGetMemoryAttributeByAddressWorker (
if (Address >= VariableMtrr[Index].BaseAddress &&
Address < VariableMtrr[Index].BaseAddress+VariableMtrr[Index].Length) {
TempMtrrType = VariableMtrr[Index].Type;
- MtrrType = MtrrPrecedence (MtrrType, TempMtrrType);
+ MtrrType = MtrrLibPrecedence (MtrrType, TempMtrrType);
}
}
}
@@ -1791,7 +1791,7 @@ Done:
for (Index = 0; Index < MTRR_NUMBER_OF_FIXED_MTRR; Index++) {
if (FixedSettingsModified[Index]) {
if (!MtrrContextValid) {
- PreMtrrChange (&MtrrContext);
+ MtrrLibPreMtrrChange (&MtrrContext);
MtrrContextValid = TRUE;
}
AsmWriteMsr64 (
@@ -1809,7 +1809,7 @@ Done:
if (WorkingVariableSettings.Mtrr[Index].Base != OriginalVariableSettings.Mtrr[Index].Base ||
WorkingVariableSettings.Mtrr[Index].Mask != OriginalVariableSettings.Mtrr[Index].Mask ) {
if (!MtrrContextValid) {
- PreMtrrChange (&MtrrContext);
+ MtrrLibPreMtrrChange (&MtrrContext);
MtrrContextValid = TRUE;
}
AsmWriteMsr64 (
@@ -1824,7 +1824,7 @@ Done:
}
}
if (MtrrContextValid) {
- PostMtrrChange (&MtrrContext);
+ MtrrLibPostMtrrChange (&MtrrContext);
}
DEBUG((DEBUG_CACHE, " Status = %r\n", Status));
@@ -1971,9 +1971,9 @@ MtrrSetVariableMtrr (
return VariableSettings;
}
- PreMtrrChange (&MtrrContext);
+ MtrrLibPreMtrrChange (&MtrrContext);
MtrrSetVariableMtrrWorker (VariableSettings);
- PostMtrrChange (&MtrrContext);
+ MtrrLibPostMtrrChange (&MtrrContext);
MtrrDebugPrintAllMtrrs ();
return VariableSettings;
@@ -2021,9 +2021,9 @@ MtrrSetFixedMtrr (
return FixedSettings;
}
- PreMtrrChange (&MtrrContext);
+ MtrrLibPreMtrrChange (&MtrrContext);
MtrrSetFixedMtrrWorker (FixedSettings);
- PostMtrrChange (&MtrrContext);
+ MtrrLibPostMtrrChange (&MtrrContext);
MtrrDebugPrintAllMtrrs ();
return FixedSettings;
@@ -2091,7 +2091,7 @@ MtrrSetAllMtrrs (
return MtrrSetting;
}
- PreMtrrChange (&MtrrContext);
+ MtrrLibPreMtrrChange (&MtrrContext);
//
// Set fixed MTRRs
@@ -2108,7 +2108,7 @@ MtrrSetAllMtrrs (
//
AsmWriteMsr64 (MTRR_LIB_IA32_MTRR_DEF_TYPE, MtrrSetting->MtrrDefType);
- PostMtrrChangeEnableCache (&MtrrContext);
+ MtrrLibPostMtrrChangeEnableCache (&MtrrContext);
return MtrrSetting;
}
--
2.9.0.windows.1
next prev parent reply other threads:[~2016-09-02 13:58 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-02 13:58 [PATCH 00/10] Enhance MtrrLib to find out the optimal MTRR solution Ruiyu Ni
2016-09-02 13:58 ` [PATCH 01/10] UefiCpuPkg/MtrrLib: Correct typo in comments and remove TABs Ruiyu Ni
2016-09-02 13:58 ` [PATCH 02/10] UefiCpuPkg/MtrrLib: Add CacheInvalid enum type to MtrrLib.h Ruiyu Ni
2016-09-02 13:58 ` [PATCH 03/10] UefiCpuPkg/MtrrLib: IsMtrrSupported uses definitions in Msr.h Ruiyu Ni
2016-09-02 13:58 ` [PATCH 04/10] UefiCpuPkg/MtrrLib: GetVariableMtrrCountWorker " Ruiyu Ni
2016-09-02 13:58 ` [PATCH 05/10] UefiCpuPkg/MtrrLib: Add MtrrLib prefix to ProgramFixedMtrr Ruiyu Ni
2016-09-02 13:58 ` Ruiyu Ni [this message]
2016-09-02 13:58 ` [PATCH 07/10] UefiCpuPkg/MtrrLib: MtrrLibInitializeMtrrMask() uses definitions in CpuId.h Ruiyu Ni
2016-09-02 13:58 ` [PATCH 08/10] UefiCpuPkg/MtrrLib: Use a better algorithm to calculate MTRR Ruiyu Ni
2016-09-02 13:58 ` [PATCH 09/10] UefiCpuPkg/MtrrLib: Refine MtrrGetMemoryAttributeByAddressWorker Ruiyu Ni
2016-09-02 13:58 ` [PATCH 10/10] UefiCpuPkg/MtrrLib: All functions use definitions in Msr.h Ruiyu Ni
-- strict thread matches above, loose matches on Subject: below --
2017-03-29 3:03 [PATCH 00/10] Use a better algorithm to calculate MTRR Ruiyu Ni
2017-03-29 3:03 ` [PATCH 06/10] UefiCpuPkg/MtrrLib: Add MtrrLib prefix to several internal functions Ruiyu Ni
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160902135850.251164-7-ruiyu.ni@intel.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox