[coreboot-gerrit] New patch to review for coreboot: ed3d158 i945: Fix TSEG size allocation for get_top_of_ram()

Kyösti Mälkki (kyosti.malkki@gmail.com) gerrit at coreboot.org
Sat May 31 15:40:02 CEST 2014


Kyösti Mälkki (kyosti.malkki at gmail.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/5892

-gerrit

commit ed3d158b0445551ed30cc13af50091d300768c4b
Author: Kyösti Mälkki <kyosti.malkki at gmail.com>
Date:   Sat May 31 16:36:29 2014 +0300

    i945: Fix TSEG size allocation for get_top_of_ram()
    
    Seems boards with i945 had TSEG disabled so this had gone unnoticed.
    
    Signed-off-by: Kyösti Mälkki <kyosti.malkki at gmail.com>
    Change-Id: I6a00ea9121847ce2fede22538e1b53a870d761f1
---
 src/northbridge/intel/i945/ram_calc.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/northbridge/intel/i945/ram_calc.c b/src/northbridge/intel/i945/ram_calc.c
index 51eb0ff..a261439 100644
--- a/src/northbridge/intel/i945/ram_calc.c
+++ b/src/northbridge/intel/i945/ram_calc.c
@@ -36,18 +36,18 @@ unsigned long get_top_of_ram(void)
 	}
 
 	/* if TSEG enabled subtract size */
-	switch(pci_read_config8(PCI_DEV(0, 0, 0), ESMRAM)) {
+	switch(pci_read_config8(PCI_DEV(0, 0, 0), ESMRAM) & 0x07) {
 	case 0x01:
 		/* 1MB TSEG */
-		tom -= 0x10000;
+		tom -= 0x100000;
 		break;
 	case 0x03:
 		/* 2MB TSEG */
-		tom -= 0x20000;
+		tom -= 0x200000;
 		break;
 	case 0x05:
 		/* 8MB TSEG */
-		tom -= 0x80000;
+		tom -= 0x800000;
 		break;
 	default:
 		/* TSEG either disabled or invalid */



More information about the coreboot-gerrit mailing list