Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 01 May 2012 13:17:38 -0600
From:      Ian Lepore <freebsd@damnhippie.dyndns.org>
To:        Warner Losh <imp@bsdimp.com>
Cc:        arm@FreeBSD.org, Tim Kientzle <tim@kientzle.com>
Subject:   Re: Request for Review:  improving Ubldr syscall linkage.
Message-ID:  <1335899858.1111.22.camel@revolution.hippie.lan>
In-Reply-To: <98817205-D039-4EA2-BD6F-7F127926F3F8@bsdimp.com>
References:  <1BB6F5DA-36E9-471A-8926-F56275D90962@kientzle.com> <5FBCFC46-1DD9-4F29-8DD9-CB1E19D9BB21@gmail.com> <1E1891C5-3ACC-4C35-B966-D9B96424E245@bsdimp.com> <1335891300.1111.17.camel@revolution.hippie.lan> <98817205-D039-4EA2-BD6F-7F127926F3F8@bsdimp.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, 2012-05-01 at 12:06 -0600, Warner Losh wrote:
> On May 1, 2012, at 10:55 AM, Ian Lepore wrote:
> 
> > On Tue, 2012-05-01 at 10:23 -0600, Warner Losh wrote:
> >> On May 1, 2012, at 2:01 AM, Damjan Marion wrote:
> >> 
> >>> 
> >>> On May 1, 2012, at 7:43 AM, Tim Kientzle wrote:
> >>>> 
> >>>> The only odd point:  The ARM reference I have lists blx
> >>>> only for ARMv6 and ARMv7 instruction sets … or am I
> >>>> misreading that somehow?
> >>> 
> >>> BX and BLX are supported since ARMv5 in ARM mode and since ARMv4 in THUMB mode so this will break some very old stuff like StrongARM which is ARMv4(non T).
> >> 
> >> Of the Atmel stuff, only the AT91RM9200 is ARM v4.  The rest is ARMv5.  I don't know that we support the callback to the bootloader for the Atmel port, but a lot of work went in for the AT91SAM stuff that might have snuck that kind of change in when I wasn't looking.
> >> 
> >> Warner
> > 
> > The rm9200 is ARMv4T so according to the ARM ARM it should be okay with
> > the BX and BLX instructions.
> 
> 
> OK.  The fact we're not running in Thumb mode won't be a problem?
> 
> Warner
> 

I don't think so.  The low order bit of the address being loaded
controls the transition between regular and thumb mode, and since we
would never load an odd address we'd never transition to thumb mode.
I've never worked with thumb-mode code, but the way I read the doc, a
transition to thumb mode only happens if the low order bit is set on a
BX or BLX (or MOV or anything else that loads a value into PC).

-- Ian





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1335899858.1111.22.camel>