1*700f3108SPhilipp Tomsich 23d54eabcSPhilipp Tomsich /* 33d54eabcSPhilipp Tomsich * Copyright 2017 Theobroma Systems Design und Consulting GmbH 43d54eabcSPhilipp Tomsich * 53d54eabcSPhilipp Tomsich * SPDX-License-Identifier: GPL-2.0+ 63d54eabcSPhilipp Tomsich */ 73d54eabcSPhilipp Tomsich 83d54eabcSPhilipp Tomsich /* 93d54eabcSPhilipp Tomsich * Execution starts on the instruction following this 4-byte header 103d54eabcSPhilipp Tomsich * (containing the magic 'RK33'). 113d54eabcSPhilipp Tomsich * 123d54eabcSPhilipp Tomsich * To make life easier for everyone, we build the SPL binary with 133d54eabcSPhilipp Tomsich * space for this 4-byte header already included in the binary. 143d54eabcSPhilipp Tomsich */ 153d54eabcSPhilipp Tomsich 163d54eabcSPhilipp Tomsich #ifdef CONFIG_SPL_BUILD 17*700f3108SPhilipp Tomsich /* 18*700f3108SPhilipp Tomsich * We need to add 4 bytes of space for the 'RK33' at the 19*700f3108SPhilipp Tomsich * beginning of the executable. However, as we want to keep 20*700f3108SPhilipp Tomsich * this generic and make it applicable to builds that are like 21*700f3108SPhilipp Tomsich * the RK3368 (TPL needs this, SPL doesn't) or the RK3399 (no 22*700f3108SPhilipp Tomsich * TPL, but extra space needed in the SPL), we simply repeat 23*700f3108SPhilipp Tomsich * the 'b reset' with the expectation that the first one will 24*700f3108SPhilipp Tomsich * be overwritten, if this is the first stage contained in the 25*700f3108SPhilipp Tomsich * final image created with mkimage)... 26*700f3108SPhilipp Tomsich */ 27*700f3108SPhilipp Tomsich b reset /* may be overwritten --- should be 'nop' or a 'b reset' */ 283d54eabcSPhilipp Tomsich #endif 293d54eabcSPhilipp Tomsich b reset 30fa1392a2SKever Yang 31fa1392a2SKever Yang #if defined(CONFIG_ROCKCHIP_RK3399) && defined(CONFIG_SPL_BUILD) 32fa1392a2SKever Yang .space CONFIG_ROCKCHIP_SPL_RESERVE_IRAM /* space for the ATF data */ 33fa1392a2SKever Yang #endif 34