MIPS

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
paulbarker

MIPS

Post by paulbarker »

So, I'm getting reasonably close to my first release. The thing thats really slowing me down at the moment is supporting 2 platforms:
- x86 (Bochs emulator)
- MIPS r2000 / r3000 (sys/161 emulator, google it)

I'm planning to drop the MIPS support since I'm finding it too difficult. There seems to be a lack of tutorials and documentation. I have the processor manual but that alone is never enough. Also, most of the MIPS code I'm using has licensing issues I need to sort out before I can release it.

Basically, I'm wondering if anyone else has developed an OS for the MIPS platform or has any docs for it (especially relating to threading and stack-switching). Once I've got the low-level stuff done (mostly re-written from scratch) its a simpler platform to program than x86, especially with the emulator having a system bus specially designed for education and ease of programming. I'd like to use it, but if the low-level stuff continues to prove so difficult I'll just drop it.

Thanks in advance,
Paul Barker
User avatar
Colonel Kernel
Member
Member
Posts: 1437
Joined: Tue Oct 17, 2006 6:06 pm
Location: Vancouver, BC, Canada
Contact:

Re:MIPS

Post by Colonel Kernel »

paulbarker wrote:Once I've got the low-level stuff done (mostly re-written from scratch) its a simpler platform to program than x86
Have you tried running any of your MIPS code on real hardware? IIRC, there are no pipeline interlocks on MIPS processors, meaning that you have to be aware of things like branch delay slots etc. when hand-writing MIPS assembly. Not that I've done it myself, but I've heard it's a major pain...
Top three reasons why my OS project died:
  1. Too much overtime at work
  2. Got married
  3. My brain got stuck in an infinite loop while trying to design the memory manager
Don't let this happen to you!
paulbarker

Re:MIPS

Post by paulbarker »

Simpler to program in C - mostly because of a really simple system bus accessible by memory-mapped I/O.

Its the assembly code stuff thats giving me the trouble (I've got interrupt handlers done but stack switching is just not going to happen). The emulator, of course, acts like real hardware with branch delay slots (but no cache).

GAS does cut out most of the trouble. It does so by re-ordering most of the instructions you write.
Post Reply