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@gmail.com> Change-Id: I6a00ea9121847ce2fede22538e1b53a870d761f1 Reviewed-on: http://review.coreboot.org/5892 Tested-by: build bot (Jenkins) Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Vladimir Serbinenko <phcoder@gmail.com>
This commit is contained in:
parent
15935ebe24
commit
fd2501b3f1
|
@ -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 */
|
||||
|
|
Loading…
Reference in New Issue