Print the meaningful base address and mask of an MTRR range without showing
the memory type encoding or valid bit.

Signed-off-by: Bin Meng <[email protected]>
Acked-by: Simon Glass <[email protected]>
---

Changes in v2: None

 arch/x86/lib/cmd_mtrr.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/x86/lib/cmd_mtrr.c b/arch/x86/lib/cmd_mtrr.c
index 7e0506b..f632f49 100644
--- a/arch/x86/lib/cmd_mtrr.c
+++ b/arch/x86/lib/cmd_mtrr.c
@@ -37,7 +37,8 @@ static int do_mtrr_list(void)
                valid = mask & MTRR_PHYS_MASK_VALID;
                type = mtrr_type_name[base & MTRR_BASE_TYPE_MASK];
                printf("%d   %-5s %-12s %016llx %016llx %016llx\n", i,
-                      valid ? "Y" : "N", type, base, mask, size);
+                      valid ? "Y" : "N", type, base & ~MTRR_BASE_TYPE_MASK,
+                      mask & ~MTRR_PHYS_MASK_VALID, size);
        }
 
        return 0;
-- 
1.8.2.1

_______________________________________________
U-Boot mailing list
[email protected]
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to