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