summaryrefslogtreecommitdiff
path: root/src/soc/ucb/riscv
diff options
context:
space:
mode:
Diffstat (limited to 'src/soc/ucb/riscv')
-rw-r--r--src/soc/ucb/riscv/cbmem.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/src/soc/ucb/riscv/cbmem.c b/src/soc/ucb/riscv/cbmem.c
index 2ee400ab8b..542e08d05e 100644
--- a/src/soc/ucb/riscv/cbmem.c
+++ b/src/soc/ucb/riscv/cbmem.c
@@ -12,16 +12,10 @@
*/
#include <cbmem.h>
+#include <symbols.h>
+#include <ramdetect.h>
void *cbmem_top(void)
{
- uintptr_t base;
- size_t size;
-
- /* Use dummy values until we can query the memory size again */
- //query_mem(configstring(), &base, &size);
- base = 0x80000000;
- size = 128 * MiB;
-
- return (void *)(base + size);
+ return _dram + (probe_ramsize((uintptr_t)_dram, CONFIG_DRAM_SIZE_MB) * MiB);
}