Skip to content

RFC Enable Thumb build for ARM platforms

Aneesh V u-boot 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest4 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4ARM: enable Thumb buildREADME arch/arm/config.mk+26 -121 reply
1/4ARM: enable Thumb build+0 -00 replies
1/4ARM: enable Thumb buildREADME arch/arm/config.mk+23 -60 replies
2/4OMAP3+: fix issues with Thumb buildarch/arm/cpu/armv7/cpu.c arch/arm/cpu/armv7/omap-common/hwinit-common.c arch/arm/cpu/armv7/omap-common/lowlevel_init.S+30 -31 reply
2/4OMAP3+: fix issues with Thumb build+0 -00 replies
2/4OMAP3+: fix issues with Thumb buildarch/arm/cpu/armv7/omap-common/lowlevel_init.S+1 -00 replies
2/4arm: add %function attribute to assembly functionsarch/arm/cpu/arm1136/omap24xx/reset.S arch/arm/cpu/arm1136/start.S arch/arm/cpu/arm1176/s3c64xx/cpu_init.S +45 more+186 -10010 replies
2/4arm: add %function attribute to assembly functions+0 -01 reply
2/4arm: add %function attribute to assembly functions+0 -01 reply
2/4arm: add %function attribute to assembly functions+0 -01 reply
2/4arm: add %function attribute to assembly functionsconfig.mk+1 -11 reply
2/4arm: add %function attribute to assembly functions+0 -00 replies
2/4arm: add %function attribute to assembly functions+0 -01 reply
2/4arm: add %function attribute to assembly functions+0 -00 replies
2/4arm: add %function attribute to assembly functions+0 -00 replies
3/4OMAP3+: Use -march=armv7-a and thereby enable Thumb-2arch/arm/cpu/armv7/omap-common/config.mk arch/arm/cpu/armv7/omap3/config.mk arch/arm/cpu/armv7/omap4/config.mk+4 -10 replies
3/4armv7: Use -march=armv7-a and thereby enable Thumb-2arch/arm/cpu/armv7/config.mk+3 -20 replies
4/4OMAP4: enable Thumb buildinclude/configs/omap4_common.h+2 -00 replies
4/4OMAP4: enable Thumb buildinclude/configs/omap4_common.h+2 -00 replies

Reviews trailers per patch

None of the 19 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchMike Frysinger
SeriesA-b
1/4
1/4
1/4
2/4
2/4
2/4
2/4
2/4
2/4
2/4
2/4
2/4
2/4
2/4
2/4
3/4
3/4
4/4
4/4

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [U-Boot] [RFC PATCH 0/4] Enable Thumb build for ARM platforms

Thumb is an alternate instruction set available in many ARM processors. Below is a detailed description from ARM specs:

"The Thumb instruction set is a re-encoded subset of the ARM instruction set. Thumb instructions execute in their own processor state, with the architecture defining the mechanisms required to transition between ARM and Thumb states. The key difference is that Thumb instructions are half the size of ARM instructions(16 bits compared with 32 bits). Greater code density can usually be achieved by using the Thumb instruction set in preference to the ARM instruction set, at a cost of some reduction in performance"

"In ARMv6T2, Thumb-2 technology is introduced. This technology makes it possible to extend the original Thumb instruction set with many 32-bit instructions. The range of 32-bit Thumb instructions included in ARMv6T2 permits Thumb code to achieve performance similar to ARM code, with code density better than that of earlier Thumb code. From ARMv6T2, the ARM and Thumb instruction sets provide almost identical functionality"

This series adds Thumb support in U-Boot and enables it for OMAP4. It also fixes issues faced while booting OMAP4 with Thumb-2 images of U-Boot and SPL.

Thumb mode is becoming increasingly relevant for U-Boot with the advent of SPL. It's very important to keep SPL size smaller considering the internal RAM size constraints on many platforms. On OMAP4 the size reduction enables us to use SPL on secure devices that have smaller internal RAM available for non-secure world.

I would request all who are interested in this feature to test it and give feedback. To make that easier I have pushed my patches here (along with the timer patch from Nicolas that fixes boot on OMAP4):

git at github.com:aneeshv/u-boot.git
branch: thumb

To enable support for new platforms you just need to add CONFIG_SYS_THUMB_BUILD in your config file.

Aneesh V (4):
ARM: enable Thumb build
OMAP3+: fix issues with Thumb build
OMAP3+: Use -march=armv7-a and thereby enable Thumb-2
OMAP4: enable Thumb build

 README                                         |    9 +++++++
 arch/arm/config.mk                             |   29 ++++++++++++++----------
 arch/arm/cpu/armv7/cpu.c                       |    4 ++-
 arch/arm/cpu/armv7/omap-common/config.mk       |    1 -
 arch/arm/cpu/armv7/omap-common/hwinit-common.c |   25 ++++++++++++++++++++
 arch/arm/cpu/armv7/omap-common/lowlevel_init.S |    4 +-
 arch/arm/cpu/armv7/omap3/config.mk             |    2 +
 arch/arm/cpu/armv7/omap4/config.mk             |    2 +
 include/configs/omap4_common.h                 |    2 +
 9 files changed, 62 insertions(+), 16 deletions(-)