blob: 72d264bcbe9523670a0c8af106de49e3c3c90246 [file] [log] [blame]
Philipp Tomsich728aae42017-07-11 21:04:45 +02001
Philipp Tomsichc2448712017-03-15 12:08:44 +01002/*
3 * Copyright 2017 Theobroma Systems Design und Consulting GmbH
4 *
5 * SPDX-License-Identifier: GPL-2.0+
6 */
7
8/*
9 * Execution starts on the instruction following this 4-byte header
10 * (containing the magic 'RK33').
11 *
12 * To make life easier for everyone, we build the SPL binary with
13 * space for this 4-byte header already included in the binary.
14 */
15
16#ifdef CONFIG_SPL_BUILD
Philipp Tomsich728aae42017-07-11 21:04:45 +020017 /*
18 * We need to add 4 bytes of space for the 'RK33' at the
19 * beginning of the executable. However, as we want to keep
20 * this generic and make it applicable to builds that are like
21 * the RK3368 (TPL needs this, SPL doesn't) or the RK3399 (no
22 * TPL, but extra space needed in the SPL), we simply repeat
23 * the 'b reset' with the expectation that the first one will
24 * be overwritten, if this is the first stage contained in the
25 * final image created with mkimage)...
26 */
27 b reset /* may be overwritten --- should be 'nop' or a 'b reset' */
Philipp Tomsichc2448712017-03-15 12:08:44 +010028#endif
29 b reset
Kever Yange484f772017-04-20 17:03:46 +080030
31#if defined(CONFIG_ROCKCHIP_RK3399) && defined(CONFIG_SPL_BUILD)
32 .space CONFIG_ROCKCHIP_SPL_RESERVE_IRAM /* space for the ATF data */
33#endif