[PATCH v3 05/10] MIPS: multiimage: add ENTRY_FUNCTION macros

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Oleksij Rempel <o.rempel@xxxxxxxxxxxxxx>
---
 arch/mips/include/asm/asm.h | 29 +++++++++++++++++++++++++++++
 1 file changed, 29 insertions(+)

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
@@ -79,6 +79,35 @@ symbol:		.frame	sp, framesize, rpc
 		.globl	symbol;                         \
 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
  */
-- 
2.19.1


_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox



[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux