tree: Add smbios_processor_type
Change-Id: I46f799ad255993ac42dab11b5c1d2608daa52b42 Signed-off-by: Elyes Haouas <ehaouas@noos.fr> Reviewed-on: https://review.coreboot.org/c/coreboot/+/82645 Reviewed-by: Eric Lai <ericllai@google.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
@@ -68,7 +68,7 @@ int smbios_write_type4(unsigned long *current, int handle)
|
|||||||
t->processor_version = smbios_processor_name(t->eos);
|
t->processor_version = smbios_processor_name(t->eos);
|
||||||
t->processor_family = 0xfe; /* Use processor_family2 field */
|
t->processor_family = 0xfe; /* Use processor_family2 field */
|
||||||
t->processor_family2 = 0x101; /* ARMv8 */
|
t->processor_family2 = 0x101; /* ARMv8 */
|
||||||
t->processor_type = 3; /* System Processor */
|
t->processor_type = SMBIOS_PROCESSOR_TYPE_CENTRAL;
|
||||||
|
|
||||||
smbios_cpu_get_core_counts(&t->core_count2, &t->thread_count2);
|
smbios_cpu_get_core_counts(&t->core_count2, &t->thread_count2);
|
||||||
t->core_count = MAX_CPUS_ENABLED(t->core_count2);
|
t->core_count = MAX_CPUS_ENABLED(t->core_count2);
|
||||||
|
@@ -126,7 +126,7 @@ int smbios_write_type4(unsigned long *current, int handle)
|
|||||||
t->processor_manufacturer = smbios_cpu_vendor(t->eos);
|
t->processor_manufacturer = smbios_cpu_vendor(t->eos);
|
||||||
t->processor_version = smbios_processor_name(t->eos);
|
t->processor_version = smbios_processor_name(t->eos);
|
||||||
t->processor_family = smbios_processor_family(res);
|
t->processor_family = smbios_processor_family(res);
|
||||||
t->processor_type = 3; /* System Processor */
|
t->processor_type = SMBIOS_PROCESSOR_TYPE_CENTRAL;
|
||||||
/*
|
/*
|
||||||
* If CPUID leaf 11 is available, calculate "core count" by dividing
|
* If CPUID leaf 11 is available, calculate "core count" by dividing
|
||||||
* SMT_ID (logical processors in a core) by Core_ID (number of cores).
|
* SMT_ID (logical processors in a core) by Core_ID (number of cores).
|
||||||
|
@@ -496,6 +496,15 @@ struct smbios_type4 {
|
|||||||
#define SMBIOS_PROCESSOR_STATUS_POPULATED (1 << 6)
|
#define SMBIOS_PROCESSOR_STATUS_POPULATED (1 << 6)
|
||||||
#define SMBIOS_PROCESSOR_STATUS_CPU_ENABLED (1 << 0)
|
#define SMBIOS_PROCESSOR_STATUS_CPU_ENABLED (1 << 0)
|
||||||
|
|
||||||
|
enum smbios_processor_type {
|
||||||
|
SMBIOS_PROCESSOR_TYPE_OTHER = 0x01,
|
||||||
|
SMBIOS_PROCESSOR_TYPE_UNKNOWN = 0x02,
|
||||||
|
SMBIOS_PROCESSOR_TYPE_CENTRAL = 0x03,
|
||||||
|
SMBIOS_PROCESSOR_TYPE_MATH = 0x04,
|
||||||
|
SMBIOS_PROCESSOR_TYPE_DSP = 0x05,
|
||||||
|
SMBIOS_PROCESSOR_TYPE_VIDEO = 0x06,
|
||||||
|
};
|
||||||
|
|
||||||
/* enum for socket type */
|
/* enum for socket type */
|
||||||
enum smbios_processor_upgrade_field {
|
enum smbios_processor_upgrade_field {
|
||||||
PROCESSOR_UPGRADE_OTHER = 0x01,
|
PROCESSOR_UPGRADE_OTHER = 0x01,
|
||||||
|
Reference in New Issue
Block a user