diff options
author | Bin Meng <bmeng.cn@gmail.com> | 2021-07-31 16:45:28 +0800 |
---|---|---|
committer | Bin Meng <bmeng.cn@gmail.com> | 2021-08-02 15:11:41 +0800 |
commit | 53094331ff3065c4ab51e1442927b1af2b276778 (patch) | |
tree | 36ed5d3c7bf024e718b9d429c127fd73d62f6545 | |
parent | 2ab1ffa5556ccd49aa2b5e4a6cca8ab14072e860 (diff) | |
download | u-boot-53094331ff3065c4ab51e1442927b1af2b276778.zip u-boot-53094331ff3065c4ab51e1442927b1af2b276778.tar.gz u-boot-53094331ff3065c4ab51e1442927b1af2b276778.tar.bz2 |
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 <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested on chromebook_coral, chromebook_samus, chromebook_link, minnowmax
Tested-by: Simon Glass <sjg@chromium.org>
-rw-r--r-- | cmd/x86/hob.c | 2 |
1 files changed, 1 insertions, 1 deletions
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", |