diff options
author | Lee Leahy <leroy.p.leahy@intel.com> | 2016-07-31 14:15:49 -0700 |
---|---|---|
committer | Lee Leahy <leroy.p.leahy@intel.com> | 2016-08-03 06:19:03 +0200 |
commit | 37b5ef26eb5627ddbae295a1045d174e012fb1cc (patch) | |
tree | 9535ac1f5c325a2c59dc72df9427c8a780e9b727 /src/drivers/intel/fsp2_0/util.c | |
parent | 806fa2463f16d32f98cff6437576a5efe2874ece (diff) | |
download | coreboot-37b5ef26eb5627ddbae295a1045d174e012fb1cc.tar.xz |
drivers/intel/fsp2_0: Disable display of FSP header
Add a Kconfig value to enable display of FSP header. Move the display
code into a separate module to remove it entirely from the final image.
TEST=Build and run on Galileo Gen2
Change-Id: I7047a9e58e6a6481c8453dbfebfbfe69dc8823d8
Signed-off-by: Lee Leahy <leroy.p.leahy@intel.com>
Reviewed-on: https://review.coreboot.org/16002
Tested-by: build bot (Jenkins)
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Diffstat (limited to 'src/drivers/intel/fsp2_0/util.c')
-rw-r--r-- | src/drivers/intel/fsp2_0/util.c | 46 |
1 files changed, 2 insertions, 44 deletions
diff --git a/src/drivers/intel/fsp2_0/util.c b/src/drivers/intel/fsp2_0/util.c index 108457d7dd..bab060159d 100644 --- a/src/drivers/intel/fsp2_0/util.c +++ b/src/drivers/intel/fsp2_0/util.c @@ -59,49 +59,6 @@ enum cb_err fsp_identify(struct fsp_header *hdr, const void *fsp_blob) return CB_SUCCESS; } -void fsp_print_header_info(const struct fsp_header *hdr) -{ - union { - uint32_t val; - struct { - uint8_t bld_num; - uint8_t revision; - uint8_t minor; - uint8_t major; - } rev; - } revision; - - revision.val = hdr->fsp_revision; - - printk(BIOS_DEBUG, "Spec version: v%u.%u\n", (hdr->spec_version >> 4 ), - hdr->spec_version & 0xf); - printk(BIOS_DEBUG, "Revision: %u.%u.%u, Build Number %u\n", - revision.rev.major, - revision.rev.minor, - revision.rev.revision, - revision.rev.bld_num); - printk(BIOS_DEBUG, "Type: %s/%s\n", - (hdr->component_attribute & 1 ) ? "release" : "debug", - (hdr->component_attribute & 2 ) ? "test" : "official"); - printk(BIOS_DEBUG, "image ID: %s, base 0x%lx + 0x%zx\n", - hdr->image_id, hdr->image_base, hdr->image_size); - printk(BIOS_DEBUG, "\tConfig region 0x%zx + 0x%zx\n", - hdr->cfg_region_offset, hdr->cfg_region_size); - - if ((hdr->component_attribute >> 12) == FSP_HDR_ATTRIB_FSPM) { - printk(BIOS_DEBUG, "\tMemory init offset 0x%zx\n", - hdr->memory_init_entry_offset); - } - - if ((hdr->component_attribute >> 12) == FSP_HDR_ATTRIB_FSPS) { - printk(BIOS_DEBUG, "\tSilicon init offset 0x%zx\n", - hdr->silicon_init_entry_offset); - printk(BIOS_DEBUG, "\tNotify phase offset 0x%zx\n", - hdr->notify_phase_entry_offset); - } - -} - enum cb_err fsp_validate_component(struct fsp_header *hdr, const struct region_device *rdev) { @@ -123,7 +80,8 @@ enum cb_err fsp_validate_component(struct fsp_header *hdr, rdev_munmap(rdev, membase); - fsp_print_header_info(hdr); + if (IS_ENABLED(CONFIG_DISPLAY_FSP_HEADER)) + fsp_print_header_info(hdr); /* Check if size specified in the header matches the cbfs file size */ if (region_device_sz(rdev) < hdr->image_size) { |