<p>Pratikkumar V Prajapati has uploaded this change for <strong>review</strong>.</p><p><a href="https://review.coreboot.org/21241">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">soc/intel/cannonlake: Use common mca_configure() API<br><br>Use mca_configure() API from cpulib to configure<br>Intel Machine Check Architecture (MCA)<br><br>Change-Id: Ib4943a7f7929775bd5e9945462e530ef68a398b8<br>Signed-off-by: Pratik Prajapati <pratikkumar.v.prajapati@intel.com><br>---<br>M src/soc/intel/cannonlake/cpu.c<br>1 file changed, 4 insertions(+), 24 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://review.coreboot.org:29418/coreboot refs/changes/41/21241/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">diff --git a/src/soc/intel/cannonlake/cpu.c b/src/soc/intel/cannonlake/cpu.c<br>index ec979f0..2faadfd 100644<br>--- a/src/soc/intel/cannonlake/cpu.c<br>+++ b/src/soc/intel/cannonlake/cpu.c<br>@@ -129,29 +129,6 @@<br>      wrmsr(IA32_ENERGY_PERFORMANCE_BIAS, msr);<br> }<br> <br>-static void configure_mca(void)<br>-{<br>-       msr_t msr;<br>-   int i;<br>-       int num_banks;<br>-<br>-    msr = rdmsr(IA32_MCG_CAP);<br>-   num_banks = msr.lo & 0xff;<br>-       msr.lo = msr.hi = 0;<br>- /*<br>-    * TODO(adurbin): This should only be done on a cold boot. Also, some<br>-         * of these banks are core vs package scope. For now every CPU clears<br>-         * every bank.<br>-        */<br>-  for (i = 0; i < num_banks; i++) {<br>-         /* Clear the machine check status */<br>-         wrmsr(IA32_MC0_STATUS + (i * 4), msr);<br>-               /* Initialize machine checks */<br>-              wrmsr(IA32_MC0_CTL + i * 4,<br>-                  (msr_t) {.lo = 0xffffffff, .hi = 0xffffffff});<br>-       }<br>-}<br>-<br> static void configure_c_states(void)<br> {<br>   msr_t msr;<br>@@ -194,7 +171,10 @@<br> void soc_core_init(device_t cpu)<br> {<br>       /* Clear out pending MCEs */<br>- configure_mca();<br>+     /* TODO(adurbin): This should only be done on a cold boot. Also, some<br>+         * of these banks are core vs package scope. For now every CPU clears<br>+         * every bank. */<br>+    mca_configure();<br> <br>   /* Enable the local CPU apics */<br>      enable_lapic_tpr();<br></pre><p>To view, visit <a href="https://review.coreboot.org/21241">change 21241</a>. To unsubscribe, visit <a href="https://review.coreboot.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://review.coreboot.org/21241"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: coreboot </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>
<div style="display:none"> Gerrit-Change-Id: Ib4943a7f7929775bd5e9945462e530ef68a398b8 </div>
<div style="display:none"> Gerrit-Change-Number: 21241 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Pratikkumar V Prajapati <pratikkumar.v.prajapati@intel.com> </div>