<p>Patrick Rudolph has uploaded this change for <strong>review</strong>.</p><p><a href="https://review.coreboot.org/20281">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">drv/intel/gma/opregion: Add function to set ASLS register<br><br>Add a new method to set ASLS register that holds the<br>ACPI OpRegion base address.<br><br>Change-Id: I4850500ac6d58f80b0eddc81514053c87774405c<br>Signed-off-by: Patrick Rudolph <siro@das-labor.org><br>---<br>M src/drivers/intel/gma/Makefile.inc<br>A src/drivers/intel/gma/opregion.c<br>M src/drivers/intel/gma/opregion.h<br>3 files changed, 44 insertions(+), 0 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://review.coreboot.org:29418/coreboot refs/changes/81/20281/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">diff --git a/src/drivers/intel/gma/Makefile.inc b/src/drivers/intel/gma/Makefile.inc<br>index 43779a5..50494e1 100644<br>--- a/src/drivers/intel/gma/Makefile.inc<br>+++ b/src/drivers/intel/gma/Makefile.inc<br>@@ -19,6 +19,7 @@<br> ramstage-$(CONFIG_INTEL_INT15) += int15.c<br> endif<br> ramstage-$(CONFIG_INTEL_GMA_ACPI) += acpi.c<br>+ramstage-$(CONFIG_INTEL_GMA_ACPI) += opregion.c<br> <br> <br> ifeq ($(CONFIG_MAINBOARD_USE_LIBGFXINIT),y)<br>diff --git a/src/drivers/intel/gma/opregion.c b/src/drivers/intel/gma/opregion.c<br>new file mode 100644<br>index 0000000..5cd04ae<br>--- /dev/null<br>+++ b/src/drivers/intel/gma/opregion.c<br>@@ -0,0 +1,41 @@<br>+/*<br>+ * This file is part of the coreboot project.<br>+ *<br>+ * Copyright (C) 2017 Patrick Rudolph <siro@das-labor.org><br>+ *<br>+ * This program is free software; you can redistribute it and/or<br>+ * modify it under the terms of the GNU General Public License as<br>+ * published by the Free Software Foundation; version 2, or (at your option)<br>+ * any later verion of the License.<br>+ *<br>+ * This program is distributed in the hope that it will be useful,<br>+ * but WITHOUT ANY WARRANTY; without even the implied warranty of<br>+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the<br>+ * GNU General Public License for more details.<br>+ */<br>+<br>+#include <device/device.h><br>+#include <device/pci.h><br>+#include <device/pci_ids.h><br>+#include <device/pci_ops.h><br>+#include "opregion.h"<br>+<br>+/* Write ASLS PCI register and enables SWSCI. */<br>+void<br>+intel_gma_opregion_register(uintptr_t opregion)<br>+{<br>+  device_t igd;<br>+        u16 reg16;<br>+<br>+        igd = dev_find_slot(0, PCI_DEVFN(0x2, 0));<br>+   if (!igd || !igd->enabled)<br>+                return;<br>+<br>+   pci_write_config32(igd, ASLS, (u32)opregion);<br>+<br>+     /* Intel's Windows driver relies on this: */<br>+     reg16 = pci_read_config16(igd, SWSCI);<br>+       reg16 &= ~GSSCIE;<br>+        reg16 |= SMISCISEL;<br>+  pci_write_config16(igd, SWSCI, reg16);<br>+}<br>diff --git a/src/drivers/intel/gma/opregion.h b/src/drivers/intel/gma/opregion.h<br>index 3f94380..c590805 100644<br>--- a/src/drivers/intel/gma/opregion.h<br>+++ b/src/drivers/intel/gma/opregion.h<br>@@ -245,4 +245,6 @@<br>      u8      coreblock_biossignon[155];<br> } __attribute__((packed)) optionrom_vbt_t;<br> <br>+void intel_gma_opregion_register(uintptr_t opregion);<br>+<br> #endif /* _COMMON_GMA_H_ */<br></pre><p>To view, visit <a href="https://review.coreboot.org/20281">change 20281</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/20281"/><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: I4850500ac6d58f80b0eddc81514053c87774405c </div>
<div style="display:none"> Gerrit-Change-Number: 20281 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Patrick Rudolph <siro@das-labor.org> </div>