VMMMIX is the MMIX virtual machine. It has console, HDD and Ethernet I/Os. Currently, this virtual machine runs on Windows only. And Linux runs on this MMIX virtual machine. While porting Linux to vmmmix, I encountered a problem. I couldn't solve this problem under MMIX architecture. So, I made dirty hack to MMIX architecture.

One day, I got a book about the MMIX - "The Art of Computer Porgramming, Volume 1 Fascicle 1: MMIX -- A RISC Computer for the New Millennium". I was inspired by this book to write some program for MMIX. Finally, I decided to port linux to MMIX and began to write programs. At this time, there are still unimplemented functions, inefficient codes, duplicate codes, misunderstandings and bugs. But fixing these problems requires long time, so I deciede to release vmmmix with these problems. Now, I'm planning to fix these problems step by step. Next release will support setjmp/longjmp and signal functionality, and /sbin/init will be run. If I have a lot of time, next relese will be done few month after, but if not, it will take more time.

If you simply try to use vmmmix, download and extract this zip file (vmmmix-20110410.zip). In command prompt, 'cd' to directory where you extract vmmmix and type following command. This boots up linux.
C:\>vmmmix.exe vmlinux.bin root=/dev/hda1 -d hdd.img

If you have interest in vmmmix implementaion, source codes and cross compiler are available. After reading my programs, if you got some useful ideas, please inform me.


Click here to download vmmmix source codes (vmmmix.src-20091231.zip). If you want to use ethernet with vmmmix, WinPcap is required. Version 3.1 and 4.0.2 are tested.

Command line syntax:
C:\>vmmmix kerne-image "kernel command line" -d hdd-image -e XX:XX:XX:XX:XX:XX -i N
hdd-image is virtural disk image file.
"XX:XX:XX:XX:XX:XX" is ethernet MAC address.
"N" is interface number.
If you specify -e and omit -i option, then vmmmix lists available interfaces with interface number.

MMIX C Cross Compiler

To build kernel and commands, binutils and gcc is needed. Here are install instructions. After extracting binutils source, apply this patch (binutils-2.18-mmix-20080825.patch). And, after extracting gcc source, apply this patch (gcc-4.3.1-mmix-20110410.patch).

Linux kernel

Kernel is based on linux-2.6.18, and configured with ROOT NFS support. Click here to download patch (linux-2.6.18-mmix-20091231.patch.gz).


To build commands, glibc is required.

How to install glibc:

  1. Download and extract glibc-2.7 source.
  2. Apply patch (glibc-2.7-mmix-20080826.patch). This patch enables mmix-linux support.
  3. Configure with these options.
    /path/to/glibc-2.7/configure --host=mmix --prefix=</path/to/gcc/install>/mmix --disable-shared \
        --with-headers=</path/to/gcc/install>/lib/gcc/mmix/3.4.1/include-fixed:</path/to/linux/extracted/directory>/include \
        ac_cv_type_long_double=8 CFLAGS="-O2 -melf"

    If include/asm directory is mssing in the linux source directory, make symbolic link to include/asm-mmix as include/asm.
  4. make and install with following options.
    install biarch=64 prefix=</path/to/gcc/install>/mmix-linux
  5. Remove or rename include and library directory in the <path/to/gcc/install>/mmix directory.
  6. Copy include and library directory in the </path/to/gcc/install>/mmix-linux to the <path/to/gcc/install>/mmix directory or make symbolic link.
  7. Create symbolic links to kernel header in the <path/to/gcc/install>/mmix directory with following commands.
    ln -s </path/to/linux/extracted/directory>/include/linux <path/to/gcc/install>/mmix/include/linux
    ln -s </path/to/linux/extracted/directory>/include/asm-generic <path/to/gcc/install>/mmix/include/asm-generic
    ln -s </path/to/linux/extracted/directory>/include/asm-mmix <path/to/gcc/install>/mmix/include/asm
  8. Put this specs into </path/to/gcc/install>/lib/gcc/mmix/3.4.1 directory.

Linux Commands

To builds linux commands, specify '--host=mmix' option to 'configure' command.

Current Status

Studying gcc to support shared library.


  • 2011-05-30: Change the implementation of SAVE/UNSAVE instructions.
  • 2011-04-11: gcc setjmp/longjmp bug fix.
  • 2009-04-27: bug fix.
  • 2008-08-27: Initial Release.

  • Home