Hi Heinrich, On Thu, 30 Mar 2023 at 16:10, Heinrich Schuchardt <xypron.g...@gmx.de> wrote: > > > > Am 30. März 2023 23:31:51 MESZ schrieb Simon Glass <s...@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 <s...@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