diff options
author | Tom Rini <trini@konsulko.com> | 2021-03-15 12:15:38 -0400 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2021-03-15 12:15:38 -0400 |
commit | 22fc991dafee0142fc6bf621e7bd558bd58020b4 (patch) | |
tree | e5da8826fd735de968519f432864dc1545d96017 /cmd | |
parent | 1876b390f31afca15de334e499aa071b0bf64a44 (diff) | |
parent | 4103e13534141c31e4e9bf40848ab3a61dabce81 (diff) | |
download | u-boot-22fc991dafee0142fc6bf621e7bd558bd58020b4.tar.gz u-boot-22fc991dafee0142fc6bf621e7bd558bd58020b4.tar.bz2 u-boot-22fc991dafee0142fc6bf621e7bd558bd58020b4.zip |
Merge tag 'v2021.04-rc4' into next
Prepare v2021.04-rc4
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/Kconfig | 8 | ||||
-rw-r--r-- | cmd/Makefile | 1 | ||||
-rw-r--r-- | cmd/addrmap.c | 35 |
3 files changed, 44 insertions, 0 deletions
diff --git a/cmd/Kconfig b/cmd/Kconfig index 960080d6d4..e4bb1d4c4a 100644 --- a/cmd/Kconfig +++ b/cmd/Kconfig @@ -97,6 +97,13 @@ config CMD_ACPI between the firmware and OS, and is particularly useful when you want to make hardware changes without the OS needing to be adjusted. +config CMD_ADDRMAP + bool "addrmap" + depends on ADDR_MAP + default y + help + List non-identity virtual-physical memory mappings for 32-bit CPUs. + config CMD_BDI bool "bdinfo" default y @@ -1338,6 +1345,7 @@ config CMD_PVBLOCK config CMD_VIRTIO bool "virtio" depends on VIRTIO + depends on HAVE_BLOCK_DEVICE default y if VIRTIO help VirtIO block device support diff --git a/cmd/Makefile b/cmd/Makefile index a7017e8452..e606ac4e8c 100644 --- a/cmd/Makefile +++ b/cmd/Makefile @@ -13,6 +13,7 @@ obj-y += version.o # command obj-$(CONFIG_CMD_ACPI) += acpi.o +obj-$(CONFIG_CMD_ADDRMAP) += addrmap.o obj-$(CONFIG_CMD_AES) += aes.o obj-$(CONFIG_CMD_AB_SELECT) += ab_select.o obj-$(CONFIG_CMD_ADC) += adc.o 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", + "" +); |