]>
Commit | Line | Data |
---|---|---|
56d0635f BM |
1 | // SPDX-License-Identifier: GPL-2.0+ |
2 | /* | |
3 | * Copyright (C) 2021, Bin Meng <[email protected]> | |
4 | */ | |
5 | ||
56d0635f BM |
6 | #include <command.h> |
7 | #include <addr_map.h> | |
8 | ||
9 | static 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 | ||
30 | U_BOOT_CMD( | |
31 | addrmap, 1, 1, do_addrmap, | |
32 | "List non-identity virtual-physical memory mappings for 32-bit CPUs", | |
33 | "" | |
34 | ); |