<p>Patrick Rudolph has uploaded this change for <strong>review</strong>.</p><p><a href="https://review.coreboot.org/20285">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">nb/intel/haswell/gma: Set ASLS on S3 resume<br><br>Set ASLS on S3 resume, too.<br>Use new GMA driver method to set ASLS.<br><br>Change-Id: I1944fcca91ee1a0ad8df5c8b6f402e907de5e78f<br>Signed-off-by: Patrick Rudolph <siro@das-labor.org><br>---<br>M src/northbridge/intel/haswell/gma.c<br>1 file changed, 28 insertions(+), 14 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://review.coreboot.org:29418/coreboot refs/changes/85/20285/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">diff --git a/src/northbridge/intel/haswell/gma.c b/src/northbridge/intel/haswell/gma.c<br>index fa4dec9..3efc59e 100644<br>--- a/src/northbridge/intel/haswell/gma.c<br>+++ b/src/northbridge/intel/haswell/gma.c<br>@@ -422,6 +422,20 @@<br>  gtt_write(0x0a188, 0x00000001);<br> }<br> <br>+/* Enable SCI to ACPI _GPE._L06 */<br>+static void gma_enable_swsci(void)<br>+{<br>+ u16 reg16;<br>+<br>+        /* clear DMISCI status */<br>+    reg16 = inw(get_pmbase() + TCO1_STS);<br>+        reg16 &= DMISCI_STS;<br>+     outw(get_pmbase() + TCO1_STS, reg16);<br>+<br>+     /* clear and enable ACPI TCO SCI */<br>+  enable_tco_sci();<br>+}<br>+<br> static void gma_func0_init(struct device *dev)<br> {<br>         int lightup_ok = 0;<br>@@ -460,6 +474,20 @@<br> <br>  /* Post panel init */<br>         gma_pm_init_post_vbios(dev);<br>+<br>+      if (acpi_is_wakeup_s3()) {<br>+           /* GNVS has been already set up */<br>+           const global_nvs_t *gnvs = cbmem_find(CBMEM_ID_ACPI_GNVS);<br>+<br>+                if (gnvs && gnvs->aslb) {<br>+                 gma_enable_swsci();<br>+<br>+                       /* Provide ACPI OpRegion address */<br>+                  intel_gma_opregion_register((uintptr_t)gnvs->aslb);<br>+               } else {<br>+                     printk(BIOS_ERR, "Error: GNVS table not found.\n");<br>+                }<br>+    }<br> }<br> <br> static void gma_set_subsystem(device_t dev, unsigned vendor, unsigned device)<br>@@ -492,20 +520,6 @@<br>        }<br> <br>  drivers_intel_gma_displays_ssdt_generate(gfx);<br>-}<br>-<br>-/* Enable SCI to ACPI _GPE._L06 */<br>-static void gma_enable_swsci(void)<br>-{<br>-  u16 reg16;<br>-<br>-        /* clear DMISCI status */<br>-    reg16 = inw(get_pmbase() + TCO1_STS);<br>-        reg16 &= DMISCI_STS;<br>-     outw(get_pmbase() + TCO1_STS, reg16);<br>-<br>-     /* clear and enable ACPI TCO SCI */<br>-  enable_tco_sci();<br> }<br> <br> static unsigned long<br></pre><p>To view, visit <a href="https://review.coreboot.org/20285">change 20285</a>. To unsubscribe, visit <a href="https://review.coreboot.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://review.coreboot.org/20285"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: coreboot </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>
<div style="display:none"> Gerrit-Change-Id: I1944fcca91ee1a0ad8df5c8b6f402e907de5e78f </div>
<div style="display:none"> Gerrit-Change-Number: 20285 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Patrick Rudolph <siro@das-labor.org> </div>