soc/intel/broadwell: Inline CPUID helpers
These functions are small and used in various stages. Inline them. Change-Id: I0d15012f264dbb0ae2eff8210f79176b350b6e7f Signed-off-by: Angel Pons <th3fanbus@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/46707 Reviewed-by: Arthur Heymans <arthur@aheymans.xyz> Reviewed-by: Michael Niewöhner <foss@mniewoehner.de> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
parent
c200e8c7cd
commit
37164ff609
|
@ -5,16 +5,6 @@
|
||||||
#include <soc/msr.h>
|
#include <soc/msr.h>
|
||||||
#include <soc/systemagent.h>
|
#include <soc/systemagent.h>
|
||||||
|
|
||||||
u32 cpu_family_model(void)
|
|
||||||
{
|
|
||||||
return cpuid_eax(1) & 0x0fff0ff0;
|
|
||||||
}
|
|
||||||
|
|
||||||
u32 cpu_stepping(void)
|
|
||||||
{
|
|
||||||
return cpuid_eax(1) & 0xf;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Dynamically determine if the part is ULT. */
|
/* Dynamically determine if the part is ULT. */
|
||||||
int cpu_is_ult(void)
|
int cpu_is_ult(void)
|
||||||
{
|
{
|
||||||
|
|
|
@ -3,7 +3,9 @@
|
||||||
#ifndef _BROADWELL_CPU_H_
|
#ifndef _BROADWELL_CPU_H_
|
||||||
#define _BROADWELL_CPU_H_
|
#define _BROADWELL_CPU_H_
|
||||||
|
|
||||||
|
#include <arch/cpu.h>
|
||||||
#include <device/device.h>
|
#include <device/device.h>
|
||||||
|
#include <stdint.h>
|
||||||
|
|
||||||
/* CPU types */
|
/* CPU types */
|
||||||
#define HASWELL_FAMILY_ULT 0x40650
|
#define HASWELL_FAMILY_ULT 0x40650
|
||||||
|
@ -42,8 +44,16 @@ void set_power_limits(u8 power_limit_1_time);
|
||||||
int cpu_config_tdp_levels(void);
|
int cpu_config_tdp_levels(void);
|
||||||
|
|
||||||
/* CPU identification */
|
/* CPU identification */
|
||||||
u32 cpu_family_model(void);
|
static inline u32 cpu_family_model(void)
|
||||||
u32 cpu_stepping(void);
|
{
|
||||||
|
return cpuid_eax(1) & 0x0fff0ff0;
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline u32 cpu_stepping(void)
|
||||||
|
{
|
||||||
|
return cpuid_eax(1) & 0xf;
|
||||||
|
}
|
||||||
|
|
||||||
int cpu_is_ult(void);
|
int cpu_is_ult(void);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -7,11 +7,6 @@
|
||||||
#include <soc/msr.h>
|
#include <soc/msr.h>
|
||||||
#include <soc/romstage.h>
|
#include <soc/romstage.h>
|
||||||
|
|
||||||
u32 cpu_family_model(void)
|
|
||||||
{
|
|
||||||
return cpuid_eax(1) & 0x0fff0ff0;
|
|
||||||
}
|
|
||||||
|
|
||||||
void set_max_freq(void)
|
void set_max_freq(void)
|
||||||
{
|
{
|
||||||
msr_t msr, perf_ctl, platform_info;
|
msr_t msr, perf_ctl, platform_info;
|
||||||
|
|
Loading…
Reference in New Issue