/[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

Contents of /trunk/man/gxemul.1

Parent Directory Parent Directory | Revision Log Revision Log


Revision 42 - (show annotations)
Mon Oct 8 16:22:32 2007 UTC (16 years, 5 months ago) by dpavlin
File size: 18237 byte(s)
++ trunk/HISTORY	(local)
$Id: HISTORY,v 1.1613 2007/06/15 20:11:26 debug Exp $
20070501	Continuing a little on m88k disassembly (control registers,
		more instructions).
		Adding a dummy mvme88k machine mode.
20070502	Re-adding MIPS load/store alignment exceptions.
20070503	Implementing more of the M88K disassembly code.
20070504	Adding disassembly of some more M88K load/store instructions.
		Implementing some relatively simple M88K instructions (br.n,
		xor[.u] imm, and[.u] imm).
20070505	Implementing M88K three-register and, or, xor, and jmp[.n],
		bsr[.n] including function call trace stuff.
		Applying a patch from Bruce M. Simpson which implements the
		SYSCON_BOARD_CPU_CLOCK_FREQ_ID object of the syscon call in
		the yamon PROM emulation.
20070506	Implementing M88K bb0[.n] and bb1[.n], and skeletons for
		ldcr and stcr (although no control regs are implemented yet).
20070509	Found and fixed the bug which caused Linux for QEMU_MIPS to
		stop working in 0.4.5.1: It was a faulty change to the MIPS
		'sc' and 'scd' instructions I made while going through gcc -W
		warnings on 20070428.
20070510	Updating the Linux/QEMU_MIPS section in guestoses.html to
		use mips-test-0.2.tar.gz instead of 0.1.
		A big thank you to Miod Vallat for sending me M88K manuals.
		Implementing more M88K instructions (addu, subu, div[u], mulu,
		ext[u], clr, set, cmp).
20070511	Fixing bugs in the M88K "and" and "and.u" instructions (found
		by comparing against the manual).
		Implementing more M88K instructions (mask[.u], mak, bcnd (auto-
		generated)) and some more control register details.
		Cleanup: Removing the experimental AVR emulation mode and
		corresponding devices; AVR emulation wasn't really meaningful.
		Implementing autogeneration of most M88K loads/stores. The
		rectangle drawing demo (with -O0) for M88K runs :-)
		Beginning on M88K exception handling.
		More M88K instructions: tb0, tb1, rte, sub, jsr[.n].
		Adding some skeleton MVME PROM ("BUG") emulation.
20070512	Fixing a bug in the M88K cmp instruction.
		Adding the M88K lda (scaled register) instruction.
		Fixing bugs in 64-bit (32-bit pairs) M88K loads/stores.
		Removing the unused tick_hz stuff from the machine struct.
		Implementing the M88K xmem instruction. OpenBSD/mvme88k gets
		far enough to display the Copyright banner :-)
		Implementing subu.co (guess), addu.co, addu.ci, ff0, and ff1.
		Adding a dev_mvme187, for MVME187-specific devices/registers.
		OpenBSD/mvme88k prints more boot messages. :)
20070515	Continuing on MVME187 emulation (adding more devices, beginning
		on the CMMUs, etc).
		Adding the M88K and.c, xor.c, and or.c instructions, and making
		sure that mul, div, etc cause exceptions if executed when SFD1
		is disabled.
20070517	Continuing on M88K and MVME187 emulation in general; moving
		the CMMU registers to the CPU struct, separating dev_pcc2 from
		dev_mvme187, and beginning on memory_m88k.c (BATC and PATC).
		Fixing a bug in 64-bit (32-bit pairs) M88K fast stores.
		Implementing the clock part of dev_mk48txx.
		Implementing the M88K fstcr and xcr instructions.
		Implementing m88k_cpu_tlbdump().
		Beginning on the implementation of a separate address space
		for M88K .usr loads/stores.
20070520	Removing the non-working (skeleton) Sandpoint, SonyNEWS, SHARK
		Dnard, and Zaurus machine modes.
		Experimenting with dyntrans to_be_translated read-ahead. It
		seems to give a very small performance increase for MIPS
		emulation, but a large performance degradation for SuperH. Hm.
20070522	Disabling correct SuperH ITLB emulation; it does not seem to be
		necessary in order to let SH4 guest OSes run, and it slows down
		userspace code.
		Implementing "samepage" branches for SuperH emulation, and some
		other minor speed hacks.
