[PATCH 01/13] ARM: add ENTRY_FUNCTION_HEAD macro
Sascha Hauer
s.hauer at pengutronix.de
Thu Mar 2 03:15:54 PST 2023
Some architectures set CONFIG_HAVE_MACH_ARM_HEAD to customize the
barebox image header. Add a ENTRY_FUNCTION_HEAD macro which allows
a board to customize the barebox image header without having to
hook into a generic include file.
Signed-off-by: Sascha Hauer <s.hauer at pengutronix.de>
---
arch/arm/include/asm/barebox-arm.h | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/arch/arm/include/asm/barebox-arm.h b/arch/arm/include/asm/barebox-arm.h
index d4be719bc4..0cf4549cd7 100644
--- a/arch/arm/include/asm/barebox-arm.h
+++ b/arch/arm/include/asm/barebox-arm.h
@@ -183,7 +183,7 @@ void __barebox_arm64_head(ulong x0, ulong x1, ulong x2);
static void noinline ____##name \
(ulong arg0, ulong arg1, ulong arg2)
-#define ENTRY_FUNCTION(name, arg0, arg1, arg2) \
+#define ENTRY_FUNCTION_HEAD(name, head, arg0, arg1, arg2) \
void name(ulong r0, ulong r1, ulong r2); \
\
static void __##name(ulong, ulong, ulong); \
@@ -191,11 +191,14 @@ void __barebox_arm64_head(ulong x0, ulong x1, ulong x2);
void __naked __section(.text_head_entry_##name) name \
(ulong r0, ulong r1, ulong r2) \
{ \
- __barebox_arm_head(); \
+ head(); \
__##name(r0, r1, r2); \
} \
static void __naked noinline __##name \
(ulong arg0, ulong arg1, ulong arg2)
+
+#define ENTRY_FUNCTION(name, arg0, arg1, arg2) \
+ ENTRY_FUNCTION_HEAD(name, __barebox_arm_head, arg0, arg1, arg2)
#endif
/*
--
2.30.2
More information about the barebox
mailing list