? work Index: Makefile =================================================================== RCS file: /cvsroot/pkgsrc/emulators/qemu/Makefile,v retrieving revision 1.79 diff -u -p -r1.79 Makefile --- Makefile 5 Apr 2011 08:38:00 -0000 1.79 +++ Makefile 5 Jun 2011 00:13:17 -0000 @@ -1,6 +1,6 @@ # $NetBSD: Makefile,v 1.79 2011/04/05 08:38:00 wiz Exp $ -DISTNAME= qemu-0.13.0 +DISTNAME= qemu-0.14.1 PKGREVISION= 1 CATEGORIES= emulators MASTER_SITES= http://download.savannah.gnu.org/releases/qemu/ @@ -49,6 +49,7 @@ SUBST_FILES.qaudio= arch_init.c monitor. hw/cs4231a.c \ hw/es1370.c \ hw/gus.c \ + hw/hda-audio.c \ hw/marvell_88w8618_audio.c \ hw/mips_fulong2e.c \ hw/mips_jazz.c \ Index: PLIST =================================================================== RCS file: /cvsroot/pkgsrc/emulators/qemu/PLIST,v retrieving revision 1.24 diff -u -p -r1.24 PLIST --- PLIST 9 Nov 2010 10:37:12 -0000 1.24 +++ PLIST 5 Jun 2011 00:13:17 -0000 @@ -1,25 +1,11 @@ -@comment $NetBSD: PLIST,v 1.24 2010/11/09 10:37:12 jmmv Exp $ +@comment $NetBSD$ bin/qemu -${PLIST.alpha}bin/qemu-alpha -${PLIST.arm}bin/qemu-arm -${PLIST.armeb}bin/qemu-armeb -${PLIST.cris}bin/qemu-cris -${PLIST.i386}bin/qemu-i386 +bin/qemu-${MACHINE_ARCH} bin/qemu-img bin/qemu-io -${PLIST.m68k}bin/qemu-m68k -${PLIST.microblaze}bin/qemu-microblaze -${PLIST.mips}bin/qemu-mips -${PLIST.mipsel}bin/qemu-mipsel -${PLIST.nbd}bin/qemu-nbd -${PLIST.ppc}bin/qemu-ppc -${PLIST.ppc64}bin/qemu-ppc64 -${PLIST.ppc64abi32}bin/qemu-ppc64abi32 -${PLIST.sh4}bin/qemu-sh4 -${PLIST.sh4eb}bin/qemu-sh4eb -${PLIST.sparc}bin/qemu-sparc -${PLIST.sparc32plus}bin/qemu-sparc32plus -${PLIST.sparc64}bin/qemu-sparc64 +bin/qemu-nbd +bin/qemu-sparc +bin/qemu-sparc64 bin/qemu-system-arm bin/qemu-system-cris bin/qemu-system-m68k @@ -36,18 +22,17 @@ bin/qemu-system-sh4eb bin/qemu-system-sparc bin/qemu-system-sparc64 bin/qemu-system-x86_64 -${PLIST.x86_64}bin/qemu-x86_64 +bin/qemu-x86_64 man/man1/qemu-img.1 man/man1/qemu.1 man/man8/qemu-nbd.8 -share/doc/qemu/Makefile.multinode-NetBSD +share/doc/qemu/Makefile.multinode-${OPSYS} share/doc/qemu/qemu-doc.html share/doc/qemu/qemu-tech.html share/examples/qemu/target-x86_64.conf share/qemu/bamboo.dtb share/qemu/bios.bin share/qemu/gpxe-eepro100-80861209.rom -share/qemu/gpxe-eepro100-80861229.rom share/qemu/keymaps/ar share/qemu/keymaps/common share/qemu/keymaps/da @@ -97,5 +82,7 @@ share/qemu/pxe-rtl8139.bin share/qemu/pxe-virtio.bin share/qemu/s390-zipl.rom share/qemu/vgabios-cirrus.bin +share/qemu/vgabios-qxl.bin +share/qemu/vgabios-stdvga.bin +share/qemu/vgabios-vmware.bin share/qemu/vgabios.bin -share/qemu/video.x Index: distinfo =================================================================== RCS file: /cvsroot/pkgsrc/emulators/qemu/distinfo,v retrieving revision 1.65 diff -u -p -r1.65 distinfo --- distinfo 3 Apr 2011 09:56:39 -0000 1.65 +++ distinfo 5 Jun 2011 00:13:17 -0000 @@ -1,28 +1,20 @@ $NetBSD: distinfo,v 1.65 2011/04/03 09:56:39 shattered Exp $ -SHA1 (qemu-0.13.0.tar.gz) = 250bba1fdb505a787c48331b6b02f54282edfc76 -RMD160 (qemu-0.13.0.tar.gz) = 4a6faaf38d5616fb7bedc1a6408de1dbb3ec360c -Size (qemu-0.13.0.tar.gz) = 5184531 bytes -SHA1 (patch-aa) = bc2f9ea4bd468b1c8bd5623b21ea7631fe5466c3 +SHA1 (qemu-0.14.1.tar.gz) = 1a5003a03004b62b52562d1cbb8f50c5f135e0b8 +RMD160 (qemu-0.14.1.tar.gz) = 0601ff4e613fea0a6ce80907e2bfa11704048b36 +Size (qemu-0.14.1.tar.gz) = 5439697 bytes +SHA1 (patch-aa) = bfa4c5c0130c284e87d040a2d64b6d26cd509243 SHA1 (patch-ao) = e515093b6ea99f9cba665de022fd62f3be911569 SHA1 (patch-ba) = 217eb00a0cabd460981026a275d18b6c02914a1c -SHA1 (patch-bb) = 5d3d034a9ac0f7f35cd5dc9a8f5814f5cb3e42dc -SHA1 (patch-dd) = bd8016bdeab043f2b2c12728b11e8b54e75dcce9 -SHA1 (patch-de) = 225eaa996fccc02b17be0099d943c75302600ada +SHA1 (patch-bb) = 660de3b648a403c1f236e8e72687df1f81d2c37d +SHA1 (patch-dd) = 2517d94cc67fd9d9f9f4f3e5aaa7aa301644e331 +SHA1 (patch-de) = b1729be8c25107a29192131697ec7b0eee45deba SHA1 (patch-ed) = c30e147005e41fbf6d08457634d94cd90545cbb5 -SHA1 (patch-ee) = 54811c6a45dee3aa1a4ad6c956053c23aa14146a SHA1 (patch-ef) = 0e1c2b364cc52aa9a7295e0e025b53498082d4a7 SHA1 (patch-eg) = f511730d3b5640f10973d70b891e28bf140beb3c SHA1 (patch-eh) = 008c648dd74b273bd920521f7e01da5928c7c775 SHA1 (patch-ei) = aee213dc347808f7aabedd7a8ce9f9477b12b9f0 -SHA1 (patch-ej) = e4226a53a314f02012f188d65765ab2f2de08176 -SHA1 (patch-ek) = a4bfeb9887c5caddaf660fecaaa59f7468eec2ed +SHA1 (patch-ej) = 8a523a6a419000728ef03d87c8453a2d0bf29aea SHA1 (patch-el) = c8ab982a32e2c47deba9bd8a5b574d83fb80234d -SHA1 (patch-em) = 4993ef668321e38ce63014494cb2ddb447637eb8 SHA1 (patch-en) = d40b933f2b491ad18fb5ba43203311d6a3b28f06 -SHA1 (patch-eo) = 3617e3543d52009ab0514e78cd5175a85cd90c63 -SHA1 (patch-ep) = 03723d2f3ed666616d8e7701bfe32e104df9e3c9 -SHA1 (patch-eq) = c6854cb155be431de15ba23f19e619df8cb7fbba -SHA1 (patch-er) = dcc723b1ecdcb78b080b5d05e2b7849e8721beec -SHA1 (patch-es) = 23b89cbcef79fc4f817525a6b8d62b47b2a3fc2c SHA1 (patch-et) = 1d3fb0fee7fcea551aaa1c2a59cf70aeff85028d Index: patches/patch-aa =================================================================== RCS file: /cvsroot/pkgsrc/emulators/qemu/patches/patch-aa,v retrieving revision 1.8 diff -u -p -r1.8 patch-aa --- patches/patch-aa 27 Oct 2010 13:24:09 -0000 1.8 +++ patches/patch-aa 5 Jun 2011 00:13:17 -0000 @@ -1,6 +1,6 @@ -$NetBSD: patch-aa,v 1.8 2010/10/27 13:24:09 tsutsui Exp $ +$NetBSD$ ---- net/tap-bsd.c.orig 2010-07-28 01:55:42.000000000 +0000 +--- net/tap-bsd.c.orig 2011-05-06 19:01:44.000000000 +0000 +++ net/tap-bsd.c @@ -28,6 +28,8 @@ #include "qemu-error.h" @@ -11,19 +11,21 @@ $NetBSD: patch-aa,v 1.8 2010/10/27 13:24 #include #endif -@@ -44,8 +46,12 @@ +@@ -40,8 +42,12 @@ int tap_open(char *ifname, int ifname_size, int *vnet_hdr, int vnet_hdr_required) { int fd; +- char *dev; +- struct stat s; +#ifdef TAPGIFNAME + struct ifreq ifr; +#else - char *dev; - struct stat s; ++ char *dev; ++ struct stat s; +#endif - #if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) - /* if no ifname is given, always start the search from tap0. */ + #if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__OpenBSD__) + /* if no ifname is given, always start the search from tap0/tun0. */ @@ -77,14 +83,26 @@ int tap_open(char *ifname, int ifname_si #else TFR(fd = open("/dev/tap", O_RDWR)); Index: patches/patch-bb =================================================================== RCS file: /cvsroot/pkgsrc/emulators/qemu/patches/patch-bb,v retrieving revision 1.1 diff -u -p -r1.1 patch-bb --- patches/patch-bb 3 Apr 2011 09:56:39 -0000 1.1 +++ patches/patch-bb 5 Jun 2011 00:13:17 -0000 @@ -1,8 +1,8 @@ -$NetBSD: patch-bb,v 1.1 2011/04/03 09:56:39 shattered Exp $ +$NetBSD$ ---- pc-bios/optionrom/signrom.sh.orig 2010-02-23 20:54:38.000000000 +0000 -+++ pc-bios/optionrom/signrom.sh 2010-04-09 06:18:25.000000000 +0000 -@@ -26,12 +26,12 @@ +--- scripts/signrom.sh.orig 2011-05-06 19:01:44.000000000 +0000 ++++ scripts/signrom.sh +@@ -26,12 +26,12 @@ test "$1" -a "$2" || exit 1 sum=0 # find out the file size @@ -12,8 +12,8 @@ $NetBSD: patch-bb,v 1.1 2011/04/03 09:56 size=$(( $x * 512 - 1 )) # now get the checksum --nums=`od -A n -t u1 -v "$1"` +-nums=`od -A n -t u1 -v -N $size "$1"` +nums=`od -t u1 -v "$1" | sed -e 's/^[0-9]* *//' -e 's/^00*\([0-9]\)/\1/' -e 's/ 00*\([0-9]\)/ \1/g'` for i in ${nums}; do # add each byte's value to sum - sum=`expr $sum + $i` + sum=`expr \( $sum + $i \) % 256` Index: patches/patch-dd =================================================================== RCS file: /cvsroot/pkgsrc/emulators/qemu/patches/patch-dd,v retrieving revision 1.5 diff -u -p -r1.5 patch-dd --- patches/patch-dd 9 Nov 2010 10:37:12 -0000 1.5 +++ patches/patch-dd 5 Jun 2011 00:13:17 -0000 @@ -1,16 +1,23 @@ -$NetBSD: patch-dd,v 1.5 2010/11/09 10:37:12 jmmv Exp $ +$NetBSD$ -Remove confsuffix from sysconfdir so that our PKG_SYSCONFSUBDIR setting -works. - -Install man pages into ${PREFIX}/man, not ${PREFIX}/share/man. - -Handle arm and armeb case on NetBSD. -XXX: it looks mips is always treated as big endian. - ---- configure.orig 2010-10-15 20:56:09.000000000 +0000 +--- configure.orig 2011-05-06 19:01:43.000000000 +0000 +++ configure -@@ -199,13 +199,19 @@ elif check_define __s390__ ; then +@@ -140,12 +140,12 @@ bigendian="no" + mingw32="no" + EXESUF="" + prefix="/usr/local" +-mandir="\${prefix}/share/man" ++mandir="\${prefix}/man" + datadir="\${prefix}/share/qemu" + docdir="\${prefix}/share/doc/qemu" + bindir="\${prefix}/bin" + sysconfdir="\${prefix}/etc" +-confsuffix="/qemu" ++confsuffix="" + slirp="yes" + fmod_lib="" + fmod_inc="" +@@ -275,12 +275,18 @@ elif check_define __s390__ ; then else cpu="s390" fi @@ -24,29 +31,13 @@ XXX: it looks mips is always treated as cpu=`uname -m` fi - target_list="" case "$cpu" in - alpha|cris|ia64|m68k|microblaze|ppc|ppc64|sparc64) + alpha|arm|armeb|cris|ia64|m68k|microblaze|ppc|ppc64|sparc64) cpu="$cpu" ;; i386|i486|i586|i686|i86pc|BePC) -@@ -285,12 +291,12 @@ bigendian="no" - mingw32="no" - EXESUF="" - prefix="/usr/local" --mandir="\${prefix}/share/man" -+mandir="\${prefix}/man" - datadir="\${prefix}/share/qemu" - docdir="\${prefix}/share/doc/qemu" - bindir="\${prefix}/bin" - sysconfdir="\${prefix}/etc" --confsuffix="/qemu" -+confsuffix="" - slirp="yes" - fmod_lib="" - fmod_inc="" -@@ -1036,7 +1042,7 @@ else +@@ -1080,7 +1086,7 @@ else # if cross compiling, cannot launch a program, so make a static guess case "$cpu" in @@ -55,7 +46,7 @@ XXX: it looks mips is always treated as bigendian=yes ;; esac -@@ -2212,7 +2218,7 @@ case "$cpu" in +@@ -2498,7 +2504,7 @@ case "$cpu" in i386|x86_64|alpha|cris|hppa|ia64|m68k|microblaze|mips|mips64|ppc|ppc64|s390|s390x|sparc|sparc64) ARCH=$cpu ;; Index: patches/patch-de =================================================================== RCS file: /cvsroot/pkgsrc/emulators/qemu/patches/patch-de,v retrieving revision 1.4 diff -u -p -r1.4 patch-de --- patches/patch-de 27 Feb 2010 23:21:13 -0000 1.4 +++ patches/patch-de 5 Jun 2011 00:13:17 -0000 @@ -1,13 +1,13 @@ -$NetBSD: patch-de,v 1.4 2010/02/27 23:21:13 tnn Exp $ +$NetBSD$ ---- exec.c.orig 2010-02-23 20:54:38.000000000 +0000 +--- exec.c.orig 2011-05-06 19:01:43.000000000 +0000 +++ exec.c -@@ -463,7 +463,7 @@ static void code_gen_alloc(unsigned long - exit(1); +@@ -518,7 +518,7 @@ static void code_gen_alloc(unsigned long } } --#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__) -+#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__) || defined(__NetBSD__) + #elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) \ +- || defined(__DragonFly__) || defined(__OpenBSD__) ++ || defined(__DragonFly__) || defined(__OpenBSD__) || defined(__NetBSD__) { int flags; void *addr = NULL; Index: patches/patch-ee =================================================================== RCS file: patches/patch-ee diff -N patches/patch-ee --- patches/patch-ee 27 Oct 2010 13:24:09 -0000 1.3 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,26 +0,0 @@ -$NetBSD: patch-ee,v 1.3 2010/10/27 13:24:09 tsutsui Exp $ - -Remove unnecessary includes. "qemu_socket.h" is enough and -including without causes errors. -(fixed in the upstream master but not in stable-0.13 branch) -http://git.qemu.org/qemu.git/commit/?id=aab2e8f79ad253c760787ff3ce4d64967fed0003 - ---- block/sheepdog.c.orig 2010-07-28 01:55:42.000000000 +0000 -+++ block/sheepdog.c 2010-08-08 09:17:28.000000000 +0000 -@@ -8,16 +8,6 @@ - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ --#ifdef _WIN32 --#include --#include --#include --#else --#include --#include -- --#define closesocket(s) close(s) --#endif - - #include "qemu-common.h" - #include "qemu-error.h" Index: patches/patch-ej =================================================================== RCS file: /cvsroot/pkgsrc/emulators/qemu/patches/patch-ej,v retrieving revision 1.3 diff -u -p -r1.3 patch-ej --- patches/patch-ej 4 Mar 2011 13:03:48 -0000 1.3 +++ patches/patch-ej 5 Jun 2011 00:13:17 -0000 @@ -1,20 +1,6 @@ $NetBSD: patch-ej,v 1.3 2011/03/04 13:03:48 tsutsui Exp $ -1) bswap_NN() variants are not available in CONFIG_MACHINE_BSWAP_H case - (fixed in upstream master but not in stable-0.13 branch) -http://git.qemu.org/qemu.git/commit/?id=ba5e7f82169f32ab8163c707d97c799ca09f8924 - -2) don't use -1 against uint8_t - (fixed in upstream master but not in stable-0.13 branch) -http://git.qemu.org/qemu.git/commit/?id=7bccf57383cca60a778d5c543ac80c9f62d89ef2 -http://git.qemu.org/qemu.git/commit/?id=aee474ebc62686ae8827747b0b1aed85b8122979 - -3) fix uninitialized warning - (fixed in upstream master but not in stable-0.13 branch) -http://git.qemu.org/qemu.git/commit/?id=d167f9bc06a577d6c85b8ed6991c1efe175aae7d -http://git.qemu.org/qemu.git/commit/?id=ad7ee4ad6c3a5388acf94dd532d291ea6d3a5972 - -4) include to fix build on Mac OS X +1) include to fix build on Mac OS X --- ui/vnc-enc-tight.c.orig 2010-10-15 20:56:09.000000000 +0000 +++ ui/vnc-enc-tight.c @@ -25,94 +11,3 @@ http://git.qemu.org/qemu.git/commit/?id= +#include #include "qemu-common.h" - -@@ -209,7 +210,7 @@ - d < w - x - VNC_TIGHT_DETECT_SUBROW_WIDTH; d++) { \ - pix = ((uint##bpp##_t *)buf)[(y+d)*w+x+d]; \ - if (endian) { \ -- pix = bswap_##bpp(pix); \ -+ pix = bswap##bpp(pix); \ - } \ - for (c = 0; c < 3; c++) { \ - left[c] = (int)(pix >> shift[c] & max[c]); \ -@@ -218,7 +219,7 @@ - dx++) { \ - pix = ((uint##bpp##_t *)buf)[(y+d)*w+x+d+dx]; \ - if (endian) { \ -- pix = bswap_##bpp(pix); \ -+ pix = bswap##bpp(pix); \ - } \ - sum = 0; \ - for (c = 0; c < 3; c++) { \ -@@ -281,7 +282,7 @@ - return 0; - } - -- if (vs->tight.quality != -1) { -+ if (vs->tight.quality != (uint8_t)-1) { - if (w * h < VNC_TIGHT_JPEG_MIN_RECT_SIZE) { - return 0; - } -@@ -294,7 +295,7 @@ - if (vs->clientds.pf.bytes_per_pixel == 4) { - if (vs->tight.pixel24) { - errors = tight_detect_smooth_image24(vs, w, h); -- if (vs->tight.quality != -1) { -+ if (vs->tight.quality != (uint8_t)-1) { - return (errors < tight_conf[quality].jpeg_threshold24); - } - return (errors < tight_conf[compression].gradient_threshold24); -@@ -443,7 +444,7 @@ - * Should never happen, but don't break everything \ - * if it does, use the first color instead \ - */ \ -- if (idx == -1) { \ -+ if (idx == (uint8_t)-1) { \ - idx = 0; \ - } \ - while (rep >= 0) { \ -@@ -608,7 +609,7 @@ - for (x = 0; x < w; x++) { \ - pix = *buf; \ - if (endian) { \ -- pix = bswap_##bpp(pix); \ -+ pix = bswap##bpp(pix); \ - } \ - diff = 0; \ - for (c = 0; c < 3; c++) { \ -@@ -628,7 +629,7 @@ - << shift[c]; \ - } \ - if (endian) { \ -- diff = bswap_##bpp(diff); \ -+ diff = bswap##bpp(diff); \ - } \ - *buf++ = diff; \ - } \ -@@ -1469,6 +1470,8 @@ - ret = send_mono_rect(vs, x, y, w, h, bg, fg); - } else if (colors <= 256) { - ret = send_palette_rect(vs, x, y, w, h, palette); -+ } else { -+ ret = 0; - } - return ret; - } -@@ -1501,6 +1504,8 @@ - } else { - ret = send_palette_rect(vs, x, y, w, h, palette); - } -+ } else { -+ ret = 0; - } - return ret; - } -@@ -1522,7 +1527,7 @@ - colors = tight_fill_palette(vs, x, y, w * h, &fg, &bg, &palette); - - #ifdef CONFIG_VNC_JPEG -- if (vs->tight.quality != -1) { -+ if (vs->tight.quality != (uint8_t)-1) { - ret = send_sub_rect_jpeg(vs, x, y, w, h, bg, fg, colors, palette); - } else { - ret = send_sub_rect_nojpeg(vs, x, y, w, h, bg, fg, colors, palette); Index: patches/patch-ek =================================================================== RCS file: patches/patch-ek diff -N patches/patch-ek --- patches/patch-ek 27 Oct 2010 13:24:09 -0000 1.1 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,45 +0,0 @@ -$NetBSD: patch-ek,v 1.1 2010/10/27 13:24:09 tsutsui Exp $ - -Improve ATA IDENTIFY word 64 contents -(fixed in upstream master but not in stable-0.13 branch) -http://git.qemu.org/qemu.git/commit/?id=79d1d3311319f3390f540f547becaba9d957f84c - -Don't use <0 against unsigned variable -(fixed in upstream master but not in stable-0.13 branch) -http://git.qemu.org/qemu.git/commit/?id=7bccf57383cca60a778d5c543ac80c9f62d89ef2 - ---- hw/ide/core.c.orig 2010-08-31 13:18:20.000000000 +0000 -+++ hw/ide/core.c 2010-09-11 14:03:19.000000000 +0000 -@@ -138,6 +138,7 @@ static void ide_identify(IDEState *s) - put_le16(p + 61, s->nb_sectors >> 16); - put_le16(p + 62, 0x07); /* single word dma0-2 supported */ - put_le16(p + 63, 0x07); /* mdma0-2 supported */ -+ put_le16(p + 64, 0x03); /* pio3-4 supported */ - put_le16(p + 65, 120); - put_le16(p + 66, 120); - put_le16(p + 67, 120); -@@ -198,13 +199,12 @@ static void ide_atapi_identify(IDEState - put_le16(p + 53, 7); /* words 64-70, 54-58, 88 valid */ - put_le16(p + 62, 7); /* single word dma0-2 supported */ - put_le16(p + 63, 7); /* mdma0-2 supported */ -- put_le16(p + 64, 0x3f); /* PIO modes supported */ - #else - put_le16(p + 49, 1 << 9); /* LBA supported, no DMA */ - put_le16(p + 53, 3); /* words 64-70, 54-58 valid */ - put_le16(p + 63, 0x103); /* DMA modes XXX: may be incorrect */ -- put_le16(p + 64, 1); /* PIO modes */ - #endif -+ put_le16(p + 64, 3); /* pio3-4 supported */ - put_le16(p + 65, 0xb4); /* minimum DMA multiword tx cycle time */ - put_le16(p + 66, 0xb4); /* recommended DMA multiword tx cycle time */ - put_le16(p + 67, 0x12c); /* minimum PIO cycle time without flow control */ -@@ -2779,8 +2779,7 @@ static int ide_drive_pio_post_load(void - { - IDEState *s = opaque; - -- if (s->end_transfer_fn_idx < 0 || -- s->end_transfer_fn_idx > ARRAY_SIZE(transfer_end_table)) { -+ if (s->end_transfer_fn_idx > ARRAY_SIZE(transfer_end_table)) { - return -EINVAL; - } - s->end_transfer_func = transfer_end_table[s->end_transfer_fn_idx]; Index: patches/patch-em =================================================================== RCS file: patches/patch-em diff -N patches/patch-em --- patches/patch-em 27 Oct 2010 13:24:09 -0000 1.1 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,24 +0,0 @@ -$NetBSD: patch-em,v 1.1 2010/10/27 13:24:09 tsutsui Exp $ - -Export libgcc builtin __clear_cache() since it's also referred from -tcg/arm/tcg-target.h. - ---- exec-all.h.orig 2010-07-28 01:55:42.000000000 +0000 -+++ exec-all.h -@@ -202,11 +202,13 @@ static inline void tb_set_jmp_target1(un - /* no need to flush icache explicitly */ - } - #elif defined(__arm__) -+#if QEMU_GNUC_PREREQ(4, 1) -+void __clear_cache(char *beg, char *end); -+#endif -+ - static inline void tb_set_jmp_target1(unsigned long jmp_addr, unsigned long addr) - { --#if QEMU_GNUC_PREREQ(4, 1) -- void __clear_cache(char *beg, char *end); --#else -+#if !QEMU_GNUC_PREREQ(4, 1) - register unsigned long _beg __asm ("a1"); - register unsigned long _end __asm ("a2"); - register unsigned long _flg __asm ("a3"); Index: patches/patch-eo =================================================================== RCS file: patches/patch-eo diff -N patches/patch-eo --- patches/patch-eo 27 Oct 2010 13:24:09 -0000 1.1 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,135 +0,0 @@ -$NetBSD: patch-eo,v 1.1 2010/10/27 13:24:09 tsutsui Exp $ - -Pull fixes for ESP SCSI DMA from upstream master: -http://git.qemu.org/qemu.git/commit/?id=73d7434279e390505164afd02360eebe4b43c7fa - ---- hw/esp.c.orig -+++ hw/esp.c -@@ -80,6 +80,8 @@ struct ESPState { - ESPDMAMemoryReadWriteFunc dma_memory_read; - ESPDMAMemoryReadWriteFunc dma_memory_write; - void *dma_opaque; -+ int dma_enabled; -+ void (*dma_cb)(ESPState *s); - }; - - #define ESP_TCLO 0x0 -@@ -167,6 +169,24 @@ static void esp_lower_irq(ESPState *s) - } - } - -+static void esp_dma_enable(void *opaque, int irq, int level) -+{ -+ DeviceState *d = opaque; -+ ESPState *s = container_of(d, ESPState, busdev.qdev); -+ -+ if (level) { -+ s->dma_enabled = 1; -+ DPRINTF("Raise enable\n"); -+ if (s->dma_cb) { -+ s->dma_cb(s); -+ s->dma_cb = NULL; -+ } -+ } else { -+ DPRINTF("Lower enable\n"); -+ s->dma_enabled = 0; -+ } -+} -+ - static uint32_t get_cmd(ESPState *s, uint8_t *buf) - { - uint32_t dmalen; -@@ -243,6 +263,10 @@ static void handle_satn(ESPState *s) - uint8_t buf[32]; - int len; - -+ if (!s->dma_enabled) { -+ s->dma_cb = handle_satn; -+ return; -+ } - len = get_cmd(s, buf); - if (len) - do_cmd(s, buf); -@@ -253,6 +277,10 @@ static void handle_s_without_atn(ESPState *s) - uint8_t buf[32]; - int len; - -+ if (!s->dma_enabled) { -+ s->dma_cb = handle_s_without_atn; -+ return; -+ } - len = get_cmd(s, buf); - if (len) { - do_busid_cmd(s, buf, 0); -@@ -261,6 +289,10 @@ static void handle_s_without_atn(ESPState *s) - - static void handle_satn_stop(ESPState *s) - { -+ if (!s->dma_enabled) { -+ s->dma_cb = handle_satn_stop; -+ return; -+ } - s->cmdlen = get_cmd(s, s->cmdbuf); - if (s->cmdlen) { - DPRINTF("Set ATN & Stop: cmdlen %d\n", s->cmdlen); -@@ -431,6 +463,7 @@ static void esp_hard_reset(DeviceState *d) - s->ti_wptr = 0; - s->dma = 0; - s->do_cmd = 0; -+ s->dma_cb = NULL; - - s->rregs[ESP_CFG1] = 7; - } -@@ -450,6 +483,18 @@ static void parent_esp_reset(void *opaque, int irq, int level) - } - } - -+static void esp_gpio_demux(void *opaque, int irq, int level) -+{ -+ switch (irq) { -+ case 0: -+ parent_esp_reset(opaque, irq, level); -+ break; -+ case 1: -+ esp_dma_enable(opaque, irq, level); -+ break; -+ } -+} -+ - static uint32_t esp_mem_readb(void *opaque, target_phys_addr_t addr) - { - ESPState *s = opaque; -@@ -646,7 +691,8 @@ static const VMStateDescription vmstate_esp = { - void esp_init(target_phys_addr_t espaddr, int it_shift, - ESPDMAMemoryReadWriteFunc dma_memory_read, - ESPDMAMemoryReadWriteFunc dma_memory_write, -- void *dma_opaque, qemu_irq irq, qemu_irq *reset) -+ void *dma_opaque, qemu_irq irq, qemu_irq *reset, -+ qemu_irq *dma_enable) - { - DeviceState *dev; - SysBusDevice *s; -@@ -658,11 +704,14 @@ void esp_init(target_phys_addr_t espaddr, int it_shift, - esp->dma_memory_write = dma_memory_write; - esp->dma_opaque = dma_opaque; - esp->it_shift = it_shift; -+ /* XXX for now until rc4030 has been changed to use DMA enable signal */ -+ esp->dma_enabled = 1; - qdev_init_nofail(dev); - s = sysbus_from_qdev(dev); - sysbus_connect_irq(s, 0, irq); - sysbus_mmio_map(s, 0, espaddr); - *reset = qdev_get_gpio_in(dev, 0); -+ *dma_enable = qdev_get_gpio_in(dev, 1); - } - - static int esp_init1(SysBusDevice *dev) -@@ -676,7 +725,7 @@ static int esp_init1(SysBusDevice *dev) - esp_io_memory = cpu_register_io_memory(esp_mem_read, esp_mem_write, s); - sysbus_init_mmio(dev, ESP_REGS << s->it_shift, esp_io_memory); - -- qdev_init_gpio_in(&dev->qdev, parent_esp_reset, 1); -+ qdev_init_gpio_in(&dev->qdev, esp_gpio_demux, 2); - - scsi_bus_new(&s->bus, &dev->qdev, 0, ESP_MAX_DEVS, esp_command_complete); - return scsi_bus_legacy_handle_cmdline(&s->bus); Index: patches/patch-ep =================================================================== RCS file: patches/patch-ep diff -N patches/patch-ep --- patches/patch-ep 27 Oct 2010 13:24:09 -0000 1.1 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,16 +0,0 @@ -$NetBSD: patch-ep,v 1.1 2010/10/27 13:24:09 tsutsui Exp $ - -Pull fixes for ESP SCSI DMA from upstream master: -http://git.qemu.org/qemu.git/commit/?id=73d7434279e390505164afd02360eebe4b43c7fa - ---- hw/esp.h.orig -+++ hw/esp.h -@@ -7,6 +7,7 @@ typedef void (*ESPDMAMemoryReadWriteFunc)(void *opaque, uint8_t *buf, int len); - void esp_init(target_phys_addr_t espaddr, int it_shift, - ESPDMAMemoryReadWriteFunc dma_memory_read, - ESPDMAMemoryReadWriteFunc dma_memory_write, -- void *dma_opaque, qemu_irq irq, qemu_irq *reset); -+ void *dma_opaque, qemu_irq irq, qemu_irq *reset, -+ qemu_irq *dma_enable); - - #endif Index: patches/patch-eq =================================================================== RCS file: patches/patch-eq diff -N patches/patch-eq --- patches/patch-eq 27 Oct 2010 13:24:09 -0000 1.1 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,37 +0,0 @@ -$NetBSD: patch-eq,v 1.1 2010/10/27 13:24:09 tsutsui Exp $ - -Pull fixes for ESP SCSI DMA from upstream master: -http://git.qemu.org/qemu.git/commit/?id=73d7434279e390505164afd02360eebe4b43c7fa - -Also disable floppy which is broken. - ---- hw/mips_jazz.c.orig -+++ hw/mips_jazz.c -@@ -136,7 +136,7 @@ - NICInfo *nd; - PITState *pit; - DriveInfo *fds[MAX_FD]; -- qemu_irq esp_reset; -+ qemu_irq esp_reset, dma_enable; - qemu_irq *cpu_exit_irq; - ram_addr_t ram_offset; - ram_addr_t bios_offset; -@@ -244,7 +244,7 @@ - /* SCSI adapter */ - esp_init(0x80002000, 0, - rc4030_dma_read, rc4030_dma_write, dmas[0], -- rc4030[5], &esp_reset); -+ rc4030[5], &esp_reset, &dma_enable); - - /* Floppy */ - if (drive_get_max_bus(IF_FLOPPY) >= MAX_FD) { -@@ -254,7 +254,9 @@ - for (n = 0; n < MAX_FD; n++) { - fds[n] = drive_get(IF_FLOPPY, 0, n); - } -+#if 0 /* XXX: floppy emulation uses wrong ISA DMA (should be jazz DMA) */ - fdctrl_init_sysbus(rc4030[1], 0, 0x80003000, fds); -+#endif - - /* Real time clock */ - rtc_init(1980, NULL); Index: patches/patch-er =================================================================== RCS file: patches/patch-er diff -N patches/patch-er --- patches/patch-er 27 Oct 2010 13:24:09 -0000 1.1 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,62 +0,0 @@ -$NetBSD: patch-er,v 1.1 2010/10/27 13:24:09 tsutsui Exp $ - -Pull fixes for ESP SCSI DMA from upstream master: -http://git.qemu.org/qemu.git/commit/?id=73d7434279e390505164afd02360eebe4b43c7fa - ---- hw/sparc32_dma.c.orig -+++ hw/sparc32_dma.c -@@ -58,6 +58,7 @@ - #define DMA_INTR 1 - #define DMA_INTREN 0x10 - #define DMA_WRITE_MEM 0x100 -+#define DMA_EN 0x200 - #define DMA_LOADED 0x04000000 - #define DMA_DRAIN_FIFO 0x40 - #define DMA_RESET 0x80 -@@ -72,7 +73,12 @@ struct DMAState { - uint32_t dmaregs[DMA_REGS]; - qemu_irq irq; - void *iommu; -- qemu_irq dev_reset; -+ qemu_irq gpio[2]; -+}; -+ -+enum { -+ GPIO_RESET = 0, -+ GPIO_DMA, - }; - - /* Note: on sparc, the lance 16 bit bus is swapped */ -@@ -201,12 +207,21 @@ static void dma_mem_writel(void *opaque, target_phys_addr_t addr, uint32_t val) - } - } - if (val & DMA_RESET) { -- qemu_irq_raise(s->dev_reset); -- qemu_irq_lower(s->dev_reset); -+ qemu_irq_raise(s->gpio[GPIO_RESET]); -+ qemu_irq_lower(s->gpio[GPIO_RESET]); - } else if (val & DMA_DRAIN_FIFO) { - val &= ~DMA_DRAIN_FIFO; - } else if (val == 0) - val = DMA_DRAIN_FIFO; -+ -+ if (val & DMA_EN && !(s->dmaregs[0] & DMA_EN)) { -+ DPRINTF("Raise DMA enable\n"); -+ qemu_irq_raise(s->gpio[GPIO_DMA]); -+ } else if (!(val & DMA_EN) && !!(s->dmaregs[0] & DMA_EN)) { -+ DPRINTF("Lower DMA enable\n"); -+ qemu_irq_lower(s->gpio[GPIO_DMA]); -+ } -+ - val &= ~DMA_CSR_RO_MASK; - val |= DMA_VER; - s->dmaregs[0] = (s->dmaregs[0] & DMA_CSR_RO_MASK) | val; -@@ -262,7 +277,7 @@ static int sparc32_dma_init1(SysBusDevice *dev) - sysbus_init_mmio(dev, DMA_SIZE, dma_io_memory); - - qdev_init_gpio_in(&dev->qdev, dma_set_irq, 1); -- qdev_init_gpio_out(&dev->qdev, &s->dev_reset, 1); -+ qdev_init_gpio_out(&dev->qdev, s->gpio, 2); - - return 0; - } Index: patches/patch-es =================================================================== RCS file: patches/patch-es diff -N patches/patch-es --- patches/patch-es 27 Oct 2010 13:24:09 -0000 1.1 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,79 +0,0 @@ -$NetBSD: patch-es,v 1.1 2010/10/27 13:24:09 tsutsui Exp $ - -Pull fixes for ESP SCSI DMA from upstream master: -http://git.qemu.org/qemu.git/commit/?id=73d7434279e390505164afd02360eebe4b43c7fa - ---- hw/sun4m.c.orig -+++ hw/sun4m.c -@@ -810,7 +810,7 @@ static void sun4m_hw_init(const struct sun4m_hwdef *hwdef, ram_addr_t RAM_size, - void *iommu, *espdma, *ledma, *nvram; - qemu_irq *cpu_irqs[MAX_CPUS], slavio_irq[32], slavio_cpu_irq[MAX_CPUS], - espdma_irq, ledma_irq; -- qemu_irq esp_reset; -+ qemu_irq esp_reset, dma_enable; - qemu_irq fdc_tc; - qemu_irq *cpu_halt; - unsigned long kernel_size; -@@ -930,11 +930,12 @@ static void sun4m_hw_init(const struct sun4m_hwdef *hwdef, ram_addr_t RAM_size, - exit(1); - } - -- esp_reset = qdev_get_gpio_in(espdma, 0); - esp_init(hwdef->esp_base, 2, - espdma_memory_read, espdma_memory_write, -- espdma, espdma_irq, &esp_reset); -+ espdma, espdma_irq, &esp_reset, &dma_enable); - -+ qdev_connect_gpio_out(espdma, 0, esp_reset); -+ qdev_connect_gpio_out(espdma, 1, dma_enable); - - if (hwdef->cs_base) { - sysbus_create_simple("SUNW,CS4231", hwdef->cs_base, -@@ -1494,7 +1495,7 @@ static void sun4d_hw_init(const struct sun4d_hwdef *hwdef, ram_addr_t RAM_size, - void *iounits[MAX_IOUNITS], *espdma, *ledma, *nvram; - qemu_irq *cpu_irqs[MAX_CPUS], sbi_irq[32], sbi_cpu_irq[MAX_CPUS], - espdma_irq, ledma_irq; -- qemu_irq esp_reset; -+ qemu_irq esp_reset, dma_enable; - unsigned long kernel_size; - void *fw_cfg; - DeviceState *dev; -@@ -1561,10 +1562,12 @@ static void sun4d_hw_init(const struct sun4d_hwdef *hwdef, ram_addr_t RAM_size, - exit(1); - } - -- esp_reset = qdev_get_gpio_in(espdma, 0); - esp_init(hwdef->esp_base, 2, - espdma_memory_read, espdma_memory_write, -- espdma, espdma_irq, &esp_reset); -+ espdma, espdma_irq, &esp_reset, &dma_enable); -+ -+ qdev_connect_gpio_out(espdma, 0, esp_reset); -+ qdev_connect_gpio_out(espdma, 1, dma_enable); - - kernel_size = sun4m_load_kernel(kernel_filename, initrd_filename, - RAM_size); -@@ -1683,7 +1686,7 @@ static void sun4c_hw_init(const struct sun4c_hwdef *hwdef, ram_addr_t RAM_size, - { - void *iommu, *espdma, *ledma, *nvram; - qemu_irq *cpu_irqs, slavio_irq[8], espdma_irq, ledma_irq; -- qemu_irq esp_reset; -+ qemu_irq esp_reset, dma_enable; - qemu_irq fdc_tc; - unsigned long kernel_size; - DriveInfo *fd[MAX_FD]; -@@ -1751,10 +1754,12 @@ static void sun4c_hw_init(const struct sun4c_hwdef *hwdef, ram_addr_t RAM_size, - exit(1); - } - -- esp_reset = qdev_get_gpio_in(espdma, 0); - esp_init(hwdef->esp_base, 2, - espdma_memory_read, espdma_memory_write, -- espdma, espdma_irq, &esp_reset); -+ espdma, espdma_irq, &esp_reset, &dma_enable); -+ -+ qdev_connect_gpio_out(espdma, 0, esp_reset); -+ qdev_connect_gpio_out(espdma, 1, dma_enable); - - kernel_size = sun4m_load_kernel(kernel_filename, initrd_filename, - RAM_size);