blob: 76e3dc5e311d9a453445f43d9ead7b6768bf8c92 [file] [log] [blame]
Biju Dasfb0e5502020-12-07 13:25:07 +00001/*
2 * Copyright (c) 2020, Renesas Electronics Corporation. All rights reserved.
3 *
4 * SPDX-License-Identifier: BSD-3-Clause
5 */
6
7#include <stdint.h>
8
9#define RCAR_SA6_TYPE_QSPIFLASH (0)
10#define RCAR_SA6_TYPE_EMMC (1)
11
12#if (RCAR_SA6_TYPE == RCAR_SA6_TYPE_QSPIFLASH)
13
14/* Number of content cert for Non-secure Target Program(BL33x) */
15#define RCAR_IMAGE_NUM (0x00000001U)
16/* Source address on flash for BL31 */
17#define RCAR_BL31SRC_ADDRESS (0x001C0000U)
18/* Reserved */
19#define RCAR_BL31_PARTITION (0x00000000U)
20/* Source address on flash for BL32 */
21#define RCAR_BL32SRC_ADDRESS (0x00200000U)
22/* Reserved */
23#define RCAR_BL32_PARTITION (0x00000000U)
24/* Source address on flash for BL33 */
25#define RCAR_BL33SRC_ADDRESS (0x00300000U)
26/* Reserved */
27#define RCAR_BL33_PARTITION (0x00000000U)
28#define RCAR_BL332SRC_ADDRESS (0x00000000U)
29/* Reserved */
30#define RCAR_BL332_PARTITION (0x00000000U)
31#define RCAR_BL333SRC_ADDRESS (0x00000000U)
32/* Reserved */
33#define RCAR_BL333_PARTITION (0x00000000U)
34#define RCAR_BL334SRC_ADDRESS (0x00000000U)
35/* Reserved */
36#define RCAR_BL334_PARTITION (0x00000000U)
37#define RCAR_BL335SRC_ADDRESS (0x00000000U)
38/* Reserved */
39#define RCAR_BL335_PARTITION (0x00000000U)
40#define RCAR_BL336SRC_ADDRESS (0x00000000U)
41/* Reserved */
42#define RCAR_BL336_PARTITION (0x00000000U)
43#define RCAR_BL337SRC_ADDRESS (0x00000000U)
44/* Reserved */
45#define RCAR_BL337_PARTITION (0x00000000U)
46#define RCAR_BL338SRC_ADDRESS (0x00000000U)
47/* Reserved */
48#define RCAR_BL338_PARTITION (0x00000000U)
49
50#else /* RCAR_SA6_TYPE == RCAR_SA6_TYPE_EMMC */
51
52/* Number of content cert for Non-secure Target Program(BL33x) */
53#define RCAR_IMAGE_NUM (0x00000001U)
54/* Source address on eMMC for BL31 */
55#define RCAR_BL31SRC_ADDRESS (0x00040000U)
56/* Source partition on eMMC for BL31 */
57#define RCAR_BL31_PARTITION (0x00000001U)
58/* Source address on eMMC for BL32 */
59#define RCAR_BL32SRC_ADDRESS (0x00200000U)
60/* Source partition on eMMC for BL32 */
61#define RCAR_BL32_PARTITION (0x00000001U)
62/* Source address on eMMC for BL33 */
63#define RCAR_BL33SRC_ADDRESS (0x00000000U)
64/* Source partition on eMMC for BL33 */
65#define RCAR_BL33_PARTITION (0x00000002U)
66/* Reserved */
67#define RCAR_BL332SRC_ADDRESS (0x00000000U)
68#define RCAR_BL332_PARTITION (0x00000000U)
69/* Reserved */
70#define RCAR_BL333SRC_ADDRESS (0x00000000U)
71#define RCAR_BL333_PARTITION (0x00000000U)
72/* Reserved */
73#define RCAR_BL334SRC_ADDRESS (0x00000000U)
74#define RCAR_BL334_PARTITION (0x00000000U)
75/* Reserved */
76#define RCAR_BL335SRC_ADDRESS (0x00000000U)
77#define RCAR_BL335_PARTITION (0x00000000U)
78/* Reserved */
79#define RCAR_BL336SRC_ADDRESS (0x00000000U)
80#define RCAR_BL336_PARTITION (0x00000000U)
81/* Reserved */
82#define RCAR_BL337SRC_ADDRESS (0x00000000U)
83#define RCAR_BL337_PARTITION (0x00000000U)
84/* Reserved */
85#define RCAR_BL338SRC_ADDRESS (0x00000000U)
86#define RCAR_BL338_PARTITION (0x00000000U)
87
88#endif /* RCAR_SA6_TYPE == RCAR_SA6_TYPE_QSPIFLASH */
89
90/* Destination address for BL31 */
91#define RCAR_BL31DST_ADDRESS (0x44000000U)
92#define RCAR_BL31DST_ADDRESSH (0x00000000U)
93/* Destination size for BL31 */
94#define RCAR_BL31DST_SIZE (0x00004000U)
95/* Destination address for BL32 */
96#define RCAR_BL32DST_ADDRESS (0x44100000U)
97#define RCAR_BL32DST_ADDRESSH (0x00000000U)
98/* Destination size for BL32 */
99#define RCAR_BL32DST_SIZE (0x00040000U)
100/* Destination address for BL33 */
101#define RCAR_BL33DST_ADDRESS (0x50000000U)
102#define RCAR_BL33DST_ADDRESSH (0x00000000U)
103/* Destination size for BL33 */
104#define RCAR_BL33DST_SIZE (0x00040000U)
105/* Reserved */
106#define RCAR_BL332DST_ADDRESS (0x00000000U)
107#define RCAR_BL332DST_ADDRESSH (0x00000000U)
108#define RCAR_BL332DST_SIZE (0x00000000U)
109/* Reserved */
110#define RCAR_BL333DST_ADDRESS (0x00000000U)
111#define RCAR_BL333DST_ADDRESSH (0x00000000U)
112#define RCAR_BL333DST_SIZE (0x00000000U)
113/* Reserved */
114#define RCAR_BL334DST_ADDRESS (0x00000000U)
115#define RCAR_BL334DST_ADDRESSH (0x00000000U)
116#define RCAR_BL334DST_SIZE (0x00000000U)
117/* Reserved */
118#define RCAR_BL335DST_ADDRESS (0x00000000U)
119#define RCAR_BL335DST_ADDRESSH (0x00000000U)
120#define RCAR_BL335DST_SIZE (0x00000000U)
121/* Reserved */
122#define RCAR_BL336DST_ADDRESS (0x00000000U)
123#define RCAR_BL336DST_ADDRESSH (0x00000000U)
124#define RCAR_BL336DST_SIZE (0x00000000U)
125/* Reserved */
126#define RCAR_BL337DST_ADDRESS (0x00000000U)
127#define RCAR_BL337DST_ADDRESSH (0x00000000U)
128#define RCAR_BL337DST_SIZE (0x00000000U)
129/* Reserved */
130#define RCAR_BL338DST_ADDRESS (0x00000000U)
131#define RCAR_BL338DST_ADDRESSH (0x00000000U)
132#define RCAR_BL338DST_SIZE (0x00000000U)
133
134/* SA6 */
135const uint64_t __attribute__ ((section(".sa6_image_num")))
136 image_num = RCAR_IMAGE_NUM;
137const uint64_t __attribute__ ((section(".sa6_bl31src_addr")))
138 bl31src_addr = RCAR_BL31SRC_ADDRESS;
139const uint64_t __attribute__ ((section(".sa6_bl31partition")))
140 bl31partition = RCAR_BL31_PARTITION;
141const uint64_t __attribute__ ((section(".sa6_bl32src_addr")))
142 bl32src_addr = RCAR_BL32SRC_ADDRESS;
143const uint64_t __attribute__ ((section(".sa6_bl32partition")))
144 bl32partition = RCAR_BL32_PARTITION;
145const uint64_t __attribute__ ((section(".sa6_bl33src_addr")))
146 bl33src_addr = RCAR_BL33SRC_ADDRESS;
147const uint64_t __attribute__ ((section(".sa6_bl33partition")))
148 bl33partition = RCAR_BL33_PARTITION;
149const uint64_t __attribute__ ((section(".sa6_bl332src_addr")))
150 bl332src_addr = RCAR_BL332SRC_ADDRESS;
151const uint64_t __attribute__ ((section(".sa6_bl332partition")))
152 bl332partition = RCAR_BL332_PARTITION;
153const uint64_t __attribute__ ((section(".sa6_bl333src_addr")))
154 bl333src_addr = RCAR_BL333SRC_ADDRESS;
155const uint64_t __attribute__ ((section(".sa6_bl333partition")))
156 bl333partition = RCAR_BL333_PARTITION;
157const uint64_t __attribute__ ((section(".sa6_bl334src_addr")))
158 bl334src_addr = RCAR_BL334SRC_ADDRESS;
159const uint64_t __attribute__ ((section(".sa6_bl334partition")))
160 bl334partition = RCAR_BL334_PARTITION;
161const uint64_t __attribute__ ((section(".sa6_bl335src_addr")))
162 bl335src_addr = RCAR_BL335SRC_ADDRESS;
163const uint64_t __attribute__ ((section(".sa6_bl335partition")))
164 bl335partition = RCAR_BL335_PARTITION;
165const uint64_t __attribute__ ((section(".sa6_bl336src_addr")))
166 bl336src_addr = RCAR_BL336SRC_ADDRESS;
167const uint64_t __attribute__ ((section(".sa6_bl336partition")))
168 bl336partition = RCAR_BL336_PARTITION;
169const uint64_t __attribute__ ((section(".sa6_bl337src_addr")))
170 bl337src_addr = RCAR_BL337SRC_ADDRESS;
171const uint64_t __attribute__ ((section(".sa6_bl337partition")))
172 bl337partition = RCAR_BL337_PARTITION;
173const uint64_t __attribute__ ((section(".sa6_bl338src_addr")))
174 bl338src_addr = RCAR_BL338SRC_ADDRESS;
175const uint64_t __attribute__ ((section(".sa6_bl338partition")))
176 bl338partition = RCAR_BL338_PARTITION;
177const uint32_t __attribute__ ((section(".sa6_bl31dst_addr")))
178 bl31dst_addr = RCAR_BL31DST_ADDRESS;
179const uint32_t __attribute__ ((section(".sa6_bl31dst_addrh")))
180 bl31dst_addrh = RCAR_BL31DST_ADDRESSH;
181const uint32_t __attribute__ ((section(".sa6_bl31dst_size")))
182 bl31dst_size = RCAR_BL31DST_SIZE;
183const uint32_t __attribute__ ((section(".sa6_bl32dst_addr")))
184 bl32dst_addr = RCAR_BL32DST_ADDRESS;
185const uint32_t __attribute__ ((section(".sa6_bl32dst_addrh")))
186 bl32dst_addrh = RCAR_BL32DST_ADDRESSH;
187const uint32_t __attribute__ ((section(".sa6_bl32dst_size")))
188 bl32dst_size = RCAR_BL32DST_SIZE;
189const uint32_t __attribute__ ((section(".sa6_bl33dst_addr")))
190 bl33dst_addr = RCAR_BL33DST_ADDRESS;
191const uint32_t __attribute__ ((section(".sa6_bl33dst_addrh")))
192 bl33dst_addrh = RCAR_BL33DST_ADDRESSH;
193const uint32_t __attribute__ ((section(".sa6_bl33dst_size")))
194 bl33dst_size = RCAR_BL33DST_SIZE;
195const uint32_t __attribute__ ((section(".sa6_bl332dst_addr")))
196 bl332dst_addr = RCAR_BL332DST_ADDRESS;
197const uint32_t __attribute__ ((section(".sa6_bl332dst_addrh")))
198 bl332dst_addrh = RCAR_BL332DST_ADDRESSH;
199const uint32_t __attribute__ ((section(".sa6_bl332dst_size")))
200 bl332dst_size = RCAR_BL332DST_SIZE;
201const uint32_t __attribute__ ((section(".sa6_bl333dst_addr")))
202 bl333dst_addr = RCAR_BL333DST_ADDRESS;
203const uint32_t __attribute__ ((section(".sa6_bl333dst_addrh")))
204 bl333dst_addrh = RCAR_BL333DST_ADDRESSH;
205const uint32_t __attribute__ ((section(".sa6_bl333dst_size")))
206 bl333dst_size = RCAR_BL333DST_SIZE;
207const uint32_t __attribute__ ((section(".sa6_bl334dst_addr")))
208 bl334dst_addr = RCAR_BL334DST_ADDRESS;
209const uint32_t __attribute__ ((section(".sa6_bl334dst_addrh")))
210 bl334dst_addrh = RCAR_BL334DST_ADDRESSH;
211const uint32_t __attribute__ ((section(".sa6_bl334dst_size")))
212 bl334dst_size = RCAR_BL334DST_SIZE;
213const uint32_t __attribute__ ((section(".sa6_bl335dst_addr")))
214 bl335dst_addr = RCAR_BL335DST_ADDRESS;
215const uint32_t __attribute__ ((section(".sa6_bl335dst_addrh")))
216 bl335dst_addrh = RCAR_BL335DST_ADDRESSH;
217const uint32_t __attribute__ ((section(".sa6_bl335dst_size")))
218 bl335dst_size = RCAR_BL335DST_SIZE;
219const uint32_t __attribute__ ((section(".sa6_bl336dst_addr")))
220 bl336dst_addr = RCAR_BL336DST_ADDRESS;
221const uint32_t __attribute__ ((section(".sa6_bl336dst_addrh")))
222 bl336dst_addrh = RCAR_BL336DST_ADDRESSH;
223const uint32_t __attribute__ ((section(".sa6_bl336dst_size")))
224 bl336dst_size = RCAR_BL336DST_SIZE;
225const uint32_t __attribute__ ((section(".sa6_bl337dst_addr")))
226 bl337dst_addr = RCAR_BL337DST_ADDRESS;
227const uint32_t __attribute__ ((section(".sa6_bl337dst_addrh")))
228 bl337dst_addrh = RCAR_BL337DST_ADDRESSH;
229const uint32_t __attribute__ ((section(".sa6_bl337dst_size")))
230 bl337dst_size = RCAR_BL337DST_SIZE;
231const uint32_t __attribute__ ((section(".sa6_bl338dst_addr")))
232 bl338dst_addr = RCAR_BL338DST_ADDRESS;
233const uint32_t __attribute__ ((section(".sa6_bl338dst_addrh")))
234 bl338dst_addrh = RCAR_BL338DST_ADDRESSH;
235const uint32_t __attribute__ ((section(".sa6_bl338dst_size")))
236 bl338dst_size = RCAR_BL338DST_SIZE;