From b5fb0c5c4eda2329d848aedcf4f7e8b6dc8012b2 Mon Sep 17 00:00:00 2001 From: Stefan Reinauer Date: Thu, 30 Apr 2009 13:58:42 +0000 Subject: Add high tables support to all northbridges. Signed-off-by: Stefan Reinauer Acked-by: Patrick Georgi git-svn-id: svn://svn.coreboot.org/coreboot/trunk@4238 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1 --- src/northbridge/amd/lx/Config.lb | 2 ++ src/northbridge/amd/lx/northbridge.c | 15 ++++++++++++++- 2 files changed, 16 insertions(+), 1 deletion(-) (limited to 'src/northbridge/amd/lx') diff --git a/src/northbridge/amd/lx/Config.lb b/src/northbridge/amd/lx/Config.lb index 9b1d4c2c71..b9388893ab 100644 --- a/src/northbridge/amd/lx/Config.lb +++ b/src/northbridge/amd/lx/Config.lb @@ -1,4 +1,6 @@ +uses HAVE_HIGH_TABLES config chip.h driver northbridge.o object northbridgeinit.o object grphinit.o +default HAVE_HIGH_TABLES=1 diff --git a/src/northbridge/amd/lx/northbridge.c b/src/northbridge/amd/lx/northbridge.c index 9762510cf4..390c94cf78 100644 --- a/src/northbridge/amd/lx/northbridge.c +++ b/src/northbridge/amd/lx/northbridge.c @@ -415,19 +415,32 @@ static void ram_resource(device_t dev, unsigned long index, IORESOURCE_FIXED | IORESOURCE_STORED | IORESOURCE_ASSIGNED; } +#if HAVE_HIGH_TABLES==1 +#define HIGH_TABLES_SIZE 64 // maximum size of high tables in KB +extern uint64_t high_tables_base, high_tables_size; +#endif + static void pci_domain_set_resources(device_t dev) { int idx; + u32 tomk; device_t mc_dev; printk_spew(">> Entering northbridge.c: %s\n", __func__); mc_dev = dev->link[0].children; if (mc_dev) { + tomk = get_systop() / 1024; /* Report the memory regions */ idx = 10; ram_resource(dev, idx++, 0, 640); - ram_resource(dev, idx++, 1024, (get_systop() - 0x100000) / 1024); // Systop - 1 MB -> KB + ram_resource(dev, idx++, 1024, tomk - 1024); // Systop - 1 MB -> KB + +#if HAVE_HIGH_TABLES==1 + /* Leave some space for ACPI, PIRQ and MP tables */ + high_tables_base = (tomk - HIGH_TABLES_SIZE) * 1024; + high_tables_size = HIGH_TABLES_SIZE * 1024; +#endif } assign_resources(&dev->link[0]); -- cgit v1.2.3