arch/x86/smbios: Add SMBIOS Thread Count
Add Thread Count in SMBIOS type 4 "Processor Information". Modify Thread Count 2 according to SMBIOS spec, it should be the number of threads per processor socket. TEST="dmidecode -t4" to check. Signed-off-by: Francois Toguo <francois.toguo.fotso@intel.com> Change-Id: I0e00ba706eecdc850a2c6a4d876a7732dcc8f755 Reviewed-on: https://review.coreboot.org/c/coreboot/+/45564 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Angel Pons <th3fanbus@gmail.com>
This commit is contained in:
parent
f1a0049599
commit
597922ecb4
|
@ -588,11 +588,13 @@ static int smbios_write_type4(unsigned long *current, int handle)
|
||||||
}
|
}
|
||||||
t->core_count2 = leaf_b_cores / leaf_b_threads;
|
t->core_count2 = leaf_b_cores / leaf_b_threads;
|
||||||
t->core_count = t->core_count2 > 0xff ? 0xff : t->core_count2;
|
t->core_count = t->core_count2 > 0xff ? 0xff : t->core_count2;
|
||||||
t->thread_count2 = leaf_b_threads;
|
t->thread_count2 = leaf_b_cores;
|
||||||
|
t->thread_count = t->thread_count2 > 0xff ? 0xff : t->thread_count2;
|
||||||
} else {
|
} else {
|
||||||
t->core_count = (res.ebx >> 16) & 0xff;
|
t->core_count = (res.ebx >> 16) & 0xff;
|
||||||
t->core_count2 = t->core_count;
|
t->core_count2 = t->core_count;
|
||||||
t->thread_count2 = t->core_count2;
|
t->thread_count2 = t->core_count2;
|
||||||
|
t->thread_count = t->thread_count2;
|
||||||
}
|
}
|
||||||
/* Assume we enable all the cores always, capped only by MAX_CPUS */
|
/* Assume we enable all the cores always, capped only by MAX_CPUS */
|
||||||
t->core_enabled = MIN(t->core_count, CONFIG_MAX_CPUS);
|
t->core_enabled = MIN(t->core_count, CONFIG_MAX_CPUS);
|
||||||
|
|
Loading…
Reference in New Issue