Sean Rhodes | 5da05b6 | 2022-01-10 21:58:04 +0000 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0-only */ |
| 2 | |
| 3 | #include <console/console.h> |
| 4 | #include <device/device.h> |
| 5 | #include <device/pci_def.h> |
| 6 | #include <ec/starlabs/merlin/ec.h> |
Sean Rhodes | 5da05b6 | 2022-01-10 21:58:04 +0000 | [diff] [blame] | 7 | #include <smbios.h> |
| 8 | #include <types.h> |
| 9 | #include <uuid.h> |
| 10 | #include <variants.h> |
| 11 | |
| 12 | const char *smbios_mainboard_bios_version(void) |
| 13 | { |
| 14 | return "8"; |
| 15 | } |
| 16 | |
| 17 | /* Get the Embedded Controller firmware version */ |
| 18 | void smbios_ec_revision(uint8_t *ec_major_revision, uint8_t *ec_minor_revision) |
| 19 | { |
| 20 | u16 ec_version = it_get_version(); |
| 21 | |
| 22 | *ec_major_revision = ec_version >> 8; |
| 23 | *ec_minor_revision = ec_version & 0xff; |
| 24 | } |
| 25 | |
| 26 | const char *smbios_system_sku(void) |
| 27 | { |
| 28 | return CONFIG_MAINBOARD_FAMILY; |
| 29 | } |
| 30 | |
| 31 | u8 smbios_mainboard_feature_flags(void) |
| 32 | { |
| 33 | return SMBIOS_FEATURE_FLAGS_HOSTING_BOARD | SMBIOS_FEATURE_FLAGS_REPLACEABLE; |
| 34 | } |
| 35 | |
| 36 | const char *smbios_chassis_version(void) |
| 37 | { |
| 38 | return smbios_mainboard_version(); |
| 39 | } |
| 40 | |
| 41 | const char *smbios_chassis_serial_number(void) |
| 42 | { |
| 43 | return smbios_mainboard_serial_number(); |
| 44 | } |