UniNorth PCI bridge support
[qemu] / qemu-doc.texi
index 1f05606..5c44879 100644 (file)
@@ -37,8 +37,11 @@ to ease cross-compilation and cross-debugging.
 As QEMU requires no host kernel driver to run, it is very safe and
 easy to use.
 
-For system emulation, only the x86 PC emulator is currently
-usable. The PowerPC system emulator is being developped.
+For system emulation, the following hardware targets are supported:
+@itemize
+@item PC (x86 processor)
+@item PREP (PowerPC processor)
+@end itemize
 
 For user emulation, x86, PowerPC, ARM, and SPARC CPUs are supported.
 
@@ -58,7 +61,7 @@ tar zxvf /tmp/qemu-XXX-i386.tar.gz
 @end example
 
 @section Windows
-w
+
 @itemize
 @item Install the current versions of MSYS and MinGW from
 @url{http://www.mingw.org/}. You can find detailed installation
@@ -121,13 +124,13 @@ QEMU for Win32.
 
 Mac OS X is currently not supported.
 
-@chapter QEMU System emulator invocation
+@chapter QEMU PC System emulator invocation
 
 @section Introduction
 
 @c man begin DESCRIPTION
 
-The QEMU System emulator simulates a complete PC. 
+The QEMU System emulator simulates a complete PC.
 
 In order to meet specific user needs, two versions of QEMU are
 available:
@@ -193,7 +196,8 @@ General options:
 @table @option
 @item -fda file
 @item -fdb file
-Use @var{file} as floppy disk 0/1 image (@xref{disk_images}).
+Use @var{file} as floppy disk 0/1 image (@xref{disk_images}). You can
+use the host floppy by using @file{/dev/fd0} as filename.
 
 @item -hda file
 @item -hdb file
@@ -203,7 +207,8 @@ Use @var{file} as hard disk 0, 1, 2 or 3 image (@xref{disk_images}).
 
 @item -cdrom file
 Use @var{file} as CD-ROM image (you cannot use @option{-hdc} and and
-@option{-cdrom} at the same time).
+@option{-cdrom} at the same time). You can use the host CD-ROM by
+using @file{/dev/cdrom} as filename.
 
 @item -boot [a|c|d]
 Boot on floppy (a), hard disk (c) or CD-ROM (d). Hard disk boot is
@@ -228,6 +233,11 @@ command line application. The emulated serial port is redirected on
 the console. Therefore, you can still use QEMU to debug a Linux kernel
 with a serial console.
 
+@item -enable-audio
+
+The SB16 emulation is disabled by default as it may give problems with
+Windows. You can enable it manually with this option.
+
 @end table
 
 Network options:
@@ -235,23 +245,28 @@ Network options:
 @table @option
 
 @item -n script      
-Set network init script [default=/etc/qemu-ifup]. This script is
-launched to configure the host network interface (usually tun0)
+Set TUN/TAP network init script [default=/etc/qemu-ifup]. This script
+is launched to configure the host network interface (usually tun0)
 corresponding to the virtual NE2000 card.
 
-@item nics n
-Simulate @var{n} network interfaces (default=1).
-
 @item -macaddr addr   
 
 Set the mac address of the first interface (the format is
 aa:bb:cc:dd:ee:ff in hexa). The mac address is incremented for each
 new network interface.
 
