summaryrefslogtreecommitdiff
path: root/src/mainboard/prodrive/atlas/mainboard.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mainboard/prodrive/atlas/mainboard.c')
-rw-r--r--src/mainboard/prodrive/atlas/mainboard.c28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/mainboard/prodrive/atlas/mainboard.c b/src/mainboard/prodrive/atlas/mainboard.c
index 59c7cb7c3b..227e30a3c4 100644
--- a/src/mainboard/prodrive/atlas/mainboard.c
+++ b/src/mainboard/prodrive/atlas/mainboard.c
@@ -5,9 +5,37 @@
#include <stdint.h>
#include <gpio.h>
#include <arch/io.h>
+#include <string.h>
+#include <smbios.h>
#include "gpio.h"
+void smbios_fill_dimm_locator(const struct dimm_info *dimm, struct smbios_type17 *t)
+{
+ const u8 mc = dimm->ctrlr_num;
+ const u8 ch = dimm->channel_num;
+ const u8 mm = dimm->dimm_num;
+
+ char dev_loc[40] = { "\x00" };
+ snprintf(dev_loc, sizeof(dev_loc), "SO-DIMM %c%u", 'A' + mc, mm);
+ t->device_locator = smbios_add_string(t->eos, dev_loc);
+
+ char bnk_loc[40] = { "\x00" };
+ snprintf(bnk_loc, sizeof(bnk_loc), "BANK-%u-%u-%u", mc, ch, mm);
+ t->bank_locator = smbios_add_string(t->eos, bnk_loc);
+}
+
+void smbios_fill_dimm_asset_tag(const struct dimm_info *dimm, struct smbios_type17 *t)
+{
+ const u8 mc = dimm->ctrlr_num;
+ const u8 ch = dimm->channel_num;
+ const u8 mm = dimm->dimm_num;
+
+ char tag[40] = { "\x00" };
+ snprintf(tag, sizeof(tag), "MC-%u-CH-%u-DIMM-%u", mc, ch, mm);
+ t->asset_tag = smbios_add_string(t->eos, tag);
+}
+
static uint8_t get_hsid(void)
{
const gpio_t hsid_gpios[] = {