diff options
author | Oleksij Rempel <o.rempel@pengutronix.de> | 2018-11-27 10:19:30 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2018-12-13 08:09:13 +0100 |
commit | 01624e9b4a73e1d3ea5151b7f01e924790033119 (patch) | |
tree | a529b401d40f78217d70bb14c11f6a87fed92ac8 /arch | |
parent | 4c76513e7d294bfbb0b3a28119c41849aed389f0 (diff) | |
download | barebox-01624e9b4a73e1d3ea5151b7f01e924790033119.tar.gz barebox-01624e9b4a73e1d3ea5151b7f01e924790033119.tar.xz |
MIPS: multiimage: add ENTRY_FUNCTION macros
Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/mips/include/asm/asm.h | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/arch/mips/include/asm/asm.h b/arch/mips/include/asm/asm.h index 12e17581b8..5ead754b13 100644 --- a/arch/mips/include/asm/asm.h +++ b/arch/mips/include/asm/asm.h @@ -80,6 +80,35 @@ symbol: .frame sp, framesize, rpc symbol: /* + * ENTRY_FUNCTION - mark start of entry function + */ +#define ENTRY_FUNCTION(symbol) \ + .set noreorder; \ + .section .text_head_entry.symbol; \ + .align 4; \ + \ +EXPORT(symbol) + +/* + * ENTRY_FUNCTION_END - mark end of entry function + */ +#define ENTRY_FUNCTION_END(symbol, dtb) \ + mips_nmon; \ + copy_to_link_location symbol; \ + stack_setup; \ + \ + la a0, __dtb_ ## dtb##_start; \ + la a1, __dtb_ ## dtb##_end; \ + la v0, pbl_main_entry; \ + jal v0; \ + nop; \ + \ + /* No return */ \ +__error: \ + b __error; \ + nop; + +/* * FEXPORT - export definition of a function symbol */ #define FEXPORT(symbol) \ |