[coreboot] [v2] r4835 - trunk/coreboot-v2/src/northbridge/amd/amdk8

svn at coreboot.org svn at coreboot.org
Sat Oct 24 14:40:52 CEST 2009


Author: stepan
Date: 2009-10-24 14:40:52 +0200 (Sat, 24 Oct 2009)
New Revision: 4835

Modified:
   trunk/coreboot-v2/src/northbridge/amd/amdk8/northbridge.c
Log:

Fix K8 boards high tables on UMA systems (KT690 for example)

Thanks to Carl-Daniel for pointing this out with some example code.

Signed-off-by: Stefan Reinauer <stepan at coresystems.de>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006 at gmx.net>


Modified: trunk/coreboot-v2/src/northbridge/amd/amdk8/northbridge.c
===================================================================
--- trunk/coreboot-v2/src/northbridge/amd/amdk8/northbridge.c	2009-10-24 03:55:24 UTC (rev 4834)
+++ trunk/coreboot-v2/src/northbridge/amd/amdk8/northbridge.c	2009-10-24 12:40:52 UTC (rev 4835)
@@ -837,7 +837,10 @@
 #if CONFIG_WRITE_HIGH_TABLES==1
 #define HIGH_TABLES_SIZE 64	// maximum size of high tables in KB
 extern uint64_t high_tables_base, high_tables_size;
+#if CONFIG_GFXUMA == 1
+extern uint64_t uma_memory_base, uma_memory_size;
 #endif
+#endif
 
 static void amdk8_domain_set_resources(device_t dev)
 {
@@ -1001,7 +1004,13 @@
 		}
 
 
+#if CONFIG_GFXUMA == 1
+		printk_debug("node %d : uma_memory_base/1024=0x%08x, mmio_basek=0x%08x, basek=0x%08x, limitk=0x%08x\n", i, uma_memory_base >> 10, mmio_basek, basek, limitk);
+		if ((uma_memory_base >> 10) < mmio_basek)
+			printk_alert("node %d: UMA memory starts below mmio_basek\n", i);
+#else
 //		printk_debug("node %d : mmio_basek=%08x, basek=%08x, limitk=%08x\n", i, mmio_basek, basek, limitk); //yhlu
+#endif
 
 		/* See if I need to split the region to accomodate pci memory space */
 		if ( (basek < 4*1024*1024 ) && (limitk > mmio_basek) ) {
@@ -1015,7 +1024,11 @@
 #if CONFIG_WRITE_HIGH_TABLES==1
 					if (i==0 && high_tables_base==0) {
 					/* Leave some space for ACPI, PIRQ and MP tables */
+#if CONFIG_GFXUMA == 1
+						high_tables_base = ((uma_memory_base >> 10) - HIGH_TABLES_SIZE) * 1024;
+#else
 						high_tables_base = (mmio_basek - HIGH_TABLES_SIZE) * 1024;
+#endif
 						high_tables_size = HIGH_TABLES_SIZE * 1024;
 						printk_debug(" split: %dK table at =%08llx\n", HIGH_TABLES_SIZE,
 							     high_tables_base);
@@ -1051,7 +1064,11 @@
 			     i, mmio_basek, basek, limitk);
 		if (i==0 && high_tables_base==0) {
 		/* Leave some space for ACPI, PIRQ and MP tables */
+#if CONFIG_GFXUMA == 1
+			high_tables_base = ((uma_memory_base >> 10) - HIGH_TABLES_SIZE) * 1024;
+#else
 			high_tables_base = (limitk - HIGH_TABLES_SIZE) * 1024;
+#endif
 			high_tables_size = HIGH_TABLES_SIZE * 1024;
 		}
 #endif





More information about the coreboot mailing list