Zheng, can you please test this with HIGH_TABLES enabled (and a new FILO)?
A full log would be appreciated. Thanks.

This hopefully will fix AMD 690 HIGH_TABLES or at least give me an
insight into why HIGH_TABLES fails.

Signed-off-by: Carl-Daniel Hailfinger <[email protected]>

Index: LinuxBIOSv2-asus_m2a-vm/src/northbridge/amd/amdk8/northbridge.c
===================================================================
--- LinuxBIOSv2-asus_m2a-vm/src/northbridge/amd/amdk8/northbridge.c     
(Revision 4339)
+++ LinuxBIOSv2-asus_m2a-vm/src/northbridge/amd/amdk8/northbridge.c     
(Arbeitskopie)
@@ -896,6 +896,7 @@
 #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;
+extern uint64_t uma_memory_base, uma_memory_size;
 #endif
 
 static void pci_domain_set_resources(device_t dev)
@@ -1066,7 +1067,9 @@
                }
 
 
-//             printk_debug("node %d : mmio_basek=%08x, basek=%08x, 
limitk=%08x\n", i, mmio_basek, basek, limitk); //yhlu
+               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);
 
                /* See if I need to split the region to accomodate pci memory 
space */
                if ( (basek < 4*1024*1024 ) && (limitk > mmio_basek) ) {
@@ -1080,7 +1083,7 @@
 #if HAVE_HIGH_TABLES==1
                                        if (i==0 && high_tables_base==0) {
                                        /* Leave some space for ACPI, PIRQ and 
MP tables */
-                                               high_tables_base = (mmio_basek 
- HIGH_TABLES_SIZE) * 1024;
+                                               high_tables_base = 
((uma_memory_base >> 10) - HIGH_TABLES_SIZE) * 1024;
                                                high_tables_size = 
HIGH_TABLES_SIZE * 1024;
                                                printk_debug("(split)%xK table 
at =%08llx\n", HIGH_TABLES_SIZE,
                                                             high_tables_base);
@@ -1105,6 +1108,9 @@
                                sizek -= (4*1024*1024 - mmio_basek);
                        }
                }
+
+               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 sizek == 0, it was split at mmio_basek without a hole.
                 * Don't create an empty ram_resource.
                 */
@@ -1116,7 +1122,7 @@
                             i, mmio_basek, basek, limitk);
                if (i==0 && high_tables_base==0) {
                /* Leave some space for ACPI, PIRQ and MP tables */
-                       high_tables_base = (limitk - HIGH_TABLES_SIZE) * 1024;
+                       high_tables_base = ((uma_memory_base >> 10) - 
HIGH_TABLES_SIZE) * 1024;
                        high_tables_size = HIGH_TABLES_SIZE * 1024;
                }
 #endif


-- 
http://www.hailfinger.org/

Index: LinuxBIOSv2-asus_m2a-vm/src/northbridge/amd/amdk8/northbridge.c
===================================================================
--- LinuxBIOSv2-asus_m2a-vm/src/northbridge/amd/amdk8/northbridge.c     
(Revision 4339)
+++ LinuxBIOSv2-asus_m2a-vm/src/northbridge/amd/amdk8/northbridge.c     
(Arbeitskopie)
@@ -896,6 +896,7 @@
 #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;
+extern uint64_t uma_memory_base, uma_memory_size;
 #endif
 
 static void pci_domain_set_resources(device_t dev)
@@ -1066,7 +1067,9 @@
                }
 
 
-//             printk_debug("node %d : mmio_basek=%08x, basek=%08x, 
limitk=%08x\n", i, mmio_basek, basek, limitk); //yhlu
+               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);
 
                /* See if I need to split the region to accomodate pci memory 
space */
                if ( (basek < 4*1024*1024 ) && (limitk > mmio_basek) ) {
@@ -1080,7 +1083,7 @@
 #if HAVE_HIGH_TABLES==1
                                        if (i==0 && high_tables_base==0) {
                                        /* Leave some space for ACPI, PIRQ and 
MP tables */
-                                               high_tables_base = (mmio_basek 
- HIGH_TABLES_SIZE) * 1024;
+                                               high_tables_base = 
((uma_memory_base >> 10) - HIGH_TABLES_SIZE) * 1024;
                                                high_tables_size = 
HIGH_TABLES_SIZE * 1024;
                                                printk_debug("(split)%xK table 
at =%08llx\n", HIGH_TABLES_SIZE,
                                                             high_tables_base);
@@ -1105,6 +1108,9 @@
                                sizek -= (4*1024*1024 - mmio_basek);
                        }
                }
+
+               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 sizek == 0, it was split at mmio_basek without a hole.
                 * Don't create an empty ram_resource.
                 */
@@ -1116,7 +1122,7 @@
                             i, mmio_basek, basek, limitk);
                if (i==0 && high_tables_base==0) {
                /* Leave some space for ACPI, PIRQ and MP tables */
-                       high_tables_base = (limitk - HIGH_TABLES_SIZE) * 1024;
+                       high_tables_base = ((uma_memory_base >> 10) - 
HIGH_TABLES_SIZE) * 1024;
                        high_tables_size = HIGH_TABLES_SIZE * 1024;
                }
 #endif
-- 
coreboot mailing list: [email protected]
http://www.coreboot.org/mailman/listinfo/coreboot

Reply via email to