10 |
|
|
11 |
<!-- |
<!-- |
12 |
|
|
13 |
$Id: intro.html,v 1.64 2005/10/07 22:45:33 debug Exp $ |
$Id: intro.html,v 1.66 2005/11/23 22:03:24 debug Exp $ |
14 |
|
|
15 |
Copyright (C) 2003-2005 Anders Gavare. All rights reserved. |
Copyright (C) 2003-2005 Anders Gavare. All rights reserved. |
16 |
|
|
70 |
systems (e.g. NetBSD) run as if they were running on a real machine. |
systems (e.g. NetBSD) run as if they were running on a real machine. |
71 |
|
|
72 |
<p>The processor architecture best emulated by GXemul is MIPS, but other |
<p>The processor architecture best emulated by GXemul is MIPS, but other |
73 |
architectures are also partially emulated. |
architectures such as ARM and PowerPC are also partially emulated. |
74 |
|
|
75 |
<p>Devices and CPUs are not simulated with 100% accuracy. They are only |
<p>Devices and CPUs are not simulated with 100% accuracy. They are only |
76 |
``faked'' well enough to make operating systems (e.g. NetBSD) run without |
``faked'' well enough to allow guest operating systems run without |
77 |
complaining too much. Still, the emulator could be of interest for |
complaining too much. Still, the emulator could be of interest for |
78 |
academic research and experiments, such as when learning how to write |
academic research and experiments, such as when learning how to write |
79 |
operating system code. |
operating system code. |
80 |
|
|
81 |
<p>The emulator is written in C, does not depend on external libraries |
<p>The emulator is written in C, does not depend on third-party libraries |
82 |
(except X11, but that is optional), and should compile and run on most |
(except X11, but that is optional), and should compile and run on most |
83 |
Unix-like systems. If it doesn't, then that is a bug. |
Unix-like systems. |
84 |
|
|
85 |
<p>The emulator contains code which tries to emulate the workings of CPUs |
<p>The emulator contains code which tries to emulate the workings of CPUs |
86 |
and surrounding hardware found in real machines, but it does not contain |
and surrounding hardware found in real machines, but it does not contain |
159 |
|
|
160 |
<p>The emulator's performance is highly dependent on both runtime settings |
<p>The emulator's performance is highly dependent on both runtime settings |
161 |
and on compiler settings, so you might want to experiment with different |
and on compiler settings, so you might want to experiment with different |
162 |
CC and CFLAGS environment variable values. For example, on a modern PC, |
CC and CFLAGS environment variable values. For example, on an AMD Athlon |
163 |
you could try the following: |
host, you might want to try setting <tt>CFLAGS</tt> to <tt>-march=athlon |
164 |
<p><pre> |
-O3</tt> before running <tt>configure</tt>. |
|
$ <b>CFLAGS="-mcpu=pentium4 -O3" ./configure</b> |
|
|
$ <b>make</b> |
|
|
</pre> |
|
165 |
|
|
166 |
|
|
167 |
|
|
219 |
Emulation of R4000, which is a 64-bit CPU, was my initial goal. |
Emulation of R4000, which is a 64-bit CPU, was my initial goal. |
220 |
R2000/R3000-like CPUs (32-bit), R1x000, and generic MIPS32/MIPS64-style |
R2000/R3000-like CPUs (32-bit), R1x000, and generic MIPS32/MIPS64-style |
221 |
CPUs are also emulated, and are hopefully almost as stable as the R4000 |
CPUs are also emulated, and are hopefully almost as stable as the R4000 |
222 |
emulation. |
emulation. Several guest operating systems for MIPS can run inside |
223 |
|
the emulator. |
224 |
|
|
225 |
<p>I have written an experimental dynamic binary translation subsystem. |
<p>(For MIPS emulation, I have written an experimental dynamic binary |
226 |
This gives higher total performance than interpreting one instruction at a |
translation subsystem, for Alpha and i386 hosts. This gives higher total |
227 |
time and executing it. (If you wish to disable bintrans, add <b>-B</b> to |
performance than interpreting one instruction at a time and executing it. |
228 |
the command line.) |
If you wish to disable bintrans, add <b>-B</b> to the command line.) |
229 |
|
|
230 |
<h4>ARM:</h4> |
<h4>ARM:</h4> |
231 |
|
|
232 |
The ARM CPU emulation is good enough to run NetBSD/cats and OpenBSD/cats |
ARM emulation is good enough to run NetBSD/cats 2.1 and OpenBSD/cats 3.8, |
233 |
(almost bugfree :-), but it is not as tested or fine-tuned as the MIPS |
but it is not as tested or fine-tuned as the MIPS emulation mode. |
|
emulation. |
|
234 |
|
|
235 |
<h4>Other CPU types:</h4> |
<h4>PowerPC:</h4> |
236 |
|
|
237 |
Some other CPU architectures can also be partially emulated. These are not |
PowerPC emulation is still in its beginning stages, but good enough |
238 |
working well enough yet to run guest operating systems. |
to run NetBSD/prep 2.1. |
239 |
|
|
240 |
|
<p>Non-MIPS emulation modes use dynamic translation, but not recompilation |
241 |
|
into native code. This makes it possible to run on any host platform. |
242 |
|
|
243 |
|
|
244 |
|
|
267 |
option. (Deterministic in this case does <i>not</i> mean that the |
option. (Deterministic in this case does <i>not</i> mean that the |
268 |
emulation will be identical to some actual real-world machine.) |
emulation will be identical to some actual real-world machine.) |
269 |
|
|
270 |
|
<p><font color="#ff0000">(Oops/TODO: User interaction means <i>both</i> |
271 |
|
input to the emulated program/OS, and interacting with the emulator |
272 |
|
itself. Breaking into the debugger and then continuing execution may |
273 |
|
affect when/how interrupts occur.)</font> |
274 |
|
|
275 |
|
|
276 |
|
|
277 |
|
|
278 |
|
|
289 |
<li><b><u>MIPS</u></b> |
<li><b><u>MIPS</u></b> |
290 |
<ul> |
<ul> |
291 |
<li><b>DECstation 5000/200</b> ("3max") |
<li><b>DECstation 5000/200</b> ("3max") |
|
<br>Serial controller (including keyboard and mouse), ethernet, |
|
|
SCSI, and graphical framebuffers. |
|
292 |
<p> |
<p> |
293 |
<li><b>Acer Pica-61</b> (an ARC machine) |
<li><b>Acer Pica-61</b> (an ARC machine) |
|
<br>Serial controller, "VGA" text console, and SCSI. |
|
294 |
<p> |
<p> |
295 |
<li><b>NEC MobilePro 770, 780, 800, and 880</b> (HPCmips machines) |
<li><b>NEC MobilePro 770, 780, 800, and 880</b> (HPCmips machines) |
|
<br>Framebuffer, keyboard, and a PCMCIA IDE controller. |
|
296 |
<p> |
<p> |
297 |
<li><b>Cobalt</b> |
<li><b>Cobalt</b> |
|
<br>Serial controller and PCI IDE. |
|
298 |
<p> |
<p> |
299 |
<li><b>Malta (evbmips)</b> |
<li><b>Malta</b> (evbmips) |
|
<br>Serial controller and PCI IDE. |
|
300 |
<p> |
<p> |
301 |
<li><b>SGI O2 ("IP32")</b> |
<li><b>SGI O2 ("IP32")</b> |
302 |
<br>Serial controller and ethernet. <small>(Enough for |
<br><small>(Enough for root-on-nfs, but not for disk boot.)</small> |
|
root-on-nfs, but not for disk boot.)</small> |
|
303 |
</ul> |
</ul> |
304 |
<p> |
<p> |
305 |
<li><b><u>ARM</u></b> |
<li><b><u>ARM</u></b> |
306 |
<ul> |
<ul> |
307 |
<li><b>CATS</b> |
<li><b>CATS</b> |
308 |
<br>VGA and PCI IDE. |
</ul> |
309 |
|
<p> |
310 |
|
<li><b><u>PowerPC</u></b> |
311 |
|
<ul> |
312 |
|
<li><b>PReP (PowerPC Reference Platform)</b> |
313 |
</ul> |
</ul> |
314 |
</ul> |
</ul> |
315 |
|
|
459 |
<td></td> |
<td></td> |
460 |
</tr> |
</tr> |
461 |
|
|
462 |
|
<tr><td height="10"></td></tr> |
463 |
|
|
464 |
|
<tr> |
465 |
|
<td></td> |
466 |
|
<td align="center"><a href="20051123-netbsd-prep.png"><img src="20051123-netbsd-prep_small.png"></a></td> |
467 |
|
<td></td> |
468 |
|
<td><a href="http://www.netbsd.org/Ports/prep/">NetBSD/prep</a> |
469 |
|
<br>PReP</td> |
470 |
|
<td></td> |
471 |
|
</tr> |
472 |
|
|
473 |
</table></center> |
</table></center> |
474 |
|
|
475 |
|
|