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> |
<b>Gavare's eXperimental Emulator:</b></font><br> |
8 |
<font color="#000000" size="6"><b>Miscellaneous</b> |
<font color="#000000" size="6"><b>Miscellaneous</b> |
9 |
</font></td></tr></table></td></tr></table><p> |
</font></td></tr></table></td></tr></table><p> |
10 |
|
|
11 |
<!-- |
<!-- |
12 |
|
|
13 |
$Id: misc.html,v 1.58 2005/11/25 22:35:44 debug Exp $ |
$Id: misc.html,v 1.65 2006/10/19 10:15:23 debug Exp $ |
14 |
|
|
15 |
Copyright (C) 2003-2005 Anders Gavare. All rights reserved. |
Copyright (C) 2003-2006 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: |
47 |
|
|
48 |
<p> |
<p> |
49 |
<ul> |
<ul> |
|
<li><a href="#networking">Networking</a> |
|
50 |
<li><a href="#devel">Writing operating system code, or |
<li><a href="#devel">Writing operating system code, or |
51 |
developing firmware, using GXemul</a> |
developing firmware, using GXemul</a> |
52 |
<li><a href="#compilercontruct">Using GXemul in compiler contruction courses</a> |
<li><a href="#compilercontruct">Using GXemul in compiler contruction courses</a> |
63 |
|
|
64 |
|
|
65 |
|
|
|
<p><br> |
|
|
<a name="networking"></a> |
|
|
<h3>Networking:</h3> |
|
|
|
|
|
It is possible to let the guest OS running inside the emulator get access to |
|
|
the Internet. If you are interested in the technical details, and the |
|
|
reasons why networking is implemented in the emulator the way it currently |
|
|
is implemented, you might want to read the <a href="technical.html#net"> |
|
|
networking section in the technical documentation</a>. |
|
|
|
|
|
<p><font color="#ff0000">This is still experimental, hackish, and |
|
|
rather buggy. With NetBSD running as guest operating system, it mostly |
|
|
works.</font> |
|
|
|
|
|
<p>When only one machine is being emulated, the following default values |
|
|
apply:<pre> |
|
|
IPv4 address: 10.0.0.1 |
|
|
Netmask: 255.0.0.0 |
|
|
Gateway: 10.0.0.254 |
|
|
</pre> |
|
|
|
|
|
<p>The emulated machine must of course have a NIC which is emulated |
|
|
correctly. At the moment, the following NICs should work: |
|
|
<ul> |
|
|
<li><tt><b>ether</b></tt>, the "fake" experimental ethernet device |
|
|
(documented <a href="experiments.html#expdevices">here</a>) |
|
|
<li><tt><b>le</b></tt>, Turbochannel Lance Ethernet, as used in |
|
|
DECstation 5000/200 ("3max") |
|
|
<li><tt><b>mec</b></tt>, the SGI O2's ethernet controller |
|
|
<li><tt><b>dec21143</b></tt>, Digital's 21143 NIC (known as <tt>dc</tt> |
|
|
in OpenBSD, or <tt>tlp</tt> in NetBSD) |
|
|
</ul> |
|
|
|
|
|
<p>The emulator acts as a NAT-like gateway/firewall; to the outside world |
|
|
it will seem like it is the host's OS that connects to other machines on |
|
|
the internet, not the guest OS. |
|
|
|
|
|
|
|
|
|
|
|
|
|
66 |
|
|
67 |
|
|
68 |
<p><br> |
<p><br> |
103 |
<li>CPU details in GXemul are usually wrong. If your code depends |
<li>CPU details in GXemul are usually wrong. If your code depends |
104 |
on, say, R10000 or MIPS64 specifics, chances are that GXemul will |
on, say, R10000 or MIPS64 specifics, chances are that GXemul will |
105 |
not be sufficient. One example is different revisions of ISAs; |
not be sufficient. One example is different revisions of ISAs; |
106 |
64-bit MIPS instructions which should trigger an exception on a |
some instructions which should trigger an exception on a |
107 |
real 32-bit MIPS processor usually execute anyway in GXemul. Another |
real MIPS processor usually execute anyway in GXemul. Another |
108 |
example is if userland code tries to access kernel memory; in some |
example is if userland code tries to access kernel memory; in some |
109 |
cases there is protection against this, but not in all cases (to get |
cases there is protection against this, but not in all cases (to get |
110 |
higher performance). |
higher performance). |
133 |
|
|
134 |
<ul> |
<ul> |
135 |
<li><b>(+)</b> Your compiler needs to output real assembly |
<li><b>(+)</b> Your compiler needs to output real assembly |
136 |
language code, which the assembler (eg gas, the GNU assembler) can |
language code, which the assembler (e.g. gas, the GNU assembler) can |
137 |
then compile into object format, and then you need to link this |
then compile into object format, and then you need to link this |
138 |
into an executable image. This is much closer to how things work |
into an executable image. This is much closer to how things work |
139 |
in real life than running assembly language listings in a simulator |
in real life than running assembly language listings in a simulator |
140 |
(eg SPIM). |
(e.g. SPIM). |
141 |
<p> |
<p> |
142 |
<li><b>(-)</b> GXemul does not simulate out-of-order |
<li><b>(-)</b> GXemul does not simulate out-of-order |
143 |
execution, penalties related to instruction scheduling, or |
execution, penalties related to instruction scheduling, or |
256 |
<a name="filexfer"></a> |
<a name="filexfer"></a> |
257 |
<h3>Transfering files to/from the guest OS:</h3> |
<h3>Transfering files to/from the guest OS:</h3> |
258 |
|
|
259 |
If the emulated machine supports networking (see |
If the emulated machine supports networking (see <a |
260 |
<a href="#networking">above</a>), then transfering files via FTP is |
href="networking.html#intro">this section</a> for more info), then |
261 |
probably easiest. |
transfering files via FTP is probably easiest. |
262 |
|
|
263 |
<p>There is another way of transfering files which works for any kind of |
<p>There is another way of transfering files which works for any kind of |
264 |
emulated machine which supports disks (either SCSI or IDE). Any file can |
emulated machine which supports disks (either SCSI or IDE). Any file can |
340 |
<a name="userland"></a> |
<a name="userland"></a> |
341 |
<h3>Running userland binaries:</h3> |
<h3>Running userland binaries:</h3> |
342 |
|
|
343 |
<font color="#ff0000">Note: This does not really work yet.</font> |
<font color="#ff0000">Note: This feature does not really work yet. |
344 |
|
It is currently disabled in stable release builds of the emulator.</font> |
345 |
|
|
346 |
<p>There is some skeleton code for running userland programs as well. This |
<p>There is some skeleton code for running userland programs as well. This |
347 |
will not emulate any particular machine, but instead try to translate |
will not emulate any particular machine, but instead try to translate |