<br><br><div class="gmail_quote">On Wed, Oct 14, 2009 at 6:40 PM, Carl-Daniel Hailfinger <span dir="ltr"><<a href="mailto:c-d.hailfinger.devel.2006@gmx.net">c-d.hailfinger.devel.2006@gmx.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi,<br>
<br>
Myles, this is the patch which fixes HIGH_TABLES with UMA.<br></blockquote><div>Thanks. I've commented in line.<br> </div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="im">
Signed-off-by: Carl-Daniel Hailfinger <<a href="mailto:c-d.hailfinger.devel.2006@gmx.net">c-d.hailfinger.devel.2006@gmx.net</a>><br>
<br>
</div><div class="im">Index: LinuxBIOSv2-asus_m2a-vm/src/northbridge/amd/amdk8/northbridge.c<br>
===================================================================<br>
</div>--- LinuxBIOSv2-asus_m2a-vm/src/northbridge/amd/amdk8/northbridge.c (Revision 4776)<br>
<div class="im">+++ LinuxBIOSv2-asus_m2a-vm/src/northbridge/amd/amdk8/northbridge.c (Arbeitskopie)<br>
</div>@@ -839,6 +839,7 @@<br>
#if CONFIG_HAVE_HIGH_TABLES==1<br>
<div class="im"> #define HIGH_TABLES_SIZE 64 // maximum size of high tables in KB<br></div></blockquote><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="im">
extern uint64_t high_tables_base, high_tables_size;<br>
</div></blockquote><div>#if CONFIG_SOUTHBRIDGE_AMD_RS690 // I guess this could be board-specific too, since that's where these variables are defined. <br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="im">+extern uint64_t uma_memory_base, uma_memory_size;<br></div></blockquote><div>#endif <br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="im">
#endif<br>
<br>
</div> static void amdk8_domain_set_resources(device_t dev)<br>
@@ -1003,7 +1004,9 @@<br>
<div class="im"> }<br>
<br>
<br>
-// printk_debug("node %d : mmio_basek=%08x, basek=%08x, limitk=%08x\n", i, mmio_basek, basek, limitk); //yhlu<br>
+ 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);<br>
+ if ((uma_memory_base >> 10) < mmio_basek)<br>
+ printk_alert("node %d: UMA memory starts below mmio_basek\n", i);<br></div></blockquote><div>This will always be true, right? mmio_basek is the PCI region, which should always be above the last few MB of RAM.<br>
<br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class="im">
<br>
/* See if I need to split the region to accomodate pci memory space */<br>
if ( (basek < 4*1024*1024 ) && (limitk > mmio_basek) ) {<br>
</div>@@ -1017,7 +1020,7 @@<br>
#if CONFIG_HAVE_HIGH_TABLES==1<br>
<div class="im"> if (i==0 && high_tables_base==0) {<br>
/* Leave some space for ACPI, PIRQ and MP tables */<br>
- high_tables_base = (mmio_basek - HIGH_TABLES_SIZE) * 1024;<br>
+ high_tables_base = ((uma_memory_base >> 10) - HIGH_TABLES_SIZE) * 1024;<br></div></blockquote><div>No real need to shift it then multiply it again.<br> <br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="im">
high_tables_size = HIGH_TABLES_SIZE * 1024;<br>
</div> printk_debug(" split: %dK table at =%08llx\n", HIGH_TABLES_SIZE,<br>
high_tables_base);<br>
@@ -1042,6 +1045,9 @@<br>
<div class="im"> sizek -= (4*1024*1024 - mmio_basek);<br>
}<br>
}<br>
+<br>
+ 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);<br>
+<br>
/* If sizek == 0, it was split at mmio_basek without a hole.<br>
* Don't create an empty ram_resource.<br>
*/<br>
</div>@@ -1053,7 +1059,7 @@<br>
<div class="im"> i, mmio_basek, basek, limitk);<br>
if (i==0 && high_tables_base==0) {<br>
/* Leave some space for ACPI, PIRQ and MP tables */<br></div></blockquote><div>#if <br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="im">
- high_tables_base = (limitk - HIGH_TABLES_SIZE) * 1024;<br></div></blockquote><div>#else <br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="im">
+ high_tables_base = ((uma_memory_base >> 10) - HIGH_TABLES_SIZE) * 1024;<br></div></blockquote><div>#endif <br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="im">
high_tables_size = HIGH_TABLES_SIZE * 1024;<br>
}<br>
#endif<br>
<br>
<br>
--<br>
</div>Developer quote of the week:<br>
"We are juggling too many chainsaws and flaming arrows and tigers."<br>
<br>
</blockquote></div><br>