--- trunk/src/cpus/cpu_alpha_palcode.c 2007/10/08 16:19:37 22 +++ trunk/src/cpus/cpu_alpha_palcode.c 2007/10/08 16:19:56 24 @@ -25,7 +25,7 @@ * SUCH DAMAGE. * * - * $Id: cpu_alpha_palcode.c,v 1.5 2006/01/14 13:15:32 debug Exp $ + * $Id: cpu_alpha_palcode.c,v 1.8 2006/06/02 18:11:38 debug Exp $ * * Alpha PALcode-related functionality. */ @@ -120,8 +120,8 @@ /* getenv */ fatal("[ Alpha PALcode: GXemul PROM call 0x22: TODO ]\n"); break; - default:fatal("[ Alpha PALcode: GXemul PROM call, a0=0x%llx ]\n", - (long long)cpu->cd.alpha.r[ALPHA_A0]); + default:fatal("[ Alpha PALcode: GXemul PROM call, a0=0x%"PRIx64" ]\n", + (uint64_t) cpu->cd.alpha.r[ALPHA_A0]); cpu->running = 0; } @@ -149,6 +149,14 @@ /* Floating point enable: a0 = 1 or 0. */ /* TODO */ break; + case 0x2d: /* PAL_OSF1_wrvptptr */ + /* a0 = value */ + cpu->cd.alpha.wrvptptr = cpu->cd.alpha.r[ALPHA_A0]; + break; + case 0x30: /* PAL_OSF1_swpctx */ + /* TODO */ + /* Swap context */ + break; case 0x31: /* PAL_OSF1_wrval */ /* a0 = value */ cpu->cd.alpha.sysvalue = cpu->cd.alpha.r[ALPHA_A0]; @@ -159,16 +167,16 @@ break; case 0x33: /* PAL_OSF1_tbi */ /* a0 = op, a1 = vaddr */ - debug("[ Alpha PALcode: PAL_OSF1_tbi: a0=%lli a1=0x%llx ]\n", - (signed long long)cpu->cd.alpha.r[ALPHA_A0], - (long long)cpu->cd.alpha.r[ALPHA_A1]); + debug("[ Alpha PALcode: PAL_OSF1_tbi: a0=%"PRIi64" a1=0x%" + PRIx64" ]\n", (int64_t)cpu->cd.alpha.r[ALPHA_A0], + (uint64_t)cpu->cd.alpha.r[ALPHA_A1]); /* TODO */ break; case 0x34: /* PAL_OSF1_wrent (Write System Entry Address) */ /* a0 = new vector, a1 = vector selector */ - debug("[ Alpha PALcode: PAL_OSF1_tbi: a0=%lli a1=0x%llx ]\n", - (signed long long)cpu->cd.alpha.r[ALPHA_A0], - (long long)cpu->cd.alpha.r[ALPHA_A1]); + debug("[ Alpha PALcode: PAL_OSF1_tbi: a0=%"PRIi64" a1=0x%" + PRIx64" ]\n", (int64_t) cpu->cd.alpha.r[ALPHA_A0], + (uint64_t) cpu->cd.alpha.r[ALPHA_A1]); /* TODO */ break; case 0x35: /* PAL_OSF1_swpipl */ @@ -205,6 +213,12 @@ case 0x86: /* PAL_OSF1_imb */ /* TODO */ break; + case 0x3fffffd: + fatal("[ Alpha PALcode: Fixup: TODO ]\n"); + /* Return from the fixup call. */ + cpu->cd.alpha.r[ALPHA_V0] = 0; /* Success? */ + cpu->pc = cpu->cd.alpha.r[ALPHA_RA]; + break; case 0x3fffffe: alpha_prom_call(cpu); break;