summaryrefslogtreecommitdiff
path: root/src/soc/sifive/fu540/memlayout.ld
blob: 8fc875dba71161e7e5281220695209bbb8b22df8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
/* SPDX-License-Identifier: GPL-2.0-only */

#include <memlayout.h>
#include <soc/addressmap.h>

#include <arch/header.ld>

#define L2LIM_START(addr) REGION_START(l2lim, addr)
#define L2LIM_END(addr) REGION_END(l2lim, addr)

SECTIONS
{
	L2LIM_START(FU540_L2LIM)
	BOOTBLOCK(FU540_L2LIM, 64K)
	CAR_STACK(FU540_L2LIM + 64K, 12K)
	PRERAM_CBMEM_CONSOLE(FU540_L2LIM + 76K, 8K)
	CBFS_MCACHE(FU540_L2LIM + 84K, 8K)
	FMAP_CACHE(FU540_L2LIM + 92K, 2K)
	ROMSTAGE(FU540_L2LIM + 128K, 128K)
	PRERAM_CBFS_CACHE(FU540_L2LIM + 256K, 128K)
	L2LIM_END(FU540_L2LIM + 2M)

	DRAM_START(FU540_DRAM)
	REGION(opensbi, FU540_DRAM, 128K, 4K)
	RAMSTAGE(FU540_DRAM + 128K, 2M)
	MEM_STACK(FU540_DRAM + 128K + 2M, 20K)
	POSTRAM_CBFS_CACHE(FU540_DRAM + 3M, 29M)
}