mirror of
https://github.com/AsahiLinux/u-boot
synced 2025-03-13 21:36:57 +00:00
x86: mtrr: Do not clear the unused ones in mtrr_commit()
Current mtrr_commit() logic assumes that MTRR MSRs are programmed consecutively from index 0 to its maximum number, and whenever it detects an unused one, it clears all other MTRRs starting from that one. However this may not always be the case. In fact, the clear is not much helpful because these MTRRs come out of reset as disabled already. Drop the clear codes. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org> Tested on chromebook_coral, chromebook_samus, chromebook_link, minnowmax Tested-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
c79cbb5952
commit
596bd0589a
1 changed files with 0 additions and 4 deletions
|
@ -157,10 +157,6 @@ int mtrr_commit(bool do_caches)
|
|||
for (i = 0; i < gd->arch.mtrr_req_count; i++, req++)
|
||||
set_var_mtrr(i, req->type, req->start, req->size);
|
||||
|
||||
/* Clear the ones that are unused */
|
||||
debug("clear\n");
|
||||
for (; i < mtrr_get_var_count(); i++)
|
||||
wrmsrl(MTRR_PHYS_MASK_MSR(i), 0);
|
||||
debug("close\n");
|
||||
mtrr_close(&state, do_caches);
|
||||
debug("mtrr done\n");
|
||||
|
|
Loading…
Add table
Reference in a new issue