summaryrefslogtreecommitdiff
path: root/src/mainboard
diff options
context:
space:
mode:
authorAndrey Petrov <anpetrov@fb.com>2019-09-10 11:27:52 -0700
committerMartin Roth <martinroth@google.com>2019-09-21 20:36:26 +0000
commitb18946a557b43f77904287187534d496c4b165a2 (patch)
tree735198c35253aac4fa812cf84ebfaa9921eb5c7f /src/mainboard
parent91f955e31f0490933b32087bdd52840aa8cf0692 (diff)
downloadcoreboot-b18946a557b43f77904287187534d496c4b165a2.tar.xz
mb/ocp/monolake: Implement bank/locator scheme
Implement Locator and Bank fields (as reported by dmidecode) to match vendor BIOS. TEST=on OCP monolake, run dmidecode tool and see that "Locator" field matches expectation. Change-Id: Ia271ff1e596ba469cf42e23d8390401c27670a27 Signed-off-by: Andrey Petrov <anpetrov@fb.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/35319 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: David Hendricks <david.hendricks@gmail.com> Reviewed-by: Patrick Rudolph <siro@das-labor.org>
Diffstat (limited to 'src/mainboard')
-rw-r--r--src/mainboard/ocp/monolake/mainboard.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/mainboard/ocp/monolake/mainboard.c b/src/mainboard/ocp/monolake/mainboard.c
index 9755b06983..010e064c35 100644
--- a/src/mainboard/ocp/monolake/mainboard.c
+++ b/src/mainboard/ocp/monolake/mainboard.c
@@ -17,6 +17,8 @@
#include <device/device.h>
#include <pc80/mc146818rtc.h>
#include <cf9_reset.h>
+#include <smbios.h>
+#include <string.h>
#include "ipmi.h"
/*
@@ -39,3 +41,17 @@ static void mainboard_enable(struct device *dev)
struct chip_operations mainboard_ops = {
.enable_dev = mainboard_enable,
};
+
+void smbios_fill_dimm_locator(const struct dimm_info *dimm, struct smbios_type17 *t)
+{
+
+ char locator[64] = {0};
+
+ snprintf(locator, sizeof(locator), "DIMM_%c%u", 'A' + dimm->channel_num,
+ dimm->dimm_num);
+ t->device_locator = smbios_add_string(t->eos, locator);
+
+ snprintf(locator, sizeof(locator), "_Node0_Channel%d_Dimm%d", dimm->channel_num,
+ dimm->dimm_num);
+ t->bank_locator = smbios_add_string(t->eos, locator);
+}