Skip to contentSkip to conversation

Here is a patch to build qemu with powerpc (system) support on win32

Qemu-devel Martin 11 participants 15 messages May 9, 2004 – May 11, 2004

lore
Share & tools
lore

Martin

author
#0 lore raw

I mad a little patch to be able to enable powerpc system emulation on windows
The patch is against qemu 0.5.5.
Just run configure with
./configure --target-list=i386-softmmu ppc-softmmu
(Which is the default with this patch)
and it builds both qemu.exe (which is i386 system emulation) and qemu-system-ppc.exe (which is ppc system emulation)

I tested it with the VGA framebuffer enabled linux kernel zIamge and the debian install disk on Jocelyns page
http://jocelyn.mayer.free.fr/qemu-ppc/

It seems to work for me.
I used the commandline:
qemu-system-ppc.exe --kernel zImage_vgafb.prep --fda debian_install_root.bin --boot a and it just boots.

If anyone is interested I can make my binary qemu-system-ppc.exe available but I think it would be better to place one on the Fabrices qemu homepage or on Jocelyns qemu-ppc homepage if it is ready for primetime

Strange thing about the patch is I had to manually set the env struct to zero in cpu_ppc_init (in translate.c) for(i=0;i<sizeof(CPUPPCState);i++)
{
((char*) env)[i]=0;
}

With the standard
memset(env, 0, sizeof(CPUPPCState));
The compiler complained about not being able to free a register.

Greetings,
Martin

configure +1 -1
diff -urbN qemu-0.5.5/configure qemu-0.5.5-win32/configure
@@ -140,7 +140,7 @@
 strip="${cross_prefix}${strip}"
 
 if test "$mingw32" = "yes" ; then
-    target_list="i386-softmmu"
+    target_list="i386-softmmu ppc-softmmu"
     EXESUF=".exe"
     gdbstub="no"
 fi
hw/m48t59.c +10 -2
diff -urbN qemu-0.5.5/hw/m48t59.c qemu-0.5.5-win32/hw/m48t59.c
@@ -67,7 +67,11 @@
     time_t t;
 
     t = time(NULL) + NVRAM->time_offset;
-    localtime_r(&t, tm);
+    #ifdef WIN32
+	  memcpy(tm,localtime(&t),sizeof(*tm));
+	#else
+	  localtime_r (&t, &local) ;
+	#endif
 }
 
 static void set_time (m48t59_t *NVRAM, struct tm *tm)
@@ -129,7 +133,11 @@
 
 static void get_alarm (m48t59_t *NVRAM, struct tm *tm)
 {
-    localtime_r(&NVRAM->alarm, tm);
+	#ifdef WIN32
+	  memcpy(tm,localtime(&NVRAM->alarm),sizeof(*tm));
+	#else
+	   localtime_r (&NVRAM->alarm, tm);
+	#endif
 }
 
 static void set_alarm (m48t59_t *NVRAM, struct tm *tm)
target-ppc/helper.c +6 -0
diff -urbN qemu-0.5.5/target-ppc/helper.c qemu-0.5.5-win32/target-ppc/helper.c
@@ -17,7 +17,13 @@
  * License along with this library; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
+
+#ifdef _WIN32
+#define PROT_READ  1
+#define PROT_WRITE 2
+#else
 #include <sys/mman.h>
+#endif
 
 #include "exec.h"
 #if defined (USE_OPEN_FIRMWARE)
