/[gxemul]/trunk/doc/misc.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/misc.html

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

revision 43 by dpavlin, Mon Oct 8 16:22:32 2007 UTC revision 44 by dpavlin, Mon Oct 8 16:22:56 2007 UTC
# Line 4  Line 4 
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>&nbsp;&nbsp;
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.70 2007/06/15 06:26:20 debug Exp $  $Id: misc.html,v 1.73 2007/06/23 16:59:35 debug Exp $
14    
15  Copyright (C) 2003-2007  Anders Gavare.  All rights reserved.  Copyright (C) 2003-2007  Anders Gavare.  All rights reserved.
16    
# Line 113  complement to testing on real hardware. Line 113  complement to testing on real hardware.
113          <p>          <p>
114          <li>Caches. There is no cache emulation in GXemul right now. Caches          <li>Caches. There is no cache emulation in GXemul right now. Caches
115          for R2000/R3000 are faked well enough to run NetBSD, Ultrix, etc          for R2000/R3000 are faked well enough to run NetBSD, Ultrix, etc
116          in the DECstation emulation mode, but other than that, cache          in the <a href="http://en.wikipedia.org/wiki/DECstation">DECstation</a>
117          operations are treated as nops.          emulation mode, but other than that, cache operations are treated as nops.
118  </ul>  </ul>
119    
120  <p>The bottom line is that GXemul can be useful as yet another way to test  <p>The bottom line is that GXemul can be useful as yet another way to test
# Line 139  might be suitable choices. Line 139  might be suitable choices.
139          then compile into object format, and then you need to link this          then compile into object format, and then you need to link this
140          into an executable image. This is much closer to how things work          into an executable image. This is much closer to how things work
141          in real life than running assembly language listings in a simulator          in real life than running assembly language listings in a simulator
142          (e.g. SPIM).          (e.g. <a href="http://pages.cs.wisc.edu/~larus/spim.html">SPIM</a>).
143    <p>    <p>
144    <li><b>(-)</b>&nbsp;&nbsp;GXemul does not simulate out-of-order    <li><b>(-)</b>&nbsp;&nbsp;GXemul does not simulate <a href="http://en.wikipedia.org/wiki/Out-of-order_execution">out-of-order
145          execution, penalties related to instruction scheduling, or          execution</a>, penalties related to instruction scheduling, or
146          load-delays, so it cannot be used to create optimizing compilers          load-delays, so it cannot be used to create optimizing compilers
147          that take advantage of such processor features. GXemul keeps          that take advantage of such processor features. GXemul keeps
148          track of the number of instructions executed, but that's it.          track of the number of instructions executed, and that's it.
149  </ul>  </ul>
150    
151    
# Line 162  are one or more single-character options Line 162  are one or more single-character options
162  to get a list of possible options.  to get a list of possible options.
163    
164  <p>  <p>
165  Here are some examples. If you want to run a NetBSD/pmax kernel on an  Here are some examples. If you want to run a <a href="http://www.netbsd.org/ports/pmax/">NetBSD/pmax</a>
166  emulated DECstation machine, you would use a command line such as this:  kernel on an emulated <a href="http://en.wikipedia.org/wiki/DECstation">DECstation</a>
167    machine, you would use a command line such as this:
168  <pre>  <pre>
169          $ <b>gxemul -e 3max -d pmax_diskimage.fs netbsd-pmax-INSTALL</b>          $ <b>gxemul -e 3max -d pmax_diskimage.fs netbsd-pmax-INSTALL</b>
170  </pre>  </pre>
# Line 499  are, so don't expect any PROM image to j Line 500  are, so don't expect any PROM image to j
500    
501  <p>  <p>
502  <h4>Dumping the PROM on a DECstation 5000/125:</h4>  <h4>Dumping the PROM on a DECstation 5000/125:</h4>
503    
504  The image first needs to be extracted from the machine. There are  The image first needs to be extracted from the machine. There are
505  several ways to do this.  several ways to do this.
506    
507  <ul>  <ul>
508    <li>Use hardware to read the PROM chip(s) directly. Not easy if you    <li>Use hardware to read the PROM chip(s) directly. Not easy if you
509          don't have such a hardware reader.          don't have such a hardware reader.
# Line 511  several ways to do this. Line 514  several ways to do this.
514    <li>Hook up a serial console and dump using the PROM's own dump    <li>Hook up a serial console and dump using the PROM's own dump
515          command.          command.
516  </ul>  </ul>
517  <p>  
518  The easiest way is to hook up a serial console. The terminal must be  <p>The easiest way is to hook up a serial console. The terminal must be
519  able to capture output to a file.  able to capture output to a file.
520  <p>  
521  These are approximately the commands that I used:  <p>These are approximately the commands that I used:
522  <pre>  <pre>
523          >><b>cnfg</b>                             <i>Show machine configuration</i>          >><b>cnfg</b>                             <i>Show machine configuration</i>
524    
# Line 525  These are approximately the commands tha Line 528  These are approximately the commands tha
528    
529          >><b>e -x 0xbfc00000:0xbfffffff</b>       <i>Dump the PROM data</i>          >><b>e -x 0xbfc00000:0xbfffffff</b>       <i>Dump the PROM data</i>
530  </pre>  </pre>
531  <p>  
532  Remember that DECstations are little endian, so if the dump data  <p>Remember that DECstations are little endian, so if the dump data
533  looks like this:  looks like this:
534  <pre>  <pre>
535          bfc00000:  0x0bf0007e          bfc00000:  0x0bf0007e
536  </pre>  </pre>
537  then the bytes in memory are actually 0x7e, 0x00, 0xf0, and 0x0b.  then the bytes in memory are actually 0x7e, 0x00, 0xf0, and 0x0b.
538  <p>  
539  At 9600 bps, about 10KB can be dumped per minute, so it takes a while.  <p>At 9600 bps, about 10KB can be dumped per minute, so it takes a while.
540  Once enough of the PROM has been dumped, you can press CTRL-C to break out.  Once enough of the PROM has been dumped, you can press CTRL-C to break out.
541  Then, restore the more environment variable:  Then, restore the more environment variable:
542  <pre>  <pre>
543          >><b>setenv more 24</b>          >><b>setenv more 24</b>
544  </pre>  </pre>
545  <p>  
546  Now, convert the data you just saved (little-endian words -> bytes),  <p>Now, convert the data you just saved (little-endian words -> bytes),
547  and store in a file. Let's call this file DECstation5000_125_promdump.bin.  and store in a file. Let's call this file DECstation5000_125_promdump.bin.
548  <pre>  <pre>
549          $ <b>decprom_dump_txt_to_bin DECstation5000_125_promdump.txt DECstation5000_125_promdump.bin</b>          $ <b>decprom_dump_txt_to_bin DECstation5000_125_promdump.txt DECstation5000_125_promdump.bin</b>
550  </pre>  </pre>
551    
552  This binary image can now be used in the emulator:  This binary image can now be used in the emulator:
553  <pre>  <pre>
554          $ <b>gxemul -e 3min -Q -M128 -q 0xbfc00000:DECstation5000_125_promdump.bin</b>          $ <b>gxemul -e 3min -Q -M128 -q 0xbfc00000:DECstation5000_125_promdump.bin</b>

Legend:
Removed from v.43  
changed lines
  Added in v.44

  ViewVC Help
Powered by ViewVC 1.1.26