intel/common: change mca_configure API's def

add an unused param so that mca_configure can be called
by mp_run_on_all_cpus to run it on all cores.

Change-Id: I2395ee7fbedc829f040959b0021967f800693eeb
Signed-off-by: Pratik Prajapati <pratikkumar.v.prajapati@intel.com>
Reviewed-on: https://review.coreboot.org/26391
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nick Vaccaro <nvaccaro@google.com>
This commit is contained in:
Pratik Prajapati 2018-05-18 18:05:18 -07:00 committed by Patrick Georgi
parent 5ccc73145f
commit 35cb7851ab
5 changed files with 7 additions and 6 deletions

View File

@ -73,7 +73,7 @@ void soc_core_init(struct device *cpu)
/* TODO(adurbin): This should only be done on a cold boot. Also, some /* 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 * of these banks are core vs package scope. For now every CPU clears
* every bank. */ * every bank. */
mca_configure(); mca_configure(NULL);
/* Set core MSRs */ /* Set core MSRs */
reg_script_run(core_msr_script); reg_script_run(core_msr_script);

View File

@ -172,7 +172,7 @@ void soc_core_init(struct device *cpu)
/* TODO(adurbin): This should only be done on a cold boot. Also, some /* 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 * of these banks are core vs package scope. For now every CPU clears
* every bank. */ * every bank. */
mca_configure(); mca_configure(NULL);
/* Enable the local CPU apics */ /* Enable the local CPU apics */
enable_lapic_tpr(); enable_lapic_tpr();

View File

@ -2,7 +2,7 @@
* This file is part of the coreboot project. * This file is part of the coreboot project.
* *
* Copyright (C) 2014 Google Inc. * Copyright (C) 2014 Google Inc.
* Copyright (C) 2015 Intel Corporation. * Copyright (C) 2015-2018 Intel Corporation.
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -297,7 +297,7 @@ uint32_t cpu_get_max_turbo_ratio(void)
return msr.lo & 0xff; return msr.lo & 0xff;
} }
void mca_configure(void) void mca_configure(void *unused)
{ {
msr_t msr; msr_t msr;
int i; int i;
@ -306,6 +306,7 @@ void mca_configure(void)
msr = rdmsr(IA32_MCG_CAP); msr = rdmsr(IA32_MCG_CAP);
num_banks = msr.lo & 0xff; num_banks = msr.lo & 0xff;
msr.lo = msr.hi = 0; msr.lo = msr.hi = 0;
for (i = 0; i < num_banks; i++) { for (i = 0; i < num_banks; i++) {
/* Clear the machine check status */ /* Clear the machine check status */
wrmsr(IA32_MC0_STATUS + (i * 4), msr); wrmsr(IA32_MC0_STATUS + (i * 4), msr);

View File

@ -157,6 +157,6 @@ uint32_t cpu_get_power_max(void);
uint32_t cpu_get_max_turbo_ratio(void); uint32_t cpu_get_max_turbo_ratio(void);
/* Configure Machine Check Architecture support */ /* Configure Machine Check Architecture support */
void mca_configure(void); void mca_configure(void *unused);
#endif /* SOC_INTEL_COMMON_BLOCK_CPULIB_H */ #endif /* SOC_INTEL_COMMON_BLOCK_CPULIB_H */

View File

@ -425,7 +425,7 @@ void soc_core_init(struct device *cpu)
/* TODO(adurbin): This should only be done on a cold boot. Also, some /* 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 * of these banks are core vs package scope. For now every CPU clears
* every bank. */ * every bank. */
mca_configure(); mca_configure(NULL);
/* Enable the local CPU apics */ /* Enable the local CPU apics */
enable_lapic_tpr(); enable_lapic_tpr();