target-ppc/translate.c +8 -1
diff -urbN qemu-0.5.5/target-ppc/translate.c qemu-0.5.5-win32/target-ppc/translate.c
@@ -2933,13 +2933,21 @@
 CPUPPCState *cpu_ppc_init(void)
 {
     CPUPPCState *env;
+    int i;
 
     cpu_exec_init();
 
     env = malloc(sizeof(CPUPPCState));
     if (!env)
         return NULL;
+#ifdef WIN32
+for(i=0;i<sizeof(CPUPPCState);i++)
+{
+	((char*) env)[i]=0;
+}
+#else
     memset(env, 0, sizeof(CPUPPCState));
+#endif
 #if !defined(CONFIG_USER_ONLY) && defined (USE_OPEN_FIRMWARE)
     setup_machine(env, 0);
 #else
@@ -2961,7 +2969,6 @@
     msr_pr = 1;
 #endif
     env->access_type = ACCESS_INT;
-
     return env;
 }
 
#1 lore raw

Has anybody been able to run MacOnLinux inside qemu's ppc emulation?

;)

If so, this development could be very interesting...

Satadru

Quoted 128 lines · Martin

I mad a little patch to be able to enable powerpc system emulation on windows
The patch is against qemu 0.5.5.
Just run configure with
./configure --target-list=i386-softmmu ppc-softmmu
(Which is the default with this patch)
and it builds both qemu.exe (which is i386 system emulation) and qemu-system-ppc.exe (which is ppc system emulation)

I tested it with the VGA framebuffer enabled linux kernel zIamge and the debian install disk on Jocelyns page
http://jocelyn.mayer.free.fr/qemu-ppc/

It seems to work for me.
I used the commandline:
qemu-system-ppc.exe --kernel zImage_vgafb.prep --fda debian_install_root.bin --boot a and it just boots.

If anyone is interested I can make my binary qemu-system-ppc.exe available but I think it would be better to place one on the Fabrices qemu homepage or on Jocelyns qemu-ppc homepage if it is ready for primetime

Strange thing about the patch is I had to manually set the env struct to zero in cpu_ppc_init (in translate.c) for(i=0;i<sizeof(CPUPPCState);i++)

{
   ((char*) env)[i]=0;
}

With the standard
memset(env, 0, sizeof(CPUPPCState));
The compiler complained about not being able to free a register. Greetings,
Martin

diff -urbN qemu-0.5.5/configure qemu-0.5.5-win32/configure

configure +1 -1
@@ -140,7 +140,7 @@
 strip="${cross_prefix}${strip}"
 
 if test "$mingw32" = "yes" ; then
-    target_list="i386-softmmu"
+    target_list="i386-softmmu ppc-softmmu"
     EXESUF=".exe"
     gdbstub="no"
 fi

diff -urbN qemu-0.5.5/hw/m48t59.c qemu-0.5.5-win32/hw/m48t59.c

hw/m48t59.c +10 -2
@@ -67,7 +67,11 @@
     time_t t;
 
     t = time(NULL) + NVRAM->time_offset;
-    localtime_r(&t, tm);
+    #ifdef WIN32
+	  memcpy(tm,localtime(&t),sizeof(*tm));
+	#else
+	  localtime_r (&t, &local) ;
+	#endif
 }
 
 static void set_time (m48t59_t *NVRAM, struct tm *tm)
@@ -129,7 +133,11 @@
 
 static void get_alarm (m48t59_t *NVRAM, struct tm *tm)
 {
-    localtime_r(&NVRAM->alarm, tm);
+	#ifdef WIN32
+	  memcpy(tm,localtime(&NVRAM->alarm),sizeof(*tm));
+	#else
+	   localtime_r (&NVRAM->alarm, tm);
+	#endif
 }
 
 static void set_alarm (m48t59_t *NVRAM, struct tm *tm)

diff -urbN qemu-0.5.5/target-ppc/helper.c qemu-0.5.5-win32/target-ppc/helper.c

target-ppc/helper.c +1 -0
+0200
@@ -17,7 +17,13 @@
  * License along with this library; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  

02111-1307 USA
*/

target-ppc/helper.c +6 -0
+
+#ifdef _WIN32
+#define PROT_READ  1
+#define PROT_WRITE 2
+#else
 #include <sys/mman.h>
+#endif
 
 #include "exec.h"
 #if defined (USE_OPEN_FIRMWARE)

