Tim Chu has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/46071 )
Change subject: mb/ocp/deltalake: Use BMC version to represent ec version ......................................................................
mb/ocp/deltalake: Use BMC version to represent ec version
In deltalake, there's no embedded controller and BMC version is used to represent ec version.
TEST=Build with CB:45138 and CB:46070 Execute "dmidecode -t 0" to check if the firmware version is correct
Signed-off-by: Tim Chu Tim.Chu@quantatw.com Change-Id: I388efd749170f0ebbb4dd4d32199675d92cc018e --- M src/mainboard/ocp/deltalake/ramstage.c 1 file changed, 13 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/71/46071/1
diff --git a/src/mainboard/ocp/deltalake/ramstage.c b/src/mainboard/ocp/deltalake/ramstage.c index e00f1c3..625634c 100644 --- a/src/mainboard/ocp/deltalake/ramstage.c +++ b/src/mainboard/ocp/deltalake/ramstage.c @@ -26,6 +26,19 @@ extern struct fru_info_str fru_strings; static char slot_id_str[SLOT_ID_LEN];
+/* + * Update SMBIOS type 0 ec version. + * In deltalake, BMC version is used to represent ec version. + */ +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 2 Location In Chassis from BMC */ const char *smbios_mainboard_location_in_chassis(void) {
Jonathan Zhang has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/46071 )
Change subject: mb/ocp/deltalake: Use BMC version to represent ec version ......................................................................
Patch Set 1: Code-Review+1
(1 comment)
https://review.coreboot.org/c/coreboot/+/46071/1/src/mainboard/ocp/deltalake... File src/mainboard/ocp/deltalake/ramstage.c:
https://review.coreboot.org/c/coreboot/+/46071/1/src/mainboard/ocp/deltalake... PS1, Line 31: * In deltalake, BMC version is used to represent ec version. Please add a comment that with current versions of OpenBMC, how major/minor versions are represented.
Hello build bot (Jenkins), Jonathan Zhang,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/46071
to look at the new patch set (#2).
Change subject: mb/ocp/deltalake: Use BMC version to represent ec version ......................................................................
mb/ocp/deltalake: Use BMC version to represent ec version
In deltalake, there's no embedded controller and BMC version is used to represent ec version.
TEST=Build with CB:45138 and CB:46070 Execute "dmidecode -t 0" to check if the firmware version is correct
Signed-off-by: Tim Chu Tim.Chu@quantatw.com Change-Id: I388efd749170f0ebbb4dd4d32199675d92cc018e --- M src/mainboard/ocp/deltalake/ramstage.c 1 file changed, 15 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/71/46071/2
build bot (Jenkins) has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/46071 )
Change subject: mb/ocp/deltalake: Use BMC version to represent ec version ......................................................................
Patch Set 2:
(1 comment)
https://review.coreboot.org/c/coreboot/+/46071/2/src/mainboard/ocp/deltalake... File src/mainboard/ocp/deltalake/ramstage.c:
https://review.coreboot.org/c/coreboot/+/46071/2/src/mainboard/ocp/deltalake... PS2, Line 32: * In current version of OpenBMC, it follows IPMI v2.0 to define minor revision as BCD trailing whitespace
Hello build bot (Jenkins), Jonathan Zhang,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/46071
to look at the new patch set (#3).
Change subject: mb/ocp/deltalake: Use BMC version to represent ec version ......................................................................
mb/ocp/deltalake: Use BMC version to represent ec version
In deltalake, there's no embedded controller and BMC version is used to represent ec version.
TEST=Build with CB:45138 and CB:46070 Execute "dmidecode -t 0" to check if the firmware version is correct
Signed-off-by: Tim Chu Tim.Chu@quantatw.com Change-Id: I388efd749170f0ebbb4dd4d32199675d92cc018e --- M src/mainboard/ocp/deltalake/ramstage.c 1 file changed, 15 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/71/46071/3
Tim Chu has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/46071 )
Change subject: mb/ocp/deltalake: Use BMC version to represent ec version ......................................................................
Patch Set 3:
(1 comment)
https://review.coreboot.org/c/coreboot/+/46071/1/src/mainboard/ocp/deltalake... File src/mainboard/ocp/deltalake/ramstage.c:
https://review.coreboot.org/c/coreboot/+/46071/1/src/mainboard/ocp/deltalake... PS1, Line 31: * In deltalake, BMC version is used to represent ec version.
Please add a comment that with current versions of OpenBMC, how major/minor versions are represented […]
Done
Jonathan Zhang has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/46071 )
Change subject: mb/ocp/deltalake: Use BMC version to represent ec version ......................................................................
Patch Set 3: Code-Review+1
Arthur Heymans has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/46071 )
Change subject: mb/ocp/deltalake: Use BMC version to represent ec version ......................................................................
Patch Set 3: Code-Review+2
Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/46071 )
Change subject: mb/ocp/deltalake: Use BMC version to represent ec version ......................................................................
Patch Set 3: Code-Review+2
I guess a BMC can also be considered an embedded controller
Patrick Georgi has submitted this change. ( https://review.coreboot.org/c/coreboot/+/46071 )
Change subject: mb/ocp/deltalake: Use BMC version to represent ec version ......................................................................
mb/ocp/deltalake: Use BMC version to represent ec version
In deltalake, there's no embedded controller and BMC version is used to represent ec version.
TEST=Build with CB:45138 and CB:46070 Execute "dmidecode -t 0" to check if the firmware version is correct
Signed-off-by: Tim Chu Tim.Chu@quantatw.com Change-Id: I388efd749170f0ebbb4dd4d32199675d92cc018e Reviewed-on: https://review.coreboot.org/c/coreboot/+/46071 Tested-by: build bot (Jenkins) no-reply@coreboot.org Reviewed-by: Jonathan Zhang jonzhang@fb.com Reviewed-by: Arthur Heymans arthur@aheymans.xyz Reviewed-by: Angel Pons th3fanbus@gmail.com --- M src/mainboard/ocp/deltalake/ramstage.c 1 file changed, 15 insertions(+), 0 deletions(-)
Approvals: build bot (Jenkins): Verified Arthur Heymans: Looks good to me, approved Angel Pons: Looks good to me, approved Jonathan Zhang: Looks good to me, but someone else must approve
diff --git a/src/mainboard/ocp/deltalake/ramstage.c b/src/mainboard/ocp/deltalake/ramstage.c index 74a4468..9d57090 100644 --- a/src/mainboard/ocp/deltalake/ramstage.c +++ b/src/mainboard/ocp/deltalake/ramstage.c @@ -26,6 +26,21 @@ extern struct fru_info_str fru_strings; static char slot_id_str[SLOT_ID_LEN];
+/* + * Update SMBIOS type 0 ec version. + * In deltalake, BMC version is used to represent ec version. + * In current version of OpenBMC, it follows IPMI v2.0 to define minor revision as BCD + * encoded, so the format of it must be transferred before send to SMBIOS. + */ +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 2 Location In Chassis from BMC */ const char *smbios_mainboard_location_in_chassis(void) {