Message ID | 20210731084529.7524-7-bmeng.cn@gmail.com |
---|---|
State | Accepted |
Commit | 53094331ff3065c4ab51e1442927b1af2b276778 |
Delegated to: | Bin Meng |
Headers | show |
Series | x86: Various fixes to MTRR and FSP codes | expand |
On Sat, 31 Jul 2021 at 02:45, Bin Meng <bmeng.cn@gmail.com> wrote: > > 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> > --- > > cmd/x86/hob.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Reviewed-by: Simon Glass <sjg@chromium.org> Tested on chromebook_coral, chromebook_samus, chromebook_link, minnowmax Tested-by: Simon Glass <sjg@chromium.org>
On Mon, Aug 2, 2021 at 3:19 AM Simon Glass <sjg@chromium.org> wrote: > > On Sat, 31 Jul 2021 at 02:45, Bin Meng <bmeng.cn@gmail.com> wrote: > > > > 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> > > --- > > > > cmd/x86/hob.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > Reviewed-by: Simon Glass <sjg@chromium.org> > Tested on chromebook_coral, chromebook_samus, chromebook_link, minnowmax > Tested-by: Simon Glass <sjg@chromium.org> applied to u-boot-x86, thanks!
diff --git a/cmd/x86/hob.c b/cmd/x86/hob.c index 71e7fcbd65..04d092dbe7 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",
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> --- cmd/x86/hob.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)