doc update
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@990 c046a42c-6fe2-441c-8c8c-71466251a162
This commit is contained in:
parent
1bfe856eb2
commit
15a34c6364
279
qemu-doc.texi
279
qemu-doc.texi
|
@ -41,18 +41,19 @@ For system emulation, the following hardware targets are supported:
|
||||||
@itemize
|
@itemize
|
||||||
@item PC (x86 processor)
|
@item PC (x86 processor)
|
||||||
@item PREP (PowerPC processor)
|
@item PREP (PowerPC processor)
|
||||||
|
@item PowerMac (PowerPC processor, in progress)
|
||||||
@end itemize
|
@end itemize
|
||||||
|
|
||||||
For user emulation, x86, PowerPC, ARM, and SPARC CPUs are supported.
|
For user emulation, x86, PowerPC, ARM, and SPARC CPUs are supported.
|
||||||
|
|
||||||
@chapter Installation
|
@chapter Installation
|
||||||
|
|
||||||
|
If you want to compile QEMU yourself, see @ref{compilation}.
|
||||||
|
|
||||||
@section Linux
|
@section Linux
|
||||||
|
|
||||||
If you want to compile QEMU, please read the @file{README} which gives
|
Download the binary distribution (@file{qemu-XXX-i386.tar.gz}) and
|
||||||
the related information. Otherwise just download the binary
|
untar it as root in @file{/}:
|
||||||
distribution (@file{qemu-XXX-i386.tar.gz}) and untar it as root in
|
|
||||||
@file{/}:
|
|
||||||
|
|
||||||
@example
|
@example
|
||||||
su
|
su
|
||||||
|
@ -62,67 +63,13 @@ tar zxvf /tmp/qemu-XXX-i386.tar.gz
|
||||||
|
|
||||||
@section Windows
|
@section Windows
|
||||||
|
|
||||||
@itemize
|
Download the experimental binary installer at
|
||||||
@item Install the current versions of MSYS and MinGW from
|
@url{http://www.freeoszoo.org/download.php}.
|
||||||
@url{http://www.mingw.org/}. You can find detailed installation
|
|
||||||
instructions in the download section and the FAQ.
|
|
||||||
|
|
||||||
@item Download
|
|
||||||
the MinGW development library of SDL 1.2.x
|
|
||||||
(@file{SDL-devel-1.2.x-mingw32.tar.gz}) from
|
|
||||||
@url{http://www.libsdl.org}. Unpack it in a temporary place, and
|
|
||||||
unpack the archive @file{i386-mingw32msvc.tar.gz} in the MinGW tool
|
|
||||||
directory. Edit the @file{sdl-config} script so that it gives the
|
|
||||||
correct SDL directory when invoked.
|
|
||||||
|
|
||||||
@item Extract the current version of QEMU.
|
|
||||||
|
|
||||||
@item Start the MSYS shell (file @file{msys.bat}).
|
|
||||||
|
|
||||||
@item Change to the QEMU directory. Launch @file{./configure} and
|
|
||||||
@file{make}. If you have problems using SDL, verify that
|
|
||||||
@file{sdl-config} can be launched from the MSYS command line.
|
|
||||||
|
|
||||||
@item You can install QEMU in @file{Program Files/Qemu} by typing
|
|
||||||
@file{make install}. Don't forget to copy @file{SDL.dll} in
|
|
||||||
@file{Program Files/Qemu}.
|
|
||||||
|
|
||||||
@end itemize
|
|
||||||
|
|
||||||
@section Cross compilation for Windows with Linux
|
|
||||||
|
|
||||||
@itemize
|
|
||||||
@item
|
|
||||||
Install the MinGW cross compilation tools available at
|
|
||||||
@url{http://www.mingw.org/}.
|
|
||||||
|
|
||||||
@item
|
|
||||||
Install the Win32 version of SDL (@url{http://www.libsdl.org}) by
|
|
||||||
unpacking @file{i386-mingw32msvc.tar.gz}. Set up the PATH environment
|
|
||||||
variable so that @file{i386-mingw32msvc-sdl-config} can be launched by
|
|
||||||
the QEMU configuration script.
|
|
||||||
|
|
||||||
@item
|
|
||||||
Configure QEMU for Windows cross compilation:
|
|
||||||
@example
|
|
||||||
./configure --enable-mingw32
|
|
||||||
@end example
|
|
||||||
If necessary, you can change the cross-prefix according to the prefix
|
|
||||||
choosen for the MinGW tools with --cross-prefix. You can also use
|
|
||||||
--prefix to set the Win32 install path.
|
|
||||||
|
|
||||||
@item You can install QEMU in the installation directory by typing
|
|
||||||
@file{make install}. Don't forget to copy @file{SDL.dll} in the
|
|
||||||
installation directory.
|
|
||||||
|
|
||||||
@end itemize
|
|
||||||
|
|
||||||
Note: Currently, Wine does not seem able to launch
|
|
||||||
QEMU for Win32.
|
|
||||||
|
|
||||||
@section Mac OS X
|
@section Mac OS X
|
||||||
|
|
||||||
Mac OS X is currently not supported.
|
Download the experimental binary installer at
|
||||||
|
@url{http://www.freeoszoo.org/download.php}.
|
||||||
|
|
||||||
@chapter QEMU PC System emulator invocation
|
@chapter QEMU PC System emulator invocation
|
||||||
|
|
||||||
|
@ -138,11 +85,11 @@ available:
|
||||||
@enumerate
|
@enumerate
|
||||||
|
|
||||||
@item
|
@item
|
||||||
@code{qemu-fast} uses the host Memory Management Unit (MMU) to simulate
|
@code{qemu-fast} uses the host Memory Management Unit (MMU) to
|
||||||
the x86 MMU. It is @emph{fast} but has limitations because the whole 4 GB
|
simulate the x86 MMU. It is @emph{fast} but has limitations because
|
||||||
address space cannot be used and some memory mapped peripherials
|
the whole 4 GB address space cannot be used and some memory mapped
|
||||||
cannot be emulated accurately yet. Therefore, a specific Linux kernel
|
peripherials cannot be emulated accurately yet. Therefore, a specific
|
||||||
must be used (@xref{linux_compile}).
|
guest Linux kernel can be used (@xref{linux_compile}) as guest OS.
|
||||||
|
|
||||||
@item
|
@item
|
||||||
@code{qemu} uses a software MMU. It is about @emph{two times
|
@code{qemu} uses a software MMU. It is about @emph{two times
|
||||||
|
@ -154,21 +101,27 @@ QEMU emulates the following PC peripherials:
|
||||||
|
|
||||||
@itemize @minus
|
@itemize @minus
|
||||||
@item
|
@item
|
||||||
VGA (hardware level, including all non standard modes)
|
i440FX host PCI bridge and PIIX3 PCI to ISA bridge
|
||||||
|
@item
|
||||||
|
Cirrus CLGD 5446 PCI VGA card or dummy VGA card with Bochs VESA
|
||||||
|
extensions (hardware level, including all non standard modes).
|
||||||
@item
|
@item
|
||||||
PS/2 mouse and keyboard
|
PS/2 mouse and keyboard
|
||||||
@item
|
@item
|
||||||
2 IDE interfaces with hard disk and CD-ROM support
|
2 PCI IDE interfaces with hard disk and CD-ROM support
|
||||||
@item
|
@item
|
||||||
Floppy disk
|
Floppy disk
|
||||||
@item
|
@item
|
||||||
up to 6 NE2000 network adapters
|
NE2000 PCI network adapters
|
||||||
@item
|
@item
|
||||||
Serial port
|
Serial port
|
||||||
@item
|
@item
|
||||||
Soundblaster 16 card
|
Soundblaster 16 card
|
||||||
@end itemize
|
@end itemize
|
||||||
|
|
||||||
|
QEMU uses the PC BIOS from the Bochs project and the Plex86/Bochs LGPL
|
||||||
|
VGA BIOS.
|
||||||
|
|
||||||
@c man end
|
@c man end
|
||||||
|
|
||||||
@section Quick Start
|
@section Quick Start
|
||||||
|
@ -220,7 +173,7 @@ the raw disk image you use is not written back. You can however force
|
||||||
the write back by pressing @key{C-a s} (@xref{disk_images}).
|
the write back by pressing @key{C-a s} (@xref{disk_images}).
|
||||||
|
|
||||||
@item -m megs
|
@item -m megs
|
||||||
Set virtual RAM size to @var{megs} megabytes.
|
Set virtual RAM size to @var{megs} megabytes. Default is 128 MB.
|
||||||
|
|
||||||
@item -initrd file
|
@item -initrd file
|
||||||
Use @var{file} as initial ram disk.
|
Use @var{file} as initial ram disk.
|
||||||
|
@ -238,6 +191,11 @@ with a serial console.
|
||||||
The SB16 emulation is disabled by default as it may give problems with
|
The SB16 emulation is disabled by default as it may give problems with
|
||||||
Windows. You can enable it manually with this option.
|
Windows. You can enable it manually with this option.
|
||||||
|
|
||||||
|
@item -localtime
|
||||||
|
Set the real time clock to local time (the default is to UTC
|
||||||
|
time). This option is needed to have correct date in MS-DOS or
|
||||||
|
Windows.
|
||||||
|
|
||||||
@end table
|
@end table
|
||||||
|
|
||||||
Network options:
|
Network options:
|
||||||
|
@ -261,11 +219,11 @@ it. Read @url{http://bellard.org/qemu/tetrinet.html} to have an
|
||||||
example of its use.
|
example of its use.
|
||||||
|
|
||||||
@item -user-net
|
@item -user-net
|
||||||
(Experimental) Use the user mode network stack. This is the default if
|
Use the user mode network stack. This is the default if no tun/tap
|
||||||
no tun/tap network init script is found.
|
network init script is found.
|
||||||
|
|
||||||
@item -dummy-net
|
@item -dummy-net
|
||||||
Use the dummy network stack: no packet will be received on the network
|
Use the dummy network stack: no packet will be received by the network
|
||||||
cards.
|
cards.
|
||||||
|
|
||||||
@end table
|
@end table
|
||||||
|
@ -287,7 +245,7 @@ Use @var{file} as initial ram disk.
|
||||||
|
|
||||||
@end table
|
@end table
|
||||||
|
|
||||||
Debug options:
|
Debug/Expert options:
|
||||||
@table @option
|
@table @option
|
||||||
@item -s
|
@item -s
|
||||||
Wait gdb connection to port 1234 (@xref{gdb_usage}).
|
Wait gdb connection to port 1234 (@xref{gdb_usage}).
|
||||||
|
@ -297,6 +255,12 @@ Change gdb connection port.
|
||||||
Do not start CPU at startup (you must type 'c' in the monitor).
|
Do not start CPU at startup (you must type 'c' in the monitor).
|
||||||
@item -d
|
@item -d
|
||||||
Output log in /tmp/qemu.log
|
Output log in /tmp/qemu.log
|
||||||
|
@item -isa
|
||||||
|
Simulate an ISA-only system (default is PCI system).
|
||||||
|
@item -std-vga
|
||||||
|
Simulate a standard VGA card with Bochs VBE extensions (default is
|
||||||
|
Cirrus Logic GD5446 PCI VGA)
|
||||||
|
|
||||||
@end table
|
@end table
|
||||||
|
|
||||||
During the graphical emulation, you can use the following keys:
|
During the graphical emulation, you can use the following keys:
|
||||||
|
@ -495,6 +459,10 @@ sendkey ctrl-alt-f1
|
||||||
This command is useful to send keys that your graphical user interface
|
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.
|
intercepts at low level, such as @code{ctrl-alt-f1} in X Window.
|
||||||
|
|
||||||
|
@item system_reset
|
||||||
|
|
||||||
|
Reset the system.
|
||||||
|
|
||||||
@end table
|
@end table
|
||||||
|
|
||||||
@subsection Integer expressions
|
@subsection Integer expressions
|
||||||
|
@ -904,63 +872,93 @@ Use @code{set architecture i8086} to dump 16 bit code. Then use
|
||||||
|
|
||||||
@subsection Linux
|
@subsection Linux
|
||||||
|
|
||||||
To have access to SVGA graphic modes under X11, use the @code{vesa}
|
To have access to SVGA graphic modes under X11, use the @code{vesa} or
|
||||||
X11 driver. For optimal performances, use the same depth as your
|
the @code{cirrus} X11 driver. For optimal performances, use 16 bit
|
||||||
native display.
|
color depth in the guest and the host OS.
|
||||||
|
|
||||||
@subsection Windows
|
@subsection Windows
|
||||||
|
|
||||||
If you have a slow host, using Windows 95 is better as it gives the
|
If you have a slow host, using Windows 95 is better as it gives the
|
||||||
best speed. Windows 2000 is also a good choice.
|
best speed. Windows 2000 is also a good choice.
|
||||||
|
|
||||||
SVGA graphic modes support: QEMU currently supports the Bochs VESA VBE
|
SVGA graphic modes support: QEMU emulates a Cirrus Logic GD5446 Video
|
||||||
extensions. It supports color depths of 8, 15, 16 and 32 bits per
|
card. All Windows versions starting from Windows 95 should recognize
|
||||||
pixel in 640x480, 800x600 and 1024x768. For optimal performances, use
|
and use this graphic card. For optimal performances, use 16 bit color
|
||||||
the same depth as your native display.
|
depth in the guest and the host OS.
|
||||||
|
|
||||||
@itemize
|
CPU usage reduction: Windows 9x does not correctly use the CPU HLT
|
||||||
|
instruction. The result is that it takes host CPU cycles even when
|
||||||
|
idle. You can install the utility from
|
||||||
|
@url{http://www.user.cityline.ru/~maxamn/amnhltm.zip} to solve this
|
||||||
|
problem. Note that no such tool is needed for NT, 2000 or XP.
|
||||||
|
|
||||||
@item Windows XP: it should be automatically detected.
|
@chapter QEMU PowerPC System emulator invocation
|
||||||
|
|
||||||
@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
|
Use the executable @file{qemu-system-ppc} to simulate a complete PREP
|
||||||
PowerPC system.
|
or PowerMac PowerPC system.
|
||||||
|
|
||||||
|
QEMU emulates the following PowerMac peripherials:
|
||||||
|
|
||||||
|
@itemize @minus
|
||||||
|
@item
|
||||||
|
UniNorth PCI Bridge
|
||||||
|
@item
|
||||||
|
PCI VGA compatible card with VESA Bochs Extensions
|
||||||
|
@item
|
||||||
|
2 PMAC IDE interfaces with hard disk and CD-ROM support
|
||||||
|
@item
|
||||||
|
NE2000 PCI adapters
|
||||||
|
@item
|
||||||
|
Non Volatile RAM
|
||||||
|
@item
|
||||||
|
VIA-CUDA with ADB keyboard and mouse.
|
||||||
|
@end itemize
|
||||||
|
|
||||||
QEMU emulates the following PREP peripherials:
|
QEMU emulates the following PREP peripherials:
|
||||||
|
|
||||||
@itemize @minus
|
@itemize @minus
|
||||||
@item
|
@item
|
||||||
|
PCI Bridge
|
||||||
|
@item
|
||||||
|
PCI VGA compatible card with VESA Bochs Extensions
|
||||||
|
@item
|
||||||
2 IDE interfaces with hard disk and CD-ROM support
|
2 IDE interfaces with hard disk and CD-ROM support
|
||||||
@item
|
@item
|
||||||
Floppy disk
|
Floppy disk
|
||||||
@item
|
@item
|
||||||
up to 6 NE2000 network adapters
|
NE2000 network adapters
|
||||||
@item
|
@item
|
||||||
Serial port
|
Serial port
|
||||||
@item
|
@item
|
||||||
PREP Non Volatile RAM
|
PREP Non Volatile RAM
|
||||||
|
@item
|
||||||
|
PC compatible keyboard and mouse.
|
||||||
@end itemize
|
@end itemize
|
||||||
|
|
||||||
|
QEMU uses the Open Hack'Ware Open Firmware Compatible BIOS available at
|
||||||
|
@url{http://site.voila.fr/jmayer/OpenHackWare/index.htm}.
|
||||||
|
|
||||||
You can read the qemu PC system emulation chapter to have more
|
You can read the qemu PC system emulation chapter to have more
|
||||||
informations about QEMU usage.
|
informations about QEMU usage.
|
||||||
|
|
||||||
|
@c man begin OPTIONS
|
||||||
|
|
||||||
|
The following options are specific to the PowerPC emulation:
|
||||||
|
|
||||||
|
@table @option
|
||||||
|
|
||||||
|
@item -prep
|
||||||
|
Simulate a PREP system (default is PowerMAC)
|
||||||
|
|
||||||
|
@item -g WxH[xDEPTH]
|
||||||
|
|
||||||
|
Set the initial VGA graphic mode. The default is 800x600x15.
|
||||||
|
|
||||||
|
@end table
|
||||||
|
|
||||||
|
@c man end
|
||||||
|
|
||||||
|
|
||||||
More information is available at
|
More information is available at
|
||||||
@url{http://jocelyn.mayer.free.fr/qemu-ppc/}.
|
@url{http://jocelyn.mayer.free.fr/qemu-ppc/}.
|
||||||
|
|
||||||
|
@ -1065,3 +1063,76 @@ Activate log (logfile=/tmp/qemu.log)
|
||||||
Act as if the host page size was 'pagesize' bytes
|
Act as if the host page size was 'pagesize' bytes
|
||||||
@end table
|
@end table
|
||||||
|
|
||||||
|
@node compilation
|
||||||
|
@chapter Compilation from the sources
|
||||||
|
|
||||||
|
@section Linux/BSD
|
||||||
|
|
||||||
|
Read the @file{README} which gives the related information.
|
||||||
|
|
||||||
|
@section Windows
|
||||||
|
|
||||||
|
@itemize
|
||||||
|
@item Install the current versions of MSYS and MinGW from
|
||||||
|
@url{http://www.mingw.org/}. You can find detailed installation
|
||||||
|
instructions in the download section and the FAQ.
|
||||||
|
|
||||||
|
@item Download
|
||||||
|
the MinGW development library of SDL 1.2.x
|
||||||
|
(@file{SDL-devel-1.2.x-mingw32.tar.gz}) from
|
||||||
|
@url{http://www.libsdl.org}. Unpack it in a temporary place, and
|
||||||
|
unpack the archive @file{i386-mingw32msvc.tar.gz} in the MinGW tool
|
||||||
|
directory. Edit the @file{sdl-config} script so that it gives the
|
||||||
|
correct SDL directory when invoked.
|
||||||
|
|
||||||
|
@item Extract the current version of QEMU.
|
||||||
|
|
||||||
|
@item Start the MSYS shell (file @file{msys.bat}).
|
||||||
|
|
||||||
|
@item Change to the QEMU directory. Launch @file{./configure} and
|
||||||
|
@file{make}. If you have problems using SDL, verify that
|
||||||
|
@file{sdl-config} can be launched from the MSYS command line.
|
||||||
|
|
||||||
|
@item You can install QEMU in @file{Program Files/Qemu} by typing
|
||||||
|
@file{make install}. Don't forget to copy @file{SDL.dll} in
|
||||||
|
@file{Program Files/Qemu}.
|
||||||
|
|
||||||
|
@end itemize
|
||||||
|
|
||||||
|
@section Cross compilation for Windows with Linux
|
||||||
|
|
||||||
|
@itemize
|
||||||
|
@item
|
||||||
|
Install the MinGW cross compilation tools available at
|
||||||
|
@url{http://www.mingw.org/}.
|
||||||
|
|
||||||
|
@item
|
||||||
|
Install the Win32 version of SDL (@url{http://www.libsdl.org}) by
|
||||||
|
unpacking @file{i386-mingw32msvc.tar.gz}. Set up the PATH environment
|
||||||
|
variable so that @file{i386-mingw32msvc-sdl-config} can be launched by
|
||||||
|
the QEMU configuration script.
|
||||||
|
|
||||||
|
@item
|
||||||
|
Configure QEMU for Windows cross compilation:
|
||||||
|
@example
|
||||||
|
./configure --enable-mingw32
|
||||||
|
@end example
|
||||||
|
If necessary, you can change the cross-prefix according to the prefix
|
||||||
|
choosen for the MinGW tools with --cross-prefix. You can also use
|
||||||
|
--prefix to set the Win32 install path.
|
||||||
|
|
||||||
|
@item You can install QEMU in the installation directory by typing
|
||||||
|
@file{make install}. Don't forget to copy @file{SDL.dll} in the
|
||||||
|
installation directory.
|
||||||
|
|
||||||
|
@end itemize
|
||||||
|
|
||||||
|
Note: Currently, Wine does not seem able to launch
|
||||||
|
QEMU for Win32.
|
||||||
|
|
||||||
|
@section Mac OS X
|
||||||
|
|
||||||
|
The Mac OS X patches are not fully merged in QEMU, so you should look
|
||||||
|
at the QEMU mailing list archive to have all the necessary
|
||||||
|
information.
|
||||||
|
|
||||||
|
|
|
@ -258,7 +258,7 @@ segment base.
|
||||||
|
|
||||||
@section Translation cache
|
@section Translation cache
|
||||||
|
|
||||||
A 2MByte cache holds the most recently used translations. For
|
A 16 MByte cache holds the most recently used translations. For
|
||||||
simplicity, it is completely flushed when it is full. A translation unit
|
simplicity, it is completely flushed when it is full. A translation unit
|
||||||
contains just a single basic block (a block of x86 instructions
|
contains just a single basic block (a block of x86 instructions
|
||||||
terminated by a jump or by a virtual CPU state change which the
|
terminated by a jump or by a virtual CPU state change which the
|
||||||
|
@ -489,19 +489,6 @@ This program tests various Linux system calls. It is used to verify
|
||||||
that the system call parameters are correctly converted between target
|
that the system call parameters are correctly converted between target
|
||||||
and host CPUs.
|
and host CPUs.
|
||||||
|
|
||||||
@section @file{hello-i386}
|
@section @file{qruncom.c}
|
||||||
|
|
||||||
Very simple statically linked x86 program, just to test QEMU during a
|
|
||||||
port to a new host CPU.
|
|
||||||
|
|
||||||
@section @file{hello-arm}
|
|
||||||
|
|
||||||
Very simple statically linked ARM program, just to test QEMU during a
|
|
||||||
port to a new host CPU.
|
|
||||||
|
|
||||||
@section @file{sha1}
|
|
||||||
|
|
||||||
It is a simple benchmark. Care must be taken to interpret the results
|
|
||||||
because it mostly tests the ability of the virtual CPU to optimize the
|
|
||||||
@code{rol} x86 instruction and the condition code computations.
|
|
||||||
|
|
||||||
|
Example of usage of @code{libqemu} to emulate a user mode i386 CPU.
|
||||||
|
|
Reference in New Issue