4 |
<table border=0 width=100% bgcolor="#d0d0d0"><tr> |
<table border=0 width=100% bgcolor="#d0d0d0"><tr> |
5 |
<td width=100% align=center valign=center><table border=0 width=100%><tr> |
<td width=100% align=center valign=center><table border=0 width=100%><tr> |
6 |
<td align="left" valign=center bgcolor="#d0efff"><font color="#6060e0" size="6"> |
<td align="left" valign=center bgcolor="#d0efff"><font color="#6060e0" size="6"> |
7 |
<b>Gavare's eXperimental Emulator:</b></font><br> |
<b>GXemul:</b></font> |
8 |
<font color="#000000" size="6"><b>Introduction</b> |
<font color="#000000" size="6"><b>Introduction</b> |
9 |
</font></td></tr></table></td></tr></table><p> |
</font></td></tr></table></td></tr></table><p> |
10 |
|
|
11 |
<!-- |
<!-- |
12 |
|
|
13 |
$Id: intro.html,v 1.118 2007/06/15 21:43:09 debug Exp $ |
$Id: intro.html,v 1.125 2007/06/30 14:02:02 debug Exp $ |
14 |
|
|
15 |
Copyright (C) 2003-2007 Anders Gavare. All rights reserved. |
Copyright (C) 2003-2007 Anders Gavare. All rights reserved. |
16 |
|
|
67 |
<a name="overview"></a> |
<a name="overview"></a> |
68 |
<h3>Overview:</h3> |
<h3>Overview:</h3> |
69 |
|
|
70 |
GXemul is an experimental <a href="#accuracy">instruction-level</a> |
GXemul is a framework for full-system computer architecture emulation. |
71 |
machine emulator. Several emulation modes are available. In some modes, |
Several processor architectures and machine types have been implemented. |
72 |
processors and surrounding hardware components are emulated well enough to |
It is working well enough to allow <a href="#emulmodes">unmodified |
73 |
let <a href="#emulmodes">unmodified operating systems (e.g. NetBSD) |
"guest" operating systems to run inside the emulator</a>, as if they were |
74 |
run</a> as if they were running on a real machine. |
running on real hardware. |
75 |
|
|
76 |
<p>The emulator is written in C, does not depend on third-party libraries, |
<p>The emulator emulates (networks of) real machines. The machines may |
77 |
and should compile and run on most 64-bit and 32-bit Unix-like systems, |
consist of <a |
78 |
|
href="http://en.wikipedia.org/wiki/ARM_architecture">ARM</a>, <a |
79 |
|
href="http://en.wikipedia.org/wiki/MIPS_architecture">MIPS</a>, <a |
80 |
|
href="http://en.wikipedia.org/wiki/Powerpc">PowerPC</a>, and <a |
81 |
|
href="http://en.wikipedia.org/wiki/SuperH">SuperH</a> processors, and |
82 |
|
various surrounding hardware components such as framebuffers, busses, |
83 |
|
interrupt controllers, ethernet controllers, disk controllers, and serial |
84 |
|
port controllers. |
85 |
|
|
86 |
|
<p>GXemul, including the dynamic translation system, is implemented in |
87 |
|
portable |
88 |
|
<a href="http://en.wikipedia.org/wiki/C_(programming_language)">C</a>, |
89 |
|
which means that the emulator will run on practically any 64-bit or 32-bit |
90 |
|
<a href="http://en.wikipedia.org/wiki/Unix-like">Unix-like</a> systems, |
91 |
with few or no modifications. |
with few or no modifications. |
92 |
|
|
93 |
<p>Devices and processors are not simulated with 100% accuracy. They are |
<p>Devices and processors are not simulated with 100% accuracy. They are |
94 |
only ``faked'' well enough to allow guest operating systems to run without |
only "faked" well enough to allow guest operating systems to run without |
95 |
complaining too much. Still, the emulator could be of interest for |
complaining too much. Still, the emulator could be of interest for |
96 |
academic research and experiments, such as when learning how to write |
academic research and experiments, such as when learning how to write |
97 |
operating system code. |
operating system code. |
153 |
notes. I have not done this, since I do not plan on making distributions |
notes. I have not done this, since I do not plan on making distributions |
154 |
without source code. You need to check all individual files for details. |
without source code. You need to check all individual files for details. |
155 |
The "easiest way out" if you plan to redistribute code from GXemul is, of |
The "easiest way out" if you plan to redistribute code from GXemul is, of |
156 |
course, to let it remain open source and simply supply the source code. |
course, to let it remain Free Software and simply include the source code. |
157 |
|
|
158 |
<p>In case you want to reuse parts of GXemul, but you need to do that |
<p>In case you want to reuse parts of GXemul, but you need to do that |
159 |
under a different license (e.g. the GPL), then contact me and I might |
under a different license (e.g. the |
160 |
re-license/dual-license files on a case-by-case basis. |
<a href="http://www.gnu.org/licenses/gpl.html">GPL</a>), then contact me and |
161 |
|
I can probably re-license/dual-license files on a case-by-case basis. |
162 |
|
|
163 |
|
|
164 |
|
|
178 |
specific libraries to build, however, if you build on a system which does |
specific libraries to build, however, if you build on a system which does |
179 |
not have X11 libraries installed, some functionality will be lost. |
not have X11 libraries installed, some functionality will be lost. |
180 |
|
|
181 |
<p>The emulator's performance is highly dependent on both runtime settings |
<p>The emulator's performance is highly dependent on both runtime settings |
182 |
and on compiler settings, so you might want to experiment with |
and on compiler settings, so you might want to experiment with using |
183 |
using different CC and CFLAGS environment variable values when running the |
different <tt>CC</tt> and <tt>CFLAGS</tt> environment variable values when |
184 |
<tt>configure</tt> script. |
running the <tt>configure</tt> script. |
185 |
|
|
186 |
|
<p>On some platforms, it is possible that building GXemul will fail |
187 |
|
because of too high optimization. When using GCC (the GNU compiler), |
188 |
|
<tt>-O3</tt> is the default optimization level. This works fine on e.g. |
189 |
|
amd64 and i386 systems, but on some more uncommon platforms, <tt>-O3</tt> |
190 |
|
might trigger internal bugs in GCC itself. If this happens, try setting |
191 |
|
<tt>CFLAGS</tt> to <tt>-O2</tt> before running <tt>./configure</tt>, and |
192 |
|
try again, |
193 |
|
|
194 |
<p>Note that there is no <tt>make install</tt> functionality; package |
<p>Note that there is no <tt>make install</tt> functionality; package |
195 |
maintainers for individual operating systems solve this for their |
maintainers for individual operating systems solve this for their |
248 |
<h3>Which processor architectures does GXemul emulate?</h3> |
<h3>Which processor architectures does GXemul emulate?</h3> |
249 |
|
|
250 |
The architectures that are emulated well enough to let at least one |
The architectures that are emulated well enough to let at least one |
251 |
guest operating system run (per architecture) are ARM, MIPS, PowerPC, |
guest operating system run (per architecture) are |
252 |
and SuperH. |
<a href="http://en.wikipedia.org/wiki/ARM_architecture">ARM</a>, |
253 |
|
<a href="http://en.wikipedia.org/wiki/MIPS_architecture">MIPS</a>, |
254 |
<p>Please read the page about <a href="guestoses.html">guest operating |
<a href="http://en.wikipedia.org/wiki/Powerpc">PowerPC</a>, and |
255 |
systems</a> for more information about the machines and operating systems |
<a href="http://en.wikipedia.org/wiki/SuperH">SuperH</a>. |
256 |
that can be considered "working" in the emulator. (There is some code in |
|
257 |
GXemul for emulation of other architectures, but they are not stable or |
<p>Please read the sections about <a href="#emulmodes">emulation |
258 |
complete enough to be listed among the "working" architectures.) |
modes</a> and <a href="guestoses.html">guest operating |
259 |
|
systems</a> for more information about the machines and operating systems, |
260 |
|
respectively, that can be considered "working" in the emulator. |
261 |
|
|
262 |
|
<p>(There is some code in GXemul for emulation of other architectures, but |
263 |
|
they are not stable or complete enough to be listed among the "working" |
264 |
|
architectures.) |
265 |
|
|
266 |
|
|
267 |
|
|
273 |
<h3>Which host architectures/platforms are supported?</h3> |
<h3>Which host architectures/platforms are supported?</h3> |
274 |
|
|
275 |
GXemul should compile and run on any modern host architecture (64-bit or |
GXemul should compile and run on any modern host architecture (64-bit or |
276 |
32-bit word-length). I generally test it on FreeBSD/amd64 6.x, |
32-bit word-length). I generally test it on |
277 |
FreeBSD/alpha 4.x, sometimes also on Linux (various platforms), and every |
<a href="http://www.freebsd.org/platforms/amd64.html">FreeBSD/amd64</a> 6.x, |
278 |
now and then also on NetBSD inside the emulator itself (various platforms). |
<a href="http://www.freebsd.org/platforms/alpha.html">FreeBSD/alpha</a> 4.x, |
279 |
|
sometimes also on Linux (various platforms), and every |
280 |
|
now and then also on <a href="http://www.netbsd.org/">NetBSD</a> or |
281 |
|
<a href="http://www.openbsd.org/">OpenBSD</a> inside the emulator itself |
282 |
|
(various platforms). |
283 |
|
|
284 |
<p>Note 1: The <a href="translation.html">dynamic translation</a> engine |
<p>Note 1: The <a href="translation.html">dynamic translation</a> engine |
285 |
does <i>not</i> require backends for native code generation to be written |
does <i>not</i> require backends for native code generation to be written |
287 |
that the dyntrans system uses can be executed on any host architecture. |
that the dyntrans system uses can be executed on any host architecture. |
288 |
|
|
289 |
<p>Note 2: Although GXemul may build and run on non-Unix-like platforms, |
<p>Note 2: Although GXemul may build and run on non-Unix-like platforms, |
290 |
such as Cygwin, Unix-like systems are the primary platform. Some |
such as <a href="http://www.cygwin.com/">Cygwin</a>, Unix-like systems are |
291 |
functionality may be lost when running on Cygwin. |
the primary platform. Some functionality may be lost when running on Cygwin. |
292 |
|
|
293 |
|
|
294 |
|
|
364 |
<ul> |
<ul> |
365 |
<li><b>IBM 6050/6070 (PReP, PowerPC Reference Platform)</b> (<a href="guestoses.html#netbsdprepinstall">NetBSD/prep</a>) |
<li><b>IBM 6050/6070 (PReP, PowerPC Reference Platform)</b> (<a href="guestoses.html#netbsdprepinstall">NetBSD/prep</a>) |
366 |
<li><b>MacPPC (generic "G4" Macintosh)</b> (<a href="guestoses.html#netbsdmacppcinstall">NetBSD/macppc</a>) |
<li><b>MacPPC (generic "G4" Macintosh)</b> (<a href="guestoses.html#netbsdmacppcinstall">NetBSD/macppc</a>) |
367 |
<li><b>Artesyn PM/PPC</b> (<a href="guestoses.html#netbsdpmppc">NetBSD/pmppc</a>) |
<li><b>Artesyn PM/PPC</b> <font color="#0000e0">(<super>*2</super>)</font> |
368 |
|
(<a href="guestoses.html#netbsdpmppc">NetBSD/pmppc</a>) |
369 |
</ul> |
</ul> |
370 |
<p> |
<p> |
371 |
<li><b><u>SuperH</u></b> |
<li><b><u>SuperH</u></b> |
383 |
it doesn't.</small> |
it doesn't.</small> |
384 |
|
|
385 |
<br><small><font color="#0000e0">(<super>*2</super>)</font> = |
<br><small><font color="#0000e0">(<super>*2</super>)</font> = |
386 |
SGI O2 emulation is enough for root-on-nfs, but not for disk boot.</small> |
The emulation is enough for root-on-nfs, but no disk controller (SCSI nor |
387 |
|
IDE) is emulated yet for this machine type.</small> |
388 |
|
|
389 |
<p>Note that of all of the machines above, none of them is emulated to |
<p>Note that of all of the machines above, none of them is emulated to |
390 |
100%. The most complete emulation mode is probably the DECstation |
100%. The most complete emulation mode is probably the DECstation |
410 |
<li>a very simple linear framebuffer device (for graphics output) |
<li>a very simple linear framebuffer device (for graphics output) |
411 |
<li>a simple disk controller |
<li>a simple disk controller |
412 |
<li>a simple ethernet controller |
<li>a simple ethernet controller |
413 |
|
<li>a simple interrupt controller |
414 |
<li>a real-time clock device |
<li>a real-time clock device |
415 |
</ul> |
</ul> |
416 |
|
|