aboutsummaryrefslogtreecommitdiff
path: root/cmd/addrmap.c
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2021-03-06 07:25:04 -0500
committerTom Rini <trini@konsulko.com>2021-03-06 07:25:04 -0500
commite4dba4ba6f61e8128be0b4200ca2d8cebf62180b (patch)
tree9f2877b1278093a579247756fdfd7fbe1055f63c /cmd/addrmap.c
parent6a026e5649f00c0b157a935279dfd625889db675 (diff)
parentb75ca06836567a467b8b5a9ee8ce0a8efde45e08 (diff)
Merge https://gitlab.denx.de/u-boot/custodians/u-boot-fsl-qoriq
- Convert qemu-ppce500 to driver model and enable additional driver support - bug fixes/updates in net-dsa driver, vid driver, move configs to kconfig - Update Maintainers of some powerpc, layerscape platforms
Diffstat (limited to 'cmd/addrmap.c')
-rw-r--r--cmd/addrmap.c35
1 files changed, 35 insertions, 0 deletions
diff --git a/cmd/addrmap.c b/cmd/addrmap.c
new file mode 100644
index 0000000000..bd23549f3a
--- /dev/null
+++ b/cmd/addrmap.c
@@ -0,0 +1,35 @@
+// SPDX-License-Identifier: GPL-2.0+
+/*
+ * Copyright (C) 2021, Bin Meng <bmeng.cn@gmail.com>
+ */
+
+#include <common.h>
+#include <command.h>
+#include <addr_map.h>
+
+static int do_addrmap(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
+{
+ int i;
+
+ printf(" vaddr paddr size\n");
+ printf("================ ================ ================\n");
+
+ for (i = 0; i < CONFIG_SYS_NUM_ADDR_MAP; i++) {
+ if (address_map[i].size == 0)
+ continue;
+
+ printf("%16.8lx %16.8llx %16.8llx\n",
+ address_map[i].vaddr,
+ (unsigned long long)address_map[i].paddr,
+ (unsigned long long)address_map[i].size);
+ }
+
+ return 0;
+}
+
+U_BOOT_CMD(
+ addrmap, 1, 1, do_addrmap,
+ "List non-identity virtual-physical memory mappings for 32-bit CPUs",
+ ""
+);