/[gxemul]/trunk/doc/intro.html
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /trunk/doc/intro.html

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 22 by dpavlin, Mon Oct 8 16:19:37 2007 UTC revision 38 by dpavlin, Mon Oct 8 16:21:53 2007 UTC
# Line 10  Line 10 
10    
11  <!--  <!--
12    
13  $Id: intro.html,v 1.73 2006/02/18 14:02:19 debug Exp $  $Id: intro.html,v 1.108 2007/04/12 16:57:22 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:
# Line 52  SUCH DAMAGE. Line 52  SUCH DAMAGE.
52    <li><a href="#build">How to compile/build the emulator</a>    <li><a href="#build">How to compile/build the emulator</a>
53    <li><a href="#run">How to run the emulator</a>    <li><a href="#run">How to run the emulator</a>
54    <li><a href="#cpus">Which processor architectures does GXemul emulate?</a>    <li><a href="#cpus">Which processor architectures does GXemul emulate?</a>
55      <li><a href="#hosts">Which host architectures are supported?</a>
56    <li><a href="#accuracy">Emulation accuracy</a>    <li><a href="#accuracy">Emulation accuracy</a>
57    <li><a href="#emulmodes">Which machines does GXemul emulate?</a>    <li><a href="#emulmodes">Which machines does GXemul emulate?</a>
58  </ul>  </ul>
# Line 71  emulation modes are available. In some m Line 72  emulation modes are available. In some m
72  hardware components are emulated well enough to let unmodified operating  hardware components are emulated well enough to let unmodified operating
73  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.
74    
75  <p>The processor architecture best emulated by GXemul is MIPS, but other  <p>Devices and processors are not simulated with 100% accuracy. They are
76  architectures such as ARM and PowerPC are also partially emulated.  only ``faked'' well enough to allow guest operating systems to run without
77    complaining too much. Still, the emulator could be of interest for
78  <p>Devices and CPUs are not simulated with 100% accuracy. They are only  academic research and experiments, such as when learning how to write
 ``faked'' well enough to allow guest operating systems run without  
 complaining too much. Still, the emulator could be of interest for  
 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 third-party libraries,  <p>The emulator is written in C, does not depend on third-party libraries,
# Line 96  even actual ROM images. A couple of diff Line 94  even actual ROM images. A couple of diff
94    
95  <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
96  disk image, then it is sometimes possible to boot directly from that  disk image, then it is sometimes possible to boot directly from that
97  image. (This works for example with DECstation emulation, or when booting  image. (This works for example with DECstation emulation, Dreamcast
98  from ISO9660 CDROM images.)  emulation, or when booting from generic ISO9660 CDROM images if the
99    kernel is included in the image as a plain file.)
100    
101    <p>Thanks to (in no specific order) Joachim Buss, Olivier Houchard, Juli
102    Mallett, Juan Romero Pardines, Alec Voropay, Göran Weinholt, Alexander
103    Yurchenko, and everyone else who has provided me with feedback.
104    
105    
106    
# Line 159  not have X11 libraries installed, some f Line 161  not have X11 libraries installed, some f
161  <p>The emulator's performance is highly dependent on both runtime settings  <p>The emulator's performance is highly dependent on both runtime settings
162  and on compiler settings, so you might want to experiment with different  and on compiler settings, so you might want to experiment with different
163  CC and CFLAGS environment variable values. For example, on an AMD Athlon  CC and CFLAGS environment variable values. For example, on an AMD Athlon
164  host, you might want to try setting <tt>CFLAGS</tt> to <tt>-march=athlon  host, you might want to try setting <tt>CFLAGS</tt> to <tt>-march=athlon</tt>
165  -O3</tt> before running <tt>configure</tt>.  before running <tt>configure</tt>.
166    
167    
168    
# Line 213  their original meaning in those xterm wi Line 215  their original meaning in those xterm wi
215  <a name="cpus"></a>  <a name="cpus"></a>
216  <h3>Which processor architectures does GXemul emulate?</h3>  <h3>Which processor architectures does GXemul emulate?</h3>
217    
218  <h4>MIPS:</h4>  The architectures that are emulated well enough to let at least one
219    guest operating system run (per architecture) are ARM, MIPS, PowerPC,
220    and SuperH.
221    
222    <p>Please read the page about <a href="guestoses.html">guest operating
223    systems</a> for more information about the machines and operating systems
224    that can be considered "working" in the emulator.
225    
 Emulation of R4000, which is a 64-bit CPU, was my initial goal.  
 R2000/R3000-like CPUs (32-bit), R1x000, and generic MIPS32/MIPS64-style  
 CPUs are also emulated, and are hopefully almost as stable as the R4000  
 emulation. Several guest operating systems for MIPS can run inside  
 the emulator.  
226    
 <p>(For MIPS emulation, I have written an experimental dynamic binary  
 translation subsystem, for Alpha and i386 hosts. This gives higher total  
 performance than interpreting one instruction at a time and executing it.  
 If you wish to disable bintrans, add <b>-B</b> to the command line.)  
227    
 <h4>ARM:</h4>  
228    
 ARM emulation is good enough to run NetBSD/cats, OpenBSD/cats, and  
 NetBSD/evbarm, but it is not as tested or fine-tuned as the MIPS emulation  
 mode.  
229    
 <h4>PowerPC:</h4>  
230    
231  PowerPC emulation is still in its beginning stages, but good enough  <p><br>
232  to run NetBSD/prep 2.1.  <a name="hosts"></a>
233    <h3>Which host architectures are supported?</h3>
234    
235    GXemul should compile and run on any modern host architecture (64-bit or
236    32-bit word-length).
237    
238  <p>Non-MIPS emulation modes use dynamic translation, but not recompilation  <p>Note: The <a href="translation.html">dynamic translation</a> engine
239  into native code. This makes it possible to run on any host platform.  does <i>not</i> require backends for native code generation to be written
240    for each individual host architecture; the intermediate representation
241    that the dyntrans system uses can be executed on any host architecture.
242    
243    
244    
# Line 249  into native code. This makes it possible Line 249  into native code. This makes it possible
249  <h3>Emulation accuracy:</h3>  <h3>Emulation accuracy:</h3>
250    
251  GXemul is an instruction-level emulator; things that would happen in  GXemul is an instruction-level emulator; things that would happen in
252  several steps within a real CPU are not taken into account (eg. pipe-line  several steps within a real CPU are not taken into account (e.g. pipe-line
253  stalls or out-of-order execution). Still, instruction-level accuracy seems  stalls or out-of-order execution). Still, instruction-level accuracy seems
254  to be enough to be able to run complete guest operating systems inside the  to be enough to be able to run complete guest operating systems inside the
255  emulator.  emulator.
256    
257  <p>Caches are by default not emulated. In some cases, the existance of  <p>The existance of instruction and data caches is "faked" to let
258  caches is "faked" to let operating systems think that they are there.  operating systems think that they are there, but for all practical
259  (There is some old code for R2000/R3000 caches, but it has probably  purposes, these caches are non-working.
260  suffered from bitrot by now.)  
261    <p>The emulator is in general <i>not</i> timing-accurate, neither at the
262  <p>The emulator is <i>not</i> timing-accurate. It can be run in a  instruction level nor on any higher level. An attempt is made to let
263  "deterministic" mode, <tt><b>-D</b></tt>. The meaning of deterministic is  emulated clocks run at the same speed as the host (i.e. an emulated timer
264  simply that running two emulations with the same settings will result in  running at 100 Hz will interrupt around 100 times per real second), but
265  identical runs. Obviously, this requires that no user interaction is  since the host speed may vary, e.g. because of other running processes,
266  taking place, and that clock speeds are fixed with the <tt><b>-I</b></tt>  there is no guarantee as to how many instructions will be executed in
267  option. (Deterministic in this case does <i>not</i> mean that the  each of these 100 Hz cycles.
268  emulation will be identical to some actual real-world machine.)  
269    <p>If the host is very slow, the emulated clocks might even lag behind
270  <p><font color="#ff0000">(Oops/TODO: User interaction means <i>both</i>  the real-world clock.
 input to the emulated program/OS, and interacting with the emulator  
 itself. Breaking into the debugger and then continuing execution may  
 affect when/how interrupts occur.)</font>  
271    
272    
273    
# Line 286  are emulated well enough to run at least Line 283  are emulated well enough to run at least
283    
284  <p>  <p>
285  <ul>  <ul>
286    <li><b><u>MIPS</u></b>    <li><b><u>ARM</u></b>
287    <ul>    <ul>
288      <li><b>DECstation 5000/200</b>&nbsp;&nbsp;("3max")      <li><b>CATS</b> (<a href="guestoses.html#netbsdcatsinstall">NetBSD/cats</a>,
289      <li><b>Acer Pica-61</b>&nbsp;&nbsp;(an ARC machine)          <a href="guestoses.html#openbsdcatsinstall">OpenBSD/cats</a>)
290      <li><b>NEC MobilePro 770, 780, 800, and 880</b>&nbsp;&nbsp;(HPCmips machines)      <li><b>IQ80321</b> (<a href="guestoses.html#netbsdevbarminstall">NetBSD/evbarm</a>)
291      <li><b>Cobalt</b>      <li><b>NetWinder</b> (<a href="guestoses.html#netbsdnetwinderinstall">NetBSD/netwinder</a>)
     <li><b>Malta</b> (evbmips)  
     <li><b>SGI O2 ("IP32")</b> <font color="#0000e0">(<super>*</super>)</font>  
292    </ul>    </ul>
293    <p>    <p>
294    <li><b><u>ARM</u></b>    <li><b><u>MIPS</u></b>
295    <ul>    <ul>
296      <li><b>CATS</b>      <li><b>DECstation 5000/200</b> (<a href="guestoses.html#netbsdpmaxinstall">NetBSD/pmax</a>,
297      <li><b>IQ80321</b> (evbarm)          <a href="guestoses.html#openbsdpmaxinstall">OpenBSD/pmax</a>,
298            <a href="guestoses.html#ultrixinstall">Ultrix</a>,
299            <a href="guestoses.html#declinux">Linux/DECstation</a>,
300            <a href="guestoses.html#sprite">Sprite</a>)
301        <li><b>Acer Pica-61</b> (<a href="guestoses.html#netbsdarcinstall">NetBSD/arc</a>)
302        <li><b>NEC MobilePro 770, 780, 800, 880</b> (<a href="guestoses.html#netbsdhpcmipsinstall">NetBSD/hpcmips</a>)
303        <li><b>Cobalt</b> (<a href="guestoses.html#netbsdcobaltinstall">NetBSD/cobalt</a>)
304        <li><b>Malta</b> (<a href="guestoses.html#netbsdevbmipsinstall">NetBSD/evbmips</a>, Linux/Malta <font color="#0000e0">(<super>*1</super>)</font>)
305        <li><b>Algorithmics P5064</b> (<a href="guestoses.html#netbsdalgorinstall">NetBSD/algor</a>)
306        <li><b>SGI O2 (aka IP32)</b> <font color="#0000e0">(<super>*2</super>)</font>
307            (<a href="guestoses.html#netbsdsgimips">NetBSD/sgi</a>)
308    </ul>    </ul>
309    <p>    <p>
310    <li><b><u>PowerPC</u></b>    <li><b><u>PowerPC</u></b>
311    <ul>    <ul>
312      <li><b>PReP (PowerPC Reference Platform)</b>      <li><b>IBM 6050/6070 (PReP, PowerPC Reference Platform)</b> (<a href="guestoses.html#netbsdprepinstall">NetBSD/prep</a>)
313        <li><b>MacPPC (generic "G4" Macintosh)</b> (<a href="guestoses.html#netbsdmacppcinstall">NetBSD/macppc</a>)
314      </ul>
315      <p>
316      <li><b><u>SuperH</u></b>
317      <ul>
318        <li><b>Sega Dreamcast</b> (<a href="dreamcast.html#netbsd_generic_md">NetBSD/dreamcast</a>, <a href="dreamcast.html#linux_live_cd">Linux/dreamcast</a>)
319    </ul>    </ul>
320  </ul>  </ul>
321    
322  <p><small><font color="#0000e0">(<super>*</super>)</font> =  <p>
323  Enough for root-on-nfs, but not for disk boot.)</small>  <small><font color="#0000e0">(<super>*1</super>)</font> =
324    Linux/Malta may be run as a guest OS, however I have not yet found any stable
325    URL to pre-compiled Linux/Malta kernels. Thus, Linux/Malta emulation is not
326    tested for every release of the emulator; sometimes it works, sometimes
327    it doesn't.</small>
328    
329    <br><small><font color="#0000e0">(<super>*2</super>)</font> =
330    SGI O2 emulation is enough for root-on-nfs, but not for disk boot.</small>
331    
332    
333  <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
334  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
# Line 325  such as: Line 344  such as:
344    <li>a console I/O device (putchar() and getchar()...)    <li>a console I/O device (putchar() and getchar()...)
345    <li>an inter-processor communication device, for SMP experiments    <li>an inter-processor communication device, for SMP experiments
346    <li>a very simple linear framebuffer device (for graphics output)    <li>a very simple linear framebuffer device (for graphics output)
347    <li>a simple SCSI disk controller    <li>a simple disk controller
348    <li>a simple ethernet controller    <li>a simple ethernet controller
349      <li>a real-time clock device
350  </ul>  </ul>
351    
352  <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

Legend:
Removed from v.22  
changed lines
  Added in v.38

  ViewVC Help
Powered by ViewVC 1.1.26