soc/lowrisc: Place CBMEM at top of autodetected RAM
Change-Id: I9f169db330d1792128db7a6308ed3afbe5803c03 Signed-off-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net> Reviewed-on: https://review.coreboot.org/17708 Tested-by: build bot (Jenkins) Reviewed-by: Ronald G. Minnich <rminnich@gmail.com>
This commit is contained in:
parent
30140d2be9
commit
1e910c901b
|
@ -11,13 +11,15 @@
|
|||
* GNU General Public License for more details.
|
||||
*/
|
||||
|
||||
#include <console/console.h>
|
||||
#include <cbmem.h>
|
||||
#include <commonlib/configstring.h>
|
||||
|
||||
void *cbmem_top(void)
|
||||
{
|
||||
// TODO: find out how the lowrisc SOC decides to provide
|
||||
// this information, when they know.
|
||||
printk(BIOS_SPEW, "Returning hard-coded 128M; fix me\n");
|
||||
return (void *)((uintptr_t)(2ULL*GiB+128*MiB));
|
||||
uintptr_t base;
|
||||
size_t size;
|
||||
|
||||
query_mem(configstring(), &base, &size);
|
||||
|
||||
return (void *)(base + size);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue