diff options
author | Jonathan Neuschäfer <j.neuschaefer@gmx.net> | 2016-11-24 08:25:29 +0100 |
---|---|---|
committer | Ronald G. Minnich <rminnich@gmail.com> | 2016-12-06 18:48:28 +0100 |
commit | fc5e6c6696b7c7f6af0311dbb0870602b12bed73 (patch) | |
tree | bccce4d5102f51ac442afd5ed294444472da0cb3 /src/soc/ucb/riscv/cbmem.c | |
parent | ba571c79af41261bcb378aca343ddd2990da6d76 (diff) |
soc/ucb/riscv: Place CBMEM at top of autodetected RAM
Change-Id: Ida016aec11ccdb8da8d2ae1d30ddca16b069be11
Signed-off-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net>
Reviewed-on: https://review.coreboot.org/17595
Tested-by: build bot (Jenkins)
Reviewed-by: Ronald G. Minnich <rminnich@gmail.com>
Diffstat (limited to 'src/soc/ucb/riscv/cbmem.c')
-rw-r--r-- | src/soc/ucb/riscv/cbmem.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/soc/ucb/riscv/cbmem.c b/src/soc/ucb/riscv/cbmem.c index 0e0eec196b..44ffa26939 100644 --- a/src/soc/ucb/riscv/cbmem.c +++ b/src/soc/ucb/riscv/cbmem.c @@ -12,9 +12,14 @@ */ #include <cbmem.h> +#include <commonlib/configstring.h> void *cbmem_top(void) { - // TODO: find out how RISCV stores this. - return (void *)((uintptr_t)3*GiB); + uintptr_t base; + size_t size; + + query_mem(configstring(), &base, &size); + + return (void *)(base + size); } |