20070525	Continuing on M88K memory-related stuff: exceptions, memory
		transaction register contents, etc.
		Implementing the M88K subu.ci instruction.
		Removing the non-working (skeleton) Iyonix machine mode.
		OpenBSD/mvme88k reaches userland :-), starts executing
		/sbin/init's instructions, and issues a few syscalls, before
		crashing.
20070526	Fixing bugs in dev_mk48txx, so that OpenBSD/mvme88k detects
		the correct time-of-day.
		Implementing a generic IRQ controller for the test machines
		(dev_irqc), similar to a proposed patch from Petr Stepan.
		Experimenting some more with translation read-ahead.
		Adding an "expect" script for automated OpenBSD/landisk
		install regression/performance tests.
20070527	Adding a dummy mmEye (SH3) machine mode skeleton.
		FINALLY found the strange M88K bug I have been hunting: I had
		not emulated the SNIP value for exceptions occurring in
		branch delay slots correctly.
		Implementing correct exceptions for 64-bit M88K loads/stores.
		Address to symbol lookups are now disabled when M88K is
		running in usermode (because usermode addresses don't have
		anything to do with supervisor addresses).
20070531	Removing the mmEye machine mode skeleton.
20070604	Some minor code cleanup.
20070605	Moving src/useremul.c into a subdir (src/useremul/), and
		cleaning up some more legacy constructs.
		Adding -Wstrict-aliasing and -fstrict-aliasing detection to
		the configure script.
20070606	Adding a check for broken GCC on Solaris to the configure
		script. (GCC 3.4.3 on Solaris cannot handle static variables
		which are initialized to 0 or NULL. :-/)
		Removing the old (non-working) ARC emulation modes: NEC RD94,
		R94, R96, and R98, and the last traces of Olivetti M700 and
		Deskstation Tyne.
		Removing the non-working skeleton WDSC device (dev_wdsc).
20070607	Thinking about how to use the host's cc + ld at runtime to
		generate native code. (See experiments/native_cc_ld_test.i
		for an example.)
20070608	Adding a program counter sampling timer, which could be useful
		for native code generation experiments.
		The KN02_CSR_NRMMOD bit in the DECstation 5000/200 (KN02) CSR
		should always be set, to allow a 5000/200 PROM to boot.
20070609	Moving out breakpoint details from the machine struct into
		a helper struct, and removing the limit on max nr of
		breakpoints.
20070610	Moving out tick functions into a helper struct as well (which
		also gets rid of the max limit).
20070612	FINALLY figured out why Debian/DECstation stopped working when
		translation read-ahead was enabled: in src/memory_rw.c, the
		call to invalidate_code_translation was made also if the
		memory access was an instruction load (if the page was mapped
		as writable); it shouldn't be called in that case.
20070613	Implementing some more MIPS32/64 revision 2 instructions: di,
		ei, ext, dext, dextm, dextu, and ins.
20070614	Implementing an instruction combination for the NetBSD/arm
		idle loop (making the host not use any cpu if NetBSD/arm
		inside the emulator is not using any cpu).
		Increasing the nr of ARM VPH entries from 128 to 384.
20070615	Removing the ENABLE_arch stuff from the configure script, so
		that all included architectures are included in both release
		and development builds.
		Moving memory related helper functions from misc.c to memory.c.
		Adding preliminary instructions for netbooting NetBSD/pmppc to
		guestoses.html; it doesn't work yet, there are weird timeouts.
		Beginning a total rewrite of the userland emulation modes
		(removing all emulation modes, beginning from scratch with
		NetBSD/MIPS and FreeBSD/Alpha only).
20070616	After fixing a bug in the DEC21143 NIC (the TDSTAT_OWN bit was
		only cleared for the last segment when transmitting, not all
		segments), NetBSD/pmppc boots with root-on-nfs without the
		timeouts. Updating guestoses.html.
		Removing the skeleton PSP (Playstation Portable) mode.
		Moving X11-related stuff in the machine struct into a helper
		struct.
		Cleanup of out-of-memory checks, to use a new CHECK_ALLOCATION
		macro (which prints a meaningful error message).
		Adding a COMMENT to each machine and device (for automagic
		.index comment generation).
		Doing regression testing for the next release.

==============  RELEASE 0.4.6  ==============


