From: Mike Haben <mike.haben@virgin.net>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: QEMU Developers <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [PATCH] ARM targets: added ARM_FEATURE for Thumb-exception bit in system control register
Date: Sat, 05 Sep 2015 14:38:42 +0100 [thread overview]
Message-ID: <55EAF062.4070209@virgin.net> (raw)
In-Reply-To: <CAFEAcA8TXpBcQxXbHosYku_S2qkCBRWDEmVT4ROu3a_2ywt4-w@mail.gmail.com>
Hi Peter,
You're quite right, on reading some more I see the correspondence
with V7.
However... while reading up on the Cortex-M3/4/7, I also found
"Only Thumb and Thumb-2 instruction sets are supported in Cortex-M
architectures, but the legacy 32-bit ARM instruction set isn't
supported". Ugh - to avoid storing up a problem for the future, I think
I better think it out again!
best regards,
Mike H.
On 05/09/15 14:02, Peter Maydell wrote:
> On 5 September 2015 at 12:28, Mike Haben <mike.haben@virgin.net> wrote:
>> Most ARM cores switch unconditionally to ARM mode when an exception occurs;
>> some Cortex variants have a "Thumb-exception enable" bit in the system
>> control register that allows an unconditional switch to Thumb mode instead
>> when handling exceptions. The presence of this bit seems unrelated to the
>> version of instruction set, and some earlier cores use the same bit (30) in
>> the control register for a completely different purpose, so seems sensible
>> to handle it as yet another ARM feature.
>
> I think that SCTLR.TE is an ARMv7 feature -- it is documented
> in the v7 ARM ARM, and in the v6 ARM ARM the bit is UNP/SBZP.
> And the CPUs you've set your new feature bit on in this patch
> are exactly the v7 CPUs.
>
> So I think that we should just change the existing guard
> (which requires FEATURE_V4T) to require FEATURE_V7 instead).
> You're right that we need to specifically squash env->thumb
> to false in the no-feature-present case, though.
>
> thanks
> -- PMM
>
next prev parent reply other threads:[~2015-09-05 13:38 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-03 9:27 [Qemu-devel] [PATCH] Added specific ARM_FEATURE for Thumb-exception enable bit GitNoviceMikeH
2015-09-03 16:58 ` Peter Crosthwaite
2015-09-04 13:13 ` Mike Haben
2015-09-05 11:28 ` [Qemu-devel] [PATCH] ARM targets: added ARM_FEATURE for Thumb-exception bit in system control register Mike Haben
2015-09-05 13:02 ` Peter Maydell
2015-09-05 13:38 ` Mike Haben [this message]
2015-09-05 13:56 ` Peter Maydell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=55EAF062.4070209@virgin.net \
--to=mike.haben@virgin.net \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.