Johnny Lin has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/49893 )
Change subject: xeon_sp/cpx: Add weak functions for mainboard to override meminfo ......................................................................
xeon_sp/cpx: Add weak functions for mainboard to override meminfo
mainboard can override the functions for its maximum memory capacity and maximum number Of devices which will be used during SMBIOS type 16 creation.
Change-Id: Id8f92dc96a7a3eb2e6db330adda98a7fe6d516c8 Signed-off-by: Johnny Lin johnny_lin@wiwynn.com --- M src/soc/intel/xeon_sp/cpx/romstage.c M src/soc/intel/xeon_sp/include/soc/romstage.h 2 files changed, 8 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/93/49893/1
diff --git a/src/soc/intel/xeon_sp/cpx/romstage.c b/src/soc/intel/xeon_sp/cpx/romstage.c index e423d0a..4e47c2c 100644 --- a/src/soc/intel/xeon_sp/cpx/romstage.c +++ b/src/soc/intel/xeon_sp/cpx/romstage.c @@ -21,6 +21,10 @@ /* Default weak implementation */ }
+uint32_t __weak mainboard_memory_max_capacity_mib(void) { return 0; } + +uint16_t __weak mainboard_memory_max_number_of_devices(void) { return 0; } + static const struct SystemMemoryMapHob *get_system_memory_map(void) { size_t hob_size; @@ -60,6 +64,8 @@ return; } memset(mem_info, 0, sizeof(*mem_info)); + mem_info->max_capacity_mib = mainboard_memory_max_capacity_mib(); + mem_info->number_of_devices = mainboard_memory_max_number_of_devices(); dimm_max = ARRAY_SIZE(mem_info->dimm); vdd_voltage = get_ddr_voltage(hob->DdrVoltage); /* For now only implement for one socket and hard-coded for DDR4 */ diff --git a/src/soc/intel/xeon_sp/include/soc/romstage.h b/src/soc/intel/xeon_sp/include/soc/romstage.h index 90689af..f28aca7 100644 --- a/src/soc/intel/xeon_sp/include/soc/romstage.h +++ b/src/soc/intel/xeon_sp/include/soc/romstage.h @@ -9,4 +9,6 @@ void mainboard_memory_init_params(FSPM_UPD * mupd); void mainboard_rtc_failed(void); void save_dimm_info(void); +uint32_t mainboard_memory_max_capacity_mib(void); +uint16_t mainboard_memory_max_number_of_devices(void); #endif /* _SOC_ROMSTAGE_H_ */