1 .\" $Id: gxemul.1,v 1.96 2007/06/15 21:43:53 debug Exp $
2 .\"
3 .\" Copyright (C) 2004-2007 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 JUNE 2007
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 .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. Several
51 emulation modes are available. In some modes, processors and surrounding
52 hardware components are emulated well enough to let unmodified operating
53 systems (e.g. NetBSD) run inside the emulator as if they were running on a
54 real machine.
55 .Pp
56 Processors (ARM, MIPS, PowerPC, and SuperH) are emulated using dynamic
57 translation. However, unlike some other dynamically translating emulators,
58 GXemul does not need to generate native code, only a "runnable
59 intermediate representation", and will thus run on any host architecture,
60 without the need to implement per-architecture backends.
61 .Pp
62 The emulator can be invoked in the following ways:
63 .Pp
64 1. When emulating a complete machine, configuration options can be
65 supplied directly on the command line.
66 .Pp
67 2. Options can be read from a configuration file.
68 .Pp
69 3. When emulating a userland environment (syscall-only emulation, not
70 emulating complete machines), then the program name and its argument
71 should be given on the command line. (This mode is not really usable yet.)
72 .Pp
73 The easiest way to use the emulator is to supply settings directly on the
74 command line.
75 .Pp
76 The most important thing you need to supply is the
77 file argument. This is the name of a binary file (an ELF, a.out, COFF/ECOFF,
78 SREC, or a raw binary image) which you wish to run in the emulator. This file
79 might be an operating system kernel, or perhaps a ROM image file.
80 If more than one filename is supplied, all files are loaded into memory,
81 and the entry point (if available) is taken from the last file.
82 .Pp
83 Apart from the name of a binary file, you must also use the
84 .Fl E
85 and/or
86 .Fl e
87 options to select which emulation mode to use. This is necessary because
88 the emulator cannot in general deduce this from the file being executed.
89 For example, a MIPS-based machine from DEC (a DECstation) is very different
90 from a MIPS-based machine from SGI. Use
91 .Nm
92 .Fl H
93 to get a list of available emulation modes.
94 .Pp
95 There are three exceptions to the normal invocation usage mentioned above.
96 .Pp
97 1. For DECstation emulation, if you have a bootable DECstation harddisk or
98 CDROM image, then just supplying the diskimage via the
99 .Fl d
100 option is sufficient. The filename of the kernel can then be
101 skipped, as the emulator runs the bootblocks from the diskimage directly and
102 doesn't need the kernel as a separate file.
103 .Pp
104 2. If you supply an ISO9660 CDROM disk image, then using the
105 .Fl j
106 option to indicate a file on the CDROM filesystem to load is sufficient;
107 no additional kernel filename needs to be supplied on the command line.
108 .Pp
109 3. For Dreamcast emulation, when booting e.g. a NetBSD/dreamcast CDROM
110 image, it is enough to supply the disk image (with the correct ISO
111 partition start offset). Bootblocks will be read directly from the CDROM
112 image, and there is no need to supply the name of an external kernel on
113 the command line.
114 .Pp
115 Gzipped kernels are automatically unzipped, by calling the external gunzip
116 program, both when specifying a gzipped file directly on the command line
117 and when loading such a file using the
118 .Fl j
119 option.
120 .Pp
121 Machine selection options:
122 .Bl -tag -width Ds
123 .It Fl E Ar t
124 Try to emulate machine type
125 .Ar "t".
126 This option is not always needed, if the
127 .Fl e
128 option uniquely selects a machine.
129 (Use
130 .Fl H
131 to get a list of types.)
132 .It Fl e Ar st
133 Try to emulate machine subtype
134 .Ar "st".
135 Use this together with
136 .Fl E .
137 (This option is not always needed, if a machine type has no subtypes.)
138 .El
139 .Pp
140 Other options:
141 .Bl -tag -width Ds
142 .It Fl C Ar x
143 Try to emulate a specific CPU type,
144 .Ar "x".
145 This overrides the default CPU type for the machine being emulated.
146 (Use
147 .Fl H
148 to get a list of available CPU types.)
149 .It Fl d Ar [modifiers:]filename
150 Add
151 .Ar filename
152 as a disk image. By adding one or more modifier characters and then a
153 colon (":") as a prefix to
154 .Ar filename,
155 you can modify the way the disk image is treated. Available modifiers are:
156 .Bl -tag -width Ds
157 .It b
158 Specifies that this is a boot device.
159 .It c
160 CD-ROM.
161 .It d
162 DISK (this is the default).
163 .It f
164 FLOPPY.
165 .It gH;S;
166 Override the default geometry; use H heads and S sectors-per-track.
167 (The number of cylinders is calculated automatically.)
168 .It i
169 IDE. (This is the default for most machine types.)
170 .It oOFS;
171 Set the base offset for an ISO9660 filesystem on a disk image. The default
172 is 0. A suitable offset when booting from Dreamcast ISO9660 filesystem
173 images, which are offset by 11702 sectors, is 23965696.
174 .It r
175 Read-only (don't allow changes to be written to the file).
176 .It s
177 SCSI.
178 .It t
179 Tape.
180 .It V
181 Add an overlay filename to an already defined disk image.
182 (A ID number must also be specified when this flag is used. See the
183 documentation for an example of how to use overlays.)
184 .It 0-7
185 Force a specific ID number.
186 .El
187 .Pp
188 For SCSI devices, the ID number is the SCSI ID. For IDE harddisks, the ID
189 number has the following meaning:
190 .Bl -tag -width Ds
191 .It 0
192 Primary master.
193 .It 1
194 Primary slave.
195 .It 2
196 Secondary master.
197 .It 3
198 Secondary slave.
199 .El
200 .Pp
201 Unless otherwise specified, filenames ending with ".iso" or ".cdr" are
202 assumed to be CDROM images. Most others are assumed to be disks. Depending
203 on which machine is being emulated, the default for disks can be either
204 SCSI or IDE. Some disk images that are very small are assumed to be floppy
205 disks. (If you are not happy with the way a disk image is detected, then
206 you need to use explicit prefixes to force a specific type.)
207 .Pp
208 For floppies, the gH;S; prefix is ignored. Instead, the number of
209 heads and cylinders are assumed to be 2 and 80, respectively, and the
210 number of sectors per track is calculated automatically. (This works for
211 720KB, 1.2MB, 1.44MB, and 2.88MB floppies.)
212 .It Fl I Ar hz
213 Set the main CPU's frequency to
214 .Ar hz
215 Hz. This option does not work for all emulated machine modes. It affects
216 the way count/compare interrupts are faked to simulate emulated time =
217 real world time. If the guest operating system relies on RTC interrupts
218 instead of count/compare interrupts, then this option has no effect.
219 .Pp
220 Setting the frequency to zero disables automatic synchronization of
221 emulated time vs real world time, and the count/compare system runs at a
222 fixed rate.
223 .It Fl i
224 Enable instruction trace, i.e. display disassembly of each instruction as
225 it is being executed.
226 .It Fl J
227 Disable instruction combinations in the dynamic translator.
228 .It Fl j Ar n
229 Set the name of the kernel to
230 .Ar "n".
231 When booting from an ISO9660 filesystem, the emulator will try to boot
232 using this file. (In some emulation modes, eg. DECstation, this name is passed
233 along to the boot program. Useful names are "bsd" for OpenBSD/pmax,
234 "vmunix" for Ultrix, or "vmsprite" for Sprite.)
235 .It Fl M Ar m
236 Emulate
237 .Ar m
238 MBs of physical RAM. This overrides the default amount of RAM for the
239 selected machine type.
240 .It Fl N
241 Display the number of executed instructions per second on average, at
242 regular intervals.
243 .It Fl n Ar nr
244 Set the number of processors in the machine, for SMP experiments.
245 .Pp
246 Note 1: The emulator allocates quite a lot of virtual memory for
247 per-CPU translation tables. On 64-bit hosts, this is normally not a
248 problem. On 32-bit hosts, this can use up all available virtual userspace
249 memory. The solution is to either run the emulator on a 64-bit host,
250 or limit the number of emulated CPUs to a reasonably low number.
251 .Pp
252 Note 2: SMP simulation is not working very well yet; multiple processors
253 are simulated, but synchronization between the processors does not map
254 very well to how real-world SMP systems work.
255 .It Fl O
256 Force a "netboot" (tftp instead of disk), even when a disk image is
257 present (for DECstation, SGI, and ARC emulation).
258 .It Fl o Ar arg
259 Set the boot argument (mostly useful for DEC, ARC, or SGI emulation).
260 Default
261 .Ar arg
262 for DEC is "-a", for ARC/SGI it is "-aN", and for CATS it is "-A".
263 .It Fl p Ar pc
264 Add a breakpoint.
265 .Ar pc
266 can be a symbol, or a numeric value. (Remember to use the "0x" prefix for
267 hexadecimal values.)
268 .It Fl Q
269 Disable the built-in (software-only) PROM emulation. This option is useful
270 for experimenting with running raw ROM images from real machines. The default
271 behaviour of the emulator is to "fake" certain PROM calls used by guest
272 operating systems (e.g. NetBSD), so that no real PROM image is needed.
273 .It Fl R
274 Use a random bootstrap cpu, instead of CPU nr 0. (This option is only
275 meaningful together with the
276 .Fl n
277 option.)
278 .It Fl r
279 Dump register contents for every executed instruction.
280 .It Fl S
281 Initialize emulated RAM to random data, instead of zeroes. This option
282 is useful when trying to trigger bugs in a program that occur because the
283 program assumed that uninitialized memory contains zeros. (Use with
284 care.)
285 .It Fl s Ar flags:filename
286 Gather statistics based on the current emulated program counter value,
287 while the program executes. The statistics is actually just a raw dump of
288 all program counter values in sequence, suitable for post-analysis with
289 separate tools. Output is appended to
290 .Ar filename.
291 .Pp
292 The
293 .Ar flags
294 should include one or more of the following type specifiers:
295 .Bl -tag -width Ds
296 .It v
297 Virtual. This means that the program counter value is used.
298 .It p
299 Physical. This means that the physical address of where the program
300 is actually running is used.
301 .It i
302 Instruction call. This type of statistics gathering is practically only
303 useful during development of the emulator itself. The output is a list of
304 addresses of instruction call functions (ic->f), which after some
305 post-processing can be used as a basis for deciding when to implement
306 instruction combinations.
307 .El
308 .Pp
309 The
310 .Ar flags
311 may also include the following optional modifiers:
312 .Bl -tag -width Ds
313 .It d
314 Disabled at startup.
315 .It o
316 Overwrite the file, instead of appending to it.
317 .El
318 .Pp
319 Statistics gathering can be enabled/disabled at runtime by using the
320 "statistics_enabled = yes" and "statistics_enabled = no" debugger
321 commands.
322 .Pp
323 When gathering instruction statistics using the
324 .Fl s
325 option, instruction combinations and native code generation
326 are always disabled (i.e. implicit
327 .Fl J
328 and
329 .Fl B
330 flags are added to the command line).
331 .It Fl T
332 Halt if the emulated program attempts to access non-existing memory.
333 .It Fl t
334 Show a trace tree of all function calls being made.
335 .It Fl U
336 Enable slow_serial_interrupts_hack_for_linux.
337 .It Fl X
338 Use X11. This option enables graphical framebuffers.
339 .It Fl x
340 Open up new xterms for emulated serial ports. The default behaviour is to
341 open up xterms when using configuration files, or if X11 is enabled. When
342 starting up a simple emulation session with settings directly on the
343 command line, and neither
344 .Fl X
345 nor
346 .Fl x
347 is used, then all output is confined to the terminal that
348 .Nm
349 started in.
350 .It Fl Y Ar n
351 Scale down framebuffer windows by
352 .Ar n
353 x
354 .Ar n
355 times. This option is useful when emulating a very large framebuffer, and
356 the actual display is of lower resolution. If
357 .Ar n
358 is negative, then there will be no scaledown, but emulation of certain
359 graphic controllers will be scaled up
360 by
361 .Ar -n
362 times instead. E.g. Using
363 .Ar -2
364 with VGA text mode emulation will result in 80x25 character cells rendered
365 in a 1280x800 window, instead of the normal resolution of 640x400.
366 .It Fl Z Ar n
367 Set the number of graphics cards, for emulating a dual-head or tripple-head
368 environment. (Only for DECstation emulation so far.)
369 .It Fl z Ar disp
370 Add
371 .Ar disp
372 as an X11 display to use for framebuffers.
373 .El
374 .Pp
375 Userland options:
376 .Bl -tag -width Ds
377 .It Fl u Ar emul-mode
378 Userland-only (syscall) emulation. (Use
379 .Fl H
380 to get a list of available emulation modes.) Some (but not all) of the
381 options listed under Other options above can also be used with
382 userland emulation.
383 .Pp
384 Note: Userland (syscall) emulation does not really work yet.
385 .El
386 .Pp
387 General options:
388 .Bl -tag -width Ds
389 .It Fl b
390 Enable native code generation at runtime. This is not really implemented
391 yet. Don't use it unless you know what you are doing. It will most
392 likely not work.
393 .It Fl B
394 Disable native code generation at runtime. This is the default in this
395 release of GXemul.
396 .It Fl c Ar cmd
397 Add
398 .Ar cmd
399 as a command to run before starting the simulation. A similar effect can
400 be achieved by using the
401 .Fl V
402 option, and entering the commands manually.
403 .It Fl D
404 Causes the emulator to skip a call to srandom(). This leads to somewhat
405 more deterministic behaviour than running without this option.
406 However, if the emulated machine has clocks or timer interrupt sources,
407 or if user interaction is taking place (e.g. keyboard input at irregular
408 intervals), then this option is meaningless.
409 .It Fl H
410 Display a list of available CPU types, machine types, and userland
411 emulation modes. (Most of these don't work. Please read the documentation
412 included in the
413 .Nm
414 distribution for details on which modes that actually work. Userland
415 emulation is not included in stable release builds, since it doesn't work
416 yet.)
417 .It Fl h
418 Display a list of all available command line options.
419 .It Fl k Ar n
420 Set the size of the dyntrans cache (per emulated CPU) to
421 .Ar n
422 MB. The default size is 48 MB.
423 .It Fl K
424 Force the single-step debugger to be entered at the end of a simulation.
425 .It Fl q
426 Quiet mode; this suppresses startup messages.
427 .It Fl V
428 Start up in the single-step debugger, paused.
429 .It Fl v
430 Increase verbosity (show more debug messages). This option can be used
431 multiple times.
432 .El
433 .Pp
434 Configuration file startup:
435 .Bl -tag -width Ds
436 .It @ Ar configfile
437 Start an emulation based on the contents of
438 .Ar "configfile".
439 .El
440 .Pp
441 For more information, please read the documentation in the doc/
442 subdirectory of the
443 .Nm
444 distribution.
445 .Sh EXAMPLES
446 The following command will start NetBSD/pmax on an emulated DECstation
447 5000/200 (3MAX):
448 .Pp
449 .Dl "gxemul -e 3max -d nbsd_pmax.img"
450 .Pp
451 nbsd_pmax.img should be a raw disk image containing a bootable
452 NetBSD/pmax filesystem.
453 .Pp
454 The following command will start an emulation session based on settings in
455 the configuration file "mysession". The -v option tells gxemul to be
456 verbose.
457 .Pp
458 .Dl "gxemul -v @mysession"
459 .Pp
460 If you have compiled the small Hello World program mentioned in the
461 .Nm
462 documentation, the following command will start up an
463 emulated test machine in "paused" mode:
464 .Pp
465 .Dl "gxemul -E testmips -V hello_mips"
466 .Pp
467 Paused mode means that you enter the interactive single-step debugger
468 directly at startup, instead of launching the Hello World program.
469 .Pp
470 The paused mode is also what should be used when running "unknown" files
471 for the first time in the emulator. E.g. if you have a binary which you
472 think is some kind of MIPS ROM image, then you can try the following:
473 .Pp
474 .Dl "gxemul -vv -E baremips -V 0xbfc00000:image.raw"
475 .Pp
476 You can then use the single-stepping functionality of the built-in
477 debugger to run the code in the ROM image, to see how it behaves. Based on
478 that, you can deduce what machine type it was actually from (the
479 baremips machine is not a real machine), and perhaps try again with
480 another emulation mode.
481 .Pp
482 In general, however, real ROM images require much more emulation detail
483 than GXemul provides, so they can usually not run.
484 .Pp
485 Please read the documentation for more details.
486 .Sh BUGS
487 There are many bugs. Some of the known bugs are mentioned in the TODO
488 file in the
489 .Nm
490 source distribution, some are marked as TODO in the source code itself.
491 .Pp
492 Userland (syscall-only) emulation, i.e. running a userland binary directly
493 without simulating an entire machine, doesn't really work yet.
494 .Pp
495 .Nm
496 is in general not cycle-accurate; it does not simulate individual
497 pipe-line stages or penalties caused by branch-prediction misses or
498 cache misses, so it cannot be used for accurate simulation of any actual
499 real-world processor.
500 .Pp
501 .Nm
502 is in general not timing-accurate. Many emulation modes try to make the
503 guest operating system's clock run at the same speed as the host clock.
504 However, the number of instructions executed per clock tick can
505 obviously vary, depending on the current CPU load on the host.
506 .Sh AUTHOR
507 GXemul is Copyright (C) 2003-2007 Anders Gavare <anders@gavare.se>
508 .Pp
509 See http://gavare.se/gxemul/ for more information. For other Copyright
510 messages, see the corresponding parts of the source code and/or
511 documentation.

  ViewVC Help
Powered by ViewVC 1.1.26