All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] Adding support for Mac OS X ppc64 host
@ 2009-12-06  4:57 Andreas Faerber
  2009-12-06  4:57 ` [Qemu-devel] [PATCH 1/3] TCG: Mac OS X support for ppc64 target Andreas Faerber
  2009-12-06  5:14 ` [Qemu-devel] Adding support for Mac OS X ppc64 host malc
  0 siblings, 2 replies; 28+ messages in thread
From: Andreas Faerber @ 2009-12-06  4:57 UTC (permalink / raw)
  To: qemu-devel

Hello,

This mini series adds TCG target support for OSX/ppc64
and fixes the Cocoa frontend for ppc64.

With these patches applied, qemu and qemu-system-x86_64
are usable. Tested on Mac OS X v10.5 with a Haiku disk image
and a Fedora 12 installation disk.

qemu-system-sparc works fine, too.

qemu-system-sparc64 works on ppc64 while it didn't on ppc!
qemu-system-ppc appears to hang on ppc64 but doesn't on ppc.

I suggest we start applying these patches and try to fix
these weird issues afterwards.

Regards,

Andreas

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

* [Qemu-devel] [PATCH 1/3] TCG: Mac OS X support for ppc64 target
  2009-12-06  4:57 [Qemu-devel] Adding support for Mac OS X ppc64 host Andreas Faerber
@ 2009-12-06  4:57 ` Andreas Faerber
  2009-12-06  4:57   ` [Qemu-devel] [PATCH 2/3] Cocoa: ppc64 host support Andreas Faerber
  2009-12-06  5:13   ` [Qemu-devel] Re: [PATCH 1/3] TCG: Mac OS X support for ppc64 target malc
  2009-12-06  5:14 ` [Qemu-devel] Adding support for Mac OS X ppc64 host malc
  1 sibling, 2 replies; 28+ messages in thread
From: Andreas Faerber @ 2009-12-06  4:57 UTC (permalink / raw)
  To: qemu-devel; +Cc: Andreas Faerber

Darwin/ppc64 does not use function descriptors,
adapt prologue and tcg_out_call accordingly.
GPR2 is available for general use, so let's use it.

http://developer.apple.com/mac/library/documentation/DeveloperTools/Conceptual/LowLevelABI/110-64-bit_PowerPC_Function_Calling_Conventions/64bitPowerPC.html

Signed-off-by: Andreas Faerber <andreas.faerber@web.de>
Cc: malc <av1474@comtv.ru>
---
 tcg/ppc64/tcg-target.c |   30 ++++++++++++++++++++++++++++++
 1 files changed, 30 insertions(+), 0 deletions(-)

