Any resources for OS/kernel development on SGI hardware?

nuclear

Member
Jun 3, 2020
21
31
13
nuclear.mutantstargoat.com
A recent message by Elf in the "old vs new" thread, mentioned in passing the notion of "writing a new operating system for SGI hardware", which I found intriguing. Now that would be an interesting project!

I've done a bit of kernel hacking on IBM PC compatibles, which is easy because the platform is documented to high heaven. But I wonder if there are resources out there documenting the boot process of SGI hardware, how to make the SGI firmware run custom code, and how to talk with the basic hardware necessary to get things going (maybe a text console or even just a serial port for starters).

I'm sure there are differences from SGI computer to SGI computer. I think I'd like to target the indy or the O2 for such a project.

So, is there any good source of info for such a project out there? Any pointers appreciated.

(I realize I could just study the linux/mips source code and try to figure it out like that, and it's good that option exists, but I don't enjoy reading other people's code very much, and I try to avoid it wherever possible).
 
  • Like
Reactions: Elf

kramlq

New member
Jul 20, 2020
1
1
3
Ireland
The SGI firmware is a semi-customised version of what was originally standardised by the ARC consortium:
Writing a simple boot stage program using the ARC callbacks is actually relatively simple.

The design specs for many components in the Indy/Indigo2 were released officially by SGI at the request of those working on Linux MIPS:
https://download.majix.org/sgi/
I think its also on linux-mips but that gives me a certificate error right now. Only the 2D Newport stuff was covered by SGI's documentation release.

Documents for the later O2 and Octane hardware did eventually get leaked, as did IRIX source up as far as at least 6.5.17, but as those are unofficial leaks of information that is still owned/controlled by HP it may be wise to stay away. The O2 and Octane hardware is more complicated than the Indy/Indigo2 anyway.
 
Last edited:
  • Like
Reactions: Elf

nuclear

Member
Jun 3, 2020
21
31
13
nuclear.mutantstargoat.com
Brilliant! That's more than I hoped to find. It seems like the indy is very well documented and since I don't have an indigo2, it seems like the indy would be an good target platform for this hack.

I don't care about "keeping clean" and avoidng looking at leaked docs and source. Now that you mentioned it, I do have the source code of irix 6.5.5 somewhere for some time, which might be helpful in a tight spot. If you have pointers to any leaks I'd love to keep them for future reference. Especially docs.

Thanks!
 
  • Like
Reactions: Elf

nuclear

Member
Jun 3, 2020
21
31
13
nuclear.mutantstargoat.com
So I've got a hello world up and running on the O2 (couldn't be bothered to dig up the Indy at this stage, if I continue this thing and hit a brick wall at some point I'll revert to the Indy).

sgi_boot_test1-helloworld.jpg

Took me a while to sort out how to build correctly... Initially I thought I needed to produce ECOFF binaries (according to the ARC spec), and I was fighting with old versions of the GNU toolchain for a while to build a suitable cross-compiler & binutils, trying different elf2ecoff programs and so on. But it turns out the O2 supports loading ELF files directly, so all that was not necessary. I also chased a couple of red-herrings when it comes to my TFTP/BOOTP setup, but it worked out ok in the end.

Here's the source code (git repo, current commit: 3d2058b): http://nuclear.mutantstargoat.com/git/sgisys_test1

Edit: I didn't like that I had to hardcode the load address to make this work. It took a bit of searching and trial and error to find where the firmware loads my code in memory. There must be a better way to do this...
 
Last edited:
  • Like
Reactions: Elf

About us

  • Silicon Graphics User Group (SGUG) is a community for users, developers, and admirers of Silicon Graphics (SGI) products. We aim to be a friendly hobbyist community for discussing all aspects of SGIs, including use, software development, the IRIX Operating System, and troubleshooting, as well as facilitating hardware exchange.

User Menu