From 1b04e811fb7a706a0f54982348fd14761daf969f Mon Sep 17 00:00:00 2001 From: Sridhar Siricilla Date: Thu, 30 Mar 2023 09:51:28 +0530 Subject: soc/intel/common: Add core_type member to 'struct apic_path' The patch adds new member 'core_type' to the 'struct apic_path' and updates core type information. TEST=Build the code for MTL Change-Id: I1d34068fd5ef43f8408301bf3effa9febf85f683 Signed-off-by: Sridhar Siricilla Reviewed-on: https://review.coreboot.org/c/coreboot/+/74088 Reviewed-by: Arthur Heymans Tested-by: build bot (Jenkins) Reviewed-by: Subrata Banik --- src/soc/intel/common/block/acpi/cpu_hybrid.c | 12 ++++++++++++ src/soc/intel/common/block/include/intelblocks/acpi.h | 3 +++ 2 files changed, 15 insertions(+) (limited to 'src/soc/intel') diff --git a/src/soc/intel/common/block/acpi/cpu_hybrid.c b/src/soc/intel/common/block/acpi/cpu_hybrid.c index eb852de50d..81c4add0b6 100644 --- a/src/soc/intel/common/block/acpi/cpu_hybrid.c +++ b/src/soc/intel/common/block/acpi/cpu_hybrid.c @@ -24,6 +24,18 @@ static bool is_perf_core(void) return get_soc_cpu_type() == CPUID_CORE_TYPE_INTEL_CORE; } +static enum cpu_perf_eff_type get_core_type(void) +{ + return (get_soc_cpu_type() == CPUID_CORE_TYPE_INTEL_CORE) ? + CPU_TYPE_PERF : CPU_TYPE_EFF; +} + +void set_dev_core_type(void) +{ + struct cpu_info *info = cpu_info(); + info->cpu->path.apic.core_type = get_core_type(); +} + static struct device *get_cpu_bus_first_child(void) { struct device *dev = dev_find_path(NULL, DEVICE_PATH_CPU_CLUSTER); diff --git a/src/soc/intel/common/block/include/intelblocks/acpi.h b/src/soc/intel/common/block/include/intelblocks/acpi.h index be7d0dfa2d..0f7a16579b 100644 --- a/src/soc/intel/common/block/include/intelblocks/acpi.h +++ b/src/soc/intel/common/block/include/intelblocks/acpi.h @@ -131,6 +131,9 @@ struct min_sleep_state { enum acpi_device_sleep_states min_sleep_state; }; +/* Updates core type into 'struct cpu_info' */ +void set_dev_core_type(void); + /* * This SOC callback returns an array that maps devices to their min sleep state. * Example: -- cgit v1.2.3