summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-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);
}