diff --git a/tcg/ppc64/tcg-target.c b/tcg/ppc64/tcg-target.c
index a612e10..bf9b7d9 100644
--- a/tcg/ppc64/tcg-target.c
+++ b/tcg/ppc64/tcg-target.c
@@ -104,6 +104,9 @@ static const int tcg_target_reg_alloc_order[] = {
     TCG_REG_R29,
     TCG_REG_R30,
     TCG_REG_R31,
+#ifdef __APPLE__
+    TCG_REG_R2,
+#endif
     TCG_REG_R3,
     TCG_REG_R4,
     TCG_REG_R5,
@@ -112,7 +115,9 @@ static const int tcg_target_reg_alloc_order[] = {
     TCG_REG_R8,
     TCG_REG_R9,
     TCG_REG_R10,
+#ifndef __APPLE__
     TCG_REG_R11,
+#endif
     TCG_REG_R12,
     TCG_REG_R24,
     TCG_REG_R25,
@@ -136,6 +141,10 @@ static const int tcg_target_call_oarg_regs[2] = {
 };
 
 static const int tcg_target_callee_save_regs[] = {
+#ifdef __APPLE__
+    TCG_REG_R11,
+    TCG_REG_R13,
+#endif
     TCG_REG_R14,
     TCG_REG_R15,
     TCG_REG_R16,
@@ -477,8 +486,21 @@ static void tcg_out_movi (TCGContext *s, TCGType type,
     }
 }
 
+#ifdef __APPLE__
+static void tcg_out_b (TCGContext *s, int mask, tcg_target_long target);
+#endif
+
 static void tcg_out_call (TCGContext *s, tcg_target_long arg, int const_arg)
 {
+#ifdef __APPLE__
+    if (const_arg) {
+        tcg_out_b (s, LK, arg);
+    }
+    else {
+        tcg_out32 (s, MTSPR | RS (arg) | LR);
+        tcg_out32 (s, BCLR | BO_ALWAYS | LK);
+    }
+#else
     int reg;
 
     if (const_arg) {
@@ -492,6 +514,7 @@ static void tcg_out_call (TCGContext *s, tcg_target_long arg, int const_arg)
     tcg_out32 (s, LD | RT (11) | RA (reg) | 16);
     tcg_out32 (s, LD | RT (2) | RA (reg) | 8);
     tcg_out32 (s, BCCTR | BO_ALWAYS | LK);
+#endif
 }
 
 static void tcg_out_ldst (TCGContext *s, int ret, int addr,
@@ -859,10 +882,12 @@ void tcg_target_qemu_prologue (TCGContext *s)
         ;
     frame_size = (frame_size + 15) & ~15;
 
+#ifndef __APPLE__
     /* First emit adhoc function descriptor */
     addr = (uint64_t) s->code_ptr + 24;
     tcg_out32 (s, addr >> 32); tcg_out32 (s, addr); /* entry point */
     s->code_ptr += 16;          /* skip TOC and environment pointer */
+#endif
 
     /* Prologue */
     tcg_out32 (s, MFSPR | RT (0) | LR);
@@ -1516,6 +1541,9 @@ void tcg_target_init (TCGContext *s)
     tcg_regset_set32 (tcg_target_available_regs[TCG_TYPE_I64], 0, 0xffffffff);
     tcg_regset_set32 (tcg_target_call_clobber_regs, 0,
                      (1 << TCG_REG_R0) |
+#ifdef __APPLE__
+                     (1 << TCG_REG_R2) |
+#endif
                      (1 << TCG_REG_R3) |
                      (1 << TCG_REG_R4) |
                      (1 << TCG_REG_R5) |
@@ -1531,7 +1559,9 @@ void tcg_target_init (TCGContext *s)
     tcg_regset_clear (s->reserved_regs);
     tcg_regset_set_reg (s->reserved_regs, TCG_REG_R0);
     tcg_regset_set_reg (s->reserved_regs, TCG_REG_R1);
+#ifndef __APPLE__
     tcg_regset_set_reg (s->reserved_regs, TCG_REG_R2);
+#endif
     tcg_regset_set_reg (s->reserved_regs, TCG_REG_R13);
 
 #ifdef CONFIG_USE_GUEST_BASE
-- 
1.6.5.3

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

* [Qemu-devel] [PATCH 2/3] Cocoa: ppc64 host support
  2009-12-06  4:57 ` [Qemu-devel] [PATCH 1/3] TCG: Mac OS X support for ppc64 target Andreas Faerber
@ 2009-12-06  4:57   ` Andreas Faerber
  2009-12-06  4:57     ` [Qemu-devel] [PATCH 3/3] Cocoa: Silence warnings Andreas Faerber
  2009-12-06  5:13   ` [Qemu-devel] Re: [PATCH 1/3] TCG: Mac OS X support for ppc64 target malc
  1 sibling, 1 reply; 28+ messages in thread
From: Andreas Faerber @ 2009-12-06  4:57 UTC (permalink / raw)
  To: qemu-devel; +Cc: Alexander Graf, Andreas Faerber, Mike Kronenberg

Fix integer usage in the Cocoa backend: NSInteger is long on LP64.

http://developer.apple.com/mac/library/documentation/Cocoa/Reference/ApplicationKit/Classes/NSView_Class/Reference/NSView.html#//apple_ref/doc/uid/20000014-BBCFHHCD

This makes the graphical display show up on a ppc64 host.

Signed-off-by: Andreas Faerber <andreas.faerber@web.de>
Cc: Alexander Graf <alex@csgraf.de>
Cc: Mike Kronenberg <mike.kronenberg@kronenberg.org>
---
 cocoa.m |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/cocoa.m b/cocoa.m
index 55ff2b4..7062571 100644
--- a/cocoa.m
+++ b/cocoa.m
@@ -337,7 +337,7 @@ int cocoa_keycode_to_qemu(int keycode)
         } else {
             // selective drawing code (draws only dirty rectangles) (OS X >= 10.4)
             const NSRect *rectList;
-            int rectCount;
+            NSInteger rectCount;
             int i;
             CGImageRef clipImageRef;
             CGRect clipRect;
-- 
1.6.5.3

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

* [Qemu-devel] [PATCH 3/3] Cocoa: Silence warnings
  2009-12-06  4:57   ` [Qemu-devel] [PATCH 2/3] Cocoa: ppc64 host support Andreas Faerber
@ 2009-12-06  4:57     ` Andreas Faerber
  0 siblings, 0 replies; 28+ messages in thread
From: Andreas Faerber @ 2009-12-06  4:57 UTC (permalink / raw)
  To: qemu-devel; +Cc: John Arbuckle, Andreas Faerber

Missing static for cocoa_keycode_to_qemu.
Missing const for character constant.

__LITTLE_ENDIAN__ is undefined on Big Endian host.

Signed-off-by: Andreas Faerber <andreas.faerber@web.de>
Cc: John Arbuckle <programmingkidx@gmail.com>
---
 cocoa.m |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/cocoa.m b/cocoa.m
index 7062571..05f507d 100644
--- a/cocoa.m
+++ b/cocoa.m
@@ -229,7 +229,7 @@ int keymap[] =
 */
 };
 
-int cocoa_keycode_to_qemu(int keycode)
+static int cocoa_keycode_to_qemu(int keycode)
 {
     if((sizeof(keymap)/sizeof(int)) <= keycode)
     {
@@ -315,7 +315,7 @@ int cocoa_keycode_to_qemu(int keycode)
             screen.bitsPerComponent, //bitsPerComponent
             screen.bitsPerPixel, //bitsPerPixel
             (screen.width * (screen.bitsPerComponent/2)), //bytesPerRow
-#if __LITTLE_ENDIAN__
+#ifdef __LITTLE_ENDIAN__
             CGColorSpaceCreateWithName(kCGColorSpaceGenericRGB), //colorspace for OS X >= 10.4
             kCGBitmapByteOrder32Little | kCGImageAlphaNoneSkipFirst,
 #else
@@ -783,7 +783,7 @@ int cocoa_keycode_to_qemu(int keycode)
     if(returnCode == NSCancelButton) {
         exit(0);
     } else if(returnCode == NSOKButton) {
-        char *bin = "qemu";
+        const char *bin = "qemu";
         char *img = (char*)[ [ sheet filename ] cStringUsingEncoding:NSASCIIStringEncoding];
 
         char **argv = (char**)malloc( sizeof(char*)*3 );
-- 
1.6.5.3

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

* [Qemu-devel] Re: [PATCH 1/3] TCG: Mac OS X support for ppc64 target
  2009-12-06  4:57 ` [Qemu-devel] [PATCH 1/3] TCG: Mac OS X support for ppc64 target Andreas Faerber
  2009-12-06  4:57   ` [Qemu-devel] [PATCH 2/3] Cocoa: ppc64 host support Andreas Faerber
@ 2009-12-06  5:13   ` malc
  2009-12-06  5:25     ` Andreas Färber
  1 sibling, 1 reply; 28+ messages in thread
From: malc @ 2009-12-06  5:13 UTC (permalink / raw)
  To: Andreas Faerber; +Cc: qemu-devel

On Sun, 6 Dec 2009, Andreas Faerber wrote:

> Darwin/ppc64 does not use function descriptors,
> adapt prologue and tcg_out_call accordingly.
> GPR2 is available for general use, so let's use it.
> 
> http://developer.apple.com/mac/library/documentation/DeveloperTools/Conceptual/LowLevelABI/110-64-bit_PowerPC_Function_Calling_Conventions/64bitPowerPC.html
> 
> Signed-off-by: Andreas Faerber <andreas.faerber@web.de>
> Cc: malc <av1474@comtv.ru>
> ---
>  tcg/ppc64/tcg-target.c |   30 ++++++++++++++++++++++++++++++
>  1 files changed, 30 insertions(+), 0 deletions(-)
> 
> diff --git a/tcg/ppc64/tcg-target.c b/tcg/ppc64/tcg-target.c
> index a612e10..bf9b7d9 100644
> --- a/tcg/ppc64/tcg-target.c
> +++ b/tcg/ppc64/tcg-target.c
> @@ -104,6 +104,9 @@ static const int tcg_target_reg_alloc_order[] = {
>      TCG_REG_R29,
>      TCG_REG_R30,
>      TCG_REG_R31,
> +#ifdef __APPLE__
> +    TCG_REG_R2,
> +#endif
>      TCG_REG_R3,
>      TCG_REG_R4,
>      TCG_REG_R5,
> @@ -112,7 +115,9 @@ static const int tcg_target_reg_alloc_order[] = {
>      TCG_REG_R8,
>      TCG_REG_R9,
>      TCG_REG_R10,
> +#ifndef __APPLE__
>      TCG_REG_R11,
> +#endif
>      TCG_REG_R12,
>      TCG_REG_R24,
>      TCG_REG_R25,
> @@ -136,6 +141,10 @@ static const int tcg_target_call_oarg_regs[2] = {
>  };
>  
>  static const int tcg_target_callee_save_regs[] = {
> +#ifdef __APPLE__
> +    TCG_REG_R11,
> +    TCG_REG_R13,
> +#endif

No need to add R13, it's reserved anyhow.

>      TCG_REG_R14,
>      TCG_REG_R15,
>      TCG_REG_R16,
> @@ -477,8 +486,21 @@ static void tcg_out_movi (TCGContext *s, TCGType type,
>      }
>  }
>  
> +#ifdef __APPLE__
> +static void tcg_out_b (TCGContext *s, int mask, tcg_target_long target);
> +#endif
> +
>  static void tcg_out_call (TCGContext *s, tcg_target_long arg, int const_arg)
>  {
> +#ifdef __APPLE__
> +    if (const_arg) {
> +        tcg_out_b (s, LK, arg);
> +    }
> +    else {
> +        tcg_out32 (s, MTSPR | RS (arg) | LR);
> +        tcg_out32 (s, BCLR | BO_ALWAYS | LK);
> +    }
> +#else
>      int reg;
>  
>      if (const_arg) {
> @@ -492,6 +514,7 @@ static void tcg_out_call (TCGContext *s, tcg_target_long arg, int const_arg)
>      tcg_out32 (s, LD | RT (11) | RA (reg) | 16);
>      tcg_out32 (s, LD | RT (2) | RA (reg) | 8);
>      tcg_out32 (s, BCCTR | BO_ALWAYS | LK);
> +#endif
>  }
>  
>  static void tcg_out_ldst (TCGContext *s, int ret, int addr,
> @@ -859,10 +882,12 @@ void tcg_target_qemu_prologue (TCGContext *s)
>          ;
>      frame_size = (frame_size + 15) & ~15;
>  
> +#ifndef __APPLE__
>      /* First emit adhoc function descriptor */
>      addr = (uint64_t) s->code_ptr + 24;
>      tcg_out32 (s, addr >> 32); tcg_out32 (s, addr); /* entry point */
>      s->code_ptr += 16;          /* skip TOC and environment pointer */
> +#endif
>  
>      /* Prologue */
>      tcg_out32 (s, MFSPR | RT (0) | LR);

The frame format is different to that of PPC-elf64abi, shouldn't really
make a difference here, then again i don't have access to PPC64 Mac OSX,
so can't really verify that.

> @@ -1516,6 +1541,9 @@ void tcg_target_init (TCGContext *s)
>      tcg_regset_set32 (tcg_target_available_regs[TCG_TYPE_I64], 0, 0xffffffff);
>      tcg_regset_set32 (tcg_target_call_clobber_regs, 0,
>                       (1 << TCG_REG_R0) |
> +#ifdef __APPLE__
> +                     (1 << TCG_REG_R2) |
> +#endif
>                       (1 << TCG_REG_R3) |
>                       (1 << TCG_REG_R4) |
>                       (1 << TCG_REG_R5) |
> @@ -1531,7 +1559,9 @@ void tcg_target_init (TCGContext *s)
>      tcg_regset_clear (s->reserved_regs);
>      tcg_regset_set_reg (s->reserved_regs, TCG_REG_R0);
>      tcg_regset_set_reg (s->reserved_regs, TCG_REG_R1);
> +#ifndef __APPLE__
>      tcg_regset_set_reg (s->reserved_regs, TCG_REG_R2);
> +#endif
>      tcg_regset_set_reg (s->reserved_regs, TCG_REG_R13);
>  
>  #ifdef CONFIG_USE_GUEST_BASE
> 

Otherwise looks good.. Should i commit it with R13 fixed?

-- 
mailto:av1474@comtv.ru

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

* Re: [Qemu-devel] Adding support for Mac OS X ppc64 host
  2009-12-06  4:57 [Qemu-devel] Adding support for Mac OS X ppc64 host Andreas Faerber
  2009-12-06  4:57 ` [Qemu-devel] [PATCH 1/3] TCG: Mac OS X support for ppc64 target Andreas Faerber
@ 2009-12-06  5:14 ` malc
  2009-12-06  5:41   ` Andreas Färber
  1 sibling, 1 reply; 28+ messages in thread
From: malc @ 2009-12-06  5:14 UTC (permalink / raw)
  To: Andreas Faerber; +Cc: qemu-devel

On Sun, 6 Dec 2009, Andreas Faerber wrote:

> Hello,
> 
> This mini series adds TCG target support for OSX/ppc64
> and fixes the Cocoa frontend for ppc64.
> 
> With these patches applied, qemu and qemu-system-x86_64
> are usable. Tested on Mac OS X v10.5 with a Haiku disk image
> and a Fedora 12 installation disk.
> 
> qemu-system-sparc works fine, too.
> 
> qemu-system-sparc64 works on ppc64 while it didn't on ppc!

Does it work on linux ppc64? If so how exactly did you test that
(so that i can try to debug it here)

> qemu-system-ppc appears to hang on ppc64 but doesn't on ppc.

Ditto.

> 
> I suggest we start applying these patches and try to fix
> these weird issues afterwards.
> 
> Regards,
> 
> Andreas
> 
> 

-- 
mailto:av1474@comtv.ru

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

* [Qemu-devel] Re: [PATCH 1/3] TCG: Mac OS X support for ppc64 target
  2009-12-06  5:13   ` [Qemu-devel] Re: [PATCH 1/3] TCG: Mac OS X support for ppc64 target malc
@ 2009-12-06  5:25     ` Andreas Färber
  2009-12-06  6:28       ` malc
  0 siblings, 1 reply; 28+ messages in thread
From: Andreas Färber @ 2009-12-06  5:25 UTC (permalink / raw)
  To: malc; +Cc: qemu-devel


Am 06.12.2009 um 06:13 schrieb malc:

> On Sun, 6 Dec 2009, Andreas Faerber wrote:
>
>> Darwin/ppc64 does not use function descriptors,
>> adapt prologue and tcg_out_call accordingly.
>> GPR2 is available for general use, so let's use it.
>>
>> http://developer.apple.com/mac/library/documentation/DeveloperTools/Conceptual/LowLevelABI/110-64-bit_PowerPC_Function_Calling_Conventions/64bitPowerPC.html
>>
>> Signed-off-by: Andreas Faerber <andreas.faerber@web.de>
>> Cc: malc <av1474@comtv.ru>
>> ---
>> tcg/ppc64/tcg-target.c |   30 ++++++++++++++++++++++++++++++
>> 1 files changed, 30 insertions(+), 0 deletions(-)
>>
>> diff --git a/tcg/ppc64/tcg-target.c b/tcg/ppc64/tcg-target.c
>> index a612e10..bf9b7d9 100644
>> --- a/tcg/ppc64/tcg-target.c
>> +++ b/tcg/ppc64/tcg-target.c

>> @@ -859,10 +882,12 @@ void tcg_target_qemu_prologue (TCGContext *s)
>>         ;
>>     frame_size = (frame_size + 15) & ~15;
>>
>> +#ifndef __APPLE__
>>     /* First emit adhoc function descriptor */
>>     addr = (uint64_t) s->code_ptr + 24;
>>     tcg_out32 (s, addr >> 32); tcg_out32 (s, addr); /* entry point */
>>     s->code_ptr += 16;          /* skip TOC and environment pointer  
>> */
>> +#endif
>>
>>     /* Prologue */
>>     tcg_out32 (s, MFSPR | RT (0) | LR);
>
> The frame format is different to that of PPC-elf64abi, shouldn't  
> really
> make a difference here, then again i don't have access to PPC64 Mac  
> OSX,
> so can't really verify that.

I checked that the linkage area is 48, too, the LR offset is 16, too.
The parameter area was depicted as 64 < 128.
So I guess we're good there.

> Otherwise looks good.. Should i commit it with R13 fixed?

About the callee-save stuff I was less certain. Feel free to make  
modifications (e.g., moving tcg_out_call up?) or have me resubmit.

Thanks,
Andreas

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

* Re: [Qemu-devel] Adding support for Mac OS X ppc64 host
  2009-12-06  5:14 ` [Qemu-devel] Adding support for Mac OS X ppc64 host malc
@ 2009-12-06  5:41   ` Andreas Färber
  2009-12-06  6:37     ` malc
  0 siblings, 1 reply; 28+ messages in thread
From: Andreas Färber @ 2009-12-06  5:41 UTC (permalink / raw)
  To: malc; +Cc: qemu-devel


Am 06.12.2009 um 06:14 schrieb malc:

> On Sun, 6 Dec 2009, Andreas Faerber wrote:
>
>> qemu-system-sparc64 works on ppc64 while it didn't on ppc!
>
> Does it work on linux ppc64? If so

Haven't had a chance to test on other ppc[64] platforms yet.

> how exactly did you test that
> (so that i can try to debug it here)

$ /Users/andreas/QEMU/latest64/bin/qemu-system-sparc64 -boot d -cdrom / 
Users/andreas/QEMU/sol-10-u3-ga-sparc-dvd.iso
$ /Users/andreas/QEMU/latest64/bin/qemu-system-sparc64 -boot d -cdrom / 
Users/andreas/QEMU/debian-40r3-sparc-CD-1.iso

All these (also MilaX, in case you don't have Solaris 10 around) are  
expected to enter OpenBIOS and result in OpenBIOS errors but not in  
QEMU crashes or hangs.
On Linux add -nographic.

>> qemu-system-ppc appears to hang on ppc64 but doesn't on ppc.
>
> Ditto.

$ /Users/andreas/QEMU/latest64/bin/qemu-system-ppc -boot d -cdrom / 
Users/andreas/QEMU/debian-40r4a-powerpc-netinst.iso

On OSX/ppc64 this never got past the OpenBIOS banner and eventually  
crashed:

Starting program: /Users/andreas/QEMU/latest64/bin/qemu-system-ppc - 
boot d -cdrom /Users/andreas/QEMU/debian-40r4a-powerpc-netinst.iso - 
nographic
Reading symbols for shared libraries +++++++++++++++ 
+............................................................. done
Reading symbols for shared libraries . done
Reading symbols for shared libraries . done
Reading symbols for shared libraries . done
Reading symbols for shared libraries . done
Reading symbols for shared libraries .. done

 >> =============================================================
 >> OpenBIOS 1.0 [Sep 11 2009 06:53]
 >> Configuration device id QEMU version 1 machine id 2
 >> CPUs: 1
 >> Memory: 128M
 >> UUID: 00000000-0000-0000-0000-000000000000
 >> CPU type PowerPC,750
Welcome to OpenBIOS v1.0 built on Sep 11 2009 06:53


Program received signal EXC_BAD_ACCESS, Could not access memory.
                                                                  
Reason: KERN_PROTECTION_FAILURE at address: 0x0000000012c3cab0
                                               0x0000000000157db4 in  
ldl_be_p [inlined] () at cpu-all.h:544
                           544	    return *(uint32_t *)ptr;

The upper bt showed something like helper_lsw only, iirc.

This is at QEMU 749717a0ea2f60d33d01c1e37fa24dfa7250dfc0, using the  
binary blobs on OSX/ppc64 and with or without latest OpenBIOS versions  
on OSX/ppc.

Andreas

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

* [Qemu-devel] Re: [PATCH 1/3] TCG: Mac OS X support for ppc64 target
  2009-12-06  5:25     ` Andreas Färber
@ 2009-12-06  6:28       ` malc
  2009-12-06 13:00         ` [Qemu-devel] [PATCH v2 " Andreas Faerber
  2009-12-06 13:08         ` [Qemu-devel] Re: [PATCH 1/3] TCG: Mac OS X support for ppc64 target Andreas Färber
  0 siblings, 2 replies; 28+ messages in thread
From: malc @ 2009-12-06  6:28 UTC (permalink / raw)
  To: Andreas Färber; +Cc: qemu-devel

On Sun, 6 Dec 2009, Andreas F?rber wrote:

> 
> Am 06.12.2009 um 06:13 schrieb malc:
> 
> > On Sun, 6 Dec 2009, Andreas Faerber wrote:
> > 
> > > Darwin/ppc64 does not use function descriptors,
> > > adapt prologue and tcg_out_call accordingly.
> > > GPR2 is available for general use, so let's use it.
> > > 
> > > http://developer.apple.com/mac/library/documentation/DeveloperTools/Conceptual/LowLevelABI/110-64-bit_PowerPC_Function_Calling_Conventions/64bitPowerPC.html
> > > 
> > > Signed-off-by: Andreas Faerber <andreas.faerber@web.de>
> > > Cc: malc <av1474@comtv.ru>
> > > ---
> > > tcg/ppc64/tcg-target.c |   30 ++++++++++++++++++++++++++++++
> > > 1 files changed, 30 insertions(+), 0 deletions(-)
> > > 
> > > diff --git a/tcg/ppc64/tcg-target.c b/tcg/ppc64/tcg-target.c
> > > index a612e10..bf9b7d9 100644
> > > --- a/tcg/ppc64/tcg-target.c
> > > +++ b/tcg/ppc64/tcg-target.c
> 
> > > @@ -859,10 +882,12 @@ void tcg_target_qemu_prologue (TCGContext *s)
> > >        ;
> > >    frame_size = (frame_size + 15) & ~15;
> > > 
> > > +#ifndef __APPLE__
> > >    /* First emit adhoc function descriptor */
> > >    addr = (uint64_t) s->code_ptr + 24;
> > >    tcg_out32 (s, addr >> 32); tcg_out32 (s, addr); /* entry point */
> > >    s->code_ptr += 16;          /* skip TOC and environment pointer */
> > > +#endif
> > > 
> > >    /* Prologue */
> > >    tcg_out32 (s, MFSPR | RT (0) | LR);
> > 
> > The frame format is different to that of PPC-elf64abi, shouldn't really
> > make a difference here, then again i don't have access to PPC64 Mac OSX,
> > so can't really verify that.
> 
> I checked that the linkage area is 48, too, the LR offset is 16, too.
> The parameter area was depicted as 64 < 128.
> So I guess we're good there.
> 
> > Otherwise looks good.. Should i commit it with R13 fixed?
> 
> About the callee-save stuff I was less certain. Feel free to make
> modifications (e.g., moving tcg_out_call up?) or have me resubmit.

Sorry, i don't get this part, i was just thinking of removing R13 from
the list. Moving tcg_out_call?

-- 
mailto:av1474@comtv.ru

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

* Re: [Qemu-devel] Adding support for Mac OS X ppc64 host
  2009-12-06  5:41   ` Andreas Färber
@ 2009-12-06  6:37     ` malc
  2009-12-11 21:32       ` Andreas Färber
  2009-12-12  1:21       ` Andreas Färber
  0 siblings, 2 replies; 28+ messages in thread
From: malc @ 2009-12-06  6:37 UTC (permalink / raw)
  To: Andreas Färber; +Cc: qemu-devel

On Sun, 6 Dec 2009, Andreas F?rber wrote:

> 
> Am 06.12.2009 um 06:14 schrieb malc:
> 
> > On Sun, 6 Dec 2009, Andreas Faerber wrote:
> > 
> > > qemu-system-sparc64 works on ppc64 while it didn't on ppc!
> > 
> > Does it work on linux ppc64? If so
> 
> Haven't had a chance to test on other ppc[64] platforms yet.
> 
> > how exactly did you test that
> > (so that i can try to debug it here)
> 
> $ /Users/andreas/QEMU/latest64/bin/qemu-system-sparc64 -boot d -cdrom
> /Users/andreas/QEMU/sol-10-u3-ga-sparc-dvd.iso
> $ /Users/andreas/QEMU/latest64/bin/qemu-system-sparc64 -boot d -cdrom
> /Users/andreas/QEMU/debian-40r3-sparc-CD-1.iso
> 
> All these (also MilaX, in case you don't have Solaris 10 around) are expected
> to enter OpenBIOS and result in OpenBIOS errors but not in QEMU crashes or
> hangs.
> On Linux add -nographic.
> 

I was only able to find debian-40r3-sparc-netinst.iso here on ppc/linux
it boots (i think):

<snip snip>
boot: expert
Allocated 8 Megs of memory at 0x40000000 for kernel
Loaded kernel version 2.6.18
Loading initial ramdisk (3882238 bytes at 0xC00000 phys, 0x40C00000 virt)...
-
Remapping the kernel... done.
Booting Linux...

And it sits there while i'm losing patience..

Can you retry with netinst, if it behaves like CD-1 in your case the
problem is most likely confined to OSX, otherwise i would have to search
for CD-1 better.

> > > qemu-system-ppc appears to hang on ppc64 but doesn't on ppc.
> > 
> > Ditto.
> 
> $ /Users/andreas/QEMU/latest64/bin/qemu-system-ppc -boot d -cdrom
> /Users/andreas/QEMU/debian-40r4a-powerpc-netinst.iso
> 
> On OSX/ppc64 this never got past the OpenBIOS banner and eventually crashed:
> 
> Starting program: /Users/andreas/QEMU/latest64/bin/qemu-system-ppc -boot d
> -cdrom /Users/andreas/QEMU/debian-40r4a-powerpc-netinst.iso -nographic
> Reading symbols for shared libraries

[..snip..]

> 
> The upper bt showed something like helper_lsw only, iirc.
> 
> This is at QEMU 749717a0ea2f60d33d01c1e37fa24dfa7250dfc0, using the binary
> blobs on OSX/ppc64 and with or without latest OpenBIOS versions on OSX/ppc.

Thanks will try system-ppc later..

-- 
mailto:av1474@comtv.ru

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

* [Qemu-devel] [PATCH v2 1/3] TCG: Mac OS X support for ppc64 target
  2009-12-06  6:28       ` malc
@ 2009-12-06 13:00         ` Andreas Faerber
  2009-12-06 13:00           ` [Qemu-devel] [PATCH v2 2/3] Cocoa: ppc64 host support Andreas Faerber
  2009-12-06 13:08         ` [Qemu-devel] Re: [PATCH 1/3] TCG: Mac OS X support for ppc64 target Andreas Färber
  1 sibling, 1 reply; 28+ messages in thread
From: Andreas Faerber @ 2009-12-06 13:00 UTC (permalink / raw)
  To: qemu-devel; +Cc: Andreas Faerber

Darwin/ppc64 does not use function descriptors,
adapt prologue and tcg_out_call accordingly.
GPR2 is available for general use, so let's use it.

http://developer.apple.com/mac/library/documentation/DeveloperTools/Conceptual/LowLevelABI/110-64-bit_PowerPC_Function_Calling_Conventions/64bitPowerPC.html

v2:
- Don't mark reserved GPR13 as callee-save.
- Move tcg_out_b up.
- Fix unused variable warning in prologue.

Signed-off-by: Andreas Faerber <andreas.faerber@web.de>
Cc: malc <av1474@comtv.ru>
---
 tcg/ppc64/tcg-target.c |   55 +++++++++++++++++++++++++++++++++++------------
 1 files changed, 41 insertions(+), 14 deletions(-)

diff --git a/tcg/ppc64/tcg-target.c b/tcg/ppc64/tcg-target.c
index a612e10..0c11917 100644
--- a/tcg/ppc64/tcg-target.c
+++ b/tcg/ppc64/tcg-target.c
@@ -104,6 +104,9 @@ static const int tcg_target_reg_alloc_order[] = {
     TCG_REG_R29,
     TCG_REG_R30,
     TCG_REG_R31,
+#ifdef __APPLE__
+    TCG_REG_R2,
+#endif
     TCG_REG_R3,
     TCG_REG_R4,
     TCG_REG_R5,
@@ -112,7 +115,9 @@ static const int tcg_target_reg_alloc_order[] = {
     TCG_REG_R8,
     TCG_REG_R9,
     TCG_REG_R10,
+#ifndef __APPLE__
     TCG_REG_R11,
+#endif
     TCG_REG_R12,
     TCG_REG_R24,
     TCG_REG_R25,
@@ -136,6 +141,9 @@ static const int tcg_target_call_oarg_regs[2] = {
 };
 
 static const int tcg_target_callee_save_regs[] = {
+#ifdef __APPLE__
+    TCG_REG_R11,
+#endif
     TCG_REG_R14,
     TCG_REG_R15,
     TCG_REG_R16,
@@ -477,8 +485,31 @@ static void tcg_out_movi (TCGContext *s, TCGType type,
     }
 }
 
+static void tcg_out_b (TCGContext *s, int mask, tcg_target_long target)
+{
+    tcg_target_long disp;
+
+    disp = target - (tcg_target_long) s->code_ptr;
+    if ((disp << 38) >> 38 == disp)
+        tcg_out32 (s, B | (disp & 0x3fffffc) | mask);
+    else {
+        tcg_out_movi (s, TCG_TYPE_I64, 0, (tcg_target_long) target);
+        tcg_out32 (s, MTSPR | RS (0) | CTR);
+        tcg_out32 (s, BCCTR | BO_ALWAYS | mask);
+    }
+}
+
 static void tcg_out_call (TCGContext *s, tcg_target_long arg, int const_arg)
 {
+#ifdef __APPLE__
+    if (const_arg) {
+        tcg_out_b (s, LK, arg);
+    }
+    else {
+        tcg_out32 (s, MTSPR | RS (arg) | LR);
+        tcg_out32 (s, BCLR | BO_ALWAYS | LK);
+    }
+#else
     int reg;
 
     if (const_arg) {
@@ -492,6 +523,7 @@ static void tcg_out_call (TCGContext *s, tcg_target_long arg, int const_arg)
     tcg_out32 (s, LD | RT (11) | RA (reg) | 16);
     tcg_out32 (s, LD | RT (2) | RA (reg) | 8);
     tcg_out32 (s, BCCTR | BO_ALWAYS | LK);
+#endif
 }
 
 static void tcg_out_ldst (TCGContext *s, int ret, int addr,
@@ -516,20 +548,6 @@ static void tcg_out_ldsta (TCGContext *s, int ret, int addr,
     }
 }
 
-static void tcg_out_b (TCGContext *s, int mask, tcg_target_long target)
-{
-    tcg_target_long disp;
-
-    disp = target - (tcg_target_long) s->code_ptr;
-    if ((disp << 38) >> 38 == disp)
-        tcg_out32 (s, B | (disp & 0x3fffffc) | mask);
-    else {
-        tcg_out_movi (s, TCG_TYPE_I64, 0, (tcg_target_long) target);
-        tcg_out32 (s, MTSPR | RS (0) | CTR);
-        tcg_out32 (s, BCCTR | BO_ALWAYS | mask);
-    }
-}
-
 #if defined (CONFIG_SOFTMMU)
 
 #include "../../softmmu_defs.h"
@@ -845,7 +863,9 @@ static void tcg_out_qemu_st (TCGContext *s, const TCGArg *args, int opc)
 void tcg_target_qemu_prologue (TCGContext *s)
 {
     int i, frame_size;
+#ifndef __APPLE__
     uint64_t addr;
+#endif
 
     frame_size = 0
         + 8                     /* back chain */
@@ -859,10 +879,12 @@ void tcg_target_qemu_prologue (TCGContext *s)
         ;
     frame_size = (frame_size + 15) & ~15;
 
+#ifndef __APPLE__
     /* First emit adhoc function descriptor */
     addr = (uint64_t) s->code_ptr + 24;
     tcg_out32 (s, addr >> 32); tcg_out32 (s, addr); /* entry point */
     s->code_ptr += 16;          /* skip TOC and environment pointer */
+#endif
 
     /* Prologue */
     tcg_out32 (s, MFSPR | RT (0) | LR);
@@ -1516,6 +1538,9 @@ void tcg_target_init (TCGContext *s)
     tcg_regset_set32 (tcg_target_available_regs[TCG_TYPE_I64], 0, 0xffffffff);
     tcg_regset_set32 (tcg_target_call_clobber_regs, 0,
                      (1 << TCG_REG_R0) |
+#ifdef __APPLE__
+                     (1 << TCG_REG_R2) |
+#endif
                      (1 << TCG_REG_R3) |
                      (1 << TCG_REG_R4) |
                      (1 << TCG_REG_R5) |
@@ -1531,7 +1556,9 @@ void tcg_target_init (TCGContext *s)
     tcg_regset_clear (s->reserved_regs);
     tcg_regset_set_reg (s->reserved_regs, TCG_REG_R0);
     tcg_regset_set_reg (s->reserved_regs, TCG_REG_R1);
+#ifndef __APPLE__
     tcg_regset_set_reg (s->reserved_regs, TCG_REG_R2);
+#endif
     tcg_regset_set_reg (s->reserved_regs, TCG_REG_R13);
 
 #ifdef CONFIG_USE_GUEST_BASE
-- 
1.6.5.3

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

* [Qemu-devel] [PATCH v2 2/3] Cocoa: ppc64 host support
  2009-12-06 13:00         ` [Qemu-devel] [PATCH v2 " Andreas Faerber
@ 2009-12-06 13:00           ` Andreas Faerber
  2009-12-06 13:00             ` [Qemu-devel] [PATCH v2 3/3] Cocoa: Silence warnings Andreas Faerber
                               ` (2 more replies)
  0 siblings, 3 replies; 28+ messages in thread
From: Andreas Faerber @ 2009-12-06 13:00 UTC (permalink / raw)
  To: qemu-devel; +Cc: Alexander Graf, Andreas Faerber, Mike Kronenberg

Fix integer usage in the Cocoa backend: NSInteger is long on LP64.

http://developer.apple.com/mac/library/documentation/Cocoa/Reference/ApplicationKit/Classes/NSView_Class/Reference/NSView.html#//apple_ref/doc/uid/20000014-BBCFHHCD

This makes the graphical display show up on a ppc64 host.

Signed-off-by: Andreas Faerber <andreas.faerber@web.de>
Cc: Alexander Graf <alex@csgraf.de>
Cc: Mike Kronenberg <mike.kronenberg@kronenberg.org>
---
 cocoa.m |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/cocoa.m b/cocoa.m
index 55ff2b4..7062571 100644
--- a/cocoa.m
+++ b/cocoa.m
@@ -337,7 +337,7 @@ int cocoa_keycode_to_qemu(int keycode)
         } else {
             // selective drawing code (draws only dirty rectangles) (OS X >= 10.4)
             const NSRect *rectList;
-            int rectCount;
+            NSInteger rectCount;
             int i;
             CGImageRef clipImageRef;
             CGRect clipRect;
-- 
1.6.5.3

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

* [Qemu-devel] [PATCH v2 3/3] Cocoa: Silence warnings
  2009-12-06 13:00           ` [Qemu-devel] [PATCH v2 2/3] Cocoa: ppc64 host support Andreas Faerber
@ 2009-12-06 13:00             ` Andreas Faerber
  2009-12-06 13:02             ` [Qemu-devel] Re: [PATCH v2 2/3] Cocoa: ppc64 host support Alexander Graf
  2009-12-06 13:41             ` Mike Kronenberg
  2 siblings, 0 replies; 28+ messages in thread
From: Andreas Faerber @ 2009-12-06 13:00 UTC (permalink / raw)
  To: qemu-devel; +Cc: John Arbuckle, Andreas Faerber

Missing static for cocoa_keycode_to_qemu.
Missing const for character constant.

__LITTLE_ENDIAN__ is undefined on Big Endian host.

Signed-off-by: Andreas Faerber <andreas.faerber@web.de>
Cc: John Arbuckle <programmingkidx@gmail.com>
---
 cocoa.m |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/cocoa.m b/cocoa.m
index 7062571..05f507d 100644
--- a/cocoa.m
+++ b/cocoa.m
@@ -229,7 +229,7 @@ int keymap[] =
 */
 };
 
-int cocoa_keycode_to_qemu(int keycode)
+static int cocoa_keycode_to_qemu(int keycode)
 {
     if((sizeof(keymap)/sizeof(int)) <= keycode)
     {
@@ -315,7 +315,7 @@ int cocoa_keycode_to_qemu(int keycode)
             screen.bitsPerComponent, //bitsPerComponent
             screen.bitsPerPixel, //bitsPerPixel
             (screen.width * (screen.bitsPerComponent/2)), //bytesPerRow
-#if __LITTLE_ENDIAN__
+#ifdef __LITTLE_ENDIAN__
             CGColorSpaceCreateWithName(kCGColorSpaceGenericRGB), //colorspace for OS X >= 10.4
             kCGBitmapByteOrder32Little | kCGImageAlphaNoneSkipFirst,
 #else
@@ -783,7 +783,7 @@ int cocoa_keycode_to_qemu(int keycode)
     if(returnCode == NSCancelButton) {
         exit(0);
     } else if(returnCode == NSOKButton) {
-        char *bin = "qemu";
+        const char *bin = "qemu";
         char *img = (char*)[ [ sheet filename ] cStringUsingEncoding:NSASCIIStringEncoding];
 
         char **argv = (char**)malloc( sizeof(char*)*3 );
-- 
1.6.5.3

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

* [Qemu-devel] Re: [PATCH v2 2/3] Cocoa: ppc64 host support
  2009-12-06 13:00           ` [Qemu-devel] [PATCH v2 2/3] Cocoa: ppc64 host support Andreas Faerber
  2009-12-06 13:00             ` [Qemu-devel] [PATCH v2 3/3] Cocoa: Silence warnings Andreas Faerber
@ 2009-12-06 13:02             ` Alexander Graf
  2009-12-06 13:23               ` Andreas Färber
  2009-12-06 13:41             ` Mike Kronenberg
  2 siblings, 1 reply; 28+ messages in thread
From: Alexander Graf @ 2009-12-06 13:02 UTC (permalink / raw)
  To: Andreas Faerber; +Cc: Mike Kronenberg, qemu-devel


On 06.12.2009, at 14:00, Andreas Faerber wrote:

> Fix integer usage in the Cocoa backend: NSInteger is long on LP64.
> 
> http://developer.apple.com/mac/library/documentation/Cocoa/Reference/ApplicationKit/Classes/NSView_Class/Reference/NSView.html#//apple_ref/doc/uid/20000014-BBCFHHCD
> 
> This makes the graphical display show up on a ppc64 host.

Interesting! Unfortunately I don't have a PPC64 Apple machine handy, so I can't test it.

Alex

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

* [Qemu-devel] Re: [PATCH 1/3] TCG: Mac OS X support for ppc64 target
  2009-12-06  6:28       ` malc
  2009-12-06 13:00         ` [Qemu-devel] [PATCH v2 " Andreas Faerber
@ 2009-12-06 13:08         ` Andreas Färber
  1 sibling, 0 replies; 28+ messages in thread
From: Andreas Färber @ 2009-12-06 13:08 UTC (permalink / raw)
  To: malc; +Cc: QEMU Developers


Am 06.12.2009 um 07:28 schrieb malc:

> On Sun, 6 Dec 2009, Andreas F?rber wrote:
>
>>
>> Am 06.12.2009 um 06:13 schrieb malc:
>>
>>> On Sun, 6 Dec 2009, Andreas Faerber wrote:
>>>
>>>> Darwin/ppc64 does not use function descriptors,
>>>> adapt prologue and tcg_out_call accordingly.
>>>> GPR2 is available for general use, so let's use it.
>>>>
>>>> http://developer.apple.com/mac/library/documentation/DeveloperTools/Conceptual/LowLevelABI/110-64-bit_PowerPC_Function_Calling_Conventions/64bitPowerPC.html
>>>>
>>>> Signed-off-by: Andreas Faerber <andreas.faerber@web.de>
>>>> Cc: malc <av1474@comtv.ru>
>>>> ---
>>>> tcg/ppc64/tcg-target.c |   30 ++++++++++++++++++++++++++++++
>>>> 1 files changed, 30 insertions(+), 0 deletions(-)
>>>>
>>>> diff --git a/tcg/ppc64/tcg-target.c b/tcg/ppc64/tcg-target.c
>>>> index a612e10..bf9b7d9 100644
>>>> --- a/tcg/ppc64/tcg-target.c
>>>> +++ b/tcg/ppc64/tcg-target.c

>>> Otherwise looks good.. Should i commit it with R13 fixed?
>>
>> About the callee-save stuff I was less certain. Feel free to make
>> modifications (e.g., moving tcg_out_call up?) or have me resubmit.
>
> Sorry, i don't get this part, i was just thinking of removing R13 from
> the list. Moving tcg_out_call?

Sorry, I meant tcg_out_b. Just declaring it was the least intrusive  
patch.

I've sent a v2 series, doing the above plus silencing a warning.
They are also available for pulling from git://repo.or.cz/qemu/ 
afaerber.git, branch tcg-osx-ppc64.

Andreas

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

* [Qemu-devel] Re: [PATCH v2 2/3] Cocoa: ppc64 host support
  2009-12-06 13:02             ` [Qemu-devel] Re: [PATCH v2 2/3] Cocoa: ppc64 host support Alexander Graf
@ 2009-12-06 13:23               ` Andreas Färber
  2009-12-06 13:32                 ` Alexander Graf
  0 siblings, 1 reply; 28+ messages in thread
From: Andreas Färber @ 2009-12-06 13:23 UTC (permalink / raw)
  To: Alexander Graf; +Cc: G 3, QEMU Developers

Hi Alex,

Am 06.12.2009 um 14:02 schrieb Alexander Graf:

>
> On 06.12.2009, at 14:00, Andreas Faerber wrote:
>
>> Fix integer usage in the Cocoa backend: NSInteger is long on LP64.
>>
>> http://developer.apple.com/mac/library/documentation/Cocoa/Reference/ApplicationKit/Classes/NSView_Class/Reference/NSView.html#/ 
>> /apple_ref/doc/uid/20000014-BBCFHHCD
>>
>> This makes the graphical display show up on a ppc64 host.
>
> Interesting! Unfortunately I don't have a PPC64 Apple machine handy,  
> so I can't test it.

I cc'ed you so that you could check your earlier x86_64 Mac patch  
series, if you care. I don't have an x86_64 Mac at hands myself.

Btw I'll be looking into bringing the Cocoa frontend on par with SDL,  
namely closing the app when closing the window and not creating the  
window in -nographic mode. That's awful when debugging!

Andreas

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

* [Qemu-devel] Re: [PATCH v2 2/3] Cocoa: ppc64 host support
  2009-12-06 13:23               ` Andreas Färber
@ 2009-12-06 13:32                 ` Alexander Graf
  0 siblings, 0 replies; 28+ messages in thread
From: Alexander Graf @ 2009-12-06 13:32 UTC (permalink / raw)
  To: Andreas Färber; +Cc: G 3, QEMU Developers


On 06.12.2009, at 14:23, Andreas Färber wrote:

> Hi Alex,
> 
> Am 06.12.2009 um 14:02 schrieb Alexander Graf:
> 
>> 
>> On 06.12.2009, at 14:00, Andreas Faerber wrote:
>> 
>>> Fix integer usage in the Cocoa backend: NSInteger is long on LP64.
>>> 
>>> http://developer.apple.com/mac/library/documentation/Cocoa/Reference/ApplicationKit/Classes/NSView_Class/Reference/NSView.html#//apple_ref/doc/uid/20000014-BBCFHHCD
>>> 
>>> This makes the graphical display show up on a ppc64 host.
>> 
>> Interesting! Unfortunately I don't have a PPC64 Apple machine handy, so I can't test it.
> 
> I cc'ed you so that you could check your earlier x86_64 Mac patch series, if you care. I don't have an x86_64 Mac at hands myself.

Oh I see, I'll test it later today or tomorrow.

> Btw I'll be looking into bringing the Cocoa frontend on par with SDL, namely closing the app when closing the window and not creating the window in -nographic mode. That's awful when debugging!

I agree. I did a patch for that once - might be worth searching the ML for that. Basically it searched the args for a "-nographic" parameter. Pretty hacky, but at least it worked.

Alex

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

* [Qemu-devel] Re: [PATCH v2 2/3] Cocoa: ppc64 host support
  2009-12-06 13:00           ` [Qemu-devel] [PATCH v2 2/3] Cocoa: ppc64 host support Andreas Faerber
  2009-12-06 13:00             ` [Qemu-devel] [PATCH v2 3/3] Cocoa: Silence warnings Andreas Faerber
  2009-12-06 13:02             ` [Qemu-devel] Re: [PATCH v2 2/3] Cocoa: ppc64 host support Alexander Graf
@ 2009-12-06 13:41             ` Mike Kronenberg
  2009-12-06 14:09               ` Andreas Färber
  2 siblings, 1 reply; 28+ messages in thread
From: Mike Kronenberg @ 2009-12-06 13:41 UTC (permalink / raw)
  To: Andreas Faerber; +Cc: Alexander Graf, qemu-devel

[-- Attachment #1: Type: text/plain, Size: 652 bytes --]

On 06.12.2009, at 14:00, Andreas Faerber wrote:

> -            int rectCount;
> +            NSInteger rectCount;

I know that this is endorsed by apple since 10.5 but NSInteger will break compiling on Tiger and older. Int on the other hand is only throwing a warning on Leopard if I'm not mistaken.

Especially with qemu, one has to have an eye on the type... NSInteger can be an int or a long, depending on the host...

#if __LP64__ || NS_BUILD_32_LIKE_64
	typedef long NSInteger;
	typedef unsigned long NSUInteger;
#else
	typedef int NSInteger;
	typedef unsigned int NSUInteger;
#endif

I have no G5 at hand to test either.

Mike

[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 3410 bytes --]

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

* [Qemu-devel] Re: [PATCH v2 2/3] Cocoa: ppc64 host support
  2009-12-06 13:41             ` Mike Kronenberg
@ 2009-12-06 14:09               ` Andreas Färber
  2009-12-06 15:21                 ` [Qemu-devel] [PATCH v3 1/3] TCG: Mac OS X support for ppc64 target Andreas Faerber
  0 siblings, 1 reply; 28+ messages in thread
From: Andreas Färber @ 2009-12-06 14:09 UTC (permalink / raw)
  To: Mike Kronenberg; +Cc: Alexander Graf, QEMU Developers


Am 06.12.2009 um 14:41 schrieb Mike Kronenberg:

> On 06.12.2009, at 14:00, Andreas Faerber wrote:
>
>> -            int rectCount;
>> +            NSInteger rectCount;
>
> I know that this is endorsed by apple since 10.5 but NSInteger will  
> break compiling on Tiger and older.

You appear to be right there... no trace of it in 10.4u SDK.

> Int on the other hand is only throwing a warning on Leopard if I'm  
> not mistaken.

On Leopard ppc it just warns and works because NSInteger == int.
On Leopard ppc64 it warns and fails at runtime because NSInteger != int.

> Especially with qemu, one has to have an eye on the type...  
> NSInteger can be an int or a long, depending on the host...
>
> #if __LP64__ || NS_BUILD_32_LIKE_64
> 	typedef long NSInteger;
> 	typedef unsigned long NSUInteger;
> #else
> 	typedef int NSInteger;
> 	typedef unsigned int NSUInteger;
> #endif

Right, so we do need NSInteger - I'll add a version check. Thanks for  
the feedback!

Andreas

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

* [Qemu-devel] [PATCH v3 1/3] TCG: Mac OS X support for ppc64 target
  2009-12-06 14:09               ` Andreas Färber
@ 2009-12-06 15:21                 ` Andreas Faerber
  2009-12-06 15:21                   ` [Qemu-devel] [PATCH v3 2/3] Cocoa: ppc64 host support Andreas Faerber
  0 siblings, 1 reply; 28+ messages in thread
From: Andreas Faerber @ 2009-12-06 15:21 UTC (permalink / raw)
  To: qemu-devel; +Cc: Andreas Faerber

Darwin/ppc64 does not use function descriptors,
adapt prologue and tcg_out_call accordingly.
GPR2 is available for general use, so let's use it.

http://developer.apple.com/mac/library/documentation/DeveloperTools/Conceptual/LowLevelABI/110-64-bit_PowerPC_Function_Calling_Conventions/64bitPowerPC.html

v2:
- Don't mark reserved GPR13 as callee-save.
- Move tcg_out_b up.
- Fix unused variable warning in prologue.

Signed-off-by: Andreas Faerber <andreas.faerber@web.de>
Cc: malc <av1474@comtv.ru>
---
 tcg/ppc64/tcg-target.c |   55 +++++++++++++++++++++++++++++++++++------------
 1 files changed, 41 insertions(+), 14 deletions(-)

diff --git a/tcg/ppc64/tcg-target.c b/tcg/ppc64/tcg-target.c
index a612e10..0c11917 100644
--- a/tcg/ppc64/tcg-target.c
+++ b/tcg/ppc64/tcg-target.c
@@ -104,6 +104,9 @@ static const int tcg_target_reg_alloc_order[] = {
     TCG_REG_R29,
     TCG_REG_R30,
     TCG_REG_R31,
+#ifdef __APPLE__
+    TCG_REG_R2,
+#endif
     TCG_REG_R3,
     TCG_REG_R4,
     TCG_REG_R5,
@@ -112,7 +115,9 @@ static const int tcg_target_reg_alloc_order[] = {
     TCG_REG_R8,
     TCG_REG_R9,
     TCG_REG_R10,
+#ifndef __APPLE__
     TCG_REG_R11,
+#endif
     TCG_REG_R12,
     TCG_REG_R24,
     TCG_REG_R25,
@@ -136,6 +141,9 @@ static const int tcg_target_call_oarg_regs[2] = {
 };
 
 static const int tcg_target_callee_save_regs[] = {
+#ifdef __APPLE__
+    TCG_REG_R11,
+#endif
     TCG_REG_R14,
     TCG_REG_R15,
     TCG_REG_R16,
@@ -477,8 +485,31 @@ static void tcg_out_movi (TCGContext *s, TCGType type,
     }
 }
 
+static void tcg_out_b (TCGContext *s, int mask, tcg_target_long target)
+{
+    tcg_target_long disp;
+
+    disp = target - (tcg_target_long) s->code_ptr;
+    if ((disp << 38) >> 38 == disp)
+        tcg_out32 (s, B | (disp & 0x3fffffc) | mask);
+    else {
+        tcg_out_movi (s, TCG_TYPE_I64, 0, (tcg_target_long) target);
+        tcg_out32 (s, MTSPR | RS (0) | CTR);
+        tcg_out32 (s, BCCTR | BO_ALWAYS | mask);
+    }
+}
+
 static void tcg_out_call (TCGContext *s, tcg_target_long arg, int const_arg)
 {
+#ifdef __APPLE__
+    if (const_arg) {
+        tcg_out_b (s, LK, arg);
+    }
+    else {
+        tcg_out32 (s, MTSPR | RS (arg) | LR);
+        tcg_out32 (s, BCLR | BO_ALWAYS | LK);
+    }
+#else
     int reg;
 
     if (const_arg) {
@@ -492,6 +523,7 @@ static void tcg_out_call (TCGContext *s, tcg_target_long arg, int const_arg)
     tcg_out32 (s, LD | RT (11) | RA (reg) | 16);
     tcg_out32 (s, LD | RT (2) | RA (reg) | 8);
     tcg_out32 (s, BCCTR | BO_ALWAYS | LK);
+#endif
 }
 
 static void tcg_out_ldst (TCGContext *s, int ret, int addr,
@@ -516,20 +548,6 @@ static void tcg_out_ldsta (TCGContext *s, int ret, int addr,
     }
 }
 
-static void tcg_out_b (TCGContext *s, int mask, tcg_target_long target)
-{
-    tcg_target_long disp;
-
-    disp = target - (tcg_target_long) s->code_ptr;
-    if ((disp << 38) >> 38 == disp)
-        tcg_out32 (s, B | (disp & 0x3fffffc) | mask);
-    else {
-        tcg_out_movi (s, TCG_TYPE_I64, 0, (tcg_target_long) target);
-        tcg_out32 (s, MTSPR | RS (0) | CTR);
-        tcg_out32 (s, BCCTR | BO_ALWAYS | mask);
-    }
-}
-
 #if defined (CONFIG_SOFTMMU)
 
 #include "../../softmmu_defs.h"
@@ -845,7 +863,9 @@ static void tcg_out_qemu_st (TCGContext *s, const TCGArg *args, int opc)
 void tcg_target_qemu_prologue (TCGContext *s)
 {
     int i, frame_size;
+#ifndef __APPLE__
     uint64_t addr;
+#endif
 
     frame_size = 0
         + 8                     /* back chain */
@@ -859,10 +879,12 @@ void tcg_target_qemu_prologue (TCGContext *s)
         ;
     frame_size = (frame_size + 15) & ~15;
 
+#ifndef __APPLE__
     /* First emit adhoc function descriptor */
     addr = (uint64_t) s->code_ptr + 24;
     tcg_out32 (s, addr >> 32); tcg_out32 (s, addr); /* entry point */
     s->code_ptr += 16;          /* skip TOC and environment pointer */
+#endif
 
     /* Prologue */
     tcg_out32 (s, MFSPR | RT (0) | LR);
@@ -1516,6 +1538,9 @@ void tcg_target_init (TCGContext *s)
     tcg_regset_set32 (tcg_target_available_regs[TCG_TYPE_I64], 0, 0xffffffff);
     tcg_regset_set32 (tcg_target_call_clobber_regs, 0,
                      (1 << TCG_REG_R0) |
+#ifdef __APPLE__
+                     (1 << TCG_REG_R2) |
+#endif
                      (1 << TCG_REG_R3) |
                      (1 << TCG_REG_R4) |
                      (1 << TCG_REG_R5) |
@@ -1531,7 +1556,9 @@ void tcg_target_init (TCGContext *s)
     tcg_regset_clear (s->reserved_regs);
     tcg_regset_set_reg (s->reserved_regs, TCG_REG_R0);
     tcg_regset_set_reg (s->reserved_regs, TCG_REG_R1);
+#ifndef __APPLE__
     tcg_regset_set_reg (s->reserved_regs, TCG_REG_R2);
+#endif
     tcg_regset_set_reg (s->reserved_regs, TCG_REG_R13);
 
 #ifdef CONFIG_USE_GUEST_BASE
-- 
1.6.5.3

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

* [Qemu-devel] [PATCH v3 2/3] Cocoa: ppc64 host support
  2009-12-06 15:21                 ` [Qemu-devel] [PATCH v3 1/3] TCG: Mac OS X support for ppc64 target Andreas Faerber
@ 2009-12-06 15:21                   ` Andreas Faerber
  2009-12-06 15:21                     ` [Qemu-devel] [PATCH v3 3/3] Cocoa: Silence warnings Andreas Faerber
  0 siblings, 1 reply; 28+ messages in thread
From: Andreas Faerber @ 2009-12-06 15:21 UTC (permalink / raw)
  To: qemu-devel
  Cc: Alexander Graf, Andreas Faerber, Mike Kronenberg, John Arbuckle

Fix integer usage in the Cocoa backend: NSInteger is long on LP64.

http://developer.apple.com/mac/library/documentation/Cocoa/Reference/ApplicationKit/Classes/NSView_Class/Reference/NSView.html#//apple_ref/doc/uid/20000014-BBCFHHCD

This makes the graphical display show up on a ppc64 host.

v3:
- Confine NSInteger to Mac OS X v10.5 and later

Signed-off-by: Andreas Faerber <andreas.faerber@web.de>
Cc: Alexander Graf <alex@csgraf.de>
Cc: Mike Kronenberg <mike.kronenberg@kronenberg.org>
Cc: John Arbuckle <programmingkidx@gmail.com>
---
 cocoa.m |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/cocoa.m b/cocoa.m
index 55ff2b4..989efd5 100644
--- a/cocoa.m
+++ b/cocoa.m
@@ -28,6 +28,10 @@
 #include "console.h"
 #include "sysemu.h"
 
+#ifndef MAC_OS_X_VERSION_10_5
+#define MAC_OS_X_VERSION_10_5 1050
+#endif
+
 
 //#define DEBUG
 
@@ -337,7 +341,11 @@ int cocoa_keycode_to_qemu(int keycode)
         } else {
             // selective drawing code (draws only dirty rectangles) (OS X >= 10.4)
             const NSRect *rectList;
+#if (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5)
+            NSInteger rectCount;
+#else
             int rectCount;
+#endif
             int i;
             CGImageRef clipImageRef;
             CGRect clipRect;
-- 
1.6.5.3

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

* [Qemu-devel] [PATCH v3 3/3] Cocoa: Silence warnings
  2009-12-06 15:21                   ` [Qemu-devel] [PATCH v3 2/3] Cocoa: ppc64 host support Andreas Faerber
@ 2009-12-06 15:21                     ` Andreas Faerber
  0 siblings, 0 replies; 28+ messages in thread
From: Andreas Faerber @ 2009-12-06 15:21 UTC (permalink / raw)
  To: qemu-devel; +Cc: John Arbuckle, Andreas Faerber, Mike Kronenberg

Missing static for cocoa_keycode_to_qemu.
Missing const for character constant.

__LITTLE_ENDIAN__ is undefined on Big Endian host.
MAC_OS_X_VERSION_10_4 is undefined on v10.3 and earlier.

v3:
- Silence warnings reported from Mac OS X v10.3.9

Signed-off-by: Andreas Faerber <andreas.faerber@web.de>
Cc: John Arbuckle <programmingkidx@gmail.com>
Cc: Mike Kronenberg <mike.kronenberg@kronenberg.org>
---
 cocoa.m |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/cocoa.m b/cocoa.m
index 989efd5..ae2fd86 100644
--- a/cocoa.m
+++ b/cocoa.m
@@ -28,6 +28,9 @@
 #include "console.h"
 #include "sysemu.h"
 
+#ifndef MAC_OS_X_VERSION_10_4
+#define MAC_OS_X_VERSION_10_4 1040
+#endif
 #ifndef MAC_OS_X_VERSION_10_5
 #define MAC_OS_X_VERSION_10_5 1050
 #endif
@@ -233,7 +236,7 @@ int keymap[] =
 */
 };
 
-int cocoa_keycode_to_qemu(int keycode)
+static int cocoa_keycode_to_qemu(int keycode)
 {
     if((sizeof(keymap)/sizeof(int)) <= keycode)
     {
@@ -319,7 +322,7 @@ int cocoa_keycode_to_qemu(int keycode)
             screen.bitsPerComponent, //bitsPerComponent
             screen.bitsPerPixel, //bitsPerPixel
             (screen.width * (screen.bitsPerComponent/2)), //bytesPerRow
-#if __LITTLE_ENDIAN__
+#ifdef __LITTLE_ENDIAN__
             CGColorSpaceCreateWithName(kCGColorSpaceGenericRGB), //colorspace for OS X >= 10.4
             kCGBitmapByteOrder32Little | kCGImageAlphaNoneSkipFirst,
 #else
@@ -791,7 +794,7 @@ int cocoa_keycode_to_qemu(int keycode)
     if(returnCode == NSCancelButton) {
         exit(0);
     } else if(returnCode == NSOKButton) {
-        char *bin = "qemu";
+        const char *bin = "qemu";
         char *img = (char*)[ [ sheet filename ] cStringUsingEncoding:NSASCIIStringEncoding];
 
         char **argv = (char**)malloc( sizeof(char*)*3 );
-- 
1.6.5.3

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

* Re: [Qemu-devel] Adding support for Mac OS X ppc64 host
  2009-12-06  6:37     ` malc
@ 2009-12-11 21:32       ` Andreas Färber
  2009-12-12 13:00         ` malc
  2009-12-15 17:00         ` malc
  2009-12-12  1:21       ` Andreas Färber
  1 sibling, 2 replies; 28+ messages in thread
From: Andreas Färber @ 2009-12-11 21:32 UTC (permalink / raw)
  To: malc; +Cc: qemu-devel


Am 06.12.2009 um 07:37 schrieb malc:

> will try system-ppc later..

I've tried Debian 4.0r4a ppc netinst CD on Linux/ppc64 and spotted  
different but similar deviations:

ppc64 qemu-system-ppc segfaults after "returning from prom_init".
ppc64 qemu-system-ppc64 boots the default "install" option fine.

amd64 qemu-system-ppc does not exhibit this crash.
amd64 qemu-system-ppc64 boots okay, too.

Andreas

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

* Re: [Qemu-devel] Adding support for Mac OS X ppc64 host
  2009-12-06  6:37     ` malc
  2009-12-11 21:32       ` Andreas Färber
@ 2009-12-12  1:21       ` Andreas Färber
  2009-12-12 12:58         ` malc
  1 sibling, 1 reply; 28+ messages in thread
From: Andreas Färber @ 2009-12-12  1:21 UTC (permalink / raw)
  To: malc; +Cc: qemu-devel


Am 06.12.2009 um 07:37 schrieb malc:

> On Sun, 6 Dec 2009, Andreas F?rber wrote:
>
>>
>> Am 06.12.2009 um 06:14 schrieb malc:
>>
>>> On Sun, 6 Dec 2009, Andreas Faerber wrote:
>>>
>>>> qemu-system-sparc64 works on ppc64 while it didn't on ppc!
>>>
>>> Does it work on linux ppc64? If so
>>
>> Haven't had a chance to test on other ppc[64] platforms yet.
>>
>>> how exactly did you test that
>>> (so that i can try to debug it here)
>>
>> $ /Users/andreas/QEMU/latest64/bin/qemu-system-sparc64 -boot d -cdrom
>> /Users/andreas/QEMU/sol-10-u3-ga-sparc-dvd.iso
>> $ /Users/andreas/QEMU/latest64/bin/qemu-system-sparc64 -boot d -cdrom
>> /Users/andreas/QEMU/debian-40r3-sparc-CD-1.iso
>>
>> All these (also MilaX, in case you don't have Solaris 10 around)  
>> are expected
>> to enter OpenBIOS and result in OpenBIOS errors but not in QEMU  
>> crashes or
>> hangs.
>> On Linux add -nographic.
>>
>
> I was only able to find debian-40r3-sparc-netinst.iso here on ppc/ 
> linux
> it boots (i think):
>
> <snip snip>
> boot: expert
> Allocated 8 Megs of memory at 0x40000000 for kernel
> Loaded kernel version 2.6.18
> Loading initial ramdisk (3882238 bytes at 0xC00000 phys, 0x40C00000  
> virt)...
> -
> Remapping the kernel... done.
> Booting Linux...
>
> And it sits there while i'm losing patience..
>
> Can you retry with netinst, if it behaves like CD-1 in your case the
> problem is most likely confined to OSX, otherwise i would have to  
> search
> for CD-1 better.

I tried with 4.0r8 businesscard: Such a hang I could reproduce on  
Linux/ppc and Linux/ppc64 and OSX/ppc64 and Linux/amd64 only when  
running with qemu-system-sparc64, but not with qemu-system-sparc.

Also, on Linux/ppc64, qemu and qemu-system-x86_64 render Haiku nightly  
image r34558 x86gcc2 unusable (desktop garbled, no cursor), while on  
Linux/ppc and OSX/ppc64 (r34514) and Linux/amd64 it works okay.

Andreas

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

* Re: [Qemu-devel] Adding support for Mac OS X ppc64 host
  2009-12-12  1:21       ` Andreas Färber
@ 2009-12-12 12:58         ` malc
  0 siblings, 0 replies; 28+ messages in thread
From: malc @ 2009-12-12 12:58 UTC (permalink / raw)
  To: Andreas Färber; +Cc: qemu-devel

[-- Attachment #1: Type: TEXT/PLAIN, Size: 2353 bytes --]

On Sat, 12 Dec 2009, Andreas F?rber wrote:

> 
> Am 06.12.2009 um 07:37 schrieb malc:
> 
> > On Sun, 6 Dec 2009, Andreas F?rber wrote:
> > 
> > > 
> > > Am 06.12.2009 um 06:14 schrieb malc:
> > > 
> > > > On Sun, 6 Dec 2009, Andreas Faerber wrote:
> > > > 
> > > > > qemu-system-sparc64 works on ppc64 while it didn't on ppc!
> > > > 
> > > > Does it work on linux ppc64? If so
> > > 
> > > Haven't had a chance to test on other ppc[64] platforms yet.
> > > 
> > > > how exactly did you test that
> > > > (so that i can try to debug it here)
> > > 
> > > $ /Users/andreas/QEMU/latest64/bin/qemu-system-sparc64 -boot d -cdrom
> > > /Users/andreas/QEMU/sol-10-u3-ga-sparc-dvd.iso
> > > $ /Users/andreas/QEMU/latest64/bin/qemu-system-sparc64 -boot d -cdrom
> > > /Users/andreas/QEMU/debian-40r3-sparc-CD-1.iso
> > > 
> > > All these (also MilaX, in case you don't have Solaris 10 around) are
> > > expected
> > > to enter OpenBIOS and result in OpenBIOS errors but not in QEMU crashes or
> > > hangs.
> > > On Linux add -nographic.
> > > 
> > 
> > I was only able to find debian-40r3-sparc-netinst.iso here on ppc/linux
> > it boots (i think):
> > 
> > <snip snip>
> > boot: expert
> > Allocated 8 Megs of memory at 0x40000000 for kernel
> > Loaded kernel version 2.6.18
> > Loading initial ramdisk (3882238 bytes at 0xC00000 phys, 0x40C00000 virt)...
> > -
> > Remapping the kernel... done.
> > Booting Linux...
> > 
> > And it sits there while i'm losing patience..
> > 
> > Can you retry with netinst, if it behaves like CD-1 in your case the
> > problem is most likely confined to OSX, otherwise i would have to search
> > for CD-1 better.
> 
> I tried with 4.0r8 businesscard: Such a hang I could reproduce on Linux/ppc
> and Linux/ppc64 and OSX/ppc64 and Linux/amd64 only when running with
> qemu-system-sparc64, but not with qemu-system-sparc.

So the problem is in no way limited to ppc, good to know.
 
> Also, on Linux/ppc64, qemu and qemu-system-x86_64 render Haiku nightly image
> r34558 x86gcc2 unusable (desktop garbled, no cursor), while on Linux/ppc and
> OSX/ppc64 (r34514) and Linux/amd64 it works okay.

That's vga/display issue (have you tried -vga std ?, FranГois REVOL 
mentioned that it works with one of those and doesn't work with others)

-- 
mailto:av1474@comtv.ru

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

* Re: [Qemu-devel] Adding support for Mac OS X ppc64 host
  2009-12-11 21:32       ` Andreas Färber
@ 2009-12-12 13:00         ` malc
  2009-12-15 17:00         ` malc
  1 sibling, 0 replies; 28+ messages in thread
From: malc @ 2009-12-12 13:00 UTC (permalink / raw)
  To: Andreas Färber; +Cc: qemu-devel

On Fri, 11 Dec 2009, Andreas F?rber wrote:

> 
> Am 06.12.2009 um 07:37 schrieb malc:
> 
> > will try system-ppc later..
> 
> I've tried Debian 4.0r4a ppc netinst CD on Linux/ppc64 and spotted different
> but similar deviations:
> 
> ppc64 qemu-system-ppc segfaults after "returning from prom_init".

Weird things going on there, it fails (but only semi-reliably!) inside
helper_lsw it appears that while argument passed to it is correct the
memory reference (inside ldl) uses sign extended version of the address.

I'm a bit stumped...

> ppc64 qemu-system-ppc64 boots the default "install" option fine.
> 
> amd64 qemu-system-ppc does not exhibit this crash.
> amd64 qemu-system-ppc64 boots okay, too.
> 
> Andreas

-- 
mailto:av1474@comtv.ru

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

* Re: [Qemu-devel] Adding support for Mac OS X ppc64 host
  2009-12-11 21:32       ` Andreas Färber
  2009-12-12 13:00         ` malc
@ 2009-12-15 17:00         ` malc
  2009-12-15 22:36           ` Andreas Färber
  1 sibling, 1 reply; 28+ messages in thread
From: malc @ 2009-12-15 17:00 UTC (permalink / raw)
  To: Andreas Färber; +Cc: qemu-devel

On Fri, 11 Dec 2009, Andreas F?rber wrote:

> 
> Am 06.12.2009 um 07:37 schrieb malc:
> 
> > will try system-ppc later..
> 
> I've tried Debian 4.0r4a ppc netinst CD on Linux/ppc64 and spotted different
> but similar deviations:
> 
> ppc64 qemu-system-ppc segfaults after "returning from prom_init".

Should be fixed by 591d6f1dfdb60ab0a4cc487cd5781fa799dcac4b, can you
verify?

> ppc64 qemu-system-ppc64 boots the default "install" option fine.
> 
> amd64 qemu-system-ppc does not exhibit this crash.
> amd64 qemu-system-ppc64 boots okay, too.
> 
> Andreas

-- 
mailto:av1474@comtv.ru

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

* Re: [Qemu-devel] Adding support for Mac OS X ppc64 host
  2009-12-15 17:00         ` malc
@ 2009-12-15 22:36           ` Andreas Färber
  0 siblings, 0 replies; 28+ messages in thread
From: Andreas Färber @ 2009-12-15 22:36 UTC (permalink / raw)
  To: malc; +Cc: qemu-devel


Am 15.12.2009 um 18:00 schrieb malc:

> On Fri, 11 Dec 2009, Andreas F?rber wrote:
>
>> I've tried Debian 4.0r4a ppc netinst CD on Linux/ppc64 and spotted  
>> [...]
>> deviations:
>>
>> ppc64 qemu-system-ppc segfaults after "returning from prom_init".
>
> Should be fixed by 591d6f1dfdb60ab0a4cc487cd5781fa799dcac4b, can you
> verify?

Verified-by: Andreas Färber <andreas.faerber@web.de> :)

ppc-softmmu no longer crashes on Linux/ppc64. Didn't notice any  
regression or improvement on OSX/ppc64 - no influence on x86/x64 Haiku  
or sparc64 Debian on Linux/ppc64.

Good catch, thanks!

Andreas

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

end of thread, other threads:[~2009-12-15 22:37 UTC | newest]

Thread overview: 28+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-12-06  4:57 [Qemu-devel] Adding support for Mac OS X ppc64 host Andreas Faerber
2009-12-06  4:57 ` [Qemu-devel] [PATCH 1/3] TCG: Mac OS X support for ppc64 target Andreas Faerber
2009-12-06  4:57   ` [Qemu-devel] [PATCH 2/3] Cocoa: ppc64 host support Andreas Faerber
2009-12-06  4:57     ` [Qemu-devel] [PATCH 3/3] Cocoa: Silence warnings Andreas Faerber
2009-12-06  5:13   ` [Qemu-devel] Re: [PATCH 1/3] TCG: Mac OS X support for ppc64 target malc
2009-12-06  5:25     ` Andreas Färber
2009-12-06  6:28       ` malc
2009-12-06 13:00         ` [Qemu-devel] [PATCH v2 " Andreas Faerber
2009-12-06 13:00           ` [Qemu-devel] [PATCH v2 2/3] Cocoa: ppc64 host support Andreas Faerber
2009-12-06 13:00             ` [Qemu-devel] [PATCH v2 3/3] Cocoa: Silence warnings Andreas Faerber
2009-12-06 13:02             ` [Qemu-devel] Re: [PATCH v2 2/3] Cocoa: ppc64 host support Alexander Graf
2009-12-06 13:23               ` Andreas Färber
2009-12-06 13:32                 ` Alexander Graf
2009-12-06 13:41             ` Mike Kronenberg
2009-12-06 14:09               ` Andreas Färber
2009-12-06 15:21                 ` [Qemu-devel] [PATCH v3 1/3] TCG: Mac OS X support for ppc64 target Andreas Faerber
2009-12-06 15:21                   ` [Qemu-devel] [PATCH v3 2/3] Cocoa: ppc64 host support Andreas Faerber
2009-12-06 15:21                     ` [Qemu-devel] [PATCH v3 3/3] Cocoa: Silence warnings Andreas Faerber
2009-12-06 13:08         ` [Qemu-devel] Re: [PATCH 1/3] TCG: Mac OS X support for ppc64 target Andreas Färber
2009-12-06  5:14 ` [Qemu-devel] Adding support for Mac OS X ppc64 host malc
2009-12-06  5:41   ` Andreas Färber
2009-12-06  6:37     ` malc
2009-12-11 21:32       ` Andreas Färber
2009-12-12 13:00         ` malc
2009-12-15 17:00         ` malc
2009-12-15 22:36           ` Andreas Färber
2009-12-12  1:21       ` Andreas Färber
2009-12-12 12:58         ` malc

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.