x86: fsp: Compact the output of hob command
Compact hob command output, especially by making hob type string a little bit shorter so that we can leave room for future extension. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Acked-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
@@ -14,16 +14,16 @@ DECLARE_GLOBAL_DATA_PTR;
|
|||||||
static char *hob_type[] = {
|
static char *hob_type[] = {
|
||||||
"reserved",
|
"reserved",
|
||||||
"Hand-off",
|
"Hand-off",
|
||||||
"Memory Allocation",
|
"Mem Alloc",
|
||||||
"Resource Descriptor",
|
"Res Desc",
|
||||||
"GUID Extension",
|
"GUID Ext",
|
||||||
"Firmware Volume",
|
"FV",
|
||||||
"CPU",
|
"CPU",
|
||||||
"Memory Pool",
|
"Mem Pool",
|
||||||
"reserved",
|
"reserved",
|
||||||
"Firmware Volume 2",
|
"FV2",
|
||||||
"Load PEIM Unused",
|
"Load PEIM",
|
||||||
"UEFI Capsule",
|
"Capsule",
|
||||||
};
|
};
|
||||||
|
|
||||||
int do_hob(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
|
int do_hob(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
|
||||||
@@ -37,20 +37,20 @@ int do_hob(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
|
|||||||
|
|
||||||
printf("HOB list address: 0x%08x\n\n", (unsigned int)hdr);
|
printf("HOB list address: 0x%08x\n\n", (unsigned int)hdr);
|
||||||
|
|
||||||
printf("No. | Address | Type | Length in Bytes\n");
|
printf("# | Address | Type | Len\n");
|
||||||
printf("----|----------|---------------------|----------------\n");
|
printf("---|----------|-----------|-----\n");
|
||||||
while (!end_of_hob(hdr)) {
|
while (!end_of_hob(hdr)) {
|
||||||
printf("%-3d | %08x | ", i, (unsigned int)hdr);
|
printf("%-2d | %08x | ", i, (unsigned int)hdr);
|
||||||
type = hdr->type;
|
type = hdr->type;
|
||||||
if (type == HOB_TYPE_UNUSED)
|
if (type == HOB_TYPE_UNUSED)
|
||||||
desc = "*Unused*";
|
desc = "*Unused*";
|
||||||
else if (type == HOB_TYPE_EOH)
|
else if (type == HOB_TYPE_EOH)
|
||||||
desc = "*END OF HOB*";
|
desc = "*EOH*";
|
||||||
else if (type >= 0 && type <= ARRAY_SIZE(hob_type))
|
else if (type >= 0 && type <= ARRAY_SIZE(hob_type))
|
||||||
desc = hob_type[type];
|
desc = hob_type[type];
|
||||||
else
|
else
|
||||||
desc = "*Invalid Type*";
|
desc = "*Invalid*";
|
||||||
printf("%-19s | %-15d\n", desc, hdr->len);
|
printf("%-9s | %-4d\n", desc, hdr->len);
|
||||||
hdr = get_next_hob(hdr);
|
hdr = get_next_hob(hdr);
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user