diff options
Diffstat (limited to 'emulators')
26 files changed, 514 insertions, 952 deletions
diff --git a/emulators/qemu-devel/Makefile b/emulators/qemu-devel/Makefile index f0ef516..74c33f2 100644 --- a/emulators/qemu-devel/Makefile +++ b/emulators/qemu-devel/Makefile @@ -6,8 +6,8 @@ # PORTNAME= qemu -PORTVERSION= 0.8.0 -PORTREVISION= 5 +PORTVERSION= 0.8.0s.20060408 +PORTREVISION= 0 CATEGORIES= emulators MASTER_SITES= http://www.qemu.org/:release \ http://people.fruitsalad.org/nox/qemu/:snapshot \ @@ -15,10 +15,8 @@ MASTER_SITES= http://www.qemu.org/:release \ http://qemu.dad-answers.com/download/qemu/:snapshot \ http://people.brandeis.edu/~jcoiner/qemu_idedma/:idedma \ http://people.freebsd.org/~maho/qemu/:misc -DISTFILES= ${DISTNAME}${EXTRACT_SUFX}:release -.if defined (WITH_HACKS_IDEDMA) || defined (WITH_HACKS) -DISTFILES+= qemu_dma_patch.tar.gz:idedma -.endif +DISTNAME= ${PORTNAME}-snapshot-2006-04-08_23 +DISTFILES= ${DISTNAME}${EXTRACT_SUFX}:snapshot .if defined (WITH_HACKS_CIRRUS) || defined (WITH_HACKS) DISTFILES+= patch3_cirrus:misc .endif @@ -33,10 +31,11 @@ BUILD_DEPENDS+= texi2html:${PORTSDIR}/textproc/texi2html RUN_DEPENDS+= ${LOCALBASE}/sbin/smbd:${PORTSDIR}/net/samba .endif .if defined(WITH_KQEMU) -BUILD_DEPENDS+= ${LOCALBASE}/include/kqemu/kqemu.h:${PORTSDIR}/emulators/kqemu-kmod +BUILD_DEPENDS+= kqemu-kmod>=1.3.0pre5:${PORTSDIR}/emulators/kqemu-kmod .endif HAS_CONFIGURE= yes +USE_BZIP2= yes USE_GMAKE= yes USE_GETOPT_LONG= yes USE_SDL= sdl @@ -64,11 +63,9 @@ pre-everything:: @${ECHO_MSG} "Notice: you can build qemu with the (alpha!) kqemu accelerator kernel module" @${ECHO_MSG} "by defining WITH_KQEMU." .endif -.if !defined(WITH_HACKS_IDEDMA) && !defined(WITH_HACKS_CIRRUS) && !defined(WITH_HACKS) +.if !defined(WITH_HACKS_CIRRUS) && !defined(WITH_HACKS) @${ECHO_MSG} "You can build qemu with some hacks (esp. for speedup)" @${ECHO_MSG} "by defining WITH_HACKS, or specifically:" - @${ECHO_MSG} "1. WITH_HACKS_IDEDMA: IDE Bus-master DMA Support by John Coiner" - @${ECHO_MSG} "http://people.brandeis.edu/~jcoiner/qemu_idedma/qemu_dma_patch.html" @${ECHO_MSG} "2. WITH_HACKS_CIRRUS: higher speed on large display (cirrus_vga)" @${ECHO_MSG} "by Juergen Pfennig" @${ECHO_MSG} "http://lists.gnu.org/archive/html/qemu-devel/2006-01/msg00208.html" @@ -92,9 +89,6 @@ pre-patch: done post-patch: -.if defined(WITH_HACKS_IDEDMA) || defined (WITH_HACKS) - @cd ${WRKDIR} ; ${TAR} xfz ${DISTDIR}/${DIST_SUBDIR}/qemu_dma_patch.tar.gz ; ${CP} new_qemu_dma_patch/bios.bin ${WRKSRC}/pc-bios; cd ${WRKSRC}; ${PATCH} --quiet -p1 < ../new_qemu_dma_patch/qemu-piix4-udma.patch -.endif .if defined(WITH_HACKS_CIRRUS) || defined (WITH_HACKS) @cd ${WRKSRC} ; ${PATCH} --quiet < ${DISTDIR}/${DIST_SUBDIR}/patch3_cirrus .endif diff --git a/emulators/qemu-devel/distinfo b/emulators/qemu-devel/distinfo index 2875a22..805f63e 100644 --- a/emulators/qemu-devel/distinfo +++ b/emulators/qemu-devel/distinfo @@ -1,9 +1,6 @@ -MD5 (qemu/qemu-0.8.0.tar.gz) = eb175b26583280706fe7e4d8910d320d -SHA256 (qemu/qemu-0.8.0.tar.gz) = de388539ce86971a2cbe8474fca8b6160898c95772e3e6e08a7794d48db32a61 -SIZE (qemu/qemu-0.8.0.tar.gz) = 1497965 -MD5 (qemu/qemu_dma_patch.tar.gz) = 5e339dc201d411af56bad684d3f89338 -SHA256 (qemu/qemu_dma_patch.tar.gz) = cdf74bf5e079d835e100f116d940686b13ec2b7ed6aee5a6a97a4441ea5f2b8f -SIZE (qemu/qemu_dma_patch.tar.gz) = 25837 +MD5 (qemu/qemu-snapshot-2006-04-08_23.tar.bz2) = 74fd8046d94d5d800f1df35282dba733 +SHA256 (qemu/qemu-snapshot-2006-04-08_23.tar.bz2) = 5cdcab83fa0fa6188c846f2d9c96d019300f6c7742d2ecf3cceae0a014fd6318 +SIZE (qemu/qemu-snapshot-2006-04-08_23.tar.bz2) = 1288264 MD5 (qemu/patch3_cirrus) = ebe7ed9fce804c49e024bc93bfdfc810 SHA256 (qemu/patch3_cirrus) = e862371834b7d895a896fbdb84fd9f70d17b5729a6f6789a48a61504fc941e11 SIZE (qemu/patch3_cirrus) = 8817 diff --git a/emulators/qemu-devel/files/patch-bsdusb.patch b/emulators/qemu-devel/files/patch-bsdusb.patch index 9a90b93..9fd4eba 100644 --- a/emulators/qemu-devel/files/patch-bsdusb.patch +++ b/emulators/qemu-devel/files/patch-bsdusb.patch @@ -1,8 +1,9 @@ Index: qemu/configure -@@ -122,6 +122,7 @@ +@@ -122,7 +122,8 @@ *) oss="yes" linux="yes" + user="yes" +usb="linux" if [ "$cpu" = "i386" -o "$cpu" = "x86_64" ] ; then kqemu="yes" diff --git a/emulators/qemu-devel/files/patch-dyngen.h b/emulators/qemu-devel/files/patch-dyngen.h deleted file mode 100644 index 09ab311..0000000 --- a/emulators/qemu-devel/files/patch-dyngen.h +++ /dev/null @@ -1,11 +0,0 @@ -# 1.9 -Index: qemu/dyngen.h -@@ -59,7 +59,7 @@ - { - unsigned long p; - -- p = start & ~(MIN_CACHE_LINE_SIZE - 1); -+ start &= ~(MIN_CACHE_LINE_SIZE - 1); - stop = (stop + MIN_CACHE_LINE_SIZE - 1) & ~(MIN_CACHE_LINE_SIZE - 1); - - for (p = start; p < stop; p += MIN_CACHE_LINE_SIZE) { diff --git a/emulators/qemu-devel/files/patch-fbsd b/emulators/qemu-devel/files/patch-fbsd index abb69f4..a8667ae 100644 --- a/emulators/qemu-devel/files/patch-fbsd +++ b/emulators/qemu-devel/files/patch-fbsd @@ -1,5 +1,5 @@ Index: qemu/Makefile -@@ -13,7 +13,7 @@ +@@ -13,11 +13,14 @@ endif DOCS=qemu-doc.html qemu-tech.html qemu.1 qemu-img.1 @@ -8,14 +8,6 @@ Index: qemu/Makefile for d in $(TARGET_DIRS); do \ $(MAKE) -C $$d $@ || exit 1 ; \ done -@@ -21,10 +21,13 @@ - ifdef CONFIG_WIN32 - $(MAKE) -C kqemu -f Makefile.winnt - else -- $(MAKE) -C kqemu -+ ( cd kqemu && $(BSD_MAKE) -f Makefile.freebsd ) - endif - endif +bsd/libmath.a: + ( cd bsd ; $(BSD_MAKE) CC=$(CC) ) @@ -23,7 +15,7 @@ Index: qemu/Makefile qemu-img$(EXESUF): qemu-img.c block.c block-cow.c block-qcow.c aes.c block-vmdk.c block-cloop.c block-dmg.c block-bochs.c block-vpc.c block-vvfat.c $(CC) -DQEMU_TOOL $(CFLAGS) $(LDFLAGS) $(DEFINES) -o $@ $^ -lz $(LIBS) -@@ -33,6 +36,7 @@ +@@ -26,6 +29,7 @@ clean: # avoid old build problems by removing potentially incorrect old files @@ -31,25 +23,6 @@ Index: qemu/Makefile rm -f config.mak config.h op-i386.h opc-i386.h gen-op-i386.h op-arm.h opc-arm.h gen-op-arm.h rm -f *.o *.a $(TOOLS) dyngen$(EXESUF) TAGS *.pod *~ */*~ $(MAKE) -C tests clean -@@ -40,7 +44,7 @@ - $(MAKE) -C $$d $@ || exit 1 ; \ - done - ifdef CONFIG_KQEMU -- $(MAKE) -C kqemu clean -+ cd kqemu && $(BSD_MAKE) -f Makefile.freebsd clean - endif - - distclean: clean -@@ -73,9 +77,6 @@ - for d in $(TARGET_DIRS); do \ - $(MAKE) -C $$d $@ || exit 1 ; \ - done --ifdef CONFIG_KQEMU -- cd kqemu ; ./install.sh --endif - - # various test targets - test speed test2: all Index: qemu/Makefile.target @@ -391,8 +391,8 @@ VL_LDFLAGS+=-Wl,-G0 -Wl,-T,$(SRC_PATH)/ia64.ld diff --git a/emulators/qemu-devel/files/patch-hw-ne2000.c b/emulators/qemu-devel/files/patch-hw-ne2000.c deleted file mode 100644 index eec4a3f..0000000 --- a/emulators/qemu-devel/files/patch-hw-ne2000.c +++ /dev/null @@ -1,44 +0,0 @@ -# 1.19 -Index: qemu/hw/ne2000.c -@@ -648,6 +648,8 @@ - { - NE2000State* s=(NE2000State*)opaque; - -+ qemu_put_8s(f, &s->rxcr); -+ - qemu_put_8s(f, &s->cmd); - qemu_put_be32s(f, &s->start); - qemu_put_be32s(f, &s->stop); -@@ -672,8 +674,13 @@ - { - NE2000State* s=(NE2000State*)opaque; - -- if (version_id != 1) -+ if (version_id == 2) { -+ qemu_get_8s(f, &s->rxcr); -+ } else if (version_id == 1) { -+ s->rxcr = 0x0c; -+ } else { - return -EINVAL; -+ } - - qemu_get_8s(f, &s->cmd); - qemu_get_be32s(f, &s->start); -@@ -732,7 +739,7 @@ - s->macaddr[4], - s->macaddr[5]); - -- register_savevm("ne2000", 0, 1, ne2000_save, ne2000_load, s); -+ register_savevm("ne2000", 0, 2, ne2000_save, ne2000_load, s); - } - - /***********************************************************/ -@@ -803,7 +810,7 @@ - s->macaddr[5]); - - /* XXX: instance number ? */ -- register_savevm("ne2000", 0, 1, ne2000_save, ne2000_load, s); -+ register_savevm("ne2000", 0, 2, ne2000_save, ne2000_load, s); - register_savevm("ne2000_pci", 0, 1, generic_pci_save, generic_pci_load, - &d->dev); - } diff --git a/emulators/qemu-devel/files/patch-hw-usb-uhci.c b/emulators/qemu-devel/files/patch-hw-usb-uhci.c deleted file mode 100644 index c5f3c36..0000000 --- a/emulators/qemu-devel/files/patch-hw-usb-uhci.c +++ /dev/null @@ -1,28 +0,0 @@ -# 1.6 -Index: qemu/hw/usb-uhci.c -@@ -153,6 +153,7 @@ - switch(addr) { - case 0x0c: - val = s->sof_timing; -+ break; - default: - val = 0xff; - break; -@@ -654,6 +655,7 @@ - pci_conf[0x0b] = 0x0c; - pci_conf[0x0e] = 0x00; // header_type - pci_conf[0x3d] = 4; // interrupt pin 3 -+ pci_conf[0x60] = 0x10; // release number - - for(i = 0; i < NB_PORTS; i++) { - port = &s->ports[i]; -@@ -666,6 +668,8 @@ - - uhci_reset(s); - -- pci_register_io_region(&s->dev, 0, 0x20, -+ /* Use region 4 for consistency with real hardware. BSD guests seem -+ to rely on this. */ -+ pci_register_io_region(&s->dev, 4, 0x20, - PCI_ADDRESS_SPACE_IO, uhci_map); - } diff --git a/emulators/qemu-devel/files/patch-hw-usb.c b/emulators/qemu-devel/files/patch-hw-usb.c deleted file mode 100644 index 50f6fc8..0000000 --- a/emulators/qemu-devel/files/patch-hw-usb.c +++ /dev/null @@ -1,11 +0,0 @@ -# 1.4 -Index: qemu/hw/usb.c -@@ -183,7 +183,7 @@ - - q = buf; - len = strlen(str); -- *q++ = 2 * len + 1; -+ *q++ = 2 * len + 2; - *q++ = 3; - for(i = 0; i < len; i++) { - *q++ = str[i]; diff --git a/emulators/qemu-devel/files/patch-malc-17h_aqemu b/emulators/qemu-devel/files/patch-malc-17h_aqemu new file mode 100644 index 0000000..6c5a033 --- /dev/null +++ b/emulators/qemu-devel/files/patch-malc-17h_aqemu @@ -0,0 +1,243 @@ +Index: qemu/audio/alsaaudio.c +=================================================================== +RCS file: /home/malc/cvsroot/bellard/qemu/audio/alsaaudio.c,v +retrieving revision 1.1.1.4 +retrieving revision 1.1.1.1.2.8 +diff -u -r1.1.1.4 -r1.1.1.1.2.8 +--- audio/alsaaudio.c 21 Nov 2005 12:47:06 -0000 1.1.1.4 ++++ audio/alsaaudio.c 7 Apr 2006 22:05:21 -0000 1.1.1.1.2.8 +@@ -61,8 +61,8 @@ + .size_in_usec_in = 1, + .size_in_usec_out = 1, + #endif +- .pcm_name_out = "hw:0,0", +- .pcm_name_in = "hw:0,0", ++ .pcm_name_out = "default", ++ .pcm_name_in = "default", + #ifdef HIGH_LATENCY + .buffer_size_in = 400000, + .period_size_in = 400000 / 4, +Index: qemu/audio/audio.h +=================================================================== +RCS file: /home/malc/cvsroot/bellard/qemu/audio/audio.h,v +retrieving revision 1.1.1.3 +retrieving revision 1.1.1.1.2.5 +diff -u -r1.1.1.3 -r1.1.1.1.2.5 +--- audio/audio.h 21 Nov 2005 12:47:06 -0000 1.1.1.3 ++++ audio/audio.h 7 Apr 2006 22:05:21 -0000 1.1.1.1.2.5 +@@ -111,7 +111,7 @@ + } + + uint32_t popcount (uint32_t u); +-inline uint32_t lsbindex (uint32_t u); ++uint32_t lsbindex (uint32_t u); + + #ifdef __GNUC__ + #define audio_MIN(a, b) ( __extension__ ({ \ +Index: qemu/audio/dsound_template.h +=================================================================== +RCS file: /home/malc/cvsroot/bellard/qemu/audio/dsound_template.h,v +retrieving revision 1.1.1.2 +retrieving revision 1.1.1.1.2.2 +diff -u -r1.1.1.2 -r1.1.1.1.2.2 +--- audio/dsound_template.h 5 Nov 2005 20:42:14 -0000 1.1.1.2 ++++ audio/dsound_template.h 7 Apr 2006 22:05:21 -0000 1.1.1.1.2.2 +@@ -70,7 +70,13 @@ + int i; + LPVOID p1 = NULL, p2 = NULL; + DWORD blen1 = 0, blen2 = 0; ++ DWORD flag; + ++#ifdef DSBTYPE_IN ++ flag = entire ? DSCBLOCK_ENTIREBUFFER : 0; ++#else ++ flag = entire ? DSBLOCK_ENTIREBUFFER : 0; ++#endif + for (i = 0; i < conf.lock_retries; ++i) { + hr = glue (IFACE, _Lock) ( + buf, +@@ -80,13 +86,7 @@ + &blen1, + &p2, + &blen2, +- (entire +-#ifdef DSBTYPE_IN +- ? DSCBLOCK_ENTIREBUFFER +-#else +- ? DSBLOCK_ENTIREBUFFER +-#endif +- : 0) ++ flag + ); + + if (FAILED (hr)) { +Index: qemu/audio/dsoundaudio.c +=================================================================== +RCS file: /home/malc/cvsroot/bellard/qemu/audio/dsoundaudio.c,v +retrieving revision 1.1.1.2 +retrieving revision 1.1.1.1.2.2 +diff -u -r1.1.1.2 -r1.1.1.1.2.2 +--- audio/dsoundaudio.c 5 Nov 2005 20:42:14 -0000 1.1.1.2 ++++ audio/dsoundaudio.c 7 Apr 2006 22:05:21 -0000 1.1.1.1.2.2 +@@ -987,6 +987,12 @@ + hr = IDirectSound_Initialize (s->dsound, NULL); + if (FAILED (hr)) { + dsound_logerr (hr, "Could not initialize DirectSound\n"); ++ ++ hr = IDirectSound_Release (s->dsound); ++ if (FAILED (hr)) { ++ dsound_logerr (hr, "Could not release DirectSound\n"); ++ } ++ s->dsound = NULL; + return NULL; + } + +Index: qemu/audio/ossaudio.c +=================================================================== +RCS file: /home/malc/cvsroot/bellard/qemu/audio/ossaudio.c,v +retrieving revision 1.1.1.4 +retrieving revision 1.1.1.1.2.5 +diff -u -r1.1.1.4 -r1.1.1.1.2.5 +--- audio/ossaudio.c 21 Nov 2005 12:47:06 -0000 1.1.1.4 ++++ audio/ossaudio.c 7 Apr 2006 22:23:42 -0000 1.1.1.1.2.5 +@@ -324,9 +324,18 @@ + return 0; + } + +- if (abinfo.bytes < 0 || abinfo.bytes > bufsize) { +- ldebug ("warning: Invalid available size, size=%d bufsize=%d\n", +- abinfo.bytes, bufsize); ++ if (abinfo.bytes > bufsize) { ++#ifndef __FreeBSD__ ++ dolog ("warning: Invalid available size, size=%d bufsize=%d\n" ++ "please report your OS/audio hw to malc@pulsesoft.com\n", ++ abinfo.bytes, bufsize); ++#endif ++ abinfo.bytes = bufsize; ++ } ++ ++ if (abinfo.bytes < 0) { ++ dolog ("warning: Invalid available size, size=%d bufsize=%d\n", ++ abinfo.bytes, bufsize); + return 0; + } + +Index: qemu/hw/es1370.c +=================================================================== +RCS file: /home/malc/cvsroot/bellard/qemu/hw/es1370.c,v +retrieving revision 1.1.1.4 +retrieving revision 1.1.1.1.2.7 +diff -u -r1.1.1.4 -r1.1.1.1.2.7 +--- hw/es1370.c 21 Nov 2005 12:47:06 -0000 1.1.1.4 ++++ hw/es1370.c 7 Apr 2006 22:05:21 -0000 1.1.1.1.2.7 +@@ -479,9 +479,10 @@ + IO_WRITE_PROTO (es1370_writeb) + { + ES1370State *s = opaque; +- addr = es1370_fixup (s, addr); + uint32_t shift, mask; + ++ addr = es1370_fixup (s, addr); ++ + switch (addr) { + case ES1370_REG_CONTROL: + case ES1370_REG_CONTROL + 1: +Index: qemu/hw/sb16.c +=================================================================== +RCS file: /home/malc/cvsroot/bellard/qemu/hw/sb16.c,v +retrieving revision 1.1.1.4 +retrieving revision 1.1.1.1.2.6 +diff -u -r1.1.1.4 -r1.1.1.1.2.6 +--- hw/sb16.c 21 Nov 2005 12:47:06 -0000 1.1.1.4 ++++ hw/sb16.c 7 Apr 2006 22:23:59 -0000 1.1.1.1.2.6 +@@ -193,6 +193,31 @@ + #define DMA8_AUTO 1 + #define DMA8_HIGH 2 + ++static void continue_dma8 (SB16State *s) ++{ ++ if (s->freq > 0) { ++ audsettings_t as; ++ ++ s->audio_free = 0; ++ ++ as.freq = s->freq; ++ as.nchannels = 1 << s->fmt_stereo; ++ as.fmt = s->fmt; ++ ++ s->voice = AUD_open_out ( ++ &s->card, ++ s->voice, ++ "sb16", ++ s, ++ SB_audio_callback, ++ &as, ++ 0 /* little endian */ ++ ); ++ } ++ ++ control (s, 1); ++} ++ + static void dma_cmd8 (SB16State *s, int mask, int dma_len) + { + s->fmt = AUD_FMT_U8; +@@ -201,7 +226,8 @@ + s->fmt_signed = 0; + s->fmt_stereo = (s->mixer_regs[0x0e] & 2) != 0; + if (-1 == s->time_const) { +- s->freq = 11025; ++ if (s->freq <= 0) ++ s->freq = 11025; + } + else { + int tmp = (256 - s->time_const); +@@ -239,27 +265,7 @@ + s->freq, s->fmt_stereo, s->fmt_signed, s->fmt_bits, + s->block_size, s->dma_auto, s->fifo, s->highspeed); + +- if (s->freq) { +- audsettings_t as; +- +- s->audio_free = 0; +- +- as.freq = s->freq; +- as.nchannels = 1 << s->fmt_stereo; +- as.fmt = s->fmt; +- +- s->voice = AUD_open_out ( +- &s->card, +- s->voice, +- "sb16", +- s, +- SB_audio_callback, +- &as, +- 0 /* little endian */ +- ); +- } +- +- control (s, 1); ++ continue_dma8 (s); + speaker (s, 1); + } + +@@ -437,7 +443,7 @@ + break; + + case 0x1c: /* Auto-Initialize DMA DAC, 8-bit */ +- control (s, 1); ++ dma_cmd8 (s, DMA8_AUTO, -1); + break; + + case 0x20: /* Direct ADC, Juice/PL */ +@@ -531,7 +537,9 @@ + break; + + case 0xd4: /* continue DMA operation. 8bit */ +- control (s, 1); ++ /* KQ6 (or maybe Sierras audblst.drv in general) resets ++ the frequency between halt/continue */ ++ continue_dma8 (s); + break; + + case 0xd5: /* halt DMA operation. 16bit */ diff --git a/emulators/qemu-devel/files/patch-sdl.c b/emulators/qemu-devel/files/patch-sdl.c deleted file mode 100644 index 2b64583..0000000 --- a/emulators/qemu-devel/files/patch-sdl.c +++ /dev/null @@ -1,29 +0,0 @@ -# 1.24 -Index: qemu/sdl.c -@@ -404,6 +404,7 @@ - mod_state = (ev->key.keysym.mod & gui_grab_code); - if (!mod_state) { - if (gui_key_modifier_pressed) { -+ gui_key_modifier_pressed = 0; - if (gui_keysym == 0) { - /* exit/enter grab if pressing Ctrl-Alt */ - if (!gui_grab) -@@ -415,7 +416,6 @@ - reset_keys(); - break; - } -- gui_key_modifier_pressed = 0; - gui_keysym = 0; - } - } -@@ -456,8 +456,8 @@ - } - break; - case SDL_ACTIVEEVENT: -- if (gui_grab && (ev->active.gain & SDL_ACTIVEEVENTMASK) == 0 && -- !gui_fullscreen_initial_grab) { -+ if (gui_grab && ev->active.state == SDL_APPINPUTFOCUS && -+ !ev->active.gain && !gui_fullscreen_initial_grab) { - sdl_grab_end(); - } - break; diff --git a/emulators/qemu-devel/files/patch-slirp-socket.c b/emulators/qemu-devel/files/patch-slirp-socket.c deleted file mode 100644 index 91b030a..0000000 --- a/emulators/qemu-devel/files/patch-slirp-socket.c +++ /dev/null @@ -1,18 +0,0 @@ -# 1.6 -Index: qemu/slirp/socket.c -@@ -573,6 +573,7 @@ - addr.sin_port = port; - - if (((s = socket(AF_INET,SOCK_STREAM,0)) < 0) || -+ (setsockopt(s,SOL_SOCKET,SO_REUSEADDR,(char *)&opt,sizeof(int)) < 0) || - (bind(s,(struct sockaddr *)&addr, sizeof(addr)) < 0) || - (listen(s,1) < 0)) { - int tmperrno = errno; /* Don't clobber the real reason we failed */ -@@ -587,7 +588,6 @@ - #endif - return NULL; - } -- setsockopt(s,SOL_SOCKET,SO_REUSEADDR,(char *)&opt,sizeof(int)); - setsockopt(s,SOL_SOCKET,SO_OOBINLINE,(char *)&opt,sizeof(int)); - - getsockname(s,(struct sockaddr *)&addr,&addrlen); diff --git a/emulators/qemu-devel/files/patch-slirp_throttle b/emulators/qemu-devel/files/patch-slirp_throttle deleted file mode 100644 index 50d8c0f..0000000 --- a/emulators/qemu-devel/files/patch-slirp_throttle +++ /dev/null @@ -1,257 +0,0 @@ -Index: qemu/vl.c -=================================================================== -RCS file: /sources/qemu/qemu/vl.c,v -retrieving revision 1.157 -diff -u -p -r1.157 vl.c ---- vl.c 18 Dec 2005 20:34:32 -0000 1.157 -+++ vl.c 20 Dec 2005 21:11:37 -0000 -@@ -1768,13 +1768,16 @@ VLANState *qemu_find_vlan(int id) - } - - VLANClientState *qemu_new_vlan_client(VLANState *vlan, -- IOReadHandler *fd_read, void *opaque) -+ IOReadHandler *fd_read, -+ IOCanRWHandler *fd_can_read, -+ void *opaque) - { - VLANClientState *vc, **pvc; - vc = qemu_mallocz(sizeof(VLANClientState)); - if (!vc) - return NULL; - vc->fd_read = fd_read; -+ vc->fd_can_read = fd_can_read; - vc->opaque = opaque; - vc->vlan = vlan; - -@@ -1786,6 +1789,20 @@ VLANClientState *qemu_new_vlan_client(VL - return vc; - } - -+int qemu_can_send_packet(VLANClientState *vc1) -+{ -+ VLANState *vlan = vc1->vlan; -+ VLANClientState *vc; -+ -+ for(vc = vlan->first_client; vc != NULL; vc = vc->next) { -+ if (vc != vc1) { -+ if (vc->fd_can_read && !vc->fd_can_read(vc->opaque)) -+ return 0; -+ } -+ } -+ return 1; -+} -+ - void qemu_send_packet(VLANClientState *vc1, const uint8_t *buf, int size) - { - VLANState *vlan = vc1->vlan; -@@ -1811,7 +1828,7 @@ static VLANClientState *slirp_vc; - - int slirp_can_output(void) - { -- return 1; -+ return qemu_can_send_packet(slirp_vc); - } - - void slirp_output(const uint8_t *pkt, int pkt_len) -@@ -1839,7 +1856,7 @@ static int net_slirp_init(VLANState *vla - slirp_init(); - } - slirp_vc = qemu_new_vlan_client(vlan, -- slirp_receive, NULL); -+ slirp_receive, NULL, NULL); - snprintf(slirp_vc->info_str, sizeof(slirp_vc->info_str), "user redirector"); - return 0; - } -@@ -2024,7 +2041,7 @@ static TAPState *net_tap_fd_init(VLANSta - if (!s) - return NULL; - s->fd = fd; -- s->vc = qemu_new_vlan_client(vlan, tap_receive, s); -+ s->vc = qemu_new_vlan_client(vlan, tap_receive, NULL, s); - qemu_set_fd_handler(s->fd, tap_send, NULL, s); - snprintf(s->vc->info_str, sizeof(s->vc->info_str), "tap: fd=%d", fd); - return s; -@@ -2327,7 +2344,7 @@ static NetSocketState *net_socket_fd_ini - return NULL; - s->fd = fd; - -- s->vc = qemu_new_vlan_client(vlan, net_socket_receive_dgram, s); -+ s->vc = qemu_new_vlan_client(vlan, net_socket_receive_dgram, NULL, s); - qemu_set_fd_handler(s->fd, net_socket_send_dgram, NULL, s); - - /* mcast: save bound address as dst */ -@@ -2355,7 +2372,7 @@ static NetSocketState *net_socket_fd_ini - return NULL; - s->fd = fd; - s->vc = qemu_new_vlan_client(vlan, -- net_socket_receive, s); -+ net_socket_receive, NULL, s); - snprintf(s->vc->info_str, sizeof(s->vc->info_str), - "socket: fd=%d", fd); - if (is_connected) { -Index: qemu/vl.h -=================================================================== -RCS file: /sources/qemu/qemu/vl.h,v -retrieving revision 1.99 -diff -u -p -r1.99 vl.h ---- vl.h 18 Dec 2005 20:34:32 -0000 1.99 -+++ vl.h 20 Dec 2005 21:11:38 -0000 -@@ -279,6 +279,9 @@ typedef struct VLANClientState VLANClien - - struct VLANClientState { - IOReadHandler *fd_read; -+ /* Packets may still be sent if this returns zero. It's used to -+ rate-limit the slirp code. */ -+ IOCanRWHandler *fd_can_read; - void *opaque; - struct VLANClientState *next; - struct VLANState *vlan; -@@ -293,8 +296,12 @@ typedef struct VLANState { - - VLANState *qemu_find_vlan(int id); - VLANClientState *qemu_new_vlan_client(VLANState *vlan, -- IOReadHandler *fd_read, void *opaque); -+ IOReadHandler *fd_read, -+ IOCanRWHandler *fd_can_read, -+ void *opaque); -+int qemu_can_send_packet(VLANClientState *vc); - void qemu_send_packet(VLANClientState *vc, const uint8_t *buf, int size); -+void qemu_handler_true(void *opaque); - - void do_info_network(void); - -Index: qemu/hw/lance.c -=================================================================== -RCS file: /sources/qemu/qemu/hw/lance.c,v -retrieving revision 1.5 -diff -u -p -r1.5 lance.c ---- hw/lance.c 15 Nov 2005 22:16:05 -0000 1.5 -+++ hw/lance.c 20 Dec 2005 21:11:38 -0000 -@@ -283,6 +283,11 @@ static CPUWriteMemoryFunc *lance_mem_wri - - #define MIN_BUF_SIZE 60 - -+static void lance_can_receive(void *opaque) -+{ -+ return 1; -+} -+ - static void lance_receive(void *opaque, const uint8_t *buf, int size) - { - LANCEState *s = opaque; -@@ -440,7 +445,7 @@ void lance_init(NICInfo *nd, int irq, ui - - lance_reset(s); - -- s->vc = qemu_new_vlan_client(nd->vlan, lance_receive, s); -+ s->vc = qemu_new_vlan_client(nd->vlan, lance_receive, lance_can_receive, s); - - snprintf(s->vc->info_str, sizeof(s->vc->info_str), - "lance macaddr=%02x:%02x:%02x:%02x:%02x:%02x", -Index: qemu/hw/ne2000.c -=================================================================== -RCS file: /sources/qemu/qemu/hw/ne2000.c,v -retrieving revision 1.17 -diff -u -p -r1.17 ne2000.c ---- hw/ne2000.c 22 Nov 2005 20:16:13 -0000 1.17 -+++ hw/ne2000.c 20 Dec 2005 21:11:38 -0000 -@@ -200,14 +200,10 @@ static int compute_mcast_idx(const uint8 - return (crc >> 26); - } - --/* return the max buffer size if the NE2000 can receive more data */ --static int ne2000_can_receive(void *opaque) -+static int ne2000_buffer_full(NE2000State *s) - { -- NE2000State *s = opaque; - int avail, index, boundary; -- -- if (s->cmd & E8390_STOP) -- return 0; -+ - index = s->curpag << 8; - boundary = s->boundary << 8; - if (index < boundary) -@@ -215,8 +211,17 @@ static int ne2000_can_receive(void *opaq - else - avail = (s->stop - s->start) - (index - boundary); - if (avail < (MAX_ETH_FRAME_SIZE + 4)) -- return 0; -- return MAX_ETH_FRAME_SIZE; -+ return 1; -+ return 0; -+} -+ -+static int ne2000_can_receive(void *opaque) -+{ -+ NE2000State *s = opaque; -+ -+ if (s->cmd & E8390_STOP) -+ return 1; -+ return !ne2000_buffer_full(s); - } - - #define MIN_BUF_SIZE 60 -@@ -234,7 +239,7 @@ static void ne2000_receive(void *opaque, - printf("NE2000: received len=%d\n", size); - #endif - -- if (!ne2000_can_receive(s)) -+ if (s->cmd & E8390_STOP || ne2000_buffer_full(s)) - return; - - /* XXX: check this */ -@@ -715,7 +720,8 @@ void isa_ne2000_init(int base, int irq, - - ne2000_reset(s); - -- s->vc = qemu_new_vlan_client(nd->vlan, ne2000_receive, s); -+ s->vc = qemu_new_vlan_client(nd->vlan, ne2000_receive, -+ ne2000_can_receive, s); - - snprintf(s->vc->info_str, sizeof(s->vc->info_str), - "ne2000 macaddr=%02x:%02x:%02x:%02x:%02x:%02x", -@@ -784,7 +790,8 @@ void pci_ne2000_init(PCIBus *bus, NICInf - s->pci_dev = (PCIDevice *)d; - memcpy(s->macaddr, nd->macaddr, 6); - ne2000_reset(s); -- s->vc = qemu_new_vlan_client(nd->vlan, ne2000_receive, s); -+ s->vc = qemu_new_vlan_client(nd->vlan, ne2000_receive, -+ ne2000_can_receive, s); - - snprintf(s->vc->info_str, sizeof(s->vc->info_str), - "ne2000 pci macaddr=%02x:%02x:%02x:%02x:%02x:%02x", -Index: qemu/hw/smc91c111.c -=================================================================== -RCS file: /sources/qemu/qemu/hw/smc91c111.c,v -retrieving revision 1.2 -diff -u -p -r1.2 smc91c111.c ---- hw/smc91c111.c 18 Dec 2005 17:39:52 -0000 1.2 -+++ hw/smc91c111.c 20 Dec 2005 21:11:38 -0000 -@@ -593,6 +593,17 @@ static uint32_t smc91c111_readl(void *op - return val; - } - -+static int smc91c111_can_receive(void *opaque) -+{ -+ smc91c111_state *s = (smc91c111_state *)opaque; -+ -+ if ((s->rcr & RCR_RXEN) == 0 || (s->rcr & RCR_SOFT_RST)) -+ return 1; -+ if (s->allocated == (1 << NUM_PACKETS) - 1) -+ return 0; -+ return 1; -+} -+ - static void smc91c111_receive(void *opaque, const uint8_t *buf, int size) - { - smc91c111_state *s = (smc91c111_state *)opaque; -@@ -697,6 +708,7 @@ void smc91c111_init(NICInfo *nd, uint32_ - - smc91c111_reset(s); - -- s->vc = qemu_new_vlan_client(nd->vlan, smc91c111_receive, s); -+ s->vc = qemu_new_vlan_client(nd->vlan, smc91c111_receive, -+ smc91c111_can_receive, s); - /* ??? Save/restore. */ - } diff --git a/emulators/qemu-devel/files/patch-target-i386-translate.c b/emulators/qemu-devel/files/patch-target-i386-translate.c deleted file mode 100644 index 5c9be22..0000000 --- a/emulators/qemu-devel/files/patch-target-i386-translate.c +++ /dev/null @@ -1,29 +0,0 @@ -# 1.53 -Index: qemu/target-i386/translate.c -@@ -5803,14 +5803,24 @@ - op = (modrm >> 3) & 7; - switch(op) { - case 0: /* fxsave */ -- if (mod == 3 || !(s->cpuid_features & CPUID_FXSR)) -+ if (mod == 3 || !(s->cpuid_features & CPUID_FXSR) || -+ (s->flags & HF_EM_MASK)) - goto illegal_op; -+ if (s->flags & HF_TS_MASK) { -+ gen_exception(s, EXCP07_PREX, pc_start - s->cs_base); -+ break; -+ } - gen_lea_modrm(s, modrm, ®_addr, &offset_addr); - gen_op_fxsave_A0((s->dflag == 2)); - break; - case 1: /* fxrstor */ -- if (mod == 3 || !(s->cpuid_features & CPUID_FXSR)) -+ if (mod == 3 || !(s->cpuid_features & CPUID_FXSR) || -+ (s->flags & HF_EM_MASK)) - goto illegal_op; -+ if (s->flags & HF_TS_MASK) { -+ gen_exception(s, EXCP07_PREX, pc_start - s->cs_base); -+ break; -+ } - gen_lea_modrm(s, modrm, ®_addr, &offset_addr); - gen_op_fxrstor_A0((s->dflag == 2)); - break; diff --git a/emulators/qemu/Makefile b/emulators/qemu/Makefile index f0ef516..74c33f2 100644 --- a/emulators/qemu/Makefile +++ b/emulators/qemu/Makefile @@ -6,8 +6,8 @@ # PORTNAME= qemu -PORTVERSION= 0.8.0 -PORTREVISION= 5 +PORTVERSION= 0.8.0s.20060408 +PORTREVISION= 0 CATEGORIES= emulators MASTER_SITES= http://www.qemu.org/:release \ http://people.fruitsalad.org/nox/qemu/:snapshot \ @@ -15,10 +15,8 @@ MASTER_SITES= http://www.qemu.org/:release \ http://qemu.dad-answers.com/download/qemu/:snapshot \ http://people.brandeis.edu/~jcoiner/qemu_idedma/:idedma \ http://people.freebsd.org/~maho/qemu/:misc -DISTFILES= ${DISTNAME}${EXTRACT_SUFX}:release -.if defined (WITH_HACKS_IDEDMA) || defined (WITH_HACKS) -DISTFILES+= qemu_dma_patch.tar.gz:idedma -.endif +DISTNAME= ${PORTNAME}-snapshot-2006-04-08_23 +DISTFILES= ${DISTNAME}${EXTRACT_SUFX}:snapshot .if defined (WITH_HACKS_CIRRUS) || defined (WITH_HACKS) DISTFILES+= patch3_cirrus:misc .endif @@ -33,10 +31,11 @@ BUILD_DEPENDS+= texi2html:${PORTSDIR}/textproc/texi2html RUN_DEPENDS+= ${LOCALBASE}/sbin/smbd:${PORTSDIR}/net/samba .endif .if defined(WITH_KQEMU) -BUILD_DEPENDS+= ${LOCALBASE}/include/kqemu/kqemu.h:${PORTSDIR}/emulators/kqemu-kmod +BUILD_DEPENDS+= kqemu-kmod>=1.3.0pre5:${PORTSDIR}/emulators/kqemu-kmod .endif HAS_CONFIGURE= yes +USE_BZIP2= yes USE_GMAKE= yes USE_GETOPT_LONG= yes USE_SDL= sdl @@ -64,11 +63,9 @@ pre-everything:: @${ECHO_MSG} "Notice: you can build qemu with the (alpha!) kqemu accelerator kernel module" @${ECHO_MSG} "by defining WITH_KQEMU." .endif -.if !defined(WITH_HACKS_IDEDMA) && !defined(WITH_HACKS_CIRRUS) && !defined(WITH_HACKS) +.if !defined(WITH_HACKS_CIRRUS) && !defined(WITH_HACKS) @${ECHO_MSG} "You can build qemu with some hacks (esp. for speedup)" @${ECHO_MSG} "by defining WITH_HACKS, or specifically:" - @${ECHO_MSG} "1. WITH_HACKS_IDEDMA: IDE Bus-master DMA Support by John Coiner" - @${ECHO_MSG} "http://people.brandeis.edu/~jcoiner/qemu_idedma/qemu_dma_patch.html" @${ECHO_MSG} "2. WITH_HACKS_CIRRUS: higher speed on large display (cirrus_vga)" @${ECHO_MSG} "by Juergen Pfennig" @${ECHO_MSG} "http://lists.gnu.org/archive/html/qemu-devel/2006-01/msg00208.html" @@ -92,9 +89,6 @@ pre-patch: done post-patch: -.if defined(WITH_HACKS_IDEDMA) || defined (WITH_HACKS) - @cd ${WRKDIR} ; ${TAR} xfz ${DISTDIR}/${DIST_SUBDIR}/qemu_dma_patch.tar.gz ; ${CP} new_qemu_dma_patch/bios.bin ${WRKSRC}/pc-bios; cd ${WRKSRC}; ${PATCH} --quiet -p1 < ../new_qemu_dma_patch/qemu-piix4-udma.patch -.endif .if defined(WITH_HACKS_CIRRUS) || defined (WITH_HACKS) @cd ${WRKSRC} ; ${PATCH} --quiet < ${DISTDIR}/${DIST_SUBDIR}/patch3_cirrus .endif diff --git a/emulators/qemu/distinfo b/emulators/qemu/distinfo index 2875a22..805f63e 100644 --- a/emulators/qemu/distinfo +++ b/emulators/qemu/distinfo @@ -1,9 +1,6 @@ -MD5 (qemu/qemu-0.8.0.tar.gz) = eb175b26583280706fe7e4d8910d320d -SHA256 (qemu/qemu-0.8.0.tar.gz) = de388539ce86971a2cbe8474fca8b6160898c95772e3e6e08a7794d48db32a61 -SIZE (qemu/qemu-0.8.0.tar.gz) = 1497965 -MD5 (qemu/qemu_dma_patch.tar.gz) = 5e339dc201d411af56bad684d3f89338 -SHA256 (qemu/qemu_dma_patch.tar.gz) = cdf74bf5e079d835e100f116d940686b13ec2b7ed6aee5a6a97a4441ea5f2b8f -SIZE (qemu/qemu_dma_patch.tar.gz) = 25837 +MD5 (qemu/qemu-snapshot-2006-04-08_23.tar.bz2) = 74fd8046d94d5d800f1df35282dba733 +SHA256 (qemu/qemu-snapshot-2006-04-08_23.tar.bz2) = 5cdcab83fa0fa6188c846f2d9c96d019300f6c7742d2ecf3cceae0a014fd6318 +SIZE (qemu/qemu-snapshot-2006-04-08_23.tar.bz2) = 1288264 MD5 (qemu/patch3_cirrus) = ebe7ed9fce804c49e024bc93bfdfc810 SHA256 (qemu/patch3_cirrus) = e862371834b7d895a896fbdb84fd9f70d17b5729a6f6789a48a61504fc941e11 SIZE (qemu/patch3_cirrus) = 8817 diff --git a/emulators/qemu/files/patch-bsdusb.patch b/emulators/qemu/files/patch-bsdusb.patch index 9a90b93..9fd4eba 100644 --- a/emulators/qemu/files/patch-bsdusb.patch +++ b/emulators/qemu/files/patch-bsdusb.patch @@ -1,8 +1,9 @@ Index: qemu/configure -@@ -122,6 +122,7 @@ +@@ -122,7 +122,8 @@ *) oss="yes" linux="yes" + user="yes" +usb="linux" if [ "$cpu" = "i386" -o "$cpu" = "x86_64" ] ; then kqemu="yes" diff --git a/emulators/qemu/files/patch-dyngen.h b/emulators/qemu/files/patch-dyngen.h deleted file mode 100644 index 09ab311..0000000 --- a/emulators/qemu/files/patch-dyngen.h +++ /dev/null @@ -1,11 +0,0 @@ -# 1.9 -Index: qemu/dyngen.h -@@ -59,7 +59,7 @@ - { - unsigned long p; - -- p = start & ~(MIN_CACHE_LINE_SIZE - 1); -+ start &= ~(MIN_CACHE_LINE_SIZE - 1); - stop = (stop + MIN_CACHE_LINE_SIZE - 1) & ~(MIN_CACHE_LINE_SIZE - 1); - - for (p = start; p < stop; p += MIN_CACHE_LINE_SIZE) { diff --git a/emulators/qemu/files/patch-fbsd b/emulators/qemu/files/patch-fbsd index abb69f4..a8667ae 100644 --- a/emulators/qemu/files/patch-fbsd +++ b/emulators/qemu/files/patch-fbsd @@ -1,5 +1,5 @@ Index: qemu/Makefile -@@ -13,7 +13,7 @@ +@@ -13,11 +13,14 @@ endif DOCS=qemu-doc.html qemu-tech.html qemu.1 qemu-img.1 @@ -8,14 +8,6 @@ Index: qemu/Makefile for d in $(TARGET_DIRS); do \ $(MAKE) -C $$d $@ || exit 1 ; \ done -@@ -21,10 +21,13 @@ - ifdef CONFIG_WIN32 - $(MAKE) -C kqemu -f Makefile.winnt - else -- $(MAKE) -C kqemu -+ ( cd kqemu && $(BSD_MAKE) -f Makefile.freebsd ) - endif - endif +bsd/libmath.a: + ( cd bsd ; $(BSD_MAKE) CC=$(CC) ) @@ -23,7 +15,7 @@ Index: qemu/Makefile qemu-img$(EXESUF): qemu-img.c block.c block-cow.c block-qcow.c aes.c block-vmdk.c block-cloop.c block-dmg.c block-bochs.c block-vpc.c block-vvfat.c $(CC) -DQEMU_TOOL $(CFLAGS) $(LDFLAGS) $(DEFINES) -o $@ $^ -lz $(LIBS) -@@ -33,6 +36,7 @@ +@@ -26,6 +29,7 @@ clean: # avoid old build problems by removing potentially incorrect old files @@ -31,25 +23,6 @@ Index: qemu/Makefile rm -f config.mak config.h op-i386.h opc-i386.h gen-op-i386.h op-arm.h opc-arm.h gen-op-arm.h rm -f *.o *.a $(TOOLS) dyngen$(EXESUF) TAGS *.pod *~ */*~ $(MAKE) -C tests clean -@@ -40,7 +44,7 @@ - $(MAKE) -C $$d $@ || exit 1 ; \ - done - ifdef CONFIG_KQEMU -- $(MAKE) -C kqemu clean -+ cd kqemu && $(BSD_MAKE) -f Makefile.freebsd clean - endif - - distclean: clean -@@ -73,9 +77,6 @@ - for d in $(TARGET_DIRS); do \ - $(MAKE) -C $$d $@ || exit 1 ; \ - done --ifdef CONFIG_KQEMU -- cd kqemu ; ./install.sh --endif - - # various test targets - test speed test2: all Index: qemu/Makefile.target @@ -391,8 +391,8 @@ VL_LDFLAGS+=-Wl,-G0 -Wl,-T,$(SRC_PATH)/ia64.ld diff --git a/emulators/qemu/files/patch-hw-ne2000.c b/emulators/qemu/files/patch-hw-ne2000.c deleted file mode 100644 index eec4a3f..0000000 --- a/emulators/qemu/files/patch-hw-ne2000.c +++ /dev/null @@ -1,44 +0,0 @@ -# 1.19 -Index: qemu/hw/ne2000.c -@@ -648,6 +648,8 @@ - { - NE2000State* s=(NE2000State*)opaque; - -+ qemu_put_8s(f, &s->rxcr); -+ - qemu_put_8s(f, &s->cmd); - qemu_put_be32s(f, &s->start); - qemu_put_be32s(f, &s->stop); -@@ -672,8 +674,13 @@ - { - NE2000State* s=(NE2000State*)opaque; - -- if (version_id != 1) -+ if (version_id == 2) { -+ qemu_get_8s(f, &s->rxcr); -+ } else if (version_id == 1) { -+ s->rxcr = 0x0c; -+ } else { - return -EINVAL; -+ } - - qemu_get_8s(f, &s->cmd); - qemu_get_be32s(f, &s->start); -@@ -732,7 +739,7 @@ - s->macaddr[4], - s->macaddr[5]); - -- register_savevm("ne2000", 0, 1, ne2000_save, ne2000_load, s); -+ register_savevm("ne2000", 0, 2, ne2000_save, ne2000_load, s); - } - - /***********************************************************/ -@@ -803,7 +810,7 @@ - s->macaddr[5]); - - /* XXX: instance number ? */ -- register_savevm("ne2000", 0, 1, ne2000_save, ne2000_load, s); -+ register_savevm("ne2000", 0, 2, ne2000_save, ne2000_load, s); - register_savevm("ne2000_pci", 0, 1, generic_pci_save, generic_pci_load, - &d->dev); - } diff --git a/emulators/qemu/files/patch-hw-usb-uhci.c b/emulators/qemu/files/patch-hw-usb-uhci.c deleted file mode 100644 index c5f3c36..0000000 --- a/emulators/qemu/files/patch-hw-usb-uhci.c +++ /dev/null @@ -1,28 +0,0 @@ -# 1.6 -Index: qemu/hw/usb-uhci.c -@@ -153,6 +153,7 @@ - switch(addr) { - case 0x0c: - val = s->sof_timing; -+ break; - default: - val = 0xff; - break; -@@ -654,6 +655,7 @@ - pci_conf[0x0b] = 0x0c; - pci_conf[0x0e] = 0x00; // header_type - pci_conf[0x3d] = 4; // interrupt pin 3 -+ pci_conf[0x60] = 0x10; // release number - - for(i = 0; i < NB_PORTS; i++) { - port = &s->ports[i]; -@@ -666,6 +668,8 @@ - - uhci_reset(s); - -- pci_register_io_region(&s->dev, 0, 0x20, -+ /* Use region 4 for consistency with real hardware. BSD guests seem -+ to rely on this. */ -+ pci_register_io_region(&s->dev, 4, 0x20, - PCI_ADDRESS_SPACE_IO, uhci_map); - } diff --git a/emulators/qemu/files/patch-hw-usb.c b/emulators/qemu/files/patch-hw-usb.c deleted file mode 100644 index 50f6fc8..0000000 --- a/emulators/qemu/files/patch-hw-usb.c +++ /dev/null @@ -1,11 +0,0 @@ -# 1.4 -Index: qemu/hw/usb.c -@@ -183,7 +183,7 @@ - - q = buf; - len = strlen(str); -- *q++ = 2 * len + 1; -+ *q++ = 2 * len + 2; - *q++ = 3; - for(i = 0; i < len; i++) { - *q++ = str[i]; diff --git a/emulators/qemu/files/patch-malc-17h_aqemu b/emulators/qemu/files/patch-malc-17h_aqemu new file mode 100644 index 0000000..6c5a033 --- /dev/null +++ b/emulators/qemu/files/patch-malc-17h_aqemu @@ -0,0 +1,243 @@ +Index: qemu/audio/alsaaudio.c +=================================================================== +RCS file: /home/malc/cvsroot/bellard/qemu/audio/alsaaudio.c,v +retrieving revision 1.1.1.4 +retrieving revision 1.1.1.1.2.8 +diff -u -r1.1.1.4 -r1.1.1.1.2.8 +--- audio/alsaaudio.c 21 Nov 2005 12:47:06 -0000 1.1.1.4 ++++ audio/alsaaudio.c 7 Apr 2006 22:05:21 -0000 1.1.1.1.2.8 +@@ -61,8 +61,8 @@ + .size_in_usec_in = 1, + .size_in_usec_out = 1, + #endif +- .pcm_name_out = "hw:0,0", +- .pcm_name_in = "hw:0,0", ++ .pcm_name_out = "default", ++ .pcm_name_in = "default", + #ifdef HIGH_LATENCY + .buffer_size_in = 400000, + .period_size_in = 400000 / 4, +Index: qemu/audio/audio.h +=================================================================== +RCS file: /home/malc/cvsroot/bellard/qemu/audio/audio.h,v +retrieving revision 1.1.1.3 +retrieving revision 1.1.1.1.2.5 +diff -u -r1.1.1.3 -r1.1.1.1.2.5 +--- audio/audio.h 21 Nov 2005 12:47:06 -0000 1.1.1.3 ++++ audio/audio.h 7 Apr 2006 22:05:21 -0000 1.1.1.1.2.5 +@@ -111,7 +111,7 @@ + } + + uint32_t popcount (uint32_t u); +-inline uint32_t lsbindex (uint32_t u); ++uint32_t lsbindex (uint32_t u); + + #ifdef __GNUC__ + #define audio_MIN(a, b) ( __extension__ ({ \ +Index: qemu/audio/dsound_template.h +=================================================================== +RCS file: /home/malc/cvsroot/bellard/qemu/audio/dsound_template.h,v +retrieving revision 1.1.1.2 +retrieving revision 1.1.1.1.2.2 +diff -u -r1.1.1.2 -r1.1.1.1.2.2 +--- audio/dsound_template.h 5 Nov 2005 20:42:14 -0000 1.1.1.2 ++++ audio/dsound_template.h 7 Apr 2006 22:05:21 -0000 1.1.1.1.2.2 +@@ -70,7 +70,13 @@ + int i; + LPVOID p1 = NULL, p2 = NULL; + DWORD blen1 = 0, blen2 = 0; ++ DWORD flag; + ++#ifdef DSBTYPE_IN ++ flag = entire ? DSCBLOCK_ENTIREBUFFER : 0; ++#else ++ flag = entire ? DSBLOCK_ENTIREBUFFER : 0; ++#endif + for (i = 0; i < conf.lock_retries; ++i) { + hr = glue (IFACE, _Lock) ( + buf, +@@ -80,13 +86,7 @@ + &blen1, + &p2, + &blen2, +- (entire +-#ifdef DSBTYPE_IN +- ? DSCBLOCK_ENTIREBUFFER +-#else +- ? DSBLOCK_ENTIREBUFFER +-#endif +- : 0) ++ flag + ); + + if (FAILED (hr)) { +Index: qemu/audio/dsoundaudio.c +=================================================================== +RCS file: /home/malc/cvsroot/bellard/qemu/audio/dsoundaudio.c,v +retrieving revision 1.1.1.2 +retrieving revision 1.1.1.1.2.2 +diff -u -r1.1.1.2 -r1.1.1.1.2.2 +--- audio/dsoundaudio.c 5 Nov 2005 20:42:14 -0000 1.1.1.2 ++++ audio/dsoundaudio.c 7 Apr 2006 22:05:21 -0000 1.1.1.1.2.2 +@@ -987,6 +987,12 @@ + hr = IDirectSound_Initialize (s->dsound, NULL); + if (FAILED (hr)) { + dsound_logerr (hr, "Could not initialize DirectSound\n"); ++ ++ hr = IDirectSound_Release (s->dsound); ++ if (FAILED (hr)) { ++ dsound_logerr (hr, "Could not release DirectSound\n"); ++ } ++ s->dsound = NULL; + return NULL; + } + +Index: qemu/audio/ossaudio.c +=================================================================== +RCS file: /home/malc/cvsroot/bellard/qemu/audio/ossaudio.c,v +retrieving revision 1.1.1.4 +retrieving revision 1.1.1.1.2.5 +diff -u -r1.1.1.4 -r1.1.1.1.2.5 +--- audio/ossaudio.c 21 Nov 2005 12:47:06 -0000 1.1.1.4 ++++ audio/ossaudio.c 7 Apr 2006 22:23:42 -0000 1.1.1.1.2.5 +@@ -324,9 +324,18 @@ + return 0; + } + +- if (abinfo.bytes < 0 || abinfo.bytes > bufsize) { +- ldebug ("warning: Invalid available size, size=%d bufsize=%d\n", +- abinfo.bytes, bufsize); ++ if (abinfo.bytes > bufsize) { ++#ifndef __FreeBSD__ ++ dolog ("warning: Invalid available size, size=%d bufsize=%d\n" ++ "please report your OS/audio hw to malc@pulsesoft.com\n", ++ abinfo.bytes, bufsize); ++#endif ++ abinfo.bytes = bufsize; ++ } ++ ++ if (abinfo.bytes < 0) { ++ dolog ("warning: Invalid available size, size=%d bufsize=%d\n", ++ abinfo.bytes, bufsize); + return 0; + } + +Index: qemu/hw/es1370.c +=================================================================== +RCS file: /home/malc/cvsroot/bellard/qemu/hw/es1370.c,v +retrieving revision 1.1.1.4 +retrieving revision 1.1.1.1.2.7 +diff -u -r1.1.1.4 -r1.1.1.1.2.7 +--- hw/es1370.c 21 Nov 2005 12:47:06 -0000 1.1.1.4 ++++ hw/es1370.c 7 Apr 2006 22:05:21 -0000 1.1.1.1.2.7 +@@ -479,9 +479,10 @@ + IO_WRITE_PROTO (es1370_writeb) + { + ES1370State *s = opaque; +- addr = es1370_fixup (s, addr); + uint32_t shift, mask; + ++ addr = es1370_fixup (s, addr); ++ + switch (addr) { + case ES1370_REG_CONTROL: + case ES1370_REG_CONTROL + 1: +Index: qemu/hw/sb16.c +=================================================================== +RCS file: /home/malc/cvsroot/bellard/qemu/hw/sb16.c,v +retrieving revision 1.1.1.4 +retrieving revision 1.1.1.1.2.6 +diff -u -r1.1.1.4 -r1.1.1.1.2.6 +--- hw/sb16.c 21 Nov 2005 12:47:06 -0000 1.1.1.4 ++++ hw/sb16.c 7 Apr 2006 22:23:59 -0000 1.1.1.1.2.6 +@@ -193,6 +193,31 @@ + #define DMA8_AUTO 1 + #define DMA8_HIGH 2 + ++static void continue_dma8 (SB16State *s) ++{ ++ if (s->freq > 0) { ++ audsettings_t as; ++ ++ s->audio_free = 0; ++ ++ as.freq = s->freq; ++ as.nchannels = 1 << s->fmt_stereo; ++ as.fmt = s->fmt; ++ ++ s->voice = AUD_open_out ( ++ &s->card, ++ s->voice, ++ "sb16", ++ s, ++ SB_audio_callback, ++ &as, ++ 0 /* little endian */ ++ ); ++ } ++ ++ control (s, 1); ++} ++ + static void dma_cmd8 (SB16State *s, int mask, int dma_len) + { + s->fmt = AUD_FMT_U8; +@@ -201,7 +226,8 @@ + s->fmt_signed = 0; + s->fmt_stereo = (s->mixer_regs[0x0e] & 2) != 0; + if (-1 == s->time_const) { +- s->freq = 11025; ++ if (s->freq <= 0) ++ s->freq = 11025; + } + else { + int tmp = (256 - s->time_const); +@@ -239,27 +265,7 @@ + s->freq, s->fmt_stereo, s->fmt_signed, s->fmt_bits, + s->block_size, s->dma_auto, s->fifo, s->highspeed); + +- if (s->freq) { +- audsettings_t as; +- +- s->audio_free = 0; +- +- as.freq = s->freq; +- as.nchannels = 1 << s->fmt_stereo; +- as.fmt = s->fmt; +- +- s->voice = AUD_open_out ( +- &s->card, +- s->voice, +- "sb16", +- s, +- SB_audio_callback, +- &as, +- 0 /* little endian */ +- ); +- } +- +- control (s, 1); ++ continue_dma8 (s); + speaker (s, 1); + } + +@@ -437,7 +443,7 @@ + break; + + case 0x1c: /* Auto-Initialize DMA DAC, 8-bit */ +- control (s, 1); ++ dma_cmd8 (s, DMA8_AUTO, -1); + break; + + case 0x20: /* Direct ADC, Juice/PL */ +@@ -531,7 +537,9 @@ + break; + + case 0xd4: /* continue DMA operation. 8bit */ +- control (s, 1); ++ /* KQ6 (or maybe Sierras audblst.drv in general) resets ++ the frequency between halt/continue */ ++ continue_dma8 (s); + break; + + case 0xd5: /* halt DMA operation. 16bit */ diff --git a/emulators/qemu/files/patch-sdl.c b/emulators/qemu/files/patch-sdl.c deleted file mode 100644 index 2b64583..0000000 --- a/emulators/qemu/files/patch-sdl.c +++ /dev/null @@ -1,29 +0,0 @@ -# 1.24 -Index: qemu/sdl.c -@@ -404,6 +404,7 @@ - mod_state = (ev->key.keysym.mod & gui_grab_code); - if (!mod_state) { - if (gui_key_modifier_pressed) { -+ gui_key_modifier_pressed = 0; - if (gui_keysym == 0) { - /* exit/enter grab if pressing Ctrl-Alt */ - if (!gui_grab) -@@ -415,7 +416,6 @@ - reset_keys(); - break; - } -- gui_key_modifier_pressed = 0; - gui_keysym = 0; - } - } -@@ -456,8 +456,8 @@ - } - break; - case SDL_ACTIVEEVENT: -- if (gui_grab && (ev->active.gain & SDL_ACTIVEEVENTMASK) == 0 && -- !gui_fullscreen_initial_grab) { -+ if (gui_grab && ev->active.state == SDL_APPINPUTFOCUS && -+ !ev->active.gain && !gui_fullscreen_initial_grab) { - sdl_grab_end(); - } - break; diff --git a/emulators/qemu/files/patch-slirp-socket.c b/emulators/qemu/files/patch-slirp-socket.c deleted file mode 100644 index 91b030a..0000000 --- a/emulators/qemu/files/patch-slirp-socket.c +++ /dev/null @@ -1,18 +0,0 @@ -# 1.6 -Index: qemu/slirp/socket.c -@@ -573,6 +573,7 @@ - addr.sin_port = port; - - if (((s = socket(AF_INET,SOCK_STREAM,0)) < 0) || -+ (setsockopt(s,SOL_SOCKET,SO_REUSEADDR,(char *)&opt,sizeof(int)) < 0) || - (bind(s,(struct sockaddr *)&addr, sizeof(addr)) < 0) || - (listen(s,1) < 0)) { - int tmperrno = errno; /* Don't clobber the real reason we failed */ -@@ -587,7 +588,6 @@ - #endif - return NULL; - } -- setsockopt(s,SOL_SOCKET,SO_REUSEADDR,(char *)&opt,sizeof(int)); - setsockopt(s,SOL_SOCKET,SO_OOBINLINE,(char *)&opt,sizeof(int)); - - getsockname(s,(struct sockaddr *)&addr,&addrlen); diff --git a/emulators/qemu/files/patch-slirp_throttle b/emulators/qemu/files/patch-slirp_throttle deleted file mode 100644 index 50d8c0f..0000000 --- a/emulators/qemu/files/patch-slirp_throttle +++ /dev/null @@ -1,257 +0,0 @@ -Index: qemu/vl.c -=================================================================== -RCS file: /sources/qemu/qemu/vl.c,v -retrieving revision 1.157 -diff -u -p -r1.157 vl.c ---- vl.c 18 Dec 2005 20:34:32 -0000 1.157 -+++ vl.c 20 Dec 2005 21:11:37 -0000 -@@ -1768,13 +1768,16 @@ VLANState *qemu_find_vlan(int id) - } - - VLANClientState *qemu_new_vlan_client(VLANState *vlan, -- IOReadHandler *fd_read, void *opaque) -+ IOReadHandler *fd_read, -+ IOCanRWHandler *fd_can_read, -+ void *opaque) - { - VLANClientState *vc, **pvc; - vc = qemu_mallocz(sizeof(VLANClientState)); - if (!vc) - return NULL; - vc->fd_read = fd_read; -+ vc->fd_can_read = fd_can_read; - vc->opaque = opaque; - vc->vlan = vlan; - -@@ -1786,6 +1789,20 @@ VLANClientState *qemu_new_vlan_client(VL - return vc; - } - -+int qemu_can_send_packet(VLANClientState *vc1) -+{ -+ VLANState *vlan = vc1->vlan; -+ VLANClientState *vc; -+ -+ for(vc = vlan->first_client; vc != NULL; vc = vc->next) { -+ if (vc != vc1) { -+ if (vc->fd_can_read && !vc->fd_can_read(vc->opaque)) -+ return 0; -+ } -+ } -+ return 1; -+} -+ - void qemu_send_packet(VLANClientState *vc1, const uint8_t *buf, int size) - { - VLANState *vlan = vc1->vlan; -@@ -1811,7 +1828,7 @@ static VLANClientState *slirp_vc; - - int slirp_can_output(void) - { -- return 1; -+ return qemu_can_send_packet(slirp_vc); - } - - void slirp_output(const uint8_t *pkt, int pkt_len) -@@ -1839,7 +1856,7 @@ static int net_slirp_init(VLANState *vla - slirp_init(); - } - slirp_vc = qemu_new_vlan_client(vlan, -- slirp_receive, NULL); -+ slirp_receive, NULL, NULL); - snprintf(slirp_vc->info_str, sizeof(slirp_vc->info_str), "user redirector"); - return 0; - } -@@ -2024,7 +2041,7 @@ static TAPState *net_tap_fd_init(VLANSta - if (!s) - return NULL; - s->fd = fd; -- s->vc = qemu_new_vlan_client(vlan, tap_receive, s); -+ s->vc = qemu_new_vlan_client(vlan, tap_receive, NULL, s); - qemu_set_fd_handler(s->fd, tap_send, NULL, s); - snprintf(s->vc->info_str, sizeof(s->vc->info_str), "tap: fd=%d", fd); - return s; -@@ -2327,7 +2344,7 @@ static NetSocketState *net_socket_fd_ini - return NULL; - s->fd = fd; - -- s->vc = qemu_new_vlan_client(vlan, net_socket_receive_dgram, s); -+ s->vc = qemu_new_vlan_client(vlan, net_socket_receive_dgram, NULL, s); - qemu_set_fd_handler(s->fd, net_socket_send_dgram, NULL, s); - - /* mcast: save bound address as dst */ -@@ -2355,7 +2372,7 @@ static NetSocketState *net_socket_fd_ini - return NULL; - s->fd = fd; - s->vc = qemu_new_vlan_client(vlan, -- net_socket_receive, s); -+ net_socket_receive, NULL, s); - snprintf(s->vc->info_str, sizeof(s->vc->info_str), - "socket: fd=%d", fd); - if (is_connected) { -Index: qemu/vl.h -=================================================================== -RCS file: /sources/qemu/qemu/vl.h,v -retrieving revision 1.99 -diff -u -p -r1.99 vl.h ---- vl.h 18 Dec 2005 20:34:32 -0000 1.99 -+++ vl.h 20 Dec 2005 21:11:38 -0000 -@@ -279,6 +279,9 @@ typedef struct VLANClientState VLANClien - - struct VLANClientState { - IOReadHandler *fd_read; -+ /* Packets may still be sent if this returns zero. It's used to -+ rate-limit the slirp code. */ -+ IOCanRWHandler *fd_can_read; - void *opaque; - struct VLANClientState *next; - struct VLANState *vlan; -@@ -293,8 +296,12 @@ typedef struct VLANState { - - VLANState *qemu_find_vlan(int id); - VLANClientState *qemu_new_vlan_client(VLANState *vlan, -- IOReadHandler *fd_read, void *opaque); -+ IOReadHandler *fd_read, -+ IOCanRWHandler *fd_can_read, -+ void *opaque); -+int qemu_can_send_packet(VLANClientState *vc); - void qemu_send_packet(VLANClientState *vc, const uint8_t *buf, int size); -+void qemu_handler_true(void *opaque); - - void do_info_network(void); - -Index: qemu/hw/lance.c -=================================================================== -RCS file: /sources/qemu/qemu/hw/lance.c,v -retrieving revision 1.5 -diff -u -p -r1.5 lance.c ---- hw/lance.c 15 Nov 2005 22:16:05 -0000 1.5 -+++ hw/lance.c 20 Dec 2005 21:11:38 -0000 -@@ -283,6 +283,11 @@ static CPUWriteMemoryFunc *lance_mem_wri - - #define MIN_BUF_SIZE 60 - -+static void lance_can_receive(void *opaque) -+{ -+ return 1; -+} -+ - static void lance_receive(void *opaque, const uint8_t *buf, int size) - { - LANCEState *s = opaque; -@@ -440,7 +445,7 @@ void lance_init(NICInfo *nd, int irq, ui - - lance_reset(s); - -- s->vc = qemu_new_vlan_client(nd->vlan, lance_receive, s); -+ s->vc = qemu_new_vlan_client(nd->vlan, lance_receive, lance_can_receive, s); - - snprintf(s->vc->info_str, sizeof(s->vc->info_str), - "lance macaddr=%02x:%02x:%02x:%02x:%02x:%02x", -Index: qemu/hw/ne2000.c -=================================================================== -RCS file: /sources/qemu/qemu/hw/ne2000.c,v -retrieving revision 1.17 -diff -u -p -r1.17 ne2000.c ---- hw/ne2000.c 22 Nov 2005 20:16:13 -0000 1.17 -+++ hw/ne2000.c 20 Dec 2005 21:11:38 -0000 -@@ -200,14 +200,10 @@ static int compute_mcast_idx(const uint8 - return (crc >> 26); - } - --/* return the max buffer size if the NE2000 can receive more data */ --static int ne2000_can_receive(void *opaque) -+static int ne2000_buffer_full(NE2000State *s) - { -- NE2000State *s = opaque; - int avail, index, boundary; -- -- if (s->cmd & E8390_STOP) -- return 0; -+ - index = s->curpag << 8; - boundary = s->boundary << 8; - if (index < boundary) -@@ -215,8 +211,17 @@ static int ne2000_can_receive(void *opaq - else - avail = (s->stop - s->start) - (index - boundary); - if (avail < (MAX_ETH_FRAME_SIZE + 4)) -- return 0; -- return MAX_ETH_FRAME_SIZE; -+ return 1; -+ return 0; -+} -+ -+static int ne2000_can_receive(void *opaque) -+{ -+ NE2000State *s = opaque; -+ -+ if (s->cmd & E8390_STOP) -+ return 1; -+ return !ne2000_buffer_full(s); - } - - #define MIN_BUF_SIZE 60 -@@ -234,7 +239,7 @@ static void ne2000_receive(void *opaque, - printf("NE2000: received len=%d\n", size); - #endif - -- if (!ne2000_can_receive(s)) -+ if (s->cmd & E8390_STOP || ne2000_buffer_full(s)) - return; - - /* XXX: check this */ -@@ -715,7 +720,8 @@ void isa_ne2000_init(int base, int irq, - - ne2000_reset(s); - -- s->vc = qemu_new_vlan_client(nd->vlan, ne2000_receive, s); -+ s->vc = qemu_new_vlan_client(nd->vlan, ne2000_receive, -+ ne2000_can_receive, s); - - snprintf(s->vc->info_str, sizeof(s->vc->info_str), - "ne2000 macaddr=%02x:%02x:%02x:%02x:%02x:%02x", -@@ -784,7 +790,8 @@ void pci_ne2000_init(PCIBus *bus, NICInf - s->pci_dev = (PCIDevice *)d; - memcpy(s->macaddr, nd->macaddr, 6); - ne2000_reset(s); -- s->vc = qemu_new_vlan_client(nd->vlan, ne2000_receive, s); -+ s->vc = qemu_new_vlan_client(nd->vlan, ne2000_receive, -+ ne2000_can_receive, s); - - snprintf(s->vc->info_str, sizeof(s->vc->info_str), - "ne2000 pci macaddr=%02x:%02x:%02x:%02x:%02x:%02x", -Index: qemu/hw/smc91c111.c -=================================================================== -RCS file: /sources/qemu/qemu/hw/smc91c111.c,v -retrieving revision 1.2 -diff -u -p -r1.2 smc91c111.c ---- hw/smc91c111.c 18 Dec 2005 17:39:52 -0000 1.2 -+++ hw/smc91c111.c 20 Dec 2005 21:11:38 -0000 -@@ -593,6 +593,17 @@ static uint32_t smc91c111_readl(void *op - return val; - } - -+static int smc91c111_can_receive(void *opaque) -+{ -+ smc91c111_state *s = (smc91c111_state *)opaque; -+ -+ if ((s->rcr & RCR_RXEN) == 0 || (s->rcr & RCR_SOFT_RST)) -+ return 1; -+ if (s->allocated == (1 << NUM_PACKETS) - 1) -+ return 0; -+ return 1; -+} -+ - static void smc91c111_receive(void *opaque, const uint8_t *buf, int size) - { - smc91c111_state *s = (smc91c111_state *)opaque; -@@ -697,6 +708,7 @@ void smc91c111_init(NICInfo *nd, uint32_ - - smc91c111_reset(s); - -- s->vc = qemu_new_vlan_client(nd->vlan, smc91c111_receive, s); -+ s->vc = qemu_new_vlan_client(nd->vlan, smc91c111_receive, -+ smc91c111_can_receive, s); - /* ??? Save/restore. */ - } diff --git a/emulators/qemu/files/patch-target-i386-translate.c b/emulators/qemu/files/patch-target-i386-translate.c deleted file mode 100644 index 5c9be22..0000000 --- a/emulators/qemu/files/patch-target-i386-translate.c +++ /dev/null @@ -1,29 +0,0 @@ -# 1.53 -Index: qemu/target-i386/translate.c -@@ -5803,14 +5803,24 @@ - op = (modrm >> 3) & 7; - switch(op) { - case 0: /* fxsave */ -- if (mod == 3 || !(s->cpuid_features & CPUID_FXSR)) -+ if (mod == 3 || !(s->cpuid_features & CPUID_FXSR) || -+ (s->flags & HF_EM_MASK)) - goto illegal_op; -+ if (s->flags & HF_TS_MASK) { -+ gen_exception(s, EXCP07_PREX, pc_start - s->cs_base); -+ break; -+ } - gen_lea_modrm(s, modrm, ®_addr, &offset_addr); - gen_op_fxsave_A0((s->dflag == 2)); - break; - case 1: /* fxrstor */ -- if (mod == 3 || !(s->cpuid_features & CPUID_FXSR)) -+ if (mod == 3 || !(s->cpuid_features & CPUID_FXSR) || -+ (s->flags & HF_EM_MASK)) - goto illegal_op; -+ if (s->flags & HF_TS_MASK) { -+ gen_exception(s, EXCP07_PREX, pc_start - s->cs_base); -+ break; -+ } - gen_lea_modrm(s, modrm, ®_addr, &offset_addr); - gen_op_fxrstor_A0((s->dflag == 2)); - break; |