This is the beginnings to the virtualization framework that
is needed for FreeMWare.


,------------------.
| IMPORTANT NOTICE |
|---------------------------------------------------------.
| This code is EXTREMELY EXPERIMENTAL, and will likely    |
| result in a SYSTEM CRASH, and who knows what other      |
| ill effects.  RUN THIS SOFTWARE AT YOUR OWN RISK.       |
| As a precaution, don't run it on a system with any      |
| important data on it, and make liberal use of the       |
| sync command!  Expect to have to use the power button.  |
`---------------------------------------------------------'


The directory tree is structured as follows:

freemware                         root directory for FreeMWare
    |
    |--- kernel                   contains the sources for the
    |      |                      FreeMWare kernel driver
    |      |
    |      `--- include           contains header files for the
    |                             FreeMWare kernel driver
    |
    |--- user                     contains the sources for the
    |      |                      user-level VM monitor
    |      |
    |      `--- plugins           contains the sources for the plugins
    |             |
    |             |--- ice        ICE plugin; for using remote GDB
    |             `--- bochs      BOCHS plugin; contains emulated
    |                             hardware devices, and GUI code
    |
    `--- guest                    contains several simple kernels for
           |                      testing VM functionality as it is added
           |
           |--- virtcode          simple non-multitasking kernel (shell)
           |--- cooperative       simple cooperative multitasking kernel
           `--- preemptive        simple preemptive multitasking kernel

Things have been kept modularized regarding the host OS.
Anything OS specific should be put in "kernel/host-xyz.c"
or "kernel/include/host-xyz.h".


Each time the host switches to the monitor/guest
environment and runs that context.  Normally, execution
will continue in that context until a hardware interrupt
occurs or other exception.  The monitor interrupt handler
switches back to the host context to handle the interrupt.
The monitor/guest context will not resume execution until
the next ioctl() call from the user program.


Directions for installation:

   1.  Enter the FreeMWare root directory and type ./configure.
       The configure script will attempt to guess the settings
       for your system, such as host OS, location of libraries
       etc.

           user> cd freemware
           user> ./configure

   2.  When configure has completed, type make.  The whole tree
       will now be compiled.

           user> make

   3.  Make the device node /dev/freemware.  FreeMWare needs this
       device in order that the user-level VM monitor can communicate
       with the kernel driver.  You only have to do this once.
       You will need to be root:

           user> su
           root> mknod /dev/freemware0 c 63 0
           root> chmod a+rw /dev/freemware0

   4.  Install the FreeMWare kernel module on your system, and
       exit the root shell:

           root> /sbin/insmod kernel/freemware.o
           root> exit

       You need to have the kernel module installed in order to
       use FreeMWare.  You could load it in your rc.local, for
       instance.

   5.  Have a look through user/fmw.conf.  This configuration
       file contains the configuration of the user-level
       VM monitor.  If you just want to test-run the VM,
       the default settings should be okay.

   6.  If you do not have the VGA font installed, you will need
       to install it first (you can check this by skipping to
       point 7, and checking whether it gives an error message).
       You will only have to do this once.  The VGA font resides in
       misc/vga.pcf.  In order to install it, you'll need to be root:

           user> su
           root> cp misc/vga.pcf X-font-path/misc
           root> compress X-font-path/vga.pcf
           root> mkfontdir X-font-path/misc
           root> xset fp rehash
           root> exit

       For X-font-path, substitute your X server's (or font server's)
       font path.  On many linux systems, for instance, this path is
       /usr/X11R6/lib/X11/fonts

   7.  You can now start up the VM by invoking the user program:

           user> cd user
           user> ./freemware

   8.  Whenever you recompile the kernel stuff, or want to get
       rid of the kernel module, remove the old kernel module first.
       As root:

           root> /sbin/rmmod freemware


Let us know whether it works for you !!!  The address of the
FreeMWare mailing list is freemware@fastxs.net.  Have a look
on http://www.freemware.org/ for details.
