From mboxrd@z Thu Jan 1 00:00:00 1970 From: Aneesh V Date: Mon, 06 Feb 2012 17:56:10 +0530 Subject: [U-Boot] [RFC PATCH 0/4] Enable Thumb build for ARM platforms In-Reply-To: <1328528248-20872-1-git-send-email-aneesh@ti.com> References: <1328528248-20872-1-git-send-email-aneesh@ti.com> Message-ID: <4F2FC6E2.8080209@ti.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Monday 06 February 2012 05:07 PM, Aneesh V wrote: > 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. Some statistics: Code-size reduction: Image ARM build Thumb build % Reduction u-boot.bin 190408 144676 24.01% u-boot-spl.bin 33200 25096 24.40% Performance(timestamp just before the main loop): ARM build Thumb build % Reduction 898510us 878247us -2.25% That is, performance actually improved marginally for the Thumb build, maybe because of the reduced image sizes. br, Aneesh