M pc/l.s => pc/l.s +60 -18
@@ 10,25 10,67 @@ TEXT start(SB),$0
/*
- * trap vector, each instruction is 4 bytes long
+ * standard traps
*/
-TEXT traptab(SB),$0
-
- CALL noerrcode(SB) /* divide */
- CALL noerrcode(SB) /* debug */
- CALL noerrcode(SB) /* non maskable interrupt */
- CALL noerrcode(SB) /* breakpoint */
- CALL noerrcode(SB) /* overflow */
- CALL noerrcode(SB) /* bounds check */
- CALL noerrcode(SB) /* invalid opcode */
- CALL noerrcode(SB) /* coprocessor not available */
- CALL errcode(SB) /* double fault */
- CALL noerrcode(SB) /* coprocessor segment overrun */
- CALL errcode(SB) /* invalid tss */
- CALL errcode(SB) /* segment not present */
- CALL errcode(SB) /* stack exception */
- CALL errcode(SB) /* general protection exception */
- CALL errcode(SB) /* page fault */
+divtrap:
+ PUSHL $0
+ PUSHL $0
+ JMP alltrap
+debtrap:
+ PUSHL $0
+ PUSHL $1
+ JMP alltrap
+nmitrap:
+ PUSHL $0
+ PUSHL $2
+ JMP alltrap
+bptrap:
+ PUSHL $0
+ PUSHL $3
+ JMP alltrap
+oftrap:
+ PUSHL $0
+ PUSHL $4
+ JMP alltrap
+boundtrap:
+ PUSHL $0
+ PUSHL $5
+ JMP alltrap
+invtrap:
+ PUSHL $0
+ PUSHL $6
+ JMP alltrap
+nocotrap:
+ PUSHL $0
+ PUSHL $7
+ JMP alltrap
+dfault:
+ PUSHL $8
+ JMP alltrap
+csotrap:
+ PUSHL $0
+ PUSHL $9
+ JMP alltrap
+tsstrap:
+ PUSHL $0
+ PUSHL $10
+ JMP alltrap
+segtrap:
+ PUSHL $11
+ JMP alltrap
+stacktrap:
+ PUSHL $12
+ JMP alltrap
+prottrap:
+ PUSHL $13
+ JMP alltrap
+pagefault:
+ PUSHL $14
+ JMP alltrap
+cetrap:
+ PUSHL $0
+ PUSHL $15
+ JMP alltrap
CALL noerrcode(SB) /* coprocessor error */
CALL noerrcode(SB)
CALL noerrcode(SB)
M port/devcons.c => port/devcons.c +2 -0
@@ 404,6 404,8 @@ consopen(Chan *c, int omode)
}
break;
case Qrcons:
+ if(conf.cntrlp)
+ error(Eperm);
if(incref(&raw) == 1){
lock(&lineq);
while((ch=getc(&kbdq)) != -1){
M port/devlance.c => port/devlance.c +6 -1
@@ 206,6 206,11 @@ static SoftLance l;
void lancekproc(void *);
/*
+ * mode used by restart
+ */
+int lancemode;
+
+/*
* print a packet preceded by a message
*/
int
@@ 443,7 448,7 @@ lancestart(void)
/*
* create the initialization block
*/
- MPus(lm->mode) = 0;
+ MPus(lm->mode) = lancemode;
/*
* set ether addr from the value in the id prom.