From 0b41f38eaca8d93f2d04805f00194ae82c34c95d Mon Sep 17 00:00:00 2001 From: David du Colombier <0intro@gmail.com> Date: Thu, 20 Jun 1991 00:00:00 +0000 Subject: [PATCH] Plan 9 from Bell Labs 1991-06-20 --- pc/l.s | 78 +++++++++++++++++++++++++++++++++++++------------ port/devcons.c | 2 ++ port/devlance.c | 7 ++++- 3 files changed, 68 insertions(+), 19 deletions(-) diff --git a/pc/l.s b/pc/l.s index d657c1567dd9153011f2f7ca9cafdd6913709536..8f622f71f7fd1b95082211dbe1bf06e91cc79eaa 100644 --- a/pc/l.s +++ b/pc/l.s @@ -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) diff --git a/port/devcons.c b/port/devcons.c index 2ba17c2e7f346b90a18be50930e909b04f30721a..71c6d3b5713f7e2b313d2c5875569e5d80da2b28 100644 --- a/port/devcons.c +++ b/port/devcons.c @@ -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){ diff --git a/port/devlance.c b/port/devlance.c index 51edaaf9e3a0e70bbb6209f90d3c5a5063a23450..b43c5efdf7337b2d10527dbd111ee357fff1f233 100644 --- a/port/devlance.c +++ b/port/devlance.c @@ -205,6 +205,11 @@ static SoftLance l; */ void lancekproc(void *); +/* + * mode used by restart + */ +int lancemode; + /* * print a packet preceded by a message */ @@ -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.