diff options
author | Ray Ni <ray.ni@intel.com> | 2022-09-29 14:33:14 +0800 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2023-10-09 08:22:02 +0000 |
commit | c032db330805993bb29e4ff3d9daad160f3fb35e (patch) | |
tree | 8105039ffa2319aa642512a6abad36b381e7014a /License.txt | |
parent | 1d0fd0bb3d182a699b07129a2560acf14bf669ab (diff) | |
download | edk2-c032db330805993bb29e4ff3d9daad160f3fb35e.tar.gz |
UefiCpuPkg/MtrrLib: Update APIs related to set memory attributes.
Update APIs related to set memory attributes to handle the fixed MTRR
is not always supported.
There are 3 APIs in MtrrLib that can set memory attributes:
1. MtrrSetMemoryAttributesInMtrrSettings
2. MtrrSetMemoryAttributeInMtrrSettings
3. MtrrSetMemoryAttribute
The general idea applied in MtrrSetMemoryAttributesInMtrrSettings is:
1. MtrrLibPreMtrrChange saves the old MTRR default type which
contains bit to enable fixed MTRR.
2. Main logic in MtrrSetMemoryAttributesInMtrrSettings applies
memory attribute settings for below 1MB to variable MTRRs
if fixed MTRR is not supported.
3. MtrrLibPostMtrrChange unconditionally sets E bit in MTRR default
type MSR but only set FE bit when fixed MTRRs are modified.
Signed-off-by: Ray Ni <ray.ni@intel.com>
Cc: Eric Dong <eric.dong@intel.com>
Cc: Rahul Kumar <rahul1.kumar@intel.com>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Ray Ni <ray.ni@intel.com>
Diffstat (limited to 'License.txt')
0 files changed, 0 insertions, 0 deletions