[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-arm] [PATCH v5 2/5] target/arm: handle M-profile semihosting a
From: |
Alex Bennée |
Subject: |
Re: [Qemu-arm] [PATCH v5 2/5] target/arm: handle M-profile semihosting at translate time |
Date: |
Fri, 13 Sep 2019 14:28:46 +0100 |
User-agent: |
mu4e 1.3.4; emacs 27.0.50 |
Peter Maydell <address@hidden> writes:
> On Wed, 11 Sep 2019 at 17:50, Alex Bennée <address@hidden> 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 <address@hidden>
>> Reviewed-by: Richard Henderson <address@hidden>
>>
>> ---
>> 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
[Qemu-arm] [PATCH v5 3/5] target/arm: handle A-profile semihosting at translate time, Alex Bennée, 2019/09/11
[Qemu-arm] [PATCH v5 4/5] target/arm: remove run time semihosting checks, Alex Bennée, 2019/09/11
[Qemu-arm] [PATCH v5 5/5] target/arm: remove run-time semihosting checks for linux-user, Alex Bennée, 2019/09/11