Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 09 Jun 2000 13:14:35 -0400
From:      "Jeroen C. van Gelderen" <jeroen@vangelderen.org>
To:        Luoqi Chen <luoqi@watermarkgroup.com>
Cc:        current@FreeBSD.ORG, emulation@FreeBSD.ORG
Subject:   Re: VMware detection code in boot loader
Message-ID:  <394125FB.964917F7@vangelderen.org>
References:  <200006091527.e59FRYb10540@lor.watermarkgroup.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?394125FB.964917F7>