Author: hailfinger Date: 2009-06-05 22:37:35 +0200 (Fri, 05 Jun 2009) New Revision: 4341
Modified: trunk/coreboot-v2/src/northbridge/amd/amdk8/raminit.c trunk/coreboot-v2/src/northbridge/amd/amdk8/raminit_f.c Log: K8 RAM init debug messages are pretty short and sometimes cryptic. Make them a bit more verbose and hopefully more understandable.
Old messages for my machine with 5 GB: RAM: 0x00400000 kB Ram3 [...] Initializing memory: done RAM: 0x00500000 kB
New messages: RAM end at 0x00400000 kB Adjusting lower RAM end Lower RAM end at 0x003f0000 kB Ram3 [...] Initializing memory: done Handling memory hole at 0x00300000 (default) RAM end at 0x00500000 kB Handling memory mapped above 4 GB Upper RAM end at 0x00500000 kB Correcting memory amount mapped below 4 GB Adjusting lower RAM end Lower RAM end at 0x00300000 kB
Signed-off-by: Carl-Daniel Hailfinger c-d.hailfinger.devel.2006@gmx.net Acked-by: Myles Watson mylesgw@gmail.com
Modified: trunk/coreboot-v2/src/northbridge/amd/amdk8/raminit.c =================================================================== --- trunk/coreboot-v2/src/northbridge/amd/amdk8/raminit.c 2009-06-05 11:41:51 UTC (rev 4340) +++ trunk/coreboot-v2/src/northbridge/amd/amdk8/raminit.c 2009-06-05 20:37:35 UTC (rev 4341) @@ -850,14 +850,17 @@ }
/* Report the amount of memory. */ - printk_spew("RAM: 0x%08x kB\n", tom_k); + printk_debug("RAM end at 0x%08x kB\n", tom_k);
/* Now set top of memory */ msr_t msr; if (tom_k > (4*1024*1024)) { + printk_raminit("Handling memory mapped above 4 GB\n"); + printk_raminit("Upper RAM end at 0x%08x kB\n", tom_k); msr.lo = (tom_k & 0x003fffff) << 10; msr.hi = (tom_k & 0xffc00000) >> 22; wrmsr(TOP_MEM2, msr); + printk_raminit("Correcting memory amount mapped below 4 GB\n"); }
/* Leave a 64M hole between TOP_MEM and TOP_MEM2 @@ -870,7 +873,9 @@ } else #endif tom_k = 0x3f0000; + printk_raminit("Adjusting lower RAM end\n"); } + printk_raminit("Lower RAM end at 0x%08x kB\n", tom_k); msr.lo = (tom_k & 0x003fffff) << 10; msr.hi = (tom_k & 0xffc00000) >> 22; wrmsr(TOP_MEM, msr); @@ -2167,6 +2172,7 @@
hole_startk = 4*1024*1024 - HW_MEM_HOLE_SIZEK;
+ printk_raminit("Handling memory hole at 0x%08x (default)\n", hole_startk); #if HW_MEM_HOLE_SIZE_AUTO_INC == 1 /* We need to double check if hole_startk is valid. * If it is equal to the dram base address in K (base_k), @@ -2191,6 +2197,7 @@ basek_pri = base_k; }
+ printk_raminit("Handling memory hole at 0x%08x (adjusted)\n", hole_startk); #endif /* Find node number that needs the memory hole configured */ for (i=0; i<controllers; i++) {
Modified: trunk/coreboot-v2/src/northbridge/amd/amdk8/raminit_f.c =================================================================== --- trunk/coreboot-v2/src/northbridge/amd/amdk8/raminit_f.c 2009-06-05 11:41:51 UTC (rev 4340) +++ trunk/coreboot-v2/src/northbridge/amd/amdk8/raminit_f.c 2009-06-05 20:37:35 UTC (rev 4341) @@ -1049,14 +1049,17 @@ }
/* Report the amount of memory. */ - printk_debug("RAM: 0x%08x kB\n", tom_k); + printk_debug("RAM end at 0x%08x kB\n", tom_k);
/* Now set top of memory */ msr_t msr; if (tom_k > (4*1024*1024)) { + printk_raminit("Handling memory mapped above 4 GB\n"); + printk_raminit("Upper RAM end at 0x%08x kB\n", tom_k); msr.lo = (tom_k & 0x003fffff) << 10; msr.hi = (tom_k & 0xffc00000) >> 22; wrmsr(TOP_MEM2, msr); + printk_raminit("Correcting memory amount mapped below 4 GB\n"); }
/* Leave a 64M hole between TOP_MEM and TOP_MEM2 @@ -1069,7 +1072,9 @@ } else #endif tom_k = 0x3f0000; + printk_raminit("Adjusting lower RAM end\n"); } + printk_raminit("Lower RAM end at 0x%08x kB\n", tom_k); msr.lo = (tom_k & 0x003fffff) << 10; msr.hi = (tom_k & 0xffc00000) >> 22; wrmsr(TOP_MEM, msr); @@ -2938,6 +2943,7 @@
hole_startk = 4*1024*1024 - HW_MEM_HOLE_SIZEK;
+ printk_raminit("Handling memory hole at 0x%08x (default)\n", hole_startk); #if HW_MEM_HOLE_SIZE_AUTO_INC == 1 /* We need to double check if the hole_startk is valid, if it is equal to basek, we need to decrease it some */ @@ -2958,6 +2964,7 @@ } basek_pri = base_k; } + printk_raminit("Handling memory hole at 0x%08x (adjusted)\n", hole_startk); #endif /* find node index that need do set hole */ for (i=0; i < controllers; i++) {