summaryrefslogtreecommitdiff
path: root/src/soc/sifive/fu740/cbmem.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/soc/sifive/fu740/cbmem.c')
-rw-r--r--src/soc/sifive/fu740/cbmem.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/soc/sifive/fu740/cbmem.c b/src/soc/sifive/fu740/cbmem.c
new file mode 100644
index 0000000000..e3ccf3ae75
--- /dev/null
+++ b/src/soc/sifive/fu740/cbmem.c
@@ -0,0 +1,13 @@
+/* SPDX-License-Identifier: GPL-2.0-only */
+
+#include <cbmem.h>
+#include <commonlib/helpers.h>
+#include <soc/addressmap.h>
+#include <soc/sdram.h>
+#include <symbols.h>
+
+uintptr_t cbmem_top_chipset(void)
+{
+#define FU740_MAXDRAM 0x800000000ULL // 32 GiB
+ return MIN((uintptr_t)FU740_DRAM + sdram_size(), FU740_MAXDRAM);
+}