diff options
author | Julien Viard de Galbert <jviarddegalbert@online.net> | 2018-02-26 18:32:59 +0100 |
---|---|---|
committer | Martin Roth <martinroth@google.com> | 2018-05-08 03:06:04 +0000 |
commit | 2d0aaa7fc1f0ad197bca92581581bdd633b09b33 (patch) | |
tree | 25698c5608235ad6bdf707d4c94cf8a05e5da52a /src/soc/intel/denverton_ns/hob_display.c | |
parent | ad126109ca0739d08a42cb7c0ae25fabf3d981d5 (diff) | |
download | coreboot-2d0aaa7fc1f0ad197bca92581581bdd633b09b33.tar.xz |
soc/intel/denverton_ns: Fill dimm info for SMBIOS table 17
Rework display_fsp_smbios_memory_info_hob (shared code).
Import code to convert memory HOB to dimm info for SMBIOS table 17
mostly copied from fsp1_1 mainboard_save_dimm_info.
Change-Id: Id5c4ceaf4e65359f72ec764f0914b5daa82f257e
Signed-off-by: Julien Viard de Galbert <jviarddegalbert@online.net>
Reviewed-on: https://review.coreboot.org/23851
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/soc/intel/denverton_ns/hob_display.c')
-rw-r--r-- | src/soc/intel/denverton_ns/hob_display.c | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/src/soc/intel/denverton_ns/hob_display.c b/src/soc/intel/denverton_ns/hob_display.c index 39b799d522..062aea08a4 100644 --- a/src/soc/intel/denverton_ns/hob_display.c +++ b/src/soc/intel/denverton_ns/hob_display.c @@ -17,6 +17,7 @@ #include <console/console.h> #include <fsp/util.h> #include <lib.h> +#include <soc/hob_mem.h> static const uint8_t fsp_hob_resource_owner_graphics_guid[16] = { 0xa7, 0x3a, 0x7c, 0x9c, 0x32, 0x55, 0x17, 0x49, @@ -69,3 +70,50 @@ void soc_display_hob(const struct hob_header *hob) { hexdump(hob, hob->length); } + +void soc_display_fsp_smbios_memory_info_hob( + const FSP_SMBIOS_MEMORY_INFO *memory_info_hob) +{ + int channel, dimm; + const DIMM_INFO *dimm_info; + const CHANNEL_INFO *channel_info; + + /* Display the data in the FSP_SMBIOS_MEMORY_INFO HOB */ + printk(BIOS_DEBUG, "FSP_SMBIOS_MEMORY_INFO HOB\n"); + printk(BIOS_DEBUG, " 0x%02x: Revision\n", + memory_info_hob->Revision); + printk(BIOS_DEBUG, " 0x%02x: MemoryType\n", + memory_info_hob->MemoryType); + printk(BIOS_DEBUG, " %d: MemoryFrequencyInMHz\n", + memory_info_hob->MemoryFrequencyInMHz); + printk(BIOS_DEBUG, " %d: DataWidth in bits\n", + memory_info_hob->DataWidth); + printk(BIOS_DEBUG, " 0x%02x: ErrorCorrectionType\n", + memory_info_hob->ErrorCorrectionType); + printk(BIOS_DEBUG, " 0x%02x: ChannelCount\n", + memory_info_hob->ChannelCount); + for (channel = 0; channel < memory_info_hob->ChannelCount; + channel++) { + channel_info = &memory_info_hob->ChannelInfo[channel]; + printk(BIOS_DEBUG, " Channel %d\n", channel); + printk(BIOS_DEBUG, " 0x%02x: ChannelId\n", + channel_info->ChannelId); + printk(BIOS_DEBUG, " 0x%02x: DimmCount\n", + channel_info->DimmCount); + for (dimm = 0; dimm < channel_info->DimmCount; + dimm++) { + dimm_info = &channel_info->DimmInfo[dimm]; + printk(BIOS_DEBUG, " DIMM %d\n", dimm); + printk(BIOS_DEBUG, " 0x%02x: DimmId\n", + dimm_info->DimmId); + printk(BIOS_DEBUG, " %d: SizeInMb\n", + dimm_info->SizeInMb); + printk(BIOS_DEBUG, " 0x%04x: MfgId\n", + dimm_info->MfgId); + printk(BIOS_DEBUG, "%*.*s: ModulePartNum\n", + (int)sizeof(dimm_info->ModulePartNum), + (int)sizeof(dimm_info->ModulePartNum), + dimm_info->ModulePartNum); + } + } +} |