/[gxemul]/trunk/man/gxemul.1
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Annotation of /trunk/man/gxemul.1

Parent Directory Parent Directory | Revision Log Revision Log


Revision 6 - (hide annotations)
Mon Oct 8 16:18:11 2007 UTC (16 years, 6 months ago) by dpavlin
File size: 11712 byte(s)
++ trunk/HISTORY	(local)
$Id: HISTORY,v 1.772 2005/06/04 12:02:16 debug Exp $
20050428	Disabling the "-fmove-all-movables" option in the configure
		script, because it causes the compile to fail on OpenBSD/sgi.
20050502	Minor updates.
20050503	Removing the WRT54G mode (it was bogus anyway), and adding a
		comment about Windows NT for MIPS in doc/experiments.html.
		Minor updates to the x86 instruction decoding.
20050504	Adding some more x86 instructions.
		Adding support for reading files from ISO9660 CDROMs (including
		gzipped files). It's an ugly hack, but it seems to work.
		Various other minor updates (dev_vga.c, pc_bios.c etc).
20050505	Some more x86-related updates.
		Beginning (what I hope will be) a major code cleanup phase.
		"bootris" (an x86 bootsector) runs :-)
20050506	Adding some more x86 instructions.
20050507	tmpnam => mkstemp.
		Working on a hack to allow VGA charcells to be shown even when
		not running with X11.
		Adding more x86 instructions.
20050508	x86 32-bit SIB addressing fix, and more instructions.
20050509	Adding more x86 instructions.
20050510	Minor documentation updates, and other updates (x86 stuff etc.)
20050511	More x86-related updates.
20050513	Various updates, mostly x86-related. (Trying to fix flag 
		calculation, factoring out the ugly shift/rotate code, and
		some other things.)
20050514	Adding support for loading some old i386 a.out executables.
		Finally beginning the cleanup of machine/PROM/bios dependant
		info.
		Some minor documentation updates.
		Trying to clean up ARCBIOS stuff a little.
20050515	Trying to make it possible to actually use more than one disk
		type per machine (floppy, ide, scsi).
		Trying to clean up the kbd vs PROM console stuff. (For PC and
		ARC emulation modes, mostly.)
		Beginning to add an 8259 interrupt controller, and connecting
		it to the x86 emulation.
20050516	The first x86 interrupts seem to work (keyboard stuff).
		Adding a 8253/8254 programmable interval timer skeleton.
		FreeDOS now reaches a command prompt and can be interacted
		with.
20050517	After some bugfixes, MS-DOS also (sometimes) reaches a
		command prompt now.
		Trying to fix the pckbc to work with MS-DOS' keyb.com, but no
		success yet.
20050518	Adding a simple 32-bit x86 MMU skeleton.
20050519	Some more work on the x86 stuff. (Beginning the work on paging,
		and various other fixes).
20050520	More updates. Working on dev_vga (4-bit graphics modes), adding
		40 columns support to the PC bios emulation.
		Trying to add support for resizing windows when switching
		between graphics modes.
20050521	Many more x86-related updates.
20050522	Correcting the initial stack pointer's sign-extension for
		ARCBIOS emulation (thanks to Alec Voropay for noticing the
		error).
		Continuing on the cleanup (ARCBIOS etc).
		dev_vga updates.
20050523	More x86 updates: trying to add some support for protected mode
		interrupts (via gate descriptors) and many other fixes.
		More ARCBIOS cleanup.
		Adding a device flag which indicates that reads cause no
		side-effects. (Useful for the "dump" command in the debugger,
		and other things.)
		Adding support for directly starting up x86 ELFs, skipping the
		bootloader stage. (Most ELFs, however, are not suitable for
		this.)
20050524	Adding simple 32-bit x86 TSS task switching, but no privilege
		level support yet.
		More work on dev_vga. A small "Copper bars" demo works. :-)
		Adding support for Trap Flag (single-step exceptions), at least
		in real mode, and various other x86-related fixes.
20050525	Adding a new disk image prefix (gH;S;) which can be used to
		override the default nr of heads and sectors per track.
20050527	Various bug fixes, more work on the x86 mode (stack change on
		interrupts between different priv.levels), and some minor
		documentation updates.
20050528	Various fixes (x86 stuff).
20050529	More x86 fixes. An OpenBSD/i386 bootfloppy reaches userland
		and can be interacted with (although there are problems with
		key repetition). NetBSD/i386 triggers a serious CISC-related
		problem: instruction fetches across page boundaries, where
		the later part isn't actually part of the instruction.
20050530	Various minor updates. (Documentation updates, etc.)
20050531	Adding some experimental code (experiments/new_test_*) which
		could be useful for dynamic (but not binary) translation in
		the future.
