Chen Wisley has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/35345 )
Change subject: mb/google/hatch: override smbios manufacturer name from CBI ......................................................................
mb/google/hatch: override smbios manufacturer name from CBI
BUG=none TEST=emerge-hatch coreboot, use ectool to write oem name in CBI, and checked smbios manufacturer name.
Change-Id: I9be85fbc47031d049b5bd51cfaf6232cab24e9fe Signed-off-by: Wisley Chen wisley.chen@quantatw.com --- M src/mainboard/google/hatch/mainboard.c 1 file changed, 19 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/45/35345/1
diff --git a/src/mainboard/google/hatch/mainboard.c b/src/mainboard/google/hatch/mainboard.c index 4d5e8ed..6054a49 100644 --- a/src/mainboard/google/hatch/mainboard.c +++ b/src/mainboard/google/hatch/mainboard.c @@ -52,3 +52,22 @@
return sku_str; } + +const char *smbios_mainboard_manufacturer(void) +{ + static char oem_name[32]; + static const char *manuf; + + if (manuf) + return manuf; + + if (google_chromeec_cbi_get_oem_name(&oem_name[0], + ARRAY_SIZE(oem_name)) < 0) { + printk(BIOS_ERR, "Couldn't obtain OEM name from CBI\n"); + manuf = CONFIG_MAINBOARD_SMBIOS_MANUFACTURER; + } else { + manuf = &oem_name[0]; + } + + return manuf; +}
Furquan Shaikh has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/35345 )
Change subject: mb/google/hatch: override smbios manufacturer name from CBI ......................................................................
Patch Set 1:
(2 comments)
https://review.coreboot.org/c/coreboot/+/35345/1/src/mainboard/google/hatch/... File src/mainboard/google/hatch/mainboard.c:
https://review.coreboot.org/c/coreboot/+/35345/1/src/mainboard/google/hatch/... PS1, Line 56: smbios_mainboard_manufacturer Some day I think it might make sense to move this to ec/google/chromeec/. For now we can keep it here.
https://review.coreboot.org/c/coreboot/+/35345/1/src/mainboard/google/hatch/... PS1, Line 66: BIOS_ERR I don't think this should be BIOS_ERR. BIOS_INFO maybe? it is not an error if OEM name is not present in CBI. It is an optional field. In fact, is there any value in having this print?
Wisley Chen has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/35345 )
Change subject: mb/google/hatch: override smbios manufacturer name from CBI ......................................................................
Patch Set 1:
(2 comments)
https://review.coreboot.org/c/coreboot/+/35345/1/src/mainboard/google/hatch/... File src/mainboard/google/hatch/mainboard.c:
https://review.coreboot.org/c/coreboot/+/35345/1/src/mainboard/google/hatch/... PS1, Line 56: smbios_mainboard_manufacturer
Some day I think it might make sense to move this to ec/google/chromeec/. […]
OK. thanks
https://review.coreboot.org/c/coreboot/+/35345/1/src/mainboard/google/hatch/... PS1, Line 66: BIOS_ERR
I don't think this should be BIOS_ERR. […]
Yes, it's not an error. I will change to use BIOS_INFO. Thanks
Hello Paul Fagerburg, Tim Wawrzynczak, Shelley Chen, build bot (Jenkins), Furquan Shaikh,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/35345
to look at the new patch set (#2).
Change subject: mb/google/hatch: override smbios manufacturer name from CBI ......................................................................
mb/google/hatch: override smbios manufacturer name from CBI
BUG=none TEST=emerge-hatch coreboot, use ectool to write oem name in CBI, and checked smbios manufacturer name.
Change-Id: I9be85fbc47031d049b5bd51cfaf6232cab24e9fe Signed-off-by: Wisley Chen wisley.chen@quantatw.com --- M src/mainboard/google/hatch/mainboard.c 1 file changed, 19 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/45/35345/2
Furquan Shaikh has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/35345 )
Change subject: mb/google/hatch: override smbios manufacturer name from CBI ......................................................................
Patch Set 2: Code-Review+2
Furquan Shaikh has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/35345 )
Change subject: mb/google/hatch: override smbios manufacturer name from CBI ......................................................................
Patch Set 2:
(2 comments)
https://review.coreboot.org/c/coreboot/+/35345/1/src/mainboard/google/hatch/... File src/mainboard/google/hatch/mainboard.c:
https://review.coreboot.org/c/coreboot/+/35345/1/src/mainboard/google/hatch/... PS1, Line 56: smbios_mainboard_manufacturer
OK. […]
Done
https://review.coreboot.org/c/coreboot/+/35345/1/src/mainboard/google/hatch/... PS1, Line 66: BIOS_ERR
Yes, it's not an error. I will change to use BIOS_INFO. […]
Done
Furquan Shaikh has submitted this change. ( https://review.coreboot.org/c/coreboot/+/35345 )
Change subject: mb/google/hatch: override smbios manufacturer name from CBI ......................................................................
mb/google/hatch: override smbios manufacturer name from CBI
BUG=none TEST=emerge-hatch coreboot, use ectool to write oem name in CBI, and checked smbios manufacturer name.
Change-Id: I9be85fbc47031d049b5bd51cfaf6232cab24e9fe Signed-off-by: Wisley Chen wisley.chen@quantatw.com Reviewed-on: https://review.coreboot.org/c/coreboot/+/35345 Tested-by: build bot (Jenkins) no-reply@coreboot.org Reviewed-by: Furquan Shaikh furquan@google.com --- M src/mainboard/google/hatch/mainboard.c 1 file changed, 19 insertions(+), 0 deletions(-)
Approvals: build bot (Jenkins): Verified Furquan Shaikh: Looks good to me, approved
diff --git a/src/mainboard/google/hatch/mainboard.c b/src/mainboard/google/hatch/mainboard.c index 4d5e8ed..5761b08 100644 --- a/src/mainboard/google/hatch/mainboard.c +++ b/src/mainboard/google/hatch/mainboard.c @@ -52,3 +52,22 @@
return sku_str; } + +const char *smbios_mainboard_manufacturer(void) +{ + static char oem_name[32]; + static const char *manuf; + + if (manuf) + return manuf; + + if (google_chromeec_cbi_get_oem_name(&oem_name[0], + ARRAY_SIZE(oem_name)) < 0) { + printk(BIOS_INFO, "Couldn't obtain OEM name from CBI\n"); + manuf = CONFIG_MAINBOARD_SMBIOS_MANUFACTURER; + } else { + manuf = &oem_name[0]; + } + + return manuf; +}