diff -urbN qemu-0.5.5/target-ppc/translate.c qemu-0.5.5-win32/target-ppc/translate.c
--- qemu-0.5.5/target-ppc/translate.c 2004-05-08 16:51:18.000000000
+0200
+++ qemu-0.5.5-win32/target-ppc/translate.c 2004-05-10
01:30:06.000000000 +0200

target-ppc/helper.c +8 -1
@@ -2933,13 +2933,21 @@
 CPUPPCState *cpu_ppc_init(void)
 {
     CPUPPCState *env;
+    int i;
 
     cpu_exec_init();
 
     env = malloc(sizeof(CPUPPCState));
     if (!env)
         return NULL;
+#ifdef WIN32
+for(i=0;i<sizeof(CPUPPCState);i++)
+{
+	((char*) env)[i]=0;
+}
+#else
     memset(env, 0, sizeof(CPUPPCState));
+#endif
 #if !defined(CONFIG_USER_ONLY) && defined (USE_OPEN_FIRMWARE)
     setup_machine(env, 0);
 #else
@@ -2961,7 +2969,6 @@
     msr_pr = 1;
 #endif
     env->access_type = ACCESS_INT;
-
     return env;
 }
 

_______________________________________________
Qemu-devel mailing list
[email protected]
http://mail.nongnu.org/mailman/listinfo/qemu-devel

#2 lore raw
Quoted 1 line · Satadru Pramanik

Has anybody been able to run MacOnLinux inside qemu's ppc emulation?

hmm, please enlighten me, how would that be
better than either

- run MOL on a PPC linux or
- run MacOS inside QEMU

Quoted 3 lines

;)

If so, this development could be very interesting...

hmm, probably ... ;)

TIA,
Herbert

Quoted 151 lines

Satadru

Quoted 134 lines · Martin

I mad a little patch to be able to enable powerpc system emulation on windows
The patch is against qemu 0.5.5.
Just run configure with
./configure --target-list=i386-softmmu ppc-softmmu
(Which is the default with this patch)
and it builds both qemu.exe (which is i386 system emulation) and qemu-system-ppc.exe (which is ppc system emulation)

I tested it with the VGA framebuffer enabled linux kernel zIamge and the debian install disk on Jocelyns page
http://jocelyn.mayer.free.fr/qemu-ppc/

It seems to work for me.
I used the commandline:
qemu-system-ppc.exe --kernel zImage_vgafb.prep --fda debian_install_root.bin --boot a
and it just boots.

If anyone is interested I can make my binary qemu-system-ppc.exe available but I think it would be better to place one on the Fabrices qemu homepage or on Jocelyns qemu-ppc homepage if it is ready for primetime

Strange thing about the patch is I had to manually set the env struct to zero in cpu_ppc_init (in translate.c) for(i=0;i<sizeof(CPUPPCState);i++)
{
((char*) env)[i]=0;
}

With the standard
memset(env, 0, sizeof(CPUPPCState));
The compiler complained about not being able to free a register. Greetings,
Martin

diff -urbN qemu-0.5.5/configure qemu-0.5.5-win32/configure

configure +0 -0
@@ -140,7 +140,7 @@

strip="${cross_prefix}${strip}"

if test "$mingw32" = "yes" ; then

configure +1 -1
-    target_list="i386-softmmu"
+    target_list="i386-softmmu ppc-softmmu"
    EXESUF=".exe"
    gdbstub="no"

fi
diff -urbN qemu-0.5.5/hw/m48t59.c qemu-0.5.5-win32/hw/m48t59.c

hw/m48t59.c +10 -2
@@ -67,7 +67,11 @@
    time_t t;
 
    t = time(NULL) + NVRAM->time_offset;
-    localtime_r(&t, tm);
+    #ifdef WIN32
+	  memcpy(tm,localtime(&t),sizeof(*tm));
+	#else
+	  localtime_r (&t, &local) ;
+	#endif
 }
 
 static void set_time (m48t59_t *NVRAM, struct tm *tm)
