forked from CTSRD-CHERI/gxemul
-
Notifications
You must be signed in to change notification settings - Fork 0
/
README
117 lines (73 loc) · 4.13 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
--------------------------------------------------------
Gavare's eXperimental Emulator -- GXemul 0.6.0
--------------------------------------------------------
Copyright (C) 2003-2010 Anders Gavare
Overview -- What is GXemul?
-----------------------------
GXemul is a framework for full-system computer architecture emulation.
Several processor architectures and machine types have been implemented.
It is working well enough to allow unmodified "guest" operating systems to
run inside the emulator, as if they were running on real hardware.
The emulator emulates (networks of) real machines. The machines may consist
of ARM, MIPS, Motorola 88K, PowerPC, and SuperH processors, and various
surrounding hardware components such as framebuffers, busses, interrupt
controllers, ethernet controllers, disk controllers, and serial port
controllers.
GXemul, including the dynamic translation system, is implemented in portable
C++, which means that the emulator will (at least in theory) run on
practically any modern host architecture and unix-like operating system, for
which a C++ compiler is available.
The documentation lists the machines and specific guest operating systems
that can be regarded as "working" in GXemul. The guest operating system
that works best in GXemul is NetBSD/pmax.
Possible uses of GXemul include:
o) running guest operating systems in a "sandboxed" environment
o) compiling your source code inside a guest operating system which you
otherwise would not have access to (e.g. various exotic ports of
NetBSD or OpenBSD), to make sure that your source code is portable to
those platforms
o) educational purposes, e.g. to learn how to write code for MIPS
o) hobby operating system development; the emulator can be used as a
complement to testing your code on real hardware
o) preservation of computer history, by simulating old/obsolete hardware
o) simulating (ethernet) networks of computers running various
operating systems, to study their interaction with each other
o) debugging code in general
Use your imagination :-)
Note regarding the new 0.6 framework
------------------------------------
Only very few emulation modes have been rewritten to use the 0.6 (C++)
framework; the bulk of GXemul is still made up of legacy emulation modes,
written in C.
The long-term plan is to rewrite all of the emulation modes to use the
new framework, but this will take quite some time.
GXemul's limitations
--------------------
o) GXemul is not a cycle-accurate simulator when it comes to simulating
modern CPUs, because it does not simulate things smaller than an
instruction. Pipe-line stalls, instruction latency effects, out-of-order
execution etc. are more or less completely ignored.
(Note: The new framework could possibly allow cycle-accurate models
to be implemented; however, no such component has been written.)
o) Hardware devices have been implemented in an ad-hoc and as-needed manner,
usually only enough to fool certain guest operating systems, e.g. NetBSD,
that the hardware devices exist and function well enough for those guest
operating systems to use them.
(A consequence of this is that a machine mode may be implemented well
enough to run NetBSD for that machine mode, but other guest operating
systems may not run at all, or behave strangely.)
Quick start
-----------
To compile, type './configure' and then 'make'. This should work on most
Unix-like systems. If it does not, then please mail me a bug report.
If you are impatient, and want to try out running a guest operating system
inside GXemul, read this: doc/guestoses.html#netbsdpmaxinstall
If you want to use GXemul for experimenting with code of your own,
then I suggest you compile a Hello World program according to the tips
listed here: doc/experiments.html#hello
Please read the rest of the documentation in the doc/ sub-directory for
more detailed information on how to use the emulator.
Feedback
--------
If you have found GXemul useful in some way, or feel like sending me
comments or feedback in general, then mail me at anders(at)gavare.se.