* [Qemu-devel] SPARC patch for OS X (big endian machines)
@ 2005-09-27 23:58 Jose Renau
2005-09-28 5:59 ` Martin Bochnig
2005-10-30 20:53 ` Fabrice Bellard
0 siblings, 2 replies; 4+ messages in thread
From: Jose Renau @ 2005-09-27 23:58 UTC (permalink / raw)
To: qemu-devel
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:
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] SPARC patch for OS X (big endian machines)
2005-09-27 23:58 [Qemu-devel] SPARC patch for OS X (big endian machines) Jose Renau
@ 2005-09-28 5:59 ` Martin Bochnig
2005-10-30 20:53 ` Fabrice Bellard
1 sibling, 0 replies; 4+ messages in thread
From: Martin Bochnig @ 2005-09-28 5:59 UTC (permalink / raw)
To: qemu-devel; +Cc: renau
Jose Renau wrote:
>
> 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.
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:
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] SPARC patch for OS X (big endian machines)
2005-09-27 23:58 [Qemu-devel] SPARC patch for OS X (big endian machines) Jose Renau
2005-09-28 5:59 ` Martin Bochnig
@ 2005-10-30 20:53 ` Fabrice Bellard
2005-11-02 0:51 ` Jose Renau
1 sibling, 1 reply; 4+ messages in thread
From: Fabrice Bellard @ 2005-10-30 20:53 UTC (permalink / raw)
To: qemu-devel; +Cc: renau
Jose Renau wrote:
>
> 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.
I made a more generic patch. Tell me if it still works...
Fabrice.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] SPARC patch for OS X (big endian machines)
2005-10-30 20:53 ` Fabrice Bellard
@ 2005-11-02 0:51 ` Jose Renau
0 siblings, 0 replies; 4+ messages in thread
From: Jose Renau @ 2005-11-02 0:51 UTC (permalink / raw)
To: Fabrice Bellard; +Cc: qemu-devel, keertika marwaha
The new patch is clearly nicer (I did not know the interface), it
solved
the bug that I reported, but It still crashes booting Linux.
Hopefully one of my students will take a look.
On Oct 30, 2005, at 12:53 PM, Fabrice Bellard wrote:
> Jose Renau wrote:
>> 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.
>
> I made a more generic patch. Tell me if it still works...
>
> Fabrice.
>
--
Excellence is not a skill. It is an attitude. - Ralph Marston
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2005-11-02 0:51 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-09-27 23:58 [Qemu-devel] SPARC patch for OS X (big endian machines) Jose Renau
2005-09-28 5:59 ` Martin Bochnig
2005-10-30 20:53 ` Fabrice Bellard
2005-11-02 0:51 ` Jose Renau
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).