[coreboot-gerrit] New patch to review for coreboot: e8a711a AMD Parmer: Fix issue 'Parmer lost some memory'

Siyuan Wang (wangsiyuanbuaa@gmail.com) gerrit at coreboot.org
Tue Jun 4 14:39:05 CEST 2013


Siyuan Wang (wangsiyuanbuaa at gmail.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/3366

-gerrit

commit e8a711a82d3ed92958f2382bd13ad6f878362745
Author: Siyuan Wang <wangsiyuanbuaa at gmail.com>
Date:   Tue Jun 4 19:56:22 2013 +0800

    AMD Parmer: Fix issue 'Parmer lost some memory'
    
    Take a Parmer board with 4G memory as an example:
    use 'cat /proc/meminfo' to check memory, it reads 'MemTotal 3327540kB'.
    Parmer use 512M as video memory when it has 4G.
    3327540+512*1024 = 3851828(kB), some memory is lost.
    
    When Parmer has 4G memory, TOM2 low is 0x1F000000, TOM2 high is 0x00000001
    But in e820 table or coreboot table, the last item is
    6: 0000000100000000 - 0000000118000000 = 1 RAM
    This is not correct, it should be
    6: 0000000100000000 - 000000011f000000 = 1 RAM
    
    This patch change the memory layout when TOM2 is set.
    
    Change-Id: I4e2d163ae8fe1e65ddc384b520a5112ca067b1d1
    Signed-off-by: Siyuan Wang <SiYuan.Wang at amd.com>
    Signed-off-by: Siyuan Wang <wangsiyuanbuaa at gmail.com>
---
 src/northbridge/amd/agesa/family15tn/northbridge.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/northbridge/amd/agesa/family15tn/northbridge.c b/src/northbridge/amd/agesa/family15tn/northbridge.c
index dc68f77..f91f690 100644
--- a/src/northbridge/amd/agesa/family15tn/northbridge.c
+++ b/src/northbridge/amd/agesa/family15tn/northbridge.c
@@ -811,8 +811,9 @@ static void domain_set_resources(device_t dev)
 				sizek = 0;
 			}
 			else {
+				uint64_t topmem2 = bsp_topmem2();
 				basek = 4*1024*1024;
-				sizek -= (4*1024*1024 - mmio_basek);
+				sizek = topmem2/1024 - basek;
 			}
 		}
 



More information about the coreboot-gerrit mailing list