[coreboot-gerrit] Patch set updated for coreboot: northbridge/amd/amdfam10: Redirect legacy VGA memory access to MMIO

Timothy Pearson (tpearson@raptorengineeringinc.com) gerrit at coreboot.org
Mon Aug 17 18:17:31 CEST 2015


Timothy Pearson (tpearson at raptorengineeringinc.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/11240

-gerrit

commit 5b2569a366fd217353104e2f749cdd081b778c92
Author: Timothy Pearson <tpearson at raptorengineeringinc.com>
Date:   Fri Aug 14 16:31:14 2015 -0500

    northbridge/amd/amdfam10: Redirect legacy VGA memory access to MMIO
    
    Commit 27baa32 (cpu/amd/model_10xxx: Do not initialize SMM memory if
    SMM is disabled) deactivated TSeg SMRAM, which had the side effect
    of routing legacy VGA memory access to DRAM.  Restore the correct
    MMIO mapping via the MMIO configuration registers.
    
    TEST: Booted KGPE-D16 with nVidia 7300LE card and verified proper VGA
    functionality.
    
    Change-Id: Ie4b7c0b2d6f9a02af9a022565fe514119513190a
    Signed-off-by: Timothy Pearson <tpearson at raptorengineeringinc.com>
---
 src/northbridge/amd/amdfam10/northbridge.c | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/src/northbridge/amd/amdfam10/northbridge.c b/src/northbridge/amd/amdfam10/northbridge.c
index f6f2641..6d91cbd 100644
--- a/src/northbridge/amd/amdfam10/northbridge.c
+++ b/src/northbridge/amd/amdfam10/northbridge.c
@@ -492,6 +492,7 @@ static void amdfam10_set_resource(device_t dev, struct resource *resource,
 static void amdfam10_create_vga_resource(device_t dev, unsigned nodeid)
 {
 	struct bus *link;
+	struct resource *res;
 
 	/* find out which link the VGA card is connected,
 	 * we only deal with the 'first' vga card */
@@ -516,6 +517,18 @@ static void amdfam10_create_vga_resource(device_t dev, unsigned nodeid)
 
 	printk(BIOS_DEBUG, "VGA: %s (aka node %d) link %d has VGA device\n", dev_path(dev), nodeid, link->link_num);
 	set_vga_enable_reg(nodeid, link->link_num);
+
+	/* Redirect VGA memory access to MMIO
+	 * This signals the Family 10h resource parser
+	 * to add a new MMIO mapping to the Range 11
+	 * MMIO control registers (starting at F1x1B8),
+	 * and also reserves the resource in the E820 map.
+	 */
+	res = new_resource(dev, IOINDEX(0x1000 + 0x1b8, link->link_num));
+	res->base = 0xa0000;
+	res->size = 0x20000;
+	res->flags = IORESOURCE_MEM | IORESOURCE_ASSIGNED | IORESOURCE_FIXED;
+	amdfam10_set_resource(dev, res, nodeid);
 }
 
 static void amdfam10_set_resources(device_t dev)



More information about the coreboot-gerrit mailing list