From fd2501b3f1af1d649484dcdae562cd0694eb61ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ky=C3=B6sti=20M=C3=A4lkki?= Date: Sat, 31 May 2014 16:36:29 +0300 Subject: i945: Fix TSEG size allocation for get_top_of_ram() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Seems boards with i945 had TSEG disabled so this had gone unnoticed. Signed-off-by: Kyösti Mälkki Change-Id: I6a00ea9121847ce2fede22538e1b53a870d761f1 Reviewed-on: http://review.coreboot.org/5892 Tested-by: build bot (Jenkins) Reviewed-by: Paul Menzel Reviewed-by: Vladimir Serbinenko --- src/northbridge/intel/i945/ram_calc.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/northbridge/intel/i945/ram_calc.c b/src/northbridge/intel/i945/ram_calc.c index 23e3f41fa4..d09b2e1b10 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 */ -- cgit v1.2.3