@@ -129,7 +133,11 @@
 
 static void get_alarm (m48t59_t *NVRAM, struct tm *tm)
 {
-    localtime_r(&NVRAM->alarm, tm);
+	#ifdef WIN32
+	  memcpy(tm,localtime(&NVRAM->alarm),sizeof(*tm));
+	#else
+	   localtime_r (&NVRAM->alarm, tm);
+	#endif
 }
 
 static void set_alarm (m48t59_t *NVRAM, struct tm *tm)

diff -urbN qemu-0.5.5/target-ppc/helper.c
qemu-0.5.5-win32/target-ppc/helper.c

target-ppc/helper.c +0 -0

00:02:46.000000000 +0200

target-ppc/helper.c +0 -0
@@ -17,7 +17,13 @@
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  

02111-1307 USA
*/

target-ppc/helper.c +5 -0
+
+#ifdef _WIN32
+#define PROT_READ  1
+#define PROT_WRITE 2
+#else

#include <sys/mman.h>
+#endif

#include "exec.h"
#if defined (USE_OPEN_FIRMWARE)
diff -urbN qemu-0.5.5/target-ppc/translate.c
qemu-0.5.5-win32/target-ppc/translate.c
--- qemu-0.5.5/target-ppc/translate.c 2004-05-08 16:51:18.000000000
+0200
+++ qemu-0.5.5-win32/target-ppc/translate.c 2004-05-10
01:30:06.000000000 +0200

target-ppc/helper.c +8 -1
@@ -2933,13 +2933,21 @@
 CPUPPCState *cpu_ppc_init(void)
 {
    CPUPPCState *env;
+    int i;
 
    cpu_exec_init();
 
    env = malloc(sizeof(CPUPPCState));
    if (!env)
        return NULL;
+#ifdef WIN32
+for(i=0;i<sizeof(CPUPPCState);i++)
+{
+	((char*) env)[i]=0;
+}
+#else
    memset(env, 0, sizeof(CPUPPCState));
+#endif
 #if !defined(CONFIG_USER_ONLY) && defined (USE_OPEN_FIRMWARE)
    setup_machine(env, 0);
 #else
@@ -2961,7 +2969,6 @@
    msr_pr = 1;
 #endif
    env->access_type = ACCESS_INT;
-
    return env;
 }
 
Quoted 4 lines

_______________________________________________
Qemu-devel mailing list
[email protected]
http://mail.nongnu.org/mailman/listinfo/qemu-devel

_______________________________________________
Qemu-devel mailing list
[email protected]
http://mail.nongnu.org/mailman/listinfo/qemu-devel

#7 lore raw

Re: [Qemu-devel] Here is a patch to build qemu with powerpc (system)support on win32

In reply to Martin

Hi,

Quoted 8 lines · Martin

I mad a little patch to be able to enable powerpc system emulation on windows

It seems to work for me.
I used the commandline:
qemu-system-ppc.exe --kernel zImage_vgafb.prep --fda debian_install_root.bin --boot a
and it just boots.

I am surprised to hear that ppc system works on Windows. It works fine on my PC. I can see ash prompt.

Regards,
kazu

#3 lore raw
In reply to Herbert Poetzl

Hello,

Quoted 7 lines · Herbert Poetzl
Quoted 1 line · Satadru Pramanik

Has anybody been able to run MacOnLinux inside qemu's ppc emulation?

hmm, please enlighten me, how would that be
better than either

- run MOL on a PPC linux or

If you could run it inside qemu, you could run MacOSX (on MOL on linux on qemu emulating a ppc) on i386. Or under any host qemu supports.

Quoted 1 line

- run MacOS inside QEMU

I thought that doesn't work right now, does it? But it would be cleaner, you're right.

Gabriel.

