soc/intel/cannonlake: Use common mca_configure() API
Use mca_configure() API from cpulib to configure Intel Machine Check Architecture (MCA) Change-Id: Ib4943a7f7929775bd5e9945462e530ef68a398b8 Signed-off-by: Pratik Prajapati <pratikkumar.v.prajapati@intel.com> Reviewed-on: https://review.coreboot.org/21241 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Lijian Zhao <lijian.zhao@intel.com> Reviewed-by: Aaron Durbin <adurbin@chromium.org>
This commit is contained in:
parent
e816315ee2
commit
2ad1ddb390
@ -129,29 +129,6 @@ static void set_energy_perf_bias(u8 policy)
|
|||||||
wrmsr(IA32_ENERGY_PERFORMANCE_BIAS, msr);
|
wrmsr(IA32_ENERGY_PERFORMANCE_BIAS, msr);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void configure_mca(void)
|
|
||||||
{
|
|
||||||
msr_t msr;
|
|
||||||
int i;
|
|
||||||
int num_banks;
|
|
||||||
|
|
||||||
msr = rdmsr(IA32_MCG_CAP);
|
|
||||||
num_banks = msr.lo & 0xff;
|
|
||||||
msr.lo = msr.hi = 0;
|
|
||||||
/*
|
|
||||||
* TODO(adurbin): This should only be done on a cold boot. Also, some
|
|
||||||
* of these banks are core vs package scope. For now every CPU clears
|
|
||||||
* every bank.
|
|
||||||
*/
|
|
||||||
for (i = 0; i < num_banks; i++) {
|
|
||||||
/* Clear the machine check status */
|
|
||||||
wrmsr(IA32_MC0_STATUS + (i * 4), msr);
|
|
||||||
/* Initialize machine checks */
|
|
||||||
wrmsr(IA32_MC0_CTL + i * 4,
|
|
||||||
(msr_t) {.lo = 0xffffffff, .hi = 0xffffffff});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static void configure_c_states(void)
|
static void configure_c_states(void)
|
||||||
{
|
{
|
||||||
msr_t msr;
|
msr_t msr;
|
||||||
@ -194,7 +171,10 @@ static void configure_c_states(void)
|
|||||||
void soc_core_init(device_t cpu)
|
void soc_core_init(device_t cpu)
|
||||||
{
|
{
|
||||||
/* Clear out pending MCEs */
|
/* Clear out pending MCEs */
|
||||||
configure_mca();
|
/* TODO(adurbin): This should only be done on a cold boot. Also, some
|
||||||
|
* of these banks are core vs package scope. For now every CPU clears
|
||||||
|
* every bank. */
|
||||||
|
mca_configure();
|
||||||
|
|
||||||
/* Enable the local CPU apics */
|
/* Enable the local CPU apics */
|
||||||
enable_lapic_tpr();
|
enable_lapic_tpr();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user