[PATCH 02/38] x86: Allow listing MTRRs in SPL
Simon Glass
sjg at chromium.org
Thu Apr 20 18:30:06 CEST 2023
Hi Heinrich,
On Thu, 30 Mar 2023 at 16:10, Heinrich Schuchardt <xypron.glpk at gmx.de> wrote:
>
>
>
> Am 30. März 2023 23:31:51 MESZ schrieb Simon Glass <sjg at chromium.org>:
> >When using video in SPL it is useful to see the values of the MTRR
> >registers. Move this code into a shared file, so it can be called from
> >SPL easily.
> >
> >Signed-off-by: Simon Glass <sjg at chromium.org>
> >---
> >
> > arch/x86/cpu/mtrr.c | 61 +++++++++++++++++++++++++++++++++++++
> > arch/x86/include/asm/mtrr.h | 20 ++++++++++++
> > cmd/x86/mtrr.c | 60 +++---------------------------------
> > 3 files changed, 85 insertions(+), 56 deletions(-)
> >
> >diff --git a/arch/x86/cpu/mtrr.c b/arch/x86/cpu/mtrr.c
> >index e69dfb552b16..1b5f24aab317 100644
> >--- a/arch/x86/cpu/mtrr.c
> >+++ b/arch/x86/cpu/mtrr.c
> >@@ -30,6 +30,16 @@
> >
> > DECLARE_GLOBAL_DATA_PTR;
> >
[..]
> >-static const char *const mtrr_type_name[MTRR_TYPE_COUNT] = {
> >- "Uncacheable",
> >- "Combine",
> >- "2",
> >- "3",
> >- "Through",
> >- "Protect",
> >- "Back",
> >-};
>
>
> Adding a "write-" prefix would make the meaning clearer
I decided against that since it makes the strings repetitive and long.
The only one that wouldn't have 'write' is 'uncacheable'.
>
> {
> "uncachable", /* 0 */
> "write-combining", /* 1 */
> "2", /* 2 */
> "3", /* 3 */
> "write-through", /* 4 */
> "write-protect", /* 5 */
> "write-back", /* 6 */
> };
>
> Please, provide /doc/usage/cmd/mtrr.rst.
Added in a separate patch.
Regards,
Simon
More information about the U-Boot
mailing list