From 2ab1ffa5556ccd49aa2b5e4a6cca8ab14072e860 Mon Sep 17 00:00:00 2001 From: Bin Meng Date: Sat, 31 Jul 2021 16:45:27 +0800 Subject: x86: cmd: hob: Fix the command usage and help messages At present the hob command usage and help messages are messed up in a single line. They should be separated. This was a regression introduced when [seq] and [-v] were added to the command. Fixes: d11544dfa9f4 ("x86: hob: Add way to show a single hob entry") Fixes: 51af144eb7a0 ("x86: Allow showing details about a HOB entry") Signed-off-by: Bin Meng Reviewed-by: Simon Glass Tested on chromebook_coral, chromebook_samus, chromebook_link, minnowmax Tested-by: Simon Glass --- cmd/x86/hob.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'cmd') diff --git a/cmd/x86/hob.c b/cmd/x86/hob.c index 01db93e..71e7fcb 100644 --- a/cmd/x86/hob.c +++ b/cmd/x86/hob.c @@ -158,8 +158,7 @@ static int do_hob(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) } U_BOOT_CMD(hob, 3, 1, do_hob, - "[-v] [seq] Print Hand-Off Block (HOB) information" - " -v - Show detailed HOB information where available" - " seq - Record # to show (all by default)", - "" + "[-v] [seq] Print Hand-Off Block (HOB) information", + " -v - Show detailed HOB information where available\n" + " seq - Record # to show (all by default)" ); -- cgit v1.1 From 53094331ff3065c4ab51e1442927b1af2b276778 Mon Sep 17 00:00:00 2001 From: Bin Meng Date: Sat, 31 Jul 2021 16:45:28 +0800 Subject: x86: cmd: hob: Fix display of resource type for system memory The resource type for system memory is currently displayed as "unknown", which is wrong. Fixes: 51af144eb7a0 ("x86: Allow showing details about a HOB entry") Signed-off-by: Bin Meng Reviewed-by: Simon Glass Tested on chromebook_coral, chromebook_samus, chromebook_link, minnowmax Tested-by: Simon Glass --- cmd/x86/hob.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cmd') diff --git a/cmd/x86/hob.c b/cmd/x86/hob.c index 71e7fcb..04d092d 100644 --- a/cmd/x86/hob.c +++ b/cmd/x86/hob.c @@ -78,7 +78,7 @@ static void show_hob_details(const struct hob_header *hdr) const struct hob_res_desc *res = ptr; const char *typename; - typename = res->type > 0 && res->type <= RES_MAX_MEM_TYPE ? + typename = res->type >= RES_SYS_MEM && res->type <= RES_MAX_MEM_TYPE ? res_type[res->type] : "unknown"; printf(" base = %08llx, len = %08llx, end = %08llx, type = %d (%s)\n\n", -- cgit v1.1