summaryrefslogtreecommitdiffstats
path: root/src/soc/mediatek/mt8183/include/soc/memlayout.ld
blob: 82e404f790c913412b35fa40f09e14745659f07f (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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
/*
 * This file is part of the coreboot project.
 *
 * Copyright 2018 MediaTek Inc.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; version 2 of the License.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 */

#include <memlayout.h>

#include <arch/header.ld>

/*
 * SRAM_L2C is the half part of L2 cache that we borrow to be used as SRAM.
 * It will be returned before starting the ramstage.
 * SRAM_L2C and SRAM can be cached, but only SRAM is DMA-able.
 */
#define SRAM_L2C_START(addr) SYMBOL(sram_l2c, addr)
#define SRAM_L2C_END(addr) SYMBOL(esram_l2c, addr)
#define DRAM_INIT_CODE(addr, size) \
	REGION(dram_init_code, addr, size, 4)

SECTIONS
{
	SRAM_START(0x00100000)
	VBOOT2_WORK(0x00100000, 12K)
	VBOOT2_TPM_LOG(0x00103000, 2K)
	PRERAM_CBMEM_CONSOLE(0x00103800, 14K)
	WATCHDOG_TOMBSTONE(0x00107000, 4)
	PRERAM_CBFS_CACHE(0x00107004, 48K - 4)
	TIMESTAMP(0x00113000, 4K)
	STACK(0x00114000, 16K)
	TTB(0x00118000, 28K)
	DMA_COHERENT(0x0011f000, 4K)
	SRAM_END(0x00120000)

	SRAM_L2C_START(0x00200000)
	OVERLAP_DECOMPRESSOR_VERSTAGE_ROMSTAGE(0x00201000, 188K)
	BOOTBLOCK(0x00230000, 64K)
	DRAM_INIT_CODE(0x00240000, 256K)
	SRAM_L2C_END(0x00280000)

	DRAM_START(0x40000000)
	POSTRAM_CBFS_CACHE(0x40000000, 2M)
	RAMSTAGE(0x40200000, 256K)

	BL31(0x54600000, 0x60000)
}