diff options
author | Tom Rini <trini@konsulko.com> | 2023-06-12 21:55:33 +0300 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2023-06-12 21:55:33 +0300 |
commit | 260d4962e06c0a7d2713523c131416a3f70d7f2c (patch) | |
tree | 14b9d414810e97f1ffdfdaf099db57a5bbf45a79 /cmd | |
parent | 5b589e139620214f26eb83c9fb7bbd62b5f8fc1d (diff) | |
parent | 19b77d3d23966a0d6dbb3c86187765f11100fb6f (diff) | |
download | u-boot-260d4962e06c0a7d2713523c131416a3f70d7f2c.tar.xz |
Merge tag v2023.07-rc4 into next
Signed-off-by: Tom Rini <trini@konsulko.com>
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/Kconfig | 4 | ||||
-rw-r--r-- | cmd/acpi.c | 44 | ||||
-rw-r--r-- | cmd/bootefi.c | 2 | ||||
-rw-r--r-- | cmd/bootflow.c | 4 | ||||
-rw-r--r-- | cmd/ubifs.c | 4 | ||||
-rw-r--r-- | cmd/usb.c | 1 | ||||
-rw-r--r-- | cmd/x86/cbsysinfo.c | 9 | ||||
-rw-r--r-- | cmd/x86/mtrr.c | 3 |
8 files changed, 23 insertions, 48 deletions
diff --git a/cmd/Kconfig b/cmd/Kconfig index 65957da7f5..365371fb51 100644 --- a/cmd/Kconfig +++ b/cmd/Kconfig @@ -109,7 +109,7 @@ menu "Info commands" config CMD_ACPI bool "acpi" - depends on ACPIGEN + depends on ACPI default y help List and dump ACPI tables. ACPI (Advanced Configuration and Power @@ -258,7 +258,7 @@ config CMD_BOOTFLOW config CMD_BOOTFLOW_FULL bool "bootflow - extract subcommands" depends on BOOTSTD_FULL - default y if BOOTSTD_FULL + default y help Add the ability to list the available bootflows, select one and obtain information about it. diff --git a/cmd/acpi.c b/cmd/acpi.c index d0fc062ef8..e70913e40b 100644 --- a/cmd/acpi.c +++ b/cmd/acpi.c @@ -36,49 +36,11 @@ static void dump_hdr(struct acpi_table_header *hdr) } } -/** - * find_table() - Look up an ACPI table - * - * @sig: Signature of table (4 characters, upper case) - * Return: pointer to table header, or NULL if not found - */ -struct acpi_table_header *find_table(const char *sig) -{ - struct acpi_rsdp *rsdp; - struct acpi_rsdt *rsdt; - int len, i, count; - - rsdp = map_sysmem(gd_acpi_start(), 0); - if (!rsdp) - return NULL; - rsdt = map_sysmem(rsdp->rsdt_address, 0); - len = rsdt->header.length - sizeof(rsdt->header); - count = len / sizeof(u32); - for (i = 0; i < count; i++) { - struct acpi_table_header *hdr; - - hdr = map_sysmem(rsdt->entry[i], 0); - if (!memcmp(hdr->signature, sig, ACPI_NAME_LEN)) - return hdr; - if (!memcmp(hdr->signature, "FACP", ACPI_NAME_LEN)) { - struct acpi_fadt *fadt = (struct acpi_fadt *)hdr; - - if (!memcmp(sig, "DSDT", ACPI_NAME_LEN) && fadt->dsdt) - return map_sysmem(fadt->dsdt, 0); - if (!memcmp(sig, "FACS", ACPI_NAME_LEN) && - fadt->firmware_ctrl) - return map_sysmem(fadt->firmware_ctrl, 0); - } - } - - return NULL; -} - static int dump_table_name(const char *sig) { struct acpi_table_header *hdr; - hdr = find_table(sig); + hdr = acpi_find_table(sig); if (!hdr) return -ENOENT; printf("%.*s @ %08lx\n", ACPI_NAME_LEN, hdr->signature, @@ -162,6 +124,10 @@ static int do_acpi_items(struct cmd_tbl *cmdtp, int flag, int argc, bool dump_contents; dump_contents = argc >= 2 && !strcmp("-d", argv[1]); + if (!IS_ENABLED(CONFIG_ACPIGEN)) { + printf("Not supported (enable ACPIGEN)\n"); + return CMD_RET_FAILURE; + } acpi_dump_items(dump_contents ? ACPI_DUMP_CONTENTS : ACPI_DUMP_LIST); return 0; diff --git a/cmd/bootefi.c b/cmd/bootefi.c index 8aa15a64c8..5c0afec154 100644 --- a/cmd/bootefi.c +++ b/cmd/bootefi.c @@ -589,7 +589,7 @@ static efi_status_t bootefi_test_prepare if (!bootefi_device_path) return EFI_OUT_OF_RESOURCES; - bootefi_image_path = efi_dp_from_file(NULL, 0, path); + bootefi_image_path = efi_dp_from_file(NULL, path); if (!bootefi_image_path) { ret = EFI_OUT_OF_RESOURCES; goto failure; diff --git a/cmd/bootflow.c b/cmd/bootflow.c index cfe3422698..5c61286a2a 100644 --- a/cmd/bootflow.c +++ b/cmd/bootflow.c @@ -55,7 +55,7 @@ static void report_bootflow_err(struct bootflow *bflow, int err) break; } - printf(", err=%d\n", err); + printf(", err=%dE\n", err); } /** @@ -125,7 +125,7 @@ static int do_bootflow_scan(struct cmd_tbl *cmdtp, int flag, int argc, dev = std->cur_bootdev; } else { if (has_args) { - printf("Flags not supported: enable CONFIG_BOOTFLOW_FULL\n"); + printf("Flags not supported: enable CONFIG_BOOTSTD_FULL\n"); return CMD_RET_USAGE; } boot = true; diff --git a/cmd/ubifs.c b/cmd/ubifs.c index 6a01d0988a..2a035bc7ae 100644 --- a/cmd/ubifs.c +++ b/cmd/ubifs.c @@ -111,7 +111,7 @@ static int do_ubifs_load(struct cmd_tbl *cmdtp, int flag, int argc, char *filename; char *endp; int ret; - u32 addr; + unsigned long addr; u32 size = 0; if (!ubifs_mounted) { @@ -133,7 +133,7 @@ static int do_ubifs_load(struct cmd_tbl *cmdtp, int flag, int argc, if (endp == argv[3]) return CMD_RET_USAGE; } - debug("Loading file '%s' to address 0x%08x (size %d)\n", filename, addr, size); + debug("Loading file '%s' to address 0x%08lx (size %d)\n", filename, addr, size); ret = ubifs_load(filename, addr, size); if (ret) { @@ -620,7 +620,6 @@ static int do_usb(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) { struct usb_device *udev = NULL; int i; - extern char usb_started; if (argc < 2) return CMD_RET_USAGE; diff --git a/cmd/x86/cbsysinfo.c b/cmd/x86/cbsysinfo.c index 34fdaf5b1b..2b8d3b0a43 100644 --- a/cmd/x86/cbsysinfo.c +++ b/cmd/x86/cbsysinfo.c @@ -363,6 +363,15 @@ static void show_table(struct sysinfo_t *info, bool verbose) print_hex("MTC size", info->mtc_size); print_ptr("Chrome OS VPD", info->chromeos_vpd); + print_ptr("RSDP", info->rsdp); + printf("%-12s: ", "Unimpl."); + if (info->unimpl_count) { + for (i = 0; i < info->unimpl_count; i++) + printf("%02x ", info->unimpl[i]); + printf("\n"); + } else { + printf("(none)\n"); + } } static int do_cbsysinfo(struct cmd_tbl *cmdtp, int flag, int argc, diff --git a/cmd/x86/mtrr.c b/cmd/x86/mtrr.c index b213a942fd..b1691d8b65 100644 --- a/cmd/x86/mtrr.c +++ b/cmd/x86/mtrr.c @@ -148,7 +148,8 @@ static int do_mtrr(struct cmd_tbl *cmdtp, int flag, int argc, printf("CPU %d:\n", i); ret = do_mtrr_list(reg_count, i); if (ret) { - printf("Failed to read CPU %d (err=%d)\n", i, + printf("Failed to read CPU %s (err=%d)\n", + i < MP_SELECT_ALL ? simple_itoa(i) : "", ret); return CMD_RET_FAILURE; } |