From owner-freebsd-emulation Sun Jun 4 13:50:38 2000 Delivered-To: freebsd-emulation@freebsd.org Received: from steinbeck.gabor.org (cb846402-a.mdsn1.wi.home.com [24.10.222.94]) by hub.freebsd.org (Postfix) with ESMTP id 9428537B5B4 for ; Sun, 4 Jun 2000 13:50:33 -0700 (PDT) (envelope-from gabor@acm.org) Received: from acm.org (localhost [127.0.0.1]) by steinbeck.gabor.org (8.9.3/8.9.3) with ESMTP id PAA58523; Sun, 4 Jun 2000 15:50:28 -0500 (CDT) (envelope-from gabor@acm.org) Message-ID: <393AC114.4CB27B6B@acm.org> Date: Sun, 04 Jun 2000 15:50:28 -0500 From: Gabor Kincses X-Mailer: Mozilla 4.72 [en] (X11; I; FreeBSD 4.0-RELEASE i386) X-Accept-Language: en MIME-Version: 1.0 To: Kees Jan Koster , emulation@freebsd.org Subject: Re: IBM Alphaworks Linux 1.3 Port Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-emulation@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Hello, I'm getting the following: sigaltstack: Cannot allocate memory This is most likely due to the MINSIGSTKSZ being 8192 in /usr/include/sys/signal.h, while 2048 in /compat/linux/usr/include/bits/sigstack.h. Anything smaller results in an ENOMEM. If the linux_sigaltstack call is simply forwarded to sigaltstack with a smaller than 8192 (but greater than 2048) size (which is perfectly legal on Linux), we get an ENOMEM... -- Gabor Kincses (gabor@acm.org) Running FreeBSD 4.0-RELEASE To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-emulation" in the body of the message From owner-freebsd-emulation Tue Jun 6 6:11:14 2000 Delivered-To: freebsd-emulation@freebsd.org Received: from vexpert.dbai.tuwien.ac.at (vexpert.dbai.tuwien.ac.at [128.130.111.12]) by hub.freebsd.org (Postfix) with ESMTP id 8006437B665 for ; Tue, 6 Jun 2000 06:11:11 -0700 (PDT) (envelope-from pfeifer@dbai.tuwien.ac.at) Received: from [128.130.111.10] (nunki [128.130.111.10]) by vexpert.dbai.tuwien.ac.at (8.9.3/8.9.3) with ESMTP id PAA15116; Tue, 6 Jun 2000 15:11:07 +0200 (MET DST) Date: Tue, 6 Jun 2000 15:11:07 +0200 (MET DST) From: Gerald Pfeifer To: Szilveszter Adam Cc: freebsd-emulation@freebsd.org Subject: Re: Recommendations for Win emulation ... In-Reply-To: <20000530144812.A11356@petra.hos.u-szeged.hu> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-emulation@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org On Tue, 30 May 2000, Szilveszter Adam wrote: > ld-elf.so.1: assert failed: /usr/src/libexec/rtld-elf/lockdflt.c:54 > > which is weird. After this the app just hangs and I have to kill it by > hand, 'wine' and sometimes 'wineserver' separately. This is not much joy:-( > > In order to clarify it once more: This is -CURRENT from 29th May and > wine-2000-05-26 built from ports cvsupped today. I'm afraid this is due to the fact that my recent update to the Wine port (http://www.FreeBSD.org/cgi/query-pr.cgi?pr=18877) has not been installed yet. > If I can be of any assistance, I'll be glad to help... I'll ping ports@freebsd.org again, but perhaps you can give my patches in that PR a try and report success/failure? Gerald -- Gerald "Jerry" pfeifer@dbai.tuwien.ac.at http://www.dbai.tuwien.ac.at/~pfeifer/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-emulation" in the body of the message From owner-freebsd-emulation Thu Jun 8 13:45:41 2000 Delivered-To: freebsd-emulation@freebsd.org Received: from brs.com.br (brs.com.br [192.41.24.32]) by hub.freebsd.org (Postfix) with ESMTP id 7AE4337C149 for ; Thu, 8 Jun 2000 13:45:38 -0700 (PDT) (envelope-from email@carlos.eti.br) Received: from fraga.carlos.eti.br ([200.241.0.6]) by brs.com.br (8.8.5) id SAA12794; Thu, 8 Jun 2000 18:45:40 -0200 (GMT+2) X-Authentication-Warning: brs.com.br: Host [200.241.0.6] claimed to be fraga.carlos.eti.br Message-Id: <4.3.2.7.2.20000608174653.00b2b7e0@carlos.eti.br> X-Sender: email@carlos.eti.br X-Mailer: QUALCOMM Windows Eudora Version 4.3.2 Date: Thu, 08 Jun 2000 17:46:59 -0300 To: freebsd-emulation@FreeBSD.ORG From: Carlos Fraga Subject: Re: It's worth ! Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed Sender: owner-freebsd-emulation@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org A site that pays you to receive some e-mails. No more than that. Nothing to buy, just to receive the e-mail and click on the link to visit the site. Don't you believe it exists ? Yes, it exists. And I have already received a US$ 50,00 check. Will you say that you don't want some money ? It's up to you to subscribe and start receiving e-mails and money ! Follow the link: http://www.sendmoreinfo.com/id/871883 See you. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-emulation" in the body of the message From owner-freebsd-emulation Fri Jun 9 0:27:24 2000 Delivered-To: freebsd-emulation@freebsd.org Received: from sol.cc.u-szeged.hu (sol.cc.u-szeged.hu [160.114.8.24]) by hub.freebsd.org (Postfix) with ESMTP id E1CE937C2E7 for ; Fri, 9 Jun 2000 00:27:15 -0700 (PDT) (envelope-from sziszi@petra.hos.u-szeged.hu) Received: from petra.hos.u-szeged.hu by sol.cc.u-szeged.hu (8.9.3+Sun/SMI-SVR4) id JAA23560; Fri, 9 Jun 2000 09:27:38 +0200 (MET DST) Received: from sziszi by petra.hos.u-szeged.hu with local (Exim 3.12 #1 (Debian)) id 130JC8-0007eO-00 for ; Fri, 09 Jun 2000 09:27:08 +0200 Date: Fri, 9 Jun 2000 09:27:08 +0200 From: Szilveszter Adam To: freebsd-emulation@freebsd.org Subject: Re: Recommendations for Win emulation ... Message-ID: <20000609092708.A28455@petra.hos.u-szeged.hu> Mail-Followup-To: freebsd-emulation@freebsd.org References: <20000530144812.A11356@petra.hos.u-szeged.hu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii User-Agent: Mutt/1.0.1i In-Reply-To: ; from pfeifer@dbai.tuwien.ac.at on Tue, Jun 06, 2000 at 03:11:07PM +0200 Sender: owner-freebsd-emulation@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org On Tue, Jun 06, 2000 at 03:11:07PM +0200, Gerald Pfeifer wrote: > On Tue, 30 May 2000, Szilveszter Adam wrote: > > ld-elf.so.1: assert failed: /usr/src/libexec/rtld-elf/lockdflt.c:54 > > > > which is weird. After this the app just hangs and I have to kill it by > > hand, 'wine' and sometimes 'wineserver' separately. This is not much joy:-( > > > > In order to clarify it once more: This is -CURRENT from 29th May and > > wine-2000-05-26 built from ports cvsupped today. > > I'm afraid this is due to the fact that my recent update to the Wine > port (http://www.FreeBSD.org/cgi/query-pr.cgi?pr=18877) has not been > installed yet. > > > If I can be of any assistance, I'll be glad to help... > > I'll ping ports@freebsd.org again, but perhaps you can give my patches > in that PR a try and report success/failure? OK, first excuse me for taking this long to answer, but because of a stupid pilot error I had to reinstall quite many things... I applied all the patches contained in the PR above and also did follow the recommendation of PR 19077 for curses.h. I have upgraded -CURRENT to the Jun 8th state, in the meantime. However, the problem remains. Sad... but I don't have the time for it today, maybe in the next few days I can look into it and try things... BTW: Your patches do the Right Thing, ie they install the libraries also and change the nameing convention. The problem is somewhere else. The thing cannot run normally for some reason. I will have to look into it some more... for reference, the version we had from last year in ports compiled and even worked to some defree on -CURRENT in May. I do not know if it does now... But the last working wine I experienced on 4.0... -- Regards: Szilveszter ADAM Szeged University Szeged Hungary To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-emulation" in the body of the message From owner-freebsd-emulation Fri Jun 9 8:27:53 2000 Delivered-To: freebsd-emulation@freebsd.org Received: from lor.watermarkgroup.com (lor.watermarkgroup.com [207.202.73.33]) by hub.freebsd.org (Postfix) with ESMTP id 3413E37C400; Fri, 9 Jun 2000 08:27:38 -0700 (PDT) (envelope-from luoqi@watermarkgroup.com) Received: (from luoqi@localhost) by lor.watermarkgroup.com (8.10.1/8.10.1) id e59FRYb10540; Fri, 9 Jun 2000 11:27:34 -0400 (EDT) Date: Fri, 9 Jun 2000 11:27:34 -0400 (EDT) From: Luoqi Chen Message-Id: <200006091527.e59FRYb10540@lor.watermarkgroup.com> To: current@freebsd.org, emulation@freebsd.org Subject: VMware detection code in boot loader Sender: owner-freebsd-emulation@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Would anyone object if I add a ficl word to detect whether we're booting from a vmware virtual machine? I find it extremely useful when I'm running FreeBSD as a guest under NT. Because it is a dual cpu box, I can't use a single kernel to boot both directly or inside the virtual machine. With this new word, I can determine which kernel to use in the loader script, saving me the trouble to unload and reload a new kernel each time I reboot. Here's the patch to the boot loader, Index: boot/ficl/ficl.h =================================================================== RCS file: /home/ncvs/src/sys/boot/ficl/ficl.h,v retrieving revision 1.14 diff -u -r1.14 ficl.h --- boot/ficl/ficl.h 2000/06/01 18:10:43 1.14 +++ boot/ficl/ficl.h 2000/06/07 18:18:38 @@ -860,6 +860,7 @@ #if defined(__i386__) && !defined(TESTMAIN) extern void ficlOutb(FICL_VM *pVM); extern void ficlInb(FICL_VM *pVM); +extern void vmware(FICL_VM *pVM); #endif #ifdef __cplusplus Index: boot/ficl/words.c =================================================================== RCS file: /home/ncvs/src/sys/boot/ficl/words.c,v retrieving revision 1.27 diff -u -r1.27 words.c --- boot/ficl/words.c 2000/06/01 18:10:43 1.27 +++ boot/ficl/words.c 2000/06/07 18:19:13 @@ -4800,6 +4800,7 @@ #ifdef __i386__ dictAppendWord(dp, "outb", ficlOutb, FW_DEFAULT); dictAppendWord(dp, "inb", ficlInb, FW_DEFAULT); + dictAppendWord(dp, "vmware", vmware, FW_DEFAULT); #endif #endif Index: boot/ficl/i386/sysdep.c =================================================================== RCS file: /home/ncvs/src/sys/boot/ficl/i386/sysdep.c,v retrieving revision 1.7 diff -u -r1.7 sysdep.c --- boot/ficl/i386/sysdep.c 1999/09/29 04:43:07 1.7 +++ boot/ficl/i386/sysdep.c 2000/06/07 18:18:13 @@ -111,6 +111,26 @@ c=inb(port); stackPushINT(pVM->pStack,c); } + +/* + * vmware ( -- version ) + * Get vmware version. + */ +void +vmware(FICL_VM *pVM) +{ + int version, magic = 0; + +#define VMWARE_MAGIC 0x564d5868 +#define VMWARE_PORT 0x5658 + + __asm __volatile("inl %%dx, %%eax" + : "=a" (version), "=b" (magic) + : "0" (VMWARE_MAGIC), "d" (VMWARE_PORT), "c" (0xa)); + if (magic != VMWARE_MAGIC) + version = -1; + stackPushINT(pVM->pStack, version); +} #endif #endif To use this feature, you first create a file /boot/vmware.4th: : vmware-conf vmware dup 0> if ." VMware version " . cr ." Loading /boot/vmware.conf..." cr s" /boot/vmware.conf" read-conf else drop then ; then create /boot/vmware.conf which sets the kernel to use: kernel="/kernel.VMWARE" finally, change your /boot/loader.rc to include /boot/loader.4th include /boot/vmware.4th initialize drop vmware-conf boot-conf check-password -lq To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-emulation" in the body of the message From owner-freebsd-emulation Fri Jun 9 8:35:10 2000 Delivered-To: freebsd-emulation@freebsd.org Received: from mass.cdrom.com (adsl-63-206-88-224.dsl.snfc21.pacbell.net [63.206.88.224]) by hub.freebsd.org (Postfix) with ESMTP id 4267937C3F8; Fri, 9 Jun 2000 08:35:06 -0700 (PDT) (envelope-from msmith@mass.cdrom.com) Received: from mass.cdrom.com (localhost [127.0.0.1]) by mass.cdrom.com (8.9.3/8.9.3) with ESMTP id IAA03598; Fri, 9 Jun 2000 08:38:55 -0700 (PDT) (envelope-from msmith@mass.cdrom.com) Message-Id: <200006091538.IAA03598@mass.cdrom.com> X-Mailer: exmh version 2.1.1 10/15/1999 To: Luoqi Chen Cc: current@freebsd.org, emulation@freebsd.org Subject: Re: VMware detection code in boot loader In-reply-to: Your message of "Fri, 09 Jun 2000 11:27:34 EDT." <200006091527.e59FRYb10540@lor.watermarkgroup.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Fri, 09 Jun 2000 08:38:55 -0700 From: Mike Smith Sender: owner-freebsd-emulation@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org > Would anyone object if I add a ficl word to detect whether we're booting > from a vmware virtual machine? Sounds good to me! -- \\ Give a man a fish, and you feed him for a day. \\ Mike Smith \\ Tell him he should learn how to fish himself, \\ msmith@freebsd.org \\ and he'll hate you for a lifetime. \\ msmith@cdrom.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-emulation" in the body of the message From owner-freebsd-emulation Fri Jun 9 10:14:40 2000 Delivered-To: freebsd-emulation@freebsd.org Received: from cypherpunks.ai (cypherpunks.ai [209.88.68.47]) by hub.freebsd.org (Postfix) with ESMTP id 6509337B60E; Fri, 9 Jun 2000 10:14:36 -0700 (PDT) (envelope-from jeroen@vangelderen.org) Received: from vangelderen.org (grolsch.ai [209.88.68.214]) by cypherpunks.ai (Postfix) with ESMTP id 6CB0451; Fri, 9 Jun 2000 13:14:35 -0400 (AST) Message-ID: <394125FB.964917F7@vangelderen.org> Date: Fri, 09 Jun 2000 13:14:35 -0400 From: "Jeroen C. van Gelderen" X-Mailer: Mozilla 4.72 [en] (X11; I; Linux 2.2.12 i386) X-Accept-Language: en MIME-Version: 1.0 To: Luoqi Chen Cc: current@FreeBSD.ORG, emulation@FreeBSD.ORG Subject: Re: VMware detection code in boot loader References: <200006091527.e59FRYb10540@lor.watermarkgroup.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-emulation@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Luoqi Chen wrote: > > Would anyone object if I add a ficl word to detect whether we're booting > from a vmware virtual machine? I find it extremely useful when I'm running > FreeBSD as a guest under NT. Because it is a dual cpu box, I can't use a > single kernel to boot both directly or inside the virtual machine. With this > new word, I can determine which kernel to use in the loader script, saving > me the trouble to unload and reload a new kernel each time I reboot. > > Here's the patch to the boot loader, > > Index: boot/ficl/ficl.h > =================================================================== > RCS file: /home/ncvs/src/sys/boot/ficl/ficl.h,v > retrieving revision 1.14 > diff -u -r1.14 ficl.h > --- boot/ficl/ficl.h 2000/06/01 18:10:43 1.14 > +++ boot/ficl/ficl.h 2000/06/07 18:18:38 > @@ -860,6 +860,7 @@ > #if defined(__i386__) && !defined(TESTMAIN) > extern void ficlOutb(FICL_VM *pVM); > extern void ficlInb(FICL_VM *pVM); > +extern void vmware(FICL_VM *pVM); I'm not sure it is a good idea to name this variable VMWare as that is implementation specific. It may be better to have a var named 'emulation' set to 'none' or 'vmware' or 'bochs' or ... Just my EC 0.02, Jeroen -- Jeroen C. van Gelderen o _ _ _ jeroen@vangelderen.org _o /\_ _ \\o (_)\__/o (_) _< \_ _>(_) (_)/<_ \_| \ _|/' \/ (_)>(_) (_) (_) (_) (_)' _\o_ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-emulation" in the body of the message From owner-freebsd-emulation Fri Jun 9 14:29:45 2000 Delivered-To: freebsd-emulation@freebsd.org Received: from cheddar.netmonger.net (cheddar.netmonger.net [209.54.21.140]) by hub.freebsd.org (Postfix) with ESMTP id 19F4837B659; Fri, 9 Jun 2000 14:29:41 -0700 (PDT) (envelope-from chris@cheddar.netmonger.net) Received: (from chris@localhost) by cheddar.netmonger.net (8.8.8/8.8.8) id RAA26768; Fri, 9 Jun 2000 17:29:18 -0400 (EDT) Message-ID: <20000609172917.A26459@netmonger.net> Date: Fri, 9 Jun 2000 17:29:18 -0400 From: Christopher Masto To: "Jeroen C. van Gelderen" , Luoqi Chen Cc: current@FreeBSD.ORG, emulation@FreeBSD.ORG Subject: Re: VMware detection code in boot loader References: <200006091527.e59FRYb10540@lor.watermarkgroup.com> <394125FB.964917F7@vangelderen.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.91.1i In-Reply-To: <394125FB.964917F7@vangelderen.org>; from Jeroen C. van Gelderen on Fri, Jun 09, 2000 at 01:14:35PM -0400 Sender: owner-freebsd-emulation@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org On Fri, Jun 09, 2000 at 01:14:35PM -0400, Jeroen C. van Gelderen wrote: > I'm not sure it is a good idea to name this variable VMWare as > that is implementation specific. It may be better to have a var > named 'emulation' set to 'none' or 'vmware' or 'bochs' or ... Mmm.. or, giving forth the ability to do in/out instructions, so the non-generic code would be entirely in the add-on forth piece. I'm not sure if there are any security implications there.. at boot time the machine is essentially as single-user as it's ever going to be. -- Christopher Masto Senior Network Monkey NetMonger Communications chris@netmonger.net info@netmonger.net http://www.netmonger.net Free yourself, free your machine, free the daemon -- http://www.freebsd.org/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-emulation" in the body of the message From owner-freebsd-emulation Fri Jun 9 14:31:29 2000 Delivered-To: freebsd-emulation@freebsd.org Received: from cheddar.netmonger.net (cheddar.netmonger.net [209.54.21.140]) by hub.freebsd.org (Postfix) with ESMTP id 217F837B52A; Fri, 9 Jun 2000 14:31:22 -0700 (PDT) (envelope-from chris@cheddar.netmonger.net) Received: (from chris@localhost) by cheddar.netmonger.net (8.8.8/8.8.8) id RAA27155; Fri, 9 Jun 2000 17:31:18 -0400 (EDT) Message-ID: <20000609173118.B26459@netmonger.net> Date: Fri, 9 Jun 2000 17:31:18 -0400 From: Christopher Masto To: "Jeroen C. van Gelderen" , Luoqi Chen Cc: current@FreeBSD.ORG, emulation@FreeBSD.ORG Subject: Re: VMware detection code in boot loader References: <200006091527.e59FRYb10540@lor.watermarkgroup.com> <394125FB.964917F7@vangelderen.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.91.1i In-Reply-To: <394125FB.964917F7@vangelderen.org>; from Jeroen C. van Gelderen on Fri, Jun 09, 2000 at 01:14:35PM -0400 Sender: owner-freebsd-emulation@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org > > extern void ficlOutb(FICL_VM *pVM); > > extern void ficlInb(FICL_VM *pVM); I'm an idiot. -- Christopher Masto Senior Network Monkey NetMonger Communications chris@netmonger.net info@netmonger.net http://www.netmonger.net Free yourself, free your machine, free the daemon -- http://www.freebsd.org/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-emulation" in the body of the message From owner-freebsd-emulation Fri Jun 9 14:56:46 2000 Delivered-To: freebsd-emulation@freebsd.org Received: from overcee.netplex.com.au (peter1.corp.yahoo.com [208.48.107.4]) by hub.freebsd.org (Postfix) with ESMTP id 78BEC37B756; Fri, 9 Jun 2000 14:56:42 -0700 (PDT) (envelope-from peter@netplex.com.au) Received: from netplex.com.au (localhost [127.0.0.1]) by overcee.netplex.com.au (Postfix) with ESMTP id B13911CE1; Fri, 9 Jun 2000 14:56:41 -0700 (PDT) (envelope-from peter@netplex.com.au) X-Mailer: exmh version 2.1.1 10/15/1999 To: Christopher Masto Cc: "Jeroen C. van Gelderen" , Luoqi Chen , current@FreeBSD.ORG, emulation@FreeBSD.ORG Subject: Re: VMware detection code in boot loader In-Reply-To: Message from Christopher Masto of "Fri, 09 Jun 2000 17:29:18 EDT." <20000609172917.A26459@netmonger.net> Date: Fri, 09 Jun 2000 14:56:41 -0700 From: Peter Wemm Message-Id: <20000609215641.B13911CE1@overcee.netplex.com.au> Sender: owner-freebsd-emulation@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Christopher Masto wrote: > On Fri, Jun 09, 2000 at 01:14:35PM -0400, Jeroen C. van Gelderen wrote: > > I'm not sure it is a good idea to name this variable VMWare as > > that is implementation specific. It may be better to have a var > > named 'emulation' set to 'none' or 'vmware' or 'bochs' or ... > > Mmm.. or, giving forth the ability to do in/out instructions, so the > non-generic code would be entirely in the add-on forth piece. I'm > not sure if there are any security implications there.. at boot time > the machine is essentially as single-user as it's ever going to be. I prefer 'emulation' being set to 'native', 'vmware' etc. Consider that there is IA64, Alpha, sparc, ppc etc to deal with. Teaching the ficl scripts to do inb/outb would be bad. It would be much better to have a generic mechanism for informing the loader about possible emulation environments, eg you are using the IA64 emulator under an x86 box, or an x86 emulator on an Alpha, or an Alpha SIMOS emulation under x86, or whatever. Cheers, -Peter -- Peter Wemm - peter@FreeBSD.org; peter@yahoo-inc.com; peter@netplex.com.au "All of this is for nothing if we don't go to the stars" - JMS/B5 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-emulation" in the body of the message From owner-freebsd-emulation Fri Jun 9 16:59:16 2000 Delivered-To: freebsd-emulation@freebsd.org Received: from cypherpunks.ai (cypherpunks.ai [209.88.68.47]) by hub.freebsd.org (Postfix) with ESMTP id 87DEC37C256; Fri, 9 Jun 2000 16:59:13 -0700 (PDT) (envelope-from jeroen@vangelderen.org) Received: from vangelderen.org (grolsch.ai [209.88.68.214]) by cypherpunks.ai (Postfix) with ESMTP id D34384F; Fri, 9 Jun 2000 19:59:12 -0400 (AST) Message-ID: <394184D0.3B7479F2@vangelderen.org> Date: Fri, 09 Jun 2000 19:59:12 -0400 From: "Jeroen C. van Gelderen" X-Mailer: Mozilla 4.72 [en] (X11; I; Linux 2.2.12 i386) X-Accept-Language: en MIME-Version: 1.0 To: Peter Wemm Cc: Christopher Masto , Luoqi Chen , current@FreeBSD.ORG, emulation@FreeBSD.ORG Subject: Re: VMware detection code in boot loader References: <20000609215641.B13911CE1@overcee.netplex.com.au> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-emulation@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Peter Wemm wrote: > > Christopher Masto wrote: > > On Fri, Jun 09, 2000 at 01:14:35PM -0400, Jeroen C. van Gelderen wrote: > > > I'm not sure it is a good idea to name this variable VMWare as > > > that is implementation specific. It may be better to have a var > > > named 'emulation' set to 'none' or 'vmware' or 'bochs' or ... > > > > Mmm.. or, giving forth the ability to do in/out instructions, so the > > non-generic code would be entirely in the add-on forth piece. I'm > > not sure if there are any security implications there.. at boot time > > the machine is essentially as single-user as it's ever going to be. > > I prefer 'emulation' being set to 'native', 'vmware' etc. Consider that > there is IA64, Alpha, sparc, ppc etc to deal with. Teaching the ficl > scripts to do inb/outb would be bad. It would be much better to have a > generic mechanism for informing the loader about possible emulation > environments, eg you are using the IA64 emulator under an x86 box, or an > x86 emulator on an Alpha, or an Alpha SIMOS emulation under x86, or > whatever. Rethinking, emulation may not be the best suggestion. People might confuse it with Linux emulation. How about 'hardware' ? or 'platform' or ? Cheers, Jeroen -- Jeroen C. van Gelderen o _ _ _ jeroen@vangelderen.org _o /\_ _ \\o (_)\__/o (_) _< \_ _>(_) (_)/<_ \_| \ _|/' \/ (_)>(_) (_) (_) (_) (_)' _\o_ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-emulation" in the body of the message From owner-freebsd-emulation Fri Jun 9 21:26:10 2000 Delivered-To: freebsd-emulation@freebsd.org Received: from peach.ocn.ne.jp (peach.ocn.ne.jp [210.145.254.87]) by hub.freebsd.org (Postfix) with ESMTP id 3DC7F37B995; Fri, 9 Jun 2000 21:26:03 -0700 (PDT) (envelope-from dcs@newsguy.com) Received: from newsguy.com (p06-dn03kiryunisiki.gunma.ocn.ne.jp [210.232.224.135]) by peach.ocn.ne.jp (8.9.1a/OCN/) with ESMTP id NAA13281; Sat, 10 Jun 2000 13:25:57 +0900 (JST) Message-ID: <3941C395.621849D9@newsguy.com> Date: Sat, 10 Jun 2000 13:27:01 +0900 From: "Daniel C. Sobral" X-Mailer: Mozilla 4.7 [en] (Win98; I) X-Accept-Language: en,pt-BR,ja MIME-Version: 1.0 To: Luoqi Chen Cc: current@FreeBSD.ORG, emulation@FreeBSD.ORG Subject: Re: VMware detection code in boot loader References: <200006091527.e59FRYb10540@lor.watermarkgroup.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-emulation@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Luoqi Chen wrote: > > Would anyone object if I add a ficl word to detect whether we're booting > from a vmware virtual machine? I find it extremely useful when I'm running > FreeBSD as a guest under NT. Because it is a dual cpu box, I can't use a > single kernel to boot both directly or inside the virtual machine. With this > new word, I can determine which kernel to use in the loader script, saving > me the trouble to unload and reload a new kernel each time I reboot. > > Here's the patch to the boot loader, > > --- boot/ficl/ficl.h 2000/06/01 18:10:43 1.14 > +++ boot/ficl/ficl.h 2000/06/07 18:18:38 > @@ -860,6 +860,7 @@ > #if defined(__i386__) && !defined(TESTMAIN) > extern void ficlOutb(FICL_VM *pVM); ^^^^^^^^ > extern void ficlInb(FICL_VM *pVM); ^^^^^^^ > +extern void vmware(FICL_VM *pVM); We have inb and outb. Can't vmware be written in Forth? If inl cannot be replaced with inb, I'd rather add inl than vmware. > To use this feature, you first create a file /boot/vmware.4th: > > : vmware-conf > vmware dup 0> if > ." VMware version " . cr > ." Loading /boot/vmware.conf..." cr > s" /boot/vmware.conf" read-conf > else > drop > then > ; > > then create /boot/vmware.conf which sets the kernel to use: > > kernel="/kernel.VMWARE" > > finally, change your /boot/loader.rc to > > include /boot/loader.4th > include /boot/vmware.4th > initialize drop > vmware-conf > boot-conf > check-password IMHO, it would be better to add exec="include /boot/vmware.4th" to the end of your /boot/loader.conf, and either execute vmware-conf from there or script the whole thing: s" arch-i386" environment? [if] \ Get vmware version, magic 0x564d868 ( VMware magic ) = [if] .( VMware version ) . cr .( Loading /boot/vmware.conf...) cr s" /boot/vmware.conf" read-conf [else] drop [then] [then] Either way, no changes to /boot/loader.rc would be required. -- Daniel C. Sobral (8-DCS) dcs@newsguy.com dcs@freebsd.org capo@yet.another.bsdconspiracy.org Hmmm - I have to go check this. My reality assumptions are shattered. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-emulation" in the body of the message From owner-freebsd-emulation Sat Jun 10 6:31:46 2000 Delivered-To: freebsd-emulation@freebsd.org Received: from lor.watermarkgroup.com (lor.watermarkgroup.com [207.202.73.33]) by hub.freebsd.org (Postfix) with ESMTP id 9749F37B71B; Sat, 10 Jun 2000 06:31:41 -0700 (PDT) (envelope-from luoqi@watermarkgroup.com) Received: (from luoqi@localhost) by lor.watermarkgroup.com (8.10.1/8.10.1) id e5ADVe205943; Sat, 10 Jun 2000 09:31:40 -0400 (EDT) Date: Sat, 10 Jun 2000 09:31:40 -0400 (EDT) From: Luoqi Chen Message-Id: <200006101331.e5ADVe205943@lor.watermarkgroup.com> To: dcs@newsguy.com Subject: Re: VMware detection code in boot loader Cc: current@FreeBSD.ORG, emulation@FreeBSD.ORG Sender: owner-freebsd-emulation@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org > We have inb and outb. Can't vmware be written in Forth? If inl cannot be > replaced with inb, I'd rather add inl than vmware. > But we can't set registers to specific values before inb/outb, which also means our inb/outb are quite useless in making BIOS calls. > IMHO, it would be better to add > > exec="include /boot/vmware.4th" > > to the end of your /boot/loader.conf, and either execute vmware-conf > from there or script the whole thing: > > s" arch-i386" environment? [if] > \ Get vmware version, magic > 0x564d868 ( VMware magic ) = [if] > .( VMware version ) . cr > .( Loading /boot/vmware.conf...) cr > s" /boot/vmware.conf" read-conf > [else] > drop > [then] > [then] > > Either way, no changes to /boot/loader.rc would be required. > This looks much better, I didn't know we could tell the loader to execute a script in loader.conf. > -- > Daniel C. Sobral (8-DCS) > > dcs@newsguy.com > dcs@freebsd.org > capo@yet.another.bsdconspiracy.org > > Hmmm - I have to go check this. My reality assumptions are shattered. > -lq To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-emulation" in the body of the message From owner-freebsd-emulation Sat Jun 10 7:46:44 2000 Delivered-To: freebsd-emulation@freebsd.org Received: from peach.ocn.ne.jp (peach.ocn.ne.jp [210.145.254.87]) by hub.freebsd.org (Postfix) with ESMTP id 0D1F637B60B; Sat, 10 Jun 2000 07:46:36 -0700 (PDT) (envelope-from dcs@newsguy.com) Received: from newsguy.com (p54-dn02kiryunisiki.gunma.ocn.ne.jp [211.0.245.119]) by peach.ocn.ne.jp (8.9.1a/OCN/) with ESMTP id XAA12425; Sat, 10 Jun 2000 23:46:30 +0900 (JST) Message-ID: <39425506.AE599417@newsguy.com> Date: Sat, 10 Jun 2000 23:47:34 +0900 From: "Daniel C. Sobral" X-Mailer: Mozilla 4.7 [en] (Win98; I) X-Accept-Language: en,pt-BR,ja MIME-Version: 1.0 To: Luoqi Chen Cc: current@FreeBSD.ORG, emulation@FreeBSD.ORG Subject: Re: VMware detection code in boot loader References: <200006101331.e5ADVe205943@lor.watermarkgroup.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-emulation@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Luoqi Chen wrote: > > > We have inb and outb. Can't vmware be written in Forth? If inl cannot be > > replaced with inb, I'd rather add inl than vmware. > But we can't set registers to specific values before inb/outb, which also > means our inb/outb are quite useless in making BIOS calls. BIOS calls? Y'know, I once argued for a vm86intr() (or whatever it is called) on FICL, in case applications needed it. As for setting registers ti specific values... huh? Why does this matter? Can you explain exactly what your code does and how? I'd much prefer this could be done from a .4th file, as this is something ports and third-parties might like to do. > > Either way, no changes to /boot/loader.rc would be required. > > > This looks much better, I didn't know we could tell the loader to execute a > script in loader.conf. I try to keep it a secret. :-) While the exec="" stuff allows for arbitrary code execution (as do _after, _before and _error), this sort of thing is best avoided if possible on a configuration file. This particular case, though, is precisely the kind of exception to the rule I had in mind. -- Daniel C. Sobral (8-DCS) dcs@newsguy.com dcs@freebsd.org capo@yet.another.bsdconspiracy.org Hmmm - I have to go check this. My reality assumptions are shattered. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-emulation" in the body of the message From owner-freebsd-emulation Sat Jun 10 17:34:58 2000 Delivered-To: freebsd-emulation@freebsd.org Received: from vexpert.dbai.tuwien.ac.at (vexpert.dbai.tuwien.ac.at [128.130.111.12]) by hub.freebsd.org (Postfix) with ESMTP id 9A6D937B86D for ; Sat, 10 Jun 2000 17:34:54 -0700 (PDT) (envelope-from pfeifer@dbai.tuwien.ac.at) Received: from [128.130.111.2] (deneb [128.130.111.2]) by vexpert.dbai.tuwien.ac.at (8.9.3/8.9.3) with ESMTP id CAA07666; Sun, 11 Jun 2000 02:34:37 +0200 (MET DST) Date: Sun, 11 Jun 2000 02:34:36 +0200 (CEST) From: Gerald Pfeifer To: wine-devel@winehq.com Cc: freebsd-emulation@freebsd.org Subject: Wine server/ptrace.c, please help reviewing! Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-emulation@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org I found, in the FreeBSD ports collection (where I became maintainer of the Wine port which I'm plan to ``minimize''), the following patch which is superflous as far as can see. Am I missing something obvious here, or is this just a historic relict? (Originally that patch was much larger, but I changes in Wine essentially made those parts obsolete, so I removed them with my first update for the port.) Gerald *** server/ptrace.c.orig Tue Apr 4 21:55:28 2000 --- server/ptrace.c Thu May 18 09:40:09 2000 *************** *** 36,41 **** --- 36,46 ---- #ifndef PTRACE_POKEDATA #define PTRACE_POKEDATA PT_WRITE_D #endif + #ifdef __FreeBSD__ + #define PTRACE_KEEPIP 1 + #else + #define PTRACE_KEEPIP 0 + #endif static const int use_ptrace = 1; /* set to 0 to disable ptrace */ *************** void wait4_thread( struct thread *thread *** 109,115 **** static int attach_thread( struct thread *thread ) { /* this may fail if the client is already being debugged */ ! if (!use_ptrace || (ptrace( PTRACE_ATTACH, thread->unix_pid, 0, 0) == -1)) return 0; if (debug_level) fprintf( stderr, "%08x: *attached*\n", (unsigned int)thread ); thread->attached = 1; wait4_thread( thread, SIGSTOP ); --- 114,120 ---- static int attach_thread( struct thread *thread ) { /* this may fail if the client is already being debugged */ ! if (!use_ptrace || (ptrace( PTRACE_ATTACH, thread->unix_pid, PTRACE_KEEPIP, 0 ) == -1)) return 0; if (debug_level) fprintf( stderr, "%08x: *attached*\n", (unsigned int)thread ); thread->attached = 1; To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-emulation" in the body of the message From owner-freebsd-emulation Sat Jun 10 17:40:16 2000 Delivered-To: freebsd-emulation@freebsd.org Received: from lor.watermarkgroup.com (lor.watermarkgroup.com [207.202.73.33]) by hub.freebsd.org (Postfix) with ESMTP id 7100337B84F; Sat, 10 Jun 2000 17:40:13 -0700 (PDT) (envelope-from luoqi@watermarkgroup.com) Received: (from luoqi@localhost) by lor.watermarkgroup.com (8.10.1/8.10.1) id e5B0eB514121; Sat, 10 Jun 2000 20:40:12 -0400 (EDT) Date: Sat, 10 Jun 2000 20:40:12 -0400 (EDT) From: Luoqi Chen Message-Id: <200006110040.e5B0eB514121@lor.watermarkgroup.com> To: dcs@newsguy.com Subject: Re: VMware detection code in boot loader Cc: current@FreeBSD.ORG, emulation@FreeBSD.ORG Sender: owner-freebsd-emulation@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org > As for setting registers ti specific values... huh? Why does this > matter? Can you explain exactly what your code does and how? > VMware intercepts the inb/outb instruction to port 0x5658 when the eax register is set to a magic value, otherwise it would be handled as any other ports. -lq To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-emulation" in the body of the message From owner-freebsd-emulation Sat Jun 10 18: 1:33 2000 Delivered-To: freebsd-emulation@freebsd.org Received: from mass.cdrom.com (adsl-63-206-88-224.dsl.snfc21.pacbell.net [63.206.88.224]) by hub.freebsd.org (Postfix) with ESMTP id 1538D37B960; Sat, 10 Jun 2000 18:01:29 -0700 (PDT) (envelope-from msmith@mass.cdrom.com) Received: from mass.cdrom.com (localhost [127.0.0.1]) by mass.cdrom.com (8.9.3/8.9.3) with ESMTP id SAA11913; Sat, 10 Jun 2000 18:05:25 -0700 (PDT) (envelope-from msmith@mass.cdrom.com) Message-Id: <200006110105.SAA11913@mass.cdrom.com> X-Mailer: exmh version 2.1.1 10/15/1999 To: Luoqi Chen Cc: dcs@newsguy.com, current@FreeBSD.ORG, emulation@FreeBSD.ORG Subject: Re: VMware detection code in boot loader In-reply-to: Your message of "Sat, 10 Jun 2000 20:40:12 EDT." <200006110040.e5B0eB514121@lor.watermarkgroup.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Sat, 10 Jun 2000 18:05:25 -0700 From: Mike Smith Sender: owner-freebsd-emulation@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org > > As for setting registers ti specific values... huh? Why does this > > matter? Can you explain exactly what your code does and how? > > > VMware intercepts the inb/outb instruction to port 0x5658 when the eax > register is set to a magic value, otherwise it would be handled as any > other ports. I think, again, that adding an i386-specific word that detects the presence of VMware is a perfectly sensible idea, and it should simply be done. -- \\ Give a man a fish, and you feed him for a day. \\ Mike Smith \\ Tell him he should learn how to fish himself, \\ msmith@freebsd.org \\ and he'll hate you for a lifetime. \\ msmith@cdrom.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-emulation" in the body of the message