From: "Alex Bennée" <alex.bennee@linaro.org>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: qemu-arm <qemu-arm@nongnu.org>,
Richard Henderson <richard.henderson@linaro.org>,
QEMU Developers <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [PATCH v5 2/5] target/arm: handle M-profile semihosting at translate time
Date: Fri, 13 Sep 2019 14:28:46 +0100 [thread overview]
Message-ID: <875zlwz5o1.fsf@linaro.org> (raw)
In-Reply-To: <CAFEAcA8NsdpEMOH1MFDta0LUswyqSDHCgtOh6g5k3+EU0FVuHA@mail.gmail.com>
Peter Maydell <peter.maydell@linaro.org> writes:
> On Wed, 11 Sep 2019 at 17:50, Alex Bennée <alex.bennee@linaro.org> wrote:
>>
>> We do this for other semihosting calls so we might as well do it for
>> M-profile as well.
>>
>> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
>> Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
>>
>> ---
>> v2
>> - update for change to gen_exception_internal_insn API
>> v3
>> - update for decode tree
>> v4
>> - use !IS_USER
>> ---
>
>> diff --git a/target/arm/translate.c b/target/arm/translate.c
>> index 34bb280e3da..6689acc911e 100644
>> --- a/target/arm/translate.c
>> +++ b/target/arm/translate.c
>> @@ -8424,7 +8424,13 @@ static bool trans_BKPT(DisasContext *s, arg_BKPT *a)
>> if (!ENABLE_ARCH_5) {
>> return false;
>> }
>> - gen_exception_bkpt_insn(s, syn_aa32_bkpt(a->imm, false));
>> + if (arm_dc_feature(s, ARM_FEATURE_M) &&
>> + semihosting_enabled() && !IS_USER(s) &&
>> + (a->imm == 0xab)) {
>> + gen_exception_internal_insn(s, s->base.pc_next, EXCP_SEMIHOST);
>> + } else {
>> + gen_exception_bkpt_insn(s, syn_aa32_bkpt(a->imm, false));
>> + }
>> return true;
>> }
>
> This is still disabling semihosting for the linux-user-mode
> build for M-profile, isn't it ?
Sure - as rth suggested. But m-profile doesn't run Linux so why would we
support it in linux-user?
>
> thanks
> -- PMM
--
Alex Bennée
next prev parent reply other threads:[~2019-09-13 13:30 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-11 16:49 [Qemu-devel] [PATCH v5 0/5] semihosting cleanups (plus minor tests/tcg tweak) Alex Bennée
2019-09-11 16:49 ` [Qemu-devel] [PATCH v5 1/5] tests/tcg: clean-up some comments after the de-tangling Alex Bennée
2019-09-13 13:02 ` Peter Maydell
2019-09-11 16:49 ` [Qemu-devel] [PATCH v5 2/5] target/arm: handle M-profile semihosting at translate time Alex Bennée
2019-09-13 13:03 ` Peter Maydell
2019-09-13 13:28 ` Alex Bennée [this message]
2019-09-13 13:31 ` Peter Maydell
2019-09-13 13:48 ` Peter Maydell
2019-09-13 13:48 ` Alex Bennée
2019-09-11 16:49 ` [Qemu-devel] [PATCH v5 3/5] target/arm: handle A-profile " Alex Bennée
2019-09-13 13:04 ` Peter Maydell
2019-09-11 16:49 ` [Qemu-devel] [PATCH v5 4/5] target/arm: remove run time semihosting checks Alex Bennée
2019-09-11 16:49 ` [Qemu-devel] [PATCH v5 5/5] target/arm: remove run-time semihosting checks for linux-user Alex Bennée
2019-09-13 13:05 ` 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=875zlwz5o1.fsf@linaro.org \
--to=alex.bennee@linaro.org \
--cc=peter.maydell@linaro.org \
--cc=qemu-arm@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=richard.henderson@linaro.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).