cmd/meminfo: display of addresses above 4 GiB
Addresses above 4 GiB don't fit into 8 digits. Use 13 digits which encompass up to 15 TiB. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Simon Glass <simon.glass@canonical.com>
This commit is contained in:
@@ -23,9 +23,9 @@ static void print_region(const char *name, ulong base, ulong size, ulong *uptop)
|
||||
{
|
||||
ulong end = base + size;
|
||||
|
||||
printf("%-12s %8lx %8lx %8lx", name, base, size, end);
|
||||
printf("%-12s %13lx %13lx %13lx", name, base, size, end);
|
||||
if (*uptop)
|
||||
printf(" %8lx", *uptop - end);
|
||||
printf(" %13lx", *uptop - end);
|
||||
putc('\n');
|
||||
*uptop = base;
|
||||
}
|
||||
@@ -64,9 +64,9 @@ static int do_meminfo(struct cmd_tbl *cmdtp, int flag, int argc,
|
||||
|
||||
arch_dump_mem_attrs();
|
||||
|
||||
printf("\n%-12s %8s %8s %8s %8s\n", "Region", "Base", "Size", "End",
|
||||
printf("\n%-12s %13s %13s %13s %13s\n", "Region", "Base", "Size", "End",
|
||||
"Gap");
|
||||
printf("------------------------------------------------\n");
|
||||
printf("--------------------------------------------------------------------\n");
|
||||
upto = 0;
|
||||
if (IS_ENABLED(CONFIG_VIDEO))
|
||||
print_region("video", gd_video_bottom(),
|
||||
|
||||
@@ -17,7 +17,7 @@ static int cmd_test_meminfo(struct unit_test_state *uts)
|
||||
ut_assert_nextlinen("DRAM: ");
|
||||
ut_assert_nextline_empty();
|
||||
|
||||
ut_assert_nextline("Region Base Size End Gap");
|
||||
ut_assert_nextline("Region Base Size End Gap");
|
||||
ut_assert_nextlinen("-");
|
||||
|
||||
/* For now we don't worry about checking the values */
|
||||
|
||||
Reference in New Issue
Block a user