UPSTREAM: soc/ucb/riscv: Place CBMEM at top of autodetected RAM

BUG=None
BRANCH=None
TEST=None

Signed-off-by: Jonathan Neuschfer <j.neuschaefer@gmx.net>
Reviewed-on: https://review.coreboot.org/17595
Tested-by: build bot (Jenkins)
Reviewed-by: Ronald G. Minnich <rminnich@gmail.com>

Change-Id: Ida016aec11ccdb8da8d2ae1d30ddca16b069be11
Reviewed-on: https://chromium-review.googlesource.com/417071
Commit-Ready: Furquan Shaikh <furquan@chromium.org>
Tested-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
This commit is contained in:
Jonathan Neuschäfer 2016-11-24 08:25:29 +01:00 committed by chrome-bot
commit b3f01e9331

View file

@ -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);
}