* [Qemu-devel] Here is a patch to build qemu with powerpc (system) support on win32 @ 2004-05-09 23:57 Martin 2004-05-10 1:57 ` Satadru Pramanik ` (2 more replies) 0 siblings, 3 replies; 15+ messages in thread From: Martin @ 2004-05-09 23:57 UTC (permalink / raw) To: qemu-devel [-- Attachment #1: Type: text/plain, Size: 1184 bytes --] 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 [-- Attachment #2: qemu-0.5.5-powerpc-win32.patch --] [-- Type: text/plain, Size: 2495 bytes --] diff -urbN qemu-0.5.5/configure qemu-0.5.5-win32/configure --- qemu-0.5.5/configure 2004-05-08 16:51:18.000000000 +0200 +++ qemu-0.5.5-win32/configure 2004-05-10 00:48:46.000000000 +0200 @@ -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 --- qemu-0.5.5/hw/m48t59.c 2004-05-08 16:51:18.000000000 +0200 +++ qemu-0.5.5-win32/hw/m48t59.c 2004-05-10 00:20:44.000000000 +0200 @@ -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 @@ -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) 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 @@ -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; } ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [Qemu-devel] Here is a patch to build qemu with powerpc (system) support on win32 2004-05-09 23:57 [Qemu-devel] Here is a patch to build qemu with powerpc (system) support on win32 Martin @ 2004-05-10 1:57 ` Satadru Pramanik 2004-05-10 3:42 ` Herbert Poetzl 2004-05-10 17:28 ` [Qemu-devel] Here is a patch to build qemu with powerpc (system) support on win32 Satadru Pramanik 2004-05-10 8:04 ` [Qemu-devel] Here is a patch to build qemu with powerpc (system)support " kazu 2004-05-10 12:45 ` [Qemu-devel] pearpc (PPC) anyone? Johannes Schindelin 2 siblings, 2 replies; 15+ messages in thread From: Satadru Pramanik @ 2004-05-10 1:57 UTC (permalink / raw) To: qemu-devel [-- Attachment #1.1: Type: text/plain, Size: 4260 bytes --] Has anybody been able to run MacOnLinux inside qemu's ppc emulation? ;) If so, this development could be very interesting... Satadru On May 9, 2004, at 7:57 PM, Martin wrote: > 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 > --- qemu-0.5.5/configure 2004-05-08 16:51:18.000000000 +0200 > +++ qemu-0.5.5-win32/configure 2004-05-10 00:48:46.000000000 +0200 > @@ -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 > --- qemu-0.5.5/hw/m48t59.c 2004-05-08 16:51:18.000000000 +0200 > +++ qemu-0.5.5-win32/hw/m48t59.c 2004-05-10 00:20:44.000000000 +0200 > @@ -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 > @@ -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) > 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 > @@ -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 > Qemu-devel@nongnu.org > http://mail.nongnu.org/mailman/listinfo/qemu-devel [-- Attachment #1.2: smime.p7s --] [-- Type: application/pkcs7-signature, Size: 2363 bytes --] [-- Attachment #2: This is a digitally signed message part --] [-- Type: application/pgp-signature, Size: 186 bytes --] ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [Qemu-devel] Here is a patch to build qemu with powerpc (system) support on win32 2004-05-10 1:57 ` Satadru Pramanik @ 2004-05-10 3:42 ` Herbert Poetzl 2004-05-10 11:35 ` [Qemu-devel] " Gabriel Ebner 2004-05-10 17:28 ` [Qemu-devel] Here is a patch to build qemu with powerpc (system) support on win32 Satadru Pramanik 1 sibling, 1 reply; 15+ messages in thread From: Herbert Poetzl @ 2004-05-10 3:42 UTC (permalink / raw) To: Satadru Pramanik; +Cc: qemu-devel On Sun, May 09, 2004 at 09:57:31PM -0400, Satadru Pramanik wrote: > 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 > ;) > > If so, this development could be very interesting... hmm, probably ... ;) TIA, Herbert > Satadru > > On May 9, 2004, at 7:57 PM, Martin wrote: > > >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 > >--- qemu-0.5.5/configure 2004-05-08 16:51:18.000000000 +0200 > >+++ qemu-0.5.5-win32/configure 2004-05-10 00:48:46.000000000 +0200 > >@@ -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 > >--- qemu-0.5.5/hw/m48t59.c 2004-05-08 16:51:18.000000000 +0200 > >+++ qemu-0.5.5-win32/hw/m48t59.c 2004-05-10 00:20:44.000000000 +0200 > >@@ -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 > >@@ -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) > >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 > >@@ -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 > >Qemu-devel@nongnu.org > >http://mail.nongnu.org/mailman/listinfo/qemu-devel > _______________________________________________ > Qemu-devel mailing list > Qemu-devel@nongnu.org > http://mail.nongnu.org/mailman/listinfo/qemu-devel ^ permalink raw reply [flat|nested] 15+ messages in thread
* [Qemu-devel] Re: Here is a patch to build qemu with powerpc (system) support on win32 2004-05-10 3:42 ` Herbert Poetzl @ 2004-05-10 11:35 ` Gabriel Ebner 2004-05-10 13:45 ` [Qemu-devel] Mac OS X installer working Jamie Burns 0 siblings, 1 reply; 15+ messages in thread From: Gabriel Ebner @ 2004-05-10 11:35 UTC (permalink / raw) To: qemu-devel Hello, Herbert Poetzl wrote: > On Sun, May 09, 2004 at 09:57:31PM -0400, Satadru Pramanik wrote: >> 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. > - run MacOS inside QEMU I thought that doesn't work right now, does it? But it would be cleaner, you're right. Gabriel. -- Gabriel Ebner - reverse "ta.renbeleirbag@eg" ^ permalink raw reply [flat|nested] 15+ messages in thread
* [Qemu-devel] Mac OS X installer working 2004-05-10 11:35 ` [Qemu-devel] " Gabriel Ebner @ 2004-05-10 13:45 ` Jamie Burns 0 siblings, 0 replies; 15+ messages in thread From: Jamie Burns @ 2004-05-10 13:45 UTC (permalink / raw) To: qemu-devel Has anybody else seen this project: http://pearpc.sourceforge.net/screenshots.html They appear to have the Mac OS X installer working. Is there possibly code that could accelerate getting Mac OS X on QEMU working? Jamie. ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [Qemu-devel] Here is a patch to build qemu with powerpc (system) support on win32 2004-05-10 1:57 ` Satadru Pramanik 2004-05-10 3:42 ` Herbert Poetzl @ 2004-05-10 17:28 ` Satadru Pramanik 2004-05-10 17:29 ` Satadru Pramanik 1 sibling, 1 reply; 15+ messages in thread From: Satadru Pramanik @ 2004-05-10 17:28 UTC (permalink / raw) To: qemu-devel [-- Attachment #1.1: Type: text/plain, Size: 5039 bytes --] 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 On May 9, 2004, at 9:57 PM, Satadru Pramanik wrote: > Has anybody been able to run MacOnLinux inside qemu's ppc emulation? > > ;) > > If so, this development could be very interesting... > > Satadru > > On May 9, 2004, at 7:57 PM, Martin wrote: > >> 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 >> --- qemu-0.5.5/configure 2004-05-08 16:51:18.000000000 +0200 >> +++ qemu-0.5.5-win32/configure 2004-05-10 00:48:46.000000000 +0200 >> @@ -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 >> --- qemu-0.5.5/hw/m48t59.c 2004-05-08 16:51:18.000000000 +0200 >> +++ qemu-0.5.5-win32/hw/m48t59.c 2004-05-10 00:20:44.000000000 +0200 >> @@ -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 >> @@ -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) >> 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 >> @@ -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 >> Qemu-devel@nongnu.org >> http://mail.nongnu.org/mailman/listinfo/qemu-devel > _______________________________________________ > Qemu-devel mailing list > Qemu-devel@nongnu.org > http://mail.nongnu.org/mailman/listinfo/qemu-devel [-- Attachment #1.2: smime.p7s --] [-- Type: application/pkcs7-signature, Size: 2363 bytes --] [-- Attachment #2: This is a digitally signed message part --] [-- Type: application/pgp-signature, Size: 186 bytes --] ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [Qemu-devel] Here is a patch to build qemu with powerpc (system) support on win32 2004-05-10 17:28 ` [Qemu-devel] Here is a patch to build qemu with powerpc (system) support on win32 Satadru Pramanik @ 2004-05-10 17:29 ` Satadru Pramanik 0 siblings, 0 replies; 15+ messages in thread From: Satadru Pramanik @ 2004-05-10 17:29 UTC (permalink / raw) To: Satadru Pramanik; +Cc: qemu-devel [-- Attachment #1.1: Type: text/plain, Size: 5396 bytes --] Sorry for sending this out without reading the posts that came in while I composed the message... <sheepish> me On May 10, 2004, at 1:28 PM, Satadru Pramanik wrote: > 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 > > On May 9, 2004, at 9:57 PM, Satadru Pramanik wrote: > >> Has anybody been able to run MacOnLinux inside qemu's ppc emulation? >> >> ;) >> >> If so, this development could be very interesting... >> >> Satadru >> >> On May 9, 2004, at 7:57 PM, Martin wrote: >> >>> 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 >>> --- qemu-0.5.5/configure 2004-05-08 16:51:18.000000000 +0200 >>> +++ qemu-0.5.5-win32/configure 2004-05-10 00:48:46.000000000 +0200 >>> @@ -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 >>> --- qemu-0.5.5/hw/m48t59.c 2004-05-08 16:51:18.000000000 +0200 >>> +++ qemu-0.5.5-win32/hw/m48t59.c 2004-05-10 00:20:44.000000000 +0200 >>> @@ -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 >>> @@ -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) >>> 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 >>> @@ -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 >>> Qemu-devel@nongnu.org >>> http://mail.nongnu.org/mailman/listinfo/qemu-devel >> _______________________________________________ >> Qemu-devel mailing list >> Qemu-devel@nongnu.org >> http://mail.nongnu.org/mailman/listinfo/qemu-devel [-- Attachment #1.2: smime.p7s --] [-- Type: application/pkcs7-signature, Size: 2363 bytes --] [-- Attachment #2: This is a digitally signed message part --] [-- Type: application/pgp-signature, Size: 186 bytes --] ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [Qemu-devel] Here is a patch to build qemu with powerpc (system)support on win32 2004-05-09 23:57 [Qemu-devel] Here is a patch to build qemu with powerpc (system) support on win32 Martin 2004-05-10 1:57 ` Satadru Pramanik @ 2004-05-10 8:04 ` kazu 2004-05-10 12:45 ` [Qemu-devel] pearpc (PPC) anyone? Johannes Schindelin 2 siblings, 0 replies; 15+ messages in thread From: kazu @ 2004-05-10 8:04 UTC (permalink / raw) To: qemu-devel Hi, Martin wrote: > 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 ^ permalink raw reply [flat|nested] 15+ messages in thread
* [Qemu-devel] pearpc (PPC) anyone? 2004-05-09 23:57 [Qemu-devel] Here is a patch to build qemu with powerpc (system) support on win32 Martin 2004-05-10 1:57 ` Satadru Pramanik 2004-05-10 8:04 ` [Qemu-devel] Here is a patch to build qemu with powerpc (system)support " kazu @ 2004-05-10 12:45 ` Johannes Schindelin 2004-05-10 15:10 ` Karel Gardas 2004-05-10 18:56 ` Fabrice Bellard 2 siblings, 2 replies; 15+ messages in thread From: Johannes Schindelin @ 2004-05-10 12:45 UTC (permalink / raw) To: qemu-devel 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? Ciao, Dscho ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [Qemu-devel] pearpc (PPC) anyone? 2004-05-10 12:45 ` [Qemu-devel] pearpc (PPC) anyone? Johannes Schindelin @ 2004-05-10 15:10 ` Karel Gardas 2004-05-10 18:56 ` Fabrice Bellard 1 sibling, 0 replies; 15+ messages in thread From: Karel Gardas @ 2004-05-10 15:10 UTC (permalink / raw) To: qemu-devel On Mon, 10 May 2004, Johannes Schindelin wrote: > 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 kgardas@objectsecurity.com ObjectSecurity Ltd. http://www.objectsecurity.com ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [Qemu-devel] pearpc (PPC) anyone? 2004-05-10 12:45 ` [Qemu-devel] pearpc (PPC) anyone? Johannes Schindelin 2004-05-10 15:10 ` Karel Gardas @ 2004-05-10 18:56 ` Fabrice Bellard 2004-05-10 21:40 ` Herbert Poetzl 1 sibling, 1 reply; 15+ messages in thread From: Fabrice Bellard @ 2004-05-10 18:56 UTC (permalink / raw) To: qemu-devel Johannes Schindelin wrote: > 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. ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [Qemu-devel] pearpc (PPC) anyone? 2004-05-10 18:56 ` Fabrice Bellard @ 2004-05-10 21:40 ` Herbert Poetzl 2004-05-10 23:42 ` Satadru Pramanik ` (2 more replies) 0 siblings, 3 replies; 15+ messages in thread From: Herbert Poetzl @ 2004-05-10 21:40 UTC (permalink / raw) To: Fabrice Bellard; +Cc: qemu-devel On Mon, May 10, 2004 at 08:56:26PM +0200, Fabrice Bellard wrote: > Johannes Schindelin wrote: > >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. doesn't MacOS X starting with X.3 (Panther) require AltiVec support (G4) to run? if that is complete bullshit, please ignore ;) best, Herbert > Fabrice. > > _______________________________________________ > Qemu-devel mailing list > Qemu-devel@nongnu.org > http://mail.nongnu.org/mailman/listinfo/qemu-devel ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [Qemu-devel] pearpc (PPC) anyone? 2004-05-10 21:40 ` Herbert Poetzl @ 2004-05-10 23:42 ` Satadru Pramanik 2004-05-10 23:54 ` Stefano Marinelli 2004-05-11 2:56 ` David Holm <dholm@gentoo.org> 2 siblings, 0 replies; 15+ messages in thread From: Satadru Pramanik @ 2004-05-10 23:42 UTC (permalink / raw) To: qemu-devel [-- Attachment #1.1: Type: text/plain, Size: 530 bytes --] OS X 10.3 (Panther) only requires a G3. > > doesn't MacOS X starting with X.3 (Panther) > require AltiVec support (G4) to run? > > if that is complete bullshit, please ignore ;) > > best, > Herbert > >> Fabrice. >> >> _______________________________________________ >> Qemu-devel mailing list >> Qemu-devel@nongnu.org >> http://mail.nongnu.org/mailman/listinfo/qemu-devel > > > _______________________________________________ > Qemu-devel mailing list > Qemu-devel@nongnu.org > http://mail.nongnu.org/mailman/listinfo/qemu-devel [-- Attachment #1.2: smime.p7s --] [-- Type: application/pkcs7-signature, Size: 2363 bytes --] [-- Attachment #2: This is a digitally signed message part --] [-- Type: application/pgp-signature, Size: 186 bytes --] ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [Qemu-devel] pearpc (PPC) anyone? 2004-05-10 21:40 ` Herbert Poetzl 2004-05-10 23:42 ` Satadru Pramanik @ 2004-05-10 23:54 ` Stefano Marinelli 2004-05-11 2:56 ` David Holm <dholm@gentoo.org> 2 siblings, 0 replies; 15+ messages in thread From: Stefano Marinelli @ 2004-05-10 23:54 UTC (permalink / raw) To: qemu-devel At 23:40, 10 may 2004, Herbert Poetzl wrote: > 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 ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [Qemu-devel] pearpc (PPC) anyone? 2004-05-10 21:40 ` Herbert Poetzl 2004-05-10 23:42 ` Satadru Pramanik 2004-05-10 23:54 ` Stefano Marinelli @ 2004-05-11 2:56 ` David Holm <dholm@gentoo.org> 2 siblings, 0 replies; 15+ messages in thread From: David Holm <dholm@gentoo.org> @ 2004-05-11 2:56 UTC (permalink / raw) To: Fabrice Bellard, qemu-devel -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Monday 10 May 2004 23.40, Herbert Poetzl wrote: > On Mon, May 10, 2004 at 08:56:26PM +0200, Fabrice Bellard wrote: > > Johannes Schindelin wrote: > > >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. > > 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----- ^ permalink raw reply [flat|nested] 15+ messages in thread
end of thread, other threads:[~2004-05-11 3:26 UTC | newest] Thread overview: 15+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2004-05-09 23:57 [Qemu-devel] Here is a patch to build qemu with powerpc (system) support on win32 Martin 2004-05-10 1:57 ` Satadru Pramanik 2004-05-10 3:42 ` Herbert Poetzl 2004-05-10 11:35 ` [Qemu-devel] " Gabriel Ebner 2004-05-10 13:45 ` [Qemu-devel] Mac OS X installer working Jamie Burns 2004-05-10 17:28 ` [Qemu-devel] Here is a patch to build qemu with powerpc (system) support on win32 Satadru Pramanik 2004-05-10 17:29 ` Satadru Pramanik 2004-05-10 8:04 ` [Qemu-devel] Here is a patch to build qemu with powerpc (system)support " kazu 2004-05-10 12:45 ` [Qemu-devel] pearpc (PPC) anyone? Johannes Schindelin 2004-05-10 15:10 ` Karel Gardas 2004-05-10 18:56 ` Fabrice Bellard 2004-05-10 21:40 ` Herbert Poetzl 2004-05-10 23:42 ` Satadru Pramanik 2004-05-10 23:54 ` Stefano Marinelli 2004-05-11 2:56 ` David Holm <dholm@gentoo.org>
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).