diff --git a/sys/src/9/pc64/l.s b/sys/src/9/pc64/l.s index 7c7d65658..ee277208f 100644 --- a/sys/src/9/pc64/l.s +++ b/sys/src/9/pc64/l.s @@ -141,7 +141,7 @@ TEXT _warp64<>(SB), 1, $-4 MOVL DX, PDPO(KZERO+GiB)(AX) ADDL $PTSZ, AX /* PD0 at PML4 + 2*PTSZ */ - MOVL $(PTESIZE|PTEGLOBAL|PTEWRITE|PTEVALID), DX + MOVL $(PTEACCESSED|PTEDIRTY|PTESIZE|PTEGLOBAL|PTEWRITE|PTEVALID), DX MOVL DX, PDO(0)(AX) /* PDE for double-map */ /* @@ -942,7 +942,6 @@ TEXT syscallentry(SB), 1, $-4 CALL syscall(SB) TEXT forkret(SB), 1, $-4 - CLI SWAPGS MOVQ 8(SP), AX /* return value */ @@ -1001,7 +1000,7 @@ _intrnested: PUSHQ SP CALL trap(SB) -TEXT _intrr(SB), 1, $-4 +TEXT noteret(SB), 1, $-4 _intrestore: POPQ AX @@ -1031,10 +1030,6 @@ _iretnested: ADDQ $40, SP IRETQ -TEXT noteret(SB), 1, $-4 - CLI - JMP _intrestore - TEXT vectortable(SB), $0 CALL _strayintr(SB); BYTE $0x00 /* divide error */ CALL _strayintr(SB); BYTE $0x01 /* debug exception */ diff --git a/sys/src/9/pc64/trap.c b/sys/src/9/pc64/trap.c index f4b53cf9e..e6ddfad63 100644 --- a/sys/src/9/pc64/trap.c +++ b/sys/src/9/pc64/trap.c @@ -349,14 +349,11 @@ debugexc(Ureg *ureg, void *) static void debugbpt(Ureg* ureg, void*) { - char buf[ERRMAX]; - if(up == 0) panic("kernel bpt"); /* restore pc to instruction that caused the trap */ ureg->pc--; - snprint(buf, sizeof(buf), "sys: breakpoint"); - postnote(up, 1, buf, NDebug); + postnote(up, 1, "sys: breakpoint", NDebug); } static void @@ -478,9 +475,7 @@ syscall(Ureg* ureg) splx(s); startns = todget(nil); } - if(scallnr >= nsyscall || systab[scallnr] == 0){ - pprint("bad sys call number %lud pc %#p\n", - scallnr, ureg->pc); + if(scallnr >= nsyscall || systab[scallnr] == nil){ postnote(up, 1, "sys: bad sys call", NDebug); error(Ebadarg); }