aboutsummaryrefslogtreecommitdiff
path: root/src/soc/intel/apollolake/meminit_util_apl.c
diff options
context:
space:
mode:
authorSubrata Banik <subrata.banik@intel.com>2018-02-08 16:50:21 +0530
committerSubrata Banik <subrata.banik@intel.com>2018-02-09 06:03:00 +0000
commit6ee716e863117246d453e573d1a128da28b62cb7 (patch)
treeda6cf68363b8be6053f5f586e3089ff80b6b5b24 /src/soc/intel/apollolake/meminit_util_apl.c
parent93fde11aefe108fd8f619239fb17f056bea3a778 (diff)
drivers/intel/fsp2_0: Remove fsp_find_smbios_memory_info() from FSP2.0 driver
As per FSP 2.0 specification and FSP SOC integration guide, its not expected that SMBIOS Memory Information GUID will be same for all platform. Hence fsp_find_smbios_memory_info() function inside common/driver code is not generic one. Removing this function and making use of fsp_find_extension_hob_by_guid() to find SMBIOS Memory Info GUID from platform code as needed. Change-Id: Ifd5abcd3e0733cedf61fa3dda7230cf3da6b14ce Signed-off-by: Subrata Banik <subrata.banik@intel.com> Reviewed-on: https://review.coreboot.org/23650 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Furquan Shaikh <furquan@google.com> Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Diffstat (limited to 'src/soc/intel/apollolake/meminit_util_apl.c')
-rw-r--r--src/soc/intel/apollolake/meminit_util_apl.c18
1 files changed, 17 insertions, 1 deletions
diff --git a/src/soc/intel/apollolake/meminit_util_apl.c b/src/soc/intel/apollolake/meminit_util_apl.c
index b79abb0f69..f09f45beb8 100644
--- a/src/soc/intel/apollolake/meminit_util_apl.c
+++ b/src/soc/intel/apollolake/meminit_util_apl.c
@@ -21,6 +21,12 @@
#include <soc/meminit.h>
#include <string.h>
+#define FSP_SMBIOS_MEMORY_INFO_GUID \
+{ \
+ 0x8c, 0x10, 0xa1, 0x01, 0xee, 0x9d, 0x84, 0x49, \
+ 0x88, 0xc3, 0xee, 0xe8, 0xc4, 0x9e, 0xfb, 0x89 \
+}
+
void save_lpddr4_dimm_info(const struct lpddr4_cfg *lp4cfg, size_t mem_sku)
{
int channel, dimm, dimm_max, index;
@@ -30,6 +36,8 @@ void save_lpddr4_dimm_info(const struct lpddr4_cfg *lp4cfg, size_t mem_sku)
struct memory_info *mem_info;
const CHANNEL_INFO *channel_info;
const FSP_SMBIOS_MEMORY_INFO *memory_info_hob;
+ const uint8_t smbios_memory_info_guid[16] =
+ FSP_SMBIOS_MEMORY_INFO_GUID;
if (mem_sku >= lp4cfg->num_skus) {
printk(BIOS_ERR, "Too few LPDDR4 SKUs: 0x%zx/0x%zx\n",
@@ -37,7 +45,15 @@ void save_lpddr4_dimm_info(const struct lpddr4_cfg *lp4cfg, size_t mem_sku)
return;
}
- memory_info_hob = fsp_find_smbios_memory_info(&hob_size);
+ /* Locate the memory info HOB */
+ memory_info_hob = fsp_find_extension_hob_by_guid(
+ smbios_memory_info_guid,
+ &hob_size);
+
+ if (memory_info_hob == NULL || hob_size == 0) {
+ printk(BIOS_ERR, "SMBIOS memory info HOB is missing\n");
+ return;
+ }
/*
* Allocate CBMEM area for DIMM information used to populate SMBIOS