diff options
author | Kyösti Mälkki <kyosti.malkki@gmail.com> | 2023-04-12 21:44:49 +0300 |
---|---|---|
committer | Kyösti Mälkki <kyosti.malkki@gmail.com> | 2023-04-17 08:13:38 +0000 |
commit | d521b967c435ca22667d8209d7afd5a6b8090601 (patch) | |
tree | 4715d4767e9974db5c5ca6bea6b54889dbd316f3 /src/cpu/intel/model_206ax | |
parent | 15dd44eedd98f5659cc138eedf70983fae95d9bb (diff) |
cpu,soc/intel: Separate single SSDT CPU entry
Change-Id: Ic75e8907de9730c6fdb06dbe799a7644fa90f904
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/74399
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Sridhar Siricilla <sridhar.siricilla@intel.com>
Diffstat (limited to 'src/cpu/intel/model_206ax')
-rw-r--r-- | src/cpu/intel/model_206ax/acpi.c | 37 |
1 files changed, 20 insertions, 17 deletions
diff --git a/src/cpu/intel/model_206ax/acpi.c b/src/cpu/intel/model_206ax/acpi.c index a10f8dc66e..994f3bbe9e 100644 --- a/src/cpu/intel/model_206ax/acpi.c +++ b/src/cpu/intel/model_206ax/acpi.c @@ -294,6 +294,23 @@ static void generate_P_state_entries(int core, int cores_per_package) acpigen_pop_len(); } +static void generate_cpu_entry(const struct device *device, int cpu, int core, int cores_per_package) +{ + /* Generate Scope(\_SB) { Device(CPUx */ + acpigen_write_processor_device(cpu * cores_per_package + core); + + /* Generate P-state tables */ + generate_P_state_entries(cpu, cores_per_package); + + /* Generate C-state tables */ + generate_C_state_entries(device); + + /* Generate T-state tables */ + generate_T_state_entries(cpu, cores_per_package); + + acpigen_write_processor_device_end(); +} + void generate_cpu_entries(const struct device *device) { int totalcores = dev_count_cpu(); @@ -303,23 +320,9 @@ void generate_cpu_entries(const struct device *device) printk(BIOS_DEBUG, "Found %d CPU(s) with %d core(s) each.\n", numcpus, cores_per_package); - for (int cpu_id = 0; cpu_id < numcpus; cpu_id++) { - for (int core_id = 0; core_id < cores_per_package; core_id++) { - /* Generate Scope(\_SB) { Device(CPUx */ - acpigen_write_processor_device(cpu_id * cores_per_package + core_id); - - /* Generate P-state tables */ - generate_P_state_entries(cpu_id, cores_per_package); - - /* Generate C-state tables */ - generate_C_state_entries(device); - - /* Generate T-state tables */ - generate_T_state_entries(cpu_id, cores_per_package); - - acpigen_write_processor_device_end(); - } - } + for (int cpu_id = 0; cpu_id < numcpus; cpu_id++) + for (int core_id = 0; core_id < cores_per_package; core_id++) + generate_cpu_entry(device, cpu_id, core_id, cores_per_package); /* PPKG is usually used for thermal management of the first and only package. */ |