diff options
author | Sridahr Siricilla <sridhar.siricilla@intel.com> | 2021-11-11 01:29:40 +0530 |
---|---|---|
committer | Felix Held <felix-coreboot@felixheld.de> | 2022-01-19 21:01:13 +0000 |
commit | cd1cd8d1176cf65f189f0346679c3f4e4fe9af92 (patch) | |
tree | f1d16ef702e31831d61ba11e3167698e03d2be33 /src/soc/intel/common/block/include | |
parent | cdd025202807b6c520966586310ee6088012de21 (diff) |
soc/intel/alderlake: Add method to determine the cpu type
set_cpu_type(): It determines the CPU type (big or small) that
is executing the function, and marks the global_cpu_type's array slot
which is corresponds to the executing CPU's index if the CPU type is
big core.
get_cpu_index(): It determines the index from LAPIC Ids. This is
required to expose CPPC3 package in ascending order of CPUs' LAPIC ids.
So, the function returns CPU's position from the ascending order list
of LAPIC ids.
TEST=Tested CPU index calculation, core type determination on Brya
Signed-off-by: Sridhar Siricilla <sridhar.siricilla@intel.com>
Change-Id: If4ceb24d9bb1e808750bf618c29b2b9ea6d4191b
Reviewed-on: https://review.coreboot.org/c/coreboot/+/59360
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Diffstat (limited to 'src/soc/intel/common/block/include')
-rw-r--r-- | src/soc/intel/common/block/include/intelblocks/acpi.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/soc/intel/common/block/include/intelblocks/acpi.h b/src/soc/intel/common/block/include/intelblocks/acpi.h index 2d3136eae6..26341451d0 100644 --- a/src/soc/intel/common/block/include/intelblocks/acpi.h +++ b/src/soc/intel/common/block/include/intelblocks/acpi.h @@ -9,6 +9,15 @@ #include <soc/pm.h> #include <stdint.h> +/* CPU Types */ +enum core_type { + CPUID_RESERVED_1 = 0x10, + CPUID_CORE_TYPE_INTEL_ATOM = 0x20, + CPUID_RESERVED_2 = 0x30, + CPUID_CORE_TYPE_INTEL_CORE = 0x40, + CPUID_UNKNOWN = 0xff, +}; + /* Forward declare the power state struct here */ struct chipset_power_state; @@ -108,4 +117,12 @@ void generate_acpi_power_engine_with_lpm(const struct soc_pmc_lpm *lpm); /* Fill SSDT for SGX status, EPC base and length */ void sgx_fill_ssdt(void); +/* + * This function returns the CPU type (big or small) of the CPU that it is executing + * on. It is designed to be called after MP initialization. If the SoC selects + * SOC_INTEL_COMMON_BLOCK_ACPI_CPU_HYBRID, then this function must be implemented, + * and will be called from set_cpu_type(). + */ +enum core_type get_soc_cpu_type(void); + #endif /* _SOC_INTEL_COMMON_BLOCK_ACPI_H_ */ |