Tim Chu has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/45443 )
Change subject: arch/x86/smbios: Update SMBIOS type 4 socket designation ......................................................................
arch/x86/smbios: Update SMBIOS type 4 socket designation
Add socket designation in type 4 smbios.
TEST=Execute "dmidecode -t 4" to check if the socket designation is correct
Signed-off-by: Tim Chu Tim.Chu@quantatw.com Change-Id: Icfdc201bd5b5921816bdce6c009a9db48c997e2e --- M src/arch/x86/smbios.c 1 file changed, 6 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/43/45443/1
diff --git a/src/arch/x86/smbios.c b/src/arch/x86/smbios.c index 7516305..0600bf4 100644 --- a/src/arch/x86/smbios.c +++ b/src/arch/x86/smbios.c @@ -552,6 +552,8 @@ struct smbios_type4 *t = (struct smbios_type4 *)*current; int len = sizeof(struct smbios_type4); uint16_t characteristics = 0; + uint8_t cnt = 0; + char buf[8];
/* Provide sane defaults even for CPU without CPUID */ res.eax = res.edx = 0; @@ -564,6 +566,10 @@ t->type = SMBIOS_PROCESSOR_INFORMATION; t->handle = handle; t->length = len - 2; + + snprintf(buf, sizeof(buf), "CPU%x", cnt++); + t->socket_designation = smbios_add_string(t->eos, buf); + t->processor_id[0] = res.eax; t->processor_id[1] = res.edx; t->processor_manufacturer = smbios_cpu_vendor(t->eos);
build bot (Jenkins) has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/45443 )
Change subject: arch/x86/smbios: Update SMBIOS type 4 socket designation ......................................................................
Patch Set 1:
(1 comment)
https://review.coreboot.org/c/coreboot/+/45443/1/src/arch/x86/smbios.c File src/arch/x86/smbios.c:
https://review.coreboot.org/c/coreboot/+/45443/1/src/arch/x86/smbios.c@572 PS1, Line 572: trailing whitespace
Hello build bot (Jenkins),
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/45443
to look at the new patch set (#2).
Change subject: arch/x86/smbios: Update SMBIOS type 4 socket designation ......................................................................
arch/x86/smbios: Update SMBIOS type 4 socket designation
Add socket designation in type 4 smbios.
TEST=Execute "dmidecode -t 4" to check if the socket designation is correct
Signed-off-by: Tim Chu Tim.Chu@quantatw.com Change-Id: Icfdc201bd5b5921816bdce6c009a9db48c997e2e --- M src/arch/x86/smbios.c 1 file changed, 6 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/43/45443/2
Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/45443 )
Change subject: arch/x86/smbios: Update SMBIOS type 4 socket designation ......................................................................
Patch Set 2:
(1 comment)
https://review.coreboot.org/c/coreboot/+/45443/2/src/arch/x86/smbios.c File src/arch/x86/smbios.c:
https://review.coreboot.org/c/coreboot/+/45443/2/src/arch/x86/smbios.c@570 PS2, Line 570: "CPU%x" This will always write `CPU0`. Is it intended?
If `cnt` were static (in which case it should have a longer/clearer name), this would print CPU numbers in hex: CPU0, CPU1, CPU2, CPU3, CPU4, CPU5, CPU6, CPU7, CPU8, CPU9, CPUa, CPUb, CPUc, CPUd, CPUe, CPUf, CPU10, CPU11...
Tim Chu has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/45443 )
Change subject: arch/x86/smbios: Update SMBIOS type 4 socket designation ......................................................................
Patch Set 3:
(1 comment)
This change is ready for review.
https://review.coreboot.org/c/coreboot/+/45443/2/src/arch/x86/smbios.c File src/arch/x86/smbios.c:
https://review.coreboot.org/c/coreboot/+/45443/2/src/arch/x86/smbios.c@570 PS2, Line 570: "CPU%x"
This will always write `CPU0`. Is it intended? […]
No, I've revised it. Thanks.
Jonathan Zhang has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/45443 )
Change subject: arch/x86/smbios: Update SMBIOS type 4 socket designation ......................................................................
Patch Set 3: Code-Review+1
Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/45443 )
Change subject: arch/x86/smbios: Update SMBIOS type 4 socket designation ......................................................................
Patch Set 3: Code-Review+1
(1 comment)
https://review.coreboot.org/c/coreboot/+/45443/3/src/arch/x86/smbios.c File src/arch/x86/smbios.c:
https://review.coreboot.org/c/coreboot/+/45443/3/src/arch/x86/smbios.c@570 PS3, Line 570: CPU%x This still counts CPUs in hexadecimal. Is it really what's intended here?
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/+/45443
to look at the new patch set (#4).
Change subject: arch/x86/smbios: Update SMBIOS type 4 socket designation ......................................................................
arch/x86/smbios: Update SMBIOS type 4 socket designation
Add socket designation in type 4 smbios.
TEST=Execute "dmidecode -t 4" to check if the socket designation is correct
Signed-off-by: Tim Chu Tim.Chu@quantatw.com Change-Id: Icfdc201bd5b5921816bdce6c009a9db48c997e2e --- M src/arch/x86/smbios.c 1 file changed, 6 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/43/45443/4
Tim Chu has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/45443 )
Change subject: arch/x86/smbios: Update SMBIOS type 4 socket designation ......................................................................
Patch Set 4:
(1 comment)
https://review.coreboot.org/c/coreboot/+/45443/3/src/arch/x86/smbios.c File src/arch/x86/smbios.c:
https://review.coreboot.org/c/coreboot/+/45443/3/src/arch/x86/smbios.c@570 PS3, Line 570: CPU%x
This still counts CPUs in hexadecimal. […]
I've revised it. Thanks.
Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/45443 )
Change subject: arch/x86/smbios: Update SMBIOS type 4 socket designation ......................................................................
Patch Set 4: Code-Review+2
Patrick Georgi has submitted this change. ( https://review.coreboot.org/c/coreboot/+/45443 )
Change subject: arch/x86/smbios: Update SMBIOS type 4 socket designation ......................................................................
arch/x86/smbios: Update SMBIOS type 4 socket designation
Add socket designation in type 4 smbios.
TEST=Execute "dmidecode -t 4" to check if the socket designation is correct
Signed-off-by: Tim Chu Tim.Chu@quantatw.com Change-Id: Icfdc201bd5b5921816bdce6c009a9db48c997e2e Reviewed-on: https://review.coreboot.org/c/coreboot/+/45443 Tested-by: build bot (Jenkins) no-reply@coreboot.org Reviewed-by: Angel Pons th3fanbus@gmail.com --- M src/arch/x86/smbios.c 1 file changed, 6 insertions(+), 0 deletions(-)
Approvals: build bot (Jenkins): Verified Angel Pons: Looks good to me, approved
diff --git a/src/arch/x86/smbios.c b/src/arch/x86/smbios.c index e33b70f..2cf4ac5 100644 --- a/src/arch/x86/smbios.c +++ b/src/arch/x86/smbios.c @@ -552,6 +552,8 @@ struct smbios_type4 *t = (struct smbios_type4 *)*current; int len = sizeof(struct smbios_type4); uint16_t characteristics = 0; + static unsigned int cnt = 0; + char buf[8];
/* Provide sane defaults even for CPU without CPUID */ res.eax = res.edx = 0; @@ -564,6 +566,10 @@ t->type = SMBIOS_PROCESSOR_INFORMATION; t->handle = handle; t->length = len - 2; + + snprintf(buf, sizeof(buf), "CPU%d", cnt++); + t->socket_designation = smbios_add_string(t->eos, buf); + t->processor_id[0] = res.eax; t->processor_id[1] = res.edx; t->processor_manufacturer = smbios_cpu_vendor(t->eos);