diff options
author | xli24 <xli24@6f19259b-4bc3-4df7-8a09-765794883524> | 2010-07-13 03:08:54 +0000 |
---|---|---|
committer | xli24 <xli24@6f19259b-4bc3-4df7-8a09-765794883524> | 2010-07-13 03:08:54 +0000 |
commit | 430fbbe0968c9ce6748203776a13e96d367c3bce (patch) | |
tree | dc44376b91c52ae81537e523baf39f3a3cccd2f3 /UefiCpuPkg/Library | |
parent | 099f2b1882cb955b59fa8c0ce33ccd9db0318e36 (diff) | |
download | edk2-platforms-430fbbe0968c9ce6748203776a13e96d367c3bce.tar.xz |
Code refinement.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10647 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'UefiCpuPkg/Library')
-rw-r--r-- | UefiCpuPkg/Library/MtrrLib/MtrrLib.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/UefiCpuPkg/Library/MtrrLib/MtrrLib.c b/UefiCpuPkg/Library/MtrrLib/MtrrLib.c index 2bf0ce74bb..1f2604ab8b 100644 --- a/UefiCpuPkg/Library/MtrrLib/MtrrLib.c +++ b/UefiCpuPkg/Library/MtrrLib/MtrrLib.c @@ -23,7 +23,6 @@ //
// This table defines the offset, base and length of the fixed MTRRs
//
-STATIC
FIXED_MTRR MtrrLibFixedMtrrTable[] = {
{
MTRR_LIB_IA32_MTRR_FIX64K_00000,
@@ -552,7 +551,7 @@ Power2MaxMemory ( {
UINT64 Result;
- if (RShiftU64 (MemoryLength, 32)) {
+ if (RShiftU64 (MemoryLength, 32) != 0) {
Result = LShiftU64 (
(UINT64) GetPowerOfTwo32 (
(UINT32) RShiftU64 (MemoryLength, 32)
@@ -624,7 +623,6 @@ GetDirection ( @param VariableMtrr The array to shadow variable MTRRs content
**/
-STATIC
VOID
InvalidateMtrr (
IN VARIABLE_MTRR *VariableMtrr
@@ -638,7 +636,7 @@ InvalidateMtrr ( Index = 0;
VariableMtrrCount = GetVariableMtrrCount ();
while (Index < VariableMtrrCount) {
- if (VariableMtrr[Index].Valid == FALSE && VariableMtrr[Index].Used == TRUE ) {
+ if (!VariableMtrr[Index].Valid && VariableMtrr[Index].Used) {
AsmWriteMsr64 (VariableMtrr[Index].Msr, 0);
AsmWriteMsr64 (VariableMtrr[Index].Msr + 1, 0);
VariableMtrr[Index].Used = FALSE;
@@ -661,7 +659,6 @@ InvalidateMtrr ( @param MtrrValidAddressMask The valid address mask for MTRR
**/
-STATIC
VOID
ProgramVariableMtrr (
IN UINTN MtrrNumber,
@@ -703,7 +700,6 @@ ProgramVariableMtrr ( @return The enum item in MTRR_MEMORY_CACHE_TYPE
**/
-STATIC
MTRR_MEMORY_CACHE_TYPE
GetMemoryCacheTypeFromMtrrType (
IN UINT64 MtrrType
@@ -738,7 +734,6 @@ GetMemoryCacheTypeFromMtrrType ( @param MtrrValidAddressMask The valid address mask for the MTRR
**/
-STATIC
VOID
MtrrLibInitializeMtrrMask (
OUT UINT64 *MtrrValidBitsMask,
@@ -1452,7 +1447,9 @@ MtrrSetAllMtrrs ( This function prints all MTRRs for debugging.
**/
VOID
+EFIAPI
MtrrDebugPrintAllMtrrs (
+ VOID
)
{
DEBUG_CODE (
|