diff options
author | Tim Chu <Tim.Chu@quantatw.com> | 2020-09-16 00:34:08 -0700 |
---|---|---|
committer | Patrick Georgi <pgeorgi@google.com> | 2020-10-12 08:42:32 +0000 |
commit | 27bf0c8efcfcd15a6068ba7ac8dc892b0e64d375 (patch) | |
tree | 4090cb87876b51f3640d17dfb5eac7eb94b0998f /src/arch | |
parent | 66dc7261e2430477aceca67f177a2ed857f6a748 (diff) |
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>
Diffstat (limited to 'src/arch')
-rw-r--r-- | src/arch/x86/smbios.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/arch/x86/smbios.c b/src/arch/x86/smbios.c index e33b70f405..2cf4ac54ee 100644 --- a/src/arch/x86/smbios.c +++ b/src/arch/x86/smbios.c @@ -552,6 +552,8 @@ static int smbios_write_type4(unsigned long *current, int handle) 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 @@ static int smbios_write_type4(unsigned long *current, int handle) 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); |