Jonathan Zhang has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/68785 )
Change subject: drivers/ocp/dmi: set SMBIOS type 0 firmware revision ......................................................................
drivers/ocp/dmi: set SMBIOS type 0 firmware revision
Set smbios type 0 firmware revision. Refer to IPMI v2.0 SPEC, minor revision is defined as BCD encoded so update the format accordingly.
TESTED=Execute "dmidecode -t 0" to check corresponding field.
Signed-off-by: Tim Chu Tim.Chu@quantatw.com Signed-off-by: Jonzhang Zhang jonzhang@meta.com
Change-Id: I898662b78d3dbab1861cee6f1b6e148297a5d11b --- M src/drivers/ocp/dmi/smbios.c 1 file changed, 33 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/85/68785/1
diff --git a/src/drivers/ocp/dmi/smbios.c b/src/drivers/ocp/dmi/smbios.c index 51c008d..0ac3334 100644 --- a/src/drivers/ocp/dmi/smbios.c +++ b/src/drivers/ocp/dmi/smbios.c @@ -22,6 +22,21 @@ msr_t xeon_sp_ppin[2] = {0}; static bool remote_ppin_done = false;
+/* + * Update SMBIOS type 0 ec version. + * For OCP platforms, BMC version is used to represent ec version. + * Refer to IPMI v2.0 spec, minor revision is defined as BCD encoded, + * format it accordingly. + */ +void smbios_ec_revision(uint8_t *ec_major_revision, uint8_t *ec_minor_revision) +{ + uint8_t bmc_major_revision, bmc_minor_revision; + + ipmi_bmc_version(&bmc_major_revision, &bmc_minor_revision); + *ec_major_revision = bmc_major_revision & 0x7f; /* bit[6:0] Major Firmware Revision */ + *ec_minor_revision = ((bmc_minor_revision / 16) * 10) + (bmc_minor_revision % 16); +} + /* Override SMBIOS type 1 data. */ const char *smbios_system_manufacturer(void) {