soc/intel/common: Implement ACPI CPPCv3 package to support hybrid core
commit117361278f0e1491d6f745fa19a5f75f0cc73b0a
authorSridhar Siricilla <sridhar.siricilla@intel.com>
Mon, 15 Nov 2021 11:42:49 +0000 (15 17:12 +0530)
committerFelix Held <felix-coreboot@felixheld.de>
Fri, 28 Jan 2022 15:04:49 +0000 (28 15:04 +0000)
treeab3e7be1bf461361083d9aa88404feb9ff685fd1
parent49f0f9a42244fe9cfb494df4b8551dba75d5126a
soc/intel/common: Implement ACPI CPPCv3 package to support hybrid core

The patch implements ACPI CPPCv3 package. It implements and updates the
following methods:

generate_cppc_entries(): Updates method to support CPPCv3 package

acpi_get_cpu_nominal_freq(): Calculates CPU's nominal frequency

acpi_get_cpu_nomi_perf(): Calculates nominal performance for big and
small cores.

acpigen_write_CPPC_hybrid_method(): It generates ACPI code to implement
_CPC method.

acpigen_cppc_update_nominal_freq_perf(): It updates CPPC3 package if cpu
supports Nominal Frequency. It generates ACPI code which sets Nominal
Frequency and updates Nominal Performance. It uses below calculation to
update the Nominal Frequency and Nominal Performance:
        Nominal Frequency = Max non-turbo ratio * cpu_bus_frequency
        Nominal Performance = Max non-turn ratio * cpu scaling factor

CPU scaling factor varies in the hybrid core environment. So, the
generated ACPI code updates Nominal Performance based on the CPU's
scaling factor.

TEST=Verified CPPCv3 package is getting created in the SSDT table.

Signed-off-by: Sridhar Siricilla <sridhar.siricilla@intel.com>
Signed-off-by: ravindr1 <ravindra@intel.com>
Change-Id: Icd5ea9e70bebd1e66d3cea2bcf8a6678e5cc95ca
Reviewed-on: https://review.coreboot.org/c/coreboot/+/59359
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Reviewed-by: Rizwan Qureshi <rizwan.qureshi@intel.com>
src/soc/intel/common/block/acpi/acpi.c
src/soc/intel/common/block/acpi/cpu_hybrid.c
src/soc/intel/common/block/include/intelblocks/acpi.h