-@item -tun-fd fd1,...
-Assumes @var{fd} talks to tap/tun and use it. Read
-@url{http://bellard.org/qemu/tetrinet.html} to have an example of its
-use.
+@item -tun-fd fd
+Assumes @var{fd} talks to a tap/tun host network interface and use
+it. Read @url{http://bellard.org/qemu/tetrinet.html} to have an
+example of its use.
+
+@item -user-net 
+(Experimental) Use the user mode network stack. This is the default if
+no tun/tap network init script is found.
+
+@item -dummy-net 
+Use the dummy network stack: no packet will be received on the network
+cards.
 
 @end table
 
@@ -278,26 +293,36 @@ Debug options:
 Wait gdb connection to port 1234 (@xref{gdb_usage}). 
 @item -p port
 Change gdb connection port.
+@item -S
+Do not start CPU at startup (you must type 'c' in the monitor).
 @item -d             
 Output log in /tmp/qemu.log
 @end table
 
+During the graphical emulation, you can use the following keys:
+@table @key
+@item Ctrl-Shift
+Toggle mouse and keyboard grab.
+@item Ctrl-Shift-f
+Toggle full screen
+@end table
+
 During emulation, if you are using the serial console, use @key{C-a h}
 to get terminal commands:
 
 @table @key
-@item C-a h
+@item Ctrl-a h
 Print this help
-@item C-a x    
+@item Ctrl-a x    
 Exit emulatior
-@item C-a s    
+@item Ctrl-a s    
 Save disk data back to file (if -snapshot)
-@item C-a b
+@item Ctrl-a b
 Send break (magic sysrq in Linux)
-@item C-a c
+@item Ctrl-a c
 Switch between console and monitor
-@item C-a C-a
-Send C-a
+@item Ctrl-a Ctrl-a
+Send Ctrl-a
 @end table
 @c man end
 
@@ -413,7 +438,9 @@ can be x (hexa), d (signed decimal), u (unsigned decimal), o (octal),
 c (char) or i (asm instruction).
 
 @item size
-can be b (8 bits), h (16 bits), w (32 bits) or g (64 bits)
+can be b (8 bits), h (16 bits), w (32 bits) or g (64 bits). On x86,
+@code{h} or @code{w} can be specified with the @code{i} format to
+respectively select 16 or 32 bit code instruction size.
 
 @end table
 
@@ -457,6 +484,17 @@ Dump 80 16 bit values at the start of the video memory.
 Print expression value. Only the @var{format} part of @var{fmt} is
 used.
 
+@item sendkey keys
+
+Send @var{keys} to the emulator. Use @code{-} to press several keys
+simultaneously. Example:
+@example
+sendkey ctrl-alt-f1
+@end example
+
+This command is useful to send keys that your graphical user interface
+intercepts at low level, such as @code{ctrl-alt-f1} in X Window.
+
 @end table
 
 @subsection Integer expressions
@@ -473,7 +511,7 @@ CPU registers by prefixing them with @emph{$}.
 The disk images can simply be raw images of the hard disk. You can
 create them with the command:
 @example
-dd if=/dev/zero of=myimage bs=1024 count=mysize
+dd of=myimage bs=1024 seek=mysize count=0
 @end example
 where @var{myimage} is the image filename and @var{mysize} is its size
 in kilobytes.
@@ -536,7 +574,67 @@ Since holes are used, the displayed size of the COW disk image is not
 the real one. To know it, use the @code{ls -ls} command.
 @end enumerate
 
-@section Direct Linux Boot and Network emulation
+@subsection Convert VMware disk images to raw disk images
+
+You can use the tool @file{vmdk2raw} to convert VMware disk images to
+raw disk images directly usable by QEMU. The syntax is:
+@example
+vmdk2raw vmware_image output_image
+@end example
+
+@section Network emulation
+
+QEMU simulates up to 6 networks cards (NE2000 boards). Each card can
+be connected to a specific host network interface.
+
+@subsection Using tun/tap network interface
+
+This is the standard way to emulate network. QEMU adds a virtual
+network device on your host (called @code{tun0}), and you can then
+configure it as if it was a real ethernet card.
+
+As an example, you can download the @file{linux-test-xxx.tar.gz}
+archive and copy the script @file{qemu-ifup} in @file{/etc} and
+configure properly @code{sudo} so that the command @code{ifconfig}
+contained in @file{qemu-ifup} can be executed as root. You must verify
+that your host kernel supports the TUN/TAP network interfaces: the
+device @file{/dev/net/tun} must be present.
+
+See @ref{direct_linux_boot} to have an example of network use with a
+Linux distribution.
+
+@subsection Using the user mode network stack
+
+By using the option @option{-user-net} or if you have no tun/tap init
+script, QEMU uses a completely user mode network stack (you don't need
+root priviledge to use the virtual network). The virtual network
+configuration is the following:
+
+@example
+
+QEMU Virtual Machine    <------>  Firewall/DHCP server <-----> Internet
+     (10.0.2.x)            |          (10.0.2.2)
+                           |
+                           ---->  DNS 
+                              (10.0.2.3)
+@end example
+
+The QEMU VM behaves as if it was behind a firewall which blocks all
+incoming connections. You can use a DHCP client to automatically
+configure the network in the QEMU VM.
+
+In order to check that the user mode network is working, you can ping
+the address 10.0.2.2 and verify that you got an address in the range
+10.0.2.x from the QEMU virtual DHCP server.
+
+Note that @code{ping} is not supported reliably to the internet as it
+would require root priviledges. It means you can only ping the local
+router (10.0.2.2).
+
+The user mode network is currently only supported on a Unix host.
+
+@node direct_linux_boot
+@section Direct Linux Boot
 
 This section explains how to launch a Linux kernel inside QEMU without
 having to make a full bootable image. It is very useful for fast Linux
@@ -802,6 +900,70 @@ Use @code{set architecture i8086} to dump 16 bit code. Then use
 @code{x/10i $cs*16+*eip} to dump the code at the PC position.
 @end enumerate
 
+@section Target OS specific information
+
+@subsection Linux
+
+To have access to SVGA graphic modes under X11, use the @code{vesa}
+X11 driver. For optimal performances, use the same depth as your
+native display.
+
+@subsection Windows
+
+If you have a slow host, using Windows 95 is better as it gives the
+best speed. Windows 2000 is also a good choice.
+
+SVGA graphic modes support: QEMU currently supports the Bochs VESA VBE
+extensions. It supports color depths of 8, 15, 16 and 32 bits per
+pixel in 640x480, 800x600 and 1024x768. For optimal performances, use
+the same depth as your native display.
+
+@itemize
+
+@item Windows XP: it should be automatically detected.
+
+@item Windows NT4 or 2000: use the driver
+@url{http://www.volny.cz/xnavara/qemuvid_bin.zip} by Filip Navara.
+
+@item Windows 95/98/Me: no clean solution yet (but it will change
+soon). You can however use the shareware driver from SciTech. Here are
+the steps recommended by Christophe Bothamy on the Bochs mailing list:
+
+@itemize
+@item install win95 with the VGA driver.
+@item download sdd 7 beta from @url{http://www.majorgeeks.com/download382.html}
+@item download pmhelp.vxd from @url{http://unununium.org/viewcvs/snap/redist/release/pmhelp.vxd}
+@item copy pmhelp.vxd to the win95 system directory
+@item install sdd7
+@end itemize
+@end itemize
+
+@chapter QEMU PREP PowerPC System emulator invocation
+
+Use the executable @file{qemu-system-ppc} to simulate a complete PREP
+PowerPC system.
+
+QEMU emulates the following PREP peripherials:
+
+@itemize @minus
+@item 
+2 IDE interfaces with hard disk and CD-ROM support
+@item
+Floppy disk
+@item 
+up to 6 NE2000 network adapters
+@item
+Serial port
+@item
+PREP Non Volatile RAM
+@end itemize
+
+You can read the qemu PC system emulation chapter to have more
+informations about QEMU usage.
+
+More information is available at
+@url{http://jocelyn.mayer.free.fr/qemu-ppc/}.
+
 @chapter QEMU User space emulator invocation
 
 @section Quick Start