Signature · 1 line
Gabriel Ebner - reverse "ta.renbeleirbag@eg"
#9 lore raw

Re: [Qemu-devel] pearpc (PPC) anyone?

In reply to Johannes Schindelin
Quoted 8 lines · Johannes Schindelin

Hi,

Today I saw for the first time the project pearpc:

http://pearpc.sourceforge.net/

It emulates a PPC machine with JIT. Has anybody seen/worked with it before? How does pearpc relate to qemu? Would a cooperation be good?

Yep, they support 3C90x which is imho better than ne2k currently supported by Qemu, so maybe Qemu authors could "steal" some code from it.

Karel
--
Karel Gardas [email protected]
ObjectSecurity Ltd. http://www.objectsecurity.com

#6 lore raw
In reply to Satadru Pramanik

Sorry for sending this out without reading the posts that came in while I composed the message...

<sheepish>

me

Quoted 160 lines · Satadru Pramanik

I spoke too soon!

I just found this:

PPC emulator with JITC for PCs.

http://pearpc.sourceforge.net/screenshots.html

Initial report (not mine) says that this lets you run OS X on a PC faster than on a comparably equipped mac.

They don't appear to be using code from qemu, but from Bochs. The code appears to be GPL, perhaps some useful code could be found from here to help the qemu PPC project?

Satadru

Quoted 144 lines · Satadru Pramanik

Has anybody been able to run MacOnLinux inside qemu's ppc emulation?

;)

If so, this development could be very interesting...

Satadru

Quoted 126 lines · Martin

I mad a little patch to be able to enable powerpc system emulation on windows
The patch is against qemu 0.5.5.
Just run configure with
./configure --target-list=i386-softmmu ppc-softmmu
(Which is the default with this patch)
and it builds both qemu.exe (which is i386 system emulation) and qemu-system-ppc.exe (which is ppc system emulation)

I tested it with the VGA framebuffer enabled linux kernel zIamge and the debian install disk on Jocelyns page
http://jocelyn.mayer.free.fr/qemu-ppc/

It seems to work for me.
I used the commandline:
qemu-system-ppc.exe --kernel zImage_vgafb.prep --fda debian_install_root.bin --boot a and it just boots.

If anyone is interested I can make my binary qemu-system-ppc.exe available but I think it would be better to place one on the Fabrices qemu homepage or on Jocelyns qemu-ppc homepage if it is ready for primetime

Strange thing about the patch is I had to manually set the env struct to zero in cpu_ppc_init (in translate.c) for(i=0;i<sizeof(CPUPPCState);i++)

{
   ((char*) env)[i]=0;
}

With the standard
memset(env, 0, sizeof(CPUPPCState));
The compiler complained about not being able to free a register. Greetings,
Martin

diff -urbN qemu-0.5.5/configure qemu-0.5.5-win32/configure

configure +1 -1
@@ -140,7 +140,7 @@
 strip="${cross_prefix}${strip}"
 
 if test "$mingw32" = "yes" ; then
-    target_list="i386-softmmu"
+    target_list="i386-softmmu ppc-softmmu"
     EXESUF=".exe"
     gdbstub="no"
 fi

diff -urbN qemu-0.5.5/hw/m48t59.c qemu-0.5.5-win32/hw/m48t59.c

hw/m48t59.c +10 -2
@@ -67,7 +67,11 @@
     time_t t;
 
     t = time(NULL) + NVRAM->time_offset;
-    localtime_r(&t, tm);
+    #ifdef WIN32
+	  memcpy(tm,localtime(&t),sizeof(*tm));
+	#else
+	  localtime_r (&t, &local) ;
+	#endif
 }
 
 static void set_time (m48t59_t *NVRAM, struct tm *tm)
