Attention is currently required from: Tim Wawrzynczak, Patrick Rudolph. Sridhar Siricilla has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/59362 )
Change subject: soc/intel/alderlake: Define the helper functions ......................................................................
soc/intel/alderlake: Define the helper functions
The patch defines following helper functions:
get_cpu_scaling_factor(): Returns scaling factors of big and small core. cpu_is_nominal_freq_supported(): Returns TRUE if cpu supports Nominal Frequency, otherwise FASLE. get_cpu_type(): It returns type of core that is executing the function.
TEST=Verified on Brya
Signed-off-by: Sridahr Siricilla sridhar.siricilla@intel.com Change-Id: I963690a4fadad322095d202bcc08c92dcd845360 --- M src/soc/intel/alderlake/acpi.c M src/soc/intel/alderlake/cpu.c M src/soc/intel/alderlake/include/soc/cpu.h 3 files changed, 21 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/62/59362/1
diff --git a/src/soc/intel/alderlake/acpi.c b/src/soc/intel/alderlake/acpi.c index ab25646..0e13b32 100644 --- a/src/soc/intel/alderlake/acpi.c +++ b/src/soc/intel/alderlake/acpi.c @@ -278,6 +278,10 @@
/* Fill in Above 4GB MMIO resource */ sa_fill_gnvs(gnvs); + + /* Fill core info */ + if (CONFIG(SOC_INTEL_COMMON_BLOCK_ACPI_CPU_HYBRID)) + core_fill_gnvs(gnvs); }
int soc_madt_sci_irq_polarity(int sci) diff --git a/src/soc/intel/alderlake/cpu.c b/src/soc/intel/alderlake/cpu.c index be8b011..259374e 100644 --- a/src/soc/intel/alderlake/cpu.c +++ b/src/soc/intel/alderlake/cpu.c @@ -87,6 +87,17 @@ return CPUID_CORE_TYPE_INTEL_CORE; }
+void get_cpu_scaling_factor(uint16_t *big_core_scal_factor, uint16_t *small_core_scal_factor) +{ + *big_core_scal_factor = 1.27; + *small_core_scal_factor = 1; +} + +bool cpu_is_nominal_freq_supported(void) +{ + return TRUE; +} + /* All CPUs including BSP will run the following function. */ void soc_core_init(struct device *cpu) { diff --git a/src/soc/intel/alderlake/include/soc/cpu.h b/src/soc/intel/alderlake/include/soc/cpu.h index 06b44a2..24428fd 100644 --- a/src/soc/intel/alderlake/include/soc/cpu.h +++ b/src/soc/intel/alderlake/include/soc/cpu.h @@ -33,4 +33,10 @@
/* It returns the cpu type - big or small core */ uint8_t get_cpu_type(void); + +/* Get scaling factors for big and small cores */ +void get_cpu_scaling_factor(uint16_t *big_core_scal_factor, uint16_t *small_core_scale_factor); + +/* Check cpu supports Nominal Frequency or not */ +bool cpu_is_nominal_freq_supported(void); #endif