qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Artyom Tarasenko <atar4qemu@gmail.com>
To: Mike Russo <mike@papersolve.com>,
	Bug 1622547 <1622547@bugs.launchpad.net>
Cc: qemu-devel <qemu-devel@nongnu.org>,
	Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>,
	Richard Henderson <rth@twiddle.net>
Subject: Re: [Qemu-devel] [PATCH] target/sparc: Restore ldstub of odd asis
Date: Fri, 27 Jan 2017 13:57:08 +0100	[thread overview]
Message-ID: <CACXAS8CbChA8EXVwEHCj4d0FvYVOSRrcCz2AoS7Ar9uZ_f-8kA@mail.gmail.com> (raw)
In-Reply-To: <20170127081510.11805-1-rth@twiddle.net>

On Fri, Jan 27, 2017 at 9:15 AM, Richard Henderson <rth@twiddle.net> wrote:
> Fixes the booting of ss20 roms.

Mike, can you please test this fix?

> Reported-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>

Initially Reported-by: Michael Russo <mike@papersolve.com>

> Signed-off-by: Richard Henderson <rth@twiddle.net>
> ---
>  target/sparc/translate.c | 27 +++++++++++++++++++++++++--
>  1 file changed, 25 insertions(+), 2 deletions(-)
>
> diff --git a/target/sparc/translate.c b/target/sparc/translate.c
> index 655060c..aa6734d 100644
> --- a/target/sparc/translate.c
> +++ b/target/sparc/translate.c
> @@ -2448,8 +2448,31 @@ static void gen_ldstub_asi(DisasContext *dc, TCGv dst, TCGv addr, int insn)
>          gen_ldstub(dc, dst, addr, da.mem_idx);
>          break;
>      default:
> -        /* ??? Should be DAE_invalid_asi.  */
> -        gen_exception(dc, TT_DATA_ACCESS);
> +        /* ??? In theory, this should be raise DAE_invalid_asi.
> +           But the SS-20 roms do ldstuba [%l0] #ASI_M_CTL, %o1.  */
> +        if (parallel_cpus) {
> +            gen_helper_exit_atomic(cpu_env);
> +        } else {
> +            TCGv_i32 r_asi = tcg_const_i32(da.asi);
> +            TCGv_i32 r_mop = tcg_const_i32(MO_UB);
> +            TCGv_i64 s64, t64;
> +
> +            save_state(dc);
> +            t64 = tcg_temp_new_i64();
> +            gen_helper_ld_asi(t64, cpu_env, addr, r_asi, r_mop);
> +
> +            s64 = tcg_const_i64(0xff);
> +            gen_helper_st_asi(cpu_env, addr, s64, r_asi, r_mop);
> +            tcg_temp_free_i64(s64);
> +            tcg_temp_free_i32(r_mop);
> +            tcg_temp_free_i32(r_asi);
> +
> +            tcg_gen_trunc_i64_tl(dst, t64);
> +            tcg_temp_free_i64(t64);
> +
> +            /* End the TB.  */
> +            dc->npc = DYNAMIC_PC;
> +        }
>          break;
>      }
>  }
> --
> 2.9.3
>



-- 
Regards,
Artyom Tarasenko

SPARC and PPC PReP under qemu blog: http://tyom.blogspot.com/search/label/qemu

  reply	other threads:[~2017-01-27 12:57 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-27  8:15 [Qemu-devel] [PATCH] target/sparc: Restore ldstub of odd asis Richard Henderson
2017-01-27 12:57 ` Artyom Tarasenko [this message]
2017-01-27 20:08   ` [Qemu-devel] [Bug 1622547] " Mark Cave-Ayland
  -- strict thread matches above, loose matches on Subject: below --
2016-09-12 10:13 [Qemu-devel] [Bug 1622547] [NEW] qemu-system-sparc fatal error Trap 0x29 on Solaris 2.6 Mathieu Clabaut
2016-09-12 11:44 ` Artyom Tarasenko
2016-09-12 12:09 ` [Qemu-devel] [Bug 1622547] " Mathieu Clabaut
2017-01-23 18:06 ` mike
2017-01-23 23:48 ` mike
2017-01-24  0:46 ` mike
2017-01-25  7:49 ` Mark Cave-Ayland
2017-01-25 13:46 ` mike
2017-01-25 16:16 ` mike
2017-01-25 18:14   ` Artyom Tarasenko
2017-01-27 15:02 ` mike
2017-01-30 20:53 ` VIncent S. Cojot
2017-01-30 23:06 ` VIncent S. Cojot
2017-03-12 11:10 ` Mark Cave-Ayland
2017-07-21 14:20 ` Thomas Huth

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=CACXAS8CbChA8EXVwEHCj4d0FvYVOSRrcCz2AoS7Ar9uZ_f-8kA@mail.gmail.com \
    --to=atar4qemu@gmail.com \
    --cc=1622547@bugs.launchpad.net \
    --cc=mark.cave-ayland@ilande.co.uk \
    --cc=mike@papersolve.com \
    --cc=qemu-devel@nongnu.org \
    --cc=rth@twiddle.net \
    /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).