coreboot/src
Jeremy Compostella 70bdd2e1fa cpu/x86/topology: Simplify CPU topology initialization
This commit rewrites the CPU topology initialization code to simplify
it and make it more maintainable.

The previous code used a complex set of if-else statements to
initialize the CPU topology based on the CPUID leaves that were
supported. This has been replaced with a simpler and more readable
function that follows the Intel Software Developer Manual
recommendation by prioritizing CPUID EAX=0x1f over CPUID EAX=0xb if
available.

The new code removes the need for separate functions to handle the
topology initialization for different CPUID leaves. It uses a static
array of bitfield descriptors to store the APIC ID descriptor
information for each level of the CPU topology. This simplifies the
code and makes it easier to add new levels of topology in the future.

The code populates the node ID based on the package ID, eliminating
the need for an extra function call.

Change-Id: Ie9424559f895af69e79c36b919e80af803861148
Signed-off-by: Jeremy Compostella <jeremy.compostella@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85576
Reviewed-by: Jincheng Li <jincheng.li@intel.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Shuo Liu <shuo.liu@intel.com>
2024-12-17 17:24:15 +00:00
..
acpi acpi/acpigen: generate Create*Field() from name string directly 2024-12-10 02:58:29 +00:00
arch arch/x86: Disable DEBUG_STACK_OVERFLOW_BREAKPOINTS_IN_ALL_STAGES 2024-12-17 08:37:10 +00:00
commonlib commonlib: Add ELOG_TYPE_FW_CSE_SYNC eventLog type 2024-12-16 03:29:53 +00:00
console console/i2c_smbus: Allow to send data w/o register offset 2024-07-11 00:06:22 +00:00
cpu cpu/x86/topology: Simplify CPU topology initialization 2024-12-17 17:24:15 +00:00
device arch/x86: Rename breakpoint removal function 2024-12-10 08:48:00 +00:00
drivers drivers/usb/intel_bluetooth: Add GBTR Method 2024-12-11 14:05:06 +00:00
ec ec/google/chromeec: Define ACPI_NOTIFY_CROS_EC_MKBP constant 2024-12-11 16:07:57 +00:00
include cpu/x86/topology: Simplify CPU topology initialization 2024-12-17 17:24:15 +00:00
lib tree: Fix cast an object of type 'nullptr_t' to 'uintptr_t' error 2024-10-29 01:41:41 +00:00
mainboard mb/google/brox: Apply ISH_FW_VERSION in Kconfig 2024-12-17 07:53:54 +00:00
northbridge haswell NRI: Post-process selected timings 2024-12-10 09:38:00 +00:00
sbom src, util: Clean up makefile.inc in text, help & comments 2024-01-26 20:15:18 +00:00
security drivers/pc80/tpm: Remove flag TPM_RDRESP_NEED_DELAY 2024-10-14 15:26:11 +00:00
soc cpu/x86/topology: Simplify CPU topology initialization 2024-12-17 17:24:15 +00:00
southbridge Treewide: Remove unused header files 2024-11-30 04:44:06 +00:00
superio superio/ite: Add support for IT8625E 2024-11-21 15:49:12 +00:00
vendorcode vc/intel/fsp/mtl: Update MTL fsp header files from 3471_91 to 4122_21 2024-12-17 06:16:07 +00:00
Kconfig Add initial experimental LTO support 2024-08-24 12:50:38 +00:00