Subrata Banik has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/70228 )
Change subject: mb/google/rex: Add probed fw_configs to SMBIOS OEM strings ......................................................................
mb/google/rex: Add probed fw_configs to SMBIOS OEM strings
Enable this feature, and it can use the probe statement in devicetree to cache of fw_config field as oem string.
TEST=With CBI FW_CONFIG field set to 0x1561
localhost ~ # dmidecode -t 11 Getting SMBIOS data from sysfs. SMBIOS 3.0 present.
Handle 0x0009, DMI type 11, 5 bytes OEM Strings String 1: AUDIO-MAX98357_ALC5682I_I2S String 2: CELLULAR-CELLULAR_PCIE String 3: UFC-UFC_MIPI String 4: WFC-WFC_MIPI String 5: DB_SD-SD_GL9755S
Change-Id: I6cb35eb9c0fbe32764ca76bb7a929cc92fc38404 Signed-off-by: Subrata Banik subratabanik@google.com --- M src/mainboard/google/rex/mainboard.c 1 file changed, 40 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/28/70228/1
diff --git a/src/mainboard/google/rex/mainboard.c b/src/mainboard/google/rex/mainboard.c index 008b3ef..f61af2c 100644 --- a/src/mainboard/google/rex/mainboard.c +++ b/src/mainboard/google/rex/mainboard.c @@ -6,6 +6,7 @@ #include <baseboard/variants.h> #include <device/device.h> #include <ec/ec.h> +#include <fw_config.h> #include <vendorcode/google/chromeos/chromeos.h>
static void mainboard_init(void *chip_info) @@ -55,9 +56,20 @@ acpigen_write_scope_end(); /* Scope */ }
+static void add_fw_config_oem_string(const struct fw_config *config, void *arg) +{ + struct smbios_type11 *t; + char buffer[64]; + + t = (struct smbios_type11 *)arg; + + snprintf(buffer, sizeof(buffer), "%s-%s", config->field_name, config->option_name); + t->count = smbios_add_string(t->eos, buffer); +} + static void mainboard_smbios_strings(struct device *dev, struct smbios_type11 *t) { - /* TODO: Add mainboard-smbios entries */ + fw_config_for_each_found(add_fw_config_oem_string, t); }
static void mainboard_dev_init(struct device *dev)