drivers/intel/fsp2_0: Fix debug display support

Fix errors in debug display support.

BRANCH=none
BUG=None
TEST=Build FSP 2.0 (SEC/PEI core with all FSP debug on) and run on
Galileo Gen2

Change-Id: I2ece056d66dc8568a7b7206970f20368ec5bf147
Signed-off-by: Lee Leahy <Leroy.P.Leahy@intel.com>
Reviewed-on: https://review.coreboot.org/16809
Tested-by: build bot (Jenkins)
Reviewed-by: Martin Roth <martinroth@google.com>
This commit is contained in:
Lee Leahy 2016-09-28 17:15:00 -07:00
parent 44ec92a48d
commit 5a9ca4d1ec
5 changed files with 24 additions and 20 deletions

View File

@ -20,7 +20,7 @@ enum pixel_format {
pixel_bitmask = 2, /* defined by <rgb>_mask values */
};
const uint8_t fsp_graphics_info_guid[16] = {
static const uint8_t fsp_graphics_info_guid[16] = {
0xce, 0x2c, 0xf6, 0x39, 0x25, 0x68, 0x69, 0x46,
0xbb, 0x56, 0x54, 0x1a, 0xba, 0x75, 0x3a, 0x07
};
@ -137,4 +137,4 @@ void lb_framebuffer(struct lb_header *header)
__attribute__((weak)) uintptr_t fsp_soc_get_igd_bar(void)
{
return 0;
}
}

View File

@ -22,17 +22,6 @@
#define HOB_HEADER_LEN 8
enum resource_type {
EFI_RESOURCE_SYSTEM_MEMORY = 0,
EFI_RESOURCE_MEMORY_MAPPED_IO = 1,
EFI_RESOURCE_IO = 2,
EFI_RESOURCE_FIRMWARE_DEVICE = 3,
EFI_RESOURCE_MEMORY_MAPPED_IO_PORT = 4,
EFI_RESOURCE_MEMORY_RESERVED = 5,
EFI_RESOURCE_IO_RESERVED = 6,
EFI_RESOURCE_MAX_MEMORY_TYPE = 7,
};
/* GUIDs in little-endian, so they can be used with memcmp() */
const uint8_t fsp_bootloader_tolum_guid[16] = {
0x56, 0x4f, 0xff, 0x73, 0x8e, 0xaa, 0x51, 0x44,

View File

@ -51,6 +51,11 @@ static const uint8_t empty_guid[16] = {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
};
static const uint8_t fsp_graphics_info_guid[16] = {
0xce, 0x2c, 0xf6, 0x39, 0x25, 0x68, 0x69, 0x46,
0xbb, 0x56, 0x54, 0x1a, 0xba, 0x75, 0x3a, 0x07
};
static const uint8_t fsp_info_header_guid[16] = {
0xbe, 0x40, 0x27, 0x91, 0x84, 0x22, 0x34, 0x47,
0xb9, 0x71, 0x84, 0xb0, 0x27, 0x35, 0x3f, 0x0c
@ -78,7 +83,7 @@ static const struct guid_name_map guid_names[] = {
{ fsp_info_header_guid, "FSP_INFO_HEADER_GUID" },
{ fsp_reserved_memory_guid, "FSP_RESERVED_MEMORY" },
{ fsp_nv_storage_guid, "FSP_NV_STORAGE" },
{ graphics_info_guid, "GRAPHICS INFO" },
{ fsp_graphics_info_guid, "GRAPHICS INFO" },
{ smbios_memory_info_guid, "FSP_SMBIOS_MEMORY_INFO_GUID" },
{ tseg_guid, "TSEG" },
};

View File

@ -37,6 +37,17 @@ struct hob_resource {
uint64_t length;
} __attribute__((packed));
enum resource_type {
EFI_RESOURCE_SYSTEM_MEMORY = 0,
EFI_RESOURCE_MEMORY_MAPPED_IO = 1,
EFI_RESOURCE_IO = 2,
EFI_RESOURCE_FIRMWARE_DEVICE = 3,
EFI_RESOURCE_MEMORY_MAPPED_IO_PORT = 4,
EFI_RESOURCE_MEMORY_RESERVED = 5,
EFI_RESOURCE_IO_RESERVED = 6,
EFI_RESOURCE_MAX_MEMORY_TYPE = 7,
};
enum hob_type {
HOB_TYPE_HANDOFF = 0x0001,
HOB_TYPE_MEMORY_ALLOCATION = 0x0002,
@ -53,7 +64,6 @@ enum hob_type {
};
extern const uint8_t fsp_bootloader_tolum_guid[16];
extern const uint8_t fsp_graphics_info_guid[16];
extern const uint8_t fsp_nv_storage_guid[16];
extern const uint8_t fsp_reserved_memory_guid[16];

View File

@ -19,15 +19,15 @@ void fsp_display_upd_value(const char *name, size_t size, uint64_t old,
{
size *= 2;
if (old == new) {
printk(BIOS_SPEW, " 0x%0*llx: %s\n", size, new, name);
printk(BIOS_SPEW, " 0x%0*llx: %s\n", (int)size, new, name);
} else {
printk(BIOS_SPEW, " 0x%0*llx --> 0x%0*llx: %s\n", size, old,
size, new, name);
printk(BIOS_SPEW, " 0x%0*llx --> 0x%0*llx: %s\n", (int)size, old,
(int)size, new, name);
}
}
static void fspm_display_arch_params(const struct FSPM_ARCH_UPD *old,
const struct FSPM_ARCH_UPD *new)
static void fspm_display_arch_params(const FSPM_ARCH_UPD *old,
const FSPM_ARCH_UPD *new)
{
/* Display the architectural parameters for MemoryInit */
printk(BIOS_SPEW, "Architectural UPD values for MemoryInit at: 0x%p\n",