coreboot-kgpe-d16/src/arch/x86
Andrey Petrov 515ef38db4 arch/x86: SMBIOS: Improve core count reporting
Current code uses CPUID leaf 0x1, EBX bits 16:23 to determine number for
"core count". However, it turns out this number has little to do with
real number of cores. According to SDM vol 2A, it stays for "maximum
number of addressable IDs for logical processors in this physical
package". This does not seem to take into account fusing of giving
processor.

The new code determines 'core count' by dividing thread-level cpus by
reported logical cores. This seems to be the only way to arrive
to number of cores as it is reported in official CPU datasheet.

TEST=tested on OCP monolake

Change-Id: Id4ba9e3079f92ffe38f9104ffcfafe62582dd259
Signed-off-by: Andrey Petrov <anpetrov@fb.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/36941
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Werner Zeh <werner.zeh@siemens.com>
2019-11-26 11:45:31 +00:00
..
acpi AUTHORS: Move src/arch/x86 copyrights into AUTHORS file 2019-09-10 12:50:17 +00:00
include Kconfig: Drop the C_ENVIRONMENT_BOOTBLOCK symbol 2019-11-25 09:17:38 +00:00
acpi.c arch/acpi.h: Convert MADT APIC type names to all caps 2019-10-25 07:00:37 +00:00
acpi_bert_storage.c AUTHORS: Move src/arch/x86 copyrights into AUTHORS file 2019-09-10 12:50:17 +00:00
acpi_device.c AUTHORS: Move src/arch/x86 copyrights into AUTHORS file 2019-09-10 12:50:17 +00:00
acpi_pld.c AUTHORS: Move src/arch/x86 copyrights into AUTHORS file 2019-09-10 12:50:17 +00:00
acpi_s3.c arch/x86: Remove acpi_fail_wakeup() and cbmem_fail_resume() 2019-09-14 10:55:34 +00:00
acpigen.c AUTHORS: Move src/arch/x86 copyrights into AUTHORS file 2019-09-10 12:50:17 +00:00
acpigen_dsm.c AUTHORS: Move src/arch/x86 copyrights into AUTHORS file 2019-09-10 12:50:17 +00:00
assembly_entry.S Kconfig: Drop the C_ENVIRONMENT_BOOTBLOCK symbol 2019-11-25 09:17:38 +00:00
boot.c arch/x86/boot.c: Pass arguments when running programs 2019-10-30 08:32:39 +00:00
bootblock.ld AUTHORS: Move src/arch/x86 copyrights into AUTHORS file 2019-09-10 12:50:17 +00:00
bootblock_crt0.S Kconfig: Drop the C_ENVIRONMENT_BOOTBLOCK symbol 2019-11-25 09:17:38 +00:00
bootblock_normal.c
bootblock_romcc.S Kconfig: Drop the C_ENVIRONMENT_BOOTBLOCK symbol 2019-11-25 09:17:38 +00:00
bootblock_simple.c arch/x86: Don't allow separate verstage to boot from romcc bootblock 2019-10-08 11:41:06 +00:00
c_start.S arch/x86: Use the stage argument to implement cbmem_top 2019-11-03 11:18:31 +00:00
car.ld Kconfig: Drop the C_ENVIRONMENT_BOOTBLOCK symbol 2019-11-25 09:17:38 +00:00
cbmem.c arch/x86: Use the stage argument to implement cbmem_top 2019-11-03 11:18:31 +00:00
cf9_reset.c AUTHORS: Move src/arch/x86 copyrights into AUTHORS file 2019-09-10 12:50:17 +00:00
cpu.c cpu/x86/tsc: Flip and rename TSC_CONSTANT_RATE to UNKNOWN_TSC_RATE 2019-11-03 06:15:35 +00:00
cpu_common.c arch/x86: Fix cpu_cpuid_extended_level() return type 2019-07-02 16:10:03 +00:00
ebda.c arch/x86: Remove EARLY_EBDA_INIT support 2019-11-10 15:38:45 +00:00
exception.c {arch,cpu}/x86, drivers/intel: Restore cpu_index error handling 2019-05-16 18:08:50 +00:00
exit_car.S arch/x86: Use the stage argument to implement cbmem_top 2019-11-03 11:18:31 +00:00
failover.ld AUTHORS: Move src/arch/x86 copyrights into AUTHORS file 2019-09-10 12:50:17 +00:00
gdt.c AUTHORS: Move src/arch/x86 copyrights into AUTHORS file 2019-09-10 12:50:17 +00:00
gdt_init.S arch/x86: Prepare GDT for x86_64 2019-03-06 20:00:55 +00:00
id.ld
id.S
idt.S
ioapic.c AUTHORS: Move src/arch/x86 copyrights into AUTHORS file 2019-09-10 12:50:17 +00:00
Kconfig Kconfig: Drop the C_ENVIRONMENT_BOOTBLOCK symbol 2019-11-25 09:17:38 +00:00
Makefile.inc Kconfig: Drop the C_ENVIRONMENT_BOOTBLOCK symbol 2019-11-25 09:17:38 +00:00
memcpy.c
memlayout.ld Kconfig: Drop the C_ENVIRONMENT_BOOTBLOCK symbol 2019-11-25 09:17:38 +00:00
memmove.c
memset.c AUTHORS: Move src/arch/x86 copyrights into AUTHORS file 2019-09-10 12:50:17 +00:00
mmap_boot.c AUTHORS: Move src/arch/x86 copyrights into AUTHORS file 2019-09-10 12:50:17 +00:00
mpspec.c AUTHORS: Move src/arch/x86 copyrights into AUTHORS file 2019-09-10 12:50:17 +00:00
pirq_routing.c AUTHORS: Move src/arch/x86 copyrights into AUTHORS file 2019-09-10 12:50:17 +00:00
postcar.c timestamps: Remove TIMESTAMP_CACHE_IN_BSS 2019-09-13 19:48:26 +00:00
postcar_loader.c console,boot_state: Exclude printk() from reported times 2019-11-11 10:31:29 +00:00
prologue.inc AUTHORS: Move src/arch/x86 copyrights into AUTHORS file 2019-09-10 12:50:17 +00:00
rdrand.c AUTHORS: Move src/arch/x86 copyrights into AUTHORS file 2019-09-10 12:50:17 +00:00
smbios.c arch/x86: SMBIOS: Improve core count reporting 2019-11-26 11:45:31 +00:00
tables.c arch/x86: Remove EARLY_EBDA_INIT support 2019-11-10 15:38:45 +00:00
thread.c AUTHORS: Move src/arch/x86 copyrights into AUTHORS file 2019-09-10 12:50:17 +00:00
thread_switch.S AUTHORS: Move src/arch/x86 copyrights into AUTHORS file 2019-09-10 12:50:17 +00:00
timestamp.c cpu/x86/tsc: Flip and rename TSC_CONSTANT_RATE to UNKNOWN_TSC_RATE 2019-11-03 06:15:35 +00:00
timestamp.inc
verstage.c AUTHORS: Move src/arch/x86 copyrights into AUTHORS file 2019-09-10 12:50:17 +00:00
wakeup.S AUTHORS: Move src/arch/x86 copyrights into AUTHORS file 2019-09-10 12:50:17 +00:00
walkcbfs.S