ps2rom/rom/rom_start.s

28 lines
647 B
ArmAsm
Raw Permalink Normal View History

// This is the entry point of the ROM.
// It is limited to 32-bit MIPS-I code,
// because it runs on both the EE and the IOP.
//
// The task of this relatively short bit of code
// is to start the approiate part of the ROM
// on the correct processor.
//
// It's a bit creative, but also a bit annoying.
.org 0
.set noat
// externs from each piece of the code
.extern _ee_start
.extern _iop_start
.globl _start
_start:
mfc0 $at, $15 // load the PRID
sltiu $at, 0x59 // Check for EE PRID
bne $15, 0, __iop // Branch if not EE
nop
j _ee_start // Call EE start routine
nop
__iop:
j __iop
//j _iop_start // Call IOP start routine
//nop