2 * Copyright (C) 2014, Bin Meng <bmeng.cn@gmail.com>
4 * SPDX-License-Identifier: GPL-2.0+
9 #include <linux/compiler.h>
10 #include <asm/arch/fsp/fsp_support.h>
12 DECLARE_GLOBAL_DATA_PTR;
14 static char *hob_type[] = {
18 "Resource Descriptor",
29 int do_hob(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
31 const struct hob_header *hdr;
36 hdr = gd->arch.hob_list;
38 printf("HOB list address: 0x%08x\n\n", (unsigned int)hdr);
40 printf("No. | Address | Type | Length in Bytes\n");
41 printf("----|----------|---------------------|----------------\n");
42 while (!end_of_hob(hdr)) {
43 printf("%-3d | %08x | ", i, (unsigned int)hdr);
44 type = get_hob_type(hdr);
45 if (type == HOB_TYPE_UNUSED)
47 else if (type == HOB_TYPE_EOH)
48 desc = "*END OF HOB*";
49 else if (type >= 0 && type <= ARRAY_SIZE(hob_type))
50 desc = hob_type[type];
52 desc = "*Invalid Type*";
53 printf("%-19s | %-15d\n", desc, get_hob_length(hdr));
54 hdr = get_next_hob(hdr);
63 "print Firmware Support Package (FSP) Hand-Off Block information",