22#define MTRR_NUMBER_OF_VARIABLE_MTRR 32
27#define RESERVED_FIRMWARE_VARIABLE_MTRR_NUMBER 2
29#define MTRR_NUMBER_OF_FIXED_MTRR 11
71 UINT64 Mtrr[MTRR_NUMBER_OF_FIXED_MTRR];
87 CacheUncacheable = MSR_IA32_MTRR_CACHE_UNCACHEABLE,
88 CacheWriteCombining = MSR_IA32_MTRR_CACHE_WRITE_COMBINING,
89 CacheWriteThrough = MSR_IA32_MTRR_CACHE_WRITE_THROUGH,
90 CacheWriteProtected = MSR_IA32_MTRR_CACHE_WRITE_PROTECTED,
91 CacheWriteBack = MSR_IA32_MTRR_CACHE_WRITE_BACK,
92 CacheInvalid = MSR_IA32_MTRR_CACHE_INVALID_TYPE,
93} MTRR_MEMORY_CACHE_TYPE;
95#define MTRR_CACHE_UNCACHEABLE MSR_IA32_MTRR_CACHE_UNCACHEABLE
96#define MTRR_CACHE_WRITE_COMBINING MSR_IA32_MTRR_CACHE_WRITE_COMBINING
97#define MTRR_CACHE_WRITE_THROUGH MSR_IA32_MTRR_CACHE_WRITE_THROUGH
98#define MTRR_CACHE_WRITE_PROTECTED MSR_IA32_MTRR_CACHE_WRITE_PROTECTED
99#define MTRR_CACHE_WRITE_BACK MSR_IA32_MTRR_CACHE_WRITE_BACK
100#define MTRR_CACHE_INVALID_TYPE MSR_IA32_MTRR_CACHE_INVALID_TYPE
105 MTRR_MEMORY_CACHE_TYPE Type;
168 IN PHYSICAL_ADDRESS BaseAddress,
170 IN MTRR_MEMORY_CACHE_TYPE Attribute
182MTRR_MEMORY_CACHE_TYPE
185 IN PHYSICAL_ADDRESS Address
251 IN UINT64 MtrrValidBitsMask,
252 IN UINT64 MtrrValidAddressMask,
284MTRR_MEMORY_CACHE_TYPE
323 IN PHYSICAL_ADDRESS BaseAddress,
325 IN MTRR_MEMORY_CACHE_TYPE Attribute
UINT32 EFIAPI MtrrGetMemoryAttributeInVariableMtrr(IN UINT64 MtrrValidBitsMask, IN UINT64 MtrrValidAddressMask, OUT VARIABLE_MTRR *VariableMtrr)
MTRR_MEMORY_CACHE_TYPE EFIAPI MtrrGetMemoryAttribute(IN PHYSICAL_ADDRESS Address)
VOID EFIAPI MtrrDebugPrintAllMtrrs(VOID)
MTRR_SETTINGS *EFIAPI MtrrSetAllMtrrs(IN MTRR_SETTINGS *MtrrSetting)
RETURN_STATUS EFIAPI MtrrGetMemoryAttributesInMtrrSettings(IN CONST MTRR_SETTINGS *MtrrSetting OPTIONAL, OUT MTRR_MEMORY_RANGE *Ranges, IN OUT UINTN *RangeCount)
RETURN_STATUS EFIAPI MtrrSetMemoryAttributeInMtrrSettings(IN OUT MTRR_SETTINGS *MtrrSetting, IN PHYSICAL_ADDRESS BaseAddress, IN UINT64 Length, IN MTRR_MEMORY_CACHE_TYPE Attribute)
UINT32 EFIAPI GetVariableMtrrCount(VOID)
UINT32 EFIAPI GetFirmwareVariableMtrrCount(VOID)
BOOLEAN EFIAPI IsMtrrSupported(VOID)
RETURN_STATUS EFIAPI MtrrSetMemoryAttribute(IN PHYSICAL_ADDRESS BaseAddress, IN UINT64 Length, IN MTRR_MEMORY_CACHE_TYPE Attribute)
MTRR_FIXED_SETTINGS *EFIAPI MtrrGetFixedMtrr(OUT MTRR_FIXED_SETTINGS *FixedSettings)
MTRR_MEMORY_CACHE_TYPE EFIAPI MtrrGetDefaultMemoryType(VOID)
RETURN_STATUS EFIAPI MtrrSetMemoryAttributesInMtrrSettings(IN OUT MTRR_SETTINGS *MtrrSetting, IN VOID *Scratch, IN OUT UINTN *ScratchSize, IN CONST MTRR_MEMORY_RANGE *Ranges, IN UINTN RangeCount)
MTRR_SETTINGS *EFIAPI MtrrGetAllMtrrs(OUT MTRR_SETTINGS *MtrrSetting)