x86: Add support for more than 8 MTRRs
authorSimon Glass <sjg@chromium.org>
Tue, 22 Sep 2020 20:54:51 +0000 (14:54 -0600)
committerBin Meng <bmeng.cn@gmail.com>
Fri, 25 Sep 2020 03:27:27 +0000 (11:27 +0800)
commit29d2d64ed55f2dfaff6d298b0f589ea0f8edef8d
treeddca703f01f651b8ac155ab17c802fcc9b00f0eb
parent51af144eb7a0bba3f54991059920ceccd83ddc91
x86: Add support for more than 8 MTRRs

At present the mtrr command only support 8 MTRRs. Some SoCs have more than
that. Update the implementation to support up to 10. Read the number of
MTRRs dynamically instead.

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
cmd/x86/mtrr.c