[coreboot-gerrit] New patch to review for coreboot: 28372ad AMD Northbridge LX: simplify get_top_of_ram()
Christian Gmeiner (christian.gmeiner@gmail.com)
gerrit at coreboot.org
Thu Jun 6 14:08:18 CEST 2013
Christian Gmeiner (christian.gmeiner at gmail.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/3380
-gerrit
commit 28372ad87de52b3cc2b7009aa211f2791388369a
Author: Christian Gmeiner <christian.gmeiner at gmail.com>
Date: Thu Jun 6 14:37:49 2013 +0200
AMD Northbridge LX: simplify get_top_of_ram()
Get rid of not needed dependency to gliu0table. This change is
needed to move get_top_of_ram() to raminit.c - as needed for
EARLY_CBMEM_INIT.
Boot tested on a Bachmann OT200.
Change-Id: I0bfe40c366a3537775d5c1ff8e0b1f5ac94320b7
Signed-off-by: Christian Gmeiner <christian.gmeiner at gmail.com>
---
src/northbridge/amd/lx/northbridgeinit.c | 20 ++++----------------
1 file changed, 4 insertions(+), 16 deletions(-)
diff --git a/src/northbridge/amd/lx/northbridgeinit.c b/src/northbridge/amd/lx/northbridgeinit.c
index 3768777..cb9baa3 100644
--- a/src/northbridge/amd/lx/northbridgeinit.c
+++ b/src/northbridge/amd/lx/northbridgeinit.c
@@ -715,25 +715,13 @@ static void setup_lx_cache(void)
uint32_t get_top_of_ram(void)
{
- struct gliutable *gl = 0;
uint32_t systop;
msr_t msr;
- int i;
- for (i = 0; gliu0table[i].desc_name != GL_END; i++) {
- if (gliu0table[i].desc_type == R_SYSMEM) {
- gl = &gliu0table[i];
- break;
- }
- }
- if (gl) {
- msr = rdmsr(gl->desc_name);
- systop = ((msr.hi & 0xFF) << 24) | ((msr.lo & 0xFFF00000) >> 8);
- systop += 0x1000; /* 4K */
- } else {
- systop =
- ((sizeram() - CONFIG_VIDEO_MB) * 1024) - SMM_SIZE - 1024;
- }
+ msr = rdmsr(MSR_GLIU0_SYSMEM);
+ systop = ((msr.hi & 0xFF) << 24) | ((msr.lo & 0xFFF00000) >> 8);
+ systop += 0x1000; /* 4K */
+
return systop;
}
More information about the coreboot-gerrit
mailing list