[coreboot-gerrit] Change in ...coreboot[master]: sb/intel/lynxpoint: Ensure the finalise handler is called

Patrick Georgi (Code Review) gerrit at coreboot.org
Mon Dec 3 14:13:21 CET 2018


Patrick Georgi has submitted this change and it was merged. ( https://review.coreboot.org/c/coreboot/+/29976 )

Change subject: sb/intel/lynxpoint: Ensure the finalise handler is called
......................................................................

sb/intel/lynxpoint: Ensure the finalise handler is called

The finalise handler is not called during S3 resume when using the
`BS_PAYLOAD_BOOT` approach. So, adopt the `lpc_final` approach used by
bd82x6x and others.

Tested on an ASRock H81M-HDS. The finalise handler is now called on
the normal boot path, and during S3 resume.

Change-Id: I9766a8dcbcb38420e937c810d252fef071851e92
Signed-off-by: Tristan Corrick <tristan at corrick.kiwi>
Reviewed-on: https://review.coreboot.org/c/29976
Tested-by: build bot (Jenkins) <no-reply at coreboot.org>
Reviewed-by: Nico Huber <nico.h at gmx.de>
---
M src/southbridge/intel/lynxpoint/lpc.c
M src/southbridge/intel/lynxpoint/smi.c
2 files changed, 6 insertions(+), 14 deletions(-)

Approvals:
  build bot (Jenkins): Verified
  Nico Huber: Looks good to me, approved



diff --git a/src/southbridge/intel/lynxpoint/lpc.c b/src/southbridge/intel/lynxpoint/lpc.c
index ca850c0..437db81 100644
--- a/src/southbridge/intel/lynxpoint/lpc.c
+++ b/src/southbridge/intel/lynxpoint/lpc.c
@@ -967,6 +967,11 @@
 	return current;
 }
 
+static void lpc_final(struct device *dev)
+{
+	if (acpi_is_wakeup_s3() || IS_ENABLED(CONFIG_INTEL_CHIPSET_LOCKDOWN))
+		outb(APM_CNT_FINALIZE, APM_CNT);
+}
 
 static struct pci_operations pci_ops = {
 	.set_subsystem = set_subsystem,
@@ -981,6 +986,7 @@
 	.acpi_name		= lpc_acpi_name,
 	.write_acpi_tables      = southbridge_write_acpi_tables,
 	.init			= lpc_init,
+	.final			= lpc_final,
 	.enable			= pch_lpc_enable,
 	.scan_bus		= scan_lpc_bus,
 	.ops_pci		= &pci_ops,
diff --git a/src/southbridge/intel/lynxpoint/smi.c b/src/southbridge/intel/lynxpoint/smi.c
index 5dab05c..cf70d21 100644
--- a/src/southbridge/intel/lynxpoint/smi.c
+++ b/src/southbridge/intel/lynxpoint/smi.c
@@ -118,17 +118,3 @@
 		  "d" (APM_CNT)
 	);
 }
-
-/*
- * Finalize system before payload boot if INTEL_CHIPSET_LOCKDOWN=y
- */
-#if IS_ENABLED(CONFIG_INTEL_CHIPSET_LOCKDOWN)
-
-static void finalize_boot(void *unused)
-{
-	outb(APM_CNT_FINALIZE, APM_CNT);
-}
-
-BOOT_STATE_INIT_ENTRY(BS_PAYLOAD_BOOT, BS_ON_ENTRY, finalize_boot, NULL);
-
-#endif

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

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I9766a8dcbcb38420e937c810d252fef071851e92
Gerrit-Change-Number: 29976
Gerrit-PatchSet: 3
Gerrit-Owner: Tristan Corrick <tristan at corrick.kiwi>
Gerrit-Reviewer: Nico Huber <nico.h at gmx.de>
Gerrit-Reviewer: Patrick Georgi <pgeorgi at google.com>
Gerrit-Reviewer: Patrick Rudolph <siro at das-labor.org>
Gerrit-Reviewer: Tristan Corrick <tristan at corrick.kiwi>
Gerrit-Reviewer: build bot (Jenkins) <no-reply at coreboot.org>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.coreboot.org/pipermail/coreboot-gerrit/attachments/20181203/1b82f95c/attachment.html>


More information about the coreboot-gerrit mailing list