xref: /rk3399_ARM-atf/plat/socionext/uniphier/include/platform_def.h (revision 7e51ca8daf3358f607d8dfe8733a8cdec12e0277)
1 /*
2  * Copyright (c) 2017-2018, ARM Limited and Contributors. All rights reserved.
3  *
4  * SPDX-License-Identifier: BSD-3-Clause
5  */
6 
7 #ifndef __PLATFORM_DEF_H__
8 #define __PLATFORM_DEF_H__
9 
10 #include <common_def.h>
11 #include <tbbr/tbbr_img_def.h>
12 
13 #define PLATFORM_STACK_SIZE		0x1000
14 
15 #define CACHE_WRITEBACK_SHIFT		6
16 #define CACHE_WRITEBACK_GRANULE		(1 << (CACHE_WRITEBACK_SHIFT))
17 
18 /* topology */
19 #define UNIPHIER_MAX_CPUS_PER_CLUSTER	4
20 #define UNIPHIER_CLUSTER_COUNT		2
21 
22 #define PLATFORM_CORE_COUNT		\
23 	((UNIPHIER_MAX_CPUS_PER_CLUSTER) * (UNIPHIER_CLUSTER_COUNT))
24 
25 #define PLAT_MAX_PWR_LVL		1
26 
27 #define PLAT_MAX_OFF_STATE		2
28 #define PLAT_MAX_RET_STATE		1
29 
30 #define BL2_BASE			0x80000000
31 #define BL2_LIMIT			0x80080000
32 
33 /* 0x80080000-0x81000000: reserved for DSP */
34 
35 #define UNIPHIER_SEC_DRAM_BASE		0x81000000
36 #define UNIPHIER_SEC_DRAM_LIMIT		0x82000000
37 #define UNIPHIER_SEC_DRAM_SIZE		((UNIPHIER_SEC_DRAM_LIMIT) - \
38 					 (UNIPHIER_SEC_DRAM_BASE))
39 
40 #define BL31_BASE			0x81000000
41 #define BL31_LIMIT			0x81080000
42 
43 #define BL32_BASE			0x81080000
44 #define BL32_LIMIT			0x81180000
45 
46 #define PLAT_PHY_ADDR_SPACE_SIZE	(1ULL << 32)
47 #define PLAT_VIRT_ADDR_SPACE_SIZE	(1ULL << 32)
48 
49 #define PLAT_XLAT_TABLES_DYNAMIC	1
50 #define MAX_XLAT_TABLES			7
51 #define MAX_MMAP_REGIONS		7
52 
53 #define MAX_IO_HANDLES			2
54 #define MAX_IO_DEVICES			2
55 #define MAX_IO_BLOCK_DEVICES		1
56 
57 #define TSP_SEC_MEM_BASE		(BL32_BASE)
58 #define TSP_SEC_MEM_SIZE		((BL32_LIMIT) - (BL32_BASE))
59 #define TSP_IRQ_SEC_PHY_TIMER		29
60 
61 #endif /* __PLATFORM_DEF_H__ */
62