[coreboot-gerrit] Patch set updated for coreboot: nb/i945/gma.c: Set the MSAC register correctly

Arthur Heymans (arthur@aheymans.xyz) gerrit at coreboot.org
Sat Oct 22 18:44:55 CEST 2016


Arthur Heymans (arthur at aheymans.xyz) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/17094

-gerrit

commit 23ee511ad1e1ceb4fbc503cc6129a0f1aff73388
Author: Arthur Heymans <arthur at aheymans.xyz>
Date:   Sat Oct 22 14:16:48 2016 +0200

    nb/i945/gma.c: Set the MSAC register correctly
    
    This fixes an instability on 945gc where the IGD completely locks
    up the system, when for instance tasked to do something with
    compositing (like GNOME or GDM).
    
    TESTED on ga-945gcm-s2l and d945gclf
    TEST: launch GDM (gnome display manager)
    
    Change-Id: Iec49bccf3e3164df9dc1e0b54460a616fe92e04d
    Signed-off-by: Arthur Heymans <arthur at aheymans.xyz>
---
 src/northbridge/intel/i945/gma.c | 16 +++++++++++++++-
 1 file changed, 15 insertions(+), 1 deletion(-)

diff --git a/src/northbridge/intel/i945/gma.c b/src/northbridge/intel/i945/gma.c
index 4baed80..bc5c04d 100644
--- a/src/northbridge/intel/i945/gma.c
+++ b/src/northbridge/intel/i945/gma.c
@@ -32,6 +32,7 @@
 #include "chip.h"
 
 #define GDRST 0xc0
+#define MSAC 0x62 /* Multi Size Aperture Control */
 
 #define  LVDS_CLOCK_A_POWERUP_ALL	(3 << 8)
 #define  LVDS_CLOCK_B_POWERUP_ALL	(3 << 4)
@@ -707,12 +708,25 @@ static void gma_ssdt(device_t device)
 	drivers_intel_gma_displays_ssdt_generate(gfx);
 }
 
+static void gma_func0_read_resources(device_t dev)
+{
+	u8 reg8;
+
+	pci_dev_read_resources(dev);
+
+	/* Set Untrusted Aperture Size to 256mb */
+	reg8 = pci_read_config8(dev, MSAC);
+	reg8 &= ~0x3;
+	reg8 |= 0x2;
+	pci_write_config8(dev, MSAC, reg8);
+}
+
 static struct pci_operations gma_pci_ops = {
 	.set_subsystem    = gma_set_subsystem,
 };
 
 static struct device_operations gma_func0_ops = {
-	.read_resources		= pci_dev_read_resources,
+	.read_resources		= gma_func0_read_resources,
 	.set_resources		= pci_dev_set_resources,
 	.enable_resources	= pci_dev_enable_resources,
 	.init			= gma_func0_init,



More information about the coreboot-gerrit mailing list