sifive/fu540: correct cbmem support
Return correct memory location for cbmem instead of incorrectly returning memory size. Change-Id: If7f490a46edebb04c2280bf317d1adacef08f30d Signed-off-by: Philipp Hug <philipp@hug.cx> Reviewed-on: https://review.coreboot.org/29197 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Xiang Wang <wxjstz@126.com> Reviewed-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net> Reviewed-by: Patrick Rudolph <siro@das-labor.org>
This commit is contained in:
parent
3d8e53f85a
commit
bb7f41d85a
|
@ -14,9 +14,13 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <cbmem.h>
|
#include <cbmem.h>
|
||||||
|
#include <soc/addressmap.h>
|
||||||
|
#include <soc/sdram.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <symbols.h>
|
||||||
|
|
||||||
void *cbmem_top(void)
|
void *cbmem_top(void)
|
||||||
{
|
{
|
||||||
/* dummy value */
|
return (void *)min((uintptr_t)_dram + sdram_size_mb() * MiB,
|
||||||
return (void *)(4ULL * GiB);
|
FU540_MAXDRAM);
|
||||||
}
|
}
|
||||||
|
|
|
@ -34,3 +34,4 @@
|
||||||
#define FU540_QSPI0FLASH 0x20000000
|
#define FU540_QSPI0FLASH 0x20000000
|
||||||
#define FU540_QSPI1FLASH 0x30000000
|
#define FU540_QSPI1FLASH 0x30000000
|
||||||
#define FU540_DRAM 0x80000000
|
#define FU540_DRAM 0x80000000
|
||||||
|
#define FU540_MAXDRAM 0x2000000000ULL
|
||||||
|
|
Loading…
Reference in New Issue