diff options
author | Arthur Heymans <arthur@aheymans.xyz> | 2017-05-06 18:05:57 +0200 |
---|---|---|
committer | Nico Huber <nico.h@gmx.de> | 2017-05-09 12:57:19 +0200 |
commit | 2e7efe65a23570ba654187412052e7eb7583858f (patch) | |
tree | f926a88c148bd01c35caa93aa9b5dd226c21510c | |
parent | c80748c2d04faf7313faf43bdbcde72a3ad9ee21 (diff) | |
download | coreboot-2e7efe65a23570ba654187412052e7eb7583858f.tar.xz |
nb/intel/x4x: Don't run NGI if IGD has not been assigned VGA cycles
The NGI writes to legacy VGA registers which should not happen when
VGA cycles are assigned to a different device.
TESTED on ga-g41m-es2l
Change-Id: I0a03e35c0d7f2532edd6cc5e62d1cf07dab57f60
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/19607
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Patrick Rudolph <siro@das-labor.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
-rw-r--r-- | src/northbridge/intel/x4x/gma.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/src/northbridge/intel/x4x/gma.c b/src/northbridge/intel/x4x/gma.c index c2df07424e..f53320a040 100644 --- a/src/northbridge/intel/x4x/gma.c +++ b/src/northbridge/intel/x4x/gma.c @@ -356,7 +356,7 @@ static void native_init(struct device *dev) static void gma_func0_init(struct device *dev) { - u16 reg16; + u16 reg16, ggc; u32 reg32; /* IGD needs to be Bus Master */ @@ -370,10 +370,18 @@ static void gma_func0_init(struct device *dev) reg16 |= 0xbc; pci_write_config16(dev_find_slot(0, PCI_DEVFN(0x2, 0)), 0xcc, reg16); - if (IS_ENABLED(CONFIG_MAINBOARD_DO_NATIVE_VGA_INIT)) + ggc = pci_read_config16(dev_find_slot(0, PCI_DEVFN(0, 0)), D0F0_GGC); + + if (IS_ENABLED(CONFIG_MAINBOARD_DO_NATIVE_VGA_INIT)) { + if (ggc & (1 << 1)) { + printk(BIOS_DEBUG, "VGA cycles not assigned to IGD. " + "Not running native graphic init.\n"); + return; + } native_init(dev); - else + } else { pci_dev_init(dev); + } } static void gma_func0_disable(struct device *dev) |