[coreboot-gerrit] Change in coreboot[master]: nb/intel/nehalem/gma: Set ASLS on S3 resume
Patrick Rudolph (Code Review)
gerrit at coreboot.org
Tue Jun 20 18:44:58 CEST 2017
Patrick Rudolph has uploaded this change for review. ( https://review.coreboot.org/20287
Change subject: nb/intel/nehalem/gma: Set ASLS on S3 resume
......................................................................
nb/intel/nehalem/gma: Set ASLS on S3 resume
Set ASLS on S3 resume, too.
Use new GMA driver method to set ASLS.
Change-Id: Ifc921d7aa2d5b771fc4eaf3ec776c3a13f5496eb
Signed-off-by: Patrick Rudolph <siro at das-labor.org>
---
M src/northbridge/intel/nehalem/gma.c
1 file changed, 33 insertions(+), 19 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/87/20287/1
diff --git a/src/northbridge/intel/nehalem/gma.c b/src/northbridge/intel/nehalem/gma.c
index fa84f78..0c90c29 100644
--- a/src/northbridge/intel/nehalem/gma.c
+++ b/src/northbridge/intel/nehalem/gma.c
@@ -997,6 +997,25 @@
#endif
+/* 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;
@@ -1046,6 +1065,20 @@
/* Post VBIOS 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)
@@ -1098,25 +1131,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/20287
To unsubscribe, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ifc921d7aa2d5b771fc4eaf3ec776c3a13f5496eb
Gerrit-Change-Number: 20287
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/89e0e73c/attachment.html>
More information about the coreboot-gerrit
mailing list