34 #include <sys/types.h> 36 #include <sys/resource.h> 62 debug(
"[ SIFBIOS halt(0x%" PRIx64
") ]\n",
67 debug(
"[ SIFBIOS setdve(0x%" PRIx64
") ]\n",
68 (uint64_t) cpu->
cd.
mips.
gpr[MIPS_GPR_A1]);
85 debug(
"[ SIFBIOS dma_init() ]\n");
89 debug(
"[ SIFBIOS dma_exit() ]\n");
92 debug(
"[ SIFBIOS cmd_init() ]\n");
96 debug(
"[ SIFBIOS cmd_exit() ]\n");
99 debug(
"[ SIFBIOS rpc_init(): TODO ]\n");
103 debug(
"[ SIFBIOS rpc_exit(): TODO ]\n");
107 debug(
"[ SIFBIOS rpc_bind(): TODO ]\n");
111 fatal(
"[ SIFBIOS SBR_IOPH_INIT(0x%" PRIx32
",0x%" PRIx32
",0x%" 113 (uint32_t) cpu->
cd.
mips.
gpr[MIPS_GPR_A1],
139 fatal(
" +0: %08x\n", tmpaddr);
142 fatal(
" +4: %08x\n", tmpaddr);
145 fatal(
" +8: %08x\n", tmpaddr);
148 fatal(
" +12: %08x\n", tmpaddr);
153 fatal(
"tmpaddr 1 = 0x%08x\n", tmpaddr);
166 fatal(
"[ SIFBIOS alloc iop heap(0x" PRIx32
") ]\n",
167 (uint32_t)cpu->
cd.
mips.
gpr[MIPS_GPR_A1]);
179 static uint32_t return_addr = 0x1000;
185 fatal(
" +0: %08x (result should be placed here)\n",
189 fatal(
" +4: %08x (*arg)\n", tmpaddr);
191 fatal(
" size = %08x\n", size);
194 fatal(
" +8: %08x (*func (void *, int))\n", tmpaddr);
197 fatal(
" +12: %08x (*para)\n", tmpaddr);
202 fatal(
"tmpaddr 1 = 0x%08x\n", tmpaddr);
211 cpu->
cd.
mips.
gpr[MIPS_GPR_A1] + 0, return_addr);
216 return_addr &= ~4095;
221 debug(
"[ SIFBIOS iopmem_free(): TODO ]\n");
228 fatal(
"Playstation 2 SIFBIOS emulation: " 229 "unimplemented call nr 0x%x\n", callnr);
void fatal(const char *fmt,...)
int store_32bit_word(struct cpu *cpu, uint64_t addr, uint64_t data32)
void console_putchar(int handle, int ch)
int console_readchar(int handle)
int playstation2_sifbios_emul(struct cpu *cpu)
int console_charavail(int handle)
void cpu_register_dump(struct machine *m, struct cpu *cpu, int gprs, int coprocs)
uint32_t load_32bit_word(struct cpu *cpu, uint64_t addr)
uint64_t gpr[N_MIPS_GPRS]