diff options
author | Simon Glass | 2023-07-30 11:17:00 -0600 |
---|---|---|
committer | Simon Glass | 2023-08-10 18:34:54 -0600 |
commit | cbb607d2d9be44a5ded7a652e8e7646925adc1e0 (patch) | |
tree | 671ba049bd7d3f90e09fcbc9fac4726ccf12b343 /cmd | |
parent | 598dea978d5b7076fc5b6ed31bea0767925e8db0 (diff) |
bootstd: Allow display of the x86 setup information
Provide an option to dump this information if available.
Move the funciion prototype to the common x86 header. Allow the command
line to be left out since 'bootflow info' show this itself and it is
not in the correct place in memory until the kernel is actually booted.
Fix a badly aligned heading while we are here.
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/bootflow.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/cmd/bootflow.c b/cmd/bootflow.c index c0aa4f84fe8..9562832ce43 100644 --- a/cmd/bootflow.c +++ b/cmd/bootflow.c @@ -9,6 +9,7 @@ #include <common.h> #include <bootdev.h> #include <bootflow.h> +#include <bootm.h> #include <bootstd.h> #include <command.h> #include <console.h> @@ -303,11 +304,14 @@ static int do_bootflow_info(struct cmd_tbl *cmdtp, int flag, int argc, { struct bootstd_priv *std; struct bootflow *bflow; + bool x86_setup = false; bool dump = false; int ret; - if (argc > 1 && *argv[1] == '-') + if (argc > 1 && *argv[1] == '-') { dump = strchr(argv[1], 'd'); + x86_setup = strchr(argv[1], 's'); + } ret = bootstd_get_priv(&std); if (ret) @@ -319,6 +323,12 @@ static int do_bootflow_info(struct cmd_tbl *cmdtp, int flag, int argc, } bflow = std->cur_bootflow; + if (IS_ENABLED(CONFIG_X86) && x86_setup) { + zimage_dump(bflow->x86_setup, false); + + return 0; + } + printf("Name: %s\n", bflow->name); printf("Device: %s\n", bflow->dev->name); printf("Block dev: %s\n", bflow->blk ? bflow->blk->name : "(none)"); @@ -508,7 +518,7 @@ static char bootflow_help_text[] = "scan [-abeGl] [bdev] - scan for valid bootflows (-l list, -a all, -e errors, -b boot, -G no global)\n" "bootflow list [-e] - list scanned bootflows (-e errors)\n" "bootflow select [<num>|<name>] - select a bootflow\n" - "bootflow info [-d] - show info on current bootflow (-d dump bootflow)\n" + "bootflow info [-ds] - show info on current bootflow (-d dump bootflow)\n" "bootflow boot - boot current bootflow (or first available if none selected)\n" "bootflow menu [-t] - show a menu of available bootflows\n" "bootflow cmdline [set|get|clear|delete|auto] <param> [<value>] - update cmdline"; |