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      _     _         _
[EMAIL PROTECTED]  _o     /\_   _ \\o  (_)\__/o  (_)
                      _< \_   _>(_) (_)/<_    \_| \   _|/' \/
                     (_)>(_) (_)        (_)   (_)    (_)'  _\o_


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message

Reply via email to