[coreboot-gerrit] Change in coreboot[master]: intel/common: change mca_configure API's def

Pratikkumar V Prajapati (Code Review) gerrit at coreboot.org
Sat May 19 03:22:35 CEST 2018


Pratikkumar V Prajapati has uploaded this change for review. ( https://review.coreboot.org/26391


Change subject: intel/common: change mca_configure API's def
......................................................................

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 at intel.com>
---
M src/soc/intel/common/block/cpu/cpulib.c
M src/soc/intel/common/block/include/intelblocks/cpulib.h
M src/soc/intel/skylake/cpu.c
3 files changed, 6 insertions(+), 4 deletions(-)



  git pull ssh://review.coreboot.org:29418/coreboot refs/changes/91/26391/1

diff --git a/src/soc/intel/common/block/cpu/cpulib.c b/src/soc/intel/common/block/cpu/cpulib.c
index c67904f..00d7c3e 100644
--- a/src/soc/intel/common/block/cpu/cpulib.c
+++ b/src/soc/intel/common/block/cpu/cpulib.c
@@ -2,7 +2,7 @@
  * This file is part of the coreboot project.
  *
  * 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
  * it under the terms of the GNU General Public License as published by
@@ -297,7 +297,7 @@
 	return msr.lo & 0xff;
 }
 
-void mca_configure(void)
+void mca_configure(void *unused)
 {
 	msr_t msr;
 	int i;
@@ -306,6 +306,8 @@
 	msr = rdmsr(IA32_MCG_CAP);
 	num_banks = msr.lo & 0xff;
 	msr.lo = msr.hi = 0;
+	printk(BIOS_DEBUG, "CPU: mca_configure num banks %d\n", num_banks);
+
 	for (i = 0; i < num_banks; i++) {
 		/* Clear the machine check status */
 		wrmsr(IA32_MC0_STATUS + (i * 4), msr);
diff --git a/src/soc/intel/common/block/include/intelblocks/cpulib.h b/src/soc/intel/common/block/include/intelblocks/cpulib.h
index 191459b..e50e4ab 100644
--- a/src/soc/intel/common/block/include/intelblocks/cpulib.h
+++ b/src/soc/intel/common/block/include/intelblocks/cpulib.h
@@ -157,6 +157,6 @@
 uint32_t cpu_get_max_turbo_ratio(void);
 
 /* Configure Machine Check Architecture support */
-void mca_configure(void);
+void mca_configure(void* unused);
 
 #endif	/* SOC_INTEL_COMMON_BLOCK_CPULIB_H */
diff --git a/src/soc/intel/skylake/cpu.c b/src/soc/intel/skylake/cpu.c
index d9e90d2..c0e5241 100644
--- a/src/soc/intel/skylake/cpu.c
+++ b/src/soc/intel/skylake/cpu.c
@@ -425,7 +425,7 @@
 	/* 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();
+	mca_configure(NULL);
 
 	/* Enable the local CPU apics */
 	enable_lapic_tpr();

-- 
To view, visit https://review.coreboot.org/26391
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I2395ee7fbedc829f040959b0021967f800693eeb
Gerrit-Change-Number: 26391
Gerrit-PatchSet: 1
Gerrit-Owner: Pratikkumar V Prajapati <pratikkumar.v.prajapati at intel.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.coreboot.org/pipermail/coreboot-gerrit/attachments/20180519/45e72782/attachment.html>


More information about the coreboot-gerrit mailing list