summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/mainboard/ibm/sbp1/ramstage.c15
-rw-r--r--src/mainboard/ibm/sbp1/romstage.c13
2 files changed, 28 insertions, 0 deletions
diff --git a/src/mainboard/ibm/sbp1/ramstage.c b/src/mainboard/ibm/sbp1/ramstage.c
index 63481aa123..78db8c9fc8 100644
--- a/src/mainboard/ibm/sbp1/ramstage.c
+++ b/src/mainboard/ibm/sbp1/ramstage.c
@@ -11,6 +11,21 @@ void mainboard_silicon_init_params(FSPS_UPD *params)
gpio_configure_pads(gpio_table, ARRAY_SIZE(gpio_table));
}
+void smbios_fill_dimm_locator(const struct dimm_info *dimm, struct smbios_type17 *t)
+{
+ const u8 so = dimm->soc_num;
+ const u8 ch = dimm->channel_num;
+ const u8 mm = dimm->dimm_num;
+
+ char dev_loc[10] = { "\x00" };
+ snprintf(dev_loc, sizeof(dev_loc), "DIMM C%u%c%u", so, 'A' + ch, mm);
+ t->device_locator = smbios_add_string(t->eos, dev_loc);
+
+ char bnk_loc[10] = { "\x00" };
+ snprintf(bnk_loc, sizeof(bnk_loc), "BANK C%u%c%u", so, 'A' + ch, mm);
+ t->bank_locator = smbios_add_string(t->eos, bnk_loc);
+}
+
static void finalize_boot(void *unused)
{
printk(BIOS_DEBUG, "FM_BIOS_POST_CMPLT_N cleared.\n");
diff --git a/src/mainboard/ibm/sbp1/romstage.c b/src/mainboard/ibm/sbp1/romstage.c
index afb1cf5a19..5e29e3c5f0 100644
--- a/src/mainboard/ibm/sbp1/romstage.c
+++ b/src/mainboard/ibm/sbp1/romstage.c
@@ -2,6 +2,7 @@
#include <console/console.h>
#include <soc/romstage.h>
+#include <soc/ddr.h>
#include <defs_cxl.h>
#include <hob_iiouds.h>
@@ -347,3 +348,15 @@ void mainboard_memory_init_params(FSPM_UPD *mupd)
sktbmp[3] = BIT(1) | BIT(4);
mainboard_config_iio(mupd);
}
+
+bool mainboard_dimm_slot_exists(uint8_t socket, uint8_t channel, uint8_t dimm)
+{
+ if (socket >= CONFIG_MAX_SOCKET)
+ return false;
+ if (channel >= 8)
+ return false;
+ if (dimm >= 2)
+ return false;
+
+ return true;
+}