M carrera/main.c => carrera/main.c +1 -2
@@ 56,10 56,9 @@ main(void)
iomapinit();
printinit();
serialinit();
- iprint("Brazil\n"); /**/
+ iprint("Plan 9\n"); /**/
vecinit();
screeninit();
-// print("Brazil config reg %#ux\n", configreg);
pageinit();
procinit0();
initseg();
M carrera/screen.c => carrera/screen.c +1 -1
@@ 130,7 130,7 @@ screenwin(void)
freememimage(grey);
window = insetrect(window, 5);
- greet = " Brazil Console: New Draw version ";
+ greet = " Plan 9 Console ";
p = addpt(window.min, Pt(10, 0));
q = memsubfontwidth(memdefont, greet);
memimagestring(gscreen, p, conscol, memdefont, greet);
M ip/ipifc.c => ip/ipifc.c +4 -1
@@ 463,6 463,8 @@ ipifcrem(Ipifc *ifc, char **argv, int argc, int dolock)
uchar mask[IPaddrlen];
Iplifc *lifc, **l;
Fs *f;
+ uchar *addr;
+ int type;
if(argc < 3)
return Ebadarg;
@@ 490,7 492,8 @@ ipifcrem(Ipifc *ifc, char **argv, int argc, int dolock)
addr = lifc->local;
if(type == Rptpt)
addr = lifc->remote;
- if(memcmp(ip, addr, IPaddrlen) == 0 && memcmp(mask, lifc->mask, IPaddrlen) == 0) {
+ if(memcmp(ip, addr, IPaddrlen) == 0)
+ if(memcmp(mask, lifc->mask, IPaddrlen) == 0) {
*l = lifc->next;
break;
}
A pc/plan9l.s => pc/plan9l.s +52 -0
@@ 0,0 1,52 @@
+#include "mem.h"
+
+/*
+ * This must match io.h.
+ */
+#define VectorSYSCALL 0x40
+
+/*
+ * Used to get to the first process:
+ * set up an interrupt return frame and IRET to user level.
+ */
+TEXT touser(SB), $0
+ PUSHL $(UDSEL) /* old ss */
+ MOVL sp+0(FP), AX /* old sp */
+ PUSHL AX
+ MOVL $0x200, AX /* interrupt enable flag */
+ PUSHL AX /* old flags */
+ PUSHL $(UESEL) /* old cs */
+ PUSHL $(UTZERO+32) /* old pc */
+ MOVL $(UDSEL), AX
+ MOVW AX, DS
+ MOVW AX, ES
+ MOVW AX, GS
+ MOVW AX, FS
+ IRETL
+
+/*
+ * This is merely _strayintr from l.s optimised to vector
+ * to syscall() without going through trap().
+ */
+TEXT _syscallintr(SB), $0
+ PUSHL $VectorSYSCALL /* trap type */
+
+ PUSHL DS
+ PUSHL ES
+ PUSHL FS
+ PUSHL GS
+ PUSHAL
+ MOVL $(KDSEL), AX
+ MOVW AX, DS
+ MOVW AX, ES
+ PUSHL SP
+ CALL syscall(SB)
+
+ POPL AX
+ POPAL
+ POPL GS
+ POPL FS
+ POPL ES
+ POPL DS
+ ADDL $8, SP /* pop error code and trap type */
+ IRETL
M port/devdraw.c => port/devdraw.c +6 -4
@@ 1559,12 1559,16 @@ drawmesg(Client *client, void *av, int n)
continue;
/* create image mask: 'm' newid[4] id[4] */
+/*
+ *
case 'm':
printmesg("LL", a, 0);
m = 4+4;
if(n < m)
error(Eshortdraw);
break;
+ *
+ */
/* attach to a named image: 'n' dstid[4] j[1] name[j] */
case 'n':
@@ 1876,10 1880,8 @@ drawmesg(Client *client, void *av, int n)
drawflush();
continue;
- /* old write: 'w' id[4] R[4*4] data[x*1] */
- /* old write from compressed data: 'W' id[4] R[4*4] data[x*1] */
- /* new write: 'y' id[4] R[4*4] data[x*1] */
- /* new write from compressed data: 'Y' id[4] R[4*4] data[x*1] */
+ /* write: 'y' id[4] R[4*4] data[x*1] */
+ /* write from compressed data: 'Y' id[4] R[4*4] data[x*1] */
case 'y':
case 'Y':
printmesg(fmt="LR", a, 0);
M port/devsdp.c => port/devsdp.c +2 -2
@@ 1185,7 1185,7 @@ print("dup sequence number: %ld (%ld %ld)\n", seq, c->in.seqwrap, seqdiff);
if(0) print("coniput seq=%ulx\n", seq);
if(c->in.auth != 0) {
if(!(*c->in.auth)(&c->in, b->rp-4, BLEN(b)+4)) {
-print("bad auth\n");
+print("bad auth %d\n", BLEN(b)+4);
c->lstats.inBadAuth++;
freeb(b);
return nil;
@@ 1726,7 1726,7 @@ writedata(Conv *c, Block *b)
c->lstats.outDataPackets++;
c->lstats.outDataBytes += n;
- if(c->out.comp != nil) {
+ if(c->out.comp != nil && 0) {
// must generate same value as convoput
seq = (c->out.seq + 1) & (SeqMax-1);
M port/rdb.c => port/rdb.c +1 -1
@@ 62,7 62,7 @@ talkrdb(Ureg *ureg)
char *req;
printq = nil; // turn off serial console
-// scrprint("Brazil debugger\n");
+// scrprint("Plan 9 debugger\n");
iprint("Edebugger reset\n");
for(;;){
req = getline();