summaryrefslogtreecommitdiff
path: root/src/soc/intel
diff options
context:
space:
mode:
authorSridhar Siricilla <sridhar.siricilla@intel.com>2023-03-30 09:51:28 +0530
committerSridhar Siricilla <sridhar.siricilla@intel.com>2023-03-31 08:36:47 +0000
commit1b04e811fb7a706a0f54982348fd14761daf969f (patch)
treef1c9688be497cb7294f53e3c01dde5ba729e5127 /src/soc/intel
parent924aff9e226a1ef2e6456230cf1b466436d91aeb (diff)
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 <sridhar.siricilla@intel.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/74088 Reviewed-by: Arthur Heymans <arthur@aheymans.xyz> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Subrata Banik <subratabanik@google.com>
Diffstat (limited to 'src/soc/intel')
-rw-r--r--src/soc/intel/common/block/acpi/cpu_hybrid.c12
-rw-r--r--src/soc/intel/common/block/include/intelblocks/acpi.h3
2 files changed, 15 insertions, 0 deletions
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: