10 |
|
|
11 |
<!-- |
<!-- |
12 |
|
|
13 |
$Id: intro.html,v 1.87 2006/06/23 10:00:41 debug Exp $ |
$Id: intro.html,v 1.106 2007/02/18 09:19:47 debug Exp $ |
14 |
|
|
15 |
Copyright (C) 2003-2006 Anders Gavare. All rights reserved. |
Copyright (C) 2003-2007 Anders Gavare. All rights reserved. |
16 |
|
|
17 |
Redistribution and use in source and binary forms, with or without |
Redistribution and use in source and binary forms, with or without |
18 |
modification, are permitted provided that the following conditions are met: |
modification, are permitted provided that the following conditions are met: |
73 |
hardware components are emulated well enough to let unmodified operating |
hardware components are emulated well enough to let unmodified operating |
74 |
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. |
75 |
|
|
76 |
<p>Devices and processors (ARM, MIPS, PowerPC) are not simulated with 100% |
<p>Devices and processors are not simulated with 100% accuracy. They are |
77 |
accuracy. They are only ``faked'' well enough to allow guest operating |
only ``faked'' well enough to allow guest operating systems to run without |
78 |
systems run without complaining too much. Still, the emulator could be of |
complaining too much. Still, the emulator could be of interest for |
79 |
interest for academic research and experiments, such as when learning how |
academic research and experiments, such as when learning how to write |
80 |
to write operating system code. |
operating system code. |
81 |
|
|
82 |
<p>The emulator is written in C, does not depend on third-party libraries, |
<p>The emulator is written in C, does not depend on third-party libraries, |
83 |
and should compile and run on most 64-bit and 32-bit Unix-like systems. |
and should compile and run on most 64-bit and 32-bit Unix-like systems. |
95 |
|
|
96 |
<p>If you do not have a kernel as a separate file, but you have a bootable |
<p>If you do not have a kernel as a separate file, but you have a bootable |
97 |
disk image, then it is sometimes possible to boot directly from that |
disk image, then it is sometimes possible to boot directly from that |
98 |
image. (This works for example with DECstation emulation, or when booting |
image. (This works for example with DECstation emulation, Dreamcast |
99 |
from ISO9660 CDROM images.) |
emulation, or when booting from generic ISO9660 CDROM images if the |
100 |
|
kernel is included in the image as a plain file.) |
101 |
|
|
102 |
|
<p>Thanks to (in no specific order) Joachim Buss, Olivier Houchard, Juli |
103 |
|
Mallett, Juan Romero Pardines, Alec Voropay, Göran Weinholt, Alexander |
104 |
|
Yurchenko, and everyone else who has provided me with feedback. |
105 |
|
|
106 |
|
|
107 |
|
|
217 |
<h3>Which processor architectures does GXemul emulate?</h3> |
<h3>Which processor architectures does GXemul emulate?</h3> |
218 |
|
|
219 |
The architectures that are emulated well enough to let at least one |
The architectures that are emulated well enough to let at least one |
220 |
guest operating system run (per architecture) are ARM, MIPS, and |
guest operating system run (per architecture) are ARM, MIPS, PowerPC, |
221 |
PowerPC. |
and SuperH. |
222 |
|
|
223 |
|
<p>Please read the page about <a href="guestoses.html">guest operating |
224 |
|
systems</a> for more information about the machines and operating systems |
225 |
|
that can be considered "working" in the emulator. |
226 |
|
|
227 |
|
|
228 |
|
|
229 |
|
|
233 |
<a name="hosts"></a> |
<a name="hosts"></a> |
234 |
<h3>Which host architectures are supported?</h3> |
<h3>Which host architectures are supported?</h3> |
235 |
|
|
236 |
As of release 0.4.0 of GXemul, the old binary translation subsystem, which |
GXemul should compile and run on any modern host architecture (64-bit or |
237 |
was used for emulation of MIPS processors on Alpha and i386 hosts, has |
32-bit word-length). |
238 |
been removed. The current dynamic translation subsystem should work on any |
|
239 |
host. |
<p>Note: The dynamic translation engine does <i>not</i> require backends |
240 |
|
for native code generation to be written for each individual host |
241 |
|
architecture; the "intermediate representation" that the dyntrans system |
242 |
|
uses can be executed on any host architecture. |
243 |
|
|
244 |
|
|
245 |
|
|
430 |
translations are invalidated, and replaced by normal instruction calls |
translations are invalidated, and replaced by normal instruction calls |
431 |
(one per emulated instruction). |
(one per emulated instruction). |
432 |
|
|
433 |
<p><b>Native Code Back-ends: (not in this release)</b> |
<p><b>Native Code Back-ends:</b> |
434 |
|
|
435 |
<p>In theory, it will be possible to implement native code generation |
<p>In theory, it will be possible to implement native code generation, |
436 |
(similar to what is used in high-performance emulators such as QEMU), |
similar to what is used in high-performance emulators such as QEMU, |
437 |
as long as that generated code abides to the C ABI on the host, but |
as long as that generated code abides to the C ABI on the host. |
438 |
for now I wanted to make sure that GXemul works without such native |
|
439 |
code back-ends. For this reason, as of release 0.4.0, GXemul is |
<p>However, since I wanted to make sure that GXemul works without such |
440 |
completely free of native code back-ends. |
native code back-ends, there are no implemented backends in this release. |
441 |
|
|
442 |
|
<p>(There is a place-holder in the source code for native code generation, |
443 |
|
which can be used for experiments, but it does not contain any working |
444 |
|
code at the moment.) |
445 |
|
|
446 |
|
|
447 |
|
|
462 |
operating systems think that they are there, but for all practical |
operating systems think that they are there, but for all practical |
463 |
purposes, these caches are non-working. |
purposes, these caches are non-working. |
464 |
|
|
465 |
<p>The emulator is <i>not</i> timing-accurate. It can be run in a |
<p>The emulator is in general <i>not</i> timing-accurate, neither at the |
466 |
"deterministic" mode, <tt><b>-D</b></tt>. The meaning of deterministic is |
instruction level nor on any higher level. An attempt is made to let |
467 |
simply that running two emulations with the same settings will result in |
emulated clocks run at the same speed as the host (i.e. an emulated timer |
468 |
identical runs. Obviously, this requires that no user interaction is |
running at 100 Hz will interrupt around 100 times per real second), but |
469 |
taking place, and that clock speeds are fixed with the <tt><b>-I</b></tt> |
since the host speed may vary, e.g. because of other running processes, |
470 |
option. (Deterministic in this case does <i>not</i> mean that the |
there is no guarantee as to how many instructions will be executed in |
471 |
emulation will be identical to some actual real-world machine.) |
each of these 100 Hz cycles. |
472 |
|
|
473 |
<p>(Note that user interaction means <i>both</i> input to the emulated |
<p>If the host is very slow, the emulated clocks might even lag behind |
474 |
program/OS, and interaction with the emulator's debugger. Breaking into the |
the real-world clock. |
|
debugger and then continuing execution may affect when/how interrupts |
|
|
occur.) |
|
475 |
|
|
476 |
|
|
477 |
|
|
489 |
<ul> |
<ul> |
490 |
<li><b><u>ARM</u></b> |
<li><b><u>ARM</u></b> |
491 |
<ul> |
<ul> |
492 |
<li><b>CATS</b> (NetBSD/cats, OpenBSD/cats) |
<li><b>CATS</b> (<a href="guestoses.html#netbsdcatsinstall">NetBSD/cats</a>, |
493 |
<li><b>IQ80321</b> (NetBSD/evbarm) |
<a href="guestoses.html#openbsdcatsinstall">OpenBSD/cats</a>) |
494 |
|
<li><b>IQ80321</b> (<a href="guestoses.html#netbsdevbarminstall">NetBSD/evbarm</a>) |
495 |
|
<li><b>NetWinder</b> (<a href="guestoses.html#netbsdnetwinderinstall">NetBSD/netwinder</a>) |
496 |
</ul> |
</ul> |
497 |
<p> |
<p> |
498 |
<li><b><u>MIPS</u></b> |
<li><b><u>MIPS</u></b> |
499 |
<ul> |
<ul> |
500 |
<li><b>DECstation 5000/200</b> (NetBSD/pmax, OpenBSD/pmax, Ultrix, |
<li><b>DECstation 5000/200</b> (<a href="guestoses.html#netbsdpmaxinstall">NetBSD/pmax</a>, |
501 |
Linux/DECstation, Sprite) |
<a href="guestoses.html#openbsdpmaxinstall">OpenBSD/pmax</a>, |
502 |
<li><b>Acer Pica-61</b> (NetBSD/arc) |
<a href="guestoses.html#ultrixinstall">Ultrix</a>, |
503 |
<li><b>NEC MobilePro 770, 780, 800, and 880</b> (NetBSD/hpcmips) |
<a href="guestoses.html#declinux">Linux/DECstation</a>, |
504 |
<li><b>Cobalt</b> (NetBSD/cobalt) |
<a href="guestoses.html#sprite">Sprite</a>) |
505 |
<li><b>Malta</b> (NetBSD/evbmips) |
<li><b>Acer Pica-61</b> (<a href="guestoses.html#netbsdarcinstall">NetBSD/arc</a>) |
506 |
<li><b>SGI O2 (aka IP32)</b> <font color="#0000e0">(<super>*</super>)</font> |
<li><b>NEC MobilePro 770, 780, 800, 880</b> (<a href="guestoses.html#netbsdhpcmipsinstall">NetBSD/hpcmips</a>) |
507 |
(NetBSD/sgi) |
<li><b>Cobalt</b> (<a href="guestoses.html#netbsdcobaltinstall">NetBSD/cobalt</a>) |
508 |
|
<li><b>Malta</b> (<a href="guestoses.html#netbsdevbmipsinstall">NetBSD/evbmips</a>, Linux/Malta <font color="#0000e0">(<super>*1</super>)</font>) |
509 |
|
<li><b>Algorithmics P5064</b> (<a href="guestoses.html#netbsdalgorinstall">NetBSD/algor</a>) |
510 |
|
<li><b>SGI O2 (aka IP32)</b> <font color="#0000e0">(<super>*2</super>)</font> |
511 |
|
(<a href="guestoses.html#netbsdsgimips">NetBSD/sgi</a>) |
512 |
</ul> |
</ul> |
513 |
<p> |
<p> |
514 |
<li><b><u>PowerPC</u></b> |
<li><b><u>PowerPC</u></b> |
515 |
<ul> |
<ul> |
516 |
<li><b>IBM 6050/6070 (PReP, PowerPC Reference Platform)</b> (NetBSD/prep) |
<li><b>IBM 6050/6070 (PReP, PowerPC Reference Platform)</b> (<a href="guestoses.html#netbsdprepinstall">NetBSD/prep</a>) |
517 |
|
<li><b>MacPPC (generic "G4" Macintosh)</b> (<a href="guestoses.html#netbsdmacppcinstall">NetBSD/macppc</a>) |
518 |
|
</ul> |
519 |
|
<p> |
520 |
|
<li><b><u>SuperH</u></b> |
521 |
|
<ul> |
522 |
|
<li><b>Sega Dreamcast</b> (<a href="dreamcast.html#netbsd_generic_md">NetBSD/dreamcast</a>) |
523 |
</ul> |
</ul> |
524 |
</ul> |
</ul> |
525 |
|
|
526 |
<p><small><font color="#0000e0">(<super>*</super>)</font> = |
<p> |
527 |
Enough for root-on-nfs, but not for disk boot.)</small> |
<small><font color="#0000e0">(<super>*1</super>)</font> = |
528 |
|
Linux/Malta may be run as a guest OS, however I have not yet found any stable |
529 |
|
URL to pre-compiled Linux/Malta kernels. Thus, Linux/Malta emulation is not |
530 |
|
tested for every release of the emulator; sometimes it works, sometimes |
531 |
|
it doesn't.</small> |
532 |
|
|
533 |
|
<br><small><font color="#0000e0">(<super>*2</super>)</font> = |
534 |
|
SGI O2 emulation is enough for root-on-nfs, but not for disk boot.</small> |
535 |
|
|
536 |
|
|
537 |
<p>There is code in GXemul for emulation of many other machine types; the |
<p>There is code in GXemul for emulation of many other machine types; the |
538 |
degree to which these work range from almost being able to run a complete |
degree to which these work range from almost being able to run a complete |
548 |
<li>a console I/O device (putchar() and getchar()...) |
<li>a console I/O device (putchar() and getchar()...) |
549 |
<li>an inter-processor communication device, for SMP experiments |
<li>an inter-processor communication device, for SMP experiments |
550 |
<li>a very simple linear framebuffer device (for graphics output) |
<li>a very simple linear framebuffer device (for graphics output) |
551 |
<li>a simple SCSI disk controller |
<li>a simple disk controller |
552 |
<li>a simple ethernet controller |
<li>a simple ethernet controller |
553 |
|
<li>a real-time clock device |
554 |
</ul> |
</ul> |
555 |
|
|
556 |
<p>This mode is useful if you wish to run experimental code, but do not |
<p>This mode is useful if you wish to run experimental code, but do not |