From d533b16669a3bacb19b2824e6b4bc76a2a18c92a Mon Sep 17 00:00:00 2001 From: Bill XIE Date: Tue, 22 Aug 2017 16:26:22 +0800 Subject: sb/intel/*: add option to lockdown chipset on normal boot path On platforms with a PCH, some registers within host bridge should be locked down on each normal boot path (done by either coreboot or payload) and S3 resume (always done by coreboot). A function to perform such locking is implemented in src/northbridge/ intel/*/finalize.c, and is designed as the handler of an #SMI triggered with outb(APM_CNT_FINALIZE, APM_CNT), but currently this #SMI is only triggered during s3 resume, and not on normal boot path. This problem has beed discussed in https://mail.coreboot.org/pipermail/coreboot/2017-August/084924.html . This time, an option "INTEL_CHIPSET_LOCKDOWN" within src/southbridge/ intel/common/Kconfig is added to control the actual locking, which depends on several compatibility flags, including "HAVE_INTEL_CHIPSET_LOCKDOWN". In this commit, "ibexpeak", "bd82x6x", "fsp_bd82x6x", and "lynxpoint" have the flag "HAVE_INTEL_CHIPSET_LOCKDOWN" selected. The change is only well tested on Sandy Bridge, my Lenovo x230. Change-Id: I43d4142291c8737b29738c41e8c484328b297b55 Signed-off-by: Bill XIE Reviewed-on: https://review.coreboot.org/21129 Tested-by: build bot (Jenkins) Reviewed-by: Nico Huber --- src/southbridge/intel/lynxpoint/smi.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/southbridge/intel/lynxpoint/smi.c') diff --git a/src/southbridge/intel/lynxpoint/smi.c b/src/southbridge/intel/lynxpoint/smi.c index 5f1bdf76fa..386451f03e 100644 --- a/src/southbridge/intel/lynxpoint/smi.c +++ b/src/southbridge/intel/lynxpoint/smi.c @@ -121,13 +121,13 @@ void smm_setup_structures(void *gnvs, void *tcg, void *smi1) } /* - * Finalize system before payload boot if not in ChromeOS environment. + * Finalize system before payload boot if INTEL_CHIPSET_LOCKDOWN=y */ -#if !IS_ENABLED(CONFIG_CHROMEOS) +#if IS_ENABLED(CONFIG_INTEL_CHIPSET_LOCKDOWN) static void finalize_boot(void *unused) { - outb(0xcb, 0xb2); + outb(APM_CNT_FINALIZE, APM_CNT); } BOOT_STATE_INIT_ENTRY(BS_PAYLOAD_BOOT, BS_ON_ENTRY, finalize_boot, NULL); -- cgit v1.2.3