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@raptorengineeringinc.com>
Reviewed-on: http://review.coreboot.org/11240
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
This commit is contained in:
Timothy Pearson 2015-08-14 16:31:14 -05:00 committed by Stefan Reinauer
parent b95fc308af
commit 5cac25e6b2
1 changed files with 13 additions and 0 deletions

View File

@ -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) static void amdfam10_create_vga_resource(device_t dev, unsigned nodeid)
{ {
struct bus *link; struct bus *link;
struct resource *res;
/* find out which link the VGA card is connected, /* find out which link the VGA card is connected,
* we only deal with the 'first' vga card */ * 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); 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); 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) static void amdfam10_set_resources(device_t dev)