From bugmaster at FreeBSD.org Mon Nov 3 03:06:51 2008 From: bugmaster at FreeBSD.org (FreeBSD bugmaster) Date: Mon Nov 3 03:07:34 2008 Subject: Current problem reports assigned to freebsd-emulation@FreeBSD.org Message-ID: <200811031106.mA3B6ofZ010866@freefall.freebsd.org> Note: to view an individual PR, use: http://www.freebsd.org/cgi/query-pr.cgi?pr=(number). The following is a listing of current problems submitted by FreeBSD users. These represent problem reports covering all versions including experimental development code and obsolete releases. S Tracker Resp. Description -------------------------------------------------------------------------------- f ports/127018 emulation Linuxulator incapable of using FreeBSD's LDAP environm o kern/126232 emulation [linux] Linux ioctl TCGETS (0x5401) always fails o ports/121800 emulation x11-toolkits/linux-openmotif - OpenMotif upgrade to 2. o kern/97326 emulation [linux] file descriptor leakage in linux emulation o ports/91318 emulation [fix] graphics/linux_dri: works on amd64 too o kern/91293 emulation [svr4] [patch] *Experimental* Update to the SVR4 emula o kern/73777 emulation [linux] [patch] linux emulation: root dir special hand a kern/72920 emulation [linux]: path "prefixing" is not done on unix domain s o kern/41543 emulation [patch] [request] easier wine/w23 support o kern/39201 emulation [linux] [patch] ptrace(2) and rfork(RFLINUXTHPN) confu o kern/29698 emulation [linux] [patch] linux ipcs doesn'work o kern/21463 emulation [linux] Linux compatability mode should not allow setu o kern/11165 emulation [ibcs2] IBCS2 doesn't work correctly with PID_MAX 9999 13 problems total. From defang at wpgmx2.richardson.ca Mon Nov 3 05:56:03 2008 From: defang at wpgmx2.richardson.ca (Email Gateway) Date: Mon Nov 3 05:56:09 2008 Subject: Email Gateway (Sender Notification) Message-ID: <200811030626.mA3CQOeD008805@wpgmx2.richardson.ca> An e-mail you sent with message-id <004b01c93daf$5e73fa80$010ce3d0.103}@squirt.dreamhost.com> was modified by our mail scanning software. The recipients were: Here are the details of the modification: A file attachment named 'DC Pentax 001.zip' was removed as it constituted a potential security hazard. Note: If this file is legitimate, there may be a delay in the Recipient receiving it. If they require the file immediately, please arrange an alternate means of sending it. From mlobo at digiart.art.br Mon Nov 3 16:38:56 2008 From: mlobo at digiart.art.br (Mario Lobo) Date: Mon Nov 3 16:39:05 2008 Subject: flash9 checklist In-Reply-To: <200810302253.m9UMrXdF014739@saturn.kn-bremen.de> References: <200810280859.24048@aldan> <20081028181731.GA30591@saturn.kn-bremen.de> <200810302253.m9UMrXdF014739@saturn.kn-bremen.de> Message-ID: <200811031923.38317.mlobo@digiart.art.br> On Thursday 30 October 2008 19:53:33 Juergen Lock wrote: > In article <49086F1A.2090500@comcast.net> you write: > >Juergen Lock wrote: > >> Preliminary checklist for getting flash9 to work in native firefox: > >> (flash10 needs more ports work, I shall post about that seperately on > >> -emulation...) If you have additions to this please post a followup to > >> this thread, keeping the Cc: (I'm not on -questions...) > >> > >> 1. You need RELENG_7 from at least Mon Oct 20 11:15:57 2008 UTC > >> (the relevant MFC commits are: > >> http://svn.freebsd.org/viewvc/base?view=revision&revision=183819 > >> http://svn.freebsd.org/viewvc/base?view=revision&revision=184075 > >> - a recent HEAD should also work of course.) There are linprocfs > >> patches for RELENG_6 too (merging the former commit), but the latter > >> commit can't be merged to 6 (and 7.0) since they lack the cpuset bits, > >> so flash9 probably won't work on SMP there. (Although if you have SMP > >> you probably should be running 7 anyway. :) Oh and if you do have SMP > >> you also need to use the ULE scheduler, the cpuset syscalls are not > >> supported with 4BSD. linprocfs patches for 6: > >> http://people.freebsd.org/~nox/linprocfs-6.3.patch > >> http://people.freebsd.org/~nox/linprocfs-6.4.patch > >> > >> 2. Your portstree needs to be from at least Sun Oct 19 17:37:28 2008 UTC > >> (the last www/linux-flashplugin9 commit is: > >> http://lists.freebsd.org/pipermail/cvs-ports/2008-October/158404.html > >> ) > >> > >> 3. Make sure linprocfs is mounted to /compat/linux/proc . > >> > >> 4. Make sure www/nspluginwrapper, www/linux-flashplugin9 and > >> dependencies are installed and up to date(!). (the default > >> emulators/linux_base-fc4 should work, if you want to use a later one > >> don't forget to set compat.linux.osrelease=2.6.16 in sysctl.conf and > >> OVERRIDE_LINUX_BASE_PORT to whichever version you use in make.conf. > >> Note however that on 6, only the default compat.linux.osrelease=2.4.2 > >> really works.) > >> > >> 5. If the plugin doesnt show up in firefox' about:plugins, run > >> nspluginwrapper -i > >> /usr/local/lib/npapi/linux-flashplugin/libflashplayer.so and restart > >> firefox. > >> > >> 6. And remember there's a security advisory for the current version of > >> flash9, > >> http://www.FreeBSD.org/ports/portaudit/78f456fd-9c87-11dd-a55e-00163e00 > >>0016.html (if you use portaudit you need to `make > >> -DDISABLE_VULNERABILITIES ...' to be able to install the port), and fc4 > >> seems to be eol'd too, so you probably want to install something like > >> the noscript firefox extension, > >> https://addons.mozilla.org/en-US/firefox/addon/722 > >> and only allow plugins (and scripts, tho thats a different problem) on > >> sites you trust... > >> > >> And finally, if you still get crashes after following the above even > >> on pages that are reported to work now (like youtube) you probably want > >> to run `ktrace -di firefox...' and look at the output using linux_kdump > >> (thats the devel/linux_kdump port, you want to use a package), paying > >> specific attention to the lines above `PSIG SIGSEGV' (or whichever > >> signal you got), maybe there are still shlibs missing that the plugin > >> needs (NAMI ...something.so...), and if this is the case tell us about > >> it so the appropriate dependencies can be added to the relevant ports. > >> If you can't figure it out I guess it doesn't hurt to post the last > >> few 100 lines of the dump up to the relevant PSIG on -emulation... > >> > >> You may also want to check linked shlibs like this: > >> /compat/linux/bin/sh /compat/linux/usr/bin/ldd > >> /usr/local/lib/npapi/linux-flashplugin/libflashplayer.so and > >> /compat/linux/bin/sh /compat/linux/usr/bin/ldd > >> /usr/local/lib/nspluginwrapper/i386/linux/npviewer.bin (if you see `not > >> found' in there you know something is wrong) - although that doesn't > >> show libs that may be dlopen()d at runtime. > > > >Thanks for this. I was able to get linux-flashplugin9 working in native > >Firefox 3.0.3 on FreeBSD 7-STABLE i386. The only additional thing I had > >to do was copy > >/usr/X11R6/lib/browser_plugins/npwrapper.libflashplayer.so into > >~/.mozilla/plugins/ for Firefox to recognize the plugin. > > Yeah I forgot to note that you want to run nspluginwrapper -i > as the user that will run the native browser, not as root, then the > wrapper will go into ~/.mozilla/plugins/... > > > After that > >Youtube, google video, and google maps (incl. street view) work fine, > >but slow. A friend of mine with a very similar setup was not so lucky > >and still has problems with flash9 locking up FF. > > Hmm, lockups I haven't seen yet here. > > HTH, > Juergen > _______________________________________________ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to > "freebsd-questions-unsubscribe@freebsd.org" It works almost perfectly for me ! Thanks for this, Juergen !. I had to say "almost perfectly" because in myspace, for instance, it takes a while for the "flashies" to start. One thing I noticed is that if I terminate FF, npviewer.bin remains loaded and I have to kill it. Here is what I've got: CPU: Intel(R) Pentium(R) D CPU 3.20GHz (3199.66-MHz 686-class CPU) real memory = 2146304000 (2046 MB) nvidia0: on vgapci0 FreeBSD 7.1-PRERELEASE #3: Wed Oct 29 18:37:07 BRT 2008 (i386) kern.ipc.shmmax: 33554432 -> 1036870912 kern.ipc.shmall: 8192 -> 261072 compat.linux.osrelease: 2.4.2 -> 2.6.16 firefox-3.0.3,1 AND 2.0.0.17 (both work!) linux_base-fc-4_10 nspluginwrapper-1.0.0 linux-flashplugin-9.0r124_2 The mtv site worked fine all the way !! Great oldie stuff ! -- Mario Lobo http://www.mallavoodoo.com.br FreeBSD since version 2.2.8 [not Pro-Audio.... YET!!] (99,7% winedows FREE) From kitchetech at gmail.com Tue Nov 4 13:59:47 2008 From: kitchetech at gmail.com (matt donovan) Date: Tue Nov 4 14:00:01 2008 Subject: flash9 checklist In-Reply-To: <200811031923.38317.mlobo@digiart.art.br> References: <200810280859.24048@aldan> <20081028181731.GA30591@saturn.kn-bremen.de> <200810302253.m9UMrXdF014739@saturn.kn-bremen.de> <200811031923.38317.mlobo@digiart.art.br> Message-ID: <28283d910811041359obffe74auf0ee5b05b3a4eb6a@mail.gmail.com> On Mon, Nov 3, 2008 at 5:23 PM, Mario Lobo wrote: > On Thursday 30 October 2008 19:53:33 Juergen Lock wrote: > > In article <49086F1A.2090500@comcast.net> you write: > > >Juergen Lock wrote: > > >> Preliminary checklist for getting flash9 to work in native firefox: > > >> (flash10 needs more ports work, I shall post about that seperately on > > >> -emulation...) If you have additions to this please post a followup > to > > >> this thread, keeping the Cc: (I'm not on -questions...) > > >> > > >> 1. You need RELENG_7 from at least Mon Oct 20 11:15:57 2008 UTC > > >> (the relevant MFC commits are: > > >> http://svn.freebsd.org/viewvc/base?view=revision&revision=183819 > > >> http://svn.freebsd.org/viewvc/base?view=revision&revision=184075 > > >> - a recent HEAD should also work of course.) There are linprocfs > > >> patches for RELENG_6 too (merging the former commit), but the latter > > >> commit can't be merged to 6 (and 7.0) since they lack the cpuset bits, > > >> so flash9 probably won't work on SMP there. (Although if you have SMP > > >> you probably should be running 7 anyway. :) Oh and if you do have SMP > > >> you also need to use the ULE scheduler, the cpuset syscalls are not > > >> supported with 4BSD. linprocfs patches for 6: > > >> http://people.freebsd.org/~nox/linprocfs-6.3.patch > > >> http://people.freebsd.org/~nox/linprocfs-6.4.patch > > >> > > >> 2. Your portstree needs to be from at least Sun Oct 19 17:37:28 2008 > UTC > > >> (the last www/linux-flashplugin9 commit is: > > >> > http://lists.freebsd.org/pipermail/cvs-ports/2008-October/158404.html > > >> ) > > >> > > >> 3. Make sure linprocfs is mounted to /compat/linux/proc . > > >> > > >> 4. Make sure www/nspluginwrapper, www/linux-flashplugin9 and > > >> dependencies are installed and up to date(!). (the default > > >> emulators/linux_base-fc4 should work, if you want to use a later one > > >> don't forget to set compat.linux.osrelease=2.6.16 in sysctl.conf and > > >> OVERRIDE_LINUX_BASE_PORT to whichever version you use in make.conf. > > >> Note however that on 6, only the default compat.linux.osrelease=2.4.2 > > >> really works.) > > >> > > >> 5. If the plugin doesnt show up in firefox' about:plugins, run > > >> nspluginwrapper -i > > >> /usr/local/lib/npapi/linux-flashplugin/libflashplayer.so and restart > > >> firefox. > > >> > > >> 6. And remember there's a security advisory for the current version of > > >> flash9, > > >> > http://www.FreeBSD.org/ports/portaudit/78f456fd-9c87-11dd-a55e-00163e00 > > >>0016.html (if you use portaudit you need to `make > > >> -DDISABLE_VULNERABILITIES ...' to be able to install the port), and > fc4 > > >> seems to be eol'd too, so you probably want to install something like > > >> the noscript firefox extension, > > >> https://addons.mozilla.org/en-US/firefox/addon/722 > > >> and only allow plugins (and scripts, tho thats a different problem) on > > >> sites you trust... > > >> > > >> And finally, if you still get crashes after following the above even > > >> on pages that are reported to work now (like youtube) you probably > want > > >> to run `ktrace -di firefox...' and look at the output using > linux_kdump > > >> (thats the devel/linux_kdump port, you want to use a package), paying > > >> specific attention to the lines above `PSIG SIGSEGV' (or whichever > > >> signal you got), maybe there are still shlibs missing that the plugin > > >> needs (NAMI ...something.so...), and if this is the case tell us about > > >> it so the appropriate dependencies can be added to the relevant ports. > > >> If you can't figure it out I guess it doesn't hurt to post the last > > >> few 100 lines of the dump up to the relevant PSIG on -emulation... > > >> > > >> You may also want to check linked shlibs like this: > > >> /compat/linux/bin/sh /compat/linux/usr/bin/ldd > > >> /usr/local/lib/npapi/linux-flashplugin/libflashplayer.so and > > >> /compat/linux/bin/sh /compat/linux/usr/bin/ldd > > >> /usr/local/lib/nspluginwrapper/i386/linux/npviewer.bin (if you see > `not > > >> found' in there you know something is wrong) - although that doesn't > > >> show libs that may be dlopen()d at runtime. > > > > > >Thanks for this. I was able to get linux-flashplugin9 working in native > > >Firefox 3.0.3 on FreeBSD 7-STABLE i386. The only additional thing I had > > >to do was copy > > >/usr/X11R6/lib/browser_plugins/npwrapper.libflashplayer.so into > > >~/.mozilla/plugins/ for Firefox to recognize the plugin. > > > > Yeah I forgot to note that you want to run nspluginwrapper -i > > as the user that will run the native browser, not as root, then the > > wrapper will go into ~/.mozilla/plugins/... > > > > > After that > > >Youtube, google video, and google maps (incl. street view) work fine, > > >but slow. A friend of mine with a very similar setup was not so lucky > > >and still has problems with flash9 locking up FF. > > > > Hmm, lockups I haven't seen yet here. > > > > HTH, > > Juergen > > _______________________________________________ > > freebsd-questions@freebsd.org mailing list > > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > > To unsubscribe, send any mail to > > "freebsd-questions-unsubscribe@freebsd.org" > > It works almost perfectly for me ! Thanks for this, Juergen !. > > I had to say "almost perfectly" because in myspace, for instance, it takes > a > while for the "flashies" to start. One thing I noticed is that if I > terminate > FF, npviewer.bin remains loaded and I have to kill it. > > Here is what I've got: > > CPU: Intel(R) Pentium(R) D CPU 3.20GHz (3199.66-MHz 686-class CPU) > real memory = 2146304000 (2046 MB) > nvidia0: on vgapci0 > FreeBSD 7.1-PRERELEASE #3: Wed Oct 29 18:37:07 BRT 2008 (i386) > > kern.ipc.shmmax: 33554432 -> 1036870912 > kern.ipc.shmall: 8192 -> 261072 > compat.linux.osrelease: 2.4.2 -> 2.6.16 > > firefox-3.0.3,1 AND 2.0.0.17 (both work!) > linux_base-fc-4_10 > nspluginwrapper-1.0.0 > linux-flashplugin-9.0r124_2 > > The mtv site worked fine all the way !! Great oldie stuff ! > > -- > Mario Lobo > http://www.mallavoodoo.com.br > FreeBSD since version 2.2.8 [not Pro-Audio.... YET!!] (99,7% winedows FREE) > _______________________________________________ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to " > freebsd-questions-unsubscribe@freebsd.org" > Mario try linux_base_fc7 it should stop the freezing. but myself I m having issues with audio and can't figure out why. From kitchetech at gmail.com Tue Nov 4 16:07:45 2008 From: kitchetech at gmail.com (matt donovan) Date: Tue Nov 4 16:07:58 2008 Subject: flash9 checklist In-Reply-To: <28283d910810301834sa165d13p4fbb2c43859e3444@mail.gmail.com> References: <200810280859.24048@aldan> <20081028181731.GA30591@saturn.kn-bremen.de> <49086F1A.2090500@comcast.net> <1225293355.1683.75.camel@localhost> <49088643.2080504@aldan.algebra.com> <20081029190551.7f06a204@ernst.jennejohn.org> <20081029190232.GA81068@dchagin.dialup.corbina.ru> <200810302314.m9UNE40j015122@saturn.kn-bremen.de> <28283d910810301834sa165d13p4fbb2c43859e3444@mail.gmail.com> Message-ID: <28283d910811041607s3611e2fdp21501f5df5666fbc@mail.gmail.com> On Thu, Oct 30, 2008 at 8:34 PM, matt donovan wrote: > Since I had linux_base-fc4 installed npviewer.bin kept hogging all CPU > power until I killed it for native firefox3. Well I installed linux_base-fc7 > and now flash9 and npviewer.bin works fine in native firefox3. > > ok I tried this for the ones that have firefox3 native installed. > > install linux_base-fc7 and npviewer.bin should stop hogging all the cpu > along with firefox3 freezing up until npviewer.bin is killed. > > I do not use extensions in my firefox3 so the flashblock issue before was > not an issue for me. > > > ok it seems fc7 might be missing a dependency so I upgraded to fc8 for ff3 and now I have sound, since there have been reports that linux_base_f4 does not like ff3 that much I had to upgrade my linux_base From korvus at comcast.net Wed Nov 5 06:35:52 2008 From: korvus at comcast.net (Steve Polyack) Date: Wed Nov 5 06:35:59 2008 Subject: flash9 checklist In-Reply-To: <49086F1A.2090500@comcast.net> References: <200810280859.24048@aldan> <20081028181731.GA30591@saturn.kn-bremen.de> <49086F1A.2090500@comcast.net> Message-ID: <4911AF29.6070707@comcast.net> Steve Polyack wrote: > Juergen Lock wrote: >> >> Preliminary checklist for getting flash9 to work in native firefox: >> (flash10 needs more ports work, I shall post about that seperately on >> -emulation...) If you have additions to this please post a followup to >> this thread, keeping the Cc: (I'm not on -questions...) >> >> 1. You need RELENG_7 from at least Mon Oct 20 11:15:57 2008 UTC >> (the relevant MFC commits are: >> http://svn.freebsd.org/viewvc/base?view=revision&revision=183819 >> http://svn.freebsd.org/viewvc/base?view=revision&revision=184075 >> - a recent HEAD should also work of course.) There are linprocfs >> patches >> for RELENG_6 too (merging the former commit), but the latter commit >> can't >> be merged to 6 (and 7.0) since they lack the cpuset bits, so flash9 >> probably won't work on SMP there. (Although if you have SMP you >> probably >> should be running 7 anyway. :) Oh and if you do have SMP you also >> need to >> use the ULE scheduler, the cpuset syscalls are not supported with 4BSD. >> linprocfs patches for 6: >> http://people.freebsd.org/~nox/linprocfs-6.3.patch >> http://people.freebsd.org/~nox/linprocfs-6.4.patch >> >> 2. Your portstree needs to be from at least Sun Oct 19 17:37:28 2008 UTC >> (the last www/linux-flashplugin9 commit is: >> http://lists.freebsd.org/pipermail/cvs-ports/2008-October/158404.html >> >> ) >> >> 3. Make sure linprocfs is mounted to /compat/linux/proc . >> >> 4. Make sure www/nspluginwrapper, www/linux-flashplugin9 and >> dependencies >> are installed and up to date(!). (the default emulators/linux_base-fc4 >> should work, if you want to use a later one don't forget to set >> compat.linux.osrelease=2.6.16 in sysctl.conf and >> OVERRIDE_LINUX_BASE_PORT >> to whichever version you use in make.conf. Note however that on 6, only >> the default compat.linux.osrelease=2.4.2 really works.) >> >> 5. If the plugin doesnt show up in firefox' about:plugins, run >> nspluginwrapper -i >> /usr/local/lib/npapi/linux-flashplugin/libflashplayer.so >> and restart firefox. >> >> 6. And remember there's a security advisory for the current version of >> flash9, >> http://www.FreeBSD.org/ports/portaudit/78f456fd-9c87-11dd-a55e-00163e000016.html >> >> (if you use portaudit you need to `make -DDISABLE_VULNERABILITIES ...' >> to be able to install the port), and fc4 seems to be eol'd too, so you >> probably want to install something like the noscript firefox extension, >> https://addons.mozilla.org/en-US/firefox/addon/722 >> and only allow plugins (and scripts, tho thats a different problem) on >> sites you trust... >> >> And finally, if you still get crashes after following the above even >> on pages that are reported to work now (like youtube) you probably want >> to run `ktrace -di firefox...' and look at the output using linux_kdump >> (thats the devel/linux_kdump port, you want to use a package), paying >> specific attention to the lines above `PSIG SIGSEGV' (or whichever >> signal you got), maybe there are still shlibs missing that the plugin >> needs (NAMI ...something.so...), and if this is the case tell us about >> it so the appropriate dependencies can be added to the relevant ports. >> If you can't figure it out I guess it doesn't hurt to post the last >> few 100 lines of the dump up to the relevant PSIG on -emulation... >> >> You may also want to check linked shlibs like this: >> /compat/linux/bin/sh /compat/linux/usr/bin/ldd >> /usr/local/lib/npapi/linux-flashplugin/libflashplayer.so >> and >> /compat/linux/bin/sh /compat/linux/usr/bin/ldd >> /usr/local/lib/nspluginwrapper/i386/linux/npviewer.bin >> (if you see `not found' in there you know something is wrong) - although >> that doesn't show libs that may be dlopen()d at runtime. >> >> > Thanks for this. I was able to get linux-flashplugin9 working in > native Firefox 3.0.3 on FreeBSD 7-STABLE i386. The only additional > thing I had to do was copy > /usr/X11R6/lib/browser_plugins/npwrapper.libflashplayer.so into > ~/.mozilla/plugins/ for Firefox to recognize the plugin. After that > Youtube, google video, and google maps (incl. street view) work fine, > but slow. A friend of mine with a very similar setup was not so lucky > and still has problems with flash9 locking up FF. > _______________________________________________ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to > "freebsd-questions-unsubscribe@freebsd.org" > So I've done some more testing of this with various linux_base-* installs. Youtube and most things (google maps) work with sound just fine for a few seconds, but after trying to interact or letting them go for a few minute they begin to rapidly eat up main memory. npviewer.bin's usage will top out somewhere around 300-450MB before it core dumps: pid 77684 (npviewer.bin), uid 1042: exited on signal 11 (core dumped). This is on FreeBSD 7-STABLE i386 (as of Tue Oct 28) with native Firefox 3.0.3 still. From tijl at ulyssis.org Wed Nov 5 07:06:37 2008 From: tijl at ulyssis.org (Tijl Coosemans) Date: Wed Nov 5 07:06:52 2008 Subject: flash9 checklist In-Reply-To: <4911AF29.6070707@comcast.net> References: <200810280859.24048@aldan> <49086F1A.2090500@comcast.net> <4911AF29.6070707@comcast.net> Message-ID: <200811051606.29361.tijl@ulyssis.org> On Wednesday 05 November 2008 15:35:21 Steve Polyack wrote: > So I've done some more testing of this with various linux_base-* > installs. Youtube and most things (google maps) work with sound just > fine for a few seconds, but after trying to interact or letting them go > for a few minute they begin to rapidly eat up main memory. > npviewer.bin's usage will top out somewhere around 300-450MB before it > core dumps: pid 77684 (npviewer.bin), uid 1042: exited on signal 11 > (core dumped). This is on FreeBSD 7-STABLE i386 (as of Tue Oct 28) with > native Firefox 3.0.3 still. Do you have this with linux-firefox? From korvus at comcast.net Wed Nov 5 08:42:04 2008 From: korvus at comcast.net (Steve Polyack) Date: Wed Nov 5 08:42:10 2008 Subject: flash9 checklist In-Reply-To: <200811051606.29361.tijl@ulyssis.org> References: <200810280859.24048@aldan> <49086F1A.2090500@comcast.net> <4911AF29.6070707@comcast.net> <200811051606.29361.tijl@ulyssis.org> Message-ID: <4911C914.1010705@comcast.net> Tijl Coosemans wrote: > On Wednesday 05 November 2008 15:35:21 Steve Polyack wrote: > >> So I've done some more testing of this with various linux_base-* >> installs. Youtube and most things (google maps) work with sound just >> fine for a few seconds, but after trying to interact or letting them go >> for a few minute they begin to rapidly eat up main memory. >> npviewer.bin's usage will top out somewhere around 300-450MB before it >> core dumps: pid 77684 (npviewer.bin), uid 1042: exited on signal 11 >> (core dumped). This is on FreeBSD 7-STABLE i386 (as of Tue Oct 28) with >> native Firefox 3.0.3 still. >> > > Do you have this with linux-firefox? > > Yes, I have the same behavior when using linux-firefox 2.0.17 from ports. From tijl at ulyssis.org Wed Nov 5 09:30:57 2008 From: tijl at ulyssis.org (Tijl Coosemans) Date: Wed Nov 5 09:31:10 2008 Subject: flash9 checklist In-Reply-To: <4911C914.1010705@comcast.net> References: <200810280859.24048@aldan> <200811051606.29361.tijl@ulyssis.org> <4911C914.1010705@comcast.net> Message-ID: <200811051828.23041.tijl@ulyssis.org> On Wednesday 05 November 2008 17:25:56 Steve Polyack wrote: > Tijl Coosemans wrote: >> On Wednesday 05 November 2008 15:35:21 Steve Polyack wrote: >>> So I've done some more testing of this with various linux_base-* >>> installs. Youtube and most things (google maps) work with sound just >>> fine for a few seconds, but after trying to interact or letting them go >>> for a few minute they begin to rapidly eat up main memory. >>> npviewer.bin's usage will top out somewhere around 300-450MB before it >>> core dumps: pid 77684 (npviewer.bin), uid 1042: exited on signal 11 >>> (core dumped). This is on FreeBSD 7-STABLE i386 (as of Tue Oct 28) with >>> native Firefox 3.0.3 still. >> >> Do you have this with linux-firefox? > > Yes, I have the same behavior when using linux-firefox 2.0.17 from ports. Ok, so it's not a problem with npviewer.bin then. It's possible that when it's eating memory it's already coredumping. I've noticed that coredumps are generally a LOT bigger with 2.6.16 emulation compared to 2.4.2. From ed at 80386.nl Fri Nov 7 03:12:03 2008 From: ed at 80386.nl (Ed Schouten) Date: Fri Nov 7 03:12:17 2008 Subject: Request for review: uname(), setdomainname(), getdomainname() cleanups Message-ID: <20081107111201.GH1165@hoeg.nl> Skipped content of type multipart/mixed-------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 195 bytes Desc: not available Url : http://lists.freebsd.org/pipermail/freebsd-emulation/attachments/20081107/a822179c/attachment.pgp From rdivacky at FreeBSD.org Fri Nov 7 03:34:37 2008 From: rdivacky at FreeBSD.org (Roman Divacky) Date: Fri Nov 7 03:34:43 2008 Subject: Request for review: uname(), setdomainname(), getdomainname() cleanups In-Reply-To: <20081107111201.GH1165@hoeg.nl> References: <20081107111201.GH1165@hoeg.nl> Message-ID: <20081107111305.GA71431@freebsd.org> On Fri, Nov 07, 2008 at 12:12:01PM +0100, Ed Schouten wrote: > Hello all, > > I just wrote this patch and I thought I'd better send it to the lists, > because it affects a lot of random things (Linux emulation, priv(9) > flags, etc). > > Looking at kern_xxx.c, I see we've got a couple of functions there that > actually have to be #ifdef'd with COMPAT_*, while they aren't. Looking > at our CVS repository I can already confirm we don't need to implement > uname(), setdomainname() and getdomainname() on RELENG_5 and later, so I > put them in COMPAT_FREEBSD4. They are implemented as library routines > nowdays. I think they could even be marked as COMPAT_43, but just to be > sure I picked COMPAT_FREEBSD4. > > Below is a list of things of interest: > > - I noticed we have a PRIV_SETDOMAINNAME, but we don't use it inside > sysctl_domainname(). This means that you can bypass PRIV_SETDOMAINNAME > anyway, so remove it. > > - I think it's better if we just implement getdomainname() and > setdomainname() by calling userland_sysctl(). This makes it less > likely to break if we would ever change sysctl_domainname() in > kern_mib.c. > > - To make the linuxolator compile without enabling COMPAT_FREEBSD4, I > added a linux_setdomainname(). I also noticed linux_sethostname() > called userland_sysctl() without holding Giant. > > - It wasn't easy to make uname(), setdomainname() and getdomainname() > work in COMPAT_FREEBSD32, because we would actually need a > "COMPAT4+NOPROTO" option for syscalls.master. Because these system > calls aren't likely to be used, I just disabled them. If it turns out > we really need them, we could reintroduce them. > > Any comments? If not, I'll commit it to SVN in a day or two. Thanks! I just quickly looked at it but I think it's correct and I like the patch. OK from me From avg at icyb.net.ua Fri Nov 7 09:58:01 2008 From: avg at icyb.net.ua (Andriy Gapon) Date: Fri Nov 7 09:58:08 2008 Subject: /etc/rc.d/abi: can't understand linux_start Message-ID: <49147E9B.4050109@icyb.net.ua> FreeBSD 7.1-PRERELEASE r184741 amd64 Fresh install. I see the following in /etc/rc.d/abi: linux_start() { local _tmpdir echo -n ' linux' load_kld -e 'linux(aout|elf)' linux if [ -x /compat/linux/sbin/ldconfigDisabled ]; then ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ So we run linux ldconfig and create linux ld.so.cache only if there is executable file ldconfigDisabled? I have linux_base-f7-7 installed and there is no such file and skype can't find required shared libs. If I manually run ldconfig, then skype is happy. _tmpdir=`mktemp -d -t linux-ldconfig` /compat/linux/sbin/ldconfig -C ${_tmpdir}/ld.so.cache if ! cmp -s ${_tmpdir}/ld.so.cache /compat/linux/etc/ld.so.cache; then cat ${_tmpdir}/ld.so.cache > /compat/linux/etc/ld.so.cache fi rm -rf ${_tmpdir} fi } -- Andriy Gapon From bsam at ipt.ru Fri Nov 7 12:23:09 2008 From: bsam at ipt.ru (Boris Samorodov) Date: Fri Nov 7 12:23:16 2008 Subject: /etc/rc.d/abi: can't understand linux_start In-Reply-To: <49147E9B.4050109@icyb.net.ua> (Andriy Gapon's message of "Fri\, 07 Nov 2008 19\:44\:59 +0200") References: <49147E9B.4050109@icyb.net.ua> Message-ID: <12918453@bs1.sp34.ru> Andriy Gapon writes: > FreeBSD 7.1-PRERELEASE r184741 amd64 > Fresh install. > > > I see the following in /etc/rc.d/abi: > > linux_start() > { > local _tmpdir > > echo -n ' linux' > load_kld -e 'linux(aout|elf)' linux > if [ -x /compat/linux/sbin/ldconfigDisabled ]; then > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > So we run linux ldconfig and create linux ld.so.cache only if there is > executable file ldconfigDisabled? > I have linux_base-f7-7 installed and there is no such file and skype > can't find required shared libs. If I manually run ldconfig, then skype > is happy. Here is some info (look at rev. 1.7): http://www.freebsd.org/cgi/cvsweb.cgi/src/etc/rc.d/abi > _tmpdir=`mktemp -d -t linux-ldconfig` > /compat/linux/sbin/ldconfig -C ${_tmpdir}/ld.so.cache > if ! cmp -s ${_tmpdir}/ld.so.cache > /compat/linux/etc/ld.so.cache; then > cat ${_tmpdir}/ld.so.cache > > /compat/linux/etc/ld.so.cache > fi > rm -rf ${_tmpdir} > fi > } WBR -- Boris Samorodov (bsam) Research Engineer, http://www.ipt.ru Telephone & Internet SP FreeBSD committer, http://www.FreeBSD.org The Power To Serve From nox at jelal.kn-bremen.de Fri Nov 7 13:46:44 2008 From: nox at jelal.kn-bremen.de (Juergen Lock) Date: Fri Nov 7 13:46:51 2008 Subject: first tests of qemu svn r5646 on FreeBSD - usb still slow, bsd-user doesn't build, some warnings... Message-ID: <20081107214438.GA27376@saturn.kn-bremen.de> Hi! I just prepared another experimental emulators/qemu-devel port update, http://people.freebsd.org/~nox/qemu/qemu-devel-20081107.patch I haven't tested it that much yet (you are welcome to help there! :) but so far didn't notice much changes compared to last time (r5499), usb is still slow with my Linux 2.6.26 guest (probably to be expected, nothing committed there since.) In other news: The new sparc64-bsd-user target doesn't build because SYSCALL_G7RFLAG and SYSCALL_G2RFLAG are undefined, and I noticed a few warnings that may be interesting: ... block-vvfat.c: In function `check_directory_consistency': block-vvfat.c:1779: warning: 'cluster_count' might be used uninitialized in this function ... In file included from /usr/ports/emulators/qemu-devel/work/qemu-snapshot-2008-11 -07_18/hw/fmopl.c:43: /usr/ports/emulators/qemu-devel/work/qemu-snapshot-2008-11-07_18/hw/fmopl.h:32:5: warning: "BUILD_Y8950" is not defined /usr/ports/emulators/qemu-devel/work/qemu-snapshot-2008-11-07_18/hw/fmopl.h:115:5: warning: "BUILD_Y8950" is not defined /usr/ports/emulators/qemu-devel/work/qemu-snapshot-2008-11-07_18/hw/fmopl.c:816:5: warning: "BUILD_Y8950" is not defined /usr/ports/emulators/qemu-devel/work/qemu-snapshot-2008-11-07_18/hw/fmopl.c:1101:5: warning: "BUILD_Y8950" is not defined /usr/ports/emulators/qemu-devel/work/qemu-snapshot-2008-11-07_18/hw/fmopl.c:1193:5: warning: "BUILD_Y8950" is not defined /usr/ports/emulators/qemu-devel/work/qemu-snapshot-2008-11-07_18/hw/fmopl.c:1220:5: warning: "BUILD_Y8950" is not defined /usr/ports/emulators/qemu-devel/work/qemu-snapshot-2008-11-07_18/hw/fmopl.c:1230:5: warning: "BUILD_Y8950" is not defined /usr/ports/emulators/qemu-devel/work/qemu-snapshot-2008-11-07_18/hw/fmopl.c:1294:5: warning: "BUILD_Y8950" is not defined ... In file included from /usr/ports/emulators/qemu-devel/work/qemu-snapshot-2008-11-07_18/hw/adlib.c:51: /usr/ports/emulators/qemu-devel/work/qemu-snapshot-2008-11-07_18/hw/fmopl.h:32:5: warning: "BUILD_Y8950" is not defined /usr/ports/emulators/qemu-devel/work/qemu-snapshot-2008-11-07_18/hw/fmopl.h:115:5: warning: "BUILD_Y8950" is not defined ... /usr/ports/emulators/qemu-devel/work/qemu-snapshot-2008-11-07_18/target-i386/hel per.c: In function `cpu_x86_cpuid': /usr/ports/emulators/qemu-devel/work/qemu-snapshot-2008-11-07_18/target-i386/helper.c:1353: warning: implicit declaration of function `host_cpuid' ... /usr/ports/emulators/qemu-devel/work/qemu-snapshot-2008-11-07_18/hw/sh7750.c: In function `sh7750_mem_readb': /usr/ports/emulators/qemu-devel/work/qemu-snapshot-2008-11-07_18/hw/sh7750.c:204: warning: control reaches end of non-void function /usr/ports/emulators/qemu-devel/work/qemu-snapshot-2008-11-07_18/hw/sh7750.c: In function `sh7750_mem_readw': /usr/ports/emulators/qemu-devel/work/qemu-snapshot-2008-11-07_18/hw/sh7750.c:227: warning: control reaches end of non-void function /usr/ports/emulators/qemu-devel/work/qemu-snapshot-2008-11-07_18/hw/sh7750.c: In function `sh7750_mem_readl': /usr/ports/emulators/qemu-devel/work/qemu-snapshot-2008-11-07_18/hw/sh7750.c:262: warning: control reaches end of non-void function ... /usr/ports/emulators/qemu-devel/work/qemu-snapshot-2008-11-07_18/hw/sh_intc.c: In function `sh_intc_get_pending_vector': /usr/ports/emulators/qemu-devel/work/qemu-snapshot-2008-11-07_18/hw/sh_intc.c:100: warning: control reaches end of non-void function Oh and I also found the SMBD_COMMAND #defines in vl.c are not needed anymore, the relevant code has moved to net.c . (I had to fix up a bunch of patches in the FreeBSD port because of the moved code, like the pcap and ppbus ones, testing is also welcome there.) Thanx, Juergen From balrogg at gmail.com Fri Nov 7 14:16:42 2008 From: balrogg at gmail.com (andrzej zaborowski) Date: Fri Nov 7 14:16:48 2008 Subject: [Qemu-devel] first tests of qemu svn r5646 on FreeBSD - usb still slow, bsd-user doesn't build, some warnings... In-Reply-To: <20081107214438.GA27376@saturn.kn-bremen.de> References: <20081107214438.GA27376@saturn.kn-bremen.de> Message-ID: 2008/11/7 Juergen Lock : > I just prepared another experimental emulators/qemu-devel port update, > http://people.freebsd.org/~nox/qemu/qemu-devel-20081107.patch Great. > I haven't tested it that much yet (you are welcome to help there! :) > but so far didn't notice much changes compared to last time (r5499), > usb is still slow with my Linux 2.6.26 guest (probably to be expected, > nothing committed there since.) Could you test with the patch in http://lists.gnu.org/archive/html/qemu-devel/2008-10/msg01326.html ? Max Krasnyanski supposed it may contain the fix, I had no time to test it yet. Cheers From nox at jelal.kn-bremen.de Fri Nov 7 16:19:44 2008 From: nox at jelal.kn-bremen.de (Juergen Lock) Date: Fri Nov 7 16:19:50 2008 Subject: [Qemu-devel] first tests of qemu svn r5646 on FreeBSD - usb still slow, bsd-user doesn't build, some warnings... In-Reply-To: References: <20081107214438.GA27376@saturn.kn-bremen.de> Message-ID: <200811080018.mA80I9Xl033878@saturn.kn-bremen.de> In article you write: >2008/11/7 Juergen Lock : >> I just prepared another experimental emulators/qemu-devel port update, >> http://people.freebsd.org/~nox/qemu/qemu-devel-20081107.patch > >Great. > >> I haven't tested it that much yet (you are welcome to help there! :) >> but so far didn't notice much changes compared to last time (r5499), >> usb is still slow with my Linux 2.6.26 guest (probably to be expected, >> nothing committed there since.) > >Could you test with the patch in >http://lists.gnu.org/archive/html/qemu-devel/2008-10/msg01326.html ? >Max Krasnyanski supposed it may contain the fix, I had no time to test >it yet. Maybe you should, because I can't get that patch to work here, neither -usbdevice net:.. nor adding it or a disk: later (via usb_add) works, I can't talk to any of them. I even tried rmmod uhci_hcd (in that Linux 2.6.26 guest again) in case it might have been in the way, but no go... And now I tried a FreeBSD 7.1 beta guest with usb_add disk: (net: never worked with FreeBSD guests for me), that guest also didn't see it. Maybe you have more luck... Juergen From nox at jelal.kn-bremen.de Fri Nov 7 16:39:40 2008 From: nox at jelal.kn-bremen.de (Juergen Lock) Date: Fri Nov 7 16:39:47 2008 Subject: [Qemu-devel] first tests of qemu svn r5646 on FreeBSD - usb still slow, bsd-user doesn't build, some warnings... In-Reply-To: <200811080018.mA80I9Xl033878@saturn.kn-bremen.de> References: <20081107214438.GA27376@saturn.kn-bremen.de> <200811080018.mA80I9Xl033878@saturn.kn-bremen.de> Message-ID: <20081108003904.GA34804@saturn.kn-bremen.de> On Sat, Nov 08, 2008 at 01:18:09AM +0100, I wrote: > In article you write: > >2008/11/7 Juergen Lock : > >> I just prepared another experimental emulators/qemu-devel port update, > >> http://people.freebsd.org/~nox/qemu/qemu-devel-20081107.patch > > > >Great. > > > >> I haven't tested it that much yet (you are welcome to help there! :) > >> but so far didn't notice much changes compared to last time (r5499), > >> usb is still slow with my Linux 2.6.26 guest (probably to be expected, > >> nothing committed there since.) > > > >Could you test with the patch in > >http://lists.gnu.org/archive/html/qemu-devel/2008-10/msg01326.html ? > >Max Krasnyanski supposed it may contain the fix, I had no time to test > >it yet. > > Maybe you should, because I can't get that patch to work here, neither > -usbdevice net:.. nor adding it or a disk: later (via usb_add) works, > I can't talk to any of them. I even tried rmmod uhci_hcd (in that > Linux 2.6.26 guest again) in case it might have been in the way, but > no go... > > And now I tried a FreeBSD 7.1 beta guest with usb_add disk: (net: never > worked with FreeBSD guests for me), that guest also didn't see it. > > Maybe you have more luck... > Juergen I forgot to say I had to manually kill a few stray newlines in that patch, even tho I grabbed it out of my local list archive that doesn't mangle posts. Maybe there was more damage? Just thinking... Juergen From balrogg at gmail.com Fri Nov 7 16:42:54 2008 From: balrogg at gmail.com (andrzej zaborowski) Date: Fri Nov 7 16:43:01 2008 Subject: [Qemu-devel] first tests of qemu svn r5646 on FreeBSD - usb still slow, bsd-user doesn't build, some warnings... In-Reply-To: <20081108003904.GA34804@saturn.kn-bremen.de> References: <20081107214438.GA27376@saturn.kn-bremen.de> <200811080018.mA80I9Xl033878@saturn.kn-bremen.de> <20081108003904.GA34804@saturn.kn-bremen.de> Message-ID: 2008/11/8 Juergen Lock : > On Sat, Nov 08, 2008 at 01:18:09AM +0100, I wrote: >> In article you write: >> >2008/11/7 Juergen Lock : >> >> I just prepared another experimental emulators/qemu-devel port update, >> >> http://people.freebsd.org/~nox/qemu/qemu-devel-20081107.patch >> > >> >Great. >> > >> >> I haven't tested it that much yet (you are welcome to help there! :) >> >> but so far didn't notice much changes compared to last time (r5499), >> >> usb is still slow with my Linux 2.6.26 guest (probably to be expected, >> >> nothing committed there since.) >> > >> >Could you test with the patch in >> >http://lists.gnu.org/archive/html/qemu-devel/2008-10/msg01326.html ? >> >Max Krasnyanski supposed it may contain the fix, I had no time to test >> >it yet. >> >> Maybe you should, because I can't get that patch to work here, neither >> -usbdevice net:.. nor adding it or a disk: later (via usb_add) works, >> I can't talk to any of them. I even tried rmmod uhci_hcd (in that >> Linux 2.6.26 guest again) in case it might have been in the way, but >> no go... >> >> And now I tried a FreeBSD 7.1 beta guest with usb_add disk: (net: never >> worked with FreeBSD guests for me), that guest also didn't see it. >> >> Maybe you have more luck... >> Juergen > > I forgot to say I had to manually kill a few stray newlines in that > patch, even tho I grabbed it out of my local list archive that doesn't > mangle posts. Maybe there was more damage? Ah, nope, it changes the default usb host for PC to ehci.. that's not the change I wanted to test. Anyway, it seems the change I had in mind is in the passthrough code so it can't fix the regression in emulated devices.. sorry, I had not read the patch fully. Cheers From blauwirbel at gmail.com Fri Nov 7 23:16:44 2008 From: blauwirbel at gmail.com (Blue Swirl) Date: Fri Nov 7 23:16:52 2008 Subject: [Qemu-devel] first tests of qemu svn r5646 on FreeBSD - usb still slow, bsd-user doesn't build, some warnings... In-Reply-To: <20081107214438.GA27376@saturn.kn-bremen.de> References: <20081107214438.GA27376@saturn.kn-bremen.de> Message-ID: On 11/7/08, Juergen Lock wrote: > Hi! > > I just prepared another experimental emulators/qemu-devel port update, > http://people.freebsd.org/~nox/qemu/qemu-devel-20081107.patch > I haven't tested it that much yet (you are welcome to help there! :) > but so far didn't notice much changes compared to last time (r5499), > usb is still slow with my Linux 2.6.26 guest (probably to be expected, > nothing committed there since.) The patch is against a bunch of patches, which makes it hard to see what has really changed. Could you make an updated set of patches available somewhere? At least osdep.c and qemu-char.c patches look reasonable enough to be committed. > In other news: The new sparc64-bsd-user target doesn't build because > SYSCALL_G7RFLAG and SYSCALL_G2RFLAG are undefined, and I noticed a few > warnings that may be interesting: The attached patch should fix the undefined flag problem, please test. From nox at jelal.kn-bremen.de Sun Nov 9 08:39:47 2008 From: nox at jelal.kn-bremen.de (Juergen Lock) Date: Sun Nov 9 08:39:58 2008 Subject: [Qemu-devel] first tests of qemu svn r5646 on FreeBSD - usb still slow, bsd-user doesn't build, some warnings... In-Reply-To: References: <20081107214438.GA27376@saturn.kn-bremen.de> Message-ID: <200811091637.mA9Gbb5t034814@saturn.kn-bremen.de> In article you write: >On 11/7/08, Juergen Lock wrote: >> Hi! >> >> I just prepared another experimental emulators/qemu-devel port update, >> http://people.freebsd.org/~nox/qemu/qemu-devel-20081107.patch >> I haven't tested it that much yet (you are welcome to help there! :) >> but so far didn't notice much changes compared to last time (r5499), >> usb is still slow with my Linux 2.6.26 guest (probably to be expected, >> nothing committed there since.) > >The patch is against a bunch of patches, which makes it hard to see >what has really changed. Could you make an updated set of patches >available somewhere? At least osdep.c and qemu-char.c patches look >reasonable enough to be committed. > I'll add a shar of the 20081107 qemu-devel port's files/*patch* below, (yes most of these probably shouldn't be merged... The ones named *-patch are conditionally applied depending on user-set OPTIONS.) Oh and btw the osdep.c patch was already posted here, see http://lists.gnu.org/archive/html/qemu-devel/2008-10/msg00038.html >> In other news: The new sparc64-bsd-user target doesn't build because >> SYSCALL_G7RFLAG and SYSCALL_G2RFLAG are undefined, and I noticed a few >> warnings that may be interesting: > >The attached patch should fix the undefined flag problem, please test. Nope, still two of them left at line 219ff. :) Here comes the shar: # This is a shell archive. Save it in a file, remove anything before # this line, and then unpack it by entering "sh file". Note, it may # create directories; files and directories will be owned by you and # have default permissions. # # This archive contains: # # files/ # files/cdrom-dma-patch # files/patch-90_security # files/patch-CVE-2008-0928 # files/patch-CVE-2008-4539 # files/patch-Makefile # files/patch-aa # files/patch-ac # files/patch-audio-4 # files/patch-audio-sdlaudio.c # files/patch-bc # files/patch-bd # files/patch-be # files/patch-bf # files/patch-bg # files/patch-block.c # files/patch-bsdusb.patch # files/patch-bt # files/patch-configure # files/patch-cpu-exec.c # files/patch-emulate-aio # files/patch-exec-all.h # files/patch-exec.c # files/patch-fbsd # files/patch-fix_bsd_user_fbsd # files/patch-fpu-softfloat-native.c # files/patch-hw-eepro100.c # files/patch-hw-vmware_vga.c # files/patch-libmath # files/patch-libmath2 # files/patch-libmath4 # files/patch-osdep.c # files/patch-qemu-doc.texi # files/patch-target-i386-translate.c # files/patch-target-mips-cpu.h # files/patch-tcg-i386-tcg-target.c # files/patch-vl.c # files/patch-vl.c-ppbus # files/patch-vl.c-serial # files/patch-x_keymap.c # files/pcap-patch # files/rtl8139-re-patch # echo c - files/ mkdir -p files/ > /dev/null 2>&1 echo x - files/cdrom-dma-patch sed 's/^X//' >files/cdrom-dma-patch << 'END-of-files/cdrom-dma-patch' XIndex: hw/ide.c X@@ -27,7 +27,7 @@ X //#define DEBUG_IDE X //#define DEBUG_IDE_ATAPI X //#define DEBUG_AIO X-#define USE_DMA_CDROM X+// #define USE_DMA_CDROM X X /* Bits of HD_STATUS */ X #define ERR_STAT 0x01 END-of-files/cdrom-dma-patch echo x - files/patch-90_security sed 's/^X//' >files/patch-90_security << 'END-of-files/patch-90_security' XIndex: qemu-0.8.2/hw/dma.c X=================================================================== X--- qemu-0.8.2.orig/hw/dma.c 2006-07-22 20:23:34.000000000 +0300 X+++ qemu-0.8.2/hw/dma.c 2007-04-20 06:05:59.000000000 +0300 X@@ -340,9 +340,11 @@ static void channel_run (int ncont, int X #endif X X r = dma_controllers[ncont].regs + ichan; X- n = r->transfer_handler (r->opaque, ichan + (ncont << 2), X- r->now[COUNT], (r->base[COUNT] + 1) << ncont); X- r->now[COUNT] = n; X+ if (r->transfer_handler) { X+ n = r->transfer_handler (r->opaque, ichan + (ncont << 2), X+ r->now[COUNT], (r->base[COUNT] + 1) << ncont); X+ r->now[COUNT] = n; X+ } X ldebug ("dma_pos %d size %d\n", n, (r->base[COUNT] + 1) << ncont); X } X XIndex: qemu/hw/fdc.c X@@ -1322,7 +1322,8 @@ X fd_sector(cur_drv)); X return 0; X } X- if (bdrv_read(cur_drv->bs, fd_sector(cur_drv), fdctrl->fifo, 1) < 0) { X+ if (cur_drv->bs == NULL || X+ bdrv_read(cur_drv->bs, fd_sector(cur_drv), fdctrl->fifo, 1) < 0) { X FLOPPY_DPRINTF("error getting sector %d\n", X fd_sector(cur_drv)); X /* Sure, image size is too small... */ X@@ -1776,7 +1777,8 @@ X if (pos == FD_SECTOR_LEN - 1 || X fdctrl->data_pos == fdctrl->data_len) { X cur_drv = get_cur_drv(fdctrl); X- if (bdrv_write(cur_drv->bs, fd_sector(cur_drv), fdctrl->fifo, 1) < 0) { X+ if (cur_drv->bs == NULL || X+ bdrv_write(cur_drv->bs, fd_sector(cur_drv), fdctrl->fifo, 1) < 0) { X FLOPPY_ERROR("writing sector %d\n", fd_sector(cur_drv)); X return; X } XIndex: qemu-0.8.2/hw/pc.c X=================================================================== X--- qemu-0.8.2.orig/hw/pc.c 2007-04-20 06:05:58.000000000 +0300 X+++ qemu-0.8.2/hw/pc.c 2007-04-20 06:05:59.000000000 +0300 X@@ -312,7 +312,8 @@ void bochs_bios_write(void *opaque, uint X case 0x400: X case 0x401: X fprintf(stderr, "BIOS panic at rombios.c, line %d\n", val); X- exit(1); X+ /* according to documentation, these can be safely ignored */ X+ break; X case 0x402: X case 0x403: X #ifdef DEBUG_BIOS X@@ -335,8 +336,9 @@ void bochs_bios_write(void *opaque, uint X /* LGPL'ed VGA BIOS messages */ X case 0x501: X case 0x502: X+ /* according to documentation, these can be safely ignored */ X fprintf(stderr, "VGA BIOS panic, line %d\n", val); X- exit(1); X+ break; X case 0x500: X case 0x503: X #ifdef DEBUG_BIOS XIndex: qemu-0.8.2/hw/sb16.c X=================================================================== X--- qemu-0.8.2.orig/hw/sb16.c 2006-07-22 20:23:34.000000000 +0300 X+++ qemu-0.8.2/hw/sb16.c 2007-04-20 06:05:59.000000000 +0300 X@@ -1235,8 +1235,10 @@ static int SB_read_DMA (void *opaque, in X s->block_size); X #endif X X- while (s->left_till_irq <= 0) { X- s->left_till_irq = s->block_size + s->left_till_irq; X+ if (s->block_size) { X+ while (s->left_till_irq <= 0) { X+ s->left_till_irq = s->block_size + s->left_till_irq; X+ } X } X X return dma_pos; XIndex: qemu-0.8.2/slirp/slirp.c X=================================================================== X--- qemu-0.8.2.orig/slirp/slirp.c 2006-07-22 20:23:34.000000000 +0300 X+++ qemu-0.8.2/slirp/slirp.c 2007-04-20 06:05:59.000000000 +0300 X@@ -611,6 +611,10 @@ void slirp_input(const uint8_t *pkt, int X if (!m) X return; X /* Note: we add to align the IP header */ X+ /* taviso: large values in ne2k TCNT register may exceed msize on transmit */ X+ if (M_FREEROOM(m) < pkt_len + 2) { X+ m_inc(m, pkt_len + 2); X+ } X m->m_len = pkt_len + 2; X memcpy(m->m_data + 2, pkt, pkt_len); X XIndex: qemu-0.8.2/target-i386/translate.c X=================================================================== X--- qemu-0.8.2.orig/target-i386/translate.c 2006-07-22 20:23:34.000000000 +0300 X+++ qemu-0.8.2/target-i386/translate.c 2007-04-20 06:05:59.000000000 +0300 X@@ -5292,6 +5297,7 @@ static target_ulong disas_insn(DisasCont X gen_jmp_im(pc_start - s->cs_base); X gen_op_into(s->pc - pc_start); X break; X+#ifdef WANT_ICEBP X case 0xf1: /* icebp (undocumented, exits to external debugger) */ X #if 1 X gen_debug(s, pc_start - s->cs_base); X@@ -5301,6 +5307,7 @@ static target_ulong disas_insn(DisasCont X cpu_set_log(CPU_LOG_INT | CPU_LOG_TB_IN_ASM); X #endif X break; X+#endif /* icebp */ X case 0xfa: /* cli */ X if (!s->vm86) { X if (s->cpl <= s->iopl) { XIndex: qemu-0.8.2/net.c X@@ -3139,8 +3139,8 @@ typedef struct NetSocketState { X VLANClientState *vc; X int fd; X int state; /* 0 = getting length, 1 = getting data */ X- int index; X- int packet_len; X+ unsigned int index; X+ unsigned int packet_len; X uint8_t buf[4096]; X struct sockaddr_in dgram_dst; /* contains inet host and port destination iff connectionless (SOCK_DGRAM) */ X } NetSocketState; X@@ -3171,7 +3171,8 @@ static void net_socket_receive_dgram(voi X static void net_socket_send(void *opaque) X { X NetSocketState *s = opaque; X- int l, size, err; X+ int size, err; X+ unsigned l; X uint8_t buf1[4096]; X const uint8_t *buf; X X@@ -3210,7 +3211,15 @@ static void net_socket_send(void *opaque X l = s->packet_len - s->index; X if (l > size) X l = size; X- memcpy(s->buf + s->index, buf, l); X+ if (s->index + l <= sizeof(s->buf)) { X+ memcpy(s->buf + s->index, buf, l); X+ } else { X+ fprintf(stderr, "serious error: oversized packet received," X+ "connection terminated.\n"); X+ s->state = 0; X+ goto eoc; X+ } X+ X s->index += l; X buf += l; X size -= l; XIndex: qemu/block.c X@@ -539,8 +539,15 @@ X return -ENOMEDIUM; X if (bs->read_only) X return -EACCES; X+ if (sector_num < 0) X+ return -EACCES; X if (sector_num == 0 && bs->boot_sector_enabled && nb_sectors > 0) { X memcpy(bs->boot_sector_data, buf, 512); X+ } X+ { X+ unsigned int ns = sector_num * 512; X+ if (ns < 0) X+ return -EACCES; X } X if (drv->bdrv_pwrite) { X int ret, len; XIndex: qemu/hw/i8259.c X@@ -302,7 +302,8 @@ X s->init4 = val & 1; X s->single_mode = val & 2; X if (val & 0x08) X- hw_error("level sensitive irq not supported"); X+ /* hw_error("level sensitive irq not supported"); */ X+ return; X } else if (val & 0x08) { X if (val & 0x04) X s->poll = 1; END-of-files/patch-90_security echo x - files/patch-CVE-2008-0928 sed 's/^X//' >files/patch-CVE-2008-0928 << 'END-of-files/patch-CVE-2008-0928' XIndex: qemu/block-qcow.c X=================================================================== XRCS file: /sources/qemu/qemu/block-qcow.c,v Xretrieving revision 1.15 Xretrieving revision 1.16 Xdiff -u -p -u -p -r1.15 -r1.16 X--- block-qcow.c 11 Nov 2007 02:51:16 -0000 1.15 X+++ block-qcow.c 11 Mar 2008 17:17:58 -0000 1.16 X@@ -95,7 +95,7 @@ static int qcow_open(BlockDriverState *b X int len, i, shift, ret; X QCowHeader header; X X- ret = bdrv_file_open(&s->hd, filename, flags); X+ ret = bdrv_file_open(&s->hd, filename, flags | BDRV_O_AUTOGROW); X if (ret < 0) X return ret; X if (bdrv_pread(s->hd, 0, &header, sizeof(header)) != sizeof(header)) XIndex: qemu/block-qcow2.c X=================================================================== XRCS file: /sources/qemu/qemu/block-qcow2.c,v Xretrieving revision 1.10 Xretrieving revision 1.11 Xdiff -u -p -u -p -r1.10 -r1.11 X--- block-qcow2.c 11 Nov 2007 02:51:16 -0000 1.10 X+++ block-qcow2.c 11 Mar 2008 17:17:58 -0000 1.11 X@@ -191,7 +191,7 @@ static int qcow_open(BlockDriverState *b X int len, i, shift, ret; X QCowHeader header; X X- ret = bdrv_file_open(&s->hd, filename, flags); X+ ret = bdrv_file_open(&s->hd, filename, flags | BDRV_O_AUTOGROW); X if (ret < 0) X return ret; X if (bdrv_pread(s->hd, 0, &header, sizeof(header)) != sizeof(header)) XIndex: qemu/block-vmdk.c X=================================================================== XRCS file: /sources/qemu/qemu/block-vmdk.c,v Xretrieving revision 1.19 Xretrieving revision 1.20 Xdiff -u -p -u -p -r1.19 -r1.20 X--- block-vmdk.c 14 Jan 2008 03:48:37 -0000 1.19 X+++ block-vmdk.c 11 Mar 2008 17:17:58 -0000 1.20 X@@ -378,7 +378,7 @@ static int vmdk_open(BlockDriverState *b X flags = BDRV_O_RDONLY; X fprintf(stderr, "(VMDK) image open: flags=0x%x filename=%s\n", flags, bs->filename); X X- ret = bdrv_file_open(&s->hd, filename, flags); X+ ret = bdrv_file_open(&s->hd, filename, flags | BDRV_O_AUTOGROW); X if (ret < 0) X return ret; X if (bdrv_pread(s->hd, 0, &magic, sizeof(magic)) != sizeof(magic)) XIndex: qemu/block.c X=================================================================== XRCS file: /sources/qemu/qemu/block.c,v Xretrieving revision 1.54 Xretrieving revision 1.55 Xdiff -u -p -u -p -r1.54 -r1.55 X--- block.c 10 Mar 2008 00:05:34 -0000 1.54 X+++ block.c 11 Mar 2008 17:17:58 -0000 1.55 X@@ -123,6 +123,60 @@ void path_combine(char *dest, int dest_s X } X } X X+static int bdrv_rd_badreq_sectors(BlockDriverState *bs, X+ int64_t sector_num, int nb_sectors) X+{ X+ return X+ nb_sectors < 0 || X+ sector_num < 0 || X+ nb_sectors > bs->total_sectors || X+ sector_num > bs->total_sectors - nb_sectors; X+} X+ X+static int bdrv_rd_badreq_bytes(BlockDriverState *bs, X+ int64_t offset, int count) X+{ X+ int64_t size = bs->total_sectors << SECTOR_BITS; X+ return X+ count < 0 || X+ size < 0 || X+ count > size || X+ offset > size - count; X+} X+ X+static int bdrv_wr_badreq_sectors(BlockDriverState *bs, X+ int64_t sector_num, int nb_sectors) X+{ X+ if (sector_num < 0 || X+ nb_sectors < 0) X+ return 1; X+ X+ if (sector_num > bs->total_sectors - nb_sectors) { X+ if (bs->autogrow) X+ bs->total_sectors = sector_num + nb_sectors; X+ else X+ return 1; X+ } X+ return 0; X+} X+ X+static int bdrv_wr_badreq_bytes(BlockDriverState *bs, X+ int64_t offset, int count) X+{ X+ int64_t size = bs->total_sectors << SECTOR_BITS; X+ if (count < 0 || X+ offset < 0) X+ return 1; X+ X+ if (offset > size - count) { X+ if (bs->autogrow) X+ bs->total_sectors = (offset + count + SECTOR_SIZE - 1) >> SECTOR_BITS; X+ else X+ return 1; X+ } X+ return 0; X+} X+ X X static void bdrv_register(BlockDriver *bdrv) X { X@@ -335,6 +389,10 @@ int bdrv_open2(BlockDriverState *bs, con X bs->read_only = 0; X bs->is_temporary = 0; X bs->encrypted = 0; X+ bs->autogrow = 0; X+ X+ if (flags & BDRV_O_AUTOGROW) X+ bs->autogrow = 1; X X if (flags & BDRV_O_SNAPSHOT) { X BlockDriverState *bs1; X@@ -379,6 +437,7 @@ int bdrv_open2(BlockDriverState *bs, con X } X bs->drv = drv; X bs->opaque = qemu_mallocz(drv->instance_size); X+ bs->total_sectors = 0; /* driver will set if it does not do getlength */ X if (bs->opaque == NULL && drv->instance_size > 0) X return -1; X /* Note: for compatibility, we open disk image files as RDWR, and X@@ -444,6 +503,7 @@ void bdrv_close(BlockDriverState *bs) X bs->drv = NULL; X X /* call the change callback */ X+ bs->total_sectors = 0; X bs->media_changed = 1; X if (bs->change_cb) X bs->change_cb(bs->change_opaque); X@@ -509,6 +569,8 @@ int bdrv_read(BlockDriverState *bs, int6 X if (!drv) X return -ENOMEDIUM; X X+ if (bdrv_rd_badreq_sectors(bs, sector_num, nb_sectors)) X+ return -EDOM; X if (sector_num == 0 && bs->boot_sector_enabled && nb_sectors > 0) { X memcpy(buf, bs->boot_sector_data, 512); X sector_num++; X@@ -549,6 +611,8 @@ int bdrv_write(BlockDriverState *bs, int X return -ENOMEDIUM; X if (bs->read_only) X return -EACCES; X+ if (bdrv_wr_badreq_sectors(bs, sector_num, nb_sectors)) X+ return -EDOM; X if (sector_num == 0 && bs->boot_sector_enabled && nb_sectors > 0) { X memcpy(bs->boot_sector_data, buf, 512); X } X@@ -674,6 +738,8 @@ int bdrv_pread(BlockDriverState *bs, int X return -ENOMEDIUM; X if (!drv->bdrv_pread) X return bdrv_pread_em(bs, offset, buf1, count1); X+ if (bdrv_rd_badreq_bytes(bs, offset, count1)) X+ return -EDOM; X return drv->bdrv_pread(bs, offset, buf1, count1); X } X X@@ -689,6 +755,8 @@ int bdrv_pwrite(BlockDriverState *bs, in X return -ENOMEDIUM; X if (!drv->bdrv_pwrite) X return bdrv_pwrite_em(bs, offset, buf1, count1); X+ if (bdrv_wr_badreq_bytes(bs, offset, count1)) X+ return -EDOM; X return drv->bdrv_pwrite(bs, offset, buf1, count1); X } X X@@ -955,6 +1023,8 @@ int bdrv_write_compressed(BlockDriverSta X return -ENOMEDIUM; X if (!drv->bdrv_write_compressed) X return -ENOTSUP; X+ if (bdrv_wr_badreq_sectors(bs, sector_num, nb_sectors)) X+ return -EDOM; X return drv->bdrv_write_compressed(bs, sector_num, buf, nb_sectors); X } X X@@ -1101,6 +1171,8 @@ BlockDriverAIOCB *bdrv_aio_read(BlockDri X X if (!drv) X return NULL; X+ if (bdrv_rd_badreq_sectors(bs, sector_num, nb_sectors)) X+ return NULL; X X /* XXX: we assume that nb_sectors == 0 is suppored by the async read */ X if (sector_num == 0 && bs->boot_sector_enabled && nb_sectors > 0) { X@@ -1132,6 +1204,8 @@ BlockDriverAIOCB *bdrv_aio_write(BlockDr X return NULL; X if (bs->read_only) X return NULL; X+ if (bdrv_wr_badreq_sectors(bs, sector_num, nb_sectors)) X+ return NULL; X if (sector_num == 0 && bs->boot_sector_enabled && nb_sectors > 0) { X memcpy(bs->boot_sector_data, buf, 512); X } XIndex: qemu/block.h X=================================================================== X@@ -49,6 +49,7 @@ X bdrv_file_open()) */ X #define BDRV_O_NOCACHE 0x0020 /* do not use the host page cache */ X #define BDRV_O_CACHE_WB 0x0040 /* use write-back caching */ X+#define BDRV_O_AUTOGROW 0x0080 /* Allow backing file to extend when writing past end of file */ X X #define BDRV_O_CACHE_MASK (BDRV_O_NOCACHE | BDRV_O_CACHE_WB) X XIndex: qemu/block_int.h X=================================================================== XRCS file: /sources/qemu/qemu/block_int.h,v Xretrieving revision 1.16 Xretrieving revision 1.17 Xdiff -u -p -u -p -r1.16 -r1.17 X--- block_int.h 24 Dec 2007 16:10:43 -0000 1.16 X+++ block_int.h 11 Mar 2008 17:17:59 -0000 1.17 X@@ -97,6 +97,7 @@ struct BlockDriverState { X int locked; /* if true, the media cannot temporarily be ejected */ X int encrypted; /* if true, the media is encrypted */ X int sg; /* if true, the device is a /dev/sg* */ X+ int autogrow; /* if true, the backing store can auto-extend to allocate new extents */ X /* event callback when inserting/removing */ X void (*change_cb)(void *opaque); X void *change_opaque; END-of-files/patch-CVE-2008-0928 echo x - files/patch-CVE-2008-4539 sed 's/^X//' >files/patch-CVE-2008-4539 << 'END-of-files/patch-CVE-2008-4539' END-of-files/patch-CVE-2008-4539 echo x - files/patch-Makefile sed 's/^X//' >files/patch-Makefile << 'END-of-files/patch-Makefile' XIndex: qemu/Makefile X@@ -17,7 +17,11 @@ X LDFLAGS += -static X endif X ifdef BUILD_DOCS X+ifdef NOPORTDOCS X+DOCS=qemu.1 qemu-img.1 qemu-nbd.8 X+else X DOCS=qemu-doc.html qemu-tech.html qemu.1 qemu-img.1 qemu-nbd.8 X+endif X else X DOCS= X endif X@@ -203,13 +211,13 @@ X common de-ch es fo fr-ca hu ja mk nl-be pt sl tr X X install-doc: $(DOCS) X+ifndef NOPORTDOCS X mkdir -p "$(DESTDIR)$(docdir)" X $(INSTALL) -m 644 qemu-doc.html qemu-tech.html "$(DESTDIR)$(docdir)" X+endif X ifndef CONFIG_WIN32 X mkdir -p "$(DESTDIR)$(mandir)/man1" X $(INSTALL) qemu.1 qemu-img.1 "$(DESTDIR)$(mandir)/man1" X- mkdir -p "$(DESTDIR)$(mandir)/man8" X- $(INSTALL) qemu-nbd.8 "$(DESTDIR)$(mandir)/man8" X endif X X install: all $(if $(BUILD_DOCS),install-doc) END-of-files/patch-Makefile echo x - files/patch-aa sed 's/^X//' >files/patch-aa << 'END-of-files/patch-aa' Xdiff -urd --exclude=CVS ../cvs/qemu/Makefile qemu-0.5.5/Makefile X--- ../cvs/qemu/Makefile Mon May 17 21:06:42 2004 X+++ qemu-0.5.5/Makefile Sun May 30 05:26:19 2004 X@@ -70,7 +70,7 @@ X X # documentation X %.html: %.texi X- texi2html -monolithic -number $< X+ -texi2html -monolithic -number $< X X qemu.1: qemu-doc.texi X ./texi2pod.pl $< qemu.pod END-of-files/patch-aa echo x - files/patch-ac sed 's/^X//' >files/patch-ac << 'END-of-files/patch-ac' XIndex: qemu/configure X@@ -540,7 +540,7 @@ X sdl_too_old=no X X if test -z "$sdl" ; then X- sdl_config="sdl-config" X+ sdl_config="${SDL_CONFIG}" X sdl=no X sdl_static=no X END-of-files/patch-ac echo x - files/patch-audio-4 sed 's/^X//' >files/patch-audio-4 << 'END-of-files/patch-audio-4' XIndex: qemu/audio/audio_template.h X@@ -32,6 +32,10 @@ X #define SW glue (SWVoice, In) X #endif X X+#ifndef UINT64_MAX X+#define UINT64_MAX ((uint64_t)(18446744073709551615ULL)) X+#endif X+ X static void glue (audio_pcm_sw_fini_, TYPE) (SW *sw) X { X glue (audio_pcm_sw_free_resources_, TYPE) (sw); XIndex: qemu/audio/audio.c X@@ -36,6 +36,10 @@ X /* #define DEBUG_LIVE */ X /* #define DEBUG_OUT */ X X+#ifndef INT16_MAX X+#define INT16_MAX (32767) X+#endif X+ X static struct audio_driver *drvtab[] = { X #ifdef CONFIG_OSS X &oss_audio_driver, END-of-files/patch-audio-4 echo x - files/patch-audio-sdlaudio.c sed 's/^X//' >files/patch-audio-sdlaudio.c << 'END-of-files/patch-audio-sdlaudio.c' END-of-files/patch-audio-sdlaudio.c echo x - files/patch-bc sed 's/^X//' >files/patch-bc << 'END-of-files/patch-bc' XIndex: qemu/i386-dis.c X@@ -2896,6 +2896,10 @@ X OP_E (bytemode, sizeflag); X } X X+#ifndef PRIx64 X+#define PRIx64 "llx" X+#endif X+ X static void X print_operand_value (buf, hex, disp) X char *buf; END-of-files/patch-bc echo x - files/patch-bd sed 's/^X//' >files/patch-bd << 'END-of-files/patch-bd' XIndex: qemu/configure X@@ -570,7 +570,7 @@ X if test -z "$prefix" ; then X prefix="/usr/local" X fi X- mansuffix="/share/man" X+ mansuffix="/man" X datasuffix="/share/qemu" X docsuffix="/share/doc/qemu" X binsuffix="/bin" END-of-files/patch-bd echo x - files/patch-be sed 's/^X//' >files/patch-be << 'END-of-files/patch-be' END-of-files/patch-be echo x - files/patch-bf sed 's/^X//' >files/patch-bf << 'END-of-files/patch-bf' XIndex: qemu/slirp/slirp_config.h X@@ -86,7 +86,7 @@ X #undef BAD_SPRINTF X X /* Define if you have readv */ X-#undef HAVE_READV X+#define HAVE_READV X X /* Define if iovec needs to be declared */ X #undef DECLARE_IOVEC X@@ -95,7 +95,7 @@ X #undef DECLARE_SPRINTF X X /* Define if you have a POSIX.1 sys/wait.h */ X-#undef HAVE_SYS_WAIT_H X+#define HAVE_SYS_WAIT_H X X /* Define if you have sys/select.h */ X #define HAVE_SYS_SELECT_H X@@ -107,7 +107,7 @@ X #define HAVE_ARPA_INET_H X X /* Define if you have sys/signal.h */ X-#undef HAVE_SYS_SIGNAL_H X+#define HAVE_SYS_SIGNAL_H X X /* Define if you have sys/stropts.h */ X #undef HAVE_SYS_STROPTS_H X@@ -180,7 +180,7 @@ X #undef HAVE_GRANTPT X X /* Define if you have fchmod */ X-#undef HAVE_FCHMOD X+#define HAVE_FCHMOD X X /* Define if you have */ X #undef HAVE_SYS_TYPES32_H END-of-files/patch-bf echo x - files/patch-bg sed 's/^X//' >files/patch-bg << 'END-of-files/patch-bg' XIndex: qemu/Makefile.target X@@ -179,7 +179,7 @@ X X ######################################################### X X-CPPFLAGS+=-D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE X+CPPFLAGS+=-D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -DSMBD_COMMAND=\"${LOCALBASE}/sbin/smbd\" -I${LOCALBASE}/include -DPREFIX=\"${PREFIX}\" X LIBS+=-lm X ifndef CONFIG_USER_ONLY X LIBS+=-lz XIndex: qemu/net.c X@@ -133,10 +133,12 @@ X X-#define DEFAULT_NETWORK_SCRIPT "/etc/qemu-ifup" X-#define DEFAULT_NETWORK_DOWN_SCRIPT "/etc/qemu-ifdown" X+#define DEFAULT_NETWORK_SCRIPT PREFIX "/etc/qemu-ifup" X+#define DEFAULT_NETWORK_DOWN_SCRIPT PREFIX "/etc/qemu-ifdown" X+#ifndef SMBD_COMMAND X #ifdef __sun__ X #define SMBD_COMMAND "/usr/sfw/sbin/smbd" X #else X #define SMBD_COMMAND "/usr/sbin/smbd" X+#endif X #endif X X //#define DEBUG_UNUSED_IOPORT END-of-files/patch-bg echo x - files/patch-block.c sed 's/^X//' >files/patch-block.c << 'END-of-files/patch-block.c' END-of-files/patch-block.c echo x - files/patch-bsdusb.patch sed 's/^X//' >files/patch-bsdusb.patch << 'END-of-files/patch-bsdusb.patch' XIndex: qemu/configure X@@ -139,6 +139,7 @@ X oss="yes" X linux="yes" X linux_user="yes" X+usb="linux" X if [ "$cpu" = "i386" -o "$cpu" = "x86_64" ] ; then X kqemu="yes" X fi X@@ -148,6 +149,7 @@ X if [ "$bsd" = "yes" ] ; then X if [ "$darwin" != "yes" ] ; then X make="gmake" X+ usb="bsd" X fi X fi X X@@ -786,6 +788,19 @@ X fi X X echo "#define CONFIG_UNAME_RELEASE \"$uname_release\"" >> $config_h X+ X+# USB host support X+case "$usb" in X+linux) X+ echo "HOST_USB=linux" >> $conig_mak X+;; X+bsd) X+ echo "HOST_USB=bsd" >> $config_mak X+;; X+*) X+ echo "HOST_USB=stub" >> $config_mak X+;; X+esac X X for target in $target_list; do X target_dir="$target" XIndex: qemu/Makefile X@@ -75,7 +75,7 @@ X OBJS+=tmp105.o lm832x.o X OBJS+=scsi-disk.o cdrom.o X OBJS+=scsi-generic.o X-OBJS+=usb.o usb-hub.o usb-linux.o usb-hid.o usb-msd.o usb-wacom.o X+OBJS+=usb.o usb-hub.o usb-$(HOST_USB).o usb-hid.o usb-msd.o usb-wacom.o X OBJS+=usb-serial.o usb-net.o X OBJS+=sd.o ssi-sd.o X XIndex: qemu/usb-stub.c X@@ -0,0 +1,11 @@ X+#include "vl.h" X+ X+void usb_host_info(void) X+{ X+ term_printf("USB host devices not supported\n"); X+} X+ X+USBDevice *usb_host_device_open(const char *devname) X+{ X+ return NULL; X+} XIndex: qemu/usb-bsd.c X@@ -0,0 +1,608 @@ X+/* X+ * BSD host USB redirector X+ * X+ * Copyright (c) 2006 Lonnie Mendez X+ * Portions of code and concepts borrowed from X+ * usb-linux.c and libusb's bsd.c and are copyright their respective owners. X+ * X+ * Permission is hereby granted, free of charge, to any person obtaining a copy X+ * of this software and associated documentation files (the "Software"), to deal X+ * in the Software without restriction, including without limitation the rights X+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell X+ * copies of the Software, and to permit persons to whom the Software is X+ * furnished to do so, subject to the following conditions: X+ * X+ * The above copyright notice and this permission notice shall be included in X+ * all copies or substantial portions of the Software. X+ * X+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR X+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, X+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL X+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER X+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, X+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN X+ * THE SOFTWARE. X+ */ X+ X+#include "qemu-common.h" X+#include "console.h" X+#include "hw/usb.h" X+ X+/* usb.h declares these */ X+#undef USB_SPEED_HIGH X+#undef USB_SPEED_FULL X+#undef USB_SPEED_LOW X+ X+#include X+#include X+#include X+ X+/* This value has maximum potential at 16. X+ * You should also set hw.usb.debug to gain X+ * more detailed view. X+ */ X+//#define DEBUG X+#define UGEN_DEBUG_LEVEL 0 X+ X+ X+typedef int USBScanFunc(void *opaque, int bus_num, int addr, int class_id, X+ int vendor_id, int product_id, X+ const char *product_name, int speed); X+static int usb_host_find_device(int *pbus_num, int *paddr, X+ const char *devname); X+ X+typedef struct USBHostDevice { X+ USBDevice dev; X+ int ep_fd[USB_MAX_ENDPOINTS]; X+ int devfd; X+ char devpath[32]; X+} USBHostDevice; X+ X+ X+static int ensure_ep_open(USBHostDevice *dev, int ep, int mode) X+{ X+ char buf[32]; X+ int fd; X+ X+ /* Get the address for this endpoint */ X+ ep = UE_GET_ADDR(ep); X+ X+ if (dev->ep_fd[ep] < 0) { X+#if __FreeBSD__ X+ snprintf(buf, sizeof(buf) - 1, "%s.%d", dev->devpath, ep); X+#else X+ snprintf(buf, sizeof(buf) - 1, "%s.%02d", dev->devpath, ep); X+#endif X+ /* Try to open it O_RDWR first for those devices which have in and out X+ * endpoints with the same address (eg 0x02 and 0x82) X+ */ X+ fd = open(buf, O_RDWR); X+ if (fd < 0 && errno == ENXIO) X+ fd = open(buf, mode); X+ if (fd < 0) { X+#ifdef DEBUG X+ printf("ensure_ep_open: failed to open device endpoint %s: %s\n", X+ buf, strerror(errno)); X+#endif X+ } X+ dev->ep_fd[ep] = fd; X+ } X+ X+ return dev->ep_fd[ep]; X+} X+ X+static void ensure_eps_closed(USBHostDevice *dev) X+{ X+ int epnum = 1; X+ X+ if (!dev) X+ return; X+ X+ while (epnum < USB_MAX_ENDPOINTS) { X+ if (dev->ep_fd[epnum] >= 0) { X+ close(dev->ep_fd[epnum]); X+ dev->ep_fd[epnum] = -1; X+ } X+ epnum++; X+ } X+} X+ X+static void usb_host_handle_reset(USBDevice *dev) X+{ X+#if 0 X+ USBHostDevice *s = (USBHostDevice *)dev; X+#endif X+} X+ X+/* XXX: X+ * -check device states against transfer requests X+ * and return appropriate response X+ */ X+static int usb_host_handle_control(USBDevice *dev, X+ int request, X+ int value, X+ int index, X+ int length, X+ uint8_t *data) X+{ X+ USBHostDevice *s = (USBHostDevice *)dev; X+ struct usb_ctl_request req; X+ struct usb_alt_interface aiface; X+ int ret, timeout = 50; X+ X+ if ((request >> 8) == UT_WRITE_DEVICE && X+ (request & 0xff) == UR_SET_ADDRESS) { X+ X+ /* specific SET_ADDRESS support */ X+ dev->addr = value; X+ return 0; X+ } else if ((request >> 8) == UT_WRITE_DEVICE && X+ (request & 0xff) == UR_SET_CONFIG) { X+ X+ ensure_eps_closed(s); /* can't do this without all eps closed */ X+ X+ ret = ioctl(s->devfd, USB_SET_CONFIG, &value); X+ if (ret < 0) { X+#ifdef DEBUG X+ printf("handle_control: failed to set configuration - %s\n", X+ strerror(errno)); X+#endif X+ return USB_RET_STALL; X+ } X+ X+ return 0; X+ } else if ((request >> 8) == UT_WRITE_INTERFACE && X+ (request & 0xff) == UR_SET_INTERFACE) { X+ X+ aiface.uai_interface_index = index; X+ aiface.uai_alt_no = value; X+ X+ ensure_eps_closed(s); /* can't do this without all eps closed */ X+ ret = ioctl(s->devfd, USB_SET_ALTINTERFACE, &aiface); X+ if (ret < 0) { X+#ifdef DEBUG X+ printf("handle_control: failed to set alternate interface - %s\n", X+ strerror(errno)); X+#endif X+ return USB_RET_STALL; X+ } X+ X+ return 0; X+ } else { X+ req.ucr_request.bmRequestType = request >> 8; X+ req.ucr_request.bRequest = request & 0xff; X+ USETW(req.ucr_request.wValue, value); X+ USETW(req.ucr_request.wIndex, index); X+ USETW(req.ucr_request.wLength, length); X+ req.ucr_data = data; X+ req.ucr_flags = USBD_SHORT_XFER_OK; X+ X+ ret = ioctl(s->devfd, USB_SET_TIMEOUT, &timeout); X+#if (__NetBSD__ || __OpenBSD__) X+ if (ret < 0 && errno != EINVAL) { X+#else X+ if (ret < 0) { X+#endif X+#ifdef DEBUG X+ printf("handle_control: setting timeout failed - %s\n", X+ strerror(errno)); X+#endif X+ } X+ X+ ret = ioctl(s->devfd, USB_DO_REQUEST, &req); X+ /* ugen returns EIO for usbd_do_request_ no matter what X+ * happens with the transfer */ X+ if (ret < 0) { X+#ifdef DEBUG X+ printf("handle_control: error after request - %s\n", X+ strerror(errno)); X+#endif X+ return USB_RET_NAK; // STALL X+ } else { X+ return req.ucr_actlen; X+ } X+ } X+} X+ X+static int usb_host_handle_data(USBDevice *dev, USBPacket *p) X+{ X+ USBHostDevice *s = (USBHostDevice *)dev; X+ int ret, fd, mode; X+ int one = 1, shortpacket = 0, timeout = 50; X+ sigset_t new_mask, old_mask; X+ uint8_t devep = p->devep; X+ X+ /* protect data transfers from SIGALRM signal */ X+ sigemptyset(&new_mask); X+ sigaddset(&new_mask, SIGALRM); X+ sigprocmask(SIG_BLOCK, &new_mask, &old_mask); X+ X+ if (p->pid == USB_TOKEN_IN) { X+ devep |= 0x80; X+ mode = O_RDONLY; X+ shortpacket = 1; X+ } else { X+ mode = O_WRONLY; X+ } X+ X+ fd = ensure_ep_open(s, devep, mode); X+ if (fd < 0) { X+ sigprocmask(SIG_SETMASK, &old_mask, NULL); X+ return USB_RET_NODEV; X+ } X+ X+ if (ioctl(fd, USB_SET_TIMEOUT, &timeout) < 0) { X+#ifdef DEBUG X+ printf("handle_data: failed to set timeout - %s\n", X+ strerror(errno)); X+#endif X+ } X+ X+ if (shortpacket) { X+ if (ioctl(fd, USB_SET_SHORT_XFER, &one) < 0) { X+#ifdef DEBUG X+ printf("handle_data: failed to set short xfer mode - %s\n", X+ strerror(errno)); X+#endif X+ sigprocmask(SIG_SETMASK, &old_mask, NULL); X+ } X+ } X+ X+ if (p->pid == USB_TOKEN_IN) X+ ret = read(fd, p->data, p->len); X+ else X+ ret = write(fd, p->data, p->len); X+ X+ sigprocmask(SIG_SETMASK, &old_mask, NULL); X+ X+ if (ret < 0) { X+#ifdef DEBUG X+ printf("handle_data: error after %s data - %s\n", X+ pid == USB_TOKEN_IN ? "reading" : "writing", strerror(errno)); X+#endif X+ switch(errno) { X+ case ETIMEDOUT: X+ case EINTR: X+ return USB_RET_NAK; X+ default: X+ return USB_RET_STALL; X+ } X+ } else { X+ return ret; X+ } X+} X+ X+static void usb_host_handle_destroy(USBDevice *opaque) X+{ X+ USBHostDevice *s = (USBHostDevice *)opaque; X+ int i; X+ X+ for (i = 0; i < USB_MAX_ENDPOINTS; i++) X+ if (s->ep_fd[i] >= 0) X+ close(s->ep_fd[i]); X+ X+ if (s->devfd < 0) X+ return; X+ X+ close(s->devfd); X+ X+ qemu_free(s); X+} X+ X+USBDevice *usb_host_device_open(const char *devname) X+{ X+ struct usb_device_info bus_info, dev_info; X+ USBHostDevice *dev; X+ char ctlpath[PATH_MAX + 1]; X+ char buspath[PATH_MAX + 1]; X+ int bfd, dfd, bus, address, i; X+ int ugendebug = UGEN_DEBUG_LEVEL; X+ X+ if (usb_host_find_device(&bus, &address, devname) < 0) X+ return NULL; X+ X+ snprintf(buspath, PATH_MAX, "/dev/usb%d", bus); X+ X+ bfd = open(buspath, O_RDWR); X+ if (bfd < 0) { X+#ifdef DEBUG X+ printf("usb_host_device_open: failed to open usb bus - %s\n", X+ strerror(errno)); X+#endif X+ return NULL; X+ } X+ X+ bus_info.udi_addr = address; X+ if (ioctl(bfd, USB_DEVICEINFO, &bus_info) < 0) { X+#ifdef DEBUG X+ printf("usb_host_device_open: failed to grab bus information - %s\n", X+ strerror(errno)); X+#endif X+ return NULL; X+ } X+ X+#if __FreeBSD__ X+ snprintf(ctlpath, PATH_MAX, "/dev/%s", bus_info.udi_devnames[0]); X+#else X+ snprintf(ctlpath, PATH_MAX, "/dev/%s.00", bus_info.udi_devnames[0]); X+#endif X+ X+ dfd = open(ctlpath, O_RDWR); X+ if (dfd < 0) { X+ dfd = open(ctlpath, O_RDONLY); X+ if (dfd < 0) { X+#ifdef DEBUG X+ printf("usb_host_device_open: failed to open usb device %s - %s\n", X+ ctlpath, strerror(errno)); X+#endif X+ } X+ } X+ X+ if (dfd >= 0) { X+ dev = qemu_mallocz(sizeof(USBHostDevice)); X+ if (!dev) X+ goto fail; X+ dev->devfd = dfd; X+ X+ if (ioctl(dfd, USB_GET_DEVICEINFO, &dev_info) < 0) { X+#ifdef DEBUG X+ printf("usb_host_device_open: failed to grab device info - %s\n", X+ strerror(errno)); X+#endif X+ goto fail; X+ } X+ X+ if (dev_info.udi_speed == 1) X+ dev->dev.speed = USB_SPEED_LOW - 1; X+ else X+ dev->dev.speed = USB_SPEED_FULL - 1; X+ X+ dev->dev.handle_packet = usb_generic_handle_packet; X+ X+ dev->dev.handle_reset = usb_host_handle_reset; X+ dev->dev.handle_control = usb_host_handle_control; X+ dev->dev.handle_data = usb_host_handle_data; X+ dev->dev.handle_destroy = usb_host_handle_destroy; X+ X+ if (strncmp(dev_info.udi_product, "product", 7) != 0) X+ pstrcpy(dev->dev.devname, sizeof(dev->dev.devname), X+ dev_info.udi_product); X+ else X+ snprintf(dev->dev.devname, sizeof(dev->dev.devname), X+ "host:%s", devname); X+ X+ pstrcpy(dev->devpath, sizeof(dev->devpath), "/dev/"); X+ strcat(dev->devpath, dev_info.udi_devnames[0]); X+ X+ /* Mark the endpoints as not yet open */ X+ for (i = 0; i < USB_MAX_ENDPOINTS; i++) X+ dev->ep_fd[i] = -1; X+ X+ ioctl(dfd, USB_SETDEBUG, &ugendebug); X+ X+ return (USBDevice *)dev; X+ } X+ X+fail: X+ return NULL; X+} X+ X+static int usb_host_scan(void *opaque, USBScanFunc *func) X+{ X+ struct usb_device_info bus_info; X+ struct usb_device_info dev_info; X+ uint16_t vendor_id, product_id, class_id, speed; X+ int bfd, dfd, bus, address; X+ char busbuf[20], devbuf[20], product_name[256]; X+ int ret = 0; X+ X+ for (bus = 0; bus < 10; bus++) { X+ X+ snprintf(busbuf, sizeof(busbuf) - 1, "/dev/usb%d", bus); X+ bfd = open(busbuf, O_RDWR); X+ if (bfd < 0) X+ continue; X+ X+ for (address = 1; address < 127; address++) { X+ X+ bus_info.udi_addr = address; X+ if (ioctl(bfd, USB_DEVICEINFO, &bus_info) < 0) X+ continue; X+ X+ /* only list devices that can be used by generic layer */ X+ if (strncmp(bus_info.udi_devnames[0], "ugen", 4) != 0) X+ continue; X+ X+#if __FreeBSD__ X+ snprintf(devbuf, sizeof(devbuf) - 1, "/dev/%s", bus_info.udi_devnames[0]); X+#else X+ snprintf(devbuf, sizeof(devbuf) - 1, "/dev/%s.00", bus_info.udi_devnames[0]); X+#endif X+ X+ dfd = open(devbuf, O_RDONLY); X+ if (dfd < 0) { X+#ifdef DEBUG X+ printf("usb_host_scan: couldn't open device %s - %s\n", devbuf, X+ strerror(errno)); X+#endif X+ continue; X+ } X+ X+ if (ioctl(dfd, USB_GET_DEVICEINFO, &dev_info) < 0) X+ printf("usb_host_scan: couldn't get device information for %s - %s\n", X+ devbuf, strerror(errno)); X+ X+ // XXX: might need to fixup endianess of word values before copying over X+ X+ vendor_id = dev_info.udi_vendorNo; X+ product_id = dev_info.udi_productNo; X+ class_id = dev_info.udi_class; X+ speed = dev_info.udi_speed; X+ X+ if (strncmp(dev_info.udi_product, "product", 7) != 0) X+ pstrcpy(product_name, sizeof(product_name), X+ dev_info.udi_product); X+ else X+ product_name[0] = '\0'; X+ X+ ret = func(opaque, bus, address, class_id, vendor_id, X+ product_id, product_name, speed); X+ X+ close(dfd); X+ X+ if (ret) X+ goto the_end; X+ } X+ X+ close(bfd); X+ } X+ X+the_end: X+ return ret; X+} X+ X+typedef struct FindDeviceState { X+ int vendor_id; X+ int product_id; X+ int bus_num; X+ int addr; X+} FindDeviceState; X+ X+static int usb_host_find_device_scan(void *opaque, int bus_num, int addr, X+ int class_id, X+ int vendor_id, int product_id, X+ const char *product_name, int speed) X+{ X+ FindDeviceState *s = opaque; X+ if (vendor_id == s->vendor_id && X+ product_id == s->product_id) { X+ s->bus_num = bus_num; X+ s->addr = addr; X+ return 1; X+ } else { X+ return 0; X+ } X+} X+ X+ X+/* the syntax is : X+ 'bus.addr' (decimal numbers) or X+ 'vendor_id:product_id' (hexa numbers) */ X+static int usb_host_find_device(int *pbus_num, int *paddr, X+ const char *devname) X+{ X+ const char *p; X+ int ret; X+ FindDeviceState fs; X+ X+ p = strchr(devname, '.'); X+ if (p) { X+ *pbus_num = strtoul(devname, NULL, 0); X+ *paddr = strtoul(p + 1, NULL, 0); X+ return 0; X+ } X+ p = strchr(devname, ':'); X+ if (p) { X+ fs.vendor_id = strtoul(devname, NULL, 16); X+ fs.product_id = strtoul(p + 1, NULL, 16); X+ ret = usb_host_scan(&fs, usb_host_find_device_scan); X+ if (ret) { X+ *pbus_num = fs.bus_num; X+ *paddr = fs.addr; X+ return 0; X+ } X+ } X+ return -1; X+} X+ X+/**********************/ X+/* USB host device info */ X+ X+struct usb_class_info { X+ int class; X+ const char *class_name; X+}; X+ X+static const struct usb_class_info usb_class_info[] = { X+ { USB_CLASS_AUDIO, "Audio"}, X+ { USB_CLASS_COMM, "Communication"}, X+ { USB_CLASS_HID, "HID"}, X+ { USB_CLASS_HUB, "Hub" }, X+ { USB_CLASS_PHYSICAL, "Physical" }, X+ { USB_CLASS_PRINTER, "Printer" }, X+ { USB_CLASS_MASS_STORAGE, "Storage" }, X+ { USB_CLASS_CDC_DATA, "Data" }, X+ { USB_CLASS_APP_SPEC, "Application Specific" }, X+ { USB_CLASS_VENDOR_SPEC, "Vendor Specific" }, X+ { USB_CLASS_STILL_IMAGE, "Still Image" }, X+ { USB_CLASS_CSCID, "Smart Card" }, X+ { USB_CLASS_CONTENT_SEC, "Content Security" }, X+ { -1, NULL } X+}; X+ X+static const char *usb_class_str(uint8_t class) X+{ X+ const struct usb_class_info *p; X+ for (p = usb_class_info; p->class != -1; p++) { X+ if (p->class == class) X+ break; X+ } X+ return p->class_name; X+} X+ X+void usb_info_device(int bus_num, int addr, int class_id, X+ int vendor_id, int product_id, X+ const char *product_name, X+ int speed) X+{ X+ const char *class_str, *speed_str; X+ X+ switch(speed) { X+ case USB_SPEED_LOW: X+ speed_str = "1.5"; X+ break; X+ case USB_SPEED_FULL: X+ speed_str = "12"; X+ break; X+ case USB_SPEED_HIGH: X+ speed_str = "480"; X+ break; X+ default: X+ speed_str = "?"; X+ break; X+ } X+ X+ term_printf(" Device %d.%d, speed %s Mb/s\n", X+ bus_num, addr, speed_str); X+ class_str = usb_class_str(class_id); X+ if (class_str) X+ term_printf(" %s:", class_str); X+ else X+ term_printf(" Class %02x:", class_id); X+ term_printf(" USB device %04x:%04x", vendor_id, product_id); X+ if (product_name[0] != '\0') X+ term_printf(", %s", product_name); X+ term_printf("\n"); X+} X+ X+static int usb_host_info_device(void *opaque, int bus_num, int addr, X+ int class_id, X+ int vendor_id, int product_id, X+ const char *product_name, X+ int speed) X+{ X+ usb_info_device(bus_num, addr, class_id, vendor_id, product_id, X+ product_name, speed); X+ return 0; X+} X+ X+void usb_host_info(void) X+{ X+ usb_host_scan(NULL, usb_host_info_device); X+} X+ X+/* XXX add this */ X+int usb_host_device_close(const char *devname) X+{ X+ return 0; X+} END-of-files/patch-bsdusb.patch echo x - files/patch-bt sed 's/^X//' >files/patch-bt << 'END-of-files/patch-bt' XIndex: qemu/net.c X@@ -76,6 +76,11 @@ X #endif X #endif X #endif X+#ifdef __FreeBSD__ X+#include X+#include X+#include X+#endif X X #if defined(CONFIG_SLIRP) X #include "libslirp.h" X@@ -3407,6 +3410,34 @@ X X #endif /* CONFIG_SLIRP */ X X+#ifdef __FreeBSD__ X+#define LOAD_QUIETLY 1 X+#define LOAD_VERBOSLY 2 X+ X+int X+loadmodules(int how, const char *module, ...) X+{ X+ int loaded = 0; X+ va_list ap; X+ X+ va_start(ap, module); X+#ifndef NO_MODULES X+ while (module != NULL) { X+ if (modfind(module) == -1) { X+ if (kldload(module) == -1) { X+ if (how == LOAD_VERBOSLY) X+ fprintf(stderr, "%s: Cannot load module\n", module); X+ } else X+ loaded++; X+ } X+ module = va_arg(ap, const char *); X+ } X+ va_end(ap); X+#endif X+ return loaded; X+} X+#endif X+ X #if !defined(_WIN32) X X typedef struct TAPState { X@@ -3470,11 +3501,59 @@ X char *dev; X struct stat s; X X+#ifdef __FreeBSD__ X+ int i, kldtried = 0, enoentcount = 0, err = 0; X+ char dname[100]; X+#ifdef USE_DEVTAP X+ /* X+ * 5.x has /dev/tap, but that seems to just blindly increase its X+ * couter on every open() for some people(??), i.e. on every qemu run. X+ */ X+ i = -1; X+#else X+ i = 0; X+#endif X+ for (; i < 10; i++) { X+ if (*ifname) X+ snprintf(dname, sizeof dname, "/dev/%s", ifname); X+ else if (i == -1) X+ strcpy(dname, "/dev/tap"); X+ else X+ snprintf(dname, sizeof dname, "%s%d", X+ "/dev/tap", i); X+ TFR(fd = open(dname, O_RDWR)); X+ if (fd >= 0) X+ break; X+ else if (errno == ENXIO || errno == ENOENT) { X+ if (i == 0 && !kldtried++) { X+ /* X+ * Attempt to load the tunnel interface KLD if it isn't loaded X+ * already. X+ */ X+ if (loadmodules(LOAD_VERBOSLY, "if_tap", NULL)) X+ i = -1; X+ continue; X+ } X+ if (errno != ENOENT || ++enoentcount > 3) { X+ err = errno; X+ break; X+ } X+ } else X+ err = errno; X+ if (*ifname) X+ break; X+ } X+ if (fd < 0) { X+ fprintf(stderr, "warning: could not open %s (%s): no virtual network emulation\n", dname, strerror(err)); X+ return -1; X+ } X+#else X TFR(fd = open("/dev/tap", O_RDWR)); X if (fd < 0) { X- fprintf(stderr, "warning: could not open /dev/tap: no virtual network emulation\n"); X+ fprintf(stderr, "warning: could not open /dev/tap (%s): no virtual network emulation\n", strerror(errno)); X return -1; X } X+#endif X X fstat(fd, &s); X dev = devname(s.st_rdev, S_IFCHR); END-of-files/patch-bt echo x - files/patch-configure sed 's/^X//' >files/patch-configure << 'END-of-files/patch-configure' XIndex: qemu/configure X@@ -490,7 +490,7 @@ X if [ "$darwin" = "yes" -o "$mingw32" = "yes" ] ; then X AIOLIBS= X elif [ "$bsd" = "yes" ]; then X- AIOLIBS="-lpthread" X+# AIOLIBS="-lpthread" X else X # Some Linux architectures (e.g. s390) don't imply -lpthread automatically. X AIOLIBS="-lrt -lpthread" X@@ -689,7 +689,7 @@ X fi # test "$curses" X X # Check if tools are available to build documentation. X-if [ -x "`which texi2html 2>/dev/null`" ] && \ X+if [ "x$NOPORTDOCS" != "x" -o -x "`which texi2html 2>/dev/null`" ] && \ X [ -x "`which pod2man 2>/dev/null`" ]; then X build_docs="yes" X fi END-of-files/patch-configure echo x - files/patch-cpu-exec.c sed 's/^X//' >files/patch-cpu-exec.c << 'END-of-files/patch-cpu-exec.c' END-of-files/patch-cpu-exec.c echo x - files/patch-emulate-aio sed 's/^X//' >files/patch-emulate-aio << 'END-of-files/patch-emulate-aio' XIndex: qemu/block.h X@@ -53,10 +53,9 @@ X X #define BDRV_O_CACHE_MASK (BDRV_O_NOCACHE | BDRV_O_CACHE_WB) X X-void bdrv_info(void); X+void bdrv_init(int emulate_aio); X void bdrv_info_stats(void); X X-void bdrv_init(void); X BlockDriver *bdrv_find_format(const char *format_name); X int bdrv_create(BlockDriver *drv, X const char *filename, int64_t size_in_sectors, XIndex: qemu/block.c X@@ -177,9 +177,9 @@ X } X X X-static void bdrv_register(BlockDriver *bdrv) X+static void bdrv_register(BlockDriver *bdrv, int emulate_aio) X { X- if (!bdrv->bdrv_aio_read) { X+ if (!bdrv->bdrv_aio_read || emulate_aio) { X /* add AIO emulation layer */ X bdrv->bdrv_aio_read = bdrv_aio_read_em; X bdrv->bdrv_aio_write = bdrv_aio_write_em; X@@ -1374,23 +1374,23 @@ X return async_ret; X } X X-void bdrv_init(void) X+void bdrv_init(int emulate_aio) X { X- bdrv_register(&bdrv_raw); X- bdrv_register(&bdrv_host_device); X+ bdrv_register(&bdrv_raw, emulate_aio); X+ bdrv_register(&bdrv_host_device, emulate_aio); X #ifndef _WIN32 X- bdrv_register(&bdrv_cow); X+ bdrv_register(&bdrv_cow, 0); X #endif X- bdrv_register(&bdrv_qcow); X- bdrv_register(&bdrv_vmdk); X- bdrv_register(&bdrv_cloop); X- bdrv_register(&bdrv_dmg); X- bdrv_register(&bdrv_bochs); X- bdrv_register(&bdrv_vpc); X- bdrv_register(&bdrv_vvfat); X- bdrv_register(&bdrv_qcow2); X- bdrv_register(&bdrv_parallels); X- bdrv_register(&bdrv_nbd); X+ bdrv_register(&bdrv_qcow, 0); X+ bdrv_register(&bdrv_vmdk, 0); X+ bdrv_register(&bdrv_cloop, 0); X+ bdrv_register(&bdrv_dmg, 0); X+ bdrv_register(&bdrv_bochs, 0); X+ bdrv_register(&bdrv_vpc, 0); X+ bdrv_register(&bdrv_vvfat, 0); X+ bdrv_register(&bdrv_qcow2, 0); X+ bdrv_register(&bdrv_parallels, 0); X+ bdrv_register(&bdrv_nbd, 0); X } X X void *qemu_aio_get(BlockDriverState *bs, BlockDriverCompletionFunc *cb, XIndex: qemu/vl.c X@@ -76,6 +76,10 @@ X #endif X #endif X #endif X+#ifdef __FreeBSD__ X+#include X+#include X+#endif X X #if defined(CONFIG_SLIRP) X #include "libslirp.h" X@@ -8884,6 +8884,7 @@ X VLANState *vlan; X int autostart; X const char *incoming = NULL; X+ int emulate_aio = 0; X X LIST_INIT (&vm_change_state_head); X #ifndef _WIN32 X@@ -8957,6 +8958,13 @@ X tb_size = 0; X autostart= 1; X X+#ifdef __FreeBSD__ X+ if (modfind("aio") == -1) { X+ emulate_aio = 1; X+ fprintf(stderr, "warning: aio not (kld)loaded, disabling (may slow down on disk IO)\n"); X+ } X+#endif X+ X optind = 1; X for(;;) { X if (optind >= argc) X@@ -9692,7 +9700,7 @@ X /* init the dynamic translator */ X cpu_exec_init_all(tb_size * 1024 * 1024); X X- bdrv_init(); X+ bdrv_init(emulate_aio); X X /* we always create the cdrom drive, even if no disk is there */ X XIndex: qemu/qemu-img.c X@@ -733,7 +733,7 @@ X { X const char *cmd; X X- bdrv_init(); X+ bdrv_init(1); X if (argc < 2) X help(); X cmd = argv[1]; END-of-files/patch-emulate-aio echo x - files/patch-exec-all.h sed 's/^X//' >files/patch-exec-all.h << 'END-of-files/patch-exec-all.h' XIndex: qemu/exec-all.h X@@ -30,7 +30,7 @@ X struct TranslationBlock; X X /* XXX: make safe guess about sizes */ X-#define MAX_OP_PER_INSTR 64 X+#define MAX_OP_PER_INSTR 128 /* 64 */ X /* A Call op needs up to 6 + 2N parameters (N = number of arguments). */ X #define MAX_OPC_PARAM 10 X #define OPC_BUF_SIZE 512 END-of-files/patch-exec-all.h echo x - files/patch-exec.c sed 's/^X//' >files/patch-exec.c << 'END-of-files/patch-exec.c' END-of-files/patch-exec.c echo x - files/patch-fbsd sed 's/^X//' >files/patch-fbsd << 'END-of-files/patch-fbsd' XIndex: qemu/Makefile X@@ -25,7 +25,10 @@ X DOCS= X endif X X-all: $(TOOLS) $(DOCS) recurse-all X+all: bsd/libmath.a $(TOOLS) $(DOCS) recurse-all X+ X+bsd/libmath.a: X+ ( cd bsd ; $(BSD_MAKE) CC=$(CC) ) X X subdir-%: dyngen$(EXESUF) X $(MAKE) -C $(subst subdir-,,$@) all X@@ -40,6 +43,7 @@ X X clean: X # avoid old build problems by removing potentially incorrect old files X+ ( cd bsd ; $(BSD_MAKE) clean ) X 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 X rm -f *.o *.a $(TOOLS) dyngen$(EXESUF) TAGS *.pod *~ */*~ X $(MAKE) -C tests clean XIndex: qemu/Makefile.target X@@ -663,8 +663,8 @@ X main.o: CFLAGS+=-p X endif X X-$(QEMU_PROG): $(OBJS) ../libqemu_common.a libqemu.a X- $(CC) $(LDFLAGS) -o $@ $^ $(LIBS) $(SDL_LIBS) $(COCOA_LIBS) $(CURSES_LIBS) $(BRLAPI_LIBS) $(VDE_LIBS) X+$(QEMU_PROG): $(OBJS) ../libqemu_common.a libqemu.a ../bsd/libmath.a X+ $(CC) $(LDFLAGS) -o $@ $^ $(LIBS) $(SDL_LIBS) $(COCOA_LIBS) $(CURSES_LIBS) $(BRLAPI_LIBS) $(VDE_LIBS) $(OS_LDFLAGS) ../bsd/libmath.a X X endif # !CONFIG_USER_ONLY X XIndex: qemu/fpu/softfloat-native.c X@@ -2,11 +2,16 @@ X context is supported */ X #include "softfloat.h" X #include X+#if defined(__FreeBSD__) && __FreeBSD_version < 500000 X+#include X+#endif X X void set_float_rounding_mode(int val STATUS_PARAM) X { X STATUS(float_rounding_mode) = val; X-#if defined(_BSD) && !defined(__APPLE__) || (defined(HOST_SOLARIS) && HOST_SOLARIS < 10) X+#if defined(_BSD) && !defined(__APPLE__) && !defined(__FreeBSD__) || \ X+ (defined(__FreeBSD__) && __FreeBSD_version < 500000) || \ X+ (defined(HOST_SOLARIS) && HOST_SOLARIS < 10) X fpsetround(val); X #elif defined(__arm__) X /* nothing to do */ X@@ -22,7 +25,7 @@ X } X #endif X X-#if defined(_BSD) || (defined(HOST_SOLARIS) && HOST_SOLARIS < 10) X+#if (defined(_BSD) && !defined(__FreeBSD__)) || (defined(HOST_SOLARIS) && HOST_SOLARIS < 10) X #define lrint(d) ((int32_t)rint(d)) X #define llrint(d) ((int64_t)rint(d)) X #define lrintf(f) ((int32_t)rint(f)) XIndex: qemu/fpu/softfloat-native.h X@@ -1,8 +1,28 @@ X /* Native implementation of soft float functions */ X #include X X-#if (defined(_BSD) && !defined(__APPLE__)) || defined(HOST_SOLARIS) X+#ifdef __FreeBSD__ X+#include X+long double fabsl(long double x); X+long double remainderl(long double x, long double y); X+long double sqrtl(long double x); X+long double rintl(long double x); X+long lrintl(long double x); X+long long llrintl(long double x); X+#endif X+ X+#if (defined(_BSD) && !defined(__APPLE__) && \ X+ (!defined(__FreeBSD__) || __FreeBSD_version < 500000)) || \ X+ defined(HOST_SOLARIS) X #include X+#if defined(__FreeBSD__) X+#define isgreater(x, y) __builtin_isgreater((x), (y)) X+#define isgreaterequal(x, y) __builtin_isgreaterequal((x), (y)) X+#define isless(x, y) __builtin_isless((x), (y)) X+#define islessequal(x, y) __builtin_islessequal((x), (y)) X+#define islessgreater(x, y) __builtin_islessgreater((x), (y)) X+#define isunordered(x, y) __builtin_isunordered((x), (y)) X+#endif X #define fabsf(f) ((float)fabs(f)) X #else X #include X@@ -109,6 +109,8 @@ X | Software IEC/IEEE floating-point rounding mode. X *----------------------------------------------------------------------------*/ X-#if (defined(_BSD) && !defined(__APPLE__)) || defined(HOST_SOLARIS) X+#if (defined(_BSD) && !defined(__APPLE__) && \ X+ (!defined(__FreeBSD__) || __FreeBSD_version < 500000)) || \ X+ defined(HOST_SOLARIS) X #if defined(__OpenBSD__) X #define FE_RM FP_RM X #define FE_RP FP_RP XIndex: qemu/fpu/softfloat.h X@@ -84,7 +84,8 @@ X #define FLOAT128 X #else X /* native float support */ X-#if (defined(__i386__) || defined(__x86_64__)) && !defined(_BSD) X+#if (defined(__i386__) || defined(__x86_64__)) && \ X+ (!defined(_BSD) || defined(__FreeBSD__)) X #define FLOATX80 X #endif X #endif /* !CONFIG_SOFTFLOAT */ XIndex: qemu/target-ppc/op_helper.c X@@ -303,6 +303,13 @@ X FT0 = sqrt(FT0); X } X X+#ifndef isnormal X+#define isnormal(x) \ X+ ((sizeof (x) == sizeof (float)) ? __isnormalf(x) \ X+ : (sizeof (x) == sizeof (double)) ? __isnormal(x) \ X+ : __isnormall(x)) X+#endif X+ X void do_fres (void) X { X union { XIndex: qemu/x86_64.ld X@@ -2,7 +2,7 @@ X OUTPUT_FORMAT("elf64-x86-64", "elf64-x86-64", "elf64-x86-64") X OUTPUT_ARCH(i386:x86-64) X ENTRY(_start) X-SEARCH_DIR("/lib64"); SEARCH_DIR("/usr/lib64"); SEARCH_DIR("/usr/local/lib64"); X+SEARCH_DIR("/lib"); SEARCH_DIR("/usr/lib"); SEARCH_DIR("/usr/local/lib"); X SECTIONS X { X /* Read-only sections, merged into text segment: */ END-of-files/patch-fbsd echo x - files/patch-fix_bsd_user_fbsd sed 's/^X//' >files/patch-fix_bsd_user_fbsd << 'END-of-files/patch-fix_bsd_user_fbsd' XIndex: qemu/bsd-user/main.c X=================================================================== X--- qemu.orig/bsd-user/main.c 2008-11-08 06:22:53.000000000 +0000 X+++ qemu/bsd-user/main.c 2008-11-08 06:27:22.000000000 +0000 X@@ -182,9 +182,6 @@ X switch (trapnr) { X case 0x100: X syscall_nr = env->gregs[1]; X-#if defined(TARGET_SPARC) X- syscall_nr &= ~(SYSCALL_G7RFLAG | SYSCALL_G2RFLAG); X-#endif X if (bsd_type == target_freebsd) X ret = do_freebsd_syscall(env, syscall_nr, X env->regwptr[0], env->regwptr[1], X@@ -195,11 +192,16 @@ X env->regwptr[0], env->regwptr[1], X env->regwptr[2], env->regwptr[3], X env->regwptr[4], env->regwptr[5]); X- else //if (bsd_type == target_openbsd) X+ else { //if (bsd_type == target_openbsd) X+#if defined(TARGET_SPARC) X+ syscall_nr &= ~(TARGET_OPENBSD_SYSCALL_G7RFLAG | X+ TARGET_OPENBSD_SYSCALL_G2RFLAG); X+#endif X ret = do_openbsd_syscall(env, syscall_nr, X env->regwptr[0], env->regwptr[1], X env->regwptr[2], env->regwptr[3], X env->regwptr[4], env->regwptr[5]); X+ } X if ((unsigned int)ret >= (unsigned int)(-515)) { X #if defined(TARGET_SPARC64) && !defined(TARGET_ABI32) X env->xcc |= PSR_CARRY; XIndex: qemu/bsd-user/openbsd/syscall_nr.h X=================================================================== X--- qemu.orig/bsd-user/openbsd/syscall_nr.h 2008-11-08 06:25:23.000000000 +0000 X+++ qemu/bsd-user/openbsd/syscall_nr.h 2008-11-08 06:36:02.000000000 +0000 X@@ -193,3 +193,33 @@ X #define TARGET_OPENBSD_NR_statfs 307 X #define TARGET_OPENBSD_NR_fstatfs 308 X #define TARGET_OPENBSD_NR_fhstatfs 309 X+ X+/* syscall flags from machine/trap.h */ X+ X+/* $OpenBSD: trap.h,v 1.4 2008/07/04 22:04:37 kettenis Exp $ */ X+/* $NetBSD: trap.h,v 1.4 1999/06/07 05:28:04 eeh Exp $ */ X+ X+/* X+ * Copyright (c) 1996-1999 Eduardo Horvath X+ * X+ * Redistribution and use in source and binary forms, with or without X+ * modification, are permitted provided that the following conditions X+ * are met: X+ * 1. Redistributions of source code must retain the above copyright X+ * notice, this list of conditions and the following disclaimer. X+ * X+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND X+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE X+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE X+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE X+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL X+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS X+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) X+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT X+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY X+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF X+ * SUCH DAMAGE. X+ * X+ */ X+#define TARGET_OPENBSD_SYSCALL_G2RFLAG 0x400 /* on success, return to %g2 rather than npc */ X+#define TARGET_OPENBSD_SYSCALL_G7RFLAG 0x800 /* use %g7 as above (deprecated) */ END-of-files/patch-fix_bsd_user_fbsd echo x - files/patch-fpu-softfloat-native.c sed 's/^X//' >files/patch-fpu-softfloat-native.c << 'END-of-files/patch-fpu-softfloat-native.c' XIndex: qemu/fpu/softfloat-native.c X@@ -228,7 +228,15 @@ X *----------------------------------------------------------------------------*/ X float64 float64_trunc_to_int( float64 a STATUS_PARAM ) X { X+#if defined(__FreeBSD__) && __FreeBSD__ <= 4 X+ float64 ret; X+ fpsetround(FP_RZ); X+ ret = rint(a); X+ fpsetround(STATUS(float_rounding_mode)); X+ return ret; X+#else X return trunc(a); X+#endif X } X X float64 float64_round_to_int( float64 a STATUS_PARAM ) END-of-files/patch-fpu-softfloat-native.c echo x - files/patch-hw-eepro100.c sed 's/^X//' >files/patch-hw-eepro100.c << 'END-of-files/patch-hw-eepro100.c' XIndex: qemu/hw/eepro100.c X@@ -729,6 +729,7 @@ X logout X ("TBD (simplified mode): buffer address 0x%08x, size 0x%04x\n", X tx_buffer_address, tx_buffer_size); X+ assert(size + tx_buffer_size <= sizeof(buf)); X cpu_physical_memory_read(tx_buffer_address, &buf[size], X tx_buffer_size); X size += tx_buffer_size; X@@ -749,9 +750,13 @@ X logout X ("TBD (extended mode): buffer address 0x%08x, size 0x%04x\n", X tx_buffer_address, tx_buffer_size); X- cpu_physical_memory_read(tx_buffer_address, &buf[size], X- tx_buffer_size); X- size += tx_buffer_size; X+ if (size + tx_buffer_size > sizeof(buf)) { X+ logout("bad extended TCB with size 0x%04x\n", tx_buffer_size); X+ } else { X+ cpu_physical_memory_read(tx_buffer_address, &buf[size], X+ tx_buffer_size); X+ size += tx_buffer_size; X+ } X if (tx_buffer_el & 1) { X break; X } X@@ -766,14 +771,20 @@ X logout X ("TBD (flexible mode): buffer address 0x%08x, size 0x%04x\n", X tx_buffer_address, tx_buffer_size); X- cpu_physical_memory_read(tx_buffer_address, &buf[size], X- tx_buffer_size); X- size += tx_buffer_size; X+ if (size + tx_buffer_size > sizeof(buf)) { X+ logout("bad flexible TCB with size 0x%04x\n", tx_buffer_size); X+ } else { X+ cpu_physical_memory_read(tx_buffer_address, &buf[size], X+ tx_buffer_size); X+ size += tx_buffer_size; X+ } X if (tx_buffer_el & 1) { X break; X } X } X } X+ logout("%p sending frame, len=%d,%s\n", s, size, nic_dump(buf, size)); X+ assert(size <= sizeof(buf)); X qemu_send_packet(s->vc, buf, size); X s->statistics.tx_good_frames++; X /* Transmit with bad status would raise an CX/TNO interrupt. END-of-files/patch-hw-eepro100.c echo x - files/patch-hw-vmware_vga.c sed 's/^X//' >files/patch-hw-vmware_vga.c << 'END-of-files/patch-hw-vmware_vga.c' XIndex: qemu/hw/vmware_vga.c X@@ -26,8 +26,8 @@ X #define VERBOSE X #define EMBED_STDVGA X #undef DIRECT_VRAM X-#define HW_RECT_ACCEL X-#define HW_FILL_ACCEL X+/* #define HW_RECT_ACCEL */ X+/* #define HW_FILL_ACCEL */ X #define HW_MOUSE_ACCEL X X #ifdef EMBED_STDVGA X@@ -76,6 +76,7 @@ X uint32_t wblue; X int syncing; X int fb_size; X+ int empty; X X union { X uint32_t *fifo; X@@ -487,7 +488,7 @@ X X static inline int vmsvga_fifo_empty(struct vmsvga_state_s *s) X { X- if (!s->config || !s->enable) X+ if (!s->config || !s->enable || s->empty) X return 1; X return (s->cmd->next_cmd == s->cmd->stop); X } X@@ -495,6 +496,10 @@ X static inline uint32_t vmsvga_fifo_read_raw(struct vmsvga_state_s *s) X { X uint32_t cmd = s->fifo[CMD(stop) >> 2]; X+ if (s->cmd->next_cmd == s->cmd->stop) { X+ s->empty = 1; X+ return 0; X+ } X s->cmd->stop = cpu_to_le32(CMD(stop) + 4); X if (CMD(stop) >= CMD(max)) X s->cmd->stop = s->cmd->min; X@@ -512,6 +517,7 @@ X int args = 0; X int x, y, dx, dy, width, height; X struct vmsvga_cursor_definition_s cursor; X+ s->empty = 0; X while (!vmsvga_fifo_empty(s)) X switch (cmd = vmsvga_fifo_read(s)) { X case SVGA_CMD_UPDATE: X@@ -533,6 +539,7 @@ X vmsvga_fill_rect(s, colour, x, y, width, height); X break; X #else X+ args = 0; X goto badcmd; X #endif X X@@ -547,6 +554,7 @@ X vmsvga_copy_rect(s, x, y, dx, dy, width, height); X break; X #else X+ args = 0; X goto badcmd; X #endif X X@@ -609,6 +617,7 @@ X break; /* Nop */ X X default: X+ args = 0; X badcmd: X while (args --) X vmsvga_fifo_read(s); END-of-files/patch-hw-vmware_vga.c echo x - files/patch-libmath sed 's/^X//' >files/patch-libmath << 'END-of-files/patch-libmath' Xdiff -Nru qemu-0.7.0/bsd.orig/Makefile qemu-0.7.0/bsd/Makefile X--- qemu-0.7.0/bsd.orig/Makefile Wed Dec 31 19:00:00 1969 X+++ qemu-0.7.0/bsd/Makefile Fri Apr 29 02:11:27 2005 X@@ -0,0 +1,32 @@ X+SRCS= ${MACHINE_ARCH}/e_atan2l.c \ X+ ${MACHINE_ARCH}/e_logl.S \ X+ ${MACHINE_ARCH}/e_powl.S \ X+ ${MACHINE_ARCH}/e_remainderl.S \ X+ ${MACHINE_ARCH}/e_sqrtl.c \ X+ ${MACHINE_ARCH}/s_ceill.S \ X+ ${MACHINE_ARCH}/s_cosl.S \ X+ ${MACHINE_ARCH}/s_floorl.S \ X+ ${MACHINE_ARCH}/s_isnormal.c \ X+ ${MACHINE_ARCH}/s_llrint.S \ X+ ${MACHINE_ARCH}/s_llrintf.S \ X+ ${MACHINE_ARCH}/s_llrintl.S \ X+ ${MACHINE_ARCH}/s_lrint.S \ X+ ${MACHINE_ARCH}/s_lrintf.S \ X+ ${MACHINE_ARCH}/s_lrintl.S \ X+ ${MACHINE_ARCH}/s_rintl.c \ X+ ${MACHINE_ARCH}/s_round.c \ X+ ${MACHINE_ARCH}/s_sinl.S \ X+ ${MACHINE_ARCH}/s_tanl.S X+ X+OBJS= ${SRCS:R:S/$/.o/} X+ X+CFLAGS+= -I. X+ X+all: libmath.a X+ X+libmath.a: ${OBJS} X+ rm -f $@ X+ ${AR} rcs $@ ${OBJS:T} X+ X+clean: X+ rm -f ${OBJS:T} libmath.a Xdiff -Nru qemu-0.7.0/bsd.orig/amd64/e_atan2l.c qemu-0.7.0/bsd/amd64/e_atan2l.c X--- qemu-0.7.0/bsd.orig/amd64/e_atan2l.c Wed Dec 31 19:00:00 1969 X+++ qemu-0.7.0/bsd/amd64/e_atan2l.c Fri Apr 29 02:11:27 2005 X@@ -0,0 +1,20 @@ X+/* X+ * Written by J.T. Conklin . X+ * Public domain. X+ * X+ * Adapted for `long double' by Ulrich Drepper . X+ */ X+ X+#include X+ X+long double X+__ieee754_atan2l (long double y, long double x) X+{ X+ long double res; X+ X+ asm ("fpatan" : "=t" (res) : "u" (y), "0" (x) : "st(1)"); X+ X+ return res; X+} X+ X+weak_alias(__ieee754_atan2l, atan2l) Xdiff -Nru qemu-0.7.0/bsd.orig/amd64/e_logl.S qemu-0.7.0/bsd/amd64/e_logl.S X--- qemu-0.7.0/bsd.orig/amd64/e_logl.S Wed Dec 31 19:00:00 1969 X+++ qemu-0.7.0/bsd/amd64/e_logl.S Fri Apr 29 02:11:27 2005 X@@ -0,0 +1,59 @@ X+/* X+ * Written by J.T. Conklin . X+ * Public domain. X+ * X+ * Adapted for `long double' by Ulrich Drepper . X+ * Adapted for x86-64 by Andreas Jaeger . X+ */ X+ X+#include X+#include X+ X+RCSID("$NetBSD: $") X+ X+ X+#ifdef __ELF__ X+ .section .rodata X+#else X+ .text X+#endif X+ .align ALIGNARG(4) X+ ASM_TYPE_DIRECTIVE(one,@object) X+one: .double 1.0 X+ ASM_SIZE_DIRECTIVE(one) X+ /* It is not important that this constant is precise. It is only X+ a value which is known to be on the safe side for using the X+ fyl2xp1 instruction. */ X+ ASM_TYPE_DIRECTIVE(limit,@object) X+limit: .double 0.29 X+ ASM_SIZE_DIRECTIVE(limit) X+ X+ X+#ifdef PIC X+#define MO(op) op##(%rip) X+#else X+#define MO(op) op X+#endif X+ X+ .text X+ENTRY(__ieee754_logl) X+ fldln2 // log(2) X+ fldt 8(%rsp) // x : log(2) X+ fld %st // x : x : log(2) X+ fsubl MO(one) // x-1 : x : log(2) X+ fld %st // x-1 : x-1 : x : log(2) X+ fabs // |x-1| : x-1 : x : log(2) X+ fcompl MO(limit) // x-1 : x : log(2) X+ fnstsw // x-1 : x : log(2) X+ andb $0x45, %ah X+ jz 2f X+ fstp %st(1) // x-1 : log(2) X+ fyl2xp1 // log(x) X+ ret X+ X+2: fstp %st(0) // x : log(2) X+ fyl2x // log(x) X+ ret X+END (__ieee754_logl) X+ X+weak_alias(__ieee754_logl,logl) Xdiff -Nru qemu-0.7.0/bsd.orig/amd64/e_powl.S qemu-0.7.0/bsd/amd64/e_powl.S X--- qemu-0.7.0/bsd.orig/amd64/e_powl.S Wed Dec 31 19:00:00 1969 X+++ qemu-0.7.0/bsd/amd64/e_powl.S Fri Apr 29 02:11:27 2005 X@@ -0,0 +1,341 @@ X+/* ix87 specific implementation of pow function. X+ Copyright (C) 1996, 1997, 1998, 1999, 2001, 2004 Free Software Foundation, Inc. X+ This file is part of the GNU C Library. X+ Contributed by Ulrich Drepper , 1996. X+ X+ The GNU C Library is free software; you can redistribute it and/or X+ modify it under the terms of the GNU Lesser General Public X+ License as published by the Free Software Foundation; either X+ version 2.1 of the License, or (at your option) any later version. X+ X+ The GNU C Library is distributed in the hope that it will be useful, X+ but WITHOUT ANY WARRANTY; without even the implied warranty of X+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU X+ Lesser General Public License for more details. X+ X+ You should have received a copy of the GNU Lesser General Public X+ License along with the GNU C Library; if not, write to the Free X+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA X+ 02111-1307 USA. */ X+ X+#include X+#include X+ X+#ifdef __ELF__ X+ .section .rodata X+#else X+ .text X+#endif X+ X+ .align ALIGNARG(4) X+ ASM_TYPE_DIRECTIVE(infinity,@object) X+inf_zero: X+infinity: X+ .byte 0, 0, 0, 0, 0, 0, 0xf0, 0x7f X+ ASM_SIZE_DIRECTIVE(infinity) X+ ASM_TYPE_DIRECTIVE(zero,@object) X+zero: .double 0.0 X+ ASM_SIZE_DIRECTIVE(zero) X+ ASM_TYPE_DIRECTIVE(minf_mzero,@object) X+minf_mzero: X+minfinity: X+ .byte 0, 0, 0, 0, 0, 0, 0xf0, 0xff X+mzero: X+ .byte 0, 0, 0, 0, 0, 0, 0, 0x80 X+ ASM_SIZE_DIRECTIVE(minf_mzero) X+ ASM_TYPE_DIRECTIVE(one,@object) X+one: .double 1.0 X+ ASM_SIZE_DIRECTIVE(one) X+ ASM_TYPE_DIRECTIVE(limit,@object) X+limit: .double 0.29 X+ ASM_SIZE_DIRECTIVE(limit) X+ ASM_TYPE_DIRECTIVE(p63,@object) X+p63: X+ .byte 0, 0, 0, 0, 0, 0, 0xe0, 0x43 X+ ASM_SIZE_DIRECTIVE(p63) X+ X+#ifdef PIC X+#define MO(op) op##(%rip) X+#else X+#define MO(op) op X+#endif X+ X+ .text X+ENTRY(__ieee754_powl) X+ fldt 24(%rsp) // y X+ fxam X+ X+ X+ fnstsw X+ movb %ah, %dl X+ andb $0x45, %ah X+ cmpb $0x40, %ah // is y == 0 ? X+ je 11f X+ X+ cmpb $0x05, %ah // is y == ±inf ? X+ je 12f X+ X+ cmpb $0x01, %ah // is y == NaN ? X+ je 30f X+ X+ fldt 8(%rsp) // x : y X+ X+ fxam X+ fnstsw X+ movb %ah, %dh X+ andb $0x45, %ah X+ cmpb $0x40, %ah X+ je 20f // x is ±0 X+ X+ cmpb $0x05, %ah X+ je 15f // x is ±inf X+ X+ fxch // y : x X+ X+ /* fistpll raises invalid exception for |y| >= 1L<<63. */ X+ fldl MO(p63) // 1L<<63 : y : x X+ fld %st(1) // y : 1L<<63 : y : x X+ fabs // |y| : 1L<<63 : y : x X+ fcomip %st(1), %st // 1L<<63 : y : x X+ fstp %st(0) // y : x X+ jnc 2f X+ X+ /* First see whether `y' is a natural number. In this case we X+ can use a more precise algorithm. */ X+ fld %st // y : y : x X+ fistpll -8(%rsp) // y : x X+ fildll -8(%rsp) // int(y) : y : x X+ fucomip %st(1),%st // y : x X+ jne 2f X+ X+ /* OK, we have an integer value for y. */ X+ mov -8(%rsp),%eax X+ mov -4(%rsp),%edx X+ orl $0, %edx X+ fstp %st(0) // x X+ jns 4f // y >= 0, jump X+ fdivrl MO(one) // 1/x (now referred to as x) X+ negl %eax X+ adcl $0, %edx X+ negl %edx X+4: fldl MO(one) // 1 : x X+ fxch X+ X+6: shrdl $1, %edx, %eax X+ jnc 5f X+ fxch X+ fmul %st(1) // x : ST*x X+ fxch X+5: fmul %st(0), %st // x*x : ST*x X+ shrl $1, %edx X+ movl %eax, %ecx X+ orl %edx, %ecx X+ jnz 6b X+ fstp %st(0) // ST*x X+ ret X+ X+ /* y is ±NAN */ X+30: fldt 8(%rsp) // x : y X+ fldl MO(one) // 1.0 : x : y X+ fucomip %st(1),%st // x : y X+ je 31f X+ fxch // y : x X+31: fstp %st(1) X+ ret X+ X+ .align ALIGNARG(4) X+2: /* y is a real number. */ X+ fxch // x : y X+ fldl MO(one) // 1.0 : x : y X+ fld %st(1) // x : 1.0 : x : y X+ fsub %st(1) // x-1 : 1.0 : x : y X+ fabs // |x-1| : 1.0 : x : y X+ fcompl MO(limit) // 1.0 : x : y X+ fnstsw X+ fxch // x : 1.0 : y X+ test $4500,%eax X+ jz 7f X+ fsub %st(1) // x-1 : 1.0 : y X+ fyl2xp1 // log2(x) : y X+ jmp 8f X+ X+7: fyl2x // log2(x) : y X+8: fmul %st(1) // y*log2(x) : y X+ fxam X+ fnstsw X+ andb $0x45, %ah X+ cmpb $0x05, %ah // is y*log2(x) == ±inf ? X+ je 28f X+ fst %st(1) // y*log2(x) : y*log2(x) X+ frndint // int(y*log2(x)) : y*log2(x) X+ fsubr %st, %st(1) // int(y*log2(x)) : fract(y*log2(x)) X+ fxch // fract(y*log2(x)) : int(y*log2(x)) X+ f2xm1 // 2^fract(y*log2(x))-1 : int(y*log2(x)) X+ faddl MO(one) // 2^fract(y*log2(x)) : int(y*log2(x)) X+ fscale // 2^fract(y*log2(x))*2^int(y*log2(x)) : int(y*log2(x)) X+ fstp %st(1) // 2^fract(y*log2(x))*2^int(y*log2(x)) X+ ret X+ X+28: fstp %st(1) // y*log2(x) X+ fldl MO(one) // 1 : y*log2(x) X+ fscale // 2^(y*log2(x)) : y*log2(x) X+ fstp %st(1) // 2^(y*log2(x)) X+ ret X+ X+ // pow(x,±0) = 1 X+ .align ALIGNARG(4) X+11: fstp %st(0) // pop y X+ fldl MO(one) X+ ret X+ X+ // y == ±inf X+ .align ALIGNARG(4) X+12: fstp %st(0) // pop y X+ fldt 8(%rsp) // x X+ fabs X+ fcompl MO(one) // < 1, == 1, or > 1 X+ fnstsw X+ andb $0x45, %ah X+ cmpb $0x45, %ah X+ je 13f // jump if x is NaN X+ X+ cmpb $0x40, %ah X+ je 14f // jump if |x| == 1 X+ X+ shlb $1, %ah X+ xorb %ah, %dl X+ andl $2, %edx X+#ifdef PIC X+ lea inf_zero(%rip),%rcx X+ fldl (%rcx, %rdx, 4) X+#else X+ fldl inf_zero(,%rdx, 4) X+#endif X+ ret X+ X+ .align ALIGNARG(4) X+14: fldl MO(one) X+ ret X+ X+ .align ALIGNARG(4) X+13: fldt 8(%rsp) // load x == NaN X+ ret X+ X+ .align ALIGNARG(4) X+ // x is ±inf X+15: fstp %st(0) // y X+ testb $2, %dh X+ jz 16f // jump if x == +inf X+ X+ // We must find out whether y is an odd integer. X+ fld %st // y : y X+ fistpll -8(%rsp) // y X+ fildll -8(%rsp) // int(y) : y X+ fucomip %st(1),%st X+ ffreep %st // X+ jne 17f X+ X+ // OK, the value is an integer, but is it odd? X+ mov -8(%rsp), %eax X+ mov -4(%rsp), %edx X+ andb $1, %al X+ jz 18f // jump if not odd X+ // It's an odd integer. X+ shrl $31, %edx X+#ifdef PIC X+ lea minf_mzero(%rip),%rcx X+ fldl (%rcx, %rdx, 8) X+#else X+ fldl minf_mzero(,%rdx, 8) X+#endif X+ ret X+ X+ .align ALIGNARG(4) X+16: fcompl MO(zero) X+ fnstsw X+ shrl $5, %eax X+ andl $8, %eax X+#ifdef PIC X+ lea inf_zero(%rip),%rcx X+ fldl (%rcx, %rax, 1) X+#else X+ fldl inf_zero(,%rax, 1) X+#endif X+ ret X+ X+ .align ALIGNARG(4) X+17: shll $30, %edx // sign bit for y in right position X+18: shrl $31, %edx X+#ifdef PIC X+ lea inf_zero(%rip),%rcx X+ fldl (%rcx, %rdx, 8) X+#else X+ fldl inf_zero(,%rdx, 8) X+#endif X+ ret X+ X+ .align ALIGNARG(4) X+ // x is ±0 X+20: fstp %st(0) // y X+ testb $2, %dl X+ jz 21f // y > 0 X+ X+ // x is ±0 and y is < 0. We must find out whether y is an odd integer. X+ testb $2, %dh X+ jz 25f X+ X+ fld %st // y : y X+ fistpll -8(%rsp) // y X+ fildll -8(%rsp) // int(y) : y X+ fucomip %st(1),%st X+ ffreep %st // X+ jne 26f X+ X+ // OK, the value is an integer, but is it odd? X+ mov -8(%rsp),%eax X+ mov -4(%rsp),%edx X+ andb $1, %al X+ jz 27f // jump if not odd X+ // It's an odd integer. X+ // Raise divide-by-zero exception and get minus infinity value. X+ fldl MO(one) X+ fdivl MO(zero) X+ fchs X+ ret X+ X+25: fstp %st(0) X+26: X+27: // Raise divide-by-zero exception and get infinity value. X+ fldl MO(one) X+ fdivl MO(zero) X+ ret X+ X+ .align ALIGNARG(4) X+ // x is ±0 and y is > 0. We must find out whether y is an odd integer. X+21: testb $2, %dh X+ jz 22f X+ X+ fld %st // y : y X+ fistpll -8(%rsp) // y X+ fildll -8(%rsp) // int(y) : y X+ fucomip %st(1),%st X+ ffreep %st // X+ jne 23f X+ X+ // OK, the value is an integer, but is it odd? X+ mov -8(%rsp),%eax X+ mov -4(%rsp),%edx X+ andb $1, %al X+ jz 24f // jump if not odd X+ // It's an odd integer. X+ fldl MO(mzero) X+ ret X+ X+22: fstp %st(0) X+23: X+24: fldl MO(zero) X+ ret X+ X+END(__ieee754_powl) X+ X+weak_alias(__ieee754_powl,powl) Xdiff -Nru qemu-0.7.0/bsd.orig/amd64/e_remainderl.S qemu-0.7.0/bsd/amd64/e_remainderl.S X--- qemu-0.7.0/bsd.orig/amd64/e_remainderl.S Wed Dec 31 19:00:00 1969 X+++ qemu-0.7.0/bsd/amd64/e_remainderl.S Fri Apr 29 02:11:27 2005 X@@ -0,0 +1,23 @@ X+/* X+ * Written by J.T. Conklin . X+ * Public domain. X+ * X+ * Adapted for `long double' by Ulrich Drepper . X+ * Adapted for x86-64 by Andreas Jaeger . X+ */ X+ X+#include X+#include X+ X+ENTRY(__ieee754_remainderl) X+ fldt 24(%rsp) X+ fldt 8(%rsp) X+1: fprem1 X+ fstsw %ax X+ testl $0x400,%eax X+ jnz 1b X+ fstp %st(1) X+ ret X+END (__ieee754_remainderl) X+ X+weak_alias(__ieee754_remainderl,remainderl) Xdiff -Nru qemu-0.7.0/bsd.orig/amd64/e_sqrtl.c qemu-0.7.0/bsd/amd64/e_sqrtl.c X--- qemu-0.7.0/bsd.orig/amd64/e_sqrtl.c Wed Dec 31 19:00:00 1969 X+++ qemu-0.7.0/bsd/amd64/e_sqrtl.c Fri Apr 29 02:11:27 2005 X@@ -0,0 +1,20 @@ X+/* X+ * Written by J.T. Conklin . X+ * Public domain. X+ * X+ * Adapted for `long double' by Ulrich Drepper . X+ */ X+ X+#include X+ X+long double X+__ieee754_sqrtl (long double x) X+{ X+ long double res; X+ X+ asm ("fsqrt" : "=t" (res) : "0" (x)); X+ X+ return res; X+} X+ X+weak_alias(__ieee754_sqrtl,sqrtl) Xdiff -Nru qemu-0.7.0/bsd.orig/amd64/s_ceill.S qemu-0.7.0/bsd/amd64/s_ceill.S X--- qemu-0.7.0/bsd.orig/amd64/s_ceill.S Wed Dec 31 19:00:00 1969 X+++ qemu-0.7.0/bsd/amd64/s_ceill.S Fri Apr 29 02:22:18 2005 X@@ -0,0 +1,246 @@ X+/* X+ * ==================================================== X+ * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. X+ * X+ * Developed at SunPro, a Sun Microsystems, Inc. business. X+ * Permission to use, copy, modify, and distribute this X+ * software is freely granted, provided that this notice X+ * is preserved. X+ * ==================================================== X+ * X+ * From: @(#)s_ceil.c 5.1 93/09/24 X+ */ X+/* XXX: generated from src/lib/msun/src/s_ceill.c */ X+ X+#include X+ X+__FBSDID("$FreeBSD: ports/emulators/qemu-devel/files/patch-libmath,v 1.4 2007/03/10 17:03:05 nox Exp $") X+ X+ .file "s_ceill.c" X+ .section .rodata.cst8,"aM",@progbits,8 X+ .p2align 3 X+.LC0: X+ .long 2281731484 X+ .long 2117592124 X+ .text X+ .p2align 4,,15 X+.globl ceill X+ .type ceill, @function X+ceill: X+.LFB17: X+ pushq %rbp X+.LCFI0: X+ pushq %rbx X+.LCFI1: X+ fldt 24(%rsp) X+ movq $0, -16(%rsp) X+ fld %st(0) X+ fstpt -40(%rsp) X+ movl -32(%rsp), %edi X+ movq -40(%rsp), %rsi X+ movl %edi, -16(%rsp) X+ movl -16(%rsp), %r11d X+ movq %rsi, -24(%rsp) X+ movl %r11d, %r10d X+ andl $32767, %r10d X+ leal -16383(%r10), %r8d X+ cmpl $30, %r8d X+ jg .L2 X+ testl %r8d, %r8d X+ js .L38 X+ movl -20(%rsp), %r9d X+ leal 1(%r8), %ecx X+ mov -24(%rsp), %eax X+ movl $4294967295, %ebp X+ movq %rsi, -40(%rsp) X+ movl %edi, -32(%rsp) X+ shrq %cl, %rbp X+ mov %r9d, %ebx X+ movq %rbx, %rdx X+ andq %rbp, %rdx X+ orq %rax, %rdx X+ fldt -40(%rsp) X+ je .L42 X+ ffreep %st(0) X+ testb $-128, -15(%rsp) X+ jne .L12 X+ movl $31, %ecx X+ movl $1, %eax X+ subl %r8d, %ecx X+ salq %cl, %rax X+ addl %eax, %r9d X+ mov %r9d, %eax X+ cmpq %rbx, %rax X+ jae .L32 X+ leal 1(%r10), %edx X+ movl %r11d, %eax X+ orl $-2147483648, %r9d X+ andw $-32768, %ax X+ andw $32767, %dx X+ orl %edx, %eax X+ movw %ax, -16(%rsp) X+.L32: X+ movl %r9d, -20(%rsp) X+.L12: X+ faddl .LC0(%rip) X+ fldz X+ fxch %st(1) X+ fucomip %st(1), %st X+ fstp %st(0) X+ jbe .L31 X+ movl %ebp, %eax X+ movl $0, -24(%rsp) X+ notl %eax X+ andl %eax, %r9d X+ movl %r9d, -20(%rsp) X+ .p2align 4,,7 X+.L31: X+ movq -24(%rsp), %rsi X+ movl -16(%rsp), %edi X+ movq %rsi, -40(%rsp) X+ movl %edi, -32(%rsp) X+ fldt -40(%rsp) X+ popq %rbx X+ popq %rbp X+ ret X+ .p2align 4,,7 X+.L2: X+ cmpl $62, %r8d X+ jle .L45 X+.L44: X+ ffreep %st(0) X+.L17: X+ movq %rsi, -40(%rsp) X+ movl %edi, -32(%rsp) X+ fldt -40(%rsp) X+ popq %rbx X+ popq %rbp X+ ret X+ .p2align 4,,7 X+.L45: X+ movl -24(%rsp), %edx X+ leal 1(%r8), %ecx X+ movq $-1, %rbx X+ movq %rsi, -40(%rsp) X+ movl %edi, -32(%rsp) X+ shrq %cl, %rbx X+ mov %edx, %r9d X+ testq %rbx, %r9 X+ fldt -40(%rsp) X+ je .L42 X+ ffreep %st(0) X+ testb $-128, -15(%rsp) X+ jne .L20 X+ cmpl $31, %r8d X+ je .L36 X+ movl $63, %ecx X+ movl $1, %eax X+ subl %r8d, %ecx X+ salq %cl, %rax X+ leal (%rdx,%rax), %eax X+ movl %eax, -24(%rsp) X+ mov %eax, %eax X+ cmpq %r9, %rax X+ jae .L20 X+.L36: X+ movl -20(%rsp), %eax X+ leal 1(%rax), %ecx X+ cmpl %eax, %ecx X+ jae .L34 X+ leal 1(%r10), %edx X+ movl %r11d, %eax X+ orl $-2147483648, %ecx X+ andw $-32768, %ax X+ andw $32767, %dx X+ orl %edx, %eax X+ movw %ax, -16(%rsp) X+.L34: X+ movl %ecx, -20(%rsp) X+ .p2align 4,,7 X+.L20: X+ faddl .LC0(%rip) X+ fldz X+ fxch %st(1) X+ fucomip %st(1), %st X+ fstp %st(0) X+ jbe .L31 X+ movl %ebx, %eax X+ notl %eax X+ andl %eax, -24(%rsp) X+ jmp .L31 X+ .p2align 4,,7 X+.L42: X+ fstp %st(1) X+ popq %rbx X+ popq %rbp X+ ret X+ .p2align 4,,7 X+.L38: X+ fldl .LC0(%rip) X+ faddp %st, %st(1) X+ fldz X+ fxch %st(1) X+ fucomip %st(1), %st X+ jbe .L44 X+ testl %r10d, %r10d X+ jle .L39 X+.L7: X+ movabsq $-9223372036854775808, %rsi X+ movl $16383, %edi X+ testb $-128, -15(%rsp) X+ movq %rsi, -40(%rsp) X+ movl %edi, -32(%rsp) X+ fldt -40(%rsp) X+ fcmovne %st(1), %st X+ fstp %st(1) X+ fstpt -40(%rsp) X+ movq -40(%rsp), %rsi X+ movl -32(%rsp), %edi X+ movq %rsi, -24(%rsp) X+ movl %edi, -16(%rsp) X+ jmp .L17 X+.L39: X+ movl -24(%rsp), %eax X+ orl -20(%rsp), %eax X+ je .L44 X+ jmp .L7 X+.LFE17: X+ .size ceill, .-ceill X+ .section .eh_frame,"a",@progbits X+.Lframe1: X+ .long .LECIE1-.LSCIE1 X+.LSCIE1: X+ .long 0x0 X+ .byte 0x1 X+ .string "" X+ .uleb128 0x1 X+ .sleb128 -8 X+ .byte 0x10 X+ .byte 0xc X+ .uleb128 0x7 X+ .uleb128 0x8 X+ .byte 0x90 X+ .uleb128 0x1 X+ .p2align 3 X+.LECIE1: X+.LSFDE1: X+ .long .LEFDE1-.LASFDE1 X+.LASFDE1: X+ .long .LASFDE1-.Lframe1 X+ .quad .LFB17 X+ .quad .LFE17-.LFB17 X+ .byte 0x4 X+ .long .LCFI0-.LFB17 X+ .byte 0xe X+ .uleb128 0x10 X+ .byte 0x4 X+ .long .LCFI1-.LCFI0 X+ .byte 0xe X+ .uleb128 0x18 X+ .byte 0x83 X+ .uleb128 0x3 X+ .byte 0x86 X+ .uleb128 0x2 X+ .p2align 3 X+.LEFDE1: X+ .ident "GCC: (GNU) 3.4.4 [FreeBSD] 20050421" Xdiff -Nru qemu-0.7.0/bsd.orig/amd64/s_cosl.S qemu-0.7.0/bsd/amd64/s_cosl.S X--- qemu-0.7.0/bsd.orig/amd64/s_cosl.S Wed Dec 31 19:00:00 1969 X+++ qemu-0.7.0/bsd/amd64/s_cosl.S Fri Apr 29 02:11:27 2005 X@@ -0,0 +1,33 @@ X+/* X+ * Written by J.T. Conklin . X+ * Public domain. X+ * X+ * Adapted for `long double' by Ulrich Drepper . X+ * Adapted for x86-64 by Andreas Jaeger . X+ */ X+ X+#include X+#include X+ X+RCSID("$NetBSD: $") X+ X+ENTRY(__cosl) X+ fldt 8(%rsp) X+ fcos X+ fnstsw %ax X+ testl $0x400,%eax X+ jnz 1f X+ ret X+ .align ALIGNARG(4) X+1: fldpi X+ fadd %st(0) X+ fxch %st(1) X+2: fprem1 X+ fnstsw %ax X+ testl $0x400,%eax X+ jnz 2b X+ fstp %st(1) X+ fcos X+ ret X+END (__cosl) X+weak_alias (__cosl, cosl) Xdiff -Nru qemu-0.7.0/bsd.orig/amd64/s_floorl.S qemu-0.7.0/bsd/amd64/s_floorl.S X--- qemu-0.7.0/bsd.orig/amd64/s_floorl.S Wed Dec 31 19:00:00 1969 X+++ qemu-0.7.0/bsd/amd64/s_floorl.S Fri Apr 29 02:24:32 2005 X@@ -0,0 +1,247 @@ X+/* X+ * ==================================================== X+ * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. X+ * X+ * Developed at SunPro, a Sun Microsystems, Inc. business. X+ * Permission to use, copy, modify, and distribute this X+ * software is freely granted, provided that this notice X+ * is preserved. X+ * ==================================================== X+ * X+ * From: @(#)s_floor.c 5.1 93/09/24 X+ */ X+/* XXX: generated from src/lib/msun/src/s_floorl.c */ X+ X+#include X+ X+__FBSDID("$FreeBSD: ports/emulators/qemu-devel/files/patch-libmath,v 1.4 2007/03/10 17:03:05 nox Exp $") X+ X+ .file "s_floorl.c" X+ .section .rodata.cst8,"aM",@progbits,8 X+ .p2align 3 X+.LC0: X+ .long 2281731484 X+ .long 2117592124 X+ .section .rodata.cst4,"aM",@progbits,4 X+ .p2align 2 X+.LC2: X+ .long 3212836864 X+ .text X+ .p2align 4,,15 X+.globl floorl X+ .type floorl, @function X+floorl: X+.LFB17: X+ pushq %rbp X+.LCFI0: X+ pushq %rbx X+.LCFI1: X+ fldt 24(%rsp) X+ movq $0, -16(%rsp) X+ fld %st(0) X+ fstpt -40(%rsp) X+ movl -32(%rsp), %edi X+ movq -40(%rsp), %rsi X+ movl %edi, -16(%rsp) X+ movl -16(%rsp), %r11d X+ movq %rsi, -24(%rsp) X+ movl %r11d, %r10d X+ andl $32767, %r10d X+ leal -16383(%r10), %r8d X+ cmpl $30, %r8d X+ jg .L2 X+ testl %r8d, %r8d X+ js .L38 X+ movl -20(%rsp), %r9d X+ leal 1(%r8), %ecx X+ mov -24(%rsp), %eax X+ movl $4294967295, %ebp X+ movq %rsi, -40(%rsp) X+ movl %edi, -32(%rsp) X+ shrq %cl, %rbp X+ mov %r9d, %ebx X+ movq %rbx, %rdx X+ andq %rbp, %rdx X+ orq %rax, %rdx X+ fldt -40(%rsp) X+ je .L42 X+ ffreep %st(0) X+ testb $-128, -15(%rsp) X+ je .L12 X+ movl $31, %ecx X+ movl $1, %eax X+ subl %r8d, %ecx X+ salq %cl, %rax X+ addl %eax, %r9d X+ mov %r9d, %eax X+ cmpq %rbx, %rax X+ jae .L32 X+ leal 1(%r10), %edx X+ movl %r11d, %eax X+ orl $-2147483648, %r9d X+ andw $-32768, %ax X+ andw $32767, %dx X+ orl %edx, %eax X+ movw %ax, -16(%rsp) X+.L32: X+ movl %r9d, -20(%rsp) X+.L12: X+ faddl .LC0(%rip) X+ fldz X+ fxch %st(1) X+ fucomip %st(1), %st X+ fstp %st(0) X+ jbe .L31 X+ movl %ebp, %eax X+ movl $0, -24(%rsp) X+ notl %eax X+ andl %eax, %r9d X+ movl %r9d, -20(%rsp) X+ .p2align 4,,7 X+.L31: X+ movq -24(%rsp), %rsi X+ movl -16(%rsp), %edi X+ movq %rsi, -40(%rsp) X+ movl %edi, -32(%rsp) X+ fldt -40(%rsp) X+ popq %rbx X+ popq %rbp X+ ret X+ .p2align 4,,7 X+.L2: X+ cmpl $62, %r8d X+ jle .L45 X+.L44: X+ ffreep %st(0) X+.L17: X+ movq %rsi, -40(%rsp) X+ movl %edi, -32(%rsp) X+ fldt -40(%rsp) X+ popq %rbx X+ popq %rbp X+ ret X+ .p2align 4,,7 X+.L45: X+ movl -24(%rsp), %edx X+ leal 1(%r8), %ecx X+ movq $-1, %rbx X+ movq %rsi, -40(%rsp) X+ movl %edi, -32(%rsp) X+ shrq %cl, %rbx X+ mov %edx, %r9d X+ testq %rbx, %r9 X+ fldt -40(%rsp) X+ je .L42 X+ ffreep %st(0) X+ testb $-128, -15(%rsp) X+ je .L20 X+ cmpl $31, %r8d X+ je .L36 X+ movl $63, %ecx X+ movl $1, %eax X+ subl %r8d, %ecx X+ salq %cl, %rax X+ leal (%rdx,%rax), %eax X+ movl %eax, -24(%rsp) X+ mov %eax, %eax X+ cmpq %r9, %rax X+ jae .L20 X+.L36: X+ movl -20(%rsp), %eax X+ leal 1(%rax), %ecx X+ cmpl %eax, %ecx X+ jae .L34 X+ leal 1(%r10), %edx X+ movl %r11d, %eax X+ orl $-2147483648, %ecx X+ andw $-32768, %ax X+ andw $32767, %dx X+ orl %edx, %eax X+ movw %ax, -16(%rsp) X+.L34: X+ movl %ecx, -20(%rsp) X+ .p2align 4,,7 X+.L20: X+ faddl .LC0(%rip) X+ fldz X+ fxch %st(1) X+ fucomip %st(1), %st X+ fstp %st(0) X+ jbe .L31 X+ movl %ebx, %eax X+ notl %eax X+ andl %eax, -24(%rsp) X+ jmp .L31 X+ .p2align 4,,7 X+.L42: X+ fstp %st(1) X+ popq %rbx X+ popq %rbp X+ ret X+ .p2align 4,,7 X+.L38: X+ fldl .LC0(%rip) X+ faddp %st, %st(1) X+ fldz X+ fxch %st(1) X+ fucomip %st(1), %st X+ jbe .L44 X+ testl %r10d, %r10d X+ jle .L39 X+.L7: X+ testb $-128, -15(%rsp) X+ je .L9 X+ ffreep %st(0) X+ flds .LC2(%rip) X+.L9: X+ fstpt -40(%rsp) X+ movq -40(%rsp), %rsi X+ movl -32(%rsp), %edi X+ movq %rsi, -24(%rsp) X+ movl %edi, -16(%rsp) X+ jmp .L17 X+.L39: X+ movl -24(%rsp), %eax X+ orl -20(%rsp), %eax X+ je .L44 X+ jmp .L7 X+.LFE17: X+ .size floorl, .-floorl X+ .section .eh_frame,"a",@progbits X+.Lframe1: X+ .long .LECIE1-.LSCIE1 X+.LSCIE1: X+ .long 0x0 X+ .byte 0x1 X+ .string "" X+ .uleb128 0x1 X+ .sleb128 -8 X+ .byte 0x10 X+ .byte 0xc X+ .uleb128 0x7 X+ .uleb128 0x8 X+ .byte 0x90 X+ .uleb128 0x1 X+ .p2align 3 X+.LECIE1: X+.LSFDE1: X+ .long .LEFDE1-.LASFDE1 X+.LASFDE1: X+ .long .LASFDE1-.Lframe1 X+ .quad .LFB17 X+ .quad .LFE17-.LFB17 X+ .byte 0x4 X+ .long .LCFI0-.LFB17 X+ .byte 0xe X+ .uleb128 0x10 X+ .byte 0x4 X+ .long .LCFI1-.LCFI0 X+ .byte 0xe X+ .uleb128 0x18 X+ .byte 0x83 X+ .uleb128 0x3 X+ .byte 0x86 X+ .uleb128 0x2 X+ .p2align 3 X+.LEFDE1: X+ .ident "GCC: (GNU) 3.4.4 [FreeBSD] 20050421" Xdiff -Nru qemu-0.7.0/bsd.orig/amd64/s_isnormal.c qemu-0.7.0/bsd/amd64/s_isnormal.c X--- qemu-0.7.0/bsd.orig/amd64/s_isnormal.c Wed Dec 31 19:00:00 1969 X+++ qemu-0.7.0/bsd/amd64/s_isnormal.c Fri Apr 29 02:11:27 2005 X@@ -0,0 +1,85 @@ X+/*- X+ * Copyright (c) 2003 Mike Barcroft X+ * Copyright (c) 2002-2004 David Schultz X+ * All rights reserved. X+ * X+ * Redistribution and use in source and binary forms, with or without X+ * modification, are permitted provided that the following conditions X+ * are met: X+ * 1. Redistributions of source code must retain the above copyright X+ * notice, this list of conditions and the following disclaimer. X+ * 2. Redistributions in binary form must reproduce the above copyright X+ * notice, this list of conditions and the following disclaimer in the X+ * documentation and/or other materials provided with the distribution. X+ * X+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND X+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE X+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE X+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE X+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL X+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS X+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) X+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT X+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY X+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF X+ * SUCH DAMAGE. X+ * X+ * $FreeBSD: ports/emulators/qemu-devel/files/patch-libmath,v 1.4 2007/03/10 17:03:05 nox Exp $ X+ */ X+ X+union IEEEf2bits { X+ float f; X+ struct { X+ unsigned int man :23; X+ unsigned int exp :8; X+ unsigned int sign :1; X+ } bits; X+}; X+ X+union IEEEd2bits { X+ double d; X+ struct { X+ unsigned int manl :32; X+ unsigned int manh :20; X+ unsigned int exp :11; X+ unsigned int sign :1; X+ } bits; X+}; X+ X+union IEEEl2bits { X+ long double e; X+ struct { X+ unsigned int manl :32; X+ unsigned int manh :32; X+ unsigned int exp :15; X+ unsigned int sign :1; X+ unsigned int junk :16; X+ } bits; X+}; X+ X+int X+__isnormal(double d) X+{ X+ union IEEEd2bits u; X+ X+ u.d = d; X+ return (u.bits.exp != 0 && u.bits.exp != 2047); X+} X+ X+int X+__isnormalf(float f) X+{ X+ union IEEEf2bits u; X+ X+ u.f = f; X+ return (u.bits.exp != 0 && u.bits.exp != 255); X+} X+ X+int X+__isnormall(long double e) X+{ X+ union IEEEl2bits u; X+ X+ u.e = e; X+ return (u.bits.exp != 0 && u.bits.exp != 32767); X+} Xdiff -Nru qemu-0.7.0/bsd.orig/amd64/s_llrint.S qemu-0.7.0/bsd/amd64/s_llrint.S X--- qemu-0.7.0/bsd.orig/amd64/s_llrint.S Wed Dec 31 19:00:00 1969 X+++ qemu-0.7.0/bsd/amd64/s_llrint.S Fri Apr 29 02:11:27 2005 X@@ -0,0 +1,6 @@ X+#include X+__FBSDID("$FreeBSD: ports/emulators/qemu-devel/files/patch-libmath,v 1.4 2007/03/10 17:03:05 nox Exp $") X+ X+/* sizeof(long) == sizeof(long long) */ X+#define fn llrint X+#include "s_lrint.S" Xdiff -Nru qemu-0.7.0/bsd.orig/amd64/s_llrintf.S qemu-0.7.0/bsd/amd64/s_llrintf.S X--- qemu-0.7.0/bsd.orig/amd64/s_llrintf.S Wed Dec 31 19:00:00 1969 X+++ qemu-0.7.0/bsd/amd64/s_llrintf.S Fri Apr 29 02:11:27 2005 X@@ -0,0 +1,6 @@ X+#include X+__FBSDID("$FreeBSD: ports/emulators/qemu-devel/files/patch-libmath,v 1.4 2007/03/10 17:03:05 nox Exp $") X+ X+/* sizeof(long) == sizeof(long long) */ X+#define fn llrintf X+#include "s_lrintf.S" Xdiff -Nru qemu-0.7.0/bsd.orig/amd64/s_llrintl.S qemu-0.7.0/bsd/amd64/s_llrintl.S X--- qemu-0.7.0/bsd.orig/amd64/s_llrintl.S Wed Dec 31 19:00:00 1969 X+++ qemu-0.7.0/bsd/amd64/s_llrintl.S Fri Apr 29 02:11:27 2005 X@@ -0,0 +1,35 @@ X+/* Round argument to nearest integral value according to current rounding X+ direction. X+ Copyright (C) 1997, 2002 Free Software Foundation, Inc. X+ This file is part of the GNU C Library. X+ X+ The GNU C Library is free software; you can redistribute it and/or X+ modify it under the terms of the GNU Lesser General Public X+ License as published by the Free Software Foundation; either X+ version 2.1 of the License, or (at your option) any later version. X+ X+ The GNU C Library is distributed in the hope that it will be useful, X+ but WITHOUT ANY WARRANTY; without even the implied warranty of X+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU X+ Lesser General Public License for more details. X+ X+ You should have received a copy of the GNU Lesser General Public X+ License along with the GNU C Library; if not, write to the Free X+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA X+ 02111-1307 USA. */ X+ X+#include X+#include X+ X+ .text X+ENTRY(__llrintl) X+ fldt 8(%rsp) X+ fistpll -8(%rsp) X+ fwait X+ movq -8(%rsp),%rax X+ ret X+END(__llrintl) X+weak_alias (__llrintl, llrintl) X+strong_alias (__llrintl, __lrintl) X+weak_alias (__llrintl, lrintl) X+ Xdiff -Nru qemu-0.7.0/bsd.orig/amd64/s_lrint.S qemu-0.7.0/bsd/amd64/s_lrint.S X--- qemu-0.7.0/bsd.orig/amd64/s_lrint.S Wed Dec 31 19:00:00 1969 X+++ qemu-0.7.0/bsd/amd64/s_lrint.S Fri Apr 29 02:11:27 2005 X@@ -0,0 +1,36 @@ X+/*- X+ * Copyright (c) 2005 David Schultz X+ * All rights reserved. X+ * X+ * Redistribution and use in source and binary forms, with or without X+ * modification, are permitted provided that the following conditions X+ * are met: X+ * 1. Redistributions of source code must retain the above copyright X+ * notice, this list of conditions and the following disclaimer. X+ * 2. Redistributions in binary form must reproduce the above copyright X+ * notice, this list of conditions and the following disclaimer in the X+ * documentation and/or other materials provided with the distribution. X+ * X+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND X+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE X+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE X+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE X+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL X+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS X+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) X+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT X+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY X+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF X+ * SUCH DAMAGE. X+ */ X+ X+#include X+ X+#ifndef fn X+__FBSDID("$FreeBSD: ports/emulators/qemu-devel/files/patch-libmath,v 1.4 2007/03/10 17:03:05 nox Exp $") X+#define fn lrint X+#endif X+ X+ENTRY(fn) X+ cvtsd2si %xmm0, %rax X+ ret Xdiff -Nru qemu-0.7.0/bsd.orig/amd64/s_lrintf.S qemu-0.7.0/bsd/amd64/s_lrintf.S X--- qemu-0.7.0/bsd.orig/amd64/s_lrintf.S Wed Dec 31 19:00:00 1969 X+++ qemu-0.7.0/bsd/amd64/s_lrintf.S Fri Apr 29 02:11:27 2005 X@@ -0,0 +1,36 @@ X+/*- X+ * Copyright (c) 2005 David Schultz X+ * All rights reserved. X+ * X+ * Redistribution and use in source and binary forms, with or without X+ * modification, are permitted provided that the following conditions X+ * are met: X+ * 1. Redistributions of source code must retain the above copyright X+ * notice, this list of conditions and the following disclaimer. X+ * 2. Redistributions in binary form must reproduce the above copyright X+ * notice, this list of conditions and the following disclaimer in the X+ * documentation and/or other materials provided with the distribution. X+ * X+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND X+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE X+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE X+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE X+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL X+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS X+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) X+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT X+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY X+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF X+ * SUCH DAMAGE. X+ */ X+ X+#include X+ X+#ifndef fn X+__FBSDID("$FreeBSD: ports/emulators/qemu-devel/files/patch-libmath,v 1.4 2007/03/10 17:03:05 nox Exp $") X+#define fn lrintf X+#endif X+ X+ENTRY(fn) X+ cvtss2si %xmm0, %rax X+ ret Xdiff -Nru qemu-0.7.0/bsd.orig/amd64/s_lrintl.S qemu-0.7.0/bsd/amd64/s_lrintl.S X--- qemu-0.7.0/bsd.orig/amd64/s_lrintl.S Wed Dec 31 19:00:00 1969 X+++ qemu-0.7.0/bsd/amd64/s_lrintl.S Fri Apr 29 02:11:27 2005 X@@ -0,0 +1 @@ X+/* Not needed, see s_llrintl.S. */ Xdiff -Nru qemu-0.7.0/bsd.orig/amd64/s_rintl.c qemu-0.7.0/bsd/amd64/s_rintl.c X--- qemu-0.7.0/bsd.orig/amd64/s_rintl.c Wed Dec 31 19:00:00 1969 X+++ qemu-0.7.0/bsd/amd64/s_rintl.c Fri Apr 29 02:11:27 2005 X@@ -0,0 +1,18 @@ X+/* X+ * Written by J.T. Conklin . X+ * Changes for long double by Ulrich Drepper X+ * Public domain. X+ */ X+ X+#include X+ X+long double X+__rintl (long double x) X+{ X+ long double res; X+ X+ asm ("frndint" : "=t" (res) : "0" (x)); X+ return res; X+} X+ X+weak_alias (__rintl, rintl) Xdiff -Nru qemu-0.7.0/bsd.orig/amd64/s_round.c qemu-0.7.0/bsd/amd64/s_round.c X--- qemu-0.7.0/bsd.orig/amd64/s_round.c Wed Dec 31 19:00:00 1969 X+++ qemu-0.7.0/bsd/amd64/s_round.c Fri Apr 29 02:11:27 2005 X@@ -0,0 +1,51 @@ X+/*- X+ * Copyright (c) 2003, Steven G. Kargl X+ * All rights reserved. X+ * X+ * Redistribution and use in source and binary forms, with or without X+ * modification, are permitted provided that the following conditions X+ * are met: X+ * 1. Redistributions of source code must retain the above copyright X+ * notice unmodified, this list of conditions, and the following X+ * disclaimer. X+ * 2. Redistributions in binary form must reproduce the above copyright X+ * notice, this list of conditions and the following disclaimer in the X+ * documentation and/or other materials provided with the distribution. X+ * X+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR X+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES X+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. X+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, X+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT X+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, X+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY X+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT X+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF X+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. X+ */ X+ X+#include X+__FBSDID("$FreeBSD: ports/emulators/qemu-devel/files/patch-libmath,v 1.4 2007/03/10 17:03:05 nox Exp $"); X+ X+#include X+ X+double X+round(double x) X+{ X+ double t; X+ X+ if (!isfinite(x)) X+ return (x); X+ X+ if (x >= 0.0) { X+ t = floor(x); X+ if (t - x <= -0.5) X+ t += 1.0; X+ return (t); X+ } else { X+ t = floor(-x); X+ if (t + x <= -0.5) X+ t += 1.0; X+ return (-t); X+ } X+} Xdiff -Nru qemu-0.7.0/bsd.orig/amd64/s_sinl.S qemu-0.7.0/bsd/amd64/s_sinl.S X--- qemu-0.7.0/bsd.orig/amd64/s_sinl.S Wed Dec 31 19:00:00 1969 X+++ qemu-0.7.0/bsd/amd64/s_sinl.S Fri Apr 29 02:11:27 2005 X@@ -0,0 +1,31 @@ X+/* X+ * Written by J.T. Conklin . X+ * Public domain. X+ * X+ * Adapted for `long double' by Ulrich Drepper . X+ * Adapted for x86-64 by Andreas Jaeger . X+ */ X+ X+#include X+#include X+ X+ENTRY(__sinl) X+ fldt 8(%rsp) X+ fsin X+ fnstsw %ax X+ testl $0x400,%eax X+ jnz 1f X+ ret X+ .align ALIGNARG(4) X+1: fldpi X+ fadd %st(0) X+ fxch %st(1) X+2: fprem1 X+ fnstsw %ax X+ testl $0x400,%eax X+ jnz 2b X+ fstp %st(1) X+ fsin X+ ret X+END (__sinl) X+weak_alias (__sinl, sinl) Xdiff -Nru qemu-0.7.0/bsd.orig/amd64/s_tanl.S qemu-0.7.0/bsd/amd64/s_tanl.S X--- qemu-0.7.0/bsd.orig/amd64/s_tanl.S Wed Dec 31 19:00:00 1969 X+++ qemu-0.7.0/bsd/amd64/s_tanl.S Fri Apr 29 02:11:27 2005 X@@ -0,0 +1,34 @@ X+/* X+ * Written by J.T. Conklin . X+ * Public domain. X+ * X+ * Adapted for `long double' by Ulrich Drepper . X+ * Adapted for x86-64 by Andreas Jaeger . X+ */ X+ X+#include X+#include X+ X+RCSID("$NetBSD: $") X+ X+ENTRY(__tanl) X+ fldt 8(%rsp) X+ fptan X+ fnstsw %ax X+ testl $0x400,%eax X+ jnz 1f X+ fstp %st(0) X+ ret X+1: fldpi X+ fadd %st(0) X+ fxch %st(1) X+2: fprem1 X+ fstsw %ax X+ testl $0x400,%eax X+ jnz 2b X+ fstp %st(1) X+ fptan X+ fstp %st(0) X+ ret X+END (__tanl) X+weak_alias (__tanl, tanl) Xdiff -Nru qemu-0.7.0/bsd.orig/i386/e_atan2l.c qemu-0.7.0/bsd/i386/e_atan2l.c X--- qemu-0.7.0/bsd.orig/i386/e_atan2l.c Wed Dec 31 19:00:00 1969 X+++ qemu-0.7.0/bsd/i386/e_atan2l.c Fri Apr 29 02:11:27 2005 X@@ -0,0 +1,20 @@ X+/* X+ * Written by J.T. Conklin . X+ * Public domain. X+ * X+ * Adapted for `long double' by Ulrich Drepper . X+ */ X+ X+#include X+ X+long double X+__ieee754_atan2l (long double y, long double x) X+{ X+ long double res; X+ X+ asm ("fpatan" : "=t" (res) : "u" (y), "0" (x) : "st(1)"); X+ X+ return res; X+} X+ X+weak_alias(__ieee754_atan2l, atan2l) Xdiff -Nru qemu-0.7.0/bsd.orig/i386/e_logl.S qemu-0.7.0/bsd/i386/e_logl.S X--- qemu-0.7.0/bsd.orig/i386/e_logl.S Wed Dec 31 19:00:00 1969 X+++ qemu-0.7.0/bsd/i386/e_logl.S Fri Apr 29 02:11:27 2005 X@@ -0,0 +1,63 @@ X+/* X+ * Written by J.T. Conklin . X+ * Public domain. X+ * X+ * Adapted for `long double' by Ulrich Drepper . X+ */ X+ X+#include X+#include X+ X+RCSID("$NetBSD: $") X+ X+ X+#ifdef __ELF__ X+ .section .rodata X+#else X+ .text X+#endif X+ .align ALIGNARG(4) X+ ASM_TYPE_DIRECTIVE(one,@object) X+one: .double 1.0 X+ ASM_SIZE_DIRECTIVE(one) X+ /* It is not important that this constant is precise. It is only X+ a value which is known to be on the safe side for using the X+ fyl2xp1 instruction. */ X+ ASM_TYPE_DIRECTIVE(limit,@object) X+limit: .double 0.29 X+ ASM_SIZE_DIRECTIVE(limit) X+ X+ X+#ifdef PIC X+#define MO(op) op##@GOTOFF(%edx) X+#else X+#define MO(op) op X+#endif X+ X+ .text X+ENTRY(__ieee754_logl) X+ fldln2 // log(2) X+ fldt 4(%esp) // x : log(2) X+#ifdef PIC X+ call 1f X+1: popl %edx X+ addl $_GLOBAL_OFFSET_TABLE_+[.-1b], %edx X+#endif X+ fld %st // x : x : log(2) X+ fsubl MO(one) // x-1 : x : log(2) X+ fld %st // x-1 : x-1 : x : log(2) X+ fabs // |x-1| : x-1 : x : log(2) X+ fcompl MO(limit) // x-1 : x : log(2) X+ fnstsw // x-1 : x : log(2) X+ andb $0x45, %ah X+ jz 2f X+ fstp %st(1) // x-1 : log(2) X+ fyl2xp1 // log(x) X+ ret X+ X+2: fstp %st(0) // x : log(2) X+ fyl2x // log(x) X+ ret X+END (__ieee754_logl) X+ X+weak_alias(__ieee754_logl,logl) Xdiff -Nru qemu-0.7.0/bsd.orig/i386/e_powl.S qemu-0.7.0/bsd/i386/e_powl.S X--- qemu-0.7.0/bsd.orig/i386/e_powl.S Wed Dec 31 19:00:00 1969 X+++ qemu-0.7.0/bsd/i386/e_powl.S Fri Apr 29 02:11:27 2005 X@@ -0,0 +1,341 @@ X+/* ix87 specific implementation of pow function. X+ Copyright (C) 1996, 1997, 1998, 1999, 2001, 2004 X+ Free Software Foundation, Inc. X+ This file is part of the GNU C Library. X+ Contributed by Ulrich Drepper , 1996. X+ X+ The GNU C Library is free software; you can redistribute it and/or X+ modify it under the terms of the GNU Lesser General Public X+ License as published by the Free Software Foundation; either X+ version 2.1 of the License, or (at your option) any later version. X+ X+ The GNU C Library is distributed in the hope that it will be useful, X+ but WITHOUT ANY WARRANTY; without even the implied warranty of X+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU X+ Lesser General Public License for more details. X+ X+ You should have received a copy of the GNU Lesser General Public X+ License along with the GNU C Library; if not, write to the Free X+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA X+ 02111-1307 USA. */ X+ X+#include X+#include X+ X+#ifdef __ELF__ X+ .section .rodata X+#else X+ .text X+#endif X+ X+ .align ALIGNARG(4) X+ ASM_TYPE_DIRECTIVE(infinity,@object) X+inf_zero: X+infinity: X+ .byte 0, 0, 0, 0, 0, 0, 0xf0, 0x7f X+ ASM_SIZE_DIRECTIVE(infinity) X+ ASM_TYPE_DIRECTIVE(zero,@object) X+zero: .double 0.0 X+ ASM_SIZE_DIRECTIVE(zero) X+ ASM_TYPE_DIRECTIVE(minf_mzero,@object) X+minf_mzero: X+minfinity: X+ .byte 0, 0, 0, 0, 0, 0, 0xf0, 0xff X+mzero: X+ .byte 0, 0, 0, 0, 0, 0, 0, 0x80 X+ ASM_SIZE_DIRECTIVE(minf_mzero) X+ ASM_TYPE_DIRECTIVE(one,@object) X+one: .double 1.0 X+ ASM_SIZE_DIRECTIVE(one) X+ ASM_TYPE_DIRECTIVE(limit,@object) X+limit: .double 0.29 X+ ASM_SIZE_DIRECTIVE(limit) X+ ASM_TYPE_DIRECTIVE(p63,@object) X+p63: .byte 0, 0, 0, 0, 0, 0, 0xe0, 0x43 X+ ASM_SIZE_DIRECTIVE(p63) X+ X+#ifdef PIC X+#define MO(op) op##@GOTOFF(%ecx) X+#define MOX(op,x,f) op##@GOTOFF(%ecx,x,f) X+#else X+#define MO(op) op X+#define MOX(op,x,f) op(,x,f) X+#endif X+ X+ .text X+ENTRY(__ieee754_powl) X+ fldt 16(%esp) // y X+ fxam X+ X+#ifdef PIC X+ call 1f X+1: popl %ecx X+ addl $_GLOBAL_OFFSET_TABLE_+[.-1b], %ecx X+#endif X+ X+ fnstsw X+ movb %ah, %dl X+ andb $0x45, %ah X+ cmpb $0x40, %ah // is y == 0 ? X+ je 11f X+ X+ cmpb $0x05, %ah // is y == ±inf ? X+ je 12f X+ X+ cmpb $0x01, %ah // is y == NaN ? X+ je 30f X+ X+ fldt 4(%esp) // x : y X+ X+ subl $8,%esp X+ X+ fxam X+ fnstsw X+ movb %ah, %dh X+ andb $0x45, %ah X+ cmpb $0x40, %ah X+ je 20f // x is ±0 X+ X+ cmpb $0x05, %ah X+ je 15f // x is ±inf X+ X+ fxch // y : x X+ X+ /* fistpll raises invalid exception for |y| >= 1L<<63. */ X+ fld %st // y : y : x X+ fabs // |y| : y : x X+ fcompl MO(p63) // y : x X+ fnstsw X+ sahf X+ jnc 2f X+ X+ /* First see whether `y' is a natural number. In this case we X+ can use a more precise algorithm. */ X+ fld %st // y : y : x X+ fistpll (%esp) // y : x X+ fildll (%esp) // int(y) : y : x X+ fucomp %st(1) // y : x X+ fnstsw X+ sahf X+ jne 2f X+ X+ /* OK, we have an integer value for y. */ X+ popl %eax X+ popl %edx X+ orl $0, %edx X+ fstp %st(0) // x X+ jns 4f // y >= 0, jump X+ fdivrl MO(one) // 1/x (now referred to as x) X+ negl %eax X+ adcl $0, %edx X+ negl %edx X+4: fldl MO(one) // 1 : x X+ fxch X+ X+6: shrdl $1, %edx, %eax X+ jnc 5f X+ fxch X+ fmul %st(1) // x : ST*x X+ fxch X+5: fmul %st(0), %st // x*x : ST*x X+ shrl $1, %edx X+ movl %eax, %ecx X+ orl %edx, %ecx X+ jnz 6b X+ fstp %st(0) // ST*x X+ ret X+ X+ /* y is ±NAN */ X+30: fldt 4(%esp) // x : y X+ fldl MO(one) // 1.0 : x : y X+ fucomp %st(1) // x : y X+ fnstsw X+ sahf X+ je 31f X+ fxch // y : x X+31: fstp %st(1) X+ ret X+ X+ .align ALIGNARG(4) X+2: /* y is a real number. */ X+ fxch // x : y X+ fldl MO(one) // 1.0 : x : y X+ fld %st(1) // x : 1.0 : x : y X+ fsub %st(1) // x-1 : 1.0 : x : y X+ fabs // |x-1| : 1.0 : x : y X+ fcompl MO(limit) // 1.0 : x : y X+ fnstsw X+ fxch // x : 1.0 : y X+ sahf X+ ja 7f X+ fsub %st(1) // x-1 : 1.0 : y X+ fyl2xp1 // log2(x) : y X+ jmp 8f X+ X+7: fyl2x // log2(x) : y X+8: fmul %st(1) // y*log2(x) : y X+ fxam X+ fnstsw X+ andb $0x45, %ah X+ cmpb $0x05, %ah // is y*log2(x) == ±inf ? X+ je 28f X+ fst %st(1) // y*log2(x) : y*log2(x) X+ frndint // int(y*log2(x)) : y*log2(x) X+ fsubr %st, %st(1) // int(y*log2(x)) : fract(y*log2(x)) X+ fxch // fract(y*log2(x)) : int(y*log2(x)) X+ f2xm1 // 2^fract(y*log2(x))-1 : int(y*log2(x)) X+ faddl MO(one) // 2^fract(y*log2(x)) : int(y*log2(x)) X+ fscale // 2^fract(y*log2(x))*2^int(y*log2(x)) : int(y*log2(x)) X+ addl $8, %esp X+ fstp %st(1) // 2^fract(y*log2(x))*2^int(y*log2(x)) X+ ret X+ X+28: fstp %st(1) // y*log2(x) X+ fldl MO(one) // 1 : y*log2(x) X+ fscale // 2^(y*log2(x)) : y*log2(x) X+ addl $8, %esp X+ fstp %st(1) // 2^(y*log2(x)) X+ ret X+ X+ // pow(x,±0) = 1 X+ .align ALIGNARG(4) X+11: fstp %st(0) // pop y X+ fldl MO(one) X+ ret X+ X+ // y == ±inf X+ .align ALIGNARG(4) X+12: fstp %st(0) // pop y X+ fldt 4(%esp) // x X+ fabs X+ fcompl MO(one) // < 1, == 1, or > 1 X+ fnstsw X+ andb $0x45, %ah X+ cmpb $0x45, %ah X+ je 13f // jump if x is NaN X+ X+ cmpb $0x40, %ah X+ je 14f // jump if |x| == 1 X+ X+ shlb $1, %ah X+ xorb %ah, %dl X+ andl $2, %edx X+ fldl MOX(inf_zero, %edx, 4) X+ ret X+ X+ .align ALIGNARG(4) X+14: fldl MO(one) X+ ret X+ X+ .align ALIGNARG(4) X+13: fldt 4(%esp) // load x == NaN X+ ret X+ X+ .align ALIGNARG(4) X+ // x is ±inf X+15: fstp %st(0) // y X+ testb $2, %dh X+ jz 16f // jump if x == +inf X+ X+ // We must find out whether y is an odd integer. X+ fld %st // y : y X+ fistpll (%esp) // y X+ fildll (%esp) // int(y) : y X+ fucompp // X+ fnstsw X+ sahf X+ jne 17f X+ X+ // OK, the value is an integer, but is it odd? X+ popl %eax X+ popl %edx X+ andb $1, %al X+ jz 18f // jump if not odd X+ // It's an odd integer. X+ shrl $31, %edx X+ fldl MOX(minf_mzero, %edx, 8) X+ ret X+ X+ .align ALIGNARG(4) X+16: fcompl MO(zero) X+ addl $8, %esp X+ fnstsw X+ shrl $5, %eax X+ andl $8, %eax X+ fldl MOX(inf_zero, %eax, 1) X+ ret X+ X+ .align ALIGNARG(4) X+17: shll $30, %edx // sign bit for y in right position X+ addl $8, %esp X+18: shrl $31, %edx X+ fldl MOX(inf_zero, %edx, 8) X+ ret X+ X+ .align ALIGNARG(4) X+ // x is ±0 X+20: fstp %st(0) // y X+ testb $2, %dl X+ jz 21f // y > 0 X+ X+ // x is ±0 and y is < 0. We must find out whether y is an odd integer. X+ testb $2, %dh X+ jz 25f X+ X+ fld %st // y : y X+ fistpll (%esp) // y X+ fildll (%esp) // int(y) : y X+ fucompp // X+ fnstsw X+ sahf X+ jne 26f X+ X+ // OK, the value is an integer, but is it odd? X+ popl %eax X+ popl %edx X+ andb $1, %al X+ jz 27f // jump if not odd X+ // It's an odd integer. X+ // Raise divide-by-zero exception and get minus infinity value. X+ fldl MO(one) X+ fdivl MO(zero) X+ fchs X+ ret X+ X+25: fstp %st(0) X+26: addl $8, %esp X+27: // Raise divide-by-zero exception and get infinity value. X+ fldl MO(one) X+ fdivl MO(zero) X+ ret X+ X+ .align ALIGNARG(4) X+ // x is ±0 and y is > 0. We must find out whether y is an odd integer. X+21: testb $2, %dh X+ jz 22f X+ X+ fld %st // y : y X+ fistpll (%esp) // y X+ fildll (%esp) // int(y) : y X+ fucompp // X+ fnstsw X+ sahf X+ jne 23f X+ X+ // OK, the value is an integer, but is it odd? X+ popl %eax X+ popl %edx X+ andb $1, %al X+ jz 24f // jump if not odd X+ // It's an odd integer. X+ fldl MO(mzero) X+ ret X+ X+22: fstp %st(0) X+23: addl $8, %esp // Don't use 2 x pop X+24: fldl MO(zero) X+ ret X+ X+END(__ieee754_powl) X+ X+weak_alias(__ieee754_powl,powl) Xdiff -Nru qemu-0.7.0/bsd.orig/i386/e_remainderl.S qemu-0.7.0/bsd/i386/e_remainderl.S X--- qemu-0.7.0/bsd.orig/i386/e_remainderl.S Wed Dec 31 19:00:00 1969 X+++ qemu-0.7.0/bsd/i386/e_remainderl.S Fri Apr 29 02:11:27 2005 X@@ -0,0 +1,24 @@ X+/* X+ * Written by J.T. Conklin . X+ * Public domain. X+ * X+ * Adapted for `long double' by Ulrich Drepper . X+ */ X+ X+#include X+#include X+ X+RCSID("$NetBSD: $") X+ X+ENTRY(__ieee754_remainderl) X+ fldt 16(%esp) X+ fldt 4(%esp) X+1: fprem1 X+ fstsw %ax X+ sahf X+ jp 1b X+ fstp %st(1) X+ ret X+END (__ieee754_remainderl) X+ X+weak_alias(__ieee754_remainderl,remainderl) Xdiff -Nru qemu-0.7.0/bsd.orig/i386/e_sqrtl.c qemu-0.7.0/bsd/i386/e_sqrtl.c X--- qemu-0.7.0/bsd.orig/i386/e_sqrtl.c Wed Dec 31 19:00:00 1969 X+++ qemu-0.7.0/bsd/i386/e_sqrtl.c Fri Apr 29 02:11:27 2005 X@@ -0,0 +1,20 @@ X+/* X+ * Written by J.T. Conklin . X+ * Public domain. X+ * X+ * Adapted for `long double' by Ulrich Drepper . X+ */ X+ X+#include X+ X+long double X+__ieee754_sqrtl (long double x) X+{ X+ long double res; X+ X+ asm ("fsqrt" : "=t" (res) : "0" (x)); X+ X+ return res; X+} X+ X+weak_alias(__ieee754_sqrtl,sqrtl) Xdiff -Nru qemu-0.7.0/bsd.orig/i386/s_ceill.S qemu-0.7.0/bsd/i386/s_ceill.S X--- qemu-0.7.0/bsd.orig/i386/s_ceill.S Wed Dec 31 19:00:00 1969 X+++ qemu-0.7.0/bsd/i386/s_ceill.S Fri Apr 29 02:11:27 2005 X@@ -0,0 +1,27 @@ X+/* X+ * Based on code written by J.T. Conklin . X+ * Public domain. X+ */ X+ X+#include X+RCSID("$FreeBSD: ports/emulators/qemu-devel/files/patch-libmath,v 1.4 2007/03/10 17:03:05 nox Exp $") X+ X+ENTRY(ceill) X+ pushl %ebp X+ movl %esp,%ebp X+ subl $8,%esp X+ X+ fstcw -4(%ebp) /* store fpu control word */ X+ movw -4(%ebp),%dx X+ orw $0x0800,%dx /* round towards +oo */ X+ andw $0xfbff,%dx X+ movw %dx,-8(%ebp) X+ fldcw -8(%ebp) /* load modfied control word */ X+ X+ fldt 8(%ebp) /* round */ X+ frndint X+ X+ fldcw -4(%ebp) /* restore original control word */ X+ X+ leave X+ ret Xdiff -Nru qemu-0.7.0/bsd.orig/i386/s_cosl.S qemu-0.7.0/bsd/i386/s_cosl.S X--- qemu-0.7.0/bsd.orig/i386/s_cosl.S Wed Dec 31 19:00:00 1969 X+++ qemu-0.7.0/bsd/i386/s_cosl.S Fri Apr 29 02:11:27 2005 X@@ -0,0 +1,32 @@ X+/* X+ * Written by J.T. Conklin . X+ * Public domain. X+ * X+ * Adapted for `long double' by Ulrich Drepper . X+ */ X+ X+#include X+#include X+ X+RCSID("$NetBSD: $") X+ X+ENTRY(__cosl) X+ fldt 4(%esp) X+ fcos X+ fnstsw %ax X+ testl $0x400,%eax X+ jnz 1f X+ ret X+ .align ALIGNARG(4) X+1: fldpi X+ fadd %st(0) X+ fxch %st(1) X+2: fprem1 X+ fnstsw %ax X+ testl $0x400,%eax X+ jnz 2b X+ fstp %st(1) X+ fcos X+ ret X+END (__cosl) X+weak_alias (__cosl, cosl) Xdiff -Nru qemu-0.7.0/bsd.orig/i386/s_floorl.S qemu-0.7.0/bsd/i386/s_floorl.S X--- qemu-0.7.0/bsd.orig/i386/s_floorl.S Wed Dec 31 19:00:00 1969 X+++ qemu-0.7.0/bsd/i386/s_floorl.S Fri Apr 29 02:11:27 2005 X@@ -0,0 +1,27 @@ X+/* X+ * Based on code written by J.T. Conklin . X+ * Public domain. X+ */ X+ X+#include X+RCSID("$FreeBSD: ports/emulators/qemu-devel/files/patch-libmath,v 1.4 2007/03/10 17:03:05 nox Exp $") X+ X+ENTRY(floorl) X+ pushl %ebp X+ movl %esp,%ebp X+ subl $8,%esp X+ X+ fstcw -4(%ebp) /* store fpu control word */ X+ movw -4(%ebp),%dx X+ orw $0x0400,%dx /* round towards -oo */ X+ andw $0xf7ff,%dx X+ movw %dx,-8(%ebp) X+ fldcw -8(%ebp) /* load modfied control word */ X+ X+ fldt 8(%ebp) /* round */ X+ frndint X+ X+ fldcw -4(%ebp) /* restore original control word */ X+ X+ leave X+ ret Xdiff -Nru qemu-0.7.0/bsd.orig/i386/s_isnormal.c qemu-0.7.0/bsd/i386/s_isnormal.c X--- qemu-0.7.0/bsd.orig/i386/s_isnormal.c Wed Dec 31 19:00:00 1969 X+++ qemu-0.7.0/bsd/i386/s_isnormal.c Fri Apr 29 02:11:27 2005 X@@ -0,0 +1,85 @@ X+/*- X+ * Copyright (c) 2003 Mike Barcroft X+ * Copyright (c) 2002-2004 David Schultz X+ * All rights reserved. X+ * X+ * Redistribution and use in source and binary forms, with or without X+ * modification, are permitted provided that the following conditions X+ * are met: X+ * 1. Redistributions of source code must retain the above copyright X+ * notice, this list of conditions and the following disclaimer. X+ * 2. Redistributions in binary form must reproduce the above copyright X+ * notice, this list of conditions and the following disclaimer in the X+ * documentation and/or other materials provided with the distribution. X+ * X+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND X+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE X+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE X+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE X+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL X+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS X+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) X+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT X+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY X+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF X+ * SUCH DAMAGE. X+ * X+ * $FreeBSD: ports/emulators/qemu-devel/files/patch-libmath,v 1.4 2007/03/10 17:03:05 nox Exp $ X+ */ X+ X+union IEEEf2bits { X+ float f; X+ struct { X+ unsigned int man :23; X+ unsigned int exp :8; X+ unsigned int sign :1; X+ } bits; X+}; X+ X+union IEEEd2bits { X+ double d; X+ struct { X+ unsigned int manl :32; X+ unsigned int manh :20; X+ unsigned int exp :11; X+ unsigned int sign :1; X+ } bits; X+}; X+ X+union IEEEl2bits { X+ long double e; X+ struct { X+ unsigned int manl :32; X+ unsigned int manh :32; X+ unsigned int exp :15; X+ unsigned int sign :1; X+ unsigned int junk :16; X+ } bits; X+}; X+ X+int X+__isnormal(double d) X+{ X+ union IEEEd2bits u; X+ X+ u.d = d; X+ return (u.bits.exp != 0 && u.bits.exp != 2047); X+} X+ X+int X+__isnormalf(float f) X+{ X+ union IEEEf2bits u; X+ X+ u.f = f; X+ return (u.bits.exp != 0 && u.bits.exp != 255); X+} X+ X+int X+__isnormall(long double e) X+{ X+ union IEEEl2bits u; X+ X+ u.e = e; X+ return (u.bits.exp != 0 && u.bits.exp != 32767); X+} Xdiff -Nru qemu-0.7.0/bsd.orig/i386/s_llrint.S qemu-0.7.0/bsd/i386/s_llrint.S X--- qemu-0.7.0/bsd.orig/i386/s_llrint.S Wed Dec 31 19:00:00 1969 X+++ qemu-0.7.0/bsd/i386/s_llrint.S Fri Apr 29 02:11:27 2005 X@@ -0,0 +1,36 @@ X+/*- X+ * Copyright (c) 2005 David Schultz X+ * All rights reserved. X+ * X+ * Redistribution and use in source and binary forms, with or without X+ * modification, are permitted provided that the following conditions X+ * are met: X+ * 1. Redistributions of source code must retain the above copyright X+ * notice, this list of conditions and the following disclaimer. X+ * 2. Redistributions in binary form must reproduce the above copyright X+ * notice, this list of conditions and the following disclaimer in the X+ * documentation and/or other materials provided with the distribution. X+ * X+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND X+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE X+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE X+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE X+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL X+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS X+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) X+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT X+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY X+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF X+ * SUCH DAMAGE. X+ */ X+ X+#include X+RCSID("$FreeBSD: ports/emulators/qemu-devel/files/patch-libmath,v 1.4 2007/03/10 17:03:05 nox Exp $"); X+ X+ENTRY(llrint) X+ fldl 4(%esp) X+ subl $8,%esp X+ fistpll (%esp) X+ popl %eax X+ popl %edx X+ ret Xdiff -Nru qemu-0.7.0/bsd.orig/i386/s_llrintf.S qemu-0.7.0/bsd/i386/s_llrintf.S X--- qemu-0.7.0/bsd.orig/i386/s_llrintf.S Wed Dec 31 19:00:00 1969 X+++ qemu-0.7.0/bsd/i386/s_llrintf.S Fri Apr 29 02:11:27 2005 X@@ -0,0 +1,36 @@ X+/*- X+ * Copyright (c) 2005 David Schultz X+ * All rights reserved. X+ * X+ * Redistribution and use in source and binary forms, with or without X+ * modification, are permitted provided that the following conditions X+ * are met: X+ * 1. Redistributions of source code must retain the above copyright X+ * notice, this list of conditions and the following disclaimer. X+ * 2. Redistributions in binary form must reproduce the above copyright X+ * notice, this list of conditions and the following disclaimer in the X+ * documentation and/or other materials provided with the distribution. X+ * X+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND X+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE X+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE X+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE X+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL X+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS X+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) X+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT X+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY X+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF X+ * SUCH DAMAGE. X+ */ X+ X+#include X+RCSID("$FreeBSD: ports/emulators/qemu-devel/files/patch-libmath,v 1.4 2007/03/10 17:03:05 nox Exp $") X+ X+ENTRY(llrintf) X+ flds 4(%esp) X+ subl $8,%esp X+ fistpll (%esp) X+ popl %eax X+ popl %edx X+ ret Xdiff -Nru qemu-0.7.0/bsd.orig/i386/s_llrintl.S qemu-0.7.0/bsd/i386/s_llrintl.S X--- qemu-0.7.0/bsd.orig/i386/s_llrintl.S Wed Dec 31 19:00:00 1969 X+++ qemu-0.7.0/bsd/i386/s_llrintl.S Fri Apr 29 02:11:27 2005 X@@ -0,0 +1,35 @@ X+/* Round argument to nearest integral value according to current rounding X+ direction. X+ Copyright (C) 1997 Free Software Foundation, Inc. X+ This file is part of the GNU C Library. X+ Contributed by Ulrich Drepper , 1997. X+ X+ The GNU C Library is free software; you can redistribute it and/or X+ modify it under the terms of the GNU Lesser General Public X+ License as published by the Free Software Foundation; either X+ version 2.1 of the License, or (at your option) any later version. X+ X+ The GNU C Library is distributed in the hope that it will be useful, X+ but WITHOUT ANY WARRANTY; without even the implied warranty of X+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU X+ Lesser General Public License for more details. X+ X+ You should have received a copy of the GNU Lesser General Public X+ License along with the GNU C Library; if not, write to the Free X+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA X+ 02111-1307 USA. */ X+ X+#include X+#include X+ X+ .text X+ENTRY(__llrintl) X+ fldt 4(%esp) X+ subl $8, %esp X+ fistpll (%esp) X+ fwait X+ popl %eax X+ popl %edx X+ ret X+END(__llrintl) X+weak_alias (__llrintl, llrintl) Xdiff -Nru qemu-0.7.0/bsd.orig/i386/s_lrint.S qemu-0.7.0/bsd/i386/s_lrint.S X--- qemu-0.7.0/bsd.orig/i386/s_lrint.S Wed Dec 31 19:00:00 1969 X+++ qemu-0.7.0/bsd/i386/s_lrint.S Fri Apr 29 02:11:27 2005 X@@ -0,0 +1,35 @@ X+/*- X+ * Copyright (c) 2005 David Schultz X+ * All rights reserved. X+ * X+ * Redistribution and use in source and binary forms, with or without X+ * modification, are permitted provided that the following conditions X+ * are met: X+ * 1. Redistributions of source code must retain the above copyright X+ * notice, this list of conditions and the following disclaimer. X+ * 2. Redistributions in binary form must reproduce the above copyright X+ * notice, this list of conditions and the following disclaimer in the X+ * documentation and/or other materials provided with the distribution. X+ * X+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND X+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE X+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE X+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE X+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL X+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS X+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) X+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT X+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY X+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF X+ * SUCH DAMAGE. X+ */ X+ X+#include X+RCSID("$FreeBSD: ports/emulators/qemu-devel/files/patch-libmath,v 1.4 2007/03/10 17:03:05 nox Exp $"); X+ X+ENTRY(lrint) X+ fldl 4(%esp) X+ subl $4,%esp X+ fistpl (%esp) X+ popl %eax X+ ret Xdiff -Nru qemu-0.7.0/bsd.orig/i386/s_lrintf.S qemu-0.7.0/bsd/i386/s_lrintf.S X--- qemu-0.7.0/bsd.orig/i386/s_lrintf.S Wed Dec 31 19:00:00 1969 X+++ qemu-0.7.0/bsd/i386/s_lrintf.S Fri Apr 29 02:11:27 2005 X@@ -0,0 +1,35 @@ X+/*- X+ * Copyright (c) 2005 David Schultz X+ * All rights reserved. X+ * X+ * Redistribution and use in source and binary forms, with or without X+ * modification, are permitted provided that the following conditions X+ * are met: X+ * 1. Redistributions of source code must retain the above copyright X+ * notice, this list of conditions and the following disclaimer. X+ * 2. Redistributions in binary form must reproduce the above copyright X+ * notice, this list of conditions and the following disclaimer in the X+ * documentation and/or other materials provided with the distribution. X+ * X+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND X+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE X+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE X+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE X+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL X+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS X+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) X+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT X+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY X+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF X+ * SUCH DAMAGE. X+ */ X+ X+#include X+RCSID("$FreeBSD: ports/emulators/qemu-devel/files/patch-libmath,v 1.4 2007/03/10 17:03:05 nox Exp $") X+ X+ENTRY(lrintf) X+ flds 4(%esp) X+ subl $4,%esp X+ fistpl (%esp) X+ popl %eax X+ ret Xdiff -Nru qemu-0.7.0/bsd.orig/i386/s_lrintl.S qemu-0.7.0/bsd/i386/s_lrintl.S X--- qemu-0.7.0/bsd.orig/i386/s_lrintl.S Wed Dec 31 19:00:00 1969 X+++ qemu-0.7.0/bsd/i386/s_lrintl.S Fri Apr 29 02:11:27 2005 X@@ -0,0 +1,34 @@ X+/* Round argument to nearest integral value according to current rounding X+ direction. X+ Copyright (C) 1997 Free Software Foundation, Inc. X+ This file is part of the GNU C Library. X+ Contributed by Ulrich Drepper , 1997. X+ X+ The GNU C Library is free software; you can redistribute it and/or X+ modify it under the terms of the GNU Lesser General Public X+ License as published by the Free Software Foundation; either X+ version 2.1 of the License, or (at your option) any later version. X+ X+ The GNU C Library is distributed in the hope that it will be useful, X+ but WITHOUT ANY WARRANTY; without even the implied warranty of X+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU X+ Lesser General Public License for more details. X+ X+ You should have received a copy of the GNU Lesser General Public X+ License along with the GNU C Library; if not, write to the Free X+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA X+ 02111-1307 USA. */ X+ X+#include X+#include X+ X+ .text X+ENTRY(__lrintl) X+ fldt 4(%esp) X+ subl $4, %esp X+ fistpl (%esp) X+ fwait X+ popl %eax X+ ret X+END(__lrintl) X+weak_alias (__lrintl, lrintl) Xdiff -Nru qemu-0.7.0/bsd.orig/i386/s_rintl.c qemu-0.7.0/bsd/i386/s_rintl.c X--- qemu-0.7.0/bsd.orig/i386/s_rintl.c Wed Dec 31 19:00:00 1969 X+++ qemu-0.7.0/bsd/i386/s_rintl.c Fri Apr 29 02:11:27 2005 X@@ -0,0 +1,18 @@ X+/* X+ * Written by J.T. Conklin . X+ * Changes for long double by Ulrich Drepper X+ * Public domain. X+ */ X+ X+#include X+ X+long double X+__rintl (long double x) X+{ X+ long double res; X+ X+ asm ("frndint" : "=t" (res) : "0" (x)); X+ return res; X+} X+ X+weak_alias (__rintl, rintl) Xdiff -Nru qemu-0.7.0/bsd.orig/i386/s_round.c qemu-0.7.0/bsd/i386/s_round.c X--- qemu-0.7.0/bsd.orig/i386/s_round.c Wed Dec 31 19:00:00 1969 X+++ qemu-0.7.0/bsd/i386/s_round.c Fri Apr 29 02:11:27 2005 X@@ -0,0 +1,51 @@ X+/*- X+ * Copyright (c) 2003, Steven G. Kargl X+ * All rights reserved. X+ * X+ * Redistribution and use in source and binary forms, with or without X+ * modification, are permitted provided that the following conditions X+ * are met: X+ * 1. Redistributions of source code must retain the above copyright X+ * notice unmodified, this list of conditions, and the following X+ * disclaimer. X+ * 2. Redistributions in binary form must reproduce the above copyright X+ * notice, this list of conditions and the following disclaimer in the X+ * documentation and/or other materials provided with the distribution. X+ * X+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR X+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES X+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. X+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, X+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT X+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, X+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY X+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT X+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF X+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. X+ */ X+ X+#include X+__FBSDID("$FreeBSD: ports/emulators/qemu-devel/files/patch-libmath,v 1.4 2007/03/10 17:03:05 nox Exp $"); X+ X+#include X+ X+double X+round(double x) X+{ X+ double t; X+ X+ if (!isfinite(x)) X+ return (x); X+ X+ if (x >= 0.0) { X+ t = floor(x); X+ if (t - x <= -0.5) X+ t += 1.0; X+ return (t); X+ } else { X+ t = floor(-x); X+ if (t + x <= -0.5) X+ t += 1.0; X+ return (-t); X+ } X+} Xdiff -Nru qemu-0.7.0/bsd.orig/i386/s_sinl.S qemu-0.7.0/bsd/i386/s_sinl.S X--- qemu-0.7.0/bsd.orig/i386/s_sinl.S Wed Dec 31 19:00:00 1969 X+++ qemu-0.7.0/bsd/i386/s_sinl.S Fri Apr 29 02:11:27 2005 X@@ -0,0 +1,32 @@ X+/* X+ * Written by J.T. Conklin . X+ * Public domain. X+ * X+ * Adapted for `long double' by Ulrich Drepper . X+ */ X+ X+#include X+#include X+ X+RCSID("$NetBSD: $") X+ X+ENTRY(__sinl) X+ fldt 4(%esp) X+ fsin X+ fnstsw %ax X+ testl $0x400,%eax X+ jnz 1f X+ ret X+ .align ALIGNARG(4) X+1: fldpi X+ fadd %st(0) X+ fxch %st(1) X+2: fprem1 X+ fnstsw %ax X+ testl $0x400,%eax X+ jnz 2b X+ fstp %st(1) X+ fsin X+ ret X+END (__sinl) X+weak_alias (__sinl, sinl) Xdiff -Nru qemu-0.7.0/bsd.orig/i386/s_tanl.S qemu-0.7.0/bsd/i386/s_tanl.S X--- qemu-0.7.0/bsd.orig/i386/s_tanl.S Wed Dec 31 19:00:00 1969 X+++ qemu-0.7.0/bsd/i386/s_tanl.S Fri Apr 29 02:11:27 2005 X@@ -0,0 +1,33 @@ X+/* X+ * Written by J.T. Conklin . X+ * Public domain. X+ * X+ * Adapted for `long double' by Ulrich Drepper . X+ */ X+ X+#include X+#include X+ X+RCSID("$NetBSD: $") X+ X+ENTRY(__tanl) X+ fldt 4(%esp) X+ fptan X+ fnstsw %ax X+ testl $0x400,%eax X+ jnz 1f X+ fstp %st(0) X+ ret X+1: fldpi X+ fadd %st(0) X+ fxch %st(1) X+2: fprem1 X+ fstsw %ax X+ testl $0x400,%eax X+ jnz 2b X+ fstp %st(1) X+ fptan X+ fstp %st(0) X+ ret X+END (__tanl) X+weak_alias (__tanl, tanl) Xdiff -Nru qemu-0.7.0/bsd.orig/sysdep.h qemu-0.7.0/bsd/sysdep.h X--- qemu-0.7.0/bsd.orig/sysdep.h Wed Dec 31 19:00:00 1969 X+++ qemu-0.7.0/bsd/sysdep.h Fri Apr 29 02:11:27 2005 X@@ -0,0 +1,20 @@ X+#ifndef _QEMU_BSD_SYSDEP_H_ X+#define _QEMU_BSD_SYSDEP_H_ X+ X+#include X+ X+#define HAVE_ELF X+ X+#ifdef __ASSEMBLER__ X+#define ALIGNARG(log2) 1<files/patch-libmath2 << 'END-of-files/patch-libmath2' XIndex: qemu/bsd/Makefile X@@ -16,7 +16,8 @@ X ${MACHINE_ARCH}/s_rintl.c \ X ${MACHINE_ARCH}/s_round.c \ X ${MACHINE_ARCH}/s_sinl.S \ X- ${MACHINE_ARCH}/s_tanl.S X+ ${MACHINE_ARCH}/s_tanl.S \ X+ ${MACHINE_ARCH}/s_ldexpl.c X X OBJS= ${SRCS:R:S/$/.o/} X XIndex: qemu/bsd/i386/s_ldexpl.c X@@ -0,0 +1,21 @@ X+#include X+#include X+#include X+ X+long double __ldexpl(long double x, int expn) X+{ X+ long double res; X+ if (!isfinite (x) || x == 0.0L) X+ return x; X+ X+ __asm__ ("fscale" X+ : "=t" (res) X+ : "0" (x), "u" ((long double) expn)); X+ X+ if (!isfinite (res) || res == 0.0L) X+ errno = ERANGE; X+ X+ return res; X+} X+ X+weak_alias(__ldexpl,ldexpl) XIndex: qemu/bsd/amd64/s_ldexpl.c X@@ -0,0 +1,21 @@ X+#include X+#include X+#include X+ X+long double __ldexpl(long double x, int expn) X+{ X+ long double res; X+ if (!isfinite (x) || x == 0.0L) X+ return x; X+ X+ __asm__ ("fscale" X+ : "=t" (res) X+ : "0" (x), "u" ((long double) expn)); X+ X+ if (!isfinite (res) || res == 0.0L) X+ errno = ERANGE; X+ X+ return res; X+} X+ X+weak_alias(__ldexpl,ldexpl) END-of-files/patch-libmath2 echo x - files/patch-libmath4 sed 's/^X//' >files/patch-libmath4 << 'END-of-files/patch-libmath4' XIndex: qemu/bsd/i386/s_ldexpl.c X@@ -2,6 +2,30 @@ X #include X #include X X+/* 4.x doesnt have isfinite */ X+#ifndef isfinite X+#define isfinite __isfinitel X+ X+union IEEEl2bits { X+ long double e; X+ struct { X+ unsigned int manl :32; X+ unsigned int manh :32; X+ unsigned int exp :15; X+ unsigned int sign :1; X+ unsigned int junk :16; X+ } bits; X+}; X+ X+static int __isfinitel(long double x) X+{ X+ union IEEEl2bits u; X+ X+ u.e = x; X+ return (u.bits.exp != 32767); X+} X+#endif X+ X long double __ldexpl(long double x, int expn) X { X long double res; XIndex: qemu/bsd/i386/s_round.c X@@ -29,6 +29,11 @@ X X #include X X+/* 4.x doesnt have isfinite */ X+#ifndef isfinite X+#define isfinite(x) (!isnan(x) && !isinf(x)) X+#endif X+ X double X round(double x) X { END-of-files/patch-libmath4 echo x - files/patch-osdep.c sed 's/^X//' >files/patch-osdep.c << 'END-of-files/patch-osdep.c' XIndex: qemu/osdep.c X@@ -75,8 +75,10 @@ X #include X #include X #else X+#ifndef __FreeBSD__ X #include X #endif X+#endif X X #include X #include X@@ -87,7 +87,7 @@ X static int phys_ram_size = 0; X void *ptr; X X-#ifdef __OpenBSD__ /* no need (?) for a dummy file on OpenBSD */ X+#if defined(__OpenBSD__) || defined(__FreeBSD__) /* no need (?) for a dummy file on OpenBSD/FreeBSD */ X int map_anon = MAP_ANON; X #else X int map_anon = 0; X@@ -154,7 +154,7 @@ X } X size = (size + 4095) & ~4095; X ftruncate(phys_ram_fd, phys_ram_size + size); X-#endif /* !__OpenBSD__ */ X+#endif /* !(__OpenBSD__ || __FreeBSD__) */ X ptr = mmap(NULL, X size, X PROT_WRITE | PROT_READ, map_anon | MAP_SHARED, END-of-files/patch-osdep.c echo x - files/patch-qemu-doc.texi sed 's/^X//' >files/patch-qemu-doc.texi << 'END-of-files/patch-qemu-doc.texi' XIndex: qemu/qemu-doc.texi X@@ -985,7 +985,8 @@ X X @c man begin SEEALSO X The HTML documentation of QEMU for more precise information and Linux X-user mode emulator invocation. X+user mode emulator invocation, as well as the FreeBSD host notes in X+@file{pkg-message} in the relevant qemu port directory. X @c man end X X @c man begin AUTHOR END-of-files/patch-qemu-doc.texi echo x - files/patch-target-i386-translate.c sed 's/^X//' >files/patch-target-i386-translate.c << 'END-of-files/patch-target-i386-translate.c' END-of-files/patch-target-i386-translate.c echo x - files/patch-target-mips-cpu.h sed 's/^X//' >files/patch-target-mips-cpu.h << 'END-of-files/patch-target-mips-cpu.h' XIndex: qemu/target-mips/cpu.h X@@ -8,6 +8,13 @@ X #include "config.h" X #include "softfloat.h" X X+#ifdef __FreeBSD__ X+#if __FreeBSD__ <= 4 X+typedef uint32_t uint_fast8_t; X+typedef uint32_t uint_fast16_t; X+#endif X+#endif X+ X typedef union fpr_t fpr_t; X union fpr_t { X double d; END-of-files/patch-target-mips-cpu.h echo x - files/patch-tcg-i386-tcg-target.c sed 's/^X//' >files/patch-tcg-i386-tcg-target.c << 'END-of-files/patch-tcg-i386-tcg-target.c' END-of-files/patch-tcg-i386-tcg-target.c echo x - files/patch-vl.c sed 's/^X//' >files/patch-vl.c << 'END-of-files/patch-vl.c' XIndex: qemu/vl.c X@@ -9850,15 +9850,15 @@ X phys_ram_size += ram_size; X } X X+ /* init the dynamic translator */ X+ cpu_exec_init_all(tb_size * 1024 * 1024); X+ X phys_ram_base = qemu_vmalloc(phys_ram_size); X if (!phys_ram_base) { X fprintf(stderr, "Could not allocate physical memory\n"); X exit(1); X } X X- /* init the dynamic translator */ X- cpu_exec_init_all(tb_size * 1024 * 1024); X- X bdrv_init(emulate_aio); X X /* we always create the cdrom drive, even if no disk is there */ END-of-files/patch-vl.c echo x - files/patch-vl.c-ppbus sed 's/^X//' >files/patch-vl.c-ppbus << 'END-of-files/patch-vl.c-ppbus' XIndex: qemu/qemu-char.c X@@ -63,6 +63,8 @@ X #include X #ifdef __FreeBSD__ X #include X+#include X+#include X #else X #include X #endif X@@ -1268,6 +1270,65 @@ X } X #endif /* __linux__ */ X X+#if defined(__FreeBSD__) X+static int pp_ioctl(CharDriverState *chr, int cmd, void *arg) X+{ X+ int fd = (int)chr->opaque; X+ uint8_t b; X+ X+ switch(cmd) { X+ case CHR_IOCTL_PP_READ_DATA: X+ if (ioctl(fd, PPIGDATA, &b) < 0) X+ return -ENOTSUP; X+ *(uint8_t *)arg = b; X+ break; X+ case CHR_IOCTL_PP_WRITE_DATA: X+ b = *(uint8_t *)arg; X+ if (ioctl(fd, PPISDATA, &b) < 0) X+ return -ENOTSUP; X+ break; X+ case CHR_IOCTL_PP_READ_CONTROL: X+ if (ioctl(fd, PPIGCTRL, &b) < 0) X+ return -ENOTSUP; X+ *(uint8_t *)arg = b; X+ break; X+ case CHR_IOCTL_PP_WRITE_CONTROL: X+ b = *(uint8_t *)arg; X+ if (ioctl(fd, PPISCTRL, &b) < 0) X+ return -ENOTSUP; X+ break; X+ case CHR_IOCTL_PP_READ_STATUS: X+ if (ioctl(fd, PPIGSTATUS, &b) < 0) X+ return -ENOTSUP; X+ *(uint8_t *)arg = b; X+ break; X+ default: X+ return -ENOTSUP; X+ } X+ return 0; X+} X+ X+CharDriverState *qemu_chr_open_pp(const char *filename) X+{ X+ CharDriverState *chr; X+ int fd; X+ X+ fd = open(filename, O_RDWR); X+ if (fd < 0) X+ return NULL; X+ X+ chr = qemu_mallocz(sizeof(CharDriverState)); X+ if (!chr) { X+ close(fd); X+ return NULL; X+ } X+ chr->opaque = (void *)fd; X+ chr->chr_write = null_chr_write; X+ chr->chr_ioctl = pp_ioctl; X+ return chr; X+} X+#endif X+ X #else /* _WIN32 */ X X typedef struct { X@@ -2151,6 +2212,10 @@ X if (strstart(filename, "/dev/parport", NULL)) { X chr = qemu_chr_open_pp(filename); X } else X+#elif defined(__FreeBSD__) X+ if (strstart(filename, "/dev/ppi", NULL)) { X+ chr = qemu_chr_open_pp(filename); X+ } else X #endif X #if defined(__linux__) || defined(__sun__) || defined(__FreeBSD__) \ X || defined(__NetBSD__) || defined(__OpenBSD__) END-of-files/patch-vl.c-ppbus echo x - files/patch-vl.c-serial sed 's/^X//' >files/patch-vl.c-serial << 'END-of-files/patch-vl.c-serial' XIndex: qemu/qemu-char.c X@@ -1606,10 +1606,13 @@ X cfsetospeed(&tty, spd); X X tty.c_iflag &= ~(IGNBRK|BRKINT|PARMRK|ISTRIP X- |INLCR|IGNCR|ICRNL|IXON); X- tty.c_oflag |= OPOST; X+ |INLCR|IGNCR|ICRNL|IXON|IMAXBEL); X+ tty.c_oflag &= ~OPOST; /* Don't do any output processing! */ X tty.c_lflag &= ~(ECHO|ECHONL|ICANON|IEXTEN|ISIG); X tty.c_cflag &= ~(CSIZE|PARENB|PARODD|CRTSCTS|CSTOPB); X+#ifdef __FreeBSD__ X+ cfmakeraw(&tty); X+#endif X switch(data_bits) { X default: X case 8: END-of-files/patch-vl.c-serial echo x - files/patch-x_keymap.c sed 's/^X//' >files/patch-x_keymap.c << 'END-of-files/patch-x_keymap.c' XIndex: qemu/x_keymap.c X@@ -41,9 +41,9 @@ X 0xb5, /* 112 Divide */ X 0xb8, /* 113 Alt-R */ X 0xc6, /* 114 Break */ X- 0x0, /* 115 */ X- 0x0, /* 116 */ X- 0x0, /* 117 */ X+ 0xdb, /* 115 left windows key */ X+ 0xdc, /* 116 right windows key */ X+ 0xdd, /* 117 right menu key */ X 0x0, /* 118 */ X 0x0, /* 119 */ X 0x0, /* 120 */ END-of-files/patch-x_keymap.c echo x - files/pcap-patch sed 's/^X//' >files/pcap-patch << 'END-of-files/pcap-patch' X--- Makefile.target.orig 2008-07-18 15:18:11.000000000 -0400 X+++ Makefile.target 2008-07-18 15:23:11.000000000 -0400 X@@ -619,6 +619,13 @@ X COCOA_LIBS+=-framework CoreAudio X endif X endif X+ifdef CONFIG_PCAP X+ifdef CONFIG_WIN32 X+LIBS+=-lwpcap X+else X+LIBS+=-lpcap X+endif X+endif X ifdef CONFIG_SLIRP X CPPFLAGS+=-I$(SRC_PATH)/slirp X endif X--- configure.orig 2008-07-18 15:18:42.000000000 -0400 X+++ configure 2008-07-18 15:22:24.000000000 -0400 X@@ -88,6 +88,7 @@ X mingw32="no" X EXESUF="" X gdbstub="yes" X+pcap="no" X slirp="yes" X fmod_lib="" X fmod_inc="" X@@ -278,6 +279,8 @@ X ;; X --enable-mingw32) mingw32="yes" ; cross_prefix="i386-mingw32-" ; linux_user="no" X ;; X+ --enable-pcap) pcap="yes" X+ ;; X --disable-slirp) slirp="no" X ;; X --disable-kqemu) kqemu="no" X@@ -712,6 +715,28 @@ X fi # -z $sdl X X ########################################## X+# pcap probe X+ X+if test "$pcap" = "yes" ; then X+ cat > $TMPC << EOF X+#include X+int main(void) { return (pcap_lib_version() == (char *)0 ? 1 : 0); } X+EOF X+ if test "$mingw32" = "no" ; then X+ libpcap=-lpcap X+ else X+ libpcap=-lwpcap X+ fi X+ if ! $cc $ARCH_CFLAGS -o $TMPE $TMPC $libpcap 2> /dev/null ; then X+ echo X+ echo "Error: Could not find pcap" X+ echo "Make sure to have the pcap libs and headers installed." X+ echo X+ exit 1 X+ fi X+fi # test "$pcap" X+ X+########################################## X # VNC TLS detection X if test "$vnc_tls" = "yes" ; then X `pkg-config gnutls` || vnc_tls="no" X@@ -865,6 +890,7 @@ X echo " TLS CFLAGS $vnc_tls_cflags" X echo " TLS LIBS $vnc_tls_libs" X fi X+echo "pcap support $pcap" X if test -n "$sparc_cpu"; then X echo "Target Sparc Arch $sparc_cpu" X fi X@@ -1034,6 +1060,15 @@ X if test $profiler = "yes" ; then X echo "#define CONFIG_PROFILER 1" >> $config_h X fi X+if test "$pcap" = "yes" ; then X+ echo "CONFIG_PCAP=yes" >> $config_mak X+ echo "#define CONFIG_PCAP 1" >> $config_h X+ if test "$mingw32" = "no" ; then X+ if test -c /dev/bpf0 ; then X+ echo "#define HAVE_BPF 1" >> $config_h X+ fi X+ fi X+fi X if test "$slirp" = "yes" ; then X echo "CONFIG_SLIRP=yes" >> $config_mak X echo "#define CONFIG_SLIRP 1" >> $config_h XIndex: net.c X@@ -102,6 +102,13 @@ X int inet_aton(const char *cp, struct in_addr *ia); X #endif X X+#if defined(CONFIG_PCAP) X+#if defined(_WIN32) X+#define WPCAP 1 X+#endif X+#include X+#endif X+ X #if defined(CONFIG_SLIRP) X #include "libslirp.h" X #endif X@@ -3914,6 +3921,164 @@ X } X } X X+#if defined(CONFIG_PCAP) X+ X+typedef struct PCAPState { X+ VLANClientState *vc; X+ pcap_t *handle; X+} PCAPState; X+ X+static void pcap_receive(void *opaque, const uint8_t *buf, int size) X+{ X+ PCAPState *s = (PCAPState *)opaque; X+ X+ pcap_sendpacket(s->handle, (u_char*)buf, size); X+} X+ X+static void pcap_callback(u_char *user, struct pcap_pkthdr *phdr, u_char *pdata) X+{ X+ VLANClientState *vc = (VLANClientState *)user; X+ X+ qemu_send_packet(vc, pdata, phdr->len); X+} X+ X+static void pcap_send(void *opaque) X+{ X+ PCAPState *s = (PCAPState *)opaque; X+ X+ pcap_dispatch(s->handle, 1, (pcap_handler)&pcap_callback, (u_char *)s->vc); X+} X+ X+static int net_pcap_init(VLANState *vlan, char *ifname) X+{ X+ PCAPState *s = NULL; X+ struct bpf_program fcode = { 0, NULL }; X+ char pcap_program[64]; X+ char macstr[] = "xx:xx:xx:xx:xx:xx"; X+ char errbuf[PCAP_ERRBUF_SIZE]; X+#if defined(_WIN32) X+ HANDLE h; X+#endif X+ int i; X+ X+ /* Find guest's MAC address. */ X+ for (i = 0; i < nb_nics; i++) X+ if (nd_table[i].vlan == vlan) { X+ u_char *mac = nd_table[i].macaddr; X+ snprintf(macstr, sizeof(macstr), "%02x:%02x:%02x:%02x:%02x:%02x", X+ mac[0], mac[1], mac[2], mac[3], mac[4], mac[5]); X+ break; X+ } X+ if (macstr[0] == 'x') { X+ fprintf(stderr, "qemu: net_pcap_init: no matching NIC found\n"); X+ return -1; X+ } X+ X+ s = qemu_mallocz(sizeof(PCAPState)); X+ if (!s) X+ return -1; X+ X+ if (ifname == NULL && (ifname = pcap_lookupdev(errbuf)) == NULL) { X+ fprintf(stderr, "qemu: pcap_lookupdev: %s\n", errbuf); X+ goto fail; X+ } X+ X+ /* Attempt to connect device. */ X+ s->handle = (void *)pcap_open_live(ifname, 65535, 1, 0, errbuf); X+ if (!s->handle) { X+ fprintf(stderr, "qemu: pcap_open_live: %s\n", errbuf); X+ goto fail; X+ } X+ X+ /* Set filter program. */ X+ snprintf(pcap_program, 64, "ether dst %s or multicast", macstr); X+ if (pcap_compile(s->handle, &fcode, pcap_program, 1, 0) < 0) { X+ fprintf(stderr, "qemu: pcap_compile failed\n"); X+ goto fail; X+ } X+ if (pcap_setfilter(s->handle, &fcode) < 0) { X+ fprintf(stderr, "qemu: pcap_setfilter failed\n"); X+ goto fail; X+ } X+ X+ /* Set non-blocking mode. */ X+ if (pcap_setnonblock(s->handle, 1, errbuf) < 0) { X+ fprintf(stderr, "qemu: pcap_setnonblock: %s\n", errbuf); X+ goto fail; X+ } X+ X+#if defined(_WIN32) X+ /* X+ * Tell the kernel that the packet has to be seen immediately. X+ */ X+ if (pcap_setmintocopy(s->handle, 0) < 0) { X+ fprintf(stderr, "qemu: pcap failed to set immediate mode\n"); X+ goto fail; X+ } X+#else /* !_WIN32 */ X+#if defined(HAVE_BPF) X+#if defined(BIOCIMMEDIATE) X+ /* X+ * Tell the kernel that the packet has to be seen immediately. X+ */ X+ { X+ unsigned int one = 1; X+ if (ioctl(pcap_fileno(s->handle), BIOCIMMEDIATE, &one) < 0) { X+ fprintf(stderr, "qemu: pcap failed to set immediate mode\n"); X+ goto fail; X+ } X+ } X+#endif /* BIOCIMMEDIATE */ X+ X+#if defined(BIOCFEEDBACK) X+ /* X+ * Tell the kernel that the sent packet has to be fed back. X+ * This is necessary to connect host and guest. X+ */ X+ { X+ unsigned int one = 1; X+ if (ioctl(pcap_fileno(s->handle), BIOCFEEDBACK, &one) < 0) { X+ fprintf(stderr, "qemu: pcap failed to set feedback mode\n"); X+ goto fail; X+ } X+ } X+#endif /* BIOCFEEDBACK */ X+#endif /* HAVE_BPF */ X+#endif /* _WIN32 */ X+ X+ s->vc = qemu_new_vlan_client(vlan, pcap_receive, NULL, s); X+ snprintf(s->vc->info_str, sizeof(s->vc->info_str), "pcap redirector"); X+ X+#if defined(_WIN32) X+ if ((h = pcap_getevent(s->handle)) == NULL) { X+ fprintf(stderr, "qemu: pcap_getevent failed\n"); X+ goto fail; X+ } X+ qemu_add_wait_object(h, pcap_send, s); X+#else /* !_WIN32 */ X+ if ((i = pcap_get_selectable_fd(s->handle)) < 0) { X+ fprintf(stderr, "qemu: pcap_get_selectable_fd failed\n"); X+ goto fail; X+ } X+ qemu_set_fd_handler(i, pcap_send, NULL, s); X+#endif /* _WIN32 */ X+ X+ return 0; X+ X+fail: X+ if (s) { X+ if (s->handle) { X+ if (fcode.bf_len) X+ pcap_freecode(&fcode); X+ pcap_close(s->handle); X+ } X+ qemu_free(s); X+ } X+ X+ return -1; X+} X+#endif /* CONFIG_PCAP */ X+ X #if defined(CONFIG_SLIRP) X X /* slirp network adapter */ X@@ -4983,6 +5150,16 @@ X are wanted */ X ret = 0; X } else X+#ifdef CONFIG_PCAP X+ if (!strcmp(device, "pcap")) { X+ char ifname[64]; X+ vlan->nb_host_devs++; X+ if (get_param_value(ifname, sizeof(ifname), "ifname", p) <= 0) X+ ret = net_pcap_init(vlan, NULL); X+ else X+ ret = net_pcap_init(vlan, ifname); X+ } else X+#endif X #ifdef CONFIG_SLIRP X if (!strcmp(device, "user")) { X if (get_param_value(buf, sizeof(buf), "hostname", p)) { X--- vl.c.orig 2008-07-18 15:19:26.000000000 -0400 X+++ vl.c 2008-07-18 15:31:25.000000000 -0400 X@@ -7398,6 +7575,10 @@ X "Network options:\n" X "-net nic[,vlan=n][,macaddr=addr][,model=type]\n" X " create a new Network Interface Card and connect it to VLAN 'n'\n" X+#ifdef CONFIG_PCAP X+ "-net pcap[,vlan=n][,ifname=name]\n" X+ " connect the host network interface using PCAP to VLAN 'n'\n" X+#endif X #ifdef CONFIG_SLIRP X "-net user[,vlan=n][,hostname=host]\n" X " connect the user mode network stack to VLAN 'n' and send\n" END-of-files/pcap-patch echo x - files/rtl8139-re-patch sed 's/^X//' >files/rtl8139-re-patch << 'END-of-files/rtl8139-re-patch' XIndex: hw/rtl8139.c X@@ -58,7 +58,7 @@ X //#define RTL8139_CALCULATE_RXCRC 1 X X /* Uncomment to enable on-board timer interrupts */ X-//#define RTL8139_ONBOARD_TIMER 1 X+#define RTL8139_ONBOARD_TIMER 1 X X #if defined(RTL8139_CALCULATE_RXCRC) X /* For crc32 */ END-of-files/rtl8139-re-patch exit From nox at jelal.kn-bremen.de Sun Nov 9 08:58:28 2008 From: nox at jelal.kn-bremen.de (Juergen Lock) Date: Sun Nov 9 08:58:34 2008 Subject: [Qemu-devel] first tests of qemu svn r5646 on FreeBSD - usb still slow, bsd-user doesn't build, some warnings... In-Reply-To: <200811091637.mA9Gbb5t034814@saturn.kn-bremen.de> References: <20081107214438.GA27376@saturn.kn-bremen.de> <200811091637.mA9Gbb5t034814@saturn.kn-bremen.de> Message-ID: <20081109165659.GA35617@saturn.kn-bremen.de> On Sun, Nov 09, 2008 at 05:37:37PM +0100, I wrote: > In article you write: > >On 11/7/08, Juergen Lock wrote: > >> Hi! > >> > >> I just prepared another experimental emulators/qemu-devel port update, > >> http://people.freebsd.org/~nox/qemu/qemu-devel-20081107.patch > >> I haven't tested it that much yet (you are welcome to help there! :) > >> but so far didn't notice much changes compared to last time (r5499), > >> usb is still slow with my Linux 2.6.26 guest (probably to be expected, > >> nothing committed there since.) > > > >The patch is against a bunch of patches, which makes it hard to see > >what has really changed. Could you make an updated set of patches > >available somewhere? At least osdep.c and qemu-char.c patches look > >reasonable enough to be committed. > > > I'll add a shar of the 20081107 qemu-devel port's files/*patch* below, > (yes most of these probably shouldn't be merged... The ones named *-patch > are conditionally applied depending on user-set OPTIONS.) > > Oh and btw the osdep.c patch was already posted here, see > http://lists.gnu.org/archive/html/qemu-devel/2008-10/msg00038.html > > >> In other news: The new sparc64-bsd-user target doesn't build because > >> SYSCALL_G7RFLAG and SYSCALL_G2RFLAG are undefined, and I noticed a few > >> warnings that may be interesting: > > > >The attached patch should fix the undefined flag problem, please test. > > Nope, still two of them left at line 219ff. :) > > Here comes the shar: > > # This is a shell archive. Save it in a file, remove anything before > # this line, and then unpack it by entering "sh file". Note, it may > # create directories; files and directories will be owned by you and > # have default permissions. > # > # This archive contains: > # > # files/ > # files/cdrom-dma-patch > # files/patch-90_security > # files/patch-CVE-2008-0928 > # files/patch-CVE-2008-4539 > # files/patch-Makefile > # files/patch-aa > # files/patch-ac > # files/patch-audio-4 > # files/patch-audio-sdlaudio.c > # files/patch-bc > # files/patch-bd > # files/patch-be > # files/patch-bf > # files/patch-bg > # files/patch-block.c > # files/patch-bsdusb.patch > # files/patch-bt > # files/patch-configure > # files/patch-cpu-exec.c > # files/patch-emulate-aio > # files/patch-exec-all.h > # files/patch-exec.c > # files/patch-fbsd > # files/patch-fix_bsd_user_fbsd ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Ooops, ignore this one, leftover from testing... (And btw you can ignore the 0 byte ones too, they were just for generating diffs easier.) Sorry, Juergen From drew at mykitchentable.net Sun Nov 9 13:04:07 2008 From: drew at mykitchentable.net (Drew Tomlinson) Date: Sun Nov 9 13:04:15 2008 Subject: Trouble With Linux Compatibility Message-ID: <49174AF8.50201@mykitchentable.net> I have never used linux compatibility before. I followed the instructions from the handbook and have the linux kernel module loaded, a procfs filesystem mounted, and linux_base-fc4 and additional libraries installed. urchin# kldstat Id Refs Address Size Name 1 11 0xffffffff80100000 6a85c8 kernel 2 1 0xffffffff807a9000 20220 geom_mirror.ko 3 2 0xffffffffb04b7000 17b8a linux.ko 4 1 0xffffffffb051f000 3457 linprocfs.ko urchin# df -h Filesystem Size Used Avail Capacity Mounted on /dev/mirror/gm0s1a 496M 243M 213M 53% / devfs 1.0K 1.0K 0B 100% /dev /dev/mirror/gm0s1d 224G 7.7G 198G 4% /usr linprocfs 4.0K 4.0K 0B 100% /usr/compat/linux/proc urchin# portversion -v | grep linux linux-expat = up-to-date with port linux-fontconfig = up-to-date with port linux-glib2 = up-to-date with port linux-openmotif = up-to-date with port linux-xorg-libs = up-to-date with port linux_base-fc4 = up-to-date with port I am trying to install a linux rpm of Legato Networker Backup Client. However I get these errors: urchin# rpm -i --dbpath /var/lib/rpm --root /compat/linux --test lgtoclnt-7.3.4-1.i686.rpm error: failed dependencies: /bin/sh is needed by lgtoclnt-7.3.4-1 /bin/sh is needed by lgtoclnt-7.3.4-1 /bin/sh is needed by lgtoclnt-7.3.4-1 /bin/sh is needed by lgtoclnt-7.3.4-1 ld-linux.so.2 is needed by lgtoclnt-7.3.4-1 libICE.so.6 is needed by lgtoclnt-7.3.4-1 libSM.so.6 is needed by lgtoclnt-7.3.4-1 libX11.so.6 is needed by lgtoclnt-7.3.4-1 libXext.so.6 is needed by lgtoclnt-7.3.4-1 libXmu.so.6 is needed by lgtoclnt-7.3.4-1 libXt.so.6 is needed by lgtoclnt-7.3.4-1 libc.so.6 is needed by lgtoclnt-7.3.4-1 libdl.so.2 is needed by lgtoclnt-7.3.4-1 libncurses.so.5 is needed by lgtoclnt-7.3.4-1 libpthread.so.0 is needed by lgtoclnt-7.3.4-1 librt.so.1 is needed by lgtoclnt-7.3.4-1 libGL.so.1 is needed by lgtoclnt-7.3.4-1 libXi.so.6 is needed by lgtoclnt-7.3.4-1 libXrender.so.1 is needed by lgtoclnt-7.3.4-1 libm.so.6 is needed by lgtoclnt-7.3.4-1 /bin/ksh is needed by lgtoclnt-7.3.4-1 /bin/sh is needed by lgtoclnt-7.3.4-1 libc.so.6(GLIBC_2.0) is needed by lgtoclnt-7.3.4-1 libc.so.6(GLIBC_2.1) is needed by lgtoclnt-7.3.4-1 libc.so.6(GLIBC_2.1.2) is needed by lgtoclnt-7.3.4-1 libc.so.6(GLIBC_2.1.3) is needed by lgtoclnt-7.3.4-1 libc.so.6(GLIBC_2.2) is needed by lgtoclnt-7.3.4-1 libdl.so.2(GLIBC_2.0) is needed by lgtoclnt-7.3.4-1 libdl.so.2(GLIBC_2.1) is needed by lgtoclnt-7.3.4-1 libm.so.6(GLIBC_2.0) is needed by lgtoclnt-7.3.4-1 libm.so.6(GLIBC_2.1) is needed by lgtoclnt-7.3.4-1 libm.so.6(GLIBC_2.2) is needed by lgtoclnt-7.3.4-1 libpthread.so.0(GLIBC_2.0) is needed by lgtoclnt-7.3.4-1 libpthread.so.0(GLIBC_2.1) is needed by lgtoclnt-7.3.4-1 libpthread.so.0(GLIBC_2.2) is needed by lgtoclnt-7.3.4-1 Because so many dependencies are missing, I suspect I don't have linux compatibility installed properly. For example, libncurses.so.5 is one of the dependencies "missing". However: urchin# find /compat/linux -name libncurses.so.5 /compat/linux/lib/libncurses.so.5 /compat/linux/usr/lib/libncurses.so.5 So what have I missed? Thanks, Drew -- Be a Great Magician! Visit The Alchemist's Warehouse http://www.alchemistswarehouse.com From rdivacky at freebsd.org Sun Nov 9 13:33:10 2008 From: rdivacky at freebsd.org (Roman Divacky) Date: Sun Nov 9 13:33:17 2008 Subject: Trouble With Linux Compatibility In-Reply-To: <49174AF8.50201@mykitchentable.net> References: <49174AF8.50201@mykitchentable.net> Message-ID: <20081109212943.GA6625@freebsd.org> On Sun, Nov 09, 2008 at 12:41:28PM -0800, Drew Tomlinson wrote: > I have never used linux compatibility before. I followed the > instructions from the handbook and have the linux kernel module loaded, > a procfs filesystem mounted, and linux_base-fc4 and additional libraries > installed. > > urchin# kldstat > Id Refs Address Size Name > 1 11 0xffffffff80100000 6a85c8 kernel > 2 1 0xffffffff807a9000 20220 geom_mirror.ko > 3 2 0xffffffffb04b7000 17b8a linux.ko > 4 1 0xffffffffb051f000 3457 linprocfs.ko > > urchin# df -h > Filesystem Size Used Avail Capacity Mounted on > /dev/mirror/gm0s1a 496M 243M 213M 53% / > devfs 1.0K 1.0K 0B 100% /dev > /dev/mirror/gm0s1d 224G 7.7G 198G 4% /usr > linprocfs 4.0K 4.0K 0B 100% /usr/compat/linux/proc > > urchin# portversion -v | grep linux > linux-expat = up-to-date with port > linux-fontconfig = up-to-date with port > linux-glib2 = up-to-date with port > linux-openmotif = up-to-date with port > linux-xorg-libs = up-to-date with port > linux_base-fc4 = up-to-date with port > > I am trying to install a linux rpm of Legato Networker Backup Client. > However I get these errors: > > urchin# rpm -i --dbpath /var/lib/rpm --root /compat/linux --test > lgtoclnt-7.3.4-1.i686.rpm > error: failed dependencies: I suggest you chroot into the linuxulator first.... From drew at mykitchentable.net Sun Nov 9 19:21:25 2008 From: drew at mykitchentable.net (Drew Tomlinson) Date: Sun Nov 9 19:21:32 2008 Subject: Trouble With Linux Compatibility In-Reply-To: <20081109212943.GA6625@freebsd.org> References: <49174AF8.50201@mykitchentable.net> <20081109212943.GA6625@freebsd.org> Message-ID: <4917A8AB.9030303@mykitchentable.net> Roman Divacky wrote: > On Sun, Nov 09, 2008 at 12:41:28PM -0800, Drew Tomlinson wrote: > >> I have never used linux compatibility before. I followed the >> instructions from the handbook and have the linux kernel module loaded, >> a procfs filesystem mounted, and linux_base-fc4 and additional libraries >> installed. >> >> urchin# kldstat >> Id Refs Address Size Name >> 1 11 0xffffffff80100000 6a85c8 kernel >> 2 1 0xffffffff807a9000 20220 geom_mirror.ko >> 3 2 0xffffffffb04b7000 17b8a linux.ko >> 4 1 0xffffffffb051f000 3457 linprocfs.ko >> >> urchin# df -h >> Filesystem Size Used Avail Capacity Mounted on >> /dev/mirror/gm0s1a 496M 243M 213M 53% / >> devfs 1.0K 1.0K 0B 100% /dev >> /dev/mirror/gm0s1d 224G 7.7G 198G 4% /usr >> linprocfs 4.0K 4.0K 0B 100% /usr/compat/linux/proc >> >> urchin# portversion -v | grep linux >> linux-expat = up-to-date with port >> linux-fontconfig = up-to-date with port >> linux-glib2 = up-to-date with port >> linux-openmotif = up-to-date with port >> linux-xorg-libs = up-to-date with port >> linux_base-fc4 = up-to-date with port >> >> I am trying to install a linux rpm of Legato Networker Backup Client. >> However I get these errors: >> >> urchin# rpm -i --dbpath /var/lib/rpm --root /compat/linux --test >> lgtoclnt-7.3.4-1.i686.rpm >> error: failed dependencies: >> > > I suggest you chroot into the linuxulator first.... > Thank you for your reply. However I do not understand what to do. If I chroot into /compat/linux, then I lose the ability to run rpm because it is not in my path and I can't access from chroot environment. I read the Handbook section again. I don't find any mention of chroot. I have also been reading the following two guides in an effort to figure this out. http://www.onlamp.com/pub/a/bsd/2006/01/12/Big_Scary_Daemons.html?page=1 http://www.linux.com/articles/53055 The O'Reilly article doesn't mention chroot. The linux.com article makes mention of it as optional to run linux binaries already installed. However I don't have any installed. Is there some linux rpm port I need to install? I'm having a tough time grasping the concepts. Help!?! Thanks, Drew -- Be a Great Magician! Visit The Alchemist's Warehouse http://www.alchemistswarehouse.com From bugmaster at FreeBSD.org Mon Nov 10 03:06:49 2008 From: bugmaster at FreeBSD.org (FreeBSD bugmaster) Date: Mon Nov 10 03:07:43 2008 Subject: Current problem reports assigned to freebsd-emulation@FreeBSD.org Message-ID: <200811101106.mAAB6m8Q049681@freefall.freebsd.org> Note: to view an individual PR, use: http://www.freebsd.org/cgi/query-pr.cgi?pr=(number). The following is a listing of current problems submitted by FreeBSD users. These represent problem reports covering all versions including experimental development code and obsolete releases. S Tracker Resp. Description -------------------------------------------------------------------------------- f ports/127018 emulation Linuxulator incapable of using FreeBSD's LDAP environm o kern/126232 emulation [linux] Linux ioctl TCGETS (0x5401) always fails o ports/121800 emulation x11-toolkits/linux-openmotif - OpenMotif upgrade to 2. o kern/97326 emulation [linux] file descriptor leakage in linux emulation o ports/91318 emulation [fix] graphics/linux_dri: works on amd64 too o kern/91293 emulation [svr4] [patch] *Experimental* Update to the SVR4 emula o kern/73777 emulation [linux] [patch] linux emulation: root dir special hand a kern/72920 emulation [linux]: path "prefixing" is not done on unix domain s o kern/41543 emulation [patch] [request] easier wine/w23 support o kern/39201 emulation [linux] [patch] ptrace(2) and rfork(RFLINUXTHPN) confu o kern/29698 emulation [linux] [patch] linux ipcs doesn'work o kern/21463 emulation [linux] Linux compatability mode should not allow setu o kern/11165 emulation [ibcs2] IBCS2 doesn't work correctly with PID_MAX 9999 13 problems total. From bsam at ipt.ru Mon Nov 10 03:21:53 2008 From: bsam at ipt.ru (Boris Samorodov) Date: Mon Nov 10 03:21:59 2008 Subject: Trouble With Linux Compatibility In-Reply-To: <49174AF8.50201@mykitchentable.net> (Drew Tomlinson's message of "Sun\, 09 Nov 2008 12\:41\:28 -0800") References: <49174AF8.50201@mykitchentable.net> Message-ID: <57511736@bb.ipt.ru> Drew Tomlinson writes: > I am trying to install a linux rpm of Legato Networker Backup Client. It is not supposed to work (installing via rpm). You may try to do like this: ----- # cd $LINUX_BASE # rpm2cpio -q < $directory_with_rpm_package/$rpm_package | cpio -id ----- Then find any new binary executable files and brandelf(1) them (only executables, not libraries). Well, a better way may be to create a port. You'll get at least a clean deinstall possibility then. And use send-pr(1). ;-) WBR -- Boris Samorodov (bsam) Research Engineer, http://www.ipt.ru Telephone & Internet SP FreeBSD committer, http://www.FreeBSD.org The Power To Serve From me at janh.de Mon Nov 10 13:07:56 2008 From: me at janh.de (Jan Henrik Sylvester) Date: Mon Nov 10 13:08:04 2008 Subject: wine-1.1.8 regression -- wine: could not load L"...": Invalid address Message-ID: <49189FB4.4060403@janh.de> On wine-1.1.8, I cannot run many application that used to run fine on wine-1.1.7, for example an old version (4.10) of irfanview: wine: could not load L"C:\\irfanview-OLD\\i_view32.exe": Invalid address I did recompile wine with standard port options and without additional patches and removed my old ~/.wine directory. The issue remains. Going back to 1.1.7 immediately fixes the problem. Some very simple programs run fine, however. I just found that there are more people with that problem on questions@: http://lists.freebsd.org/pipermail/freebsd-questions/2008-November/186151.html Since this happens for many application including popular ones, I suspect this might be a FreeBSD thing. (Since winehq.org seems to be down, I cannot check for one of the applications in question running successfully on Linux.) Cheers, Jan Henrik From bsam at ipt.ru Tue Nov 11 00:49:26 2008 From: bsam at ipt.ru (Boris Samorodov) Date: Tue Nov 11 00:49:33 2008 Subject: Is a new port acceptable (PR/126872) Message-ID: <02140738@bb.ipt.ru> Hello All, there is a PR to create a new linux port: http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/126872 This port seems to be an infrastructure linux port. Usually we create new infrastructure linux ports when they are needed to run some other linux application. This port is not required by any. Hence I'm not sure if this port is needed. Should this port be committed? What do you think? Thanks! WBR -- Boris Samorodov (bsam) Research Engineer, http://www.ipt.ru Telephone & Internet SP FreeBSD committer, http://www.FreeBSD.org The Power To Serve From bsam at ipt.ru Tue Nov 11 01:08:40 2008 From: bsam at ipt.ru (Boris Samorodov) Date: Tue Nov 11 01:08:47 2008 Subject: PR: new linux-flashplugin9 version Message-ID: <36069585@bb.ipt.ru> Hello All, can someone test a patch at a new PR: http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/128753 Thanks! WBR -- Boris Samorodov (bsam) Research Engineer, http://www.ipt.ru Telephone & Internet SP FreeBSD committer, http://www.FreeBSD.org The Power To Serve From Alexander at Leidinger.net Tue Nov 11 01:31:01 2008 From: Alexander at Leidinger.net (Alexander Leidinger) Date: Tue Nov 11 01:31:08 2008 Subject: Is a new port acceptable (PR/126872) In-Reply-To: <02140738@bb.ipt.ru> References: <02140738@bb.ipt.ru> Message-ID: <20081111103040.94946nhqswycg4ws@webmail.leidinger.net> Quoting Boris Samorodov (from Tue, 11 Nov 2008 11:49:17 +0300): > Hello All, > > > there is a PR to create a new linux port: > http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/126872 > > This port seems to be an infrastructure linux port. Usually we create > new infrastructure linux ports when they are needed to run some other > linux application. This port is not required by any. Hence I'm not > sure if this port is needed. > > Should this port be committed? What do you think? Thanks! What about asking the submitter how this is supposed to be used? So far I haven't come up with a situation where it makes sense to commit it. If it is used in a chroot, then I would assume one of the gentoo linux base ports, and then the gentoo infrastructure should be used to install it. If it is used as a stand-alone scripting language, the native one should work too. If it is used from some linux binary (linking to tcl libs), it would be interesting to know which binaries are involved, and if there will be a port for them or not (if it is some popular commercial package, there may be no port available soon, but it would make sense to have the linux-tcl port in the tree). Bye, Alexander. -- A beginning is the time for taking the most delicate care that balances are correct. -- Princess Irulan, "Manual of Maud'Dib" http://www.Leidinger.net Alexander @ Leidinger.net: PGP ID = B0063FE7 http://www.FreeBSD.org netchild @ FreeBSD.org : PGP ID = 72077137 From bsam at ipt.ru Tue Nov 11 01:41:20 2008 From: bsam at ipt.ru (Boris Samorodov) Date: Tue Nov 11 01:41:26 2008 Subject: Is a new port acceptable (PR/126872) In-Reply-To: <20081111103040.94946nhqswycg4ws@webmail.leidinger.net> (Alexander Leidinger's message of "Tue\, 11 Nov 2008 10\:30\:40 +0100") References: <02140738@bb.ipt.ru> <20081111103040.94946nhqswycg4ws@webmail.leidinger.net> Message-ID: <69987625@bb.ipt.ru> Alexander Leidinger writes: > Quoting Boris Samorodov (from Tue, 11 Nov 2008 11:49:17 +0300): > >> Hello All, >> >> >> there is a PR to create a new linux port: >> http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/126872 >> >> This port seems to be an infrastructure linux port. Usually we create >> new infrastructure linux ports when they are needed to run some other >> linux application. This port is not required by any. Hence I'm not >> sure if this port is needed. >> >> Should this port be committed? What do you think? Thanks! > > What about asking the submitter how this is supposed to be used? Yep, that was my intention to do after reading some feedback here. ;-) > So far I haven't come up with a situation where it makes sense to > commit it. If it is used in a chroot, then I would assume one of the > gentoo linux base ports, and then the gentoo infrastructure should be > used to install it. If it is used as a stand-alone scripting language, > the native one should work too. If it is used from some linux binary > (linking to tcl libs), it would be interesting to know which binaries > are involved, and if there will be a port for them or not (if it is > some popular commercial package, there may be no port available soon, > but it would make sense to have the linux-tcl port in the tree). Well, this is just what I think. Thanks! OK, CCing the submitter of the PR. Stas, can you please elaborate on how are you planning to use this port? WBR -- Boris Samorodov (bsam) Research Engineer, http://www.ipt.ru Telephone & Internet SP FreeBSD committer, http://www.FreeBSD.org The Power To Serve From bsam at ipt.ru Tue Nov 11 02:10:04 2008 From: bsam at ipt.ru (Boris Samorodov) Date: Tue Nov 11 02:10:09 2008 Subject: Is a new port acceptable (PR/126872) In-Reply-To: <200811111554.02744.stast@bsdportal.ru> (Stas Timokhin's message of "Tue\, 11 Nov 2008 15\:54\:02 +0600") References: <02140738@bb.ipt.ru> <20081111103040.94946nhqswycg4ws@webmail.leidinger.net> <69987625@bb.ipt.ru> <200811111554.02744.stast@bsdportal.ru> Message-ID: <82465901@bb.ipt.ru> Stas Timokhin writes: > On Tuesday 11 November 2008 15:41:10 Boris Samorodov wrote: >> Stas, can you please elaborate on how are you planning to use this port? > Requirement of ports linux-tcl84 & linux-tk84 discovered while attempt of > porting IBM Cell full system simulator (http://wiki.freebsd.org/WantedPorts). OK, I've taken the PR. I'll commit it after infrastructure changes. Do you plan to proceed in porting IBM Cell full system simulator? WBR -- Boris Samorodov (bsam) Research Engineer, http://www.ipt.ru Telephone & Internet SP FreeBSD committer, http://www.FreeBSD.org The Power To Serve From scf at FreeBSD.org Tue Nov 11 07:53:17 2008 From: scf at FreeBSD.org (Sean C. Farley) Date: Tue Nov 11 07:53:23 2008 Subject: PR: new linux-flashplugin9 version In-Reply-To: <36069585@bb.ipt.ru> References: <36069585@bb.ipt.ru> Message-ID: On Tue, 11 Nov 2008, Boris Samorodov wrote: > Hello All, > > can someone test a patch at a new PR: > http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/128753 Both audio and video work for me. The version via settings shows 9,0,151,0. Sean -- scf@FreeBSD.org From drew at mykitchentable.net Tue Nov 11 10:06:49 2008 From: drew at mykitchentable.net (Drew Tomlinson) Date: Tue Nov 11 10:06:56 2008 Subject: Trouble With Linux Compatibility In-Reply-To: <57511736@bb.ipt.ru> References: <49174AF8.50201@mykitchentable.net> <57511736@bb.ipt.ru> Message-ID: <4919C9BA.3070903@mykitchentable.net> Boris Samorodov wrote: > Drew Tomlinson writes: > > >> I am trying to install a linux rpm of Legato Networker Backup Client. >> > > It is not supposed to work (installing via rpm). You may try to do like > this: > ----- > # cd $LINUX_BASE > # rpm2cpio -q < $directory_with_rpm_package/$rpm_package | cpio -id > ----- > Then find any new binary executable files and brandelf(1) them (only > executables, not libraries). > Thank you! I think I have it working. Will have to test to be sure it's working OK. I'm just curious...in two guides, written in 2006, I found on the net use rpm to install. Did this change recently? > Well, a better way may be to create a port. You'll get at least a clean > deinstall possibility then. And use send-pr(1). ;-) > Yes, I tried creating a port once before for a new version of bacula client. However I could never get it to work. That was a few years ago. Maybe I need to try again. ;) Thanks, Drew -- Be a Great Magician! Visit The Alchemist's Warehouse http://www.alchemistswarehouse.com From matheus at eternamente.info Tue Nov 11 11:03:31 2008 From: matheus at eternamente.info (Nenhum_de_Nos) Date: Tue Nov 11 11:03:37 2008 Subject: PR: new linux-flashplugin9 version In-Reply-To: References: <36069585@bb.ipt.ru> Message-ID: <021e3393fe1685695440109b574b71a4.squirrel@cygnus.homeunix.com> On Tue, November 11, 2008 1:42 pm, Sean C. Farley wrote: > On Tue, 11 Nov 2008, Boris Samorodov wrote: > >> Hello All, >> >> can someone test a patch at a new PR: >> http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/128753 > > Both audio and video work for me. The version via settings shows > 9,0,151,0. any chance for this to work on an amd64 7-STABLE ? thanks matheus > Sean > -- > scf@FreeBSD.org > _______________________________________________ > freebsd-emulation@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-emulation > To unsubscribe, send any mail to > "freebsd-emulation-unsubscribe@freebsd.org" > -- We will call you cygnus, The God of balance you shall be From sfourman at gmail.com Tue Nov 11 11:26:08 2008 From: sfourman at gmail.com (Sam Fourman Jr.) Date: Tue Nov 11 11:26:16 2008 Subject: PR: new linux-flashplugin9 version In-Reply-To: <021e3393fe1685695440109b574b71a4.squirrel@cygnus.homeunix.com> References: <36069585@bb.ipt.ru> <021e3393fe1685695440109b574b71a4.squirrel@cygnus.homeunix.com> Message-ID: <11167f520811111115h4bb5b3b2le19403babce11003@mail.gmail.com> >> Both audio and video work for me. The version via settings shows >> 9,0,151,0. > > any chance for this to work on an amd64 7-STABLE ? > I think it does work on amd64, I am pretty sure PC-BSD has it in their latest amd64 DVD Sam Fourman Jr. Fourman Networks From sfourman at gmail.com Tue Nov 11 11:27:31 2008 From: sfourman at gmail.com (Sam Fourman Jr.) Date: Tue Nov 11 11:27:37 2008 Subject: PR: new linux-flashplugin9 version In-Reply-To: <021e3393fe1685695440109b574b71a4.squirrel@cygnus.homeunix.com> References: <36069585@bb.ipt.ru> <021e3393fe1685695440109b574b71a4.squirrel@cygnus.homeunix.com> Message-ID: <11167f520811111115h4bb5b3b2le19403babce11003@mail.gmail.com> >> Both audio and video work for me. The version via settings shows >> 9,0,151,0. > > any chance for this to work on an amd64 7-STABLE ? > I think it does work on amd64, I am pretty sure PC-BSD has it in their latest amd64 DVD Sam Fourman Jr. Fourman Networks From sfourman at gmail.com Tue Nov 11 11:29:14 2008 From: sfourman at gmail.com (Sam Fourman Jr.) Date: Tue Nov 11 11:29:20 2008 Subject: PR: new linux-flashplugin9 version In-Reply-To: <021e3393fe1685695440109b574b71a4.squirrel@cygnus.homeunix.com> References: <36069585@bb.ipt.ru> <021e3393fe1685695440109b574b71a4.squirrel@cygnus.homeunix.com> Message-ID: <11167f520811111115h4bb5b3b2le19403babce11003@mail.gmail.com> >> Both audio and video work for me. The version via settings shows >> 9,0,151,0. > > any chance for this to work on an amd64 7-STABLE ? > I think it does work on amd64, I am pretty sure PC-BSD has it in their latest amd64 DVD Sam Fourman Jr. Fourman Networks From sfourman at gmail.com Tue Nov 11 11:30:55 2008 From: sfourman at gmail.com (Sam Fourman Jr.) Date: Tue Nov 11 11:31:01 2008 Subject: PR: new linux-flashplugin9 version In-Reply-To: <021e3393fe1685695440109b574b71a4.squirrel@cygnus.homeunix.com> References: <36069585@bb.ipt.ru> <021e3393fe1685695440109b574b71a4.squirrel@cygnus.homeunix.com> Message-ID: <11167f520811111115h4bb5b3b2le19403babce11003@mail.gmail.com> >> Both audio and video work for me. The version via settings shows >> 9,0,151,0. > > any chance for this to work on an amd64 7-STABLE ? > I think it does work on amd64, I am pretty sure PC-BSD has it in their latest amd64 DVD Sam Fourman Jr. Fourman Networks From sfourman at gmail.com Tue Nov 11 11:33:58 2008 From: sfourman at gmail.com (Sam Fourman Jr.) Date: Tue Nov 11 11:34:11 2008 Subject: PR: new linux-flashplugin9 version In-Reply-To: <021e3393fe1685695440109b574b71a4.squirrel@cygnus.homeunix.com> References: <36069585@bb.ipt.ru> <021e3393fe1685695440109b574b71a4.squirrel@cygnus.homeunix.com> Message-ID: <11167f520811111115h4bb5b3b2le19403babce11003@mail.gmail.com> >> Both audio and video work for me. The version via settings shows >> 9,0,151,0. > > any chance for this to work on an amd64 7-STABLE ? > I think it does work on amd64, I am pretty sure PC-BSD has it in their latest amd64 DVD Sam Fourman Jr. Fourman Networks From bsam at ipt.ru Tue Nov 11 11:34:03 2008 From: bsam at ipt.ru (Boris Samorodov) Date: Tue Nov 11 11:34:11 2008 Subject: Trouble With Linux Compatibility In-Reply-To: <4919C9BA.3070903@mykitchentable.net> (Drew Tomlinson's message of "Tue\, 11 Nov 2008 10\:06\:50 -0800") References: <49174AF8.50201@mykitchentable.net> <57511736@bb.ipt.ru> <4919C9BA.3070903@mykitchentable.net> Message-ID: <71745446@bs1.sp34.ru> Drew Tomlinson writes: > Boris Samorodov wrote: >> Drew Tomlinson writes: >>> I am trying to install a linux rpm of Legato Networker Backup Client. >> >> It is not supposed to work (installing via rpm). You may try to do like >> this: >> ----- >> # cd $LINUX_BASE >> # rpm2cpio -q < $directory_with_rpm_package/$rpm_package | cpio -id >> ----- >> Then find any new binary executable files and brandelf(1) them (only >> executables, not libraries). > > Thank you! I think I have it working. Good to know. > Will have to test to be sure > it's working OK. I'm just curious...in two guides, written in 2006, I > found on the net use rpm to install. Did this change recently? Seems that it has changed two years ago when I began to maintain linux ports. ;-) The problem was that rpm used it's own database of installed files/packages. The native FreeBSD database was used as well. It was a nightmare to keep then in sync. One of them should die. Guess which one? ;-) BTW, what about creating patches/followups/etc to those guides you have seen? >> Well, a better way may be to create a port. You'll get at least a clean >> deinstall possibility then. And use send-pr(1). ;-) > > Yes, I tried creating a port once before for a new version of bacula > client. However I could never get it to work. That was a few years > ago. Maybe I need to try again. ;) Good luck. WBR -- Boris Samorodov (bsam) Research Engineer, http://www.ipt.ru Telephone & Internet SP FreeBSD committer, http://www.FreeBSD.org The Power To Serve From sfourman at gmail.com Tue Nov 11 11:34:51 2008 From: sfourman at gmail.com (Sam Fourman Jr.) Date: Tue Nov 11 11:35:04 2008 Subject: PR: new linux-flashplugin9 version In-Reply-To: <021e3393fe1685695440109b574b71a4.squirrel@cygnus.homeunix.com> References: <36069585@bb.ipt.ru> <021e3393fe1685695440109b574b71a4.squirrel@cygnus.homeunix.com> Message-ID: <11167f520811111115h4bb5b3b2le19403babce11003@mail.gmail.com> >> Both audio and video work for me. The version via settings shows >> 9,0,151,0. > > any chance for this to work on an amd64 7-STABLE ? > I think it does work on amd64, I am pretty sure PC-BSD has it in their latest amd64 DVD Sam Fourman Jr. Fourman Networks From sfourman at gmail.com Tue Nov 11 11:35:25 2008 From: sfourman at gmail.com (Sam Fourman Jr.) Date: Tue Nov 11 11:35:31 2008 Subject: PR: new linux-flashplugin9 version In-Reply-To: <021e3393fe1685695440109b574b71a4.squirrel@cygnus.homeunix.com> References: <36069585@bb.ipt.ru> <021e3393fe1685695440109b574b71a4.squirrel@cygnus.homeunix.com> Message-ID: <11167f520811111115h4bb5b3b2le19403babce11003@mail.gmail.com> >> Both audio and video work for me. The version via settings shows >> 9,0,151,0. > > any chance for this to work on an amd64 7-STABLE ? > I think it does work on amd64, I am pretty sure PC-BSD has it in their latest amd64 DVD Sam Fourman Jr. Fourman Networks From sfourman at gmail.com Tue Nov 11 11:36:39 2008 From: sfourman at gmail.com (Sam Fourman Jr.) Date: Tue Nov 11 11:36:45 2008 Subject: PR: new linux-flashplugin9 version In-Reply-To: <021e3393fe1685695440109b574b71a4.squirrel@cygnus.homeunix.com> References: <36069585@bb.ipt.ru> <021e3393fe1685695440109b574b71a4.squirrel@cygnus.homeunix.com> Message-ID: <11167f520811111115h4bb5b3b2le19403babce11003@mail.gmail.com> >> Both audio and video work for me. The version via settings shows >> 9,0,151,0. > > any chance for this to work on an amd64 7-STABLE ? > I think it does work on amd64, I am pretty sure PC-BSD has it in their latest amd64 DVD Sam Fourman Jr. Fourman Networks From sfourman at gmail.com Tue Nov 11 11:38:09 2008 From: sfourman at gmail.com (Sam Fourman Jr.) Date: Tue Nov 11 11:38:16 2008 Subject: PR: new linux-flashplugin9 version In-Reply-To: <021e3393fe1685695440109b574b71a4.squirrel@cygnus.homeunix.com> References: <36069585@bb.ipt.ru> <021e3393fe1685695440109b574b71a4.squirrel@cygnus.homeunix.com> Message-ID: <11167f520811111115h4bb5b3b2le19403babce11003@mail.gmail.com> >> Both audio and video work for me. The version via settings shows >> 9,0,151,0. > > any chance for this to work on an amd64 7-STABLE ? > I think it does work on amd64, I am pretty sure PC-BSD has it in their latest amd64 DVD Sam Fourman Jr. Fourman Networks From sfourman at gmail.com Tue Nov 11 11:40:08 2008 From: sfourman at gmail.com (Sam Fourman Jr.) Date: Tue Nov 11 11:40:15 2008 Subject: PR: new linux-flashplugin9 version In-Reply-To: <021e3393fe1685695440109b574b71a4.squirrel@cygnus.homeunix.com> References: <36069585@bb.ipt.ru> <021e3393fe1685695440109b574b71a4.squirrel@cygnus.homeunix.com> Message-ID: <11167f520811111115h4bb5b3b2le19403babce11003@mail.gmail.com> >> Both audio and video work for me. The version via settings shows >> 9,0,151,0. > > any chance for this to work on an amd64 7-STABLE ? > I think it does work on amd64, I am pretty sure PC-BSD has it in their latest amd64 DVD Sam Fourman Jr. Fourman Networks From sfourman at gmail.com Tue Nov 11 11:40:59 2008 From: sfourman at gmail.com (Sam Fourman Jr.) Date: Tue Nov 11 11:41:05 2008 Subject: PR: new linux-flashplugin9 version In-Reply-To: <021e3393fe1685695440109b574b71a4.squirrel@cygnus.homeunix.com> References: <36069585@bb.ipt.ru> <021e3393fe1685695440109b574b71a4.squirrel@cygnus.homeunix.com> Message-ID: <11167f520811111115h4bb5b3b2le19403babce11003@mail.gmail.com> >> Both audio and video work for me. The version via settings shows >> 9,0,151,0. > > any chance for this to work on an amd64 7-STABLE ? > I think it does work on amd64, I am pretty sure PC-BSD has it in their latest amd64 DVD Sam Fourman Jr. Fourman Networks From rdivacky at freebsd.org Tue Nov 11 14:38:21 2008 From: rdivacky at freebsd.org (Roman Divacky) Date: Tue Nov 11 14:38:28 2008 Subject: PR: new linux-flashplugin9 version In-Reply-To: <11167f520811111115h4bb5b3b2le19403babce11003@mail.gmail.com> References: <36069585@bb.ipt.ru> <021e3393fe1685695440109b574b71a4.squirrel@cygnus.homeunix.com> <11167f520811111115h4bb5b3b2le19403babce11003@mail.gmail.com> Message-ID: <20081111223415.GA73689@freebsd.org> On Tue, Nov 11, 2008 at 01:15:07PM -0600, Sam Fourman Jr. wrote: > >> Both audio and video work for me. The version via settings shows > >> 9,0,151,0. > > > > any chance for this to work on an amd64 7-STABLE ? > > > > I think it does work on amd64, I am pretty sure PC-BSD has it in their > latest amd64 DVD how did you manage to sent so many mails dude? :) From sfourman at gmail.com Tue Nov 11 15:27:19 2008 From: sfourman at gmail.com (Sam Fourman Jr.) Date: Tue Nov 11 15:27:26 2008 Subject: PR: new linux-flashplugin9 version In-Reply-To: <20081111223415.GA73689@freebsd.org> References: <36069585@bb.ipt.ru> <021e3393fe1685695440109b574b71a4.squirrel@cygnus.homeunix.com> <11167f520811111115h4bb5b3b2le19403babce11003@mail.gmail.com> <20081111223415.GA73689@freebsd.org> Message-ID: <11167f520811111527n56366386keb033732cc02ff63@mail.gmail.com> >> >> I think it does work on amd64, I am pretty sure PC-BSD has it in their >> latest amd64 DVD > > how did you manage to sent so many mails dude? :) > I thought I only sent one, I use gmail for my mailing lists, maybe it sent more than one copy Sam Fourman Jr. Fourman Networks From drew at mykitchentable.net Tue Nov 11 19:22:06 2008 From: drew at mykitchentable.net (Drew Tomlinson) Date: Tue Nov 11 19:22:12 2008 Subject: Trouble With Linux Compatibility In-Reply-To: <71745446@bs1.sp34.ru> References: <49174AF8.50201@mykitchentable.net> <57511736@bb.ipt.ru> <4919C9BA.3070903@mykitchentable.net> <71745446@bs1.sp34.ru> Message-ID: <491A4BE5.1060402@mykitchentable.net> Boris Samorodov wrote: > Drew Tomlinson writes: > >> Boris Samorodov wrote: >> >>> Drew Tomlinson writes: >>> > > >>>> I am trying to install a linux rpm of Legato Networker Backup Client. >>>> >>> It is not supposed to work (installing via rpm). You may try to do like >>> this: >>> ----- >>> # cd $LINUX_BASE >>> # rpm2cpio -q < $directory_with_rpm_package/$rpm_package | cpio -id >>> ----- >>> Then find any new binary executable files and brandelf(1) them (only >>> executables, not libraries). >>> >> Thank you! I think I have it working. >> > > Good to know. > > >> Will have to test to be sure >> it's working OK. I'm just curious...in two guides, written in 2006, I >> found on the net use rpm to install. Did this change recently? >> > > Seems that it has changed two years ago when I began to maintain > linux ports. ;-) The problem was that rpm used it's own database > of installed files/packages. The native FreeBSD database was used > as well. It was a nightmare to keep then in sync. One of them > should die. Guess which one? ;-) > I understand. > BTW, what about creating patches/followups/etc to those guides you > have seen? > One of the guides was from O'Reilly's onlamp.com. The other was linux.com. With the exception of posting a comment below the article, I do not find it possible to update those guides. However I could write an additional section for the Handbook and send it to freebsd-doc@ and see if someone would add it. Would that be a good place? It's where I started looking. Cheers, Drew -- Be a Great Magician! Visit The Alchemist's Warehouse http://www.alchemistswarehouse.com From Alexander at Leidinger.net Tue Nov 11 22:56:06 2008 From: Alexander at Leidinger.net (Alexander Leidinger) Date: Tue Nov 11 22:56:13 2008 Subject: Trouble With Linux Compatibility In-Reply-To: <491A4BE5.1060402@mykitchentable.net> References: <49174AF8.50201@mykitchentable.net> <57511736@bb.ipt.ru> <4919C9BA.3070903@mykitchentable.net> <71745446@bs1.sp34.ru> <491A4BE5.1060402@mykitchentable.net> Message-ID: <20081112075546.14944879xaebhfy8@webmail.leidinger.net> Quoting Drew Tomlinson (from Tue, 11 Nov 2008 19:22:13 -0800): > Boris Samorodov wrote: >> BTW, what about creating patches/followups/etc to those guides you >> have seen? >> > > One of the guides was from O'Reilly's onlamp.com. The other was > linux.com. With the exception of posting a comment below the > article, I do not find it possible to update those guides. However > I could write an additional section for the Handbook and send it to > freebsd-doc@ and see if someone would add it. Would that be a good > place? It's where I started looking. It would be great to have something in the porters handbook. It's on the TODO list (in the part where you never get to...) since we changed the linux rpm handling. If you go this way, feel free to ask for review and/or stuff you are not sure about here on emulation. Bye, Alexander. -- Eat one live toad the first thing in the morning and nothing worse will happen to you the rest of the day. [Well, actually, to either of you... Ed.] http://www.Leidinger.net Alexander @ Leidinger.net: PGP ID = B0063FE7 http://www.FreeBSD.org netchild @ FreeBSD.org : PGP ID = 72077137 From gahr at FreeBSD.org Wed Nov 12 00:36:37 2008 From: gahr at FreeBSD.org (Pietro Cerutti) Date: Wed Nov 12 00:36:44 2008 Subject: [patch] update x11-toolkits/linux-gtk2 to 2.10.13 Message-ID: <491A0891.5080203@FreeBSD.org> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 Hi list, I have a patch to update x11-toolkits/linux-gtk2 to 2.10.13 (and - -engines to 2.8.0) : http://www.gahr.ch/FreeBSD/patches/linux-gtk2.diff I've tested this new version against multimedia/linux-realplayer and editors/komodo-edit. Both work fine. I pretty much need this update in order to update komodo-edit to 5.0.1, so if anybody could approve it, I will commit it. P.S. please keep me CC'd. Thanks! Cheers, - -- Pietro Cerutti gahr@FreeBSD.org PGP Public Key: http://gahr.ch/pgp -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (FreeBSD) iEYEAREKAAYFAkkaCJAACgkQwMJqmJVx944D1gCfQufGfWMbUmr2pP6oqTS8GQtO PAUAoMB6v4azePNwrwgECSdNJT8K0RXu =JJvJ -----END PGP SIGNATURE----- From Alexander at Leidinger.net Wed Nov 12 06:22:13 2008 From: Alexander at Leidinger.net (Alexander Leidinger) Date: Wed Nov 12 06:22:20 2008 Subject: [patch] update x11-toolkits/linux-gtk2 to 2.10.13 In-Reply-To: <491A0891.5080203@FreeBSD.org> References: <491A0891.5080203@FreeBSD.org> Message-ID: <20081112152155.13457hnk10l8du88@webmail.leidinger.net> Quoting Pietro Cerutti (from Tue, 11 Nov 2008 23:34:57 +0100): > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA512 > > Hi list, > > I have a patch to update x11-toolkits/linux-gtk2 to 2.10.13 (and > - -engines to 2.8.0) : > > http://www.gahr.ch/FreeBSD/patches/linux-gtk2.diff Sorry, no cake for you... as this takes the F6 rpm. This is in conflict with the default fc4 linux base. Boris has a big commit in the wings which brings f8 and a lot of infrastructure ports like gtk/glib/... for f8. This will allow to have fc4 and f8 in parallel in the ports collection (f6 will be removed then, I assume). This should solve your problem, but you have to wait until the ports slush is over. Bye, Alexander. -- If you only have a hammer, you tend to see every problem as a nail. -- Maslow http://www.Leidinger.net Alexander @ Leidinger.net: PGP ID = B0063FE7 http://www.FreeBSD.org netchild @ FreeBSD.org : PGP ID = 72077137 From gahr at FreeBSD.org Wed Nov 12 10:54:43 2008 From: gahr at FreeBSD.org (Pietro Cerutti) Date: Wed Nov 12 10:55:13 2008 Subject: [patch] update x11-toolkits/linux-gtk2 to 2.10.13 In-Reply-To: <20081112152155.13457hnk10l8du88@webmail.leidinger.net> References: <491A0891.5080203@FreeBSD.org> <20081112152155.13457hnk10l8du88@webmail.leidinger.net> Message-ID: <491B265F.1020909@FreeBSD.org> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 Alexander Leidinger wrote: | Quoting Pietro Cerutti (from Tue, 11 Nov 2008 | 23:34:57 +0100): | |> -----BEGIN PGP SIGNED MESSAGE----- |> Hash: SHA512 |> |> Hi list, |> |> I have a patch to update x11-toolkits/linux-gtk2 to 2.10.13 (and |> - -engines to 2.8.0) : |> |> http://www.gahr.ch/FreeBSD/patches/linux-gtk2.diff | | Sorry, no cake for you... as this takes the F6 rpm. This is in conflict | with the default fc4 linux base. | | Boris has a big commit in the wings which brings f8 and a lot of | infrastructure ports like gtk/glib/... for f8. This will allow to have | fc4 and f8 in parallel in the ports collection (f6 will be removed then, | I assume). This should solve your problem, but you have to wait until | the ports slush is over. That's fine, I'll wait! Thanks for the feedback! | Bye, Cheers, | Alexander. | - -- Pietro Cerutti gahr@FreeBSD.org PGP Public Key: http://gahr.ch/pgp -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (FreeBSD) iEYEAREKAAYFAkkbJl0ACgkQwMJqmJVx944QnACg26nPFF7tCkDiPngGZw9Iqrk3 OHQAniRdtlNanIRBmGUR9kcPNN4teXfK =r1J4 -----END PGP SIGNATURE----- From egor.shibeko at gmail.com Wed Nov 12 22:40:16 2008 From: egor.shibeko at gmail.com (Egor Shibeko) Date: Wed Nov 12 22:40:22 2008 Subject: flash9 Message-ID: <20081113081457.287d665c@err0r.sweet.home> Hello, My system is FreeBSD 7.1-BETA2 with linprocfs patch for flash9 support and with FF3.0.3. The 100-lines dump is in the attached file. Thank You. -- Egor Shibeko -------------- next part -------------- XRequest.16:X_InternAtom XRequest.17:X_GetAtomName XRequest.18:X_ChangeProperty XRequest.19:X_DeleteProperty XRequest.20:X_GetProperty XRequest.21:X_ListProperties XRequest.22:X_SetSelectionOwner XRequest.23:X_GetSelectionOwner XRequest.24:X_ConvertSelection XRequest.25:X_SendEvent XRequest.26:X_GrabPointer XRequest.27:X_UngrabPointer XRequest.28:X_GrabButton XRequest.29:X_UngrabButton XRequest.30:X_ChangeActivePointerGrab XRequest.31:X_GrabKeyboard XRequest.32:X_UngrabKeyboard XRequest.33:X_GrabKey XRequest.34:X_UngrabKey XRequest.35:X_AllowEvents XRequest.36:X_GrabServer XRequest.37:X_UngrabServer XRequest.38:X_QueryPointer XRequest.39:X_GetMotionEvents XRequest.40:X_TranslateCoords XRequest.41:X_WarpPointer XRequest.42:X_SetInputFocus XRequest.43:X_GetInputFocus XRequest.44:X_QueryKeymap XRequest.45:X_OpenFont XRequest.46:X_CloseFont XRequest.47:X_QueryFont XRequest.48:X_QueryTextExtents XRequest.49:X_ListFonts XRequest.50:X_ListFontsWithInfo XRequest.51:X_SetFontPath XRequest.52:X_GetFontPath XRequest.53:X_CreatePixmap XRequest.54:X_FreePixmap XRequest.55:X_CreateGC XRequest.56:X_ChangeGC XRequest.57:X_CopyGC XRequest.58:X_SetDashes XRequest.59:X_SetClipRectangles XRequest.60:X_FreeGC XRequest.61:X_ClearArea XRequest.62:X_CopyArea XRequest.63:X_CopyPlane XRequest.64:X_PolyPoint XRequest.65:X_PolyLine XRequest.66:X_PolySegment XRequest.67:X_PolyRectangle XRequest.68:X_PolyArc XRequest.69:X_FillPoly XRequest.70:X_PolyFillRectangle XRequest.71:X_PolyFillArc XRequest.72:X_PutImage XRequest.73:X_GetImage XRequest.74:X_PolyText8 XRequest.75:X_PolyText16 XRequest.76:X_ImageText8 XRequest.77:X_ImageText16 XRequest.78:X_CreateColormap XRequest.79:X_FreeColormap XRequest.80:X_CopyColormapAndFree XRequest.81:X_InstallColormap XRequest.82:X_UninstallColormap XRequest.83:X_ListInstalledColormaps XRequest.84:X_" 17963 npviewer.bin RET read 36378/0x8e1a 17963 npviewer.bin CALL close(0xc) 17963 npviewer.bin RET close 0 17963 npviewer.bin CALL linux_brk(0x813c000) 17963 npviewer.bin RET linux_brk 135512064/0x813c000 17963 npviewer.bin CALL write(0x2,0xbfbfb164,0x243) 17963 npviewer.bin GIO fd 2 wrote 579 bytes "The program 'npviewer.bin' received an X Window System error. This probably reflects a bug in the program. The error was 'RenderBadPicture (invalid Picture parameter)'. (Details: serial 202 error_code 175 request_code 154 minor_code 7) (Note to programmers: normally, X errors are reported asynchronously; that is, you will receive the error a while after causing it. To debug your program, run it with the --sync command line option to change this behavior. You can then get a meaningful backtrace from your debugger if you break on the gdk_x_error() function.) " 17963 npviewer.bin RET write 579/0x243 17733 firefox-bin RET [454] 0 17733 firefox-bin CALL linux_listxattr(0,0xbf8fde24) 17733 firefox-bin RET linux_listxattr 0 17733 firefox-bin CALL [454](0x8181360,0x8,0x1,0x8181340,0xbf8fde1c) 17733 firefox-bin CALL linux_sysinfo(0xbfbfcadc,0) 17733 firefox-bin RET linux_sysinfo 0 17733 firefox-bin CALL linux_sysinfo(0xbfbfcacc,0) 17733 firefox-bin RET linux_sysinfo 0 17733 firefox-bin CALL [454](0x8181360,0x9,0,0,0) 17733 firefox-bin RET [454] 0 17963 npviewer.bin CALL munmap(0x2927f000,0x1000000) 17963 npviewer.bin RET munmap 0 17963 npviewer.bin PSIG SIGSEGV SIG_DFL 17963 npviewer.bin NAMI "npviewer.bin.core" From bsam at ipt.ru Thu Nov 13 12:02:16 2008 From: bsam at ipt.ru (Boris Samorodov) Date: Thu Nov 13 12:02:26 2008 Subject: Trouble With Linux Compatibility In-Reply-To: <20081112075546.14944879xaebhfy8@webmail.leidinger.net> (Alexander Leidinger's message of "Wed\, 12 Nov 2008 07\:55\:46 +0100") References: <49174AF8.50201@mykitchentable.net> <57511736@bb.ipt.ru> <4919C9BA.3070903@mykitchentable.net> <71745446@bs1.sp34.ru> <491A4BE5.1060402@mykitchentable.net> <20081112075546.14944879xaebhfy8@webmail.leidinger.net> Message-ID: <37796678@ipt.ru> On Wed, 12 Nov 2008 07:55:46 +0100 Alexander Leidinger wrote: > Quoting Drew Tomlinson (from Tue, 11 Nov > 2008 19:22:13 -0800): > > Boris Samorodov wrote: > >> BTW, what about creating patches/followups/etc to those guides you > >> have seen? > >> > > > > One of the guides was from O'Reilly's onlamp.com. The other was > > linux.com. With the exception of posting a comment below the > > article, I do not find it possible to update those guides. However > > I could write an additional section for the Handbook and send it to > > freebsd-doc@ and see if someone would add it. Would that be a good > > place? It's where I started looking. > It would be great to have something in the porters handbook. It's on > the TODO list (in the part where you never get to...) since we changed > the linux rpm handling. If you go this way, feel free to ask for > review and/or stuff you are not sure about here on emulation. Yep, +1 for sure. WBR -- bsam From cyrill62 at gmail.com Sun Nov 16 13:30:12 2008 From: cyrill62 at gmail.com (cyrill62) Date: Sun Nov 16 13:30:19 2008 Subject: linux_base-fc4 Message-ID: Dear maintainer, It's seem that file 'coreutils-5.2.1-48.1.i386.rpm' is missing or renamed as 'coreutils-5.2.1-48.i386.rpm' on servers. Can you update the package 'emulators/linux_base-fc4' ? Best regards, LEPAGNOT Cyril. From bugmaster at FreeBSD.org Mon Nov 17 03:06:49 2008 From: bugmaster at FreeBSD.org (FreeBSD bugmaster) Date: Mon Nov 17 03:07:46 2008 Subject: Current problem reports assigned to freebsd-emulation@FreeBSD.org Message-ID: <200811171106.mAHB6mjW082487@freefall.freebsd.org> Note: to view an individual PR, use: http://www.freebsd.org/cgi/query-pr.cgi?pr=(number). The following is a listing of current problems submitted by FreeBSD users. These represent problem reports covering all versions including experimental development code and obsolete releases. S Tracker Resp. Description -------------------------------------------------------------------------------- f ports/127018 emulation Linuxulator incapable of using FreeBSD's LDAP environm o kern/126232 emulation [linux] Linux ioctl TCGETS (0x5401) always fails o ports/121800 emulation x11-toolkits/linux-openmotif - OpenMotif upgrade to 2. o kern/97326 emulation [linux] file descriptor leakage in linux emulation o ports/91318 emulation [fix] graphics/linux_dri: works on amd64 too o kern/91293 emulation [svr4] [patch] *Experimental* Update to the SVR4 emula o kern/73777 emulation [linux] [patch] linux emulation: root dir special hand a kern/72920 emulation [linux]: path "prefixing" is not done on unix domain s o kern/41543 emulation [patch] [request] easier wine/w23 support o kern/39201 emulation [linux] [patch] ptrace(2) and rfork(RFLINUXTHPN) confu o kern/29698 emulation [linux] [patch] linux ipcs doesn'work o kern/21463 emulation [linux] Linux compatability mode should not allow setu o kern/11165 emulation [ibcs2] IBCS2 doesn't work correctly with PID_MAX 9999 13 problems total. From bsam at ipt.ru Mon Nov 17 07:17:59 2008 From: bsam at ipt.ru (Boris Samorodov) Date: Mon Nov 17 07:18:12 2008 Subject: linux_base-fc4 In-Reply-To: (cyrill's message of "Sun\, 16 Nov 2008 21\:58\:58 +0100") References: Message-ID: <02067965@ipt.ru> On Sun, 16 Nov 2008 21:58:58 +0100 cyrill62 wrote: > Dear maintainer, > It's seem that file 'coreutils-5.2.1-48.1.i386.rpm' is missing or renamed as > 'coreutils-5.2.1-48.i386.rpm' on servers. It is available at: http://archives.fedoraproject.org/pub/archive/fedora/linux/core/updates/4/i386/ > Can you update the package 'emulators/linux_base-fc4' ? Thanks for your attempt to make FreeBSD better. WBR -- bsam From nox at jelal.kn-bremen.de Tue Nov 18 13:23:34 2008 From: nox at jelal.kn-bremen.de (Juergen Lock) Date: Tue Nov 18 13:23:41 2008 Subject: qemu svn r5729 (was: first tests of qemu svn r5646 on FreeBSD - usb still slow, bsd-user doesn't build, some warnings...) In-Reply-To: <20081107214438.GA27376@saturn.kn-bremen.de> References: <20081107214438.GA27376@saturn.kn-bremen.de> Message-ID: <20081118212228.GA34000@saturn.kn-bremen.de> On Fri, Nov 07, 2008 at 10:44:39PM +0100, Juergen Lock wrote: > Hi! > > I just prepared another experimental emulators/qemu-devel port update, > http://people.freebsd.org/~nox/qemu/qemu-devel-20081107.patch > I haven't tested it that much yet (you are welcome to help there! :) > but so far didn't notice much changes compared to last time (r5499), > usb is still slow with my Linux 2.6.26 guest (probably to be expected, > nothing committed there since.) > > In other news: The new sparc64-bsd-user target doesn't build because > SYSCALL_G7RFLAG and SYSCALL_G2RFLAG are undefined, and I noticed a few > warnings that may be interesting: > [...] > Oh and I also found the SMBD_COMMAND #defines in vl.c are not needed > anymore, the relevant code has moved to net.c . (I had to fix up a bunch > of patches in the FreeBSD port because of the moved code, like the pcap and > ppbus ones, testing is also welcome there.) Updated to r5729: http://people.freebsd.org/~nox/qemu/qemu-devel-20081117.patch Enjoy, :) Juergen From bsam at ipt.ru Thu Nov 20 03:48:49 2008 From: bsam at ipt.ru (Boris Samorodov) Date: Thu Nov 20 03:48:56 2008 Subject: ports/128753 is released Message-ID: <84104710@ipt.ru> Hi All, http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/128753 I've just returned this PR to the pool. Sorry, I don't have time to deal with it. Hope, someone will do it. Thanks. WBR -- bsam From scf at FreeBSD.org Thu Nov 20 11:06:43 2008 From: scf at FreeBSD.org (Sean C. Farley) Date: Thu Nov 20 11:06:49 2008 Subject: ports/128753 is released In-Reply-To: <84104710@ipt.ru> References: <84104710@ipt.ru> Message-ID: On Thu, 20 Nov 2008, Boris Samorodov wrote: > Hi All, > > http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/128753 > > I've just returned this PR to the pool. Sorry, I don't have time > to deal with it. Hope, someone will do it. Thanks. I want to let whomever takes this that the patch worked for me on three different systems (2 i386's and 1 amd64). Sean -- scf@FreeBSD.org From blauwirbel at gmail.com Sat Nov 22 13:08:48 2008 From: blauwirbel at gmail.com (Blue Swirl) Date: Sat Nov 22 13:08:57 2008 Subject: [Qemu-devel] qemu svn r5729 (was: first tests of qemu svn r5646 on FreeBSD - usb still slow, bsd-user doesn't build, some warnings...) In-Reply-To: <20081118212228.GA34000@saturn.kn-bremen.de> References: <20081107214438.GA27376@saturn.kn-bremen.de> <20081118212228.GA34000@saturn.kn-bremen.de> Message-ID: On 11/18/08, Juergen Lock wrote: > On Fri, Nov 07, 2008 at 10:44:39PM +0100, Juergen Lock wrote: > > Hi! > > > > I just prepared another experimental emulators/qemu-devel port update, > > http://people.freebsd.org/~nox/qemu/qemu-devel-20081107.patch > > I haven't tested it that much yet (you are welcome to help there! :) > > but so far didn't notice much changes compared to last time (r5499), > > usb is still slow with my Linux 2.6.26 guest (probably to be expected, > > nothing committed there since.) > > > > In other news: The new sparc64-bsd-user target doesn't build because > > SYSCALL_G7RFLAG and SYSCALL_G2RFLAG are undefined, and I noticed a few > > warnings that may be interesting: > > [...] I committed an improved fix, please test. > > Oh and I also found the SMBD_COMMAND #defines in vl.c are not needed > > anymore, the relevant code has moved to net.c . (I had to fix up a bunch > > of patches in the FreeBSD port because of the moved code, like the pcap and > > ppbus ones, testing is also welcome there.) > > Updated to r5729: > http://people.freebsd.org/~nox/qemu/qemu-devel-20081117.patch I applied the native parallel port and USB support patches, thanks. From nox at jelal.kn-bremen.de Sat Nov 22 13:19:53 2008 From: nox at jelal.kn-bremen.de (Juergen Lock) Date: Sat Nov 22 13:20:00 2008 Subject: qemu svn r5774 (was: qemu svn r5729 (was: first tests of qemu svn r5646 on FreeBSD - usb still slow, bsd-user doesn't build, some warnings...)) In-Reply-To: <20081118212228.GA34000@saturn.kn-bremen.de> References: <20081107214438.GA27376@saturn.kn-bremen.de> <20081118212228.GA34000@saturn.kn-bremen.de> Message-ID: <20081122211747.GA55140@saturn.kn-bremen.de> On Tue, Nov 18, 2008 at 10:22:28PM +0100, Juergen Lock wrote: > On Fri, Nov 07, 2008 at 10:44:39PM +0100, Juergen Lock wrote: > > Hi! > > > > I just prepared another experimental emulators/qemu-devel port update, > > http://people.freebsd.org/~nox/qemu/qemu-devel-20081107.patch > > I haven't tested it that much yet (you are welcome to help there! :) > > but so far didn't notice much changes compared to last time (r5499), > > usb is still slow with my Linux 2.6.26 guest (probably to be expected, > > nothing committed there since.) > > > > In other news: The new sparc64-bsd-user target doesn't build because > > SYSCALL_G7RFLAG and SYSCALL_G2RFLAG are undefined, and I noticed a few > > warnings that may be interesting: > > [...] > > > Oh and I also found the SMBD_COMMAND #defines in vl.c are not needed > > anymore, the relevant code has moved to net.c . (I had to fix up a bunch > > of patches in the FreeBSD port because of the moved code, like the pcap and > > ppbus ones, testing is also welcome there.) > > Updated to r5729: > http://people.freebsd.org/~nox/qemu/qemu-devel-20081117.patch Now at r5774: http://people.freebsd.org/~nox/qemu/qemu-devel-20081122.patch This update is featuring e1000 vlan offload emulation and a bunch of gdbstub improvements among other things. (gdbstub was finally fixed for smp guests, breakpoints and watchpoints apply to all cpus... cpus are handled as gdb threads for the time being.) And there's of course the usual round of bugfixes etc too. Please test! :) Juergen From nox at jelal.kn-bremen.de Sat Nov 22 13:46:41 2008 From: nox at jelal.kn-bremen.de (Juergen Lock) Date: Sat Nov 22 13:46:48 2008 Subject: [Qemu-devel] qemu svn r5729 (was: first tests of qemu svn r5646 on FreeBSD - usb still slow, bsd-user doesn't build, some warnings...) In-Reply-To: References: <20081107214438.GA27376@saturn.kn-bremen.de> <20081118212228.GA34000@saturn.kn-bremen.de> Message-ID: <200811222145.mAMLjaUl060522@saturn.kn-bremen.de> In article you write: >On 11/18/08, Juergen Lock wrote: >> On Fri, Nov 07, 2008 at 10:44:39PM +0100, Juergen Lock wrote: >> > Hi! >> > >> > I just prepared another experimental emulators/qemu-devel port update, >> > http://people.freebsd.org/~nox/qemu/qemu-devel-20081107.patch >> > I haven't tested it that much yet (you are welcome to help there! :) >> > but so far didn't notice much changes compared to last time (r5499), >> > usb is still slow with my Linux 2.6.26 guest (probably to be expected, >> > nothing committed there since.) >> > >> > In other news: The new sparc64-bsd-user target doesn't build because >> > SYSCALL_G7RFLAG and SYSCALL_G2RFLAG are undefined, and I noticed a few >> > warnings that may be interesting: >> > [...] > >I committed an improved fix, please test. > Thanx, will do. >> > Oh and I also found the SMBD_COMMAND #defines in vl.c are not needed >> > anymore, the relevant code has moved to net.c . (I had to fix up a bunch >> > of patches in the FreeBSD port because of the moved code, like the pcap and >> > ppbus ones, testing is also welcome there.) >> >> Updated to r5729: >> http://people.freebsd.org/~nox/qemu/qemu-devel-20081117.patch > >I applied the native parallel port and USB support patches, thanks. > And I just prepared another experimental ports update while you were at it (see other post), guess now I'll have to do another one... :) Thanx, Juergen From nox at jelal.kn-bremen.de Sat Nov 22 14:46:47 2008 From: nox at jelal.kn-bremen.de (Juergen Lock) Date: Sat Nov 22 14:46:53 2008 Subject: qemu svn r5781 (was: Re: [Qemu-devel] qemu svn r5729 (was: first tests of qemu svn r5646 on FreeBSD - usb still slow, bsd-user doesn't build, some warnings...)) In-Reply-To: <200811222145.mAMLjaUl060522@saturn.kn-bremen.de> References: <20081107214438.GA27376@saturn.kn-bremen.de> <20081118212228.GA34000@saturn.kn-bremen.de> <200811222145.mAMLjaUl060522@saturn.kn-bremen.de> Message-ID: <20081122224430.GA66713@saturn.kn-bremen.de> On Sat, Nov 22, 2008 at 10:45:36PM +0100, Juergen Lock wrote: > In article you write: > >On 11/18/08, Juergen Lock wrote: > >> On Fri, Nov 07, 2008 at 10:44:39PM +0100, Juergen Lock wrote: > >> > Hi! > >> > > >> > I just prepared another experimental emulators/qemu-devel port update, > >> > http://people.freebsd.org/~nox/qemu/qemu-devel-20081107.patch > >> > I haven't tested it that much yet (you are welcome to help there! :) > >> > but so far didn't notice much changes compared to last time (r5499), > >> > usb is still slow with my Linux 2.6.26 guest (probably to be expected, > >> > nothing committed there since.) > >> > > >> > In other news: The new sparc64-bsd-user target doesn't build because > >> > SYSCALL_G7RFLAG and SYSCALL_G2RFLAG are undefined, and I noticed a few > >> > warnings that may be interesting: > >> > [...] > > > >I committed an improved fix, please test. > > > Thanx, will do. Now bsd-user/mmap.c is missing MAP_FLAGMASK (line 226 and 399.) This update at: http://people.freebsd.org/~nox/qemu/qemu-devel-20081122_22.patch HTH, Juergen From gerald at pfeifer.com Sun Nov 23 16:11:20 2008 From: gerald at pfeifer.com (Gerald Pfeifer) Date: Sun Nov 23 16:11:27 2008 Subject: wine-1.1.8 regression -- wine: could not load L"...": Invalid address In-Reply-To: <49189FB4.4060403@janh.de> References: <49189FB4.4060403@janh.de> Message-ID: On Mon, 10 Nov 2008, Jan Henrik Sylvester wrote: > On wine-1.1.8, I cannot run many application that used to run fine on > wine-1.1.7, for example an old version (4.10) of irfanview: > > wine: could not load L"C:\\irfanview-OLD\\i_view32.exe": Invalid address > > I did recompile wine with standard port options and without additional > patches and removed my old ~/.wine directory. The issue remains. Going > back to 1.1.7 immediately fixes the problem. I just committed an update to the emulators/wine port which passed my testing with both 16- and 32-bit Windows applications. Does that update address the issue you have been seeing? > Since this happens for many application including popular ones, I > suspect this might be a FreeBSD thing. (Since winehq.org seems to be > down, I cannot check for one of the applications in question running > successfully on Linux.) Yes, this definitely was/is a "FreeBSD thing". Sadly, there is not much of a FreeBSD community looking after Wine, mostly two or three volunteers making a change/fix now and then. I hope the update I committed today does address the issues you have been seeing, or it may be difficult to get them addressed. Gerald -- Gerald (Jerry) Pfeifer gerald@pfeifer.com http://www.pfeifer.com/gerald/ From sfourman at gmail.com Mon Nov 24 01:07:23 2008 From: sfourman at gmail.com (Sam Fourman Jr.) Date: Mon Nov 24 01:07:30 2008 Subject: wine-1.1.8 regression -- wine: could not load L"...": Invalid address In-Reply-To: References: <49189FB4.4060403@janh.de> Message-ID: <11167f520811240107v17a5c1cbxb63817d0abd19e66@mail.gmail.com> On Sun, Nov 23, 2008 at 5:41 PM, Gerald Pfeifer wrote: > On Mon, 10 Nov 2008, Jan Henrik Sylvester wrote: >> On wine-1.1.8, I cannot run many application that used to run fine on >> wine-1.1.7, for example an old version (4.10) of irfanview: >> >> wine: could not load L"C:\\irfanview-OLD\\i_view32.exe": Invalid address it would appear World of warcraft is still broken. it works fine in 1.1.7 wine: configuration in '/home/sfourman/.wine' has been updated. FreeFontPath: FPE "/usr/local/lib/X11/fonts/misc/" refcount is 2, should be 1; fixing. wine: could not load L"C:\\Program Files\\World of Warcraft\\Wow.exe": Invalid address [sfourman@Sam ~/.wine/drive_c/Program Files/World of Warcraft]$ wine --version wine-1.1.9 [sfourman@Sam ~/.wine/drive_c/Program Files/World of Warcraft]$ Sam Fourman Jr. From bugmaster at FreeBSD.org Mon Nov 24 03:07:10 2008 From: bugmaster at FreeBSD.org (FreeBSD bugmaster) Date: Mon Nov 24 03:07:44 2008 Subject: Current problem reports assigned to freebsd-emulation@FreeBSD.org Message-ID: <200811241107.mAOB79qd019865@freefall.freebsd.org> Note: to view an individual PR, use: http://www.freebsd.org/cgi/query-pr.cgi?pr=(number). The following is a listing of current problems submitted by FreeBSD users. These represent problem reports covering all versions including experimental development code and obsolete releases. S Tracker Resp. Description -------------------------------------------------------------------------------- f ports/127018 emulation Linuxulator incapable of using FreeBSD's LDAP environm o kern/126232 emulation [linux] Linux ioctl TCGETS (0x5401) always fails o ports/121800 emulation x11-toolkits/linux-openmotif - OpenMotif upgrade to 2. o kern/97326 emulation [linux] file descriptor leakage in linux emulation o ports/91318 emulation [fix] graphics/linux_dri: works on amd64 too o kern/91293 emulation [svr4] [patch] *Experimental* Update to the SVR4 emula o kern/73777 emulation [linux] [patch] linux emulation: root dir special hand a kern/72920 emulation [linux]: path "prefixing" is not done on unix domain s o kern/41543 emulation [patch] [request] easier wine/w23 support o kern/39201 emulation [linux] [patch] ptrace(2) and rfork(RFLINUXTHPN) confu o kern/29698 emulation [linux] [patch] linux ipcs doesn'work o kern/21463 emulation [linux] Linux compatability mode should not allow setu o kern/11165 emulation [ibcs2] IBCS2 doesn't work correctly with PID_MAX 9999 13 problems total. From bsam at ipt.ru Mon Nov 24 13:59:23 2008 From: bsam at ipt.ru (Boris Samorodov) Date: Mon Nov 24 13:59:30 2008 Subject: downloading linux_base-fc4 In-Reply-To: (luizbcampos@gmail.com's message of "Mon\, 24 Nov 2008 16\:44\:43 -0200") References: <38095920@ipt.ru> Message-ID: <50122126@ipt.ru> Please, keep CC to emulation@ ML. On Mon, 24 Nov 2008 16:44:43 -0200 luizbcampos wrote: > On 10/21/08, Boris Samorodov wrote: > > On Tue, 21 Oct 2008 14:49:01 -0200 luizbcampos wrote: > > > >> After I had tried to download linux_base-fc4 I got file > >> unavailable not found no access...I need to put my printer to work! > > > > You may try to use packages: > > http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/packages-using.html > > > >> What`s the matter? > > > > You didn't show any diagnostics (exact commands, exact output, etc.) > > so it's hard to say anything. > > > >> # pkg_add -r linux_base-fc4 > Error: FTP unable to get > ftp://ftp.freebsd.org/pub/FreeBSD/ports/amd64/packages/7.0-release/Latest/linux_base-fc4.tbz:file > unavailable (file not found, no access) > >> The problem lingers on... There are two problems here. First, I'm not sure where did you get .../packages/7.0-release/... directory. That should be a .../packages-7.0-release/... one. Second, try to use linux_base package, i.e. "pkg_add -r linux_base". WBR -- bsam From spam at rm-rf.kiev.ua Mon Nov 24 14:59:32 2008 From: spam at rm-rf.kiev.ua (Alex Kozlov) Date: Mon Nov 24 14:59:38 2008 Subject: wine-1.1.8 regression -- wine: could not load L"...": Invalid address Message-ID: <20081124220311.GA14308@ravenloft.kiev.ua> On Mon, Nov 24, 2008 at 03:07:21AM -0600, Sam Fourman Jr. wrote: > On Sun, Nov 23, 2008 at 5:41 PM, Gerald Pfeifer wrote: >> On Mon, 10 Nov 2008, Jan Henrik Sylvester wrote: >>> On wine-1.1.8, I cannot run many application that used to run fine on >>> wine-1.1.7, for example an old version (4.10) of irfanview: >>> wine: could not load L"C:\\irfanview-OLD\\i_view32.exe": Invalid address > it would appear World of warcraft is still broken. it works fine in 1.1.7 > wine: could not load L"C:\\Program Files\\World of Warcraft\\Wow.exe": > Invalid address Can You please test this patch? (Drop it in emulators/wine/files) Thanks. Index: dlls/ntdll/virtual.c @@ -1250,8 +1254,13 @@ } /* try to find space in a reserved area for the virtual heap */ - if (!wine_mmap_enum_reserved_areas( alloc_virtual_heap, &heap_base, 1 )) +#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) + heap_base = wine_anon_mmap( address_space_limit - 10 * VIRTUAL_HEAP_SIZE, + VIRTUAL_HEAP_SIZE, PROT_READ|PROT_WRITE, 0 ); +#else + if (!wine_mmap_enum_reserved_areas( alloc_virtual_heap, &heap_base, 0 )) heap_base = wine_anon_mmap( NULL, VIRTUAL_HEAP_SIZE, PROT_READ|PROT_WRITE, 0 ); +#endif assert( heap_base != (void *)-1 ); virtual_heap = RtlCreateHeap( HEAP_NO_SERIALIZE, heap_base, VIRTUAL_HEAP_SIZE, -- Adios From gabor at FreeBSD.org Mon Nov 24 15:29:51 2008 From: gabor at FreeBSD.org (=?ISO-8859-1?Q?G=E1bor_K=F6vesd=E1n?=) Date: Mon Nov 24 15:29:58 2008 Subject: [Fwd: cvs commit: ports/emulators/linux_dist-gentoo-stage3 Makefile distinfo pkg-plist.i586 pkg-plist.i686 pkg-plist.x86 ports/emulators/linux_dist-gentoo-stage3/files pkg-message.in] Message-ID: <492B34CE.5060103@FreeBSD.org> FYI. I updated the stage1 and stage3 linux_dist and linux_base ports. The linux_dist ports install a complete Gentoo environment into which you can chroot and even install packages from the Gentoo portage. The linux_base ports can be used as an alternative to the Fedore distributions but these are not fully supported, i.e. they are supposed to work but nothing is guarantied. The stage2 ports have been removed because no stage2 tarball distributions are shipped for 2008.0. Regards, -- Gabor Kovesdan EMAIL: gabor@FreeBSD.org WWW: http://www.kovesdan.org -------------- next part -------------- An embedded message was scrubbed... From: Gabor Kovesdan Subject: cvs commit: ports/emulators/linux_dist-gentoo-stage3 Makefile distinfo pkg-plist.i586 pkg-plist.i686 pkg-plist.x86 ports/emulators/linux_dist-gentoo-stage3/files pkg-message.in Date: Mon, 24 Nov 2008 13:23:22 +0000 (UTC) Size: 3526 Url: http://lists.freebsd.org/pipermail/freebsd-emulation/attachments/20081124/c40d9a1a/filespkg-message.in.eml From vova at fbsd.ru Tue Nov 25 02:20:39 2008 From: vova at fbsd.ru (Vladimir Grebenschikov) Date: Tue Nov 25 02:20:50 2008 Subject: wine-1.1.8 regression -- wine: could not load L"...": Invalid address In-Reply-To: <20081124220311.GA14308@ravenloft.kiev.ua> References: <20081124220311.GA14308@ravenloft.kiev.ua> Message-ID: <1227608432.1731.72.camel@localhost> On Tue, 2008-11-25 at 00:03 +0200, Alex Kozlov wrote: > On Mon, Nov 24, 2008 at 03:07:21AM -0600, Sam Fourman Jr. wrote: > > On Sun, Nov 23, 2008 at 5:41 PM, Gerald Pfeifer wrote: > >> On Mon, 10 Nov 2008, Jan Henrik Sylvester wrote: > >>> On wine-1.1.8, I cannot run many application that used to run fine on > >>> wine-1.1.7, for example an old version (4.10) of irfanview: > >>> wine: could not load L"C:\\irfanview-OLD\\i_view32.exe": Invalid address > > it would appear World of warcraft is still broken. it works fine in 1.1.7 > > wine: could not load L"C:\\Program Files\\World of Warcraft\\Wow.exe": > > Invalid address > Can You please test this patch? (Drop it in emulators/wine/files) > Thanks. Patch helps me. Thank you. Now no more "Invalid address" messages. > Index: dlls/ntdll/virtual.c > @@ -1250,8 +1254,13 @@ > } > > /* try to find space in a reserved area for the virtual heap */ > - if (!wine_mmap_enum_reserved_areas( alloc_virtual_heap, &heap_base, 1 )) > +#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) > + heap_base = wine_anon_mmap( address_space_limit - 10 * VIRTUAL_HEAP_SIZE, > + VIRTUAL_HEAP_SIZE, PROT_READ|PROT_WRITE, 0 ); > +#else > + if (!wine_mmap_enum_reserved_areas( alloc_virtual_heap, &heap_base, 0 )) > heap_base = wine_anon_mmap( NULL, VIRTUAL_HEAP_SIZE, PROT_READ|PROT_WRITE, 0 ); > +#endif > > assert( heap_base != (void *)-1 ); > virtual_heap = RtlCreateHeap( HEAP_NO_SERIALIZE, heap_base, VIRTUAL_HEAP_SIZE, > > > -- > Adios > _______________________________________________ > freebsd-emulation@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-emulation > To unsubscribe, send any mail to "freebsd-emulation-unsubscribe@freebsd.org" -- Vladimir B. Grebenschikov vova@fbsd.ru From gerald at pfeifer.com Tue Nov 25 13:39:26 2008 From: gerald at pfeifer.com (Gerald Pfeifer) Date: Tue Nov 25 13:39:32 2008 Subject: wine-1.1.8 regression -- wine: could not load L"...": Invalid address In-Reply-To: <1227608432.1731.72.camel@localhost> References: <20081124220311.GA14308@ravenloft.kiev.ua> <1227608432.1731.72.camel@localhost> Message-ID: On Tue, 25 Nov 2008, Vladimir Grebenschikov wrote: > Patch helps me. Thank you. > Now no more "Invalid address" messages. Cool. Thanks a lot for addressing this Alex, and Vladimir for your testing! Alex, would you mind submitting this patch upstream as well, to wine-patches@winehq.org Cc:ing me on that? (If you prefer, I can also do this, but since it's your patch...) I'm currently travelling and will try to update our port in the next couple of days; the earlier this gets upstream or at least upstream review the better. Thanks again to everyone helping with this! Gerald From tijl at ulyssis.org Tue Nov 25 14:26:32 2008 From: tijl at ulyssis.org (Tijl Coosemans) Date: Tue Nov 25 14:26:39 2008 Subject: wine-1.1.8 regression -- wine: could not load L"...": Invalid address In-Reply-To: References: <20081124220311.GA14308@ravenloft.kiev.ua> <1227608432.1731.72.camel@localhost> Message-ID: <200811252326.25299.tijl@ulyssis.org> Alex, On Tuesday 25 November 2008 22:39:25 Gerald Pfeifer wrote: > Alex, would you mind submitting this patch upstream as well, to > wine-patches@winehq.org Cc:ing me on that? (If you prefer, I can > also do this, but since it's your patch...) > > I'm currently travelling and will try to update our port in the > next couple of days; the earlier this gets upstream or at least > upstream review the better. It should probably first be discussed with Alexandre Julliard. The original code fails because it ends up allocating the virtual heap somewhere in the beginning of address space which probably interferes with other mappings. The patch moves this to (address_space_limit - 10 * VIRTUAL_HEAP_SIZE). I'm not sure that's correct. I think simply 0x80000000 would be better, but that's what Alexandre can tell you. Also, in the #else case you change a 1 into a 0. Is that intentional? - ? ?if (!wine_mmap_enum_reserved_areas( alloc_virtual_heap, &heap_base, 1 )) + ? ?if (!wine_mmap_enum_reserved_areas( alloc_virtual_heap, &heap_base, 0 )) From spam at rm-rf.kiev.ua Tue Nov 25 15:59:30 2008 From: spam at rm-rf.kiev.ua (Alex Kozlov) Date: Tue Nov 25 15:59:38 2008 Subject: wine-1.1.8 regression -- wine: could not load L"...": Invalid address Message-ID: <20081125220852.GA53049@ravenloft.kiev.ua> On Tue, Nov 25, 2008 at 10:39:25PM +0100, Gerald Pfeifer wrote: >> Patch helps me. Thank you. >> Now no more "Invalid address" messages. > Cool. Thanks a lot for addressing this Alex, and Vladimir for your > testing! Problem was surprisingly easy to diagnose. > Alex, would you mind submitting this patch upstream as well, to > wine-patches@winehq.org Cc:ing me on that? (If you prefer, I can > also do this, but since it's your patch...) I'm already contact to julliard@winehq.org. If You think it is necessary, You can submit patch to wine-patches. p.s. Preliminary analysis: After this commit http://source.winehq.org/git/wine.git/?a=commitdiff;h=222e406deb878a6312b3c4bf3bcd0e185fa2ff2c wine on freebsd 6/7 almost completely broken. I believe this is because wine reserves only dos area on freebsd. So wine_mmap_enum_reserved_areas fail: if (!wine_mmap_enum_reserved_areas( alloc_virtual_heap, &heap_base, 0 )) heap_base = wine_anon_mmap( NULL, VIRTUAL_HEAP_SIZE, PROT_READ|PROT_WRITE, 0 ); Then wine_anon_mmap with NULL as base (this changes to 0x110000 - another freebsd kludge) map first available address. After this map_image can't map PE to 0x400000 and in most cases fail with: warn:module:map_image Need to relocate module from 0x400000 to 0x660000, but there are no relocation records Quick and dirty workaround: Index: dlls/ntdll/virtual.c @@ -1250,8 +1254,13 @@ } /* try to find space in a reserved area for the virtual heap */ - if (!wine_mmap_enum_reserved_areas( alloc_virtual_heap, &heap_base, 1 )) +#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) + heap_base = wine_anon_mmap( address_space_limit - 10 * VIRTUAL_HEAP_SIZE, + VIRTUAL_HEAP_SIZE, PROT_READ|PROT_WRITE, 0 ); +#else + if (!wine_mmap_enum_reserved_areas( alloc_virtual_heap, &heap_base, 0 )) heap_base = wine_anon_mmap( NULL, VIRTUAL_HEAP_SIZE, PROT_READ|PROT_WRITE, 0 ); +#endif assert( heap_base != (void *)-1 ); virtual_heap = RtlCreateHeap( HEAP_NO_SERIALIZE, heap_base, VIRTUAL_HEAP_SIZE, Logs. WINEDEBUG=all wine 1.1.7: 0009:trace:module:load_native_dll Trying native dll L"C:\\Arcanum\\Arcanum.exe" 0009: create_mapping( access=000f0005, attributes=00000000, size=000000000, protect=192, file_handle=0x18, objattr={rootdir=0x0,sd={},name=L""} ) 0009: create_mapping() = 0 { handle=0x1c } 0009:trace:virtual:NtMapViewOfSection handle=0x1c process=0xffffffff addr=0x0 off=000000000 size=0 access=2 0009: get_mapping_info( handle=0x1c ) 0009: get_mapping_info() = 0 { size=000356000, protect=128, header_size=4096, base=0x400000, mapping=0x20, shared_file=0x0 } 0009: get_handle_fd( handle=0x1c ) 0009: *fd* 0x1c -> 68 0009: get_handle_fd() = 0 { type=1, removable=0, access=000f0005, options=00000000 } 0009:trace:virtual:VIRTUAL_DumpView View: 0x400000 - 0x755fff (anonymous) 0009:trace:virtual:VIRTUAL_DumpView 0x400000 - 0x755fff c-rWx >0009:trace:module:map_image mapped PE file at 0x400000-0x756000 0009:trace:module:map_image mapping section .text at 0x401000 off 1000 size 195000 virt 195000 flags 60000020 0009:trace:module:map_image mapping section .rdata at 0x596000 off 196000 size 4000 virt 3cc0 flags 40000040 0009:trace:module:map_image mapping section .data at 0x59a000 off 19a000 size 36000 virt 1a1318 flags c0000040 0009:trace:module:map_image mapping section .idata at 0x73c000 off 1d0000 size 2000 virt 10c0 flags c0000040 0009:trace:module:map_image mapping section .rsrc at 0x73e000 off 1d2000 size 3000 virt 27a0 flags 40000040 0009:trace:module:map_image mapping section .reloc at 0x741000 off 1d5000 size 15000 virt 14a90 flags 42000040 WINEDEBUG=all wine 1.1.9: 001b:trace:module:load_native_dll Trying native dll L"C:\\Arcanum\\Arcanum.exe" 001b: create_mapping( access=000f0005, attributes=00000000, size=000000000, protect=00000140, file_handle=0x18, objattr={rootdir=0x0,sd={},name=L""} ) 001b: create_mapping() = 0 { handle=0x1c } 001b:trace:virtual:NtMapViewOfSection handle=0x1c process=0xffffffff addr=0x0 off=000000000 size=0 a ccess=2 001b: get_mapping_info( handle=0x1c, access=00000005 ) 001b: get_mapping_info() = 0 { size=000356000, protect=256, header_size=4096, base=0x400000, mapping =0x20, shared_file=0x0 } 001b: get_handle_fd( handle=0x1c ) 001b: *fd* 0x1c -> 21 001b: get_handle_fd() = 0 { type=1, removable=0, access=000f0005, options=00000000 } 001b:trace:virtual:map_view got mem with anon mmap 0x660000-0x9b6000 001b:trace:heap:RtlAllocateHeap (0x110000,00000001,00000371): returning 0x110998 001b:trace:virtual:VIRTUAL_DumpView View: 0x660000 - 0x9b5fff (anonymous) 001b:trace:virtual:VIRTUAL_DumpView 0x660000 - 0x9b5fff c-rWx >001b:trace:module:map_image mapped PE file at 0x660000-0x9b6000 001b:trace:module:map_image mapping section .text at 0x661000 off 1000 size 195000 virt 195000 flags 60000020 001b:trace:module:map_image mapping section .rdata at 0x7f6000 off 196000 size 4000 virt 3cc0 flags 40000040 001b:trace:module:map_image mapping section .data at 0x7fa000 off 19a000 size 36000 virt 1a1318 flags c0000040 001b:trace:module:map_image mapping section .idata at 0x99c000 off 1d0000 size 2000 virt 10c0 flags c0000040 001b:trace:module:map_image mapping section .rsrc at 0x99e000 off 1d2000 size 3000 virt 27a0 flags 40000040 001b:trace:module:map_image mapping section .reloc at 0x9a1000 off 1d5000 size 15000 virt 14a90 flags 42000040 001b:warn:module:map_image Need to relocate module from 0x400000 to 0x660000, but there are no relocation records wine_anon_map log on 1.1.9: base=0x1000 size=0x10f000 prot=0 flags=1042 ptr=0x1000 base=0x0 size=0x1000 prot=0 flags=1052 ptr=0x0 >base=0x110000 size=0x400000 prot=3 flags=1002 ptr=0x110000 # VIRTUAL_HEAP base=0x7ffe0000 size=0x10000 prot=3 flags=1002 ptr=0x7ffe0000 base=0x110000 size=0x2000 prot=3 flags=1002 ptr=0x510000 base=0x110000 size=0x8000 prot=3 flags=1002 ptr=0x511000 base=0x110000 size=0x120000 prot=0 flags=1002 ptr=0x518000 base=0x7e180000 size=0x1000 prot=3 flags=1012 ptr=0x7e180000 base=0x7e240000 size=0x1000 prot=3 flags=1012 ptr=0x7e240000 base=0x110000 size=0x11000 prot=3 flags=1002 ptr=0x630000 base=0x110000 size=0x11000 prot=3 flags=1002 ptr=0x631000 >base=0x400000 size=0x356000 prot=7 flags=1002 ptr=0x631000 # PE image base=0x110000 size=0x366000 prot=7 flags=1002 ptr=0x631000 base=0x110000 size=0x11000 prot=3 flags=1002 ptr=0x631000 base=0x1000 size=0x10f000 prot=0 flags=1042 ptr=0x1000 base=0x0 size=0x1000 prot=0 flags=1052 ptr=0x0 base=0x110000 size=0x400000 prot=3 flags=1002 ptr=0x110000 base=0x7ffe0000 size=0x10000 prot=3 flags=1002 ptr=0x7ffe0000 base=0x110000 size=0x2000 prot=3 flags=1002 ptr=0x510000 base=0x110000 size=0x8000 prot=3 flags=1002 ptr=0x511000 base=0x110000 size=0x120000 prot=0 flags=1002 ptr=0x518000 base=0x110000 size=0x12000 prot=3 flags=1002 ptr=0x630000 base=0x110000 size=0x11000 prot=3 flags=1002 ptr=0x632000 base=0x7e180000 size=0x1000 prot=3 flags=1012 ptr=0x7e180000 base=0x7e240000 size=0x1000 prot=3 flags=1012 ptr=0x7e240000 base=0x400000 size=0x356000 prot=7 flags=1002 ptr=0x641000 base=0x110000 size=0x366000 prot=7 flags=1002 ptr=0x641000 -- Adios From spam at rm-rf.kiev.ua Tue Nov 25 15:59:53 2008 From: spam at rm-rf.kiev.ua (Alex Kozlov) Date: Tue Nov 25 16:00:00 2008 Subject: wine-1.1.8 regression -- wine: could not load L"...": Invalid address Message-ID: <20081125224845.GA56243@ravenloft.kiev.ua> On Tue, Nov 25, 2008 at 11:26:23PM +0100, Tijl Coosemans wrote: >> Alex, would you mind submitting this patch upstream as well, to >> wine-patches@winehq.org Cc:ing me on that? (If you prefer, I can >> also do this, but since it's your patch...) >> >> I'm currently travelling and will try to update our port in the >> next couple of days; the earlier this gets upstream or at least >> upstream review the better. > It should probably first be discussed with Alexandre Julliard. The > original code fails because it ends up allocating the virtual heap > somewhere in the beginning of address space which probably interferes > with other mappings. > The patch moves this to (address_space_limit - 10 * VIRTUAL_HEAP_SIZE). > I'm not sure that's correct. I think simply 0x80000000 would be better, > but that's what Alexandre can tell you. I'm also not sure. That why this patch quick and dirty. Let see what Julliard has to say. > Also, in the #else case you change a 1 into a 0. Is that intentional? > - ? ?if (!wine_mmap_enum_reserved_areas( alloc_virtual_heap, &heap_base, 1 )) > + ? ?if (!wine_mmap_enum_reserved_areas( alloc_virtual_heap, &heap_base, 0 )) No, this is a mistake. -- Adios From linimon at FreeBSD.org Wed Nov 26 20:59:25 2008 From: linimon at FreeBSD.org (linimon@FreeBSD.org) Date: Wed Nov 26 20:59:30 2008 Subject: kern/129169: [linux] [patch] Linux Emulation ENOTCONN error using non-blocking TCP Message-ID: <200811270459.mAR4xO6a075730@freefall.freebsd.org> Old Synopsis: Linux Emulation ENOTCONN error using non-blocking TCP New Synopsis: [linux] [patch] Linux Emulation ENOTCONN error using non-blocking TCP Responsible-Changed-From-To: freebsd-bugs->freebsd-emulation Responsible-Changed-By: linimon Responsible-Changed-When: Thu Nov 27 04:59:02 UTC 2008 Responsible-Changed-Why: Over to maintainer(s). http://www.freebsd.org/cgi/query-pr.cgi?pr=129169 From me at janh.de Thu Nov 27 12:30:54 2008 From: me at janh.de (Jan Henrik Sylvester) Date: Thu Nov 27 12:31:00 2008 Subject: wine-1.1.8 regression -- wine: could not load L"...": Invalid address In-Reply-To: References: <49189FB4.4060403@janh.de> Message-ID: <492F00F9.6060601@janh.de> Gerald Pfeifer wrote: > On Mon, 10 Nov 2008, Jan Henrik Sylvester wrote: >> On wine-1.1.8, I cannot run many application that used to run fine on >> wine-1.1.7, for example an old version (4.10) of irfanview: >> >> wine: could not load L"C:\\irfanview-OLD\\i_view32.exe": Invalid address >> >> I did recompile wine with standard port options and without additional >> patches and removed my old ~/.wine directory. The issue remains. Going >> back to 1.1.7 immediately fixes the problem. > > I just committed an update to the emulators/wine port which passed my > testing with both 16- and 32-bit Windows applications. Does that update > address the issue you have been seeing? Sorry for getting back so late and replying to the wrong mail -- I have been moving and do not have internet, yet. I downloaded the wine_anon_mmap patch from Tijl (?) earlier, but do not have the mail here. I had to change some whitespace for it to apply cleanly. With 1.1.9, I still had the same issue for the two applications I tested. The wine_anon_mmap patch fixed the issue for both. Thanks, Jan Henrik From gerald at pfeifer.com Sun Nov 30 09:58:13 2008 From: gerald at pfeifer.com (Gerald Pfeifer) Date: Sun Nov 30 09:58:20 2008 Subject: wine-1.1.8 regression -- wine: could not load L"...": Invalid address In-Reply-To: <20081125224845.GA56243@ravenloft.kiev.ua> References: <20081125224845.GA56243@ravenloft.kiev.ua> Message-ID: On Wed, 26 Nov 2008, Alex Kozlov wrote: >> The patch moves this to (address_space_limit - 10 * VIRTUAL_HEAP_SIZE). >> I'm not sure that's correct. I think simply 0x80000000 would be better, >> but that's what Alexandre can tell you. > I'm also not sure. That why this patch quick and dirty. Let see what > Julliard has to say. Thanks again, Alex, and thanks for the review, Tijl! (I had the same question on the second hunk. ;-) I will be on vacation and most likely pretty much, if not completely, offline for a while starting tomorrow, and once there is a "final" patch it would be greate if someone with write access could commit that patch. Daichi-san, who also was hurt by this problem, happens to be a ports committer, too, and I would be more than happy for him to commit the "final" patch, or some other fellow committer if Daichi-san is busy. Otherwise, I'll attend to this as soon as possible after my return (or during the trip), but that may take. Gerald From spam at rm-rf.kiev.ua Sun Nov 30 14:19:43 2008 From: spam at rm-rf.kiev.ua (Alex Kozlov) Date: Sun Nov 30 14:19:51 2008 Subject: wine-1.1.8 regression -- wine: could not load L"...": Invalid address Message-ID: <20081130221935.GA79764@ravenloft.kiev.ua> On Sun, Nov 30, 2008 at 06:58:14PM +0100, Gerald Pfeifer wrote: > On Wed, 26 Nov 2008, Alex Kozlov wrote: >>> The patch moves this to (address_space_limit - 10 * VIRTUAL_HEAP_SIZE). >>> I'm not sure that's correct. I think simply 0x80000000 would be better, >>> but that's what Alexandre can tell you. >> I'm also not sure. That why this patch quick and dirty. Let see what >> Julliard has to say. >From Alexandre POV most correct action will be to fix reserve_areas logic on FreeBSD. (I try that on this weekend, but with limited success. Very limited. Need more work, and I'm not sure that I will have enough time) As for the patch, place when alloc virtual_heap don't matter. So I think 0x80000000 is ok. > Thanks again, Alex, and thanks for the review, Tijl! (I had the same > question on the second hunk. ;-) This is garbage from my attempts to fix reserve_area. Sorry. -- Adios From daichi at ongs.co.jp Sun Nov 30 22:10:47 2008 From: daichi at ongs.co.jp (Daichi GOTO) Date: Sun Nov 30 22:10:54 2008 Subject: wine-1.1.8 regression -- wine: could not load L"...": Invalid address In-Reply-To: References: <20081125224845.GA56243@ravenloft.kiev.ua> Message-ID: <49337BEF.7000906@ongs.co.jp> Gerald Pfeifer wrote: > On Wed, 26 Nov 2008, Alex Kozlov wrote: >>> The patch moves this to (address_space_limit - 10 * VIRTUAL_HEAP_SIZE). >>> I'm not sure that's correct. I think simply 0x80000000 would be better, >>> but that's what Alexandre can tell you. >> I'm also not sure. That why this patch quick and dirty. Let see what >> Julliard has to say. > > Thanks again, Alex, and thanks for the review, Tijl! (I had the same > question on the second hunk. ;-) > > I will be on vacation and most likely pretty much, if not completely, > offline for a while starting tomorrow, and once there is a "final" patch > it would be greate if someone with write access could commit that patch. > > Daichi-san, who also was hurt by this problem, happens to be a ports > committer, too, and I would be more than happy for him to commit the > "final" patch, or some other fellow committer if Daichi-san is busy. Hi wine port folks, here is daichi, nice to meet you :) I have no idea about this patch, but I'll support you committing stage. After send-pr including a patch fixing "Invalid address" issue that you think better, please mail me directly. I'll check it and do commit if it's possible. Thanks > Otherwise, I'll attend to this as soon as possible after my return (or > during the trip), but that may take. > > Gerald -- Daichi GOTO, http://people.freebsd.org/~daichi