]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
smbios: enable setting processor family > 0xff
authorHeinrich Schuchardt <heinrich.schuchardt@canonical.com>
Thu, 28 Dec 2023 07:30:23 +0000 (08:30 +0100)
committerHeinrich Schuchardt <heinrich.schuchardt@canonical.com>
Tue, 9 Jan 2024 09:09:15 +0000 (10:09 +0100)
Many value of processor type exceed 0xff and have to be stored as u16
value. In the type 4 table set processor_family = 0xfe signaling that
field processor_family2 is used and write the actual value into the
processor_family2 field.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
lib/smbios.c

index d9d52bd58d756d723a3d4b0c81d2ec3be93012aa..41aa936c4c41e7567fa0c1f04b06508dfbf6c759 100644 (file)
@@ -467,7 +467,8 @@ static void smbios_write_type4_dm(struct smbios_type4 *t,
        }
 #endif
 
-       t->processor_family = processor_family;
+       t->processor_family = 0xfe;
+       t->processor_family2 = processor_family;
        t->processor_manufacturer = smbios_add_prop(ctx, NULL, vendor);
        t->processor_version = smbios_add_prop(ctx, NULL, name);
 }
@@ -489,7 +490,6 @@ static int smbios_write_type4(ulong *current, int handle,
        t->l1_cache_handle = 0xffff;
        t->l2_cache_handle = 0xffff;
        t->l3_cache_handle = 0xffff;
-       t->processor_family2 = t->processor_family;
 
        len = t->length + smbios_string_table_len(ctx);
        *current += len;