diff options
author | Jonathan Neuschäfer <j.neuschaefer@gmx.net> | 2016-11-24 08:10:12 +0100 |
---|---|---|
committer | Ronald G. Minnich <rminnich@gmail.com> | 2016-12-06 18:47:22 +0100 |
commit | ba571c79af41261bcb378aca343ddd2990da6d76 (patch) | |
tree | 2eacfb09065b565db33c531d5ae806e9d2616fec /src/arch/riscv | |
parent | 0575a4f8ee311a04ec2375f683d8efbcbd01396d (diff) |
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.c | 10 |
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; } |