* [PATCH] arm/mvebu: sync barebox-arm-head.h to generic variant
@ 2021-05-18 9:16 Uwe Kleine-König
2021-07-30 7:00 ` [PATCH v2] " Uwe Kleine-König
0 siblings, 1 reply; 3+ messages in thread
From: Uwe Kleine-König @ 2021-05-18 9:16 UTC (permalink / raw)
To: barebox
En passant this adds support for PBL_BREAK. While there is no 64 bit
support available for mvebu, keeping the difference between
arch/arm/mach-mvebu/include/mach/barebox-arm-head.h and
arch/arm/include/asm/barebox-arm-head.h minimal is a good thing.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
.../include/mach/barebox-arm-head.h | 24 +++++++++++++++++++
1 file changed, 24 insertions(+)
diff --git a/arch/arm/mach-mvebu/include/mach/barebox-arm-head.h b/arch/arm/mach-mvebu/include/mach/barebox-arm-head.h
index 3035f40ddf3b..106635e6fc64 100644
--- a/arch/arm/mach-mvebu/include/mach/barebox-arm-head.h
+++ b/arch/arm/mach-mvebu/include/mach/barebox-arm-head.h
@@ -4,6 +4,7 @@
static inline void __barebox_arm_head(void)
{
__asm__ __volatile__ (
+#ifdef CONFIG_CPU_32
#ifdef CONFIG_THUMB2_BAREBOX
".arm\n"
"adr r9, 1f + 1\n"
@@ -23,11 +24,23 @@ static inline void __barebox_arm_head(void)
"1: b 1b\n"
"1: b 1b\n"
"1: b 1b\n"
+#endif
+#else
+ "b 2f\n"
+ "nop\n"
+ "nop\n"
+ "nop\n"
+ "nop\n"
+ "nop\n"
#endif
".asciz \"barebox\"\n"
+#ifdef CONFIG_CPU_32
".word _text\n" /* text base. If copied there,
* barebox can skip relocation
*/
+#else
+ ".word 0xffffffff\n"
+#endif
".word _barebox_image_size\n" /* image size to copy */
/*
@@ -42,6 +55,17 @@ static inline void __barebox_arm_head(void)
".word 0x55555555\n"
".endr\n"
"2:\n"
+#ifdef CONFIG_PBL_BREAK
+#ifdef CONFIG_CPU_V8
+ "brk #17\n"
+#else
+ "bkpt #17\n"
+#endif
+ "nop\n"
+#else
+ "nop\n"
+ "nop\n"
+#endif
);
}
--
2.30.2
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH v2] arm/mvebu: sync barebox-arm-head.h to generic variant
2021-05-18 9:16 [PATCH] arm/mvebu: sync barebox-arm-head.h to generic variant Uwe Kleine-König
@ 2021-07-30 7:00 ` Uwe Kleine-König
2021-08-09 18:35 ` Sascha Hauer
0 siblings, 1 reply; 3+ messages in thread
From: Uwe Kleine-König @ 2021-07-30 7:00 UTC (permalink / raw)
To: barebox
En passant this adds support for PBL_BREAK. While there is no 64 bit
support available for mvebu, keeping the difference between
arch/arm/mach-mvebu/include/mach/barebox-arm-head.h and
arch/arm/include/asm/barebox-arm-head.h minimal is a good thing.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
Changes in this v2: Only some whitespace changes to reduce the diff
between the two headers even more.
---
.../include/mach/barebox-arm-head.h | 25 ++++++++++++++++++-
1 file changed, 24 insertions(+), 1 deletion(-)
diff --git a/arch/arm/mach-mvebu/include/mach/barebox-arm-head.h b/arch/arm/mach-mvebu/include/mach/barebox-arm-head.h
index 3035f40ddf3b..723e2ab4c8b5 100644
--- a/arch/arm/mach-mvebu/include/mach/barebox-arm-head.h
+++ b/arch/arm/mach-mvebu/include/mach/barebox-arm-head.h
@@ -4,6 +4,7 @@
static inline void __barebox_arm_head(void)
{
__asm__ __volatile__ (
+#ifdef CONFIG_CPU_32
#ifdef CONFIG_THUMB2_BAREBOX
".arm\n"
"adr r9, 1f + 1\n"
@@ -23,11 +24,23 @@ static inline void __barebox_arm_head(void)
"1: b 1b\n"
"1: b 1b\n"
"1: b 1b\n"
+#endif
+#else
+ "b 2f\n"
+ "nop\n"
+ "nop\n"
+ "nop\n"
+ "nop\n"
+ "nop\n"
#endif
".asciz \"barebox\"\n"
+#ifdef CONFIG_CPU_32
".word _text\n" /* text base. If copied there,
* barebox can skip relocation
*/
+#else
+ ".word 0xffffffff\n"
+#endif
".word _barebox_image_size\n" /* image size to copy */
/*
@@ -42,9 +55,19 @@ static inline void __barebox_arm_head(void)
".word 0x55555555\n"
".endr\n"
"2:\n"
+#ifdef CONFIG_PBL_BREAK
+#ifdef CONFIG_CPU_V8
+ "brk #17\n"
+#else
+ "bkpt #17\n"
+#endif
+ "nop\n"
+#else
+ "nop\n"
+ "nop\n"
+#endif
);
}
-
static inline void barebox_arm_head(void)
{
__barebox_arm_head();
--
2.30.2
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v2] arm/mvebu: sync barebox-arm-head.h to generic variant
2021-07-30 7:00 ` [PATCH v2] " Uwe Kleine-König
@ 2021-08-09 18:35 ` Sascha Hauer
0 siblings, 0 replies; 3+ messages in thread
From: Sascha Hauer @ 2021-08-09 18:35 UTC (permalink / raw)
To: Uwe Kleine-König; +Cc: barebox
On Fri, Jul 30, 2021 at 09:00:01AM +0200, Uwe Kleine-König wrote:
> En passant this adds support for PBL_BREAK. While there is no 64 bit
> support available for mvebu, keeping the difference between
> arch/arm/mach-mvebu/include/mach/barebox-arm-head.h and
> arch/arm/include/asm/barebox-arm-head.h minimal is a good thing.
>
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> ---
> Changes in this v2: Only some whitespace changes to reduce the diff
> between the two headers even more.
> ---
> .../include/mach/barebox-arm-head.h | 25 ++++++++++++++++++-
> 1 file changed, 24 insertions(+), 1 deletion(-)
Applied, thanks
Sascha
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-08-09 18:37 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-18 9:16 [PATCH] arm/mvebu: sync barebox-arm-head.h to generic variant Uwe Kleine-König
2021-07-30 7:00 ` [PATCH v2] " Uwe Kleine-König
2021-08-09 18:35 ` Sascha Hauer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox