[coreboot-gerrit] New patch to review for coreboot: 14dc66b haswell: mark graphics memory write-combining.
Aaron Durbin (adurbin@google.com)
gerrit at coreboot.org
Sat Mar 23 06:44:48 CET 2013
Aaron Durbin (adurbin at google.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/2893
-gerrit
commit 14dc66b92c7b8bc3d959ada57ba5fa5b937603da
Author: Aaron Durbin <adurbin at chromium.org>
Date: Fri Mar 22 22:23:05 2013 -0500
haswell: mark graphics memory write-combining.
The graphics memory can be accessed in a faster manner by
setting it to write-combing mode.
Change-Id: I797fcd9f0dfb074f9e45476773acbfe614eb4b0a
Signed-off-by: Aaron Durbin <adurbin at chromium.org>
---
src/northbridge/intel/haswell/gma.c | 17 ++++++++++++++++-
1 file changed, 16 insertions(+), 1 deletion(-)
diff --git a/src/northbridge/intel/haswell/gma.c b/src/northbridge/intel/haswell/gma.c
index d085066..f7b0ab9 100644
--- a/src/northbridge/intel/haswell/gma.c
+++ b/src/northbridge/intel/haswell/gma.c
@@ -217,12 +217,27 @@ static void gma_set_subsystem(device_t dev, unsigned vendor, unsigned device)
}
}
+static void gma_read_resources(struct device *dev)
+{
+ struct resource *res;
+
+ pci_dev_read_resources(dev);
+
+ /* Set the graphics memory to write combining. */
+ res = find_resource(dev, PCI_BASE_ADDRESS_2);
+ if (res == NULL) {
+ printk(BIOS_DEBUG, "gma: memory resource not found.\n");
+ return;
+ }
+ res->flags |= IORESOURCE_WRCOMB;
+}
+
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_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