aboutsummaryrefslogtreecommitdiff
path: root/src/drivers/ocp/dmi/ocp_dmi.h
diff options
context:
space:
mode:
authorJohnny Lin <johnny_lin@wiwynn.com>2020-04-10 18:28:33 +0800
committerPhilipp Deppenwiese <zaolin.daisuki@gmail.com>2020-07-04 11:31:16 +0000
commitad0ccb336d0184c7e4bd8157483bc80a5dfd5ab4 (patch)
treed77f608549c5fbc0a1c2e5530a14534c2f53e96d /src/drivers/ocp/dmi/ocp_dmi.h
parent29f61a2110a04b3e21f374d9ad5a853146f74485 (diff)
drivers/ocp/dmi: Add OCP_DMI driver for populating SMBIOS from IPMI FRU data
It implements the SMBIOS IPMI FRU mapping table defined in https://www.opencompute.org/documents/facebook-xeon-motherboard-v31 22.3 SMBIOS FRU mapping table. Mainboard needs to configure the correct values for FRU_DEVICE_ID and BMC_KCS_BASE. For type 11 string 1 to 6 are common and implemented in this driver, the rest are project dependent and can be added in the mainboard code. Tested on OCP Tioga Pass. Change-Id: I08c958dfad83216cd12545760a19d205efc2515b Signed-off-by: Johnny Lin <johnny_lin@wiwynn.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/40308 Reviewed-by: Philipp Deppenwiese <zaolin.daisuki@gmail.com> Reviewed-by: Jonathan Zhang <jonzhang@fb.com> Reviewed-by: Christian Walter <christian.walter@9elements.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/drivers/ocp/dmi/ocp_dmi.h')
-rw-r--r--src/drivers/ocp/dmi/ocp_dmi.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/drivers/ocp/dmi/ocp_dmi.h b/src/drivers/ocp/dmi/ocp_dmi.h
new file mode 100644
index 0000000000..ef0c740c98
--- /dev/null
+++ b/src/drivers/ocp/dmi/ocp_dmi.h
@@ -0,0 +1,20 @@
+/* SPDX-License-Identifier: GPL-2.0-or-later */
+
+#ifndef __OCP_DMI_H
+#define __OCP_DMI_H
+
+#include <cpu/x86/msr.h>
+#include <device/device.h>
+#include <smbios.h>
+
+#define TBF "To Be Filled By O.E.M."
+
+extern msr_t xeon_sp_ppin[];
+
+/* Override SMBIOS type 11 OEM string 1 to string 6 */
+void ocp_oem_smbios_strings(struct device *dev, struct smbios_type11 *t);
+
+/* This function allows adding the same repeated string to the table */
+int smbios_add_oem_string(u8 *start, const char *str);
+
+#endif