GXemul: Machines: sgi_ip32

Back to the index.

Back to the machine index.


sgi_ip32 machine

The sgi_ip32 machine template tries to emulate an SGI O2 machine, for experiments with primarily NetBSD/sgimips, OpenBSD/sgi, and Linux for O2.

NOTE: THE SGI O2 EMULATION MODE IN THE NEW FRAMEWORK IS NOT WORKING YET AT ALL! These are preliminary instructions on how it may work when the new GXemul framework, and in particular the SGI O2 emulation within that framework, is complete enough.

The new framework is planned to support things such as emulation of real CPU caches, and RAM at a non-zero base address, features used by the SGI O2 (and its PROM).


Experimenting with a PROM from a real SGI O2

This requires that you dump the PROM memory range from your real SGI O2 machine into a file. Using a serial console hooked up to your O2, executing the PROM command
	>> dump -b 0xBFC00000:0xBFC80000
will dump 512 KB of the PROM range. Make sure you capture all the output into a file, and then convert the result into a raw binary. (If you don't have time to write a converter tool yourself, there is an example converter in the GXemul source code distribution: experiments/sgiprom_to_bin.)

Assuming you have extracted the PROM from your real machine into a file called prom, the following example shows how to start up the emulator in the paused state with the PROM image:

$ gxemul -V -e sgi_ip32 raw:0xffffffffbfc00000:prom
GXemul (unknown version)      Copyright (C) 2003-2009  Anders Gavare

  mainbus0
  |-- ram0  (128 MB at offset 0)
  |-- prom0  (512 KB at offset 0x1fc00000)
  \-- cpu0  (R5000, 100 MHz)

cpu0: raw:0xffffffffbfc00000:prom loaded
      Raw file: entry point 0xffffffffbfc00000
      loadable chunk: vaddr 0xffffffffbfc00000, 524288 bytes

GXemul>

As mentioned above, nothing works yet.


Legacy framework

As the new framework is not working yet, and especially the SGI O2 emulation mode in it, the following notes about the legacy framework may also be of interest.

Normally, a dump of the PROM image from your real SGI O2 is not needed, if what you want to do is to run guest operating systems in the emulator. See the following sections of the documentation for how to set up NetBSD/sgimips and OpenBSD/sgi:

In order to experiment with a raw PROM dump using the legacy framework, the following command line may be used as a starting point:

$ gxemul -QXeo2 0xbfc00000:prom

-Q turns off GXemul's built-in PROM emulation, allowing raw PROM images to be used. -X is used to display the graphical framebuffer. (-X can be omitted if only serial console is what you want.) And finally, -e o2 selects the O2 emulation mode. 0xbfc00000 is the standard ROM address for MIPS-based systems.

            

The photo on the left is from the real machine. The screenshot to the right is from the emulator.

NOTE: The SGI O2 PROM does some hardware tests during startup that do not work in GXemul, in particular cache detection. So right now, there is a hack/workaround which skips cache detection in an ugly way. This has been verified to work with PROM versions 2.3, 4.13, and 4.18. For other versions, it may need to be manually skipped.

With a IP32 PROM version 4.13 for example, if the hack is commented out, the cache detection routine at 0xbfc05180 must be skipped:

$ gxemul -p 0xffffffffbfc05180 -X -Q -e o2 0xbfc00000:prom-4.13

...
when the breakpoint is hit, type:

pc = ra
continue

If the 'console' variable in the PROM's environment variable section was set to something starting with 'g', output will be graphical, otherwise it will be to serial console.

Note however that almost nothing works; most importantly, SCSI is not implemented for the SGI O2, so the emulated machine will not be able to boot from any kind of disk or CDROM. Audio or video hardware is not emulated at all yet either. Also, while the graphics emulation has been implemented well enough to run NetBSD, OpenBSD, and perhaps also Linux, other things may not work.