Patchwork [v3] Patch for enableing 440BX NB to use large memory modules

login
register
about
Submitter Paul Menzel
Date 2010-04-27 07:16:00
Message ID <1272352560.3718.3.camel@mattotaupa>
Download mbox | patch
Permalink /patch/1273/
State Accepted, archived
Commit r5508
Headers show

Comments

Paul Menzel - 2010-04-27 07:16:00
Am Dienstag, den 27.04.2010, 00:42 +0200 schrieb Anders Jenbo:
> man, 26 04 2010 kl. 16:53 +0200, skrev Stefan Reinauer:
> > On 4/26/10 4:24 PM, Anders Jenbo wrote:
> > 
> > > Stefan, since you acked the patch, should I still correct the typos that Paul pointed out and split it in to a patch, one with the added memory support and one with the cleaned white space?
> > >   
> > That would be awesome!
> 
> Ok i fixed the typos and removed the white space clean up.

I added the full stops and attached the updated version.

Just in case it is needed:

Signed-off-by: Paul Menzel <paulepanter@users.sourceforge.net>

Anders, you forgot yours sending the updated patch. (Although I also do
not know if it is needed.)

Signed-off-by: Anders Jenbo <anders@jenbo.dk>


Thanks,

Paul
Anders Jenbo - 2010-04-27 07:53:32
Paul's one is fine so use that.

Mvh Anders

Den 27/04/2010 kl. 09.16 skrev Paul Menzel <paulepanter@users.sourceforge.net 
 >:

> Am Dienstag, den 27.04.2010, 00:42 +0200 schrieb Anders Jenbo:
>> man, 26 04 2010 kl. 16:53 +0200, skrev Stefan Reinauer:
>>> On 4/26/10 4:24 PM, Anders Jenbo wrote:
>>>
>>>> Stefan, since you acked the patch, should I still correct the  
>>>> typos that Paul pointed out and split it in to a patch, one with  
>>>> the added memory support and one with the cleaned white space?
>>>>
>>> That would be awesome!
>>
>> Ok i fixed the typos and removed the white space clean up.
>
> I added the full stops and attached the updated version.
>
> Just in case it is needed:
>
> Signed-off-by: Paul Menzel <paulepanter@users.sourceforge.net>
>
> Anders, you forgot yours sending the updated patch. (Although I also  
> do
> not know if it is needed.)
>
> Signed-off-by: Anders Jenbo <anders@jenbo.dk>
>
>
> Thanks,
>
> Paul
> <440BX-use-large-memory-modules.patch>
> -- 
> coreboot mailing list: coreboot@coreboot.org
> http://www.coreboot.org/mailman/listinfo/coreboot
Peter Stuge - 2010-04-27 11:27:58
Anders Jenbo wrote:
> Paul's one is fine so use that.

That's r5508. Thanks!


//Peter

Patch

Index: src/northbridge/intel/i440bx/raminit.c

===================================================================
--- src/northbridge/intel/i440bx/raminit.c	(revision 5496)

+++ src/northbridge/intel/i440bx/raminit.c	(working copy)

@@ -694,6 +694,23 @@ 

 	sz.side1 *= 4;
 	sz.side2 *= 4;
 
+	/* It is possible to partially use larger then supported

+	 * modules by setting them to a supported size.

+	 */

+	if(sz.side1 > 128) {

+		PRINT_DEBUG("Side1 was 0x");

+		PRINT_DEBUG_HEX16(sz.side1);

+		PRINT_DEBUG(" but only 128MB will be used.\n");

+		sz.side1 = 128;

+

+		if(sz.side2 > 128) {

+			PRINT_DEBUG("Side2 was 0x");

+			PRINT_DEBUG_HEX16(sz.side2);

+			PRINT_DEBUG(" but only 128MB will be used.\n");

+			sz.side2 = 128;

+		}

+	}

+

 	return sz;
 }
 /*
@@ -792,6 +809,12 @@ 

 					dra = 0x1; /* 4KB */
 				} else if (dra == 8) {
 					dra = 0x2; /* 8KB */
+				} else if (dra >= 16) {

+					/* Page sizes larger than supported are

+					 * set to 8KB to use module partially.

+					 */

+					PRINT_DEBUG("Page size forced to 8KB.\n");

+					dra = 0x2; /* 8KB */

 				} else {
 					dra = -1;
 				}
@@ -808,6 +831,10 @@ 

 					dra = 0x05; /* 4KB */
 				} else if (dra == 8) {
 					dra = 0x0a; /* 8KB */
+				} else if (dra >= 16) {

+					/* Ditto */

+					PRINT_DEBUG("Page size forced to 8KB.\n");

+					dra = 0x0a; /* 8KB */

 				} else {
 					dra = -1;
 				}
@@ -826,7 +853,7 @@ 

 			/*
 			 * 440BX supports asymmetrical dual-sided DIMMs,
 			 * but can't handle DIMMs smaller than 8MB per
-			 * side or larger than 128MB per side.

+			 * side.

 			 */
 			struct dimm_size sz = spd_get_dimm_size(device);
 			if ((sz.side1 < 8)) {
@@ -834,11 +861,6 @@ 

 					  "are not supported on this NB.\n");
 				die("HALT\n");
 			}
-			if ((sz.side1 > 128)) {

-				print_err("DIMMs > 128MB per side\n"

-					   "are not supported on this NB\n");

-				die("HALT\n");

-			}

 
 			/* Divide size by 8 to set up the DRB registers. */
 			drb += (sz.side1 / 8);