/[gxemul]/upstream/0.3.1/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

Contents of /upstream/0.3.1/man/gxemul.1

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3 - (show annotations)
Mon Oct 8 16:17:52 2007 UTC (16 years, 7 months ago) by dpavlin
File size: 10622 byte(s)
0.3.1
1 .\" $Id: gxemul.1,v 1.12 2005/04/07 16:00:24 debug Exp $
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 .Dd APRIL 2005
33 .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 unmodified operating systems (eg NetBSD) run as if they were running on a
55 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 (There is an exception to the normal invocation usage mentioned above;
82 if you want to use the DECstation emulation mode, and have a bootable
83 DECstation harddisk or CDROM image, then just supplying the diskimage via
84 the
85 .Fl d
86 option is sufficient. The filename of the kernel can then be
87 skipped, as the emulator runs the bootblocks from the diskimage directly and
88 doesn't need the kernel as a separate file.)
89 .Pp
90 Machine selection options:
91 .Bl -tag -width Ds
92 .It Fl E Ar t
93 Try to emulate machine type
94 .Ar "t".
95 (Use
96 .Fl H
97 to get a list of types.)
98 .It Fl e Ar st
99 Try to emulate machine subtype
100 .Ar "st".
101 Use this together with
102 .Fl E .
103 (This option is not always needed, if a machine type has no subtypes.)
104 .El
105 .Pp
106 Other options:
107 .Bl -tag -width Ds
108 .It Fl B
109 Disable dynamic binary translation completely. By default, bintrans
110 will be turned on if the host architecture supports it.
111 However, in this release (0.3.1), there is no new bintrans system.
112 If you want to enable binary translation, use
113 .Fl "b".
114 .It Fl b
115 Use the OLD binary translation subsystem. (Alpha and i386 hosts only.)
116 .It Fl C Ar x
117 Try to emulate a specific CPU type,
118 .Ar "x".
119 This overrides the default CPU type for the machine being emulated.
120 (Use
121 .Fl H
122 to get a list of available CPU types.)
123 .It Fl d Ar name
124 Add
125 .Ar name
126 as a disk image. By adding one or more modifier characters and then a
127 colon (":") as a prefix to
128 .Ar "name",
129 you can modify the disk image's behaviour. Available modifiers are:
130 .Bl -tag -width Ds
131 .It b
132 Specifies that this is a boot device.
133 .It c
134 CD-ROM (instead of a normal SCSI DISK).
135 .It d
136 SCSI DISK (this is the default).
137 .It i
138 IDE (instead of SCSI).
139 .It r
140 Read-only (don't allow changes to be written to the file).
141 .It t
142 SCSI tape.
143 .It 0-7
144 Force a specific SCSI ID number.
145 .El
146 .Pp
147 Filenames ending with ".iso" are assumed to be CDROM images, all others
148 are assumed to be normal SCSI disks.
149 .It Fl I Ar x
150 Emulate clock interrupts at
151 .Ar x
152 Hz. (This affects emulated clock devices only, not actual runtime speed.
153 This disables automatic clock adjustments, which is otherwise turned on.)
154 (This option is probably only valid for DECstation emulation.)
155 .It Fl i
156 Display each instruction as it is being executed.
157 .It Fl J
158 Disable some speed tricks.
159 .It Fl j Ar n
160 Set the name of the kernel to
161 .Ar "n".
162 Useful names are "bsd" for OpenBSD/pmax, or "vmunix" for Ultrix.
163 ("netbsd" is usually the default value.)
164 .It Fl M Ar m
165 Emulate
166 .Ar m
167 MBs of physical RAM. This overrides the default amount of RAM for the
168 selected machine type.
169 .It Fl m Ar nr
170 Run at most
171 .Ar nr
172 instructions (on any cpu).
173 .It Fl N
174 Display nr of instructions/second average, at regular intervals.
175 .It Fl n Ar nr
176 Set nr of CPUs (for SMP experiments).
177 .It Fl O
178 Force a "netboot" (tftp instead of disk), even when a disk image is
179 present (for DECstation, SGI, and ARC emulation).
180 .It Fl o Ar arg
181 Set the boot argument (for DEC, ARC, or SGI emulation).
182 Default
183 .Ar arg
184 for DEC is '-a', for ARC '-aN'.
185 .It Fl p Ar pc
186 Add a breakpoint (remember to use the '0x' prefix for hex).
187 .It Fl Q
188 Disable the built-in PROM emulation. This is useful for running raw ROM
189 images from real machines.
190 .It Fl R
191 Use a random bootstrap cpu, instead of CPU nr 0. (For SMP experiments.)
192 .It Fl r
193 Dump register contents for every executed instruction.
194 .It Fl S
195 Initialize the emulated RAM to random data, instead of zeroes.
196 .It Fl T
197 Enter the single-step debugger on unimplemented memory accesses.
198 .It Fl t
199 Show a trace tree of all function calls being made.
200 .It Fl U
201 Enable slow_serial_interrupts_hack_for_linux.
202 .It Fl X
203 Use X11.
204 .It Fl x
205 Open up new xterms for emulated serial ports. (Default is to open up
206 xterms when using configuration files, but not when starting an
207 emulation with settings directly on the command line.)
208 .It Fl Y Ar n
209 Scale down framebuffer windows by
210 .Ar n
211 x
212 .Ar n
213 times.
214 .It Fl y Ar x
215 Set max_random_cycles_per_chunk to
216 .Ar x
217 (experimental).
218 .It Fl Z Ar n
219 Set the number of graphics cards, for emulating a dual-head or tripple-head
220 environment. (Only for DECstation emulation so far.)
221 .It Fl z Ar disp
222 Add
223 .Ar disp
224 as an X11 display to use for framebuffers.
225 .El
226 .Pp
227 Userland options:
228 .Bl -tag -width Ds
229 .It Fl u Ar emul-mode
230 Userland-only (syscall) emulation. (Use
231 .Fl H
232 to get a list of available emulation modes.) Some (but not all) of the
233 options listed under Other options above can also be used with userland
234 emulation.
235 .El
236 .Pp
237 General options:
238 .Bl -tag -width Ds
239 .It Fl D
240 Guarantee fully deterministic behaviour. Normally, the emulator calls
241 srandom() with a seed based on the current time at startup. When the
242 .Fl D
243 option is used, the srandom() call is skipped, which should cause two
244 subsequent invokations of the emulator to be identical, if all other
245 settings are identical. (If this option is used, then
246 .Fl I
247 must also be used.)
248 .It Fl H
249 Display a list of available CPU types, machine types, and userland
250 emulation modes. (Most of these don't work. Please read the documentation
251 included in the
252 .Nm
253 distribution for details on which modes that actually work.)
254 .It Fl h
255 Display a list of all available command line options.
256 .It Fl K
257 Force the single-step debugger to be entered at the end of a simulation.
258 .It Fl q
259 Quiet mode; this suppresses startup messages.
260 .It Fl s
261 Show opcode usage statistics after the simulation.
262 .It Fl V
263 Start up in the single-step debugger, paused.
264 .It Fl v
265 Verbose debug messages.
266 .El
267 .Pp
268 Configuration file startup:
269 .Bl -tag -width Ds
270 .It @ Ar configfile
271 Start an emulation based on the contents of
272 .Ar "configfile".
273 .El
274 .Pp
275 For more information, please read the documentation in the doc/
276 subdirectory of the
277 .Nm
278 distribution.
279 .Sh EXAMPLES
280 The following command will start NetBSD/pmax on an emulated DECstation
281 5000/200 (3MAX), with the old bintrans system enabled:
282 .Pp
283 .Dl "gxemul -E dec -e 3max -b -d netbsddisk.img"
284 .Pp
285 netbsddisk.img should be a raw disk image containing a bootable
286 NetBSD/pmax filesystem.
287 .Pp
288 The following command will start an emulation session based on settings in
289 the configuration file "mysession". The -v option tells gxemul to be
290 verbose.
291 .Pp
292 .Dl "gxemul -v @mysession"
293 .Pp
294 If you have compiled the small Hello World program mentioned in the
295 .Nm
296 documentation, the following command will start up an
297 emulated test machine in "paused" mode:
298 .Pp
299 .Dl "gxemul -E testmips -V hello_mips"
300 .Pp
301 (Paused mode means that you enter the interactive single-step debugger
302 directly at startup, instead of launching the Hello World program.)
303 .Pp
304 Please read the documentation for more details.
305 .Sh BUGS
306 There are many bugs. Some of the known bugs are listed in the BUGS
307 file in the
308 .Nm
309 source distribution, some are indirectly mentioned in the TODO file.
310 .Pp
311 There is no new bintrans system in this release (0.3.1), so you will
312 need to add
313 .Fl b
314 to select the old bintrans system, if you want speed.
315 .Pp
316 .Nm
317 does not simulate individual pipe-line stages or penalties caused by
318 branch-prediction misses, so it cannot be used for accurate performance
319 measurement.
320 .Sh AUTHOR
321 Anders Gavare <anders@gavare.se>
322 .Pp
323 See http://gavare.se/gxemul/ for more information.

  ViewVC Help
Powered by ViewVC 1.1.26