diff options
author | Bin Meng <bmeng.cn@gmail.com> | 2017-08-15 22:41:57 -0700 |
---|---|---|
committer | Bin Meng <bmeng.cn@gmail.com> | 2017-09-16 14:57:44 +0800 |
commit | b3fd2126dc8114d648b1e769b9fa621e3537bf48 (patch) | |
tree | 48214c2ebac31f992003ffd25eb9d410eb0f293c /arch | |
parent | 5df91f1c82af1b2a87a1e028de7ddd092c313655 (diff) | |
download | u-boot-b3fd2126dc8114d648b1e769b9fa621e3537bf48.zip u-boot-b3fd2126dc8114d648b1e769b9fa621e3537bf48.tar.gz u-boot-b3fd2126dc8114d648b1e769b9fa621e3537bf48.tar.bz2 |
x86: fsp: Update fsp command to show spec 1.1 header
FSP spec 1.1 adds 3 new APIs and their offsets are in the header.
Update the 'fsp hdr' command to show these new entries.
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/x86/include/asm/fsp/fsp_infoheader.h | 9 | ||||
-rw-r--r-- | arch/x86/lib/fsp/cmd_fsp.c | 24 |
2 files changed, 30 insertions, 3 deletions
diff --git a/arch/x86/include/asm/fsp/fsp_infoheader.h b/arch/x86/include/asm/fsp/fsp_infoheader.h index 4a4d627..60ce61d 100644 --- a/arch/x86/include/asm/fsp/fsp_infoheader.h +++ b/arch/x86/include/asm/fsp/fsp_infoheader.h @@ -26,7 +26,14 @@ struct __packed fsp_header { u32 fsp_tempram_init; /* tempram_init offset */ u32 fsp_init; /* fsp_init offset */ u32 fsp_notify; /* fsp_notify offset */ - u32 reserved2; + u32 fsp_mem_init; /* fsp_mem_init offset */ + u32 fsp_tempram_exit; /* fsp_tempram_exit offset */ + u32 fsp_silicon_init; /* fsp_silicon_init offset */ }; +#define FSP_HEADER_REVISION_1 1 +#define FSP_HEADER_REVISION_2 2 + +#define FSP_ATTR_GRAPHICS_SUPPORT (1 << 0) + #endif diff --git a/arch/x86/lib/fsp/cmd_fsp.c b/arch/x86/lib/fsp/cmd_fsp.c index 2554663..2a99cfe 100644 --- a/arch/x86/lib/fsp/cmd_fsp.c +++ b/arch/x86/lib/fsp/cmd_fsp.c @@ -38,17 +38,37 @@ static int do_hdr(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) for (i = 0; i < sizeof(hdr->sign); i++) printf("%c", *sign++); printf(", size %d, rev %d\n", hdr->hdr_len, hdr->hdr_rev); - printf("Image : rev %d.%d, id ", - (hdr->img_rev >> 8) & 0xff, hdr->img_rev & 0xff); + printf("Image : rev "); + if (hdr->hdr_rev == FSP_HEADER_REVISION_1) { + printf("%d.%d", + (hdr->img_rev >> 8) & 0xff, hdr->img_rev & 0xff); + } else { + printf("%d.%d.%d.%d", + (hdr->img_rev >> 24) & 0xff, (hdr->img_rev >> 16) & 0xff, + (hdr->img_rev >> 8) & 0xff, hdr->img_rev & 0xff); + } + printf(", id "); for (i = 0; i < ARRAY_SIZE(hdr->img_id); i++) printf("%c", hdr->img_id[i]); printf(", addr 0x%08x, size %d\n", img_addr, hdr->img_size); + if (hdr->hdr_rev == FSP_HEADER_REVISION_2) { + printf("GFX :%ssupported\n", + hdr->img_attr & FSP_ATTR_GRAPHICS_SUPPORT ? " " : " un"); + } printf("VPD : addr 0x%08x, size %d\n", hdr->cfg_region_off + img_addr, hdr->cfg_region_size); printf("\nNumber of APIs Supported : %d\n", hdr->api_num); printf("\tTempRamInit : 0x%08x\n", hdr->fsp_tempram_init + img_addr); printf("\tFspInit : 0x%08x\n", hdr->fsp_init + img_addr); printf("\tFspNotify : 0x%08x\n", hdr->fsp_notify + img_addr); + if (hdr->hdr_rev == FSP_HEADER_REVISION_2) { + printf("\tMemoryInit : 0x%08x\n", + hdr->fsp_mem_init + img_addr); + printf("\tTempRamExit : 0x%08x\n", + hdr->fsp_tempram_exit + img_addr); + printf("\tSiliconInit : 0x%08x\n", + hdr->fsp_silicon_init + img_addr); + } return 0; } |