[PATCH 7/7] ARM: Thumb-2: Restore sensible zImage header layout for CONFIG_THUMB2_KERNEL

Catalin Marinas catalin.marinas at arm.com
Wed Nov 17 05:21:03 EST 2010


On Wed, 2010-11-17 at 09:16 +0000, Dave Martin wrote:
> On Tue, Nov 16, 2010 at 6:26 PM, Russell King - ARM Linux
> <linux at arm.linux.org.uk> wrote:
> > On Tue, Nov 16, 2010 at 01:14:37PM +0000, Dave Martin wrote:
> >> Maybe it is a better idea to preserve the current header as is with the
> >> ARM mode nops and perform the switch to Thumb mode using the branch
> >> instruction after those 8 nops.  This way the kernel image format will
> >> remain compatible with existing bootloaders without a need for
> >> bootloaders to know if the image is ARM or Thumb mode.
> >
> > That is definitely worth doing, and sounds like a better idea.
> 
> OK, that sounds reasonable -- I can try and propose a patch for this.
> If the contents of the first 32 bytes doesn't matter, we can replace
> the first two words with something like
> 
> adr r12, BSYM(real_start)
> bx r12

Would these be compiled to ARM or Thumb-2?

-- 
Catalin




More information about the linux-arm-kernel mailing list