[coreboot-gerrit] Change in coreboot[master]: nb/intel/haswell/gma: Set ASLS on S3 resume

Patrick Rudolph (Code Review) gerrit at coreboot.org
Tue Jun 20 18:44:57 CEST 2017


Patrick Rudolph has uploaded this change for review. ( https://review.coreboot.org/20285


Change subject: nb/intel/haswell/gma: Set ASLS on S3 resume
......................................................................

nb/intel/haswell/gma: Set ASLS on S3 resume

Set ASLS on S3 resume, too.
Use new GMA driver method to set ASLS.

Change-Id: I1944fcca91ee1a0ad8df5c8b6f402e907de5e78f
Signed-off-by: Patrick Rudolph <siro at das-labor.org>
---
M src/northbridge/intel/haswell/gma.c
1 file changed, 28 insertions(+), 14 deletions(-)



  git pull ssh://review.coreboot.org:29418/coreboot refs/changes/85/20285/1

diff --git a/src/northbridge/intel/haswell/gma.c b/src/northbridge/intel/haswell/gma.c
index fa4dec9..3efc59e 100644
--- a/src/northbridge/intel/haswell/gma.c
+++ b/src/northbridge/intel/haswell/gma.c
@@ -422,6 +422,20 @@
 	gtt_write(0x0a188, 0x00000001);
 }
 
+/* Enable SCI to ACPI _GPE._L06 */
+static void gma_enable_swsci(void)
+{
+	u16 reg16;
+
+	/* clear DMISCI status */
+	reg16 = inw(get_pmbase() + TCO1_STS);
+	reg16 &= DMISCI_STS;
+	outw(get_pmbase() + TCO1_STS, reg16);
+
+	/* clear and enable ACPI TCO SCI */
+	enable_tco_sci();
+}
+
 static void gma_func0_init(struct device *dev)
 {
 	int lightup_ok = 0;
@@ -460,6 +474,20 @@
 
 	/* Post panel init */
 	gma_pm_init_post_vbios(dev);
+
+	if (acpi_is_wakeup_s3()) {
+		/* GNVS has been already set up */
+		const global_nvs_t *gnvs = cbmem_find(CBMEM_ID_ACPI_GNVS);
+
+		if (gnvs && gnvs->aslb) {
+			gma_enable_swsci();
+
+			/* Provide ACPI OpRegion address */
+			intel_gma_opregion_register((uintptr_t)gnvs->aslb);
+		} else {
+			printk(BIOS_ERR, "Error: GNVS table not found.\n");
+		}
+	}
 }
 
 static void gma_set_subsystem(device_t dev, unsigned vendor, unsigned device)
@@ -492,20 +520,6 @@
 	}
 
 	drivers_intel_gma_displays_ssdt_generate(gfx);
-}
-
-/* Enable SCI to ACPI _GPE._L06 */
-static void gma_enable_swsci(void)
-{
-	u16 reg16;
-
-	/* clear DMISCI status */
-	reg16 = inw(get_pmbase() + TCO1_STS);
-	reg16 &= DMISCI_STS;
-	outw(get_pmbase() + TCO1_STS, reg16);
-
-	/* clear and enable ACPI TCO SCI */
-	enable_tco_sci();
 }
 
 static unsigned long

-- 
To view, visit https://review.coreboot.org/20285
To unsubscribe, visit https://review.coreboot.org/settings

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I1944fcca91ee1a0ad8df5c8b6f402e907de5e78f
Gerrit-Change-Number: 20285
Gerrit-PatchSet: 1
Gerrit-Owner: Patrick Rudolph <siro at das-labor.org>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.coreboot.org/pipermail/coreboot-gerrit/attachments/20170620/650d6898/attachment.html>


More information about the coreboot-gerrit mailing list