Usha P has uploaded a new patch set (#37) to the change originally created by Subrata Banik. ( https://review.coreboot.org/c/coreboot/+/18457 )
Change subject: soc/intel/common: Add bootblock common stage file ......................................................................
soc/intel/common: Add bootblock common stage file
The intention of this design is to commonalize redundant basic initialization procedure in an intel SoC, along with giving any new SoCs flexibility to add custom init sequences.
Platform initialization in bootblock can be visualized mainly as initializing the below components. 1. SoC - mainly System Agent, PMC, etc 2. PCH - PCH IPs like GSPI, SPI, SMBUS, P2SB 3. CPU - Early MTRR setup (enable SPI cache), Paging
Bootblock initialization is also split into the below stages 1. Early - prior to console init 2. Late - post console init
A unified structure of functions is created to facilitate running the above defined sequence (and dropping the word "late")
struct bootblock_ops { void (*bootblock_soc_early_init)(void); void (*bootblock_soc_init)(void); void (*bootblock_pch_early_init)(void); void (*bootblock_pch_init)(void); void (*bootblock_cpu_early_init)(void); void (*bootblock_cpu_init)(void); };
Also, some of the platform initialization is common across Intel SoCs. Those sequences are moved to a common location, which can be used by the SoC code.
bootblock_cmn_soc_early_init() bootblock_cmn_soc_init() bootblock_cmn_pch_early_init() bootblock_cmn_pch_init() bootblock_cmn_cpu_early_init() bootblock_cmn_cpu_init()
The control over what is to be initialized in bootblock is governed by the actuall SoC code. Soc should define the operations to be executed using the bootblock_ops structure. The SoC code can use the common functions along with its own custom ones.
BUG=b:78109109 TEST=Boot to OS on CNL, GLK systems.
Change-Id: If84c08d33f6f8fd3cd9722ee893653f1d1ae90c1 Signed-off-by: Subrata Banik subrata.banik@intel.com Signed-off-by: Usha P usha.p@intel.com --- A src/soc/intel/common/basecode/bootblock/Kconfig A src/soc/intel/common/basecode/bootblock/Makefile.inc A src/soc/intel/common/basecode/bootblock/bootblock.c A src/soc/intel/common/basecode/include/intelbasecode/bootblock.h 4 files changed, 181 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/57/18457/37