Subrata Banik has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/64834 )
Change subject: soc/intel/cmn/block/cpu: Run Set BIOS Done for all CPUs (BSP and APs) ......................................................................
soc/intel/cmn/block/cpu: Run Set BIOS Done for all CPUs (BSP and APs)
As per Intel Processor EDS, set BIOS Done MSR needs to run on all available CPUs.
Also, implement a function to perform any SoC recommended CPU programming prior to post CPUs init. At present calling set BIOS done for all CPUs from `before_post_cpus_init()`.
Note: expected to grow the before_post_cpus_init() with other CPU programming recommendation, for example: reload microcode patch etc.
BUG=b:233199592 TEST=Build and boot google/taeko to ChromeOS.
Signed-off-by: Subrata Banik subratabanik@google.com Change-Id: I8066cd724c9f15d259aeb23f3aa71a2d224d5340 --- M src/soc/intel/common/block/cpu/mp_init.c M src/soc/intel/common/block/include/intelblocks/mp_init.h 2 files changed, 18 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/34/64834/1
diff --git a/src/soc/intel/common/block/cpu/mp_init.c b/src/soc/intel/common/block/cpu/mp_init.c index 9b4278f..cec767a 100644 --- a/src/soc/intel/common/block/cpu/mp_init.c +++ b/src/soc/intel/common/block/cpu/mp_init.c @@ -167,6 +167,17 @@ x86_setup_mtrrs_with_detect(); }
+static void wrapper_set_bios_done(void *unused) +{ + cpu_soc_bios_done(); +} + +void before_post_cpus_init(void) +{ + if (mp_run_on_all_cpus(&wrapper_set_bios_done, NULL) != CB_SUCCESS) + printk(BIOS_ERR, "Set BIOS Done failure\n"); +} + /* Ensure to re-program all MTRRs based on DRAM resource settings */ static void post_cpus_init(void *unused) { diff --git a/src/soc/intel/common/block/include/intelblocks/mp_init.h b/src/soc/intel/common/block/include/intelblocks/mp_init.h index 8a413ea..47c39f1 100644 --- a/src/soc/intel/common/block/include/intelblocks/mp_init.h +++ b/src/soc/intel/common/block/include/intelblocks/mp_init.h @@ -34,6 +34,13 @@ void init_cpus(void);
/* + * This function to perform any recommended CPU (BSP and AP) initialization + * after coreboot has done the multiprocessor initialization (before FSP-S) + * and prior to coreboot perform post_cpus_init (after DRAM resources are set). + */ +void before_post_cpus_init(void); + +/* * SoC Overrides * * All new SoC must implement below functionality for ramstage.