Tim Chu has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/45138 )
Change subject: arch/x86/smbios: Update SMBIOS type 0 ec version ......................................................................
arch/x86/smbios: Update SMBIOS type 0 ec version
Get embedded controller firmware version and update to SMBIOS type 0. Here BMC version is used to represent ec version.
TEST=Execute "dmidecode -t 0" to check if the ec version is correct
Signed-off-by: Tim Chu Tim.Chu@quantatw.com Change-Id: Ibd5ee27a1b8fa4e5bc66e359d3b62e052e19e8a2 --- M src/arch/x86/smbios.c M src/arch/x86/smbios_defaults.c M src/drivers/ipmi/ipmi_kcs_ops.c M src/include/smbios.h 4 files changed, 26 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/38/45138/1
diff --git a/src/arch/x86/smbios.c b/src/arch/x86/smbios.c index 6c92d03..4a3a2e1 100644 --- a/src/arch/x86/smbios.c +++ b/src/arch/x86/smbios.c @@ -396,6 +396,7 @@ { struct smbios_type0 *t = (struct smbios_type0 *)*current; int len = sizeof(struct smbios_type0); + u8 ipmi_bmc_major_revision, ipmi_bmc_minor_revision;
memset(t, 0, sizeof(struct smbios_type0)); t->type = SMBIOS_BIOS_INFORMATION; @@ -424,6 +425,10 @@ t->system_bios_major_release = coreboot_major_revision; t->system_bios_minor_release = coreboot_minor_revision;
+ smbios_ec_revision(&ipmi_bmc_major_revision, &ipmi_bmc_minor_revision); + t->ec_major_release = ipmi_bmc_major_revision; + t->ec_minor_release = ipmi_bmc_minor_revision; + t->bios_characteristics = BIOS_CHARACTERISTICS_PCI_SUPPORTED | BIOS_CHARACTERISTICS_SELECTABLE_BOOT | diff --git a/src/arch/x86/smbios_defaults.c b/src/arch/x86/smbios_defaults.c index 22ce7a5..9ff645c 100644 --- a/src/arch/x86/smbios_defaults.c +++ b/src/arch/x86/smbios_defaults.c @@ -63,6 +63,12 @@ return SMBIOS_BOARD_TYPE_UNKNOWN; }
+__weak void smbios_ec_revision(uint8_t *ipmi_bmc_major_revision, uint8_t *ipmi_bmc_minor_revision) +{ + *ipmi_bmc_major_revision = 0x0; + *ipmi_bmc_minor_revision = 0x0; +} + /* * System Enclosure or Chassis Types as defined in SMBIOS specification. * The default value is SMBIOS_ENCLOSURE_DESKTOP (0x03) but laptop, diff --git a/src/drivers/ipmi/ipmi_kcs_ops.c b/src/drivers/ipmi/ipmi_kcs_ops.c index 7fa28e3..aa07aa9 100644 --- a/src/drivers/ipmi/ipmi_kcs_ops.c +++ b/src/drivers/ipmi/ipmi_kcs_ops.c @@ -28,6 +28,9 @@ static u8 ipmi_revision_major = 0x1; static u8 ipmi_revision_minor = 0x0;
+static u8 bmc_revision_major = 0x0; +static u8 bmc_revision_minor = 0x0; + static int ipmi_get_device_id(struct device *dev, struct ipmi_devid_rsp *rsp) { int ret; @@ -144,6 +147,9 @@ ipmi_revision_minor = IPMI_IPMI_VERSION_MINOR(rsp.ipmi_version); ipmi_revision_major = IPMI_IPMI_VERSION_MAJOR(rsp.ipmi_version);
+ bmc_revision_major = rsp.fw_rev1; + bmc_revision_minor = rsp.fw_rev2; + memcpy(&man_id, rsp.manufacturer_id, sizeof(rsp.manufacturer_id));
@@ -272,6 +278,12 @@ } #endif
+void smbios_ec_revision(uint8_t *ipmi_bmc_major_revision, uint8_t *ipmi_bmc_minor_revision) +{ + *ipmi_bmc_major_revision = ((bmc_revision_major / 16) * 10) + (bmc_revision_major % 16); + *ipmi_bmc_minor_revision = ((bmc_revision_minor / 16) * 10) + (bmc_revision_minor % 16); +} + #if CONFIG(GENERATE_SMBIOS_TABLES) static int ipmi_smbios_data(struct device *dev, int *handle, unsigned long *current) diff --git a/src/include/smbios.h b/src/include/smbios.h index 521339e..fdc6b10 100644 --- a/src/include/smbios.h +++ b/src/include/smbios.h @@ -54,6 +54,9 @@ const char *smbios_chassis_serial_number(void); const char *smbios_processor_serial_number(void);
+void smbios_ec_revision(uint8_t *ipmi_bmc_major_revision, + uint8_t *ipmi_bmc_minor_revision); + unsigned int smbios_processor_external_clock(void); unsigned int smbios_processor_characteristics(void); struct cpuid_result;
build bot (Jenkins) has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/45138 )
Change subject: arch/x86/smbios: Update SMBIOS type 0 ec version ......................................................................
Patch Set 1:
(1 comment)
https://review.coreboot.org/c/coreboot/+/45138/1/src/arch/x86/smbios_default... File src/arch/x86/smbios_defaults.c:
https://review.coreboot.org/c/coreboot/+/45138/1/src/arch/x86/smbios_default... PS1, Line 66: __weak void smbios_ec_revision(uint8_t *ipmi_bmc_major_revision, uint8_t *ipmi_bmc_minor_revision) line over 96 characters
Hello Jonathan Zhang, Ryback Hung, Philipp Deppenwiese, Christian Walter, Angel Pons, Bryant Ou, Patrick Rudolph,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/45138
to look at the new patch set (#2).
Change subject: arch/x86/smbios: Update SMBIOS type 0 ec version ......................................................................
arch/x86/smbios: Update SMBIOS type 0 ec version
Get embedded controller firmware version and update to SMBIOS type 0. Here BMC version is used to represent ec version.
TEST=Execute "dmidecode -t 0" to check if the ec version is correct
Signed-off-by: Tim Chu Tim.Chu@quantatw.com Change-Id: Ibd5ee27a1b8fa4e5bc66e359d3b62e052e19e8a2 --- M src/arch/x86/smbios.c M src/arch/x86/smbios_defaults.c M src/drivers/ipmi/ipmi_kcs_ops.c M src/include/smbios.h 4 files changed, 27 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/38/45138/2
Tim Chu has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/45138 )
Change subject: arch/x86/smbios: Update SMBIOS type 0 ec version ......................................................................
Patch Set 2:
Not sure it is ok to use BMC version directly?
Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/45138 )
Change subject: arch/x86/smbios: Update SMBIOS type 0 ec version ......................................................................
Patch Set 2:
(3 comments)
Patch Set 2:
Not sure it is ok to use BMC version directly?
I've no idea if it's correct to use the BMC version here. If SMBIOS says this is for the Embedded Controller, then we shouldn't write the BMC information
https://review.coreboot.org/c/coreboot/+/45138/2/src/arch/x86/smbios.c File src/arch/x86/smbios.c:
https://review.coreboot.org/c/coreboot/+/45138/2/src/arch/x86/smbios.c@428 PS2, Line 428: smbios_ec_revision(&ipmi_bmc_major_revision, &ipmi_bmc_minor_revision); : t->ec_major_release = ipmi_bmc_major_revision; : t->ec_minor_release = ipmi_bmc_minor_revision; If SMBIOS says this is EC, why use `ipmi_bmc` here?
Also, you should be able to eliminate the local variables:
smbios_ec_revision(&t->ec_major_release, &t->ec_minor_release);
https://review.coreboot.org/c/coreboot/+/45138/2/src/arch/x86/smbios_default... File src/arch/x86/smbios_defaults.c:
https://review.coreboot.org/c/coreboot/+/45138/2/src/arch/x86/smbios_default... PS2, Line 66: __weak void smbios_ec_revision(uint8_t *ipmi_bmc_major_revision, : uint8_t *ipmi_bmc_minor_revision) the parameter names should be `ec_major_release` and `ec_minor_release`
https://review.coreboot.org/c/coreboot/+/45138/2/src/drivers/ipmi/ipmi_kcs_o... File src/drivers/ipmi/ipmi_kcs_ops.c:
https://review.coreboot.org/c/coreboot/+/45138/2/src/drivers/ipmi/ipmi_kcs_o... PS2, Line 283: ((bmc_revision_major / 16) * 10) + (bmc_revision_major % 16) Huh? What is this math needed for?
Hello build bot (Jenkins), Jonathan Zhang, Ryback Hung, Philipp Deppenwiese, Christian Walter, Angel Pons, Bryant Ou, Patrick Rudolph,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/45138
to look at the new patch set (#3).
Change subject: arch/x86/smbios: Update SMBIOS type 0 ec version ......................................................................
arch/x86/smbios: Update SMBIOS type 0 ec version
Get embedded controller firmware version and update to SMBIOS type 0. In deltalake, BMC version is used to represent ec version.
TEST=Execute "dmidecode -t 0" to check if the ec version is correct
Signed-off-by: Tim Chu Tim.Chu@quantatw.com Change-Id: Ibd5ee27a1b8fa4e5bc66e359d3b62e052e19e8a2 --- M src/arch/x86/smbios.c M src/arch/x86/smbios_defaults.c M src/drivers/ipmi/ipmi_kcs.h M src/drivers/ipmi/ipmi_kcs_ops.c M src/include/smbios.h M src/mainboard/ocp/deltalake/ramstage.c 6 files changed, 34 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/38/45138/3
build bot (Jenkins) has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/45138 )
Change subject: arch/x86/smbios: Update SMBIOS type 0 ec version ......................................................................
Patch Set 3:
(1 comment)
https://review.coreboot.org/c/coreboot/+/45138/3/src/mainboard/ocp/deltalake... File src/mainboard/ocp/deltalake/ramstage.c:
https://review.coreboot.org/c/coreboot/+/45138/3/src/mainboard/ocp/deltalake... PS3, Line 26: /* Update SMBIOS type 0 ec version. In deltalake, BMC version is used to represent ec version. */ line over 96 characters
Hello build bot (Jenkins), Jonathan Zhang, Ryback Hung, Philipp Deppenwiese, Christian Walter, Angel Pons, Bryant Ou, Patrick Rudolph,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/45138
to look at the new patch set (#4).
Change subject: arch/x86/smbios: Update SMBIOS type 0 ec version ......................................................................
arch/x86/smbios: Update SMBIOS type 0 ec version
Get embedded controller firmware version and update to SMBIOS type 0. In deltalake, BMC version is used to represent ec version.
TEST=Execute "dmidecode -t 0" to check if the ec version is correct
Signed-off-by: Tim Chu Tim.Chu@quantatw.com Change-Id: Ibd5ee27a1b8fa4e5bc66e359d3b62e052e19e8a2 --- M src/arch/x86/smbios.c M src/arch/x86/smbios_defaults.c M src/drivers/ipmi/ipmi_kcs.h M src/drivers/ipmi/ipmi_kcs_ops.c M src/include/smbios.h M src/mainboard/ocp/deltalake/ramstage.c 6 files changed, 37 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/38/45138/4
Tim Chu has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/45138 )
Change subject: arch/x86/smbios: Update SMBIOS type 0 ec version ......................................................................
Patch Set 4:
(4 comments)
Patch Set 2:
(3 comments)
Patch Set 2:
Not sure it is ok to use BMC version directly?
I've no idea if it's correct to use the BMC version here. If SMBIOS says this is for the Embedded Controller, then we shouldn't write the BMC information
In YV3, there's no EC. BMC is used to represent EC in YV3, so I think maybe it is fine to use BMC version here. If it's not suitable I'll remove it.
https://review.coreboot.org/c/coreboot/+/45138/2/src/arch/x86/smbios.c File src/arch/x86/smbios.c:
https://review.coreboot.org/c/coreboot/+/45138/2/src/arch/x86/smbios.c@428 PS2, Line 428: smbios_ec_revision(&ipmi_bmc_major_revision, &ipmi_bmc_minor_revision); : t->ec_major_release = ipmi_bmc_major_revision; : t->ec_minor_release = ipmi_bmc_minor_revision;
If SMBIOS says this is EC, why use `ipmi_bmc` here? […]
Because there's no EC in deltalake, we use BMC to represent EC.
https://review.coreboot.org/c/coreboot/+/45138/2/src/arch/x86/smbios_default... File src/arch/x86/smbios_defaults.c:
https://review.coreboot.org/c/coreboot/+/45138/2/src/arch/x86/smbios_default... PS2, Line 66: __weak void smbios_ec_revision(uint8_t *ipmi_bmc_major_revision, : uint8_t *ipmi_bmc_minor_revision)
the parameter names should be `ec_major_release` and `ec_minor_release`
Done
https://review.coreboot.org/c/coreboot/+/45138/2/src/drivers/ipmi/ipmi_kcs_o... File src/drivers/ipmi/ipmi_kcs_ops.c:
https://review.coreboot.org/c/coreboot/+/45138/2/src/drivers/ipmi/ipmi_kcs_o... PS2, Line 283: ((bmc_revision_major / 16) * 10) + (bmc_revision_major % 16)
Huh? What is this math needed for?
The value received from OpenBMC is hexadecimal, however it should be decimal. It need to be transferred to decimal so that we can get right value(such as 0x33 -> 33).
https://review.coreboot.org/c/coreboot/+/45138/3/src/mainboard/ocp/deltalake... File src/mainboard/ocp/deltalake/ramstage.c:
https://review.coreboot.org/c/coreboot/+/45138/3/src/mainboard/ocp/deltalake... PS3, Line 26: /* Update SMBIOS type 0 ec version. In deltalake, BMC version is used to represent ec version. */
line over 96 characters
Done
Jonathan Zhang has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/45138 )
Change subject: arch/x86/smbios: Update SMBIOS type 0 ec version ......................................................................
Patch Set 4:
Patch Set 4:
(4 comments)
Patch Set 2:
(3 comments)
Patch Set 2:
Not sure it is ok to use BMC version directly?
I've no idea if it's correct to use the BMC version here. If SMBIOS says this is for the Embedded Controller, then we shouldn't write the BMC information
In YV3, there's no EC. BMC is used to represent EC in YV3, so I think maybe it is fine to use BMC version here. If it's not suitable I'll remove it.
The SMBIOS spec does not have a BMC field in type 0. Traditional firmware does use this "EC version field" to hold BMC version, so we are consistent here.
Jonathan Zhang has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/45138 )
Change subject: arch/x86/smbios: Update SMBIOS type 0 ec version ......................................................................
Patch Set 4:
(1 comment)
https://review.coreboot.org/c/coreboot/+/45138/2/src/drivers/ipmi/ipmi_kcs_o... File src/drivers/ipmi/ipmi_kcs_ops.c:
https://review.coreboot.org/c/coreboot/+/45138/2/src/drivers/ipmi/ipmi_kcs_o... PS2, Line 283: ((bmc_revision_major / 16) * 10) + (bmc_revision_major % 16)
The value received from OpenBMC is hexadecimal, however it should be decimal. […]
0x33 is not decimal 33, Are you saying that OpenBMC has a bug? In this case, we need to make it a weak function, and do the bug workaround in mainboard code. In the mean time, we need OpenBMC to fix the bug. Sounds like the first nibble is major version, while second nibble is minor version, so we should use bit shift (instead of arithmetic operation) to get them. In this case, OpenBMC does not have a bug.
Hello build bot (Jenkins), Jonathan Zhang, Ryback Hung, Philipp Deppenwiese, Christian Walter, Angel Pons, Bryant Ou, Patrick Rudolph,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/45138
to look at the new patch set (#5).
Change subject: arch/x86/smbios: Update SMBIOS type 0 ec version ......................................................................
arch/x86/smbios: Update SMBIOS type 0 ec version
Get embedded controller firmware version and update to SMBIOS type 0. In deltalake, BMC version is used to represent ec version.
TEST=Execute "dmidecode -t 0" to check if the ec version is correct
Signed-off-by: Tim Chu Tim.Chu@quantatw.com Change-Id: Ibd5ee27a1b8fa4e5bc66e359d3b62e052e19e8a2 --- M src/arch/x86/smbios.c M src/arch/x86/smbios_defaults.c M src/drivers/ipmi/ipmi_kcs.h M src/drivers/ipmi/ipmi_kcs_ops.c M src/include/smbios.h M src/mainboard/ocp/deltalake/ramstage.c 6 files changed, 37 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/38/45138/5
Tim Chu has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/45138 )
Change subject: arch/x86/smbios: Update SMBIOS type 0 ec version ......................................................................
Patch Set 5:
(2 comments)
https://review.coreboot.org/c/coreboot/+/45138/2/src/drivers/ipmi/ipmi_kcs_o... File src/drivers/ipmi/ipmi_kcs_ops.c:
https://review.coreboot.org/c/coreboot/+/45138/2/src/drivers/ipmi/ipmi_kcs_o... PS2, Line 283: ((bmc_revision_major / 16) * 10) + (bmc_revision_major % 16)
0x33 is not decimal 33, Are you saying that OpenBMC has a bug? In this case, we need to make it a we […]
In ipmi spec, Firmware Revision was defined into BCD encoded. That's why the format of revision need to be transferred in BIOS. In my newest patch, this function has been moved to mb/ocp/deltalake/ramstage.c.
https://review.coreboot.org/c/coreboot/+/45138/5/src/mainboard/ocp/deltalake... File src/mainboard/ocp/deltalake/ramstage.c:
https://review.coreboot.org/c/coreboot/+/45138/5/src/mainboard/ocp/deltalake... PS5, Line 38: *ec_major_revision = bmc_major_revision; : *ec_minor_revision = ((bmc_minor_revision / 16) * 10) + (bmc_minor_revision % 16); After checked with YV3 team, I found that the format of Firmware Revision 1 and Firmware Revision 2 were different in OpenBMC. In OpenBMC, Firmware Revision 1 was not defined as BCD encoded but Firmware Revision 2 was defined as BCD encoded. For this reason, the format of Firmware Revision 1 didn't need to be transferred in BIOS. I think this is an OpenBMC bug and we need OpenBMC to fix it.
Hello build bot (Jenkins), Jonathan Zhang, Ryback Hung, Philipp Deppenwiese, Christian Walter, Angel Pons, Bryant Ou, Patrick Rudolph,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/45138
to look at the new patch set (#6).
Change subject: arch/x86/smbios: Update SMBIOS type 0 ec version ......................................................................
arch/x86/smbios: Update SMBIOS type 0 ec version
Get embedded controller firmware version and update to SMBIOS type 0. In deltalake, BMC version is used to represent ec version.
TEST=Execute "dmidecode -t 0" to check if the ec version is correct
Signed-off-by: Tim Chu Tim.Chu@quantatw.com Change-Id: Ibd5ee27a1b8fa4e5bc66e359d3b62e052e19e8a2 --- M src/arch/x86/smbios.c M src/arch/x86/smbios_defaults.c M src/drivers/ipmi/ipmi_kcs.h M src/drivers/ipmi/ipmi_kcs_ops.c M src/include/smbios.h M src/mainboard/ocp/deltalake/ramstage.c 6 files changed, 37 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/38/45138/6
Marc Jones has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/45138 )
Change subject: arch/x86/smbios: Update SMBIOS type 0 ec version ......................................................................
Patch Set 6:
(2 comments)
This should be split into 3 commits; EC version, IPMI version, mainboard.
https://review.coreboot.org/c/coreboot/+/45138/6/src/drivers/ipmi/ipmi_kcs_o... File src/drivers/ipmi/ipmi_kcs_ops.c:
https://review.coreboot.org/c/coreboot/+/45138/6/src/drivers/ipmi/ipmi_kcs_o... PS6, Line 32: static u8 bmc_revision_minor = 0x0; split ipmi change from ec version change
https://review.coreboot.org/c/coreboot/+/45138/6/src/mainboard/ocp/deltalake... File src/mainboard/ocp/deltalake/ramstage.c:
https://review.coreboot.org/c/coreboot/+/45138/6/src/mainboard/ocp/deltalake... PS6, Line 41: Make this a separate commit for the mainboard.
Hello build bot (Jenkins), Jonathan Zhang, Ryback Hung, Philipp Deppenwiese, Christian Walter, Angel Pons, Bryant Ou, Patrick Rudolph,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/45138
to look at the new patch set (#7).
Change subject: arch/x86/smbios: Update SMBIOS type 0 ec version ......................................................................
arch/x86/smbios: Update SMBIOS type 0 ec version
Get embedded controller firmware version and update to SMBIOS type 0. In deltalake, BMC version is used to represent ec version.
TEST=Execute "dmidecode -t 0" to check if the ec version is correct
Signed-off-by: Tim Chu Tim.Chu@quantatw.com Change-Id: Ibd5ee27a1b8fa4e5bc66e359d3b62e052e19e8a2 --- M src/arch/x86/smbios.c M src/arch/x86/smbios_defaults.c M src/include/smbios.h 3 files changed, 10 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/38/45138/7
Hello build bot (Jenkins), Jonathan Zhang, Ryback Hung, Philipp Deppenwiese, Christian Walter, Angel Pons, Bryant Ou, Patrick Rudolph,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/45138
to look at the new patch set (#8).
Change subject: arch/x86/smbios: Update SMBIOS type 0 ec version ......................................................................
arch/x86/smbios: Update SMBIOS type 0 ec version
Update embedded controller firmware version for SMBIOS type 0.
TEST=Execute "dmidecode -t 0" to check if the ec version is correct
Signed-off-by: Tim Chu Tim.Chu@quantatw.com Change-Id: Ibd5ee27a1b8fa4e5bc66e359d3b62e052e19e8a2 --- M src/arch/x86/smbios.c M src/arch/x86/smbios_defaults.c M src/include/smbios.h 3 files changed, 10 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/38/45138/8
Jonathan Zhang has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/45138 )
Change subject: arch/x86/smbios: Update SMBIOS type 0 ec version ......................................................................
Patch Set 8: Code-Review+1
Tim Chu has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/45138 )
Change subject: arch/x86/smbios: Update SMBIOS type 0 ec version ......................................................................
Patch Set 8:
(2 comments)
https://review.coreboot.org/c/coreboot/+/45138/6/src/drivers/ipmi/ipmi_kcs_o... File src/drivers/ipmi/ipmi_kcs_ops.c:
https://review.coreboot.org/c/coreboot/+/45138/6/src/drivers/ipmi/ipmi_kcs_o... PS6, Line 32: static u8 bmc_revision_minor = 0x0;
split ipmi change from ec version change
Done. Split it into CB:46070.
https://review.coreboot.org/c/coreboot/+/45138/6/src/mainboard/ocp/deltalake... File src/mainboard/ocp/deltalake/ramstage.c:
https://review.coreboot.org/c/coreboot/+/45138/6/src/mainboard/ocp/deltalake... PS6, Line 41:
Make this a separate commit for the mainboard.
Done. Split it into CB:46071
Patrick Rudolph has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/45138 )
Change subject: arch/x86/smbios: Update SMBIOS type 0 ec version ......................................................................
Patch Set 8: Code-Review+2
Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/45138 )
Change subject: arch/x86/smbios: Update SMBIOS type 0 ec version ......................................................................
Patch Set 8: Code-Review+1
(3 comments)
If Patrick +2'd this, I imagine this is good. I was concerned with BMC != EC, but I guess it's close enough.
https://review.coreboot.org/c/coreboot/+/45138/2/src/arch/x86/smbios.c File src/arch/x86/smbios.c:
https://review.coreboot.org/c/coreboot/+/45138/2/src/arch/x86/smbios.c@428 PS2, Line 428: smbios_ec_revision(&ipmi_bmc_major_revision, &ipmi_bmc_minor_revision); : t->ec_major_release = ipmi_bmc_major_revision; : t->ec_minor_release = ipmi_bmc_minor_revision;
Because there's no EC in deltalake, we use BMC to represent EC.
Ack
https://review.coreboot.org/c/coreboot/+/45138/2/src/drivers/ipmi/ipmi_kcs_o... File src/drivers/ipmi/ipmi_kcs_ops.c:
https://review.coreboot.org/c/coreboot/+/45138/2/src/drivers/ipmi/ipmi_kcs_o... PS2, Line 283: ((bmc_revision_major / 16) * 10) + (bmc_revision_major % 16)
In ipmi spec, Firmware Revision was defined into BCD encoded. […]
Ack
https://review.coreboot.org/c/coreboot/+/45138/5/src/mainboard/ocp/deltalake... File src/mainboard/ocp/deltalake/ramstage.c:
https://review.coreboot.org/c/coreboot/+/45138/5/src/mainboard/ocp/deltalake... PS5, Line 38: *ec_major_revision = bmc_major_revision; : *ec_minor_revision = ((bmc_minor_revision / 16) * 10) + (bmc_minor_revision % 16);
After checked with YV3 team, I found that the format of Firmware Revision 1 and Firmware Revision 2 […]
Ack
Patrick Georgi has submitted this change. ( https://review.coreboot.org/c/coreboot/+/45138 )
Change subject: arch/x86/smbios: Update SMBIOS type 0 ec version ......................................................................
arch/x86/smbios: Update SMBIOS type 0 ec version
Update embedded controller firmware version for SMBIOS type 0.
TEST=Execute "dmidecode -t 0" to check if the ec version is correct
Signed-off-by: Tim Chu Tim.Chu@quantatw.com Change-Id: Ibd5ee27a1b8fa4e5bc66e359d3b62e052e19e8a2 Reviewed-on: https://review.coreboot.org/c/coreboot/+/45138 Tested-by: build bot (Jenkins) no-reply@coreboot.org Reviewed-by: Jonathan Zhang jonzhang@fb.com Reviewed-by: Patrick Rudolph siro@das-labor.org Reviewed-by: Angel Pons th3fanbus@gmail.com --- M src/arch/x86/smbios.c M src/arch/x86/smbios_defaults.c M src/include/smbios.h 3 files changed, 10 insertions(+), 0 deletions(-)
Approvals: build bot (Jenkins): Verified Patrick Rudolph: Looks good to me, approved Angel Pons: Looks good to me, but someone else must approve Jonathan Zhang: Looks good to me, but someone else must approve
diff --git a/src/arch/x86/smbios.c b/src/arch/x86/smbios.c index 2cf4ac5..2995ece 100644 --- a/src/arch/x86/smbios.c +++ b/src/arch/x86/smbios.c @@ -430,6 +430,8 @@ t->system_bios_major_release = coreboot_major_revision; t->system_bios_minor_release = coreboot_minor_revision;
+ smbios_ec_revision(&t->ec_major_release, &t->ec_minor_release); + t->bios_characteristics = BIOS_CHARACTERISTICS_PCI_SUPPORTED | BIOS_CHARACTERISTICS_SELECTABLE_BOOT | diff --git a/src/arch/x86/smbios_defaults.c b/src/arch/x86/smbios_defaults.c index 22ce7a5..4d8883f3 100644 --- a/src/arch/x86/smbios_defaults.c +++ b/src/arch/x86/smbios_defaults.c @@ -63,6 +63,12 @@ return SMBIOS_BOARD_TYPE_UNKNOWN; }
+__weak void smbios_ec_revision(uint8_t *ec_major_revision, uint8_t *ec_minor_revision) +{ + *ec_major_revision = 0x0; + *ec_minor_revision = 0x0; +} + /* * System Enclosure or Chassis Types as defined in SMBIOS specification. * The default value is SMBIOS_ENCLOSURE_DESKTOP (0x03) but laptop, diff --git a/src/include/smbios.h b/src/include/smbios.h index 521339e..8033d6c 100644 --- a/src/include/smbios.h +++ b/src/include/smbios.h @@ -54,6 +54,8 @@ const char *smbios_chassis_serial_number(void); const char *smbios_processor_serial_number(void);
+void smbios_ec_revision(uint8_t *ec_major_revision, uint8_t *ec_minor_revision); + unsigned int smbios_processor_external_clock(void); unsigned int smbios_processor_characteristics(void); struct cpuid_result;