[coreboot-gerrit] Change in coreboot[master]: nb/intel/sandybridge/gma: Set ASLS on S3 resume
Patrick Rudolph (Code Review)
gerrit at coreboot.org
Tue Jun 20 18:44:56 CEST 2017
Patrick Rudolph has uploaded this change for review. ( https://review.coreboot.org/20284
Change subject: nb/intel/sandybridge/gma: Set ASLS on S3 resume
......................................................................
nb/intel/sandybridge/gma: Set ASLS on S3 resume
Set ASLS on S3 resume, too.
Use new GMA driver method to set ASLS.
Change-Id: Ic7132cd1848a75043d10f32ac5d0e6b45d2e0fe4
Signed-off-by: Patrick Rudolph <siro at das-labor.org>
---
M src/northbridge/intel/sandybridge/gma.c
1 file changed, 33 insertions(+), 19 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/84/20284/1
diff --git a/src/northbridge/intel/sandybridge/gma.c b/src/northbridge/intel/sandybridge/gma.c
index f534930..10eddd3 100644
--- a/src/northbridge/intel/sandybridge/gma.c
+++ b/src/northbridge/intel/sandybridge/gma.c
@@ -577,6 +577,25 @@
}
}
+/* Enable SCI to ACPI _GPE._L06 */
+static void gma_enable_swsci(void)
+{
+ u16 reg16;
+
+ /* clear DMISCI status */
+ reg16 = inw(DEFAULT_PMBASE + TCO1_STS);
+ reg16 &= DMISCI_STS;
+ outw(DEFAULT_PMBASE + TCO1_STS, reg16);
+
+ /* clear acpi tco status */
+ outl(DEFAULT_PMBASE + GPE0_STS, TCOSCI_STS);
+
+ /* enable acpi tco scis */
+ reg16 = inw(DEFAULT_PMBASE + GPE0_EN);
+ reg16 |= TCOSCI_EN;
+ outw(DEFAULT_PMBASE + GPE0_EN, reg16);
+}
+
static void gma_func0_init(struct device *dev)
{
u32 reg32;
@@ -619,6 +638,20 @@
if (lightup_ok)
gfx_set_init_done(1);
}
+
+ 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)
@@ -651,25 +684,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(DEFAULT_PMBASE + TCO1_STS);
- reg16 &= DMISCI_STS;
- outw(DEFAULT_PMBASE + TCO1_STS, reg16);
-
- /* clear acpi tco status */
- outl(DEFAULT_PMBASE + GPE0_STS, TCOSCI_STS);
-
- /* enable acpi tco scis */
- reg16 = inw(DEFAULT_PMBASE + GPE0_EN);
- reg16 |= TCOSCI_EN;
- outw(DEFAULT_PMBASE + GPE0_EN, reg16);
}
static unsigned long
--
To view, visit https://review.coreboot.org/20284
To unsubscribe, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic7132cd1848a75043d10f32ac5d0e6b45d2e0fe4
Gerrit-Change-Number: 20284
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/a7904131/attachment-0001.html>
More information about the coreboot-gerrit
mailing list