2017-03-15 11:08:44 +00:00
|
|
|
/*
|
|
|
|
* Copyright 2017 Theobroma Systems Design und Consulting GmbH
|
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: GPL-2.0+
|
|
|
|
*/
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Execution starts on the instruction following this 4-byte header
|
2017-10-10 14:21:02 +00:00
|
|
|
* (containing the magic 'RK30', 'RK31', 'RK32' or 'RK33'). This
|
|
|
|
* magic constant will be written into the final image by the rkimage
|
|
|
|
* tool, but we need to reserve space for it here.
|
2017-03-15 11:08:44 +00:00
|
|
|
*
|
|
|
|
* To make life easier for everyone, we build the SPL binary with
|
|
|
|
* space for this 4-byte header already included in the binary.
|
|
|
|
*/
|
|
|
|
#ifdef CONFIG_SPL_BUILD
|
2017-07-11 19:04:45 +00:00
|
|
|
/*
|
|
|
|
* We need to add 4 bytes of space for the 'RK33' at the
|
|
|
|
* beginning of the executable. However, as we want to keep
|
|
|
|
* this generic and make it applicable to builds that are like
|
|
|
|
* the RK3368 (TPL needs this, SPL doesn't) or the RK3399 (no
|
|
|
|
* TPL, but extra space needed in the SPL), we simply repeat
|
|
|
|
* the 'b reset' with the expectation that the first one will
|
|
|
|
* be overwritten, if this is the first stage contained in the
|
|
|
|
* final image created with mkimage)...
|
|
|
|
*/
|
|
|
|
b reset /* may be overwritten --- should be 'nop' or a 'b reset' */
|
2017-03-15 11:08:44 +00:00
|
|
|
#endif
|
|
|
|
b reset
|
2017-10-10 14:21:02 +00:00
|
|
|
#if !defined(CONFIG_ARM64)
|
|
|
|
/*
|
|
|
|
* For armv7, the addr '_start' will used as vector start address
|
|
|
|
* and write to VBAR register, which needs to aligned to 0x20.
|
|
|
|
*/
|
|
|
|
.align(5)
|
|
|
|
_start:
|
|
|
|
ARM_VECTORS
|
|
|
|
#endif
|
2017-04-20 09:03:46 +00:00
|
|
|
|
|
|
|
#if defined(CONFIG_ROCKCHIP_RK3399) && defined(CONFIG_SPL_BUILD)
|
|
|
|
.space CONFIG_ROCKCHIP_SPL_RESERVE_IRAM /* space for the ATF data */
|
|
|
|
#endif
|