qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] Problem running Sparc on OS X


From: Bob Nestor
Subject: [Qemu-devel] Problem running Sparc on OS X
Date: Sun, 23 Oct 2005 19:03:16 -0500

Last month Jose Renau posted a patch titled " SPARC patch for OS X (big endian machines)". Without his patch there is no output to the screen when booting Sparc on OS X. With his patch I get the console output from PROLL. I was actually able to boot the first stage bootstrap of the Debian Sarge distribution. Unfortunately the patch doesn't solve the problem of booting a Solaris installation CD, but I think this may be due to a disk block size problem. (Sun and MacPPC assume a 2048 byte disk block size on the CD.)

Here's Jose's original message with his patch:


Without the following patch, I was unable to "start" the Linux boot process
on OS X (powerPC bigendian). I tried on ia64 (Linux) and works fine too.

--- target-sparc/op_helper.c    23 Jul 2005 14:27:54 -0000      1.15
+++ target-sparc/op_helper.c    27 Sep 2005 23:54:52 -0000
@@ -225,4 +225,5 @@
 void helper_ld_asi(int asi, int size, int sign)
 {
+
     uint32_t ret = 0;

@@ -258,8 +259,12 @@
     case 0x20 ... 0x2f: /* MMU passthrough */
        cpu_physical_memory_read(T0, (void *) &ret, size);
-       if (size == 4)
-           tswap32s(&ret);
-        else if (size == 2)
-           tswap16s((uint16_t *)&ret);
+
+       tswap32s(&ret);
+       if (size == 2) {
+           ret = ret >> 16;
+       }else if (size == 1) {
+           ret = ret >> 24;
+       }
+
        break;
     default:





reply via email to

[Prev in Thread] Current Thread [Next in Thread]