summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/arch/riscv/mcall.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/arch/riscv/mcall.c b/src/arch/riscv/mcall.c
index fdc02bef2b..aa61ae464a 100644
--- a/src/arch/riscv/mcall.c
+++ b/src/arch/riscv/mcall.c
@@ -28,6 +28,7 @@
#include <arch/barrier.h>
#include <arch/errno.h>
#include <atomic.h>
+#include <commonlib/configstring.h>
#include <console/console.h>
#include <mcall.h>
#include <string.h>
@@ -36,10 +37,13 @@
uintptr_t mcall_query_memory(uintptr_t id, memory_block_info *info)
{
if (id == 0) {
- mprv_write_ulong(&info->base, 2U*GiB);
+ uintptr_t base;
+ size_t size;
- /* TODO: Return the correct value */
- mprv_write_ulong(&info->size, 1*GiB);
+ query_mem(configstring(), &base, &size);
+
+ mprv_write_ulong(&info->base, base);
+ mprv_write_ulong(&info->size, size);
return 0;
}