summaryrefslogtreecommitdiff
path: root/src/soc/ucb/riscv/cbmem.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/soc/ucb/riscv/cbmem.c')
-rw-r--r--src/soc/ucb/riscv/cbmem.c9
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);
}