@@ -129,7 +133,11 @@
 
 static void get_alarm (m48t59_t *NVRAM, struct tm *tm)
 {
-    localtime_r(&NVRAM->alarm, tm);
+	#ifdef WIN32
+	  memcpy(tm,localtime(&NVRAM->alarm),sizeof(*tm));
+	#else
+	   localtime_r (&NVRAM->alarm, tm);
+	#endif
 }
 
 static void set_alarm (m48t59_t *NVRAM, struct tm *tm)

diff -urbN qemu-0.5.5/target-ppc/helper.c qemu-0.5.5-win32/target-ppc/helper.c
--- qemu-0.5.5/target-ppc/helper.c 2004-05-08 16:51:18.000000000
+0200
+++ qemu-0.5.5-win32/target-ppc/helper.c 2004-05-10
00:02:46.000000000 +0200

hw/m48t59.c +0 -0
@@ -17,7 +17,13 @@
  * License along with this library; if not, write to the Free 

Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA
*/

hw/m48t59.c +6 -0
+
+#ifdef _WIN32
+#define PROT_READ  1
+#define PROT_WRITE 2
+#else
 #include <sys/mman.h>
+#endif
 
 #include "exec.h"
 #if defined (USE_OPEN_FIRMWARE)

diff -urbN qemu-0.5.5/target-ppc/translate.c qemu-0.5.5-win32/target-ppc/translate.c
--- qemu-0.5.5/target-ppc/translate.c 2004-05-08 16:51:18.000000000
+0200
+++ qemu-0.5.5-win32/target-ppc/translate.c 2004-05-10
01:30:06.000000000 +0200

hw/m48t59.c +8 -1
@@ -2933,13 +2933,21 @@
 CPUPPCState *cpu_ppc_init(void)
 {
     CPUPPCState *env;
+    int i;
 
     cpu_exec_init();
 
     env = malloc(sizeof(CPUPPCState));
     if (!env)
         return NULL;
+#ifdef WIN32
+for(i=0;i<sizeof(CPUPPCState);i++)
+{
+	((char*) env)[i]=0;
+}
+#else
     memset(env, 0, sizeof(CPUPPCState));
+#endif
 #if !defined(CONFIG_USER_ONLY) && defined (USE_OPEN_FIRMWARE)
     setup_machine(env, 0);
 #else
@@ -2961,7 +2969,6 @@
     msr_pr = 1;
 #endif
     env->access_type = ACCESS_INT;
-
     return env;
 }
 
Quoted 4 lines

_______________________________________________
Qemu-devel mailing list
[email protected]
http://mail.nongnu.org/mailman/listinfo/qemu-devel

_______________________________________________
Qemu-devel mailing list
[email protected]
http://mail.nongnu.org/mailman/listinfo/qemu-devel

#5 lore raw
In reply to Satadru Pramanik

I spoke too soon!

I just found this:

PPC emulator with JITC for PCs.

http://pearpc.sourceforge.net/screenshots.html

Initial report (not mine) says that this lets you run OS X on a PC faster than on a comparably equipped mac.

They don't appear to be using code from qemu, but from Bochs. The code appears to be GPL, perhaps some useful code could be found from here to help the qemu PPC project?

Satadru

Quoted 143 lines · Satadru Pramanik

Has anybody been able to run MacOnLinux inside qemu's ppc emulation?

;)

If so, this development could be very interesting...

Satadru

Quoted 125 lines · Martin

I mad a little patch to be able to enable powerpc system emulation on windows
The patch is against qemu 0.5.5.
Just run configure with
./configure --target-list=i386-softmmu ppc-softmmu
(Which is the default with this patch)
and it builds both qemu.exe (which is i386 system emulation) and qemu-system-ppc.exe (which is ppc system emulation)

I tested it with the VGA framebuffer enabled linux kernel zIamge and the debian install disk on Jocelyns page
http://jocelyn.mayer.free.fr/qemu-ppc/

It seems to work for me.
I used the commandline:
qemu-system-ppc.exe --kernel zImage_vgafb.prep --fda debian_install_root.bin --boot a and it just boots.

