|
From: | Martin Bochnig |
Subject: | Re: [Qemu-devel] SPARC patch for OS X (big endian machines) |
Date: | Wed, 28 Sep 2005 07:59:39 +0200 |
User-agent: | Mozilla/5.0 (X11; U; SunOS sun4u; en-US; rv:1.7) Gecko/20050614 |
Jose Renau wrote:
Without the following patch, I was unable to "start" the Linux boot processon OS X (powerPC bigendian). I tried on ia64 (Linux) and works fine too.
Pretty cool. I can confirm this for SPARC hosts , too (also MSB). Hey, be aware that the SPARConSPARC case finally works with your patch :) Even in SDL/gui mode, not just with "-nographic". Thank you!
--- 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:
[Prev in Thread] | Current Thread | [Next in Thread] |