20050602	Adding a dummy ARM skeleton.
		Fixing the pckbc key repetition problem (by adding release
		scancodes for all keypresses).
20050603	Minor updates for the next release.
20050604	Release testing. Minor updates.

==============  RELEASE 0.3.3  ==============

20050604	There'll probably be a 0.3.3.1 release soon, with some very
		very tiny updates.


1 dpavlin 6 .\" $Id: gxemul.1,v 1.21 2005/06/03 23:14:52 debug Exp $
2 dpavlin 2 .\"
3     .\" Copyright (C) 2004-2005 Anders Gavare. All rights reserved.
4     .\"
5     .\" Redistribution and use in source and binary forms, with or without
6     .\" modification, are permitted provided that the following conditions are met:
7     .\"
8     .\" 1. Redistributions of source code must retain the above copyright
9     .\" notice, this list of conditions and the following disclaimer.
10     .\" 2. Redistributions in binary form must reproduce the above copyright
11     .\" notice, this list of conditions and the following disclaimer in the
12     .\" documentation and/or other materials provided with the distribution.
13     .\" 3. The name of the author may not be used to endorse or promote products
14     .\" derived from this software without specific prior written permission.
15     .\"
16     .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
17     .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18     .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19     .\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
20     .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21     .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
22     .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23     .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24     .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25     .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26     .\" SUCH DAMAGE.
27     .\"
28     .\"
29     .\" This is a minimal man page for GXemul. Process this file with
30     .\" groff -man -Tascii gxemul.1 or nroff -man gxemul.1
31     .\"
32 dpavlin 6 .Dd JUNE 2005
33 dpavlin 2 .Dt GXEMUL 1
34     .Os
35     .Sh NAME
36     .Nm gxemul
37     .Nd an experimental machine emulator
38     .Sh SYNOPSIS
39     .Nm
40     .Op machine, other, and general options
41     .Op file Ar ...
42     .Nm
43     .Op general options
44     .Op Ar @configfile ...
45     .Nm
46     .Op userland, other, and general options
47     .Ar file Op Ar args ...
48     .Sh DESCRIPTION
49     .Nm
50     is an experimental instruction-level machine emulator. It can be used
51     to run binary code for (among others) MIPS-based machines.
52     Several emulation modes are available. For some emulation modes, processors
53     and surrounding hardware components are emulated well enough to let
54 dpavlin 6 unmodified operating systems (eg. NetBSD) run as if they were running on a
55 dpavlin 2 real machine.
56     .Pp
57     There are three ways to invoke the emulator. When emulating a
58     complete machine, settings can be entered directly on the command line, or
59     they can be read from a configuration file. When emulating a userland
60     environment (syscall-only emulation, not emulating complete machines),
61     then the program name and its argument should be given on the command
62     line.
63     .Pp
64     The easiest way to use the emulator is to supply settings directly on the
65     command line. The most important thing you need to supply is the
66     file argument. This is the name of a binary file (an ELF, a.out, ECOFF,
67     SREC, or a raw binary image) which you wish to run in the emulator. This file
68     might be an operating system kernel, or perhaps a ROM image file.
69     .Pp
70     If more than one filename is supplied, all files are loaded into memory,
71     and the entry point (if available) is taken from the last file.
72     .Pp
73     Apart from the name of a binary file, it is also necessary to select
74     which specific emulation mode to use. For example, a MIPS-based machine
75     from DEC (a DECstation) is very different from a MIPS-based machine
76     from SGI. Use
77     .Nm
78     .Fl H
79     to get a list of available emulation modes.
80     .Pp
81 dpavlin 6 There are two exceptions to the normal invocation usage mentioned above.
82     The first is for DECstation emulation: if you have a bootable
83 dpavlin 2 DECstation harddisk or CDROM image, then just supplying the diskimage via
84     the
85     .Fl d
86 dpavlin 6 option is sufficient. (The filename of the kernel can then be
87 dpavlin 2 skipped, as the emulator runs the bootblocks from the diskimage directly and
88     doesn't need the kernel as a separate file.)
89 dpavlin 6 The second is if you supply an ISO9660 CDROM disk image. You may then use
90     the
91     .Fl j
92     option to indicate which file on the CDROM filesystem that should be
93     loaded into emulated memory.
94 dpavlin 2 .Pp
95     Machine selection options:
96     .Bl -tag -width Ds
97     .It Fl E Ar t
98     Try to emulate machine type
99     .Ar "t".
100     (Use
101     .Fl H
102     to get a list of types.)
103     .It Fl e Ar st
104     Try to emulate machine subtype
105     .Ar "st".
106     Use this together with
107     .Fl E .
108     (This option is not always needed, if a machine type has no subtypes.)
109     .El
110     .Pp
111     Other options:
112     .Bl -tag -width Ds
113     .It Fl B
114     Disable dynamic binary translation completely. By default, bintrans
115     will be turned on if the host architecture supports it.
116 dpavlin 6 However, in this release (0.3.X), there is no new bintrans system.
117 dpavlin 2 If you want to enable binary translation, use
118     .Fl "b".
119     .It Fl b
120     Use the OLD binary translation subsystem. (Alpha and i386 hosts only.)
121     .It Fl C Ar x
122     Try to emulate a specific CPU type,
123     .Ar "x".
124     This overrides the default CPU type for the machine being emulated.
125     (Use
126     .Fl H
127     to get a list of available CPU types.)
128     .It Fl d Ar name
129     Add
130     .Ar name
131     as a disk image. By adding one or more modifier characters and then a
132     colon (":") as a prefix to
133     .Ar "name",
134 dpavlin 6 you can modify the way the disk image is treated. Available modifiers are:
135 dpavlin 2 .Bl -tag -width Ds
136     .It b
137     Specifies that this is a boot device.
138     .It c
139 dpavlin 4 CD-ROM.
140 dpavlin 2 .It d
141 dpavlin 4 DISK (this is the default).
142     .It f
143     FLOPPY.
144 dpavlin 6 .It gH;S;
145     Override the default geometry; use H heads and S sectors-per-track.
146     (The number of cylinders is calculated automatically.)
147 dpavlin 2 .It i
148 dpavlin 4 IDE.
149 dpavlin 2 .It r
150     Read-only (don't allow changes to be written to the file).
151 dpavlin 4 .It s
152     SCSI (this is the default for most machine types).
153 dpavlin 2 .It t
154 dpavlin 4 Tape.
155 dpavlin 2 .It 0-7
156 dpavlin 6 Force a specific ID number.
157 dpavlin 2 .El
158     .Pp
159 dpavlin 6 Unless otherwise specified, filenames ending with ".iso" are assumed to be
160     CDROM images. Most others are assumed to be disks. Depending on which
161     machine is being emulated, the default for disks can be either SCSI or
162     IDE. Some disk images that are very small are assumed to be floppy disks.
163     (If you are not happy with the way a disk image is detected, then you need
164     to use explicit prefixes to force a specific type.)
165     .Pp
166     For floppies, the gH;S; prefix is ignored. Instead, the number of
167     heads and cylinders are assumed to be 2 and 80, respectively, and the
168     number of sectors per track is calculated automatically. (This works for
169     720KB, 1.2MB, 1.44MB, and 2.88MB floppies.)
170 dpavlin 2 .It Fl I Ar x
171     Emulate clock interrupts at
172     .Ar x
173     Hz. (This affects emulated clock devices only, not actual runtime speed.
174     This disables automatic clock adjustments, which is otherwise turned on.)
175     (This option is probably only valid for DECstation emulation.)
176     .It Fl i
177     Display each instruction as it is being executed.
178     .It Fl J
179     Disable some speed tricks.
180     .It Fl j Ar n
181     Set the name of the kernel to
182     .Ar "n".
183 dpavlin 6 When booting from an ISO9660 filesystem, the kernel will try to boot from
184     this file. (In some emulation modes, eg. DECstation, this name is passed
185     along to the boot program. Useful names are "bsd" for OpenBSD/pmax,
186     or "vmunix" for Ultrix.)
187 dpavlin 2 .It Fl M Ar m
188     Emulate
189     .Ar m
190     MBs of physical RAM. This overrides the default amount of RAM for the
191     selected machine type.
192     .It Fl m Ar nr
193     Run at most
194     .Ar nr
195     instructions (on any cpu).
196     .It Fl N
197     Display nr of instructions/second average, at regular intervals.
198     .It Fl n Ar nr
199     Set nr of CPUs (for SMP experiments).
200     .It Fl O
201     Force a "netboot" (tftp instead of disk), even when a disk image is
202     present (for DECstation, SGI, and ARC emulation).
203     .It Fl o Ar arg
204     Set the boot argument (for DEC, ARC, or SGI emulation).
205     Default
206     .Ar arg
207 dpavlin 6 for DEC is "-a", for ARC "-aN".
208 dpavlin 2 .It Fl p Ar pc
209 dpavlin 6 Add a breakpoint. (Remember to use the "0x" prefix for hex.)
210 dpavlin 2 .It Fl Q
211     Disable the built-in PROM emulation. This is useful for running raw ROM
212     images from real machines.
213     .It Fl R
214     Use a random bootstrap cpu, instead of CPU nr 0. (For SMP experiments.)
215     .It Fl r
216     Dump register contents for every executed instruction.
217     .It Fl S
218     Initialize the emulated RAM to random data, instead of zeroes.
219     .It Fl T
220     Enter the single-step debugger on unimplemented memory accesses.
221     .It Fl t
222     Show a trace tree of all function calls being made.
223     .It Fl U
224     Enable slow_serial_interrupts_hack_for_linux.
225     .It Fl X
226     Use X11.
227     .It Fl x
228     Open up new xterms for emulated serial ports. (Default is to open up
229     xterms when using configuration files, but not when starting an
230     emulation with settings directly on the command line.)
231     .It Fl Y Ar n
232     Scale down framebuffer windows by
233     .Ar n
234     x
235     .Ar n
236     times.
237     .It Fl y Ar x
238     Set max_random_cycles_per_chunk to
239     .Ar x
240     (experimental).
241     .It Fl Z Ar n
242     Set the number of graphics cards, for emulating a dual-head or tripple-head
243     environment. (Only for DECstation emulation so far.)
244     .It Fl z Ar disp
245     Add
246     .Ar disp
247     as an X11 display to use for framebuffers.
248     .El
249     .Pp
250     Userland options:
251     .Bl -tag -width Ds
252     .It Fl u Ar emul-mode
253     Userland-only (syscall) emulation. (Use
254     .Fl H
255     to get a list of available emulation modes.) Some (but not all) of the
256     options listed under Other options above can also be used with userland
257     emulation.
258     .El
259     .Pp
260     General options:
261     .Bl -tag -width Ds
262     .It Fl D
263 dpavlin 6 Guarantee fully deterministic behavior. Normally, the emulator calls
264 dpavlin 2 srandom() with a seed based on the current time at startup. When the
265     .Fl D
266     option is used, the srandom() call is skipped, which should cause two
267 dpavlin 6 subsequent invocations of the emulator to be identical, if all other
268     settings are identical and no user input is taking place. (If this option
269     is used, then
270 dpavlin 2 .Fl I
271     must also be used.)
272     .It Fl H
273     Display a list of available CPU types, machine types, and userland
274     emulation modes. (Most of these don't work. Please read the documentation
275     included in the
276     .Nm
277     distribution for details on which modes that actually work.)
278     .It Fl h
279     Display a list of all available command line options.
280     .It Fl K
281     Force the single-step debugger to be entered at the end of a simulation.
282     .It Fl q
283     Quiet mode; this suppresses startup messages.
284     .It Fl s
285     Show opcode usage statistics after the simulation.
286     .It Fl V
287     Start up in the single-step debugger, paused.
288     .It Fl v
289     Verbose debug messages.
290     .El
291     .Pp
292     Configuration file startup:
293     .Bl -tag -width Ds
294     .It @ Ar configfile
295     Start an emulation based on the contents of
296     .Ar "configfile".
297     .El
298     .Pp
299     For more information, please read the documentation in the doc/
300     subdirectory of the
301     .Nm
302     distribution.
303     .Sh EXAMPLES
304     The following command will start NetBSD/pmax on an emulated DECstation
305     5000/200 (3MAX), with the old bintrans system enabled:
306     .Pp
307     .Dl "gxemul -E dec -e 3max -b -d netbsddisk.img"
308     .Pp
309     netbsddisk.img should be a raw disk image containing a bootable
310     NetBSD/pmax filesystem.
311     .Pp
312     The following command will start an emulation session based on settings in
313     the configuration file "mysession". The -v option tells gxemul to be
314     verbose.
315     .Pp
316     .Dl "gxemul -v @mysession"
317     .Pp
318     If you have compiled the small Hello World program mentioned in the
319     .Nm
320     documentation, the following command will start up an
321     emulated test machine in "paused" mode:
322     .Pp
323     .Dl "gxemul -E testmips -V hello_mips"
324     .Pp
325     (Paused mode means that you enter the interactive single-step debugger
326     directly at startup, instead of launching the Hello World program.)
327     .Pp
328     Please read the documentation for more details.
329     .Sh BUGS
330     There are many bugs. Some of the known bugs are listed in the BUGS
331     file in the
332     .Nm
333     source distribution, some are indirectly mentioned in the TODO file.
334     .Pp
335 dpavlin 6 There is no new bintrans system in this release, so you will need to add
336 dpavlin 2 .Fl b
337     to select the old bintrans system, if you want speed.
338     .Pp
339     .Nm
340     does not simulate individual pipe-line stages or penalties caused by
341     branch-prediction misses, so it cannot be used for accurate performance
342     measurement.
343 dpavlin 6 .Pp
344     .Nm
345     is not timing-accurate.
346 dpavlin 2 .Sh AUTHOR
347     Anders Gavare <anders@gavare.se>
348     .Pp
349     See http://gavare.se/gxemul/ for more information.

  ViewVC Help
Powered by ViewVC 1.1.26