blob: f7e4d9206de5cc70b70b2f3f55c9d3130e1220a6 [file] [log] [blame]
Bin Meng70b22cf2021-02-25 17:22:34 +08001// SPDX-License-Identifier: GPL-2.0+
2/*
3 * Copyright (C) 2021, Bin Meng <bmeng.cn@gmail.com>
4 */
5
Bin Meng70b22cf2021-02-25 17:22:34 +08006#include <command.h>
7#include <addr_map.h>
8
9static int do_addrmap(struct cmd_tbl *cmdtp, int flag, int argc,
10 char *const argv[])
11{
12 int i;
13
14 printf(" vaddr paddr size\n");
15 printf("================ ================ ================\n");
16
17 for (i = 0; i < CONFIG_SYS_NUM_ADDR_MAP; i++) {
18 if (address_map[i].size == 0)
19 continue;
20
21 printf("%16.8lx %16.8llx %16.8llx\n",
22 address_map[i].vaddr,
23 (unsigned long long)address_map[i].paddr,
24 (unsigned long long)address_map[i].size);
25 }
26
27 return 0;
28}
29
30U_BOOT_CMD(
31 addrmap, 1, 1, do_addrmap,
32 "List non-identity virtual-physical memory mappings for 32-bit CPUs",
33 ""
34);