See attached for patch with sign-off inside. Boot tested on ASUS P2B-LS with both regular and registered ECC modules.
Now that I got some registered ECC modules in, I am able to code up this patch to allow registered SDRAM to initialize. This is needed in advance of ECC support because most ECC modules are registered. The same modules I have also happened to be electrically "256MB single side" so I am finally able to, unfortunately, exercise the "set it smaller so at least I can use it" patch of r5508.
ECC is still not enabled in this patch. That would be for a separate patch.
Enjoy Keith
On 3/27/11 5:36 AM, Keith Hui wrote:
Adds support for initializing registered SDRAM modules on Intel 440BX northbridge.
Signed-off-by: Keith Hui buurin@gmail.com
Index: src/northbridge/intel/i440bx/raminit.c
--- src/northbridge/intel/i440bx/raminit.c (revision 6460) +++ src/northbridge/intel/i440bx/raminit.c (working copy)
- /* Set DRAMC[4:3] to proper memory type (EDO/SDRAM/Registered
SDRAM). */
- if ((edosd & 0x84) == 0x84) {
edosd = 0x10; // Registered SDRAM
- } else {
// Clear [4:3] in case it's EDO.
edosd &= 0x07;
+// } else if (edosd & 0x02) {
Besides being commented out, this piece of code would never be executed, as there already is an else case. Also, modifying edosd in place is semi nice.
Please clean this up before committing. Maybe consider using switch/case?
Looks good otherwise.
+// edosd |= 0x00;
if (edosd & 0x04) {
edosd |= 0x08; // SDRAM
}
}
// Keep only [4:3]. edosd &= 0x18;
/* edosd is now in the form needed for DRAMC[4:3]. */