The attached patch sets the MA map type correctly for all DIMMs I was able to find to test with the Epia.
-Alex Mauer "hawke"
Index: src/northbridge/via/vt8601/raminit.c =================================================================== --- src/northbridge/via/vt8601/raminit.c (revision 2639) +++ src/northbridge/via/vt8601/raminit.c (working copy) @@ -377,18 +377,18 @@ if (!size) continue;
- /* Calculate the value of MA mapping type register, - * based on size of SDRAM chips. */ - size = (size & 0xffff) << (3 + 3); - /* convert module size to be in Mbits */ - size /= spd_num_chips(slot); - print_debug_hex16(size); - print_debug(" is the chip size\r\n"); - if (size < 64) - ma = 0; - else if (size < 256) - ma = 8; - else +/* Read the row densities */ + size = smbus_read_byte(0x50+slot, 0x1f); +/* Set the MA map type. + * 0xa should be another option, but when it would be used is unknown. + */ + if (size < 16 ) /* less than 64 MB per side */ + ma = 0x0; + else if (size < 32) /* less than 128MB per side */ + ma = 0x8; + else if ( size < 64) /* less than 256MB per side */ + ma = 0xc; + else /* 256MB or more per side */ ma = 0xe; print_debug_hex16(ma); print_debug(" is the MA type\r\n");
On Wed, May 09, 2007 at 05:18:19PM -0500, Alex Mauer wrote:
The attached patch sets the MA map type correctly for all DIMMs I was able to find to test with the Epia.
Thanks, but please resend with a sign-off, see http://linuxbios.org/Development_Guidelines#Sign-off_Procedure
Uwe.
The attached patch sets the MA map type correctly for all DIMMs I was able to find to test with the Epia.
Signed-off-by: Alex Mauer hawke@hawkesnest.net
Index: src/northbridge/via/vt8601/raminit.c =================================================================== --- src/northbridge/via/vt8601/raminit.c (revision 2639) +++ src/northbridge/via/vt8601/raminit.c (working copy) @@ -377,18 +377,18 @@ if (!size) continue;
- /* Calculate the value of MA mapping type register, - * based on size of SDRAM chips. */ - size = (size & 0xffff) << (3 + 3); - /* convert module size to be in Mbits */ - size /= spd_num_chips(slot); - print_debug_hex16(size); - print_debug(" is the chip size\r\n"); - if (size < 64) - ma = 0; - else if (size < 256) - ma = 8; - else +/* Read the row densities */ + size = smbus_read_byte(0x50+slot, 0x1f); +/* Set the MA map type. + * 0xa should be another option, but when it would be used is unknown. + */ + if (size < 16 ) /* less than 64 MB per side */ + ma = 0x0; + else if (size < 32) /* less than 128MB per side */ + ma = 0x8; + else if ( size < 64) /* less than 256MB per side */ + ma = 0xc; + else /* 256MB or more per side */ ma = 0xe; print_debug_hex16(ma); print_debug(" is the MA type\r\n");
* Alex Mauer hawke@hawkesnest.net [070510 17:09]:
The attached patch sets the MA map type correctly for all DIMMs I was able to find to test with the Epia.
Signed-off-by: Alex Mauer hawke@hawkesnest.net
r2653.
Can you confirm that this revision works (ie. boots a kernel) on your Epia?
What Epia is it?
Stefan Reinauer wrote:
r2653.
Thank you.
Can you confirm that this revision works (ie. boots a kernel) on your Epia?
I can. There are still memory problems though, at least with some memory configurations. It also hangs sometimes on the spd_read_byte call which I added. A hi-density (16-bit module width) 256MB DIMM in slot 0 works perfectly to the best that I can test. A low-density (8-bit module width) 64MB DIMM in slot 0 also works perfectly.
Memtest86 passes all tested configurations as long as the "probe" option was selected for memory sizing. it fails when using the "BIOS-Std" and "BIOS-All" method for memory sizing (it uses the LinuxBIOS MemMap type in this case). The MA map type patch does allow memtest to detect the proper quantity of RAM in all configurations I could test.
the debian package 'memtester' passes all tests in the single high-density 256MB DIMM in slot 0 configuration and the single low-density 64MB DIMM in slot 0 configuration. It fails with a high-density 128MB DIMM in slot 0, and with any additional DIMMs in slot 1.
What Epia is it?
It is an epia 800.
-Alex Mauer "hawke"