summaryrefslogtreecommitdiff
path: root/src/northbridge/amd/gx2
diff options
context:
space:
mode:
authorStefan Reinauer <stepan@coresystems.de>2009-04-30 13:58:42 +0000
committerStefan Reinauer <stepan@openbios.org>2009-04-30 13:58:42 +0000
commitb5fb0c5c4eda2329d848aedcf4f7e8b6dc8012b2 (patch)
tree9a0897635ecbeab0dd64124cd165d3460174a359 /src/northbridge/amd/gx2
parent6841ce653741b3dafe8e3482b4a93adbaee53552 (diff)
downloadcoreboot-b5fb0c5c4eda2329d848aedcf4f7e8b6dc8012b2.tar.xz
Add high tables support to all northbridges.
Signed-off-by: Stefan Reinauer <stepan@coresystems.de> Acked-by: Patrick Georgi <patrick.georgi@coresystems.de> git-svn-id: svn://svn.coreboot.org/coreboot/trunk@4238 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'src/northbridge/amd/gx2')
-rw-r--r--src/northbridge/amd/gx2/Config.lb2
-rw-r--r--src/northbridge/amd/gx2/northbridge.c14
2 files changed, 15 insertions, 1 deletions
diff --git a/src/northbridge/amd/gx2/Config.lb b/src/northbridge/amd/gx2/Config.lb
index 4b361f5c90..342dac967c 100644
--- a/src/northbridge/amd/gx2/Config.lb
+++ b/src/northbridge/amd/gx2/Config.lb
@@ -1,5 +1,7 @@
+uses HAVE_HIGH_TABLES
config chip.h
driver northbridge.o
object northbridgeinit.o
object chipsetinit.o
object grphinit.o
+default HAVE_HIGH_TABLES=1
diff --git a/src/northbridge/amd/gx2/northbridge.c b/src/northbridge/amd/gx2/northbridge.c
index e285e52cb6..bfcef1af47 100644
--- a/src/northbridge/amd/gx2/northbridge.c
+++ b/src/northbridge/amd/gx2/northbridge.c
@@ -501,6 +501,11 @@ static struct device_operations cpu_bus_ops = {
void chipsetInit (void);
+#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 enable_dev(struct device *dev)
{
printk_debug("gx2 north: enable_dev\n");
@@ -512,6 +517,7 @@ static void enable_dev(struct device *dev)
if (dev->path.type == DEVICE_PATH_PCI_DOMAIN) {
struct northbridge_amd_gx2_config *nb = (struct northbridge_amd_gx2_config *)dev->chip_info;
extern void cpubug(void);
+ u32 tomk;
printk_debug("DEVICE_PATH_PCI_DOMAIN\n");
/* cpubug MUST be called before setup_gx2(), so we force the issue here */
northbridgeinit();
@@ -524,7 +530,13 @@ static void enable_dev(struct device *dev)
graphics_init();
dev->ops = &pci_domain_ops;
pci_set_method(dev);
- ram_resource(dev, 0, 0, ((sizeram() - VIDEO_MB) * 1024) - SMM_SIZE);
+ tomk = ((sizeram() - VIDEO_MB) * 1024) - SMM_SIZE;
+#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
+ ram_resource(dev, 0, 0, tomk);
} else if (dev->path.type == DEVICE_PATH_APIC_CLUSTER) {
printk_debug("DEVICE_PATH_APIC_CLUSTER\n");
dev->ops = &cpu_bus_ops;