If anyone is interested I can make my binary qemu-system-ppc.exe available but I think it would be better to place one on the Fabrices qemu homepage or on Jocelyns qemu-ppc homepage if it is ready for primetime

Strange thing about the patch is I had to manually set the env struct to zero in cpu_ppc_init (in translate.c) for(i=0;i<sizeof(CPUPPCState);i++)

{
   ((char*) env)[i]=0;
}

With the standard
memset(env, 0, sizeof(CPUPPCState));
The compiler complained about not being able to free a register. Greetings,
Martin

diff -urbN qemu-0.5.5/configure qemu-0.5.5-win32/configure

configure +1 -1
@@ -140,7 +140,7 @@
 strip="${cross_prefix}${strip}"
 
 if test "$mingw32" = "yes" ; then
-    target_list="i386-softmmu"
+    target_list="i386-softmmu ppc-softmmu"
     EXESUF=".exe"
     gdbstub="no"
 fi

diff -urbN qemu-0.5.5/hw/m48t59.c qemu-0.5.5-win32/hw/m48t59.c

hw/m48t59.c +10 -2
@@ -67,7 +67,11 @@
     time_t t;
 
     t = time(NULL) + NVRAM->time_offset;
-    localtime_r(&t, tm);
+    #ifdef WIN32
+	  memcpy(tm,localtime(&t),sizeof(*tm));
+	#else
+	  localtime_r (&t, &local) ;
+	#endif
 }
 
 static void set_time (m48t59_t *NVRAM, struct tm *tm)
@@ -129,7 +133,11 @@
 
 static void get_alarm (m48t59_t *NVRAM, struct tm *tm)
 {
-    localtime_r(&NVRAM->alarm, tm);
+	#ifdef WIN32
+	  memcpy(tm,localtime(&NVRAM->alarm),sizeof(*tm));
+	#else
+	   localtime_r (&NVRAM->alarm, tm);
+	#endif
 }
 
 static void set_alarm (m48t59_t *NVRAM, struct tm *tm)

diff -urbN qemu-0.5.5/target-ppc/helper.c qemu-0.5.5-win32/target-ppc/helper.c

target-ppc/helper.c +0 -0

00:02:46.000000000 +0200

target-ppc/helper.c +0 -0
@@ -17,7 +17,13 @@
  * License along with this library; if not, write to the Free 

Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA
*/

target-ppc/helper.c +6 -0
+
+#ifdef _WIN32
+#define PROT_READ  1
+#define PROT_WRITE 2
+#else
 #include <sys/mman.h>
+#endif
 
 #include "exec.h"
 #if defined (USE_OPEN_FIRMWARE)

diff -urbN qemu-0.5.5/target-ppc/translate.c qemu-0.5.5-win32/target-ppc/translate.c
--- qemu-0.5.5/target-ppc/translate.c 2004-05-08 16:51:18.000000000
+0200
+++ qemu-0.5.5-win32/target-ppc/translate.c 2004-05-10
01:30:06.000000000 +0200

target-ppc/helper.c +8 -1
@@ -2933,13 +2933,21 @@
 CPUPPCState *cpu_ppc_init(void)
 {
     CPUPPCState *env;
+    int i;
 
     cpu_exec_init();
 
     env = malloc(sizeof(CPUPPCState));
     if (!env)
         return NULL;
+#ifdef WIN32
+for(i=0;i<sizeof(CPUPPCState);i++)
+{
+	((char*) env)[i]=0;
+}
+#else
     memset(env, 0, sizeof(CPUPPCState));
+#endif
 #if !defined(CONFIG_USER_ONLY) && defined (USE_OPEN_FIRMWARE)
     setup_machine(env, 0);
 #else
@@ -2961,7 +2969,6 @@
     msr_pr = 1;
 #endif
     env->access_type = ACCESS_INT;
-
     return env;
 }
 
Quoted 4 lines

