qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] target/sparc: Restore ldstub of odd asis
@ 2017-01-27  8:15 Richard Henderson
  2017-01-27 12:57 ` Artyom Tarasenko
  0 siblings, 1 reply; 18+ messages in thread
From: Richard Henderson @ 2017-01-27  8:15 UTC (permalink / raw)
  To: qemu-devel; +Cc: mark.cave-ayland, atar4qemu

Fixes the booting of ss20 roms.

Reported-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
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

^ permalink raw reply related	[flat|nested] 18+ messages in thread
* [Qemu-devel] [Bug 1622547] [NEW] qemu-system-sparc fatal error Trap 0x29 on Solaris 2.6
@ 2016-09-12 10:13 Mathieu Clabaut
  2016-09-12 11:44 ` Artyom Tarasenko
                   ` (12 more replies)
  0 siblings, 13 replies; 18+ messages in thread
From: Mathieu Clabaut @ 2016-09-12 10:13 UTC (permalink / raw)
  To: qemu-devel

Public bug reported:

When trying to install Solaris 2.6 from original CDROM, qemu fail with
the following error :

qemu: fatal: Trap 0x29 while interrupts disabled, Error state
pc: f0041280  npc: f0041284
%g0-7: 00000000 f0281800 08000000 ffffffff 00000000 f0243b88 00000001 f0244020
%o0-7: 40400ce2 40400ce2 00000000 404000e2 f0243b88 00000000 f023ffd8 f0057914 
%l0-7: 40000cc2 f009645c f0096460 00000002 00000209 00000004 00000007 f023ff90 
%i0-7: 00000042 404000e3 00000000 404000e3 e0000000 f028192a f0240038 f0096448 
%f00:  0000000000000000 0000000000000000 0000000000000000 0000000000000000
%f08:  0000000000000000 0000000000000000 0000000000000000 0000000000000000
%f16:  0000000000000000 0000000000000000 0000000000000000 0000000000000000
%f24:  0000000000000000 0000000000000000 0000000000000000 0000000000000000
psr: 40400cc2 (icc: -Z-- SPE: SP-) wim: 00000002
fsr: 00000000 y: 00000000

The command line was :

qemu-system-sparc -nographic -bios ./openbios-sparc32 -M SS-20 -hda
./36G.disk -m 512 -cdrom Solaris_2.6_Software_05_98.img -boot d -serial
telnet:0.0.0.0:3000,server -smp 2,cores=2 -monitor null

It fails with a similar output when using bios ss20_v2.25_rom.

▶ qemu-system-sparc --version
QEMU emulator version 2.7.0, Copyright (c) 2003-2016 Fabrice Bellard and the QEMU Project developers

▶ uname -a
Linux xxx 4.7.1-1-ARCH #1 SMP PREEMPT Wed Aug 17 08:13:35 CEST 2016 x86_64 GNU/Linux

** Affects: qemu
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1622547

Title:
  qemu-system-sparc fatal error Trap 0x29 on Solaris 2.6

Status in QEMU:
  New

Bug description:
  When trying to install Solaris 2.6 from original CDROM, qemu fail with
  the following error :

  qemu: fatal: Trap 0x29 while interrupts disabled, Error state
  pc: f0041280  npc: f0041284
  %g0-7: 00000000 f0281800 08000000 ffffffff 00000000 f0243b88 00000001 f0244020
  %o0-7: 40400ce2 40400ce2 00000000 404000e2 f0243b88 00000000 f023ffd8 f0057914 
  %l0-7: 40000cc2 f009645c f0096460 00000002 00000209 00000004 00000007 f023ff90 
  %i0-7: 00000042 404000e3 00000000 404000e3 e0000000 f028192a f0240038 f0096448 
  %f00:  0000000000000000 0000000000000000 0000000000000000 0000000000000000
  %f08:  0000000000000000 0000000000000000 0000000000000000 0000000000000000
  %f16:  0000000000000000 0000000000000000 0000000000000000 0000000000000000
  %f24:  0000000000000000 0000000000000000 0000000000000000 0000000000000000
  psr: 40400cc2 (icc: -Z-- SPE: SP-) wim: 00000002
  fsr: 00000000 y: 00000000

  The command line was :

  qemu-system-sparc -nographic -bios ./openbios-sparc32 -M SS-20 -hda
  ./36G.disk -m 512 -cdrom Solaris_2.6_Software_05_98.img -boot d
  -serial telnet:0.0.0.0:3000,server -smp 2,cores=2 -monitor null

  It fails with a similar output when using bios ss20_v2.25_rom.

  ▶ qemu-system-sparc --version
  QEMU emulator version 2.7.0, Copyright (c) 2003-2016 Fabrice Bellard and the QEMU Project developers

  ▶ uname -a
  Linux xxx 4.7.1-1-ARCH #1 SMP PREEMPT Wed Aug 17 08:13:35 CEST 2016 x86_64 GNU/Linux

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1622547/+subscriptions

^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2017-07-21 14:35 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-01-27  8:15 [Qemu-devel] [PATCH] target/sparc: Restore ldstub of odd asis Richard Henderson
2017-01-27 12:57 ` Artyom Tarasenko
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

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).