summaryrefslogtreecommitdiffstats
path: root/src/arch/riscv
diff options
context:
space:
mode:
authorJonathan Neuschäfer <j.neuschaefer@gmx.net>2016-11-24 08:10:12 +0100
committerRonald G. Minnich <rminnich@gmail.com>2016-12-06 18:47:22 +0100
commitba571c79af41261bcb378aca343ddd2990da6d76 (patch)
tree2eacfb09065b565db33c531d5ae806e9d2616fec /src/arch/riscv
parent0575a4f8ee311a04ec2375f683d8efbcbd01396d (diff)
downloadcoreboot-ba571c79af41261bcb378aca343ddd2990da6d76.tar.gz
coreboot-ba571c79af41261bcb378aca343ddd2990da6d76.tar.bz2
coreboot-ba571c79af41261bcb378aca343ddd2990da6d76.zip
arch/riscv/mcall.c: Return the correct memory base and size
Change-Id: Ibf471787ccb4f5393b0af737a9f7fc47b853a41a Signed-off-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net> Reviewed-on: https://review.coreboot.org/17594 Tested-by: build bot (Jenkins) Reviewed-by: Ronald G. Minnich <rminnich@gmail.com>
Diffstat (limited to 'src/arch/riscv')
-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 fdc02bef2b1a..aa61ae464a2a 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;
}