[coreboot-gerrit] Change in coreboot[master]: soc/intel/common/block/cpu: Add option to skip coreboot AP init

Subrata Banik (Code Review) gerrit at coreboot.org
Mon May 28 14:56:19 CEST 2018


Subrata Banik has uploaded this change for review. ( https://review.coreboot.org/26644


Change subject: soc/intel/common/block/cpu: Add option to skip coreboot AP init
......................................................................

soc/intel/common/block/cpu: Add option to skip coreboot AP init

SoC users from IOTG team is looking forward for a solution to skip
coreboot AP initialization flow and make use of FSPS-UPD to
perform AP reset.

TEST=Assign FspSkipMpInit=0 to ensure coreboot is not bringing APs
out of reset.

Change-Id: Ibc8cd411e802fb682436a933073922b2693ba994
Signed-off-by: Subrata Banik <subrata.banik at intel.com>
---
M src/soc/intel/common/block/cpu/mp_init.c
1 file changed, 19 insertions(+), 0 deletions(-)



  git pull ssh://review.coreboot.org:29418/coreboot refs/changes/44/26644/1

diff --git a/src/soc/intel/common/block/cpu/mp_init.c b/src/soc/intel/common/block/cpu/mp_init.c
index 97ad176..7a3ba87 100644
--- a/src/soc/intel/common/block/cpu/mp_init.c
+++ b/src/soc/intel/common/block/cpu/mp_init.c
@@ -16,6 +16,7 @@
 #include <arch/io.h>
 #include <assert.h>
 #include <bootstate.h>
+#include <chip.h>
 #include <compiler.h>
 #include <cpu/cpu.h>
 #include <cpu/x86/mtrr.h>
@@ -119,11 +120,26 @@
 	*parallel = 1;
 }
 
+static bool do_mp_init(void)
+{
+	device_t dev = dev_find_path(NULL, DEVICE_PATH_CPU_CLUSTER);
+	assert(dev != NULL);
+	config_t *config = dev->chip_info;
+
+	if (config->FspSkipMpInit)
+		return true;
+
+	return false;
+}
+
 static void init_cpus(void *unused)
 {
 	device_t dev = dev_find_path(NULL, DEVICE_PATH_CPU_CLUSTER);
 	assert(dev != NULL);
 
+	if (!do_mp_init())
+		return;
+
 	microcode_patch = intel_microcode_find();
 	intel_microcode_load_unlocked(microcode_patch);
 
@@ -138,6 +154,9 @@
 /* Ensure to re-program all MTRRs based on DRAM resource settings */
 static void post_cpus_init(void *unused)
 {
+	if (!do_mp_init())
+		return;
+
 	if (mp_run_on_all_cpus(&wrapper_x86_setup_mtrrs, NULL, 1000) < 0)
 		printk(BIOS_ERR, "MTRR programming failure\n");
 

-- 
To view, visit https://review.coreboot.org/26644
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: Ibc8cd411e802fb682436a933073922b2693ba994
Gerrit-Change-Number: 26644
Gerrit-PatchSet: 1
Gerrit-Owner: Subrata Banik <subrata.banik at intel.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.coreboot.org/pipermail/coreboot-gerrit/attachments/20180528/acbef6c9/attachment.html>


More information about the coreboot-gerrit mailing list