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>
This commit is contained in:
Sridhar Siricilla 2023-03-30 09:51:28 +05:30
parent 924aff9e22
commit 1b04e811fb
3 changed files with 16 additions and 0 deletions

View File

@ -78,6 +78,7 @@ struct apic_path {
unsigned int node_id;
unsigned int core_id;
unsigned int thread_id;
unsigned char core_type;
};
struct ioapic_path {

View File

@ -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);

View File

@ -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: