summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorElyes HAOUAS <ehaouas@noos.fr>2019-01-25 13:46:43 +0100
committerNico Huber <nico.h@gmx.de>2019-03-29 18:58:06 +0000
commit28fa33ccbce042d09daf64efa2097b67570ad4af (patch)
tree72491a5f3fc7872a0d0a4117060b65bb64b3c760 /src
parent009e6cbf842ae1e28231d8e864403c68857c337a (diff)
arch/x86/smbios(type4): Write processor_upgrade field
Change-Id: I1bf5ac6c411720d349df8fd706015c6835758cd0 Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr> Reviewed-on: https://review.coreboot.org/c/coreboot/+/29529 Reviewed-by: Nico Huber <nico.h@gmx.de> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src')
-rw-r--r--src/arch/x86/smbios.c24
1 files changed, 23 insertions, 1 deletions
diff --git a/src/arch/x86/smbios.c b/src/arch/x86/smbios.c
index 8cb59df6a3..c01892ad2f 100644
--- a/src/arch/x86/smbios.c
+++ b/src/arch/x86/smbios.c
@@ -472,6 +472,28 @@ const char *__weak smbios_system_sku(void)
return "";
}
+static int get_socket_type(void)
+{
+ if (CONFIG(CPU_INTEL_SLOT_1))
+ return 0x08;
+ if (CONFIG(CPU_INTEL_SOCKET_MPGA604))
+ return 0x13;
+ if (CONFIG(CPU_INTEL_SOCKET_LGA775))
+ return 0x15;
+ if (CONFIG(CPU_AMD_SOCKET_AM2R2))
+ return 0x17;
+ if (CONFIG(CPU_AMD_SOCKET_F_1207))
+ return 0x18;
+ if (CONFIG(CPU_AMD_SOCKET_G34_NON_AGESA))
+ return 0x1a;
+ if (CONFIG(CPU_AMD_SOCKET_AM3))
+ return 0x1b;
+ if (CONFIG(CPU_AMD_SOCKET_C32_NON_AGESA))
+ return 0x1c;
+
+ return 0x02; /* Unknown */
+}
+
static int smbios_write_type1(unsigned long *current, int handle)
{
struct smbios_type1 *t = (struct smbios_type1 *)*current;
@@ -574,7 +596,7 @@ static int smbios_write_type4(unsigned long *current, int handle)
t->l1_cache_handle = 0xffff;
t->l2_cache_handle = 0xffff;
t->l3_cache_handle = 0xffff;
- t->processor_upgrade = 1;
+ t->processor_upgrade = get_socket_type();
len = t->length + smbios_string_table_len(t->eos);
*current += len;
return len;