summaryrefslogtreecommitdiff
path: root/src/mainboard/starlabs/byte_adl/smbios.c
diff options
context:
space:
mode:
authorSean Rhodes <sean@starlabs.systems>2024-02-22 20:07:54 +0000
committerFelix Held <felix-coreboot@felixheld.de>2024-09-06 13:54:14 +0000
commit30394db47564a231f775fa9c06796f4b18ee1203 (patch)
tree6d18ea76574b6c3519493754cba5a59fd627b27c /src/mainboard/starlabs/byte_adl/smbios.c
parent216d8e19658881bce23014fc682185665c6e83e6 (diff)
mb/starlabs/byte_adl: Add Alder Lake N Byte Mk II
Tested using `edk2` from `github.com/starlabsltd/edk2/tree/uefipayload_vs`: * Windows 11 * Ubuntu 22.04 * Manjaro 22 No known issues. https://starlabs.systems/pages/byte-specification Signed-off-by: Sean Rhodes <sean@starlabs.systems> Change-Id: Idff2d883a8c29f0fee9d633708aac92061a45132 Reviewed-on: https://review.coreboot.org/c/coreboot/+/80705 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
Diffstat (limited to 'src/mainboard/starlabs/byte_adl/smbios.c')
-rw-r--r--src/mainboard/starlabs/byte_adl/smbios.c39
1 files changed, 39 insertions, 0 deletions
diff --git a/src/mainboard/starlabs/byte_adl/smbios.c b/src/mainboard/starlabs/byte_adl/smbios.c
new file mode 100644
index 0000000000..ab2c211a99
--- /dev/null
+++ b/src/mainboard/starlabs/byte_adl/smbios.c
@@ -0,0 +1,39 @@
+/* SPDX-License-Identifier: GPL-2.0-only */
+
+#include <chip.h>
+#include <device/device.h>
+#include <device/pci_def.h>
+#include <ec/starlabs/merlin/ec.h>
+#include <smbios.h>
+#include <types.h>
+#include <uuid.h>
+#include <variants.h>
+
+/* Get the Embedded Controller firmware version */
+void smbios_ec_revision(uint8_t *ec_major_revision, uint8_t *ec_minor_revision)
+{
+ u16 ec_version = ec_get_version();
+
+ *ec_major_revision = ec_version >> 8;
+ *ec_minor_revision = ec_version & 0xff;
+}
+
+const char *smbios_system_sku(void)
+{
+ return CONFIG_MAINBOARD_FAMILY;
+}
+
+u8 smbios_mainboard_feature_flags(void)
+{
+ return SMBIOS_FEATURE_FLAGS_HOSTING_BOARD | SMBIOS_FEATURE_FLAGS_REPLACEABLE;
+}
+
+const char *smbios_chassis_version(void)
+{
+ return smbios_mainboard_version();
+}
+
+const char *smbios_chassis_serial_number(void)
+{
+ return smbios_mainboard_serial_number();
+}