[PATCH 2/7] x86: mtrr: Do not clear the unused ones in mtrr_commit()

Bin Meng bmeng.cn at gmail.com
Mon Aug 2 04:50:13 CEST 2021


On Mon, Aug 2, 2021 at 3:19 AM Simon Glass <sjg at chromium.org> wrote:
>
> On Sat, 31 Jul 2021 at 02:45, Bin Meng <bmeng.cn at gmail.com> wrote:
> >
> > 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 at gmail.com>
> > ---
> >
> >  arch/x86/cpu/mtrr.c | 4 ----
> >  1 file changed, 4 deletions(-)
>
> Reviewed-by: Simon Glass <sjg at chromium.org>
> Tested on chromebook_coral, chromebook_samus, chromebook_link, minnowmax
> Tested-by: Simon Glass <sjg at chromium.org>

applied to u-boot-x86, thanks!


More information about the U-Boot mailing list