_______________________________________________
Qemu-devel mailing list
[email protected]
http://mail.nongnu.org/mailman/listinfo/qemu-devel

_______________________________________________
Qemu-devel mailing list
[email protected]
http://mail.nongnu.org/mailman/listinfo/qemu-devel

#10 lore raw

Re: [Qemu-devel] pearpc (PPC) anyone?

In reply to Johannes Schindelin
Quoted 8 lines · Johannes Schindelin

Hi,

Today I saw for the first time the project pearpc:

http://pearpc.sourceforge.net/

It emulates a PPC machine with JIT. Has anybody seen/worked with it before? How does pearpc relate to qemu? Would a cooperation be good?

I am looking at the code. I'll see if it is possible to use it to have a Mac OS X support in QEMU.

Fabrice.

#11 lore raw

Re: [Qemu-devel] pearpc (PPC) anyone?

Quoted 5 lines · Fabrice Bellard
Quoted 4 lines · Johannes Schindelin

Hi,

Today I saw for the first time the project pearpc:

Quoted 7 lines
Quoted 4 lines

http://pearpc.sourceforge.net/

It emulates a PPC machine with JIT. Has anybody seen/worked with it before? How does pearpc relate to qemu? Would a cooperation be good?

I am looking at the code. I'll see if it is possible to use it to have a Mac OS X support in QEMU.

doesn't MacOS X starting with X.3 (Panther)
require AltiVec support (G4) to run?

if that is complete bullshit, please ignore ;)

best,
Herbert

Quoted 6 lines

Fabrice.

_______________________________________________
Qemu-devel mailing list
[email protected]
http://mail.nongnu.org/mailman/listinfo/qemu-devel

#12 lore raw

Re: [Qemu-devel] pearpc (PPC) anyone?

OS X 10.3 (Panther) only requires a G3.

Quoted 22 lines

doesn't MacOS X starting with X.3 (Panther)
require AltiVec support (G4) to run?

if that is complete bullshit, please ignore ;)

best,
Herbert

Quoted 6 lines

Fabrice.

_______________________________________________
Qemu-devel mailing list
[email protected]
http://mail.nongnu.org/mailman/listinfo/qemu-devel

_______________________________________________
Qemu-devel mailing list
[email protected]
http://mail.nongnu.org/mailman/listinfo/qemu-devel

#13 lore raw

Re: [Qemu-devel] pearpc (PPC) anyone?

In reply to Herbert Poetzl
Quoted 2 lines · Herbert Poetzl

doesn't MacOS X starting with X.3 (Panther)
require AltiVec support (G4) to run?

Wrong. It runs on g3, and g3 hasn't altivec.

Stefano

#14 lore raw

Re: [Qemu-devel] pearpc (PPC) anyone?

In reply to Herbert Poetzl

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Quoted 11 lines · Herbert Poetzl
Quoted 10 lines · Fabrice Bellard
Quoted 8 lines · Johannes Schindelin

Hi,

Today I saw for the first time the project pearpc:

http://pearpc.sourceforge.net/

It emulates a PPC machine with JIT. Has anybody seen/worked with it before? How does pearpc relate to qemu? Would a cooperation be good?

Quoted 7 lines
Quoted 2 lines

I am looking at the code. I'll see if it is possible to use it to have a Mac OS X support in QEMU.

doesn't MacOS X starting with X.3 (Panther)
require AltiVec support (G4) to run?

if that is complete bullshit, please ignore ;)

I might be wrong here, but from what I've heard Apple made an effort to make 10.3 run better without AltiVec. Previous versions of OSX has been very well optimised for AltiVec and the G4 which didn't make G3 users very happy.

//David Holm
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFAoED6xVDe1wIoqX0RAq97AJ0RzEhxv/1/RVayhTVeEe1CumFq3QCghg3d AiKpxirTaHaVd4v9q5e8mhA=
=C944
-----END PGP SIGNATURE-----