/**\r
Programs fixed MTRRs registers.\r
\r
- @param[in] MemoryCacheType The memory type to set.\r
+ @param[in] Type The memory type to set.\r
@param[in, out] Base The base address of memory range.\r
@param[in, out] Length The length of memory range.\r
@param[in, out] LastMsrNum On input, the last index of the fixed MTRR MSR to program.\r
\r
**/\r
RETURN_STATUS\r
-ProgramFixedMtrr (\r
- IN UINT64 MemoryCacheType,\r
- IN OUT UINT64 *Base,\r
- IN OUT UINT64 *Length,\r
- IN OUT UINT32 *LastMsrNum,\r
- OUT UINT64 *ReturnClearMask,\r
- OUT UINT64 *ReturnOrMask\r
+MtrrLibProgramFixedMtrr (\r
+ IN MTRR_MEMORY_CACHE_TYPE Type,\r
+ IN OUT UINT64 *Base,\r
+ IN OUT UINT64 *Length,\r
+ IN OUT UINT32 *LastMsrNum,\r
+ OUT UINT64 *ReturnClearMask,\r
+ OUT UINT64 *ReturnOrMask\r
)\r
{\r
UINT32 MsrNum;\r
}\r
}\r
\r
- if (MsrNum >= MTRR_NUMBER_OF_FIXED_MTRR) {\r
+ if (MsrNum == MTRR_NUMBER_OF_FIXED_MTRR) {\r
return RETURN_UNSUPPORTED;\r
}\r
\r
}\r
\r
ClearMask = CLEAR_SEED;\r
- OrMask = MultU64x32 (OR_SEED, (UINT32)MemoryCacheType);\r
+ OrMask = MultU64x32 (OR_SEED, (UINT32) Type);\r
\r
if (LeftByteShift != 0) {\r
//\r
if (BaseAddress < BASE_1MB) {\r
MsrNum = (UINT32)-1;\r
while ((BaseAddress < BASE_1MB) && (Length > 0) && Status == RETURN_SUCCESS) {\r
- Status = ProgramFixedMtrr (MemoryType, &BaseAddress, &Length, &MsrNum, &ClearMask, &OrMask);\r
+ Status = MtrrLibProgramFixedMtrr (Attribute, &BaseAddress, &Length, &MsrNum, &ClearMask, &OrMask);\r
if (RETURN_ERROR (Status)) {\r
goto Done;\r
}\r