[Qemu-devel] [PATCH] gcc detection fix for Mac OS X
Hello, on Mac OS X the command 'which' always returns true - regardless of the result. This is a problem, when the configure script tries to detect the right gcc version. An alternative to 'which' could be to try to invoke the compiler directly. Please have a look at the attached patch. Thanks, Jo. -- Joachim Henke http://base91.sourceforge.net/j-o/ gccconf.diff Description: Binary data
[Qemu-devel] Qemu crashes on AAM 0
Qemu crashes with a floating point exception when emulating the AAM 0 instruction. By crash, I mean that the whole qemu process actually blows up (not just the program running inside Qemu). A real i386 machine would trigger a divide exception on AAM 0. This instruction form is undocumented of course, but blowing up the emulator seems a bit drastic. I'm willing to write/test/provide a patch to fix this, please let me know if that would be appreciated. To trigger this bug, I run the qemu-0.9.0 binary distribution for linux-i386 on Linux 2.6.21, without kqemu. I boot it with a FreeDOS floppy image, start DEBUG, assemble the instruction AAM 0, execute it, boom. By the way, Qemu is an amazing piece of work. I used it often and I'm quite impressed by its overal quality and stability. Thanks, Joris.
Re: [Qemu-devel] Qemu crashes on AAM 0
On Sat, 28 Apr 2007, Joris van Rantwijk wrote: Qemu crashes with a floating point exception when emulating the AAM 0 instruction. By crash, I mean that the whole qemu process actually blows up (not just the program running inside Qemu). A real i386 machine would trigger a divide exception on AAM 0. This instruction form is undocumented of course, but blowing up the emulator seems a bit drastic. I'm willing to write/test/provide a patch to fix this, please let me know if that would be appreciated. To trigger this bug, I run the qemu-0.9.0 binary distribution for linux-i386 on Linux 2.6.21, without kqemu. I boot it with a FreeDOS floppy image, start DEBUG, assemble the instruction AAM 0, execute it, boom. By the way, Qemu is an amazing piece of work. I used it often and I'm quite impressed by its overal quality and stability. Following (given that real iron does indeed produce divide by zero exception) should do the trick. Index: op.c === RCS file: /cvsroot/qemu/qemu/target-i386/op.c,v retrieving revision 1.47 diff -u -r1.47 op.c --- op.c1 Feb 2007 22:11:07 - 1.47 +++ op.c29 Apr 2007 15:54:47 - @@ -1004,6 +1004,9 @@ { int base = PARAM1; int al, ah; +if (!base) { +raise_exception(EXCP00_DIVZ); +} al = EAX 0xff; ah = al / base; al = al % base; -- vale
Re: [Qemu-devel] [PATCH] Proposal: option for CPU selection
If you ever called qemu with -cpu ? and wonder why you get no answer: here is a small patch which changes this behaviour for all targets without CPU selection. Regards Stefan Index: vl.c === --- vl.c(Revision 629) +++ vl.c(Arbeitskopie) @@ -7040,6 +7040,8 @@ mips_cpu_list(stdout, fprintf); #elif defined(TARGET_SPARC) sparc_cpu_list(stdout, fprintf); +#else +printf(Target ignores cpu selection\n); #endif exit(1); } else { Index: linux-user/main.c === --- linux-user/main.c (Revision 616) +++ linux-user/main.c (Arbeitskopie) @@ -1747,6 +1747,8 @@ mips_cpu_list(stdout, fprintf); #elif defined(TARGET_SPARC) sparc_cpu_list(stdout, fprintf); +#else +printf(Target ignores cpu selection\n); #endif _exit(1); }
[Qemu-devel] qemu/target-arm helper.c
CVSROOT:/sources/qemu Module name:qemu Changes by: Paul Brook pbrook 07/04/29 19:06:34 Modified files: target-arm : helper.c Log message: Fix ARM fine pagetables. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/qemu/target-arm/helper.c?cvsroot=qemur1=1.12r2=1.13
[Qemu-devel] [PATCH] 3DNow! instruction set emulation
The attached patch adds the 3DNow! and extented 3DNow! instruction sets to qemu. I wrote this just according to the manuals from AMD, since I don't have an AMD processor for testing (which was actually my motivation to create this patch). Please note that (like with the SSE emulation) the rounding for the floating point operations isn't exact in every case. But the precision should be sufficient for typical applications. The CPUID is also extented by the bit for extented MMX, which is a subset of SSE and already implemented in qemu. Would be nice, if someone could test this with an old computer game, etc... I would appreciate any hints or suggestions. Regards, Jo. -- Joachim Henke http://base91.sourceforge.net/j-o/ 3dnow.diff.gz Description: GNU Zip compressed data
[Qemu-devel] qemu/target-sparc translate.c
CVSROOT:/cvsroot/qemu Module name:qemu Changes by: Blue Swirl blueswir1 07/04/29 19:49:15 Modified files: target-sparc : translate.c Log message: Fix CPU type zapped by system_reset CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/qemu/target-sparc/translate.c?cvsroot=qemur1=1.53r2=1.54
[Qemu-devel] qemu/target-sparc translate.c
CVSROOT:/cvsroot/qemu Module name:qemu Changes by: Blue Swirl blueswir1 07/04/29 19:54:32 Modified files: target-sparc : translate.c Log message: More Sparc32 CPUs CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/qemu/target-sparc/translate.c?cvsroot=qemur1=1.54r2=1.55
[Qemu-devel] SDL initialization?
This is a strange one. I just compiled and installed 4/29 snapshot of qemu (all files in /usr/local). Before compilation: $ which sdl-config /usr/local/bin/sdl-config $ ./configure $ make #make install $ ldd /usr/local/bin/qemu libSDL-1.2.so.0 = /usr/local/lib/libSDL-1.2.s0.0 (0xb7e84000) .. $ /usr/local/bin/qemu -cdrom ./image.iso -boot d -m 128 -localtime Could not initialize SDL - exiting The above procdure used to work before on this Linux box :-( -ishwar
Re: [Qemu-devel] [PATCH] 3DNow! instruction set emulation
Im sorry, but I just found that a checking should be done in a more proper way. Please additionally apply the attached patch after my 3DNow! patch. Sorry again, Jo. On 29 Apr 2007, at 21:32, Joachim Henke wrote: The attached patch adds the 3DNow! and extented 3DNow! instruction sets to qemu. -- Joachim Henke http://base91.sourceforge.net/j-o/ 3dn-corr.diff Description: Binary data
[Qemu-devel] qemu/target-mips op_template.c
CVSROOT:/sources/qemu Module name:qemu Changes by: Thiemo Seufer ths 07/04/29 21:19:03 Modified files: target-mips: op_template.c Log message: Revert last checkin. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/qemu/target-mips/op_template.c?cvsroot=qemur1=1.4r2=1.5
[Qemu-devel] qemu/target-mips exec.h mips-defs.h
CVSROOT:/sources/qemu Module name:qemu Changes by: Thiemo Seufer ths 07/04/29 21:26:37 Modified files: target-mips: exec.h mips-defs.h Log message: Kill broken host register definitions, thanks to Paul Brook and Herve Poussineau for debugging this. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/qemu/target-mips/exec.h?cvsroot=qemur1=1.23r2=1.24 http://cvs.savannah.gnu.org/viewcvs/qemu/target-mips/mips-defs.h?cvsroot=qemur1=1.13r2=1.14
[Qemu-devel] USB Multiple interface devices
Hello Currently qemu doesn't allow to use a usb device with multiple interfaces. Since I need multiple interface ( I'm trying to reverse engineering an HP printer/scanner device ), and the previous multiple interface patch is not available anymore, I've written one. It's a really dumb patch, all it does is removing the check for multiple interface and simply grabbing every interface on the device. I really don't know if it's correct but winXP see the both interface and the HP driver see the device. I can print with it from qemu ( the printer interface is N°1, the scanner is N°0 ) so it seems to work. Saddly I cannot scan, windows reboot ( BSOD ) after a few USB transfer ( maybe because windows see the device as attached on a 12Mbit/s port but the _real_ device is on 480Mbit/s so the packet are comming too fast ? ). Hope it will help someone else. Regards, Couriousous Index: qemu-0.9.0/usb-linux.c === --- qemu-0.9.0/usb-linux.c +++ qemu-0.9.0/usb-linux.c 2007-04-28 22:02:15.0 +0200 @@ -186,18 +186,13 @@ if (i + config_descr_len descr_len) goto fail; nb_interfaces = descr[i + 4]; -if (nb_interfaces != 1) { -/* NOTE: currently we grab only one interface */ -fprintf(stderr, usb_host: only one interface supported\n); -goto fail; -} #ifdef USBDEVFS_DISCONNECT /* earlier Linux 2.4 do not support that */ -{ +for(i = 0; i nb_interfaces; i++) { struct usbdevfs_ioctl ctrl; ctrl.ioctl_code = USBDEVFS_DISCONNECT; -ctrl.ifno = 0; +ctrl.ifno = i; ret = ioctl(fd, USBDEVFS_IOCTL, ctrl); if (ret 0 errno != ENODATA) { perror(USBDEVFS_DISCONNECT); @@ -206,18 +201,19 @@ } #endif -/* XXX: only grab if all interfaces are free */ -interface = 0; -ret = ioctl(fd, USBDEVFS_CLAIMINTERFACE, interface); -if (ret 0) { -if (errno == EBUSY) { -fprintf(stderr, usb_host: device already grabbed\n); -} else { -perror(USBDEVFS_CLAIMINTERFACE); -} -fail: -close(fd); -return NULL; +/* XXX: Grab every interfaces */ +for(interface = 0; interface nb_interfaces; interface++) { + ret = ioctl(fd, USBDEVFS_CLAIMINTERFACE, interface); + if (ret 0) { + if (errno == EBUSY) { + fprintf(stderr, usb_host: device already grabbed\n); + } else { + perror(USBDEVFS_CLAIMINTERFACE); + } +fail: + close(fd); + return NULL; + } } ret = ioctl(fd, USBDEVFS_CONNECTINFO, ci);
[Qemu-devel] Magic Numbers for Qemu Images
/* CC´d to qemu-devel@nongnu.org: Just to have it available to Qemu-Devs who will acually have real use for it */Hi Christos,i recently added some lines to my magic file and since there might be a hole bunch of people out there pointing file(1) on qemu images it would be nice, if you include them into available file(1) releases.I would appreciate if you keep my name in there, thx. And here they are: # # Qemu Emulator Images # Lines written by Friedrich Schwittay ([EMAIL PROTECTED]) # Made by reading sources and doing trial and error on existing # qcow files 0 string QFI Qemu Image, Format: Qcow# Uncomment the following line to display Magic (only used for debugging # this magic number) #0 string x , Magic: %s# There are currently 2 Versions: 1 and 2 # I do not use Version 2 and therefor branch here # but can assure: it works (tested on both versions) # Also my Qemu 0.9.0 which uses this Version 2 refuses # to start in its bios 0x04 belong 2 , Version: 2 0x04 belong 1 , Version: 1# Using the existence of the Backing File Offset to Branch or not # to read Backing File Information 0xcbelong 0 , Backing File( Offset: %d (0xc.L) string \0 , Path: %s# Didnt got the Trick here how qemu stores the Size at this Position # There is actually something stored but nothing makes sense # The header in the sources talks about it #16 lelong x , Size: %d# Modification time of the Backing File # Really usefull if you want to know if your backing # file is still usable together with this image 20 bedate x , Mtime: %s )# Dont know how to calculate in Magicfiles # Also: this Information is not reliably # stored in image-files 24 lelong x , Disk Size could be: %d * 256 bytes ### End of Qemu-Lines #I will make some more if there is Interest in it For me it just makes it possible to check where i have to put the corresponding Backing File when the location has changed because tool qemu-img info refuses to show this information if the backing file is not in the right position.Best Wishes Friedrich Schwittay pgppnJwQXFzVN.pgp Description: Digitale PGP-Unterschrift binmBl1ID6SUT.bin Description: Öffentlicher PGP-Schlüssel
[Qemu-devel] qemu vl.c vl.h hw/pxa.h hw/pxa2xx.c hw/pxa2xx_l...
CVSROOT:/sources/qemu Module name:qemu Changes by: Andrzej Zaborowski balrog 07/04/30 01:48:07 Modified files: . : vl.c vl.h hw : pxa.h pxa2xx.c Added files: hw : pxa2xx_lcd.c pxa2xx_mmci.c pxa2xx_pcmcia.c pxa2xx_template.h pxa2xx_timer.c Log message: Add remaining PXA2xx on-chip peripherals except I2C master. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/qemu/vl.c?cvsroot=qemur1=1.288r2=1.289 http://cvs.savannah.gnu.org/viewcvs/qemu/vl.h?cvsroot=qemur1=1.224r2=1.225 http://cvs.savannah.gnu.org/viewcvs/qemu/hw/pxa.h?cvsroot=qemur1=1.1r2=1.2 http://cvs.savannah.gnu.org/viewcvs/qemu/hw/pxa2xx.c?cvsroot=qemur1=1.1r2=1.2 http://cvs.savannah.gnu.org/viewcvs/qemu/hw/pxa2xx_lcd.c?cvsroot=qemurev=1.1 http://cvs.savannah.gnu.org/viewcvs/qemu/hw/pxa2xx_mmci.c?cvsroot=qemurev=1.1 http://cvs.savannah.gnu.org/viewcvs/qemu/hw/pxa2xx_pcmcia.c?cvsroot=qemurev=1.1 http://cvs.savannah.gnu.org/viewcvs/qemu/hw/pxa2xx_template.h?cvsroot=qemurev=1.1 http://cvs.savannah.gnu.org/viewcvs/qemu/hw/pxa2xx_timer.c?cvsroot=qemurev=1.1
[Qemu-devel] qemu vl.c vl.h ecc.h hw/nand.c
CVSROOT:/sources/qemu Module name:qemu Changes by: Andrzej Zaborowski balrog 07/04/30 02:09:25 Modified files: . : vl.c vl.h Added files: . : ecc.h hw : nand.c Log message: NAND Flash memory emulation and ECC calculation helpers for use by NAND controllers. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/qemu/vl.c?cvsroot=qemur1=1.289r2=1.290 http://cvs.savannah.gnu.org/viewcvs/qemu/vl.h?cvsroot=qemur1=1.225r2=1.226 http://cvs.savannah.gnu.org/viewcvs/qemu/ecc.h?cvsroot=qemurev=1.1 http://cvs.savannah.gnu.org/viewcvs/qemu/hw/nand.c?cvsroot=qemurev=1.1
[Qemu-devel] qemu vl.h hw/ads7846.c
CVSROOT:/sources/qemu Module name:qemu Changes by: Andrzej Zaborowski balrog 07/04/30 02:12:42 Modified files: . : vl.h Added files: hw : ads7846.c Log message: Texas Instruments ADS7846 ADC chip. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/qemu/vl.h?cvsroot=qemur1=1.226r2=1.227 http://cvs.savannah.gnu.org/viewcvs/qemu/hw/ads7846.c?cvsroot=qemurev=1.1
[Qemu-devel] qemu vl.h hw/max111x.c
CVSROOT:/sources/qemu Module name:qemu Changes by: Andrzej Zaborowski balrog 07/04/30 02:14:00 Modified files: . : vl.h Added files: hw : max111x.c Log message: Maxim MAX1110/ ADC chip. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/qemu/vl.h?cvsroot=qemur1=1.227r2=1.228 http://cvs.savannah.gnu.org/viewcvs/qemu/hw/max111x.c?cvsroot=qemurev=1.1
[Qemu-devel] qemu Makefile.target qemu-doc.texi vl.c vl.h hw...
CVSROOT:/sources/qemu Module name:qemu Changes by: Andrzej Zaborowski balrog 07/04/30 02:22:06 Modified files: . : Makefile.target qemu-doc.texi vl.c vl.h Added files: hw : spitz.c Log message: Spitz PDA, example PXA270 machine (four similar models). CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/qemu/Makefile.target?cvsroot=qemur1=1.165r2=1.166 http://cvs.savannah.gnu.org/viewcvs/qemu/qemu-doc.texi?cvsroot=qemur1=1.138r2=1.139 http://cvs.savannah.gnu.org/viewcvs/qemu/vl.c?cvsroot=qemur1=1.290r2=1.291 http://cvs.savannah.gnu.org/viewcvs/qemu/vl.h?cvsroot=qemur1=1.228r2=1.229 http://cvs.savannah.gnu.org/viewcvs/qemu/hw/spitz.c?cvsroot=qemurev=1.1
[Qemu-devel] qemu vl.h hw/arm_boot.c hw/integratorcp.c hw/re...
CVSROOT:/sources/qemu Module name:qemu Changes by: Andrzej Zaborowski balrog 07/04/30 02:24:42 Modified files: . : vl.h hw : arm_boot.c integratorcp.c realview.c spitz.c versatilepb.c target-arm : cpu.h Log message: Account for machine with RAM which is not mapped at 0x0 in arm_boot.c. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/qemu/vl.h?cvsroot=qemur1=1.229r2=1.230 http://cvs.savannah.gnu.org/viewcvs/qemu/hw/arm_boot.c?cvsroot=qemur1=1.6r2=1.7 http://cvs.savannah.gnu.org/viewcvs/qemu/hw/integratorcp.c?cvsroot=qemur1=1.15r2=1.16 http://cvs.savannah.gnu.org/viewcvs/qemu/hw/realview.c?cvsroot=qemur1=1.8r2=1.9 http://cvs.savannah.gnu.org/viewcvs/qemu/hw/spitz.c?cvsroot=qemur1=1.1r2=1.2 http://cvs.savannah.gnu.org/viewcvs/qemu/hw/versatilepb.c?cvsroot=qemur1=1.13r2=1.14 http://cvs.savannah.gnu.org/viewcvs/qemu/target-arm/cpu.h?cvsroot=qemur1=1.24r2=1.25
[Qemu-devel] qemu vl.h
CVSROOT:/sources/qemu Module name:qemu Changes by: Andrzej Zaborowski balrog 07/04/30 02:33:10 Modified files: . : vl.h Log message: Add missing gpio_handler_t definition. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/qemu/vl.h?cvsroot=qemur1=1.230r2=1.231