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

Change-Id: Ida016aec11ccdb8da8d2ae1d30ddca16b069be11
Signed-off-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net>
Reviewed-on: https://review.coreboot.org/17595
Tested-by: build bot (Jenkins)
Reviewed-by: Ronald G. Minnich <rminnich@gmail.com>
This commit is contained in:
Jonathan Neuschäfer 2016-11-24 08:25:29 +01:00 committed by Ronald G. Minnich
parent ba571c79af
commit fc5e6c6696
1 changed files with 7 additions and 2 deletions

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