All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 0/4] Use THUMB mode for VCMA9 U-Boot builts
@ 2016-02-09 15:48 David Müller
  2016-02-09 15:48 ` [U-Boot] [PATCH 1/4] arm: make sure board_init_r() is being called using the right mode (ARM / THUMB) David Müller
                   ` (3 more replies)
  0 siblings, 4 replies; 12+ messages in thread
From: David Müller @ 2016-02-09 15:48 UTC (permalink / raw)
  To: u-boot

Patch 1 fixes a bug in the calling of board_init_r() in THUMB mode.
Patch 2-3 enable THUMB support for the ARM920T architecture.
Patch 4 finally activates THUMB mode for VCMA9.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [U-Boot] [PATCH 1/4] arm: make sure board_init_r() is being called using the right mode (ARM / THUMB)
  2016-02-09 15:48 [U-Boot] [PATCH 0/4] Use THUMB mode for VCMA9 U-Boot builts David Müller
@ 2016-02-09 15:48 ` David Müller
  2016-02-09 17:03   ` Tom Rini
  2016-02-15 22:35   ` [U-Boot] [U-Boot, " Tom Rini
  2016-02-09 15:48 ` [U-Boot] [PATCH 2/4] arm: the ARM920T is THUMB capable, so select the appropriate ISA David Müller
                   ` (2 subsequent siblings)
  3 siblings, 2 replies; 12+ messages in thread
From: David Müller @ 2016-02-09 15:48 UTC (permalink / raw)
  To: u-boot

Signed-off-by: David M?ller <d.mueller@elsoft.ch>
---
 arch/arm/lib/crt0.S | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/arch/arm/lib/crt0.S b/arch/arm/lib/crt0.S
index 2f4c14e..8415f77 100644
--- a/arch/arm/lib/crt0.S
+++ b/arch/arm/lib/crt0.S
@@ -167,8 +167,12 @@ clbss_l:cmp	r0, r1			/* while not at end of BSS */
 	mov     r0, r9                  /* gd_t */
 	ldr	r1, [r9, #GD_RELOCADDR]	/* dest_addr */
 	/* call board_init_r */
+#if defined(CONFIG_SYS_THUMB_BUILD)
+	ldr	lr, =board_init_r	/* this is auto-relocated! */
+	bx	lr
+#else
 	ldr	pc, =board_init_r	/* this is auto-relocated! */
-
+#endif
 	/* we should not return here. */
 #endif
 
-- 
1.8.4

^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [U-Boot] [PATCH 2/4] arm: the ARM920T is THUMB capable, so select the appropriate ISA
  2016-02-09 15:48 [U-Boot] [PATCH 0/4] Use THUMB mode for VCMA9 U-Boot builts David Müller
  2016-02-09 15:48 ` [U-Boot] [PATCH 1/4] arm: make sure board_init_r() is being called using the right mode (ARM / THUMB) David Müller
@ 2016-02-09 15:48 ` David Müller
  2016-02-15 22:35   ` [U-Boot] [U-Boot, " Tom Rini
  2016-02-09 15:48 ` [U-Boot] [PATCH 3/4] arm: build some file(s) as ARM mode only David Müller
  2016-02-09 15:48 ` [U-Boot] [PATCH 4/4] arm: VCMA9: because of NOR flash space constrains, activate THUMB build mode David Müller
  3 siblings, 1 reply; 12+ messages in thread
From: David Müller @ 2016-02-09 15:48 UTC (permalink / raw)
  To: u-boot

Signed-off-by: David M?ller <d.mueller@elsoft.ch>
---
 arch/arm/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/Makefile b/arch/arm/Makefile
index cd7d880..6defdfb 100644
--- a/arch/arm/Makefile
+++ b/arch/arm/Makefile
@@ -9,7 +9,7 @@ endif
 
 # This selects which instruction set is used.
 arch-$(CONFIG_CPU_ARM720T)	=-march=armv4
-arch-$(CONFIG_CPU_ARM920T)	=-march=armv4
+arch-$(CONFIG_CPU_ARM920T)	=-march=armv4t
 arch-$(CONFIG_CPU_ARM926EJS)	=-march=armv5te
 arch-$(CONFIG_CPU_ARM946ES)	=-march=armv4
 arch-$(CONFIG_CPU_SA1100)	=-march=armv4
-- 
1.8.4

^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [U-Boot] [PATCH 3/4] arm: build some file(s) as ARM mode only
  2016-02-09 15:48 [U-Boot] [PATCH 0/4] Use THUMB mode for VCMA9 U-Boot builts David Müller
  2016-02-09 15:48 ` [U-Boot] [PATCH 1/4] arm: make sure board_init_r() is being called using the right mode (ARM / THUMB) David Müller
  2016-02-09 15:48 ` [U-Boot] [PATCH 2/4] arm: the ARM920T is THUMB capable, so select the appropriate ISA David Müller
@ 2016-02-09 15:48 ` David Müller
  2016-02-15 22:35   ` [U-Boot] [U-Boot,3/4] " Tom Rini
  2016-02-09 15:48 ` [U-Boot] [PATCH 4/4] arm: VCMA9: because of NOR flash space constrains, activate THUMB build mode David Müller
  3 siblings, 1 reply; 12+ messages in thread
From: David Müller @ 2016-02-09 15:48 UTC (permalink / raw)
  To: u-boot

Signed-off-by: David M?ller <d.mueller@elsoft.ch>
---
 arch/arm/cpu/arm920t/Makefile | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/arch/arm/cpu/arm920t/Makefile b/arch/arm/cpu/arm920t/Makefile
index 6582938..1832b9d 100644
--- a/arch/arm/cpu/arm920t/Makefile
+++ b/arch/arm/cpu/arm920t/Makefile
@@ -13,3 +13,9 @@ obj-$(CONFIG_USE_IRQ)	+= interrupts.o
 obj-$(CONFIG_EP93XX) += ep93xx/
 obj-$(CONFIG_IMX) += imx/
 obj-$(CONFIG_S3C24X0) += s3c24x0/
+
+# some files can only build in ARM mode
+
+ifdef CONFIG_SYS_THUMB_BUILD
+CFLAGS_cpu.o := -marm
+endif
-- 
1.8.4

^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [U-Boot] [PATCH 4/4] arm: VCMA9: because of NOR flash space constrains, activate THUMB build mode
  2016-02-09 15:48 [U-Boot] [PATCH 0/4] Use THUMB mode for VCMA9 U-Boot builts David Müller
                   ` (2 preceding siblings ...)
  2016-02-09 15:48 ` [U-Boot] [PATCH 3/4] arm: build some file(s) as ARM mode only David Müller
@ 2016-02-09 15:48 ` David Müller
  2016-02-15 22:35   ` [U-Boot] [U-Boot, " Tom Rini
  3 siblings, 1 reply; 12+ messages in thread
From: David Müller @ 2016-02-09 15:48 UTC (permalink / raw)
  To: u-boot

Signed-off-by: David M?ller <d.mueller@elsoft.ch>
---
 include/configs/VCMA9.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/include/configs/VCMA9.h b/include/configs/VCMA9.h
index 42af34f..de7d5c2 100644
--- a/include/configs/VCMA9.h
+++ b/include/configs/VCMA9.h
@@ -20,6 +20,8 @@
  * High Level Configuration Options
  * (easy to change)
  */
+#define CONFIG_SYS_THUMB_BUILD
+
 #define CONFIG_S3C24X0		/* This is a SAMSUNG S3C24x0-type SoC */
 #define CONFIG_S3C2410		/* specifically a SAMSUNG S3C2410 SoC */
 #define CONFIG_VCMA9		/* on a MPL VCMA9 Board  */
-- 
1.8.4

^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [U-Boot] [PATCH 1/4] arm: make sure board_init_r() is being called using the right mode (ARM / THUMB)
  2016-02-09 15:48 ` [U-Boot] [PATCH 1/4] arm: make sure board_init_r() is being called using the right mode (ARM / THUMB) David Müller
@ 2016-02-09 17:03   ` Tom Rini
  2016-02-10  7:57     ` David Müller (ELSOFT AG)
  2016-02-15 22:35   ` [U-Boot] [U-Boot, " Tom Rini
  1 sibling, 1 reply; 12+ messages in thread
From: Tom Rini @ 2016-02-09 17:03 UTC (permalink / raw)
  To: u-boot

On Tue, Feb 09, 2016 at 04:48:28PM +0100, David M?ller wrote:

> Signed-off-by: David M?ller <d.mueller@elsoft.ch>
> ---
>  arch/arm/lib/crt0.S | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/arch/arm/lib/crt0.S b/arch/arm/lib/crt0.S
> index 2f4c14e..8415f77 100644
> --- a/arch/arm/lib/crt0.S
> +++ b/arch/arm/lib/crt0.S
> @@ -167,8 +167,12 @@ clbss_l:cmp	r0, r1			/* while not at end of BSS */
>  	mov     r0, r9                  /* gd_t */
>  	ldr	r1, [r9, #GD_RELOCADDR]	/* dest_addr */
>  	/* call board_init_r */
> +#if defined(CONFIG_SYS_THUMB_BUILD)
> +	ldr	lr, =board_init_r	/* this is auto-relocated! */
> +	bx	lr
> +#else
>  	ldr	pc, =board_init_r	/* this is auto-relocated! */
> -
> +#endif
>  	/* we should not return here. */
>  #endif

In general, my preference is always to use the thumb compatible way, can
you rework like that and explain in the commit message?  Thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160209/4d1d0d1d/attachment.sig>

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [U-Boot] [PATCH 1/4] arm: make sure board_init_r() is being called using the right mode (ARM / THUMB)
  2016-02-09 17:03   ` Tom Rini
@ 2016-02-10  7:57     ` David Müller (ELSOFT AG)
  2016-02-10 22:12       ` Tom Rini
  0 siblings, 1 reply; 12+ messages in thread
From: David Müller (ELSOFT AG) @ 2016-02-10  7:57 UTC (permalink / raw)
  To: u-boot

Hello

Tom Rini wrote:
> On Tue, Feb 09, 2016 at 04:48:28PM +0100, David M?ller wrote:
>>  	/* call board_init_r */
>> +#if defined(CONFIG_SYS_THUMB_BUILD)
>> +	ldr	lr, =board_init_r	/* this is auto-relocated! */
>> +	bx	lr
>> +#else
>>  	ldr	pc, =board_init_r	/* this is auto-relocated! */
>> -
>> +#endif
>>  	/* we should not return here. */
>>  #endif
> 
> In general, my preference is always to use the thumb compatible way, can
> you rework like that and explain in the commit message?  Thanks!

AFAIK, the "bx" instruction is undefined on non-THUMB capable
architectures. I therefore don't see a way to avoid some kind of
#if/#else/#endif construct.

Dave

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [U-Boot] [PATCH 1/4] arm: make sure board_init_r() is being called using the right mode (ARM / THUMB)
  2016-02-10  7:57     ` David Müller (ELSOFT AG)
@ 2016-02-10 22:12       ` Tom Rini
  0 siblings, 0 replies; 12+ messages in thread
From: Tom Rini @ 2016-02-10 22:12 UTC (permalink / raw)
  To: u-boot

On Wed, Feb 10, 2016 at 08:57:38AM +0100, David M?ller (ELSOFT AG) wrote:
> Hello
> 
> Tom Rini wrote:
> > On Tue, Feb 09, 2016 at 04:48:28PM +0100, David M?ller wrote:
> >>  	/* call board_init_r */
> >> +#if defined(CONFIG_SYS_THUMB_BUILD)
> >> +	ldr	lr, =board_init_r	/* this is auto-relocated! */
> >> +	bx	lr
> >> +#else
> >>  	ldr	pc, =board_init_r	/* this is auto-relocated! */
> >> -
> >> +#endif
> >>  	/* we should not return here. */
> >>  #endif
> > 
> > In general, my preference is always to use the thumb compatible way, can
> > you rework like that and explain in the commit message?  Thanks!
> 
> AFAIK, the "bx" instruction is undefined on non-THUMB capable
> architectures. I therefore don't see a way to avoid some kind of
> #if/#else/#endif construct.

Ah, OK, nevermind then, thanks.

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160210/4f511f5e/attachment.sig>

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [U-Boot] [U-Boot, 1/4] arm: make sure board_init_r() is being called using the right mode (ARM / THUMB)
  2016-02-09 15:48 ` [U-Boot] [PATCH 1/4] arm: make sure board_init_r() is being called using the right mode (ARM / THUMB) David Müller
  2016-02-09 17:03   ` Tom Rini
@ 2016-02-15 22:35   ` Tom Rini
  1 sibling, 0 replies; 12+ messages in thread
From: Tom Rini @ 2016-02-15 22:35 UTC (permalink / raw)
  To: u-boot

On Tue, Feb 09, 2016 at 04:48:28PM +0100, David M?ller (ELSOFT AG) wrote:

> Signed-off-by: David M?ller <d.mueller@elsoft.ch>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160215/6d4eb124/attachment.sig>

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [U-Boot] [U-Boot, 2/4] arm: the ARM920T is THUMB capable, so select the appropriate ISA
  2016-02-09 15:48 ` [U-Boot] [PATCH 2/4] arm: the ARM920T is THUMB capable, so select the appropriate ISA David Müller
@ 2016-02-15 22:35   ` Tom Rini
  0 siblings, 0 replies; 12+ messages in thread
From: Tom Rini @ 2016-02-15 22:35 UTC (permalink / raw)
  To: u-boot

On Tue, Feb 09, 2016 at 04:48:29PM +0100, David M?ller (ELSOFT AG) wrote:

> Signed-off-by: David M?ller <d.mueller@elsoft.ch>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160215/ed2b24e1/attachment.sig>

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [U-Boot] [U-Boot,3/4] arm: build some file(s) as ARM mode only
  2016-02-09 15:48 ` [U-Boot] [PATCH 3/4] arm: build some file(s) as ARM mode only David Müller
@ 2016-02-15 22:35   ` Tom Rini
  0 siblings, 0 replies; 12+ messages in thread
From: Tom Rini @ 2016-02-15 22:35 UTC (permalink / raw)
  To: u-boot

On Tue, Feb 09, 2016 at 04:48:30PM +0100, David M?ller (ELSOFT AG) wrote:

> Signed-off-by: David M?ller <d.mueller@elsoft.ch>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160215/ad75d66f/attachment.sig>

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [U-Boot] [U-Boot, 4/4] arm: VCMA9: because of NOR flash space constrains, activate THUMB build mode
  2016-02-09 15:48 ` [U-Boot] [PATCH 4/4] arm: VCMA9: because of NOR flash space constrains, activate THUMB build mode David Müller
@ 2016-02-15 22:35   ` Tom Rini
  0 siblings, 0 replies; 12+ messages in thread
From: Tom Rini @ 2016-02-15 22:35 UTC (permalink / raw)
  To: u-boot

On Tue, Feb 09, 2016 at 04:48:31PM +0100, David M?ller (ELSOFT AG) wrote:

> Signed-off-by: David M?ller <d.mueller@elsoft.ch>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160215/96b3d86a/attachment.sig>

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2016-02-15 22:35 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-09 15:48 [U-Boot] [PATCH 0/4] Use THUMB mode for VCMA9 U-Boot builts David Müller
2016-02-09 15:48 ` [U-Boot] [PATCH 1/4] arm: make sure board_init_r() is being called using the right mode (ARM / THUMB) David Müller
2016-02-09 17:03   ` Tom Rini
2016-02-10  7:57     ` David Müller (ELSOFT AG)
2016-02-10 22:12       ` Tom Rini
2016-02-15 22:35   ` [U-Boot] [U-Boot, " Tom Rini
2016-02-09 15:48 ` [U-Boot] [PATCH 2/4] arm: the ARM920T is THUMB capable, so select the appropriate ISA David Müller
2016-02-15 22:35   ` [U-Boot] [U-Boot, " Tom Rini
2016-02-09 15:48 ` [U-Boot] [PATCH 3/4] arm: build some file(s) as ARM mode only David Müller
2016-02-15 22:35   ` [U-Boot] [U-Boot,3/4] " Tom Rini
2016-02-09 15:48 ` [U-Boot] [PATCH 4/4] arm: VCMA9: because of NOR flash space constrains, activate THUMB build mode David Müller
2016-02-15 22:35   ` [U-Boot] [U-Boot, " Tom Rini

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.