mirror of
https://github.com/u-boot/u-boot.git
synced 2025-04-21 12:25:27 +00:00
x86: mtrr: Skip MSRs that were already programmed in mtrr_commit()
At present mtrr_commit() programs the MTRR MSRs starting from index 0, which may overwrite MSRs that were already programmed by previous boot stage or FSP. Switch to call mtrr_set_next_var() instead. 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
596bd0589a
commit
3bcd6cf89e
1 changed files with 1 additions and 1 deletions
|
@ -155,7 +155,7 @@ int mtrr_commit(bool do_caches)
|
||||||
debug("open done\n");
|
debug("open done\n");
|
||||||
qsort(req, gd->arch.mtrr_req_count, sizeof(*req), h_comp_mtrr);
|
qsort(req, gd->arch.mtrr_req_count, sizeof(*req), h_comp_mtrr);
|
||||||
for (i = 0; i < gd->arch.mtrr_req_count; i++, req++)
|
for (i = 0; i < gd->arch.mtrr_req_count; i++, req++)
|
||||||
set_var_mtrr(i, req->type, req->start, req->size);
|
mtrr_set_next_var(req->type, req->start, req->size);
|
||||||
|
|
||||||
debug("close\n");
|
debug("close\n");
|
||||||
mtrr_close(&state, do_caches);
|
mtrr_close(&state, do_caches);
|
||||||
|
|
Loading…
Add table
Reference in a new issue