x86: Allow listing MTRRs in SPL
authorSimon Glass <sjg@chromium.org>
Sun, 16 Jul 2023 03:38:36 +0000 (21:38 -0600)
committerBin Meng <bmeng@tinylab.org>
Mon, 17 Jul 2023 09:08:44 +0000 (17:08 +0800)
commit4fb2536e5b17de99cfc44e985a1f617b1dfc0a22
tree454cf97dea9f484ba513be29130cad3c3912f30b
parent3693d348958f2d6339adb20489dd31bc08ddde83
x86: Allow listing MTRRs in SPL

Move MTRR-listing code into a common file so it can be used from SPL.
Update the 'mtrr' command to call it.

Use this in SPL just before adjusting the MTRRs, so we can see the state
set up by the board. Only show it when debug is enabled.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
arch/x86/cpu/mtrr.c
arch/x86/include/asm/mtrr.h
arch/x86/lib/spl.c
cmd/x86/mtrr.c