--- trunk/doc/misc.html 2007/10/08 16:18:19 8 +++ trunk/doc/misc.html 2007/10/08 16:22:56 44 @@ -1,18 +1,18 @@ -GXemul documentation: Misc. +Gavare's eXperimental Emulator:   Miscellaneous
-GXemul documentation:        -Misc. +GXemul:   +Miscellaneous

+ Back to the index


-

Misc.

+

Miscellaneous

@@ -363,8 +500,10 @@

Dumping the PROM on a DECstation 5000/125:

+ The image first needs to be extracted from the machine. There are several ways to do this. + -

-The easiest way is to hook up a serial console. The terminal must be + +

The easiest way is to hook up a serial console. The terminal must be able to capture output to a file. -

-These are approximately the commands that I used: + +

These are approximately the commands that I used:

         >>cnfg                             Show machine configuration
 
@@ -389,29 +528,30 @@
 
         >>e -x 0xbfc00000:0xbfffffff       Dump the PROM data
 
-

-Remember that DECstations are little endian, so if the dump data + +

Remember that DECstations are little endian, so if the dump data looks like this:

         bfc00000:  0x0bf0007e
 
then the bytes in memory are actually 0x7e, 0x00, 0xf0, and 0x0b. -

-At 9600 bps, about 10KB can be dumped per minute, so it takes a while. + +

At 9600 bps, about 10KB can be dumped per minute, so it takes a while. Once enough of the PROM has been dumped, you can press CTRL-C to break out. Then, restore the more environment variable:

         >>setenv more 24
 
-

-Now, convert the data you just saved (little-endian words -> bytes), + +

Now, convert the data you just saved (little-endian words -> bytes), and store in a file. Let's call this file DECstation5000_125_promdump.bin.

         $ decprom_dump_txt_to_bin DECstation5000_125_promdump.txt DECstation5000_125_promdump.bin
 
+ This binary image can now be used in the emulator:
-	$ gxemul -E dec -e 3min -Q -M128 -q 0xbfc00000:DECstation5000_125_promdump.bin
+	$ gxemul -e 3min -Q -M128 -q 0xbfc00000:DECstation5000_125_promdump.bin
 
 	KN02-BA V5.7e   
 	?TFL:  3/scc/access (1:Ln1 reg-12: actual=0x00 xpctd=0x01) [KN02-BA]
@@ -452,39 +592,74 @@
 	 osconsole=3
 	>>
 
-(Note: at the moment, this doesn't work. I must have broken something when -fixing something else, but this is what it looked like at the time.) -

-During bootup, the PROM complains a lot about hardware failures. + +

(Note: at the moment, this doesn't work. +I must have broken something when fixing something else, but this +is what it looked like at the time.) + +

During bootup, the PROM complains a lot about hardware failures. That's because the emulator doesn't emulate the hardware well enough yet. -

-The command line options used are: -E dec for DECstation, -e 3min for -"model 3" (5000/1xx), -Q to supress the emulator's own PROM -call emulation, -M128 for 128MB RAM (because GXemul doesn't correctly + +

The command line options used are: -e 3min for +"DECstation 3min" (5000/1xx), -Q to supress the emulator's own PROM +call emulation, -M128 for 128MB RAM (because GXemul doesn't correctly emulate memory detection well enough for the PROM to accept, so it will -always believe there is 128MB ram anyway), and -q to supress debug messages. -The 0xbfc00000 in front of the filename tells GXemul that it is a raw +always believe there is 128MB ram anyway), and -q to supress debug messages. +The 0xbfc00000 in front of the filename tells GXemul that it is a raw binary file which should be loaded at a specific virtual address.


-

Dumping the PROM on a SGI O2:

+

Dumping the PROM on a SGI O2:

The general ideas in this section applies to using ROM images from other -machines as well. Besides DECstation, I've also tried this on an SGI IP32 -("O2"). -

-For the O2, a suitable command to dump the prom memory range is +machines as well. I have also tried this on an SGI IP32 ("O2"), in addition +to the DECstation. + +

For the O2, a suitable command to dump the prom memory range is

 	>> dump -b 0xBFC00000:0xBFC80000
 
Make sure you capture all the output (via serial console) into a file, -and then run experiments/sgiprom_to_bin on the captured file. -

-(2005-01-16: The emulator doesn't really emulate the IP32 well enough to -actually run the PROM image without using special hacks, but it might do -so some time in the future.) +and then run experiments/sgiprom_to_bin on the captured file. +

+         + +    + +    + + +

The photo on the left is from the real machine. The other two are +screenshots of the PROM running experimentally in GXemul, using -Y2 +framebuffer scaledown. + +

Normally during bootup, the IP32 PROM does a Power-On test which makes +sure that the caches and other things are working properly. GXemul doesn't +emulate all those things well enough for the tests to pass. The +experimental screenshots above were taken with cache detection skipped +manually. + +

+In other words: don't expect this to work out-of-the-box with GXemul right +now. It might work once I've added correct cache emulation. + +

The command line used to start the emulator, once correct cache +emulation has been implemented, would be something like gxemul -XQeo2 +0xbfc00000:prom.bin. + +

The same caution applies when dealing with SGI PROMs as with +DECstation PROMs: GXemul doesn't really emulate the hardware, it only +"fakes" devices well enough to fool some things, primarily NetBSD, that +it is emulating a real machine. ROM code is usually a lot more +picky about the details. + +

The graphics used in the O2 is (as far as I know) undocumented. Combining +some traces of info from how Linux/O2 draws to the screen with some +reverse-engineering of my own, I've implemented enough of the controller to +let the PROM draw rectangles and bitmaps, but not much more. The SCSI +controller is not implemented yet either.