5 #include <smp/spinlock.h>
11 #define CPPC_NOM_FREQ_IDX 22
12 #define CPPC_NOM_PERF_IDX 3
62 printk(
BIOS_ERR,
"cpu_hybrid: Failed to set global_cpu_type with CPU type info\n");
69 u16 big_core_scal_factor, small_core_scal_factor;
74 *big_core_nom_perf = (
u16)((max_non_turbo_ratio * big_core_scal_factor) / 100);
76 *small_core_nom_perf = (
u16)((max_non_turbo_ratio * small_core_scal_factor) / 100);
87 u16 small_core_nom_perf, big_core_nom_perf;
112 snprintf(pkg_path,
sizeof(pkg_path),
void acpigen_emit_namestring(const char *namepath)
void acpigen_pop_len(void)
void acpigen_set_package_element_int(const char *package, unsigned int element, uint64_t src)
void acpigen_emit_byte(unsigned char b)
void acpigen_write_method(const char *name, int nargs)
@ CB_SUCCESS
Call completed successfully.
#define printk(level,...)
enum cb_err mp_run_on_all_cpus(void(*func)(void *), void *arg)
static void run_set_cpu_type(void *unused)
static u8 global_cpu_type[CONFIG_MAX_CPUS]
static void acpi_get_cpu_nomi_perf(u16 *small_core_nom_perf, u16 *big_core_nom_perf)
static void acpigen_cppc_update_nominal_freq_perf(const char *pkg_path, s32 core_id)
void acpigen_write_CPPC_hybrid_method(s32 core_id)
BOOT_STATE_INIT_ENTRY(BS_DEV_INIT_CHIPS, BS_ON_EXIT, run_set_cpu_type, NULL)
static void set_cpu_type(void *unused)
#define CPPC_NOM_FREQ_IDX
static u16 acpi_get_cpu_nominal_freq(void)
#define CPPC_NOM_PERF_IDX
static u32 get_cpu_index(void)
DECLARE_SPIN_LOCK(cpu_lock)
static bool is_big_core(void)
uint32_t cpu_get_bus_frequency(void)
uint8_t cpu_get_max_non_turbo_ratio(void)
struct device * dev_find_lapic(unsigned int apic_id)
Given a Local APIC ID, find the device structure.
#define CPPC_PACKAGE_NAME
#define spin_unlock(lock)
static __always_inline unsigned int lapicid(void)
#define BIOS_ERR
BIOS_ERR - System in incomplete state.
enum core_type get_soc_cpu_type(void)
bool soc_is_nominal_freq_supported(void)
void soc_get_scaling_factor(u16 *big_core_scal_factor, u16 *small_core_scal_factor)
@ CPUID_CORE_TYPE_INTEL_CORE
DEVTREE_CONST struct device * next
int snprintf(char *buf, size_t size, const char *fmt,...)
Note: This file is only for POSIX compatibility, and is meant to be chain-included via string....