From 64a29307afa476d5511df9b1f3f2508c9fff286c Mon Sep 17 00:00:00 2001 From: David du Colombier <0intro@gmail.com> Date: Fri, 9 Aug 1991 00:00:00 +0000 Subject: [PATCH] Plan 9 from Bell Labs 1991-08-09 --- gnot/screen.c | 6 + pc/dat.h | 2 + pc/devfloppy.c | 69 ++++-- pc/devhard.c | 140 ++++++++++-- pc/fault386.c | 6 +- pc/fns.h | 4 +- pc/kbd.c | 2 +- pc/l.s | 22 ++ pc/main.c | 23 +- pc/trap.c | 4 - port/devcons.c | 57 +++-- port/devmnt.c | 26 ++- port/portdat.h | 1 + port/stream.c | 16 +- power/boot.h | 588 ++++++++++++++++++++++++++++--------------------- 15 files changed, 635 insertions(+), 331 deletions(-) diff --git a/gnot/screen.c b/gnot/screen.c index 6c8809ee61abb4b559fa456748bfaa7dbb7e6833..c6c79cf28f7fd6ec0b3000287f6fa1573eaec91f 100644 --- a/gnot/screen.c +++ b/gnot/screen.c @@ -81,8 +81,14 @@ screenputc(int c) void screenputs(char *s, int n) { + int x; + + x = splhi(); + lock(&printq); while(n-- > 0) screenputc(*s++); + unlock(&printq); + splx(x); } int diff --git a/pc/dat.h b/pc/dat.h index c4866de315b0d25f99356f789c346d311719f784..c078667465dcf5b6cdb2d08eec6e202bcc44ed1c 100644 --- a/pc/dat.h +++ b/pc/dat.h @@ -92,6 +92,8 @@ struct Conf ulong arp; /* Arp table size */ ulong frag; /* Ip fragment assemble queue size */ ulong cntrlp; /* panic on ^P */ + ulong nfloppy; /* number of floppy drives */ + ulong nhard; /* number of hard drives */ }; /* diff --git a/pc/devfloppy.c b/pc/devfloppy.c index 50f21a39ff7dedfdc65407f3cef848a201d26f66..87b8ecec0e1161c7a512ca7668fc5abdc9376671 100644 --- a/pc/devfloppy.c +++ b/pc/devfloppy.c @@ -29,8 +29,6 @@ enum Fwrite= 0x47, /* write cmd */ Fmulti= 0x80, /* or'd with Fread or Fwrite for multi-head */ - Ndrive= 4, /* floppies/controller */ - DMAchan= 2, /* floppy dma channel */ /* sector size encodings */ @@ -123,6 +121,9 @@ struct Drive long len; /* size of xfer */ Rendez r; /* waiting here for motor to spin up */ + + uchar *ccache; /* cylinder cache (always read a whole cyl) */ + int ccyl; /* number of cached cylinder */ }; /* @@ -132,7 +133,7 @@ struct Controller { QLock; /* exclusive access to the contoller */ - Drive d[Ndrive]; /* the floppy drives */ + Drive *d; /* the floppy drives */ uchar stat[8]; /* status of an operation */ int confused; int intr; /* true if interrupt occured */ @@ -173,6 +174,7 @@ Dirtab floppydir[]={ }; #define NFDIR (sizeof(floppydir)/sizeof(Dirtab)) +#define k64(x) (((ulong)(x))>>16) void floppyreset(void) { @@ -187,10 +189,15 @@ floppyreset(void) t->bcode = b2c[t->bytes/128]; } + /* + * allocate the drive storage + */ + floppy.d = ialloc(conf.nfloppy*sizeof(Drive), 0); + /* * stop the motors */ - for(dp = floppy.d; dp < &floppy.d[Ndrive]; dp++){ + for(dp = floppy.d; dp < &floppy.d[conf.nfloppy]; dp++){ dp->dev = dp - floppy.d; dp->t = &floppytype[0]; /* default type */ floppydir[2*dp->dev].length = dp->t->cap; @@ -198,6 +205,16 @@ floppyreset(void) dp->cyl = -1; /* because we don't know */ motoroff(dp); } + + /* + * allocate cylinder caches that don't cross 64k boundaries + */ + for(dp = floppy.d; dp < &floppy.d[conf.nfloppy]; dp++){ + do { + dp->ccache = ialloc(dp->t->cap, 1); + } while(k64(dp->ccache) != k64(dp->ccache+dp->t->cap)); + dp->ccyl = -1; + } setvec(Floppyvec, floppyintr); } @@ -272,11 +289,16 @@ ul2user(uchar *a, ulong x) a[3] = x; } +/* + * the floppy is so slow, we always read a cylinder + * at a time and cache the extra bytes. + */ long floppyread(Chan *c, void *a, long n) { Drive *dp; - long rv, i; + long rv, nn, len, cyl; + int sec; uchar *aa = a; if(c->qid.path == CHDIR) @@ -286,10 +308,31 @@ floppyread(Chan *c, void *a, long n) dp = &floppy.d[c->qid.path & ~Qmask]; switch ((int)(c->qid.path & Qmask)) { case Qdata: - for(rv = 0; rv < n; rv += i){ - i = floppyxfer(dp, Fread, aa+rv, c->offset+rv, n-rv); - if(i <= 0) - break; + if(c->offset % dp->t->bytes) + errors("bad offset"); + if(n % dp->t->bytes) + errors("bad len"); + nn = dp->t->bytes * dp->t->sectors * dp->t->heads; + for(rv = 0; rv < n; rv += len){ + /* + * truncate xfer at cylinder boundary + */ + dp->len = n - rv; + floppypos(dp, c->offset+rv); + cyl = dp->tcyl; + len = dp->len; + sec = dp->tsec + dp->thead * dp->t->sectors; + + /* + * read the cylinder + */ + if(dp->ccyl != cyl){ + dp->ccyl = -1; + if(floppyxfer(dp, Fread, dp->ccache, cyl * nn, nn) != nn) + errors("floppy read err"); + dp->ccyl = cyl; + } + memmove(aa+rv, dp->ccache + (sec-1)*dp->t->bytes, len); } break; case Qstruct: @@ -371,7 +414,7 @@ floppykproc(void *a) waserror(); for(;;){ - for(dp = floppy.d; dp < &floppy.d[Ndrive]; dp++){ + for(dp = floppy.d; dp < &floppy.d[conf.nfloppy]; dp++){ if(dp->motoron && TK2SEC(m->ticks - dp->lasttouched) > 5 && canqlock(dp)){ if(TK2SEC(m->ticks - dp->lasttouched) > 5) @@ -382,8 +425,6 @@ floppykproc(void *a) disp++; if(owl(disp&1) < 0) print("owl failed\n"); - if(mail((disp>>1)&1) < 0) - print("mail failed\n"); tsleep(&floppy.kr, return0, 0, 5*1000); } @@ -592,7 +633,7 @@ floppyrevive(void) delay(1); outb(Fmotor, Fintena|Fena); spllo(); - for(dp = floppy.d; dp < &floppy.d[Ndrive]; dp++){ + for(dp = floppy.d; dp < &floppy.d[conf.nfloppy]; dp++){ dp->motoron = 0; dp->confused = 1; } @@ -603,7 +644,7 @@ floppyrevive(void) /* * recalibrate any confused drives */ - for(dp = floppy.d; floppy.confused == 0 && dp < &floppy.d[Ndrive]; dp++){ + for(dp = floppy.d; floppy.confused == 0 && dp < &floppy.d[conf.nfloppy]; dp++){ if(dp->confused == 0) floppyrecal(dp); diff --git a/pc/devhard.c b/pc/devhard.c index f86d0c71808c81dc6ec549e557c800e59cf3ee5c..9b4437239384bb2f623851dd8cf7f6c818e7b980 100644 --- a/pc/devhard.c +++ b/pc/devhard.c @@ -22,6 +22,10 @@ enum Pcylmsb= Pbase+5, /* most significant byte cylinder # */ Pdh= Pbase+6, /* drive/head port */ Pstatus= Pbase+7, /* status port */ + Sbusy= (1<<7), + Sready= (1<<6), + Sdrq= (1<<5), + Serr= (1<<0), Pcmd= Pbase+7, /* cmd port */ /* commands */ @@ -81,17 +85,19 @@ struct Ident struct Drive { int dev; + int confused; /* needs to be recalibrated (or worse) */ + int online; + ulong cap; /* drive capacity */ int bytes; /* bytes/sector */ - int cyl; /* current cylinder */ - int confused; /* needs to be recalibrated (or worse) */ + int sectors; /* sectors/track */ + int heads; /* heads/cyl */ + long cyl; /* cylinders/drive */ int tcyl; /* target cylinder */ int thead; /* target head */ int tsec; /* target sector */ long len; /* size of xfer */ - - Ident id; }; /* @@ -102,10 +108,12 @@ struct Controller QLock; /* exclusive access to the drive */ int intr; /* true if interrupt occured */ + int status; /* status of last interupt */ Rendez r; /* wait here for command termination */ int confused; /* needs to be recalibrated (or worse) */ - Drive d[2]; + Drive *d; + Ident id; }; Controller hard; @@ -119,23 +127,45 @@ Dirtab harddir[]={ static void hardintr(Ureg*); static long hardxfer(Drive*, int, void*, long, long); static long hardident(Drive*); +static void hardpos(Drive*, long); void hardreset(void) { - hard.d[0].dev = 0; - hard.d[1].dev = 1; + Drive *dp; + + hard.d = ialloc(conf.nhard * sizeof(Drive), 0); + for(dp = hard.d; dp < &hard.d[conf.nhard]; dp++){ + dp->dev = dp - hard.d; + dp->online = 0; + } + setvec(Hardvec, hardintr); } void hardinit(void) { + qunlock(&hard); } Chan* hardattach(char *spec) { + Drive *dp; + + qlock(&hard); + for(dp = hard.d; dp < &hard.d[conf.nhard]; dp++){ + if(!waserror()){ + hardident(dp); + dp->cyl = hard.id.lcyls; + dp->heads = hard.id.lheads; + dp->sectors = hard.id.ls2t; + dp->bytes = 512; + dp->cap = dp->bytes * dp->cyl * dp->heads * dp->sectors; + dp->online = 1; + } + } return devattach('f', spec); } @@ -210,15 +240,12 @@ hardread(Chan *c, void *a, long n) switch ((int)(c->qid.path & Qmask)) { case Qdata: for(rv = 0; rv < n; rv += i){ - i = hardxfer(dp, Fread, aa+rv, c->offset+rv, n-rv); + i = hardxfer(dp, Cread, aa+rv, c->offset+rv, n-rv); if(i <= 0) break; } break; case Qstruct: - hardident(dp); - dp->cap = 512 * dp->id->lcyls * dp->id->lheads *dp->id->ls2t; - dp->bytes = 512; if (n < 2*sizeof(ulong)) error(Ebadarg); if (c->offset >= 2*sizeof(ulong)) @@ -245,7 +272,7 @@ hardwrite(Chan *c, void *a, long n) switch ((int)(c->qid.path & Qmask)) { case Qdata: for(rv = 0; rv < n; rv += i){ - i = hardxfer(dp, Fwrite, aa+rv, c->offset+rv, n-rv); + i = hardxfer(dp, Cwrite, aa+rv, c->offset+rv, n-rv); if(i <= 0) break; } @@ -274,19 +301,67 @@ interrupted(void *a) static long hardident(Drive *dp) { - qlock(&hard); +print("identify hard drive\n"); hard.intr = 0; outb(Pdh, dp->dev<<4); outb(Pcmd, Cident); +print("waiting for hard drive interupt\n"); sleep(&hard.r, interrupted, 0); - insw(Pdata, &hard.id, 512); - qunlock(&hard); +print("getting hard drive ident\n"); + inss(Pdata, &hard.id, 512/2); +print(" magic %lux lcyls %d rcyl %d lheads %d b2t %d b2s %d ls2t %d\n", + hard.id.magic, hard.id.lcyls, hard.id.rcyl, hard.id.lheads, + hard.id.b2t, hard.id.b2s, hard.id.ls2t); } static long hardxfer(Drive *dp, int cmd, void *va, long off, long len) { - errors("not implemented"); + int secs; + int i; + uchar *aa = va; + + if(off % dp->bytes) + errors("bad offset"); + if(len % dp->bytes) + errors("bad length"); + + if(waserror()){ + qunlock(&hard); + nexterror(); + } + qlock(&hard); + dp->len = len; + hardpos(dp, off); + secs = dp->len/dp->bytes; + + outb(Pcount, secs); + outb(Psector, dp->tsec); + outb(Pdh, (1<<5) | (dp->dev<<4) | dp->thead); + outb(Pcyllsb, dp->tcyl); + outb(Pcylmsb, dp->tcyl>>8); + outb(Pcmd, cmd); + + if(cmd == Cwrite) + outss(Pdata, aa, dp->bytes/2); + for(i = 0; i < secs; i++){ + hard.intr = 0; + sleep(&hard.r, interrupted, 0); + if(hard.status & Serr) + errors("disk error"); + if(cmd == Cread){ + if((hard.status & Sdrq) == 0) + panic("disk read"); + inss(Pdata, aa + i*dp->bytes, dp->bytes/2); + } else { + if((hard.status & Sdrq) == 0){ + if(i+1 != secs) + panic("disk write"); + } else + outss(Pdata, aa + (i+1)*dp->bytes, dp->bytes/2); + } + } + qunlock(&hard); } /* @@ -296,8 +371,39 @@ static void hardintr(Ureg *ur) { hard.status = inb(Pstatus); + if(hard.status & Sbusy) + panic("disk busy"); hard.intr = 1; - print("hardintr\n"); +print("hardintr\n"); wakeup(&hard.r); } +/* + * calculate physical address of a logical byte offset into the disk + * + * truncate dp->len if it crosses a cylinder boundary + */ +static void +hardpos(Drive *dp, long off) +{ + int lsec; + int end; + int cyl; + + lsec = off/dp->bytes; + dp->tcyl = lsec/(dp->sectors*dp->heads); + dp->tsec = (lsec % dp->sectors) + 1; + dp->thead = (lsec/dp->sectors) % dp->heads; + + /* + * can't read across cylinder boundaries. + * if so, decrement the bytes to be read. + */ + lsec = (off+dp->len)/dp->bytes; + cyl = lsec/(dp->sectors*dp->heads); + if(cyl != dp->tcyl){ + dp->len -= (lsec % dp->sectors)*dp->bytes; + dp->len -= ((lsec/dp->sectors) % dp->heads)*dp->bytes*dp->sectors; + } +} + diff --git a/pc/fault386.c b/pc/fault386.c index 9333a8b5f5638ad9c961406592d54f6488a661c1..f97eb53cbff138266e0c4344260dd985567cc974 100644 --- a/pc/fault386.c +++ b/pc/fault386.c @@ -20,11 +20,8 @@ fault386(Ureg *ur) insyscall = u->p->insyscall; u->p->insyscall = 1; addr = getcr2(); - if(faulting) - panic("double fault\n"); - faulting = 1; read = !(ur->ecode & 2); - user = (ur->ecode & 4); + user = (ur->cs&0xffff) == UESEL; n = fault(addr, read); if(n < 0){ if(user){ @@ -37,7 +34,6 @@ fault386(Ureg *ur) dumpregs(ur); panic("fault: 0x%lux", addr); } - faulting = 0; u->p->insyscall = insyscall; } diff --git a/pc/fns.h b/pc/fns.h index 7d58da1f5287d243b90f8d41e655349691989498..5241c1e7490ba6b771bbf49045a985375492620b 100644 --- a/pc/fns.h +++ b/pc/fns.h @@ -19,13 +19,13 @@ void fprestore(FPsave*); ulong getcr2(void); void idle(void); int inb(int); -int inss(int, void*, int); -int outss(int, void*, int); +void inss(int, void*, int); void kbdinit(void); void kbdintr(Ureg*); int mail(int); void mmuinit(void); void outb(int, int); +void outss(int, void*, int); int owl(int); void prhex(ulong); void procrestore(Proc*, uchar*); diff --git a/pc/kbd.c b/pc/kbd.c index 9d44459c6e14923c955f083950035babd5538c21..f8cd8591d3aa7665cc8493f840e9fabf6eb58e87 100644 --- a/pc/kbd.c +++ b/pc/kbd.c @@ -336,7 +336,7 @@ mymouseputc(int c) { static short msg[3]; static int nb; - static uchar b[] = {0, 4, 1, 5, 2, 6, 3, 7}; + static uchar b[] = {0, 1, 4, 5, 2, 3, 6, 7}; static lastdx, lastdy; int diff; extern Mouseinfo mouse; diff --git a/pc/l.s b/pc/l.s index ae56cb586706e103d4757fbe80dd3b1c2c37562a..777b2956c8fa73b8def64d37a6622daa8a7b3a20 100644 --- a/pc/l.s +++ b/pc/l.s @@ -1,5 +1,7 @@ #include "mem.h" +#define OP16 BYTE $0x66 + /* * about to walk all over ms/dos - turn off interrupts */ @@ -210,6 +212,26 @@ TEXT outb(SB),$0 OUTB RET +/* + * input a string of shorts from a port + */ +TEXT inss(SB),$0 + MOVL p+0(FP),DX + MOVL a+4(FP),DI + MOVL c+8(FP),CX + REP; OP16; INSL + RET + +/* + * output a string of shorts to a port + */ +TEXT outss(SB),$0 + MOVL p+0(FP),DX + MOVL a+4(FP),SI + MOVL c+8(FP),CX + REP; OP16; OUTSL + RET + /* * test and set */ diff --git a/pc/main.c b/pc/main.c index c77f6f74ad14a44c2c7adec6061282c18e4ac1b8..6eb0b24661d96f2073f0484baa95d7857d105cb0 100644 --- a/pc/main.c +++ b/pc/main.c @@ -28,9 +28,7 @@ main(void) grpinit(); chaninit(); alarminit(); -print("chandevreset\n"); delay(1000); chandevreset(); -print("streaminit\n"); delay(1000); streaminit(); swapinit(); pageinit(); @@ -218,6 +216,8 @@ confinit(void) conf.arp = 32; conf.frag = 32; conf.cntrlp = 0; + conf.nfloppy = 1; + conf.nhard = 1; } /* @@ -346,23 +346,34 @@ pmubusy(void) /* * set a bit in the PMU */ +Lock pmulock; int pmuwrbit(int index, int bit, int pos) { + lock(&pmulock); outb(Pmucsr, 0x02); /* next is command request */ - if(pmuready() < 0) + if(pmuready() < 0){ + unlock(&pmulock); return -1; + } outb(Pmudata, (2<<4) | index); /* send write bit command */ outb(Pmucsr, 0x01); /* send available */ - if(pmubusy() < 0) + if(pmubusy() < 0){ + unlock(&pmulock); return -1; + } outb(Pmucsr, 0x01); /* next is data */ - if(pmuready() < 0) + if(pmuready() < 0){ + unlock(&pmulock); return -1; + } outb(Pmudata, (bit<<3) | pos); /* send bit to write */ outb(Pmucsr, 0x01); /* send available */ - if(pmubusy() < 0) + if(pmubusy() < 0){ + unlock(&pmulock); return -1; + } + unlock(&pmulock); } /* diff --git a/pc/trap.c b/pc/trap.c index 83c108c10addfaa8e09499541afd310455b9479d..15d6411942fd397d428b7fdf5073fb270d882014 100644 --- a/pc/trap.c +++ b/pc/trap.c @@ -286,11 +286,7 @@ syscall(Ureg *ur) } if(sp<(USTKTOP-BY2PG) || sp>(USTKTOP-(1+MAXSYSARG)*BY2WD)) validaddr(sp, (1+MAXSYSARG)*BY2WD, 0); - if(ax == EXITS) - print("%d exiting\n", u->p->pid); ret = (*systab[ax])((ulong*)(sp+BY2WD)); - if(ax == EXITS) - print("%d returned from sysexits!\n", u->p->pid); poperror(); } if(u->nerrlab){ diff --git a/port/devcons.c b/port/devcons.c index 7e0e6d9f9138e922e3ce9c586c540eda4f1c6739..4498b9855e6c435f17d794f14a30201b6acfd6f6 100644 --- a/port/devcons.c +++ b/port/devcons.c @@ -37,37 +37,48 @@ printinit(void) } /* - * Print a string on the console. Convert \n to \r\n + * Print a string on the console. Convert \n to \r\n for serial + * line consoles. Locking of the queues is left up to the screen + * or uart code. Multi-line messages to serial consoles may get + * interspersed with other messages. */ void putstrn(char *str, int n) { - int s, c, m; + char buf[PRINTSIZE+2]; + int m; char *t; -static Lock fuck; -loop: -s = splhi(); -if(!canlock(&fuck)){ - splx(s); - goto loop; -} + /* + * if there's an attached bit mapped display, + * put the message there. screenputs is defined + * as a null macro for systems that have no such + * display. + */ + screenputs(str, n); + + /* + * if there's a serial line being used as a console, + * put the message there. Tack a carriage return + * before new lines. + */ + if(printq.puts == 0) + return; while(n > 0){ - if(printq.puts && *str=='\n') - (*printq.puts)(&printq, "\r", 1); - m = n; - t = memchr(str+1, '\n', m-1); - if(t) - if(t-str < m) - m = t - str; - if(printq.puts) - (*printq.puts)(&printq, str, m); - screenputs(str, m); - n -= m; - str += m; + t = memchr(str, '\n', n); + if(t){ + m = t - str; + memmove(buf, str, m); + buf[m] = '\r'; + buf[m+1] = '\n'; + (*printq.puts)(&printq, buf, m+2); + str = t + 1; + n -= m + 1; + } else { + (*printq.puts)(&printq, str, n); + break; + } } -unlock(&fuck); -splx(s); } /* diff --git a/port/devmnt.c b/port/devmnt.c index beccd6e9a4635e397c5ae67b60dfc1b33724447b..f19ef2f6ed62d391f66a72e5068aba3782c1c7fe 100644 --- a/port/devmnt.c +++ b/port/devmnt.c @@ -759,6 +759,7 @@ mntxmit(Mnt *m, Mnthdr *mh) if(mh->thdr.type == Tread) memmove(mh->thdr.data, mh->rhdr.data, mh->rhdr.count); mbfree(mh->mbr); + mh->mbr = 0; mbfree(mbw); poperror(); /* 1 */ return; @@ -787,7 +788,6 @@ mntxmit(Mnt *m, Mnthdr *mh) qunlock(q); qlocked = 0; if(waserror()){ /* 3 */ -print("%d interrupted read %lux %lux\n", u->p->pid, mh, mh->mbr); mnterrdequeue(m, mh); nexterror(); } @@ -797,9 +797,15 @@ print("%d interrupted read %lux %lux\n", u->p->pid, mh, mh->mbr); }while(n == 0); poperror(); /* 3 */ if(convM2S(mh->mbr->buf, &mh->rhdr, n) == 0){ -print("%d POO bad len %d %ux %lux %lux\n", u->p->pid, n, mh->mbr->buf[0], mh, mh->mbr); - mnterrdequeue(m, mh); - error(Ebadmsg); + if(1){ /* BUG? IS THIS RIGHT? IGNORE AND RETRY */ + print(" MR "); + qlock(q); + qlocked = 1; + goto FreeRead; + }else{ + mnterrdequeue(m, mh); + error(Ebadmsg); + } } /* * Response might not be mine @@ -809,6 +815,11 @@ print("%d POO bad len %d %ux %lux %lux\n", u->p->pid, n, mh->mbr->buf[0], mh, mh qlocked = 1; tag = mh->rhdr.tag; if(tag == mh->thdr.tag){ /* it's mine */ + if(mh->rhdr.type != Rerror) + if(mh->rhdr.type != mh->thdr.type+1){ + print(" T%c ", devchar[m->q->msg->type]); + goto FreeRead; + } q->reader = 0; if(w = q->writer){ /* advance a writer to reader */ mntwunlink(q, w); @@ -835,6 +846,11 @@ print("%d POO bad len %d %ux %lux %lux\n", u->p->pid, n, mh->mbr->buf[0], mh, mh w = &mnthdralloc.arena[tag]; if(w->flushing || !w->active) /* nothing to do; mntflush will clean up */ goto FreeRead; + if(mh->rhdr.type != Rerror) + if(mh->rhdr.type != w->thdr.type+1){ + print(" t%c ", devchar[m->q->msg->type]); + goto FreeRead; + } w->mbr = mh->mbr; mh->mbr = 0; memmove(&w->rhdr, &mh->rhdr, sizeof mh->rhdr); @@ -853,9 +869,7 @@ print("%d POO bad len %d %ux %lux %lux\n", u->p->pid, n, mh->mbr->buf[0], mh, mh qunlock(q); qlocked = 0; if(waserror()){ /* interrupted sleep */ -print("%d interrupted queued sleep %lux %lux %d %d\n", u->p->pid, mh, mh->mbr, mh->active, mh->flushing); mnterrdequeue(m, mh); -print("%d after flush sleep %lux %lux %d %d\n", u->p->pid, mh, mh->mbr, mh->active, mh->flushing); nexterror(); } sleep(&mh->r, mntreadreply, mh); diff --git a/port/portdat.h b/port/portdat.h index 041d89d413d328e5cae3b9d0a856314a1ea81998..792d7a9a36bace60a774c1d217fd43be1804514c 100644 --- a/port/portdat.h +++ b/port/portdat.h @@ -569,6 +569,7 @@ struct Stream { Queue *devq; /* read queue at device end */ Block *err; /* error message from down stream */ int forcedelim; /* force a delimiter before the next message */ + int flushmsg; /* flush up till the next delimiter */ }; /* diff --git a/port/stream.c b/port/stream.c index bb6252d66c1889235faee0111cf4431b53e361f6..449532974d1fa47c57eea0b4a166242d6efdfd04 100644 --- a/port/stream.c +++ b/port/stream.c @@ -823,6 +823,7 @@ streamnew(ushort type, ushort dev, ushort id, Qinfo *qi, int noopen) RD(s->procq)->next = 0; RD(s->devq)->next = RD(s->procq); WR(s->devq)->next = 0; + s->flushmsg = 0; if(qi->open) (*qi->open)(RD(s->devq), s); @@ -1105,8 +1106,15 @@ streamread(Chan *c, void *vbuf, long n) * one reader at a time */ s = c->stream; + left = n; qlock(&s->rdlock); if(waserror()){ + /* + * notes will flush the rest of any partially + * read message. + */ + if(n != left) + s->flushmsg = 1; qunlock(&s->rdlock); nexterror(); } @@ -1115,7 +1123,6 @@ streamread(Chan *c, void *vbuf, long n) * sleep till data is available */ q = RD(s->procq); - left = n; while(left){ bp = getq(q); if(bp == 0){ @@ -1132,6 +1139,13 @@ streamread(Chan *c, void *vbuf, long n) continue; } + if(s->flushmsg){ + if(bp->flags & S_DELIM) + s->flushmsg = 0; + freeb(bp); + continue; + } + i = BLEN(bp); if(i <= left){ memmove(buf, bp->rptr, i); diff --git a/power/boot.h b/power/boot.h index 4bbaab431c2b7720d6a5de5ddb2ee3604f7867d2..2737cbe9a7adb170f9a2ded235878e9b8cfc61fa 100644 --- a/power/boot.h +++ b/power/boot.h @@ -1,7 +1,7 @@ ulong bootcode[]={ 0x000000407, - 0x000005590, - 0x0000007d0, + 0x0000055e0, + 0x0000008d0, 0x000001190, 0x000000000, 0x000001020, @@ -146,7 +146,7 @@ ulong bootcode[]={ 0x023c38350, 0x00c0009fd, 0x0afa30008, - 0x023c298d2, + 0x023c299d2, 0x0afa20004, 0x023c3835b, 0x00c0009fd, @@ -155,7 +155,7 @@ ulong bootcode[]={ 0x08fa20024, 0x020030001, 0x010430029, - 0x023c598d2, + 0x023c599d2, 0x020030002, 0x010430019, 0x000000027, @@ -632,16 +632,16 @@ ulong bootcode[]={ 0x00c000968, 0x0afa20004, 0x020030032, - 0x0a3c397d2, + 0x0a3c398d2, 0x02002ffff, - 0x0a7c297d6, - 0x023c297d2, + 0x0a7c298d6, + 0x023c298d2, 0x0afa20004, - 0x023c487d2, + 0x023c488d2, 0x00c000ad4, 0x0afa40008, 0x08fa30024, - 0x023c487d2, + 0x023c488d2, 0x0afa30004, 0x0afa40008, 0x0afa1001c, @@ -663,7 +663,7 @@ ulong bootcode[]={ 0x000400008, 0x000000825, 0x08fa20024, - 0x023c487d2, + 0x023c488d2, 0x0afa20004, 0x0afa40008, 0x020021000, @@ -683,9 +683,9 @@ ulong bootcode[]={ 0x000000027, 0x008000697, 0x000000027, - 0x023c387d2, + 0x023c388d2, 0x0afa30004, - 0x023c497d2, + 0x023c498d2, 0x0afa40008, 0x0afa1001c, 0x00c000efb, @@ -697,22 +697,22 @@ ulong bootcode[]={ 0x08fa3001c, 0x000000027, 0x0afa30008, - 0x083c287d2, + 0x083c288d2, 0x000000027, 0x000021600, 0x000021603, 0x0afa2000c, - 0x083c387d3, + 0x083c388d3, 0x000000027, 0x000031e00, 0x000031e03, 0x0afa30010, - 0x083c287d4, + 0x083c288d4, 0x000000027, 0x000021600, 0x000021603, 0x0afa20014, - 0x083c387d5, + 0x083c388d5, 0x000000027, 0x000031e00, 0x000031e03, @@ -725,7 +725,7 @@ ulong bootcode[]={ 0x023bd0020, 0x000400008, 0x000000825, - 0x083c397d2, + 0x083c398d2, 0x020020033, 0x010620008, 0x000000027, @@ -736,7 +736,7 @@ ulong bootcode[]={ 0x023bd0020, 0x000400008, 0x000000825, - 0x087c297d6, + 0x087c298d6, 0x02003ffff, 0x010430008, 0x000000027, @@ -751,16 +751,16 @@ ulong bootcode[]={ 0x00c000968, 0x0afa30004, 0x020020034, - 0x0a3c297d2, + 0x0a3c298d2, 0x02003ffff, - 0x0a7c397d6, - 0x023c397d2, + 0x0a7c398d6, + 0x023c398d2, 0x0afa30004, - 0x023c487d2, + 0x023c488d2, 0x00c000ad4, 0x0afa40008, 0x08fa20024, - 0x023c487d2, + 0x023c488d2, 0x0afa20004, 0x0afa40008, 0x0afa1001c, @@ -778,7 +778,7 @@ ulong bootcode[]={ 0x000400008, 0x000000825, 0x08fa20024, - 0x023c487d2, + 0x023c488d2, 0x0afa20004, 0x0afa40008, 0x020021000, @@ -793,9 +793,9 @@ ulong bootcode[]={ 0x023bd0020, 0x000400008, 0x000000825, - 0x023c387d2, + 0x023c388d2, 0x0afa30004, - 0x023c497d2, + 0x023c498d2, 0x0afa40008, 0x00c000efb, 0x0afa1000c, @@ -808,7 +808,7 @@ ulong bootcode[]={ 0x023bd0020, 0x000400008, 0x000000825, - 0x087c397d6, + 0x087c398d6, 0x02002ffff, 0x010620008, 0x000000027, @@ -819,7 +819,7 @@ ulong bootcode[]={ 0x023bd0020, 0x000400008, 0x000000825, - 0x083c297d2, + 0x083c298d2, 0x020030037, 0x01443000d, 0x000000027, @@ -827,7 +827,7 @@ ulong bootcode[]={ 0x0afa20004, 0x023c3862d, 0x0afa30008, - 0x023c297d2, + 0x023c298d2, 0x024420008, 0x00c00098d, 0x0afa2000c, @@ -835,7 +835,7 @@ ulong bootcode[]={ 0x023bd0020, 0x000400008, 0x000000825, - 0x083c397d2, + 0x083c398d2, 0x020020035, 0x010620008, 0x000000027, @@ -908,14 +908,14 @@ ulong bootcode[]={ 0x023c38691, 0x00c000968, 0x0afa30004, - 0x023c287d2, + 0x023c288d2, 0x0afa20004, 0x023c38699, 0x0afa30008, 0x08fa20140, 0x00c0009b2, 0x0afa2000c, - 0x023c287d2, + 0x023c288d2, 0x0afa20004, 0x020040001, 0x0afa40008, @@ -927,23 +927,23 @@ ulong bootcode[]={ 0x023c3869f, 0x00c0008d1, 0x0afa30004, - 0x023c287d2, + 0x023c288d2, 0x0afa20004, 0x023c386a6, 0x0afa30008, 0x08fc28006, 0x00c0009b2, 0x0afa2000c, - 0x023c387d2, + 0x023c388d2, 0x00c000a3c, 0x0afa30004, 0x0afa10014, - 0x023c487d2, + 0x023c488d2, 0x00c000a3c, 0x0afa40004, 0x0afa10010, 0x08fa40148, - 0x023c387d2, + 0x023c388d2, 0x0afa40004, 0x0afa30008, 0x08fa40010, @@ -971,23 +971,23 @@ ulong bootcode[]={ 0x023c286b7, 0x00c0008d1, 0x0afa20004, - 0x023c387d2, + 0x023c388d2, 0x0afa30004, 0x023c286be, 0x0afa20008, 0x08fc38006, 0x00c0009b2, 0x0afa3000c, - 0x023c287d2, + 0x023c288d2, 0x00c000a3c, 0x0afa20004, 0x0afa10014, - 0x023c487d2, + 0x023c488d2, 0x00c000a3c, 0x0afa40004, 0x0afa10010, 0x08fa40148, - 0x023c387d2, + 0x023c388d2, 0x0afa40004, 0x0afa30008, 0x08fa40010, @@ -1300,7 +1300,7 @@ ulong bootcode[]={ 0x000002825, 0x028a20021, 0x010400011, - 0x023c6984e, + 0x023c6994e, 0x000051080, 0x000461021, 0x08c420000, @@ -1325,7 +1325,7 @@ ulong bootcode[]={ 0x000002025, 0x028820021, 0x01040000d, - 0x023c5984e, + 0x023c5994e, 0x000041080, 0x000451021, 0x08c420000, @@ -1357,7 +1357,7 @@ ulong bootcode[]={ 0x023bd0008, 0x023bdfff0, 0x0afbf0000, - 0x023c6984e, + 0x023c6994e, 0x020040020, 0x004800010, 0x000000027, @@ -1373,7 +1373,7 @@ ulong bootcode[]={ 0x000a0f809, 0x0ac400000, 0x08fa4000c, - 0x023c6984e, + 0x023c6994e, 0x008000950, 0x02484ffff, 0x08fa30014, @@ -1600,7 +1600,7 @@ ulong bootcode[]={ 0x08fa20010, 0x000000027, 0x0afa20004, - 0x00c0017e8, + 0x00c0017fd, 0x0afa00008, 0x08fa30010, 0x08fa20000, @@ -1838,7 +1838,7 @@ ulong bootcode[]={ 0x024a20008, 0x0afa20008, 0x020030040, - 0x00c00189b, + 0x00c0018b0, 0x0afa3000c, 0x08fa20010, 0x000000027, @@ -1864,7 +1864,7 @@ ulong bootcode[]={ 0x024a20008, 0x0afa20008, 0x02003001c, - 0x00c00189b, + 0x00c0018b0, 0x0afa3000c, 0x08fa20010, 0x02003001c, @@ -1875,7 +1875,7 @@ ulong bootcode[]={ 0x000000027, 0x024420024, 0x0afa20008, - 0x00c00189b, + 0x00c0018b0, 0x0afa3000c, 0x08fa20010, 0x02003001c, @@ -1886,7 +1886,7 @@ ulong bootcode[]={ 0x000000027, 0x024420040, 0x0afa20008, - 0x00c00189b, + 0x00c0018b0, 0x0afa3000c, 0x08fa20010, 0x000000027, @@ -2018,7 +2018,7 @@ ulong bootcode[]={ 0x024a3000e, 0x0afa30008, 0x02002001c, - 0x00c00189b, + 0x00c0018b0, 0x0afa2000c, 0x08fa30010, 0x08fa2001c, @@ -2167,7 +2167,7 @@ ulong bootcode[]={ 0x024a2000e, 0x0afa20008, 0x02003001c, - 0x00c00189b, + 0x00c0018b0, 0x0afa3000c, 0x08fa70018, 0x08fa20010, @@ -2247,7 +2247,7 @@ ulong bootcode[]={ 0x000000027, 0x0afa20008, 0x08ca3000c, - 0x00c00189b, + 0x00c0018b0, 0x0afa3000c, 0x08fa20018, 0x08fa30010, @@ -2391,7 +2391,7 @@ ulong bootcode[]={ 0x000000027, 0x0afa20008, 0x08ca3000c, - 0x00c00189b, + 0x00c0018b0, 0x0afa3000c, 0x08fa20018, 0x08fa30010, @@ -2522,7 +2522,7 @@ ulong bootcode[]={ 0x024a30008, 0x0afa30008, 0x020020074, - 0x00c00189b, + 0x00c0018b0, 0x0afa2000c, 0x08fa30010, 0x08fa2001c, @@ -2578,7 +2578,7 @@ ulong bootcode[]={ 0x024a20008, 0x0afa20008, 0x020030074, - 0x00c00189b, + 0x00c0018b0, 0x0afa3000c, 0x08fa20010, 0x000000027, @@ -2626,7 +2626,7 @@ ulong bootcode[]={ 0x024a2000e, 0x0afa20008, 0x02003001c, - 0x00c00189b, + 0x00c0018b0, 0x0afa3000c, 0x08fa20010, 0x000000027, @@ -2663,7 +2663,7 @@ ulong bootcode[]={ 0x08fa30018, 0x000000027, 0x0afa30008, - 0x00c00189b, + 0x00c0018b0, 0x0afa2000c, 0x08fa30010, 0x02002001c, @@ -2674,7 +2674,7 @@ ulong bootcode[]={ 0x000000027, 0x02463001c, 0x0afa30008, - 0x00c00189b, + 0x00c0018b0, 0x0afa2000c, 0x08fa30010, 0x02002001c, @@ -2685,7 +2685,7 @@ ulong bootcode[]={ 0x000000027, 0x024630038, 0x0afa30008, - 0x00c00189b, + 0x00c0018b0, 0x0afa2000c, 0x08fa40018, 0x08fa30010, @@ -2902,7 +2902,7 @@ ulong bootcode[]={ 0x0afa50010, 0x0afa50008, 0x020020040, - 0x00c00189b, + 0x00c0018b0, 0x0afa2000c, 0x08fa30010, 0x008000f2d, @@ -2920,7 +2920,7 @@ ulong bootcode[]={ 0x0afa50010, 0x0afa50008, 0x02002001c, - 0x00c00189b, + 0x00c0018b0, 0x0afa2000c, 0x08fa30010, 0x08fa2001c, @@ -2930,7 +2930,7 @@ ulong bootcode[]={ 0x0afa50010, 0x0afa50008, 0x02002001c, - 0x00c00189b, + 0x00c0018b0, 0x0afa2000c, 0x08fa30010, 0x08fa2001c, @@ -2940,7 +2940,7 @@ ulong bootcode[]={ 0x0afa50010, 0x0afa50008, 0x02002001c, - 0x00c00189b, + 0x00c0018b0, 0x0afa2000c, 0x08fa30010, 0x008000f2d, @@ -3044,7 +3044,7 @@ ulong bootcode[]={ 0x0afa50010, 0x0afa50008, 0x02002001c, - 0x00c00189b, + 0x00c0018b0, 0x0afa2000c, 0x08fa30010, 0x008000f2d, @@ -3169,7 +3169,7 @@ ulong bootcode[]={ 0x0afa50010, 0x0afa50008, 0x02002001c, - 0x00c00189b, + 0x00c0018b0, 0x0afa2000c, 0x08fa6001c, 0x08fa30010, @@ -3441,7 +3441,7 @@ ulong bootcode[]={ 0x0afa50010, 0x0afa50008, 0x020020074, - 0x00c00189b, + 0x00c0018b0, 0x0afa2000c, 0x08fa30010, 0x008000f2d, @@ -3477,7 +3477,7 @@ ulong bootcode[]={ 0x0afa50010, 0x0afa50008, 0x020020074, - 0x00c00189b, + 0x00c0018b0, 0x0afa2000c, 0x08fa30010, 0x008000f2d, @@ -3516,7 +3516,7 @@ ulong bootcode[]={ 0x0afa50010, 0x0afa50008, 0x02002001c, - 0x00c00189b, + 0x00c0018b0, 0x0afa2000c, 0x08fa30010, 0x008000f2d, @@ -3539,7 +3539,7 @@ ulong bootcode[]={ 0x0afa50010, 0x0afa50008, 0x02003001c, - 0x00c00189b, + 0x00c0018b0, 0x0afa3000c, 0x08fa20010, 0x08fa3001c, @@ -3549,7 +3549,7 @@ ulong bootcode[]={ 0x0afa50010, 0x0afa50008, 0x02003001c, - 0x00c00189b, + 0x00c0018b0, 0x0afa3000c, 0x08fa20010, 0x08fa3001c, @@ -3559,7 +3559,7 @@ ulong bootcode[]={ 0x0afa50010, 0x0afa50008, 0x02003001c, - 0x00c00189b, + 0x00c0018b0, 0x0afa3000c, 0x08fa5001c, 0x08fa20010, @@ -3718,7 +3718,9 @@ ulong bootcode[]={ 0x0ac440000, 0x023bdffcc, 0x0afbf0000, - 0x08fa90044, + 0x08fab0044, + 0x023ce87d2, + 0x08fca80e2, 0x08fa60040, 0x08fc2805e, 0x000000027, @@ -3726,29 +3728,50 @@ ulong bootcode[]={ 0x08fc380de, 0x000000027, 0x0afa30018, - 0x08fac0038, - 0x000000027, - 0x0afcc805e, + 0x08fa80038, 0x08fa3003c, 0x000000027, 0x02463ffff, 0x0afc380de, - 0x000062825, - 0x080a50000, + 0x08fc280de, + 0x000002825, + 0x000484823, + 0x000a9202a, + 0x01080000b, + 0x000000027, + 0x000c53821, + 0x080e70000, + 0x000000027, + 0x000073e00, + 0x000073e03, + 0x001c71821, + 0x090630000, + 0x000000027, + 0x0106000ac, + 0x000000027, + 0x000c51821, + 0x001054021, + 0x0afc8805e, + 0x001455021, + 0x0afca80e2, + 0x024660001, + 0x080630000, 0x020020025, - 0x000052e00, - 0x000052e03, - 0x010a20030, - 0x024c60001, - 0x014a00012, + 0x000031e00, + 0x000031e03, + 0x01062002b, + 0x000032825, + 0x014600014, 0x000000027, 0x08fc380de, 0x000000027, - 0x00183202b, - 0x014800002, + 0x00103202b, + 0x014800004, 0x000000027, - 0x0258cffff, - 0x0a1800000, + 0x08fc280de, + 0x000000027, + 0x02448ffff, + 0x0a1000000, 0x08fa3001c, 0x000000027, 0x0afc3805e, @@ -3758,38 +3781,31 @@ ulong bootcode[]={ 0x08fa20000, 0x023bd0034, 0x000400008, - 0x0000c0825, + 0x000080825, 0x08fc380de, 0x000000027, - 0x00183202b, - 0x010800005, + 0x00103202b, + 0x010800004, 0x000000027, - 0x0000c1025, - 0x0258c0001, - 0x0afcc805e, + 0x000081025, + 0x025080001, 0x0a0450000, - 0x08fc280e2, - 0x000000027, - 0x024420001, - 0x0afc280e2, 0x02002000a, 0x014a20003, - 0x000000027, + 0x0254a0001, 0x008001296, - 0x0afc080e2, + 0x000005025, 0x020020009, - 0x014a2ffd2, + 0x014a2ffc0, 0x000000027, - 0x08fc380e2, - 0x000000027, - 0x024630007, + 0x025430007, 0x0201cfff8, - 0x0007c1824, + 0x0007c5024, 0x008001296, - 0x0afc380e2, + 0x000000027, 0x02007fc18, - 0x0200bfc18, - 0x000005025, + 0x0200dfc18, + 0x000006025, 0x000062825, 0x024c60001, 0x0afa60040, @@ -3808,8 +3824,8 @@ ulong bootcode[]={ 0x014e20002, 0x000000027, 0x000003825, - 0x0080012cf, - 0x000005825, + 0x0080012df, + 0x000006825, 0x028a20031, 0x014400025, 0x000000027, @@ -3817,7 +3833,7 @@ ulong bootcode[]={ 0x00065202a, 0x014800021, 0x000000027, - 0x000004025, + 0x000004825, 0x028a30030, 0x014600005, 0x000000027, @@ -3829,15 +3845,15 @@ ulong bootcode[]={ 0x014e20005, 0x000000027, 0x014a0ffe4, - 0x000083825, + 0x000093825, 0x008001296, 0x024c6ffff, 0x014a0ffe0, - 0x000085825, + 0x000096825, 0x008001296, 0x024c6ffff, 0x02002000a, - 0x001020018, + 0x001220018, 0x000001812, 0x000651821, 0x000062825, @@ -3847,36 +3863,36 @@ ulong bootcode[]={ 0x000000027, 0x000052e00, 0x000052e03, - 0x0080012eb, - 0x02468ffd0, + 0x0080012fb, + 0x02469ffd0, 0x020030030, 0x014a30006, 0x000000027, 0x02003fc18, 0x010e30003, 0x000000027, - 0x0080012ea, + 0x0080012fa, 0x000000027, 0x02002002a, 0x014a20009, 0x000000027, - 0x08d250000, + 0x08d650000, 0x02002fc18, 0x014e20003, - 0x025290004, - 0x0080012cf, + 0x0256b0004, + 0x0080012df, 0x000053825, - 0x0080012cf, - 0x000055825, + 0x0080012df, + 0x000056825, 0x030a5007f, - 0x0afa90044, - 0x0afa90004, + 0x0afab0044, + 0x0afab0004, 0x0afa70030, 0x0afa70008, - 0x0afab002c, - 0x0afab000c, - 0x0afaa0028, - 0x0afaa0010, + 0x0afad002c, + 0x0afad000c, + 0x0afac0028, + 0x0afac0010, 0x0afa50014, 0x023c2814a, 0x000451021, @@ -3890,19 +3906,24 @@ ulong bootcode[]={ 0x000000027, 0x00040f809, 0x000000027, - 0x08fcc805e, - 0x08fab002c, - 0x08fa90044, + 0x08fad002c, + 0x08fab0044, + 0x08fca80e2, + 0x08fc8805e, 0x08fa70030, 0x08fa60040, 0x004210005, - 0x000000027, + 0x023ce87d2, 0x08fa40028, 0x000011023, - 0x0080012cf, - 0x000825025, + 0x0080012df, + 0x000826025, 0x008001296, - 0x001214821, + 0x001615821, + 0x001051021, + 0x024a50001, + 0x008001299, + 0x0a0470000, 0x023bdfff0, 0x0afbf0000, 0x08fa40018, @@ -3919,34 +3940,34 @@ ulong bootcode[]={ 0x0afa30004, 0x0afa40008, 0x08fa3001c, - 0x00c001433, + 0x00c001448, 0x0afa3000c, 0x08fa20000, 0x000000027, 0x000400008, 0x023bd0010, - 0x00800134b, + 0x008001360, 0x000042023, 0x023bdffa8, 0x0afbf0000, - 0x08fa9006c, + 0x08faa006c, 0x08fa5005c, 0x08fac0064, - 0x08faa0018, - 0x08fa80014, + 0x08fa90014, 0x08fa70068, + 0x000004025, 0x000007025, 0x02003006f, - 0x00069202a, + 0x0006a202a, 0x0148000c4, 0x023ab0038, - 0x0112300c0, + 0x0114300c0, 0x000000027, 0x020030058, - 0x0112300ba, + 0x0114300ba, 0x000000027, 0x020030064, - 0x0112300b5, + 0x0114300b5, 0x000000027, 0x030e20078, 0x020030028, @@ -3964,19 +3985,19 @@ ulong bootcode[]={ 0x020030020, 0x010430077, 0x000000027, - 0x08caa0000, + 0x08ca80000, 0x020030004, 0x0afa30028, 0x030e20020, 0x014400003, 0x000000027, - 0x00540006c, + 0x00500006c, 0x000000027, 0x02005001c, 0x030e20040, 0x010400062, 0x0a3a00055, - 0x00109001a, + 0x0012a001a, 0x000003010, 0x000000027, 0x000000027, @@ -4000,7 +4021,7 @@ ulong bootcode[]={ 0x010430008, 0x000000027, 0x020030008, - 0x015230018, + 0x015430018, 0x000000027, 0x024a5ffff, 0x001651021, @@ -4018,7 +4039,7 @@ ulong bootcode[]={ 0x02002fc18, 0x0afa30008, 0x0afa2000c, - 0x00c001340, + 0x00c001355, 0x0afa70010, 0x08fa10028, 0x08fa20000, @@ -4026,7 +4047,7 @@ ulong bootcode[]={ 0x000400008, 0x023bd0058, 0x020030010, - 0x01523ffeb, + 0x01543ffeb, 0x000000027, 0x011c0000a, 0x000000027, @@ -4037,18 +4058,18 @@ ulong bootcode[]={ 0x024a5ffff, 0x001651021, 0x020040030, - 0x0080013a7, + 0x0080013bc, 0x0a0440000, 0x024a5ffff, 0x001651021, 0x020040078, - 0x0080013c3, + 0x0080013d8, 0x0a0440000, 0x030e30040, 0x01060001e, 0x000000027, - 0x00109001a, - 0x000004012, + 0x0012a001a, + 0x000004812, 0x000000027, 0x000000027, 0x02003fc18, @@ -4062,29 +4083,29 @@ ulong bootcode[]={ 0x030e20040, 0x010400005, 0x000000027, - 0x01d000003, + 0x01d200003, 0x000000027, - 0x008001398, + 0x0080013ad, 0x000000027, - 0x01d400003, + 0x01d000003, 0x000000027, - 0x008001398, + 0x0080013ad, 0x000000027, 0x030e20040, 0x01440ffa0, 0x024a5ffff, - 0x00149001b, - 0x00800138d, + 0x0010a001b, + 0x0080013a2, 0x000003010, - 0x00149001b, - 0x0080013d4, - 0x000005012, + 0x0010a001b, + 0x0080013e9, + 0x000004012, 0x0200d0001, - 0x008001385, - 0x0000a5023, - 0x08caa0000, + 0x00800139a, + 0x000084023, + 0x08ca80000, 0x020030004, - 0x008001380, + 0x008001395, 0x0afa30028, 0x08ca20000, 0x000000027, @@ -4096,15 +4117,15 @@ ulong bootcode[]={ 0x000031c03, 0x020020004, 0x0afa20028, - 0x008001380, - 0x000035025, - 0x08caa0000, + 0x008001395, + 0x000034025, + 0x08ca80000, 0x020030004, - 0x008001380, + 0x008001395, 0x0afa30028, - 0x08caa0000, + 0x08ca80000, 0x020030004, - 0x008001380, + 0x008001395, 0x0afa30028, 0x020030030, 0x01043000a, @@ -4112,11 +4133,11 @@ ulong bootcode[]={ 0x020030048, 0x010430003, 0x000000027, - 0x00800137d, + 0x008001392, 0x000000027, - 0x08ca80000, + 0x08ca90000, 0x020030004, - 0x008001380, + 0x008001395, 0x0afa30028, 0x08ca30000, 0x000000027, @@ -4126,25 +4147,25 @@ ulong bootcode[]={ 0x03042ffff, 0x020030004, 0x0afa30028, - 0x008001380, - 0x000025025, - 0x00800136d, - 0x02009000a, + 0x008001395, + 0x000024025, + 0x008001382, + 0x0200a000a, 0x0200e0001, - 0x00800136d, - 0x020090010, - 0x00800136d, - 0x020090008, + 0x008001382, + 0x0200a0010, + 0x008001382, + 0x0200a0008, 0x020030075, - 0x011230006, + 0x011430006, 0x000000027, 0x020030078, - 0x01123fff7, + 0x01143fff7, 0x000000027, - 0x00800136d, + 0x008001382, 0x000000027, - 0x02009000a, - 0x00800136d, + 0x0200a000a, + 0x008001382, 0x034e70020, 0x023bdfff0, 0x0afbf0000, @@ -4174,7 +4195,7 @@ ulong bootcode[]={ 0x000000027, 0x01ce00003, 0x000000027, - 0x008001443, + 0x008001458, 0x000000027, 0x000c9202b, 0x010800005, @@ -4192,7 +4213,7 @@ ulong bootcode[]={ 0x02003fc18, 0x010e3ffe3, 0x000000027, - 0x008001443, + 0x008001458, 0x024e7ffff, 0x020020009, 0x01562fff9, @@ -4203,7 +4224,7 @@ ulong bootcode[]={ 0x02003fc18, 0x010e3ffd8, 0x0afc880e2, - 0x008001443, + 0x008001458, 0x024e7ffff, 0x02002fc18, 0x011420003, @@ -4228,7 +4249,7 @@ ulong bootcode[]={ 0x0a0640000, 0x025080001, 0x024a50001, - 0x008001478, + 0x00800148d, 0x0afc880e2, 0x000aa202a, 0x01080ffba, @@ -4243,7 +4264,7 @@ ulong bootcode[]={ 0x0a0440000, 0x025080001, 0x024a50001, - 0x008001487, + 0x00800149c, 0x0afc880e2, 0x023bdffec, 0x0afbf0000, @@ -4258,7 +4279,7 @@ ulong bootcode[]={ 0x0afa30004, 0x0afa00008, 0x02002fc18, - 0x00c001433, + 0x00c001448, 0x0afa2000c, 0x08fa20000, 0x023bd0014, @@ -4276,7 +4297,7 @@ ulong bootcode[]={ 0x08fa3001c, 0x02002fc18, 0x0afa30008, - 0x00c001433, + 0x00c001448, 0x0afa2000c, 0x08fa20000, 0x023bd0014, @@ -4296,7 +4317,7 @@ ulong bootcode[]={ 0x000000027, 0x0afa3000c, 0x08fa20024, - 0x00c001340, + 0x00c001355, 0x0afa20010, 0x08fa20000, 0x023bd0014, @@ -4370,7 +4391,7 @@ ulong bootcode[]={ 0x0e7a6004c, 0x0e7a70004, 0x0e7a60008, - 0x00c001912, + 0x00c001927, 0x000000027, 0x01020000e, 0x000000027, @@ -4381,7 +4402,7 @@ ulong bootcode[]={ 0x0afa30008, 0x0afa2000c, 0x08fa300b0, - 0x00c001340, + 0x00c001355, 0x0afa30010, 0x08fa20000, 0x023bd00a0, @@ -4392,7 +4413,7 @@ ulong bootcode[]={ 0x020030001, 0x0e7a10004, 0x0e7a00008, - 0x00c001942, + 0x00c001957, 0x0afa3000c, 0x01020000e, 0x000000027, @@ -4403,7 +4424,7 @@ ulong bootcode[]={ 0x0afa30008, 0x0afa2000c, 0x08fa300b0, - 0x00c001340, + 0x00c001355, 0x0afa30010, 0x08fa20000, 0x023bd00a0, @@ -4414,7 +4435,7 @@ ulong bootcode[]={ 0x02003ffff, 0x0e7a10004, 0x0e7a00008, - 0x00c001942, + 0x00c001957, 0x0afa3000c, 0x08fad00b4, 0x08fac00ac, @@ -4428,7 +4449,7 @@ ulong bootcode[]={ 0x0afa30008, 0x0afa2000c, 0x08fa300b0, - 0x00c001340, + 0x00c001355, 0x0afa30010, 0x08fa20000, 0x023bd00a0, @@ -4472,7 +4493,7 @@ ulong bootcode[]={ 0x023a20034, 0x0e7a10004, 0x0e7a00008, - 0x00c001814, + 0x00c001829, 0x0afa2000c, 0x08fa20034, 0x04444f800, @@ -4496,7 +4517,7 @@ ulong bootcode[]={ 0x000023043, 0x0afa60030, 0x000061023, - 0x00c0017bf, + 0x00c0017d4, 0x0afa20004, 0x0c7a30048, 0x0c7a2004c, @@ -4508,7 +4529,7 @@ ulong bootcode[]={ 0x08fa30034, 0x000000027, 0x000431023, - 0x00c0017bf, + 0x00c0017d4, 0x0afa20004, 0x08fad00b4, 0x023ae0078, @@ -4531,7 +4552,7 @@ ulong bootcode[]={ 0x08fa30034, 0x000000027, 0x000431023, - 0x00c0017bf, + 0x00c0017d4, 0x0afa20004, 0x08fad00b4, 0x08fac00ac, @@ -4540,7 +4561,7 @@ ulong bootcode[]={ 0x0c7a2003c, 0x000000027, 0x046201182, - 0x0080015a8, + 0x0080015bd, 0x023ae0078, 0x0c7c180e6, 0x0c7c080ea, @@ -4557,7 +4578,7 @@ ulong bootcode[]={ 0x08fa30034, 0x000000027, 0x000431023, - 0x00c0017bf, + 0x00c0017d4, 0x0afa20004, 0x08fad00b4, 0x08fac00ac, @@ -4566,7 +4587,7 @@ ulong bootcode[]={ 0x0c7a2003c, 0x000000027, 0x046201182, - 0x0080015bf, + 0x0080015d4, 0x023ae0078, 0x02003fc18, 0x015830002, @@ -4592,16 +4613,16 @@ ulong bootcode[]={ 0x01cc00002, 0x000000027, 0x020060001, - 0x028c30020, - 0x014600009, + 0x028c20020, + 0x014400009, 0x0afa60028, - 0x020020065, - 0x015a20003, + 0x020030065, + 0x015a30003, 0x000000027, 0x0200cffff, 0x0afac00ac, 0x0200d0065, - 0x00800156c, + 0x008001581, 0x0afad00b4, 0x0c7a70048, 0x0c7a6004c, @@ -4615,7 +4636,7 @@ ulong bootcode[]={ 0x08fa30034, 0x02002ffff, 0x000431023, - 0x00c0017bf, + 0x00c0017d4, 0x0afa20004, 0x08fad00b4, 0x023ae0078, @@ -4637,7 +4658,7 @@ ulong bootcode[]={ 0x000671823, 0x004600134, 0x0afa7002c, - 0x00c0017bf, + 0x00c0017d4, 0x0afa30004, 0x0c7a30040, 0x0c7a20044, @@ -4646,7 +4667,7 @@ ulong bootcode[]={ 0x046201083, 0x0e7a30004, 0x0e7a20008, - 0x00c00177d, + 0x00c001792, 0x000000027, 0x08fad00b4, 0x023ae0078, @@ -4704,7 +4725,7 @@ ulong bootcode[]={ 0x024e70001, 0x02484fff6, 0x0a0440001, - 0x00800164f, + 0x008001664, 0x024c6ffff, 0x010e00007, 0x0200b0001, @@ -4772,7 +4793,7 @@ ulong bootcode[]={ 0x020030030, 0x0a0430000, 0x024e7ffff, - 0x008001696, + 0x0080016ab, 0x024c60001, 0x019000013, 0x000000027, @@ -4792,7 +4813,7 @@ ulong bootcode[]={ 0x0256b0001, 0x0a0430000, 0x02508ffff, - 0x0080016a7, + 0x0080016bc, 0x024c60001, 0x08fa300b0, 0x000000027, @@ -4821,7 +4842,7 @@ ulong bootcode[]={ 0x0afa30008, 0x0afa2000c, 0x08fa300b0, - 0x00c001340, + 0x00c001355, 0x0afa30010, 0x08fa20000, 0x023bd00a0, @@ -4877,19 +4898,19 @@ ulong bootcode[]={ 0x000001810, 0x024630030, 0x0a0430000, - 0x0080016ce, + 0x0080016e3, 0x024c60001, 0x000061825, 0x001231021, 0x02003002b, 0x0a0430000, - 0x0080016ef, + 0x008001704, 0x024c60001, 0x000061025, 0x001221821, 0x020020065, 0x0a0620000, - 0x0080016e5, + 0x0080016fa, 0x024c60001, 0x020030067, 0x011a30006, @@ -4897,7 +4918,7 @@ ulong bootcode[]={ 0x020030068, 0x011a30003, 0x000000027, - 0x0080016c8, + 0x0080016dd, 0x000000027, 0x024c7ffff, 0x004e00006, @@ -4917,11 +4938,11 @@ ulong bootcode[]={ 0x000000027, 0x01107ff93, 0x000073025, - 0x0080016c8, + 0x0080016dd, 0x024c60001, - 0x00800172d, + 0x008001742, 0x02508ffff, - 0x008001725, + 0x00800173a, 0x024e7ffff, 0x08fa30034, 0x02002ffff, @@ -4931,7 +4952,7 @@ ulong bootcode[]={ 0x000003825, 0x08fa30034, 0x0200d0068, - 0x008001683, + 0x008001698, 0x001835023, 0x08fa200b0, 0x000000027, @@ -4942,7 +4963,7 @@ ulong bootcode[]={ 0x001221821, 0x02002002b, 0x0a0620000, - 0x008001674, + 0x008001689, 0x024c60001, 0x0c7c180e6, 0x0c7c080ea, @@ -4952,7 +4973,7 @@ ulong bootcode[]={ 0x0e7a60044, 0x0e7a70004, 0x0e7a60008, - 0x00c00177d, + 0x00c001792, 0x000000027, 0x08fad00b4, 0x023ae0078, @@ -4979,14 +5000,14 @@ ulong bootcode[]={ 0x046222181, 0x0e7a70040, 0x0e7a60044, - 0x008001646, + 0x00800165b, 0x000000027, - 0x0080015e2, + 0x0080015f7, 0x0258cffff, 0x020020001, 0x0afa20014, 0x025ad0020, - 0x00800156c, + 0x008001581, 0x0afad00b4, 0x023bdffe8, 0x0afbf0000, @@ -5003,7 +5024,7 @@ ulong bootcode[]={ 0x04624c081, 0x0e7a30004, 0x0e7a20008, - 0x00c001862, + 0x00c001877, 0x0afa2000c, 0x04620c032, 0x000000027, @@ -5032,7 +5053,7 @@ ulong bootcode[]={ 0x023a2001c, 0x0e7a30004, 0x0e7a20008, - 0x00c001862, + 0x00c001877, 0x0afa2000c, 0x0c7a1001c, 0x0c7a00020, @@ -5048,7 +5069,7 @@ ulong bootcode[]={ 0x04624c081, 0x0e7a30004, 0x0e7a20008, - 0x00c00177d, + 0x00c001792, 0x000000027, 0x08fa20000, 0x023bd000c, @@ -5061,7 +5082,7 @@ ulong bootcode[]={ 0x004810008, 0x000000027, 0x000041023, - 0x00c0017bf, + 0x00c0017d4, 0x0afa20004, 0x08fa20000, 0x023bd0014, @@ -5082,12 +5103,12 @@ ulong bootcode[]={ 0x000042843, 0x0afa50010, 0x000851823, - 0x00c0017bf, + 0x00c0017d4, 0x0afa30004, 0x0e7a10008, 0x0e7a0000c, 0x08fa20010, - 0x00c0017bf, + 0x00c0017d4, 0x0afa20004, 0x0c7a30008, 0x0c7a2000c, @@ -5272,7 +5293,7 @@ ulong bootcode[]={ 0x08fa4000c, 0x000000027, 0x000821024, - 0x008001883, + 0x008001898, 0x0afa2000c, 0x08fa3000c, 0x08fa40004, @@ -5382,7 +5403,7 @@ ulong bootcode[]={ 0x000000027, 0x0a0c8ffff, 0x024c6ffff, - 0x008001901, + 0x008001916, 0x024e7ffff, 0x023bdfff4, 0x03c027ff0, @@ -5412,7 +5433,7 @@ ulong bootcode[]={ 0x000000825, 0x0e7a50004, 0x0e7a40008, - 0x00c001942, + 0x00c001957, 0x0afa0000c, 0x014200005, 0x000000027, @@ -5484,7 +5505,6 @@ ulong bootcode[]={ 0x000000825, 0x000000000, 0x000000000, - 0x000000000, 0x07072696e, 0x074206572, 0x0726f7273, @@ -5597,13 +5617,13 @@ ulong bootcode[]={ 0x000010000, 0x002000000, 0x000000000, - 0x000005258, - 0x00000536c, - 0x000004d60, - 0x000005420, - 0x0000052a4, - 0x0000052ec, - 0x00000533c, + 0x0000052ac, + 0x0000053c0, + 0x000004db4, + 0x000005474, + 0x0000052f8, + 0x000005340, + 0x000005390, 0x000000000, 0x000000000, 0x000000000, @@ -5983,8 +6003,72 @@ ulong bootcode[]={ 0x065617365, 0x020726562, 0x06f6f7400, - 0x00005d80, + 0x001000000, + 0x000000000, + 0x000010100, + 0x000000000, + 0x000000000, + 0x000000000, + 0x000000000, + 0x000000000, + 0x000000000, + 0x000010000, + 0x000000000, + 0x000000000, + 0x000000000, + 0x000000000, + 0x000000000, + 0x000000000, + 0x000000000, + 0x000000000, + 0x000000000, + 0x000000000, + 0x000000000, + 0x000000000, + 0x000000000, + 0x000000000, + 0x000000000, + 0x000000000, + 0x000000000, + 0x000000000, + 0x000000000, + 0x000000000, + 0x000000000, + 0x000000000, + 0x000000000, + 0x000000000, + 0x000000000, + 0x000000000, + 0x000000000, + 0x000000000, + 0x000000000, + 0x000000000, + 0x000000000, + 0x000000000, + 0x000000000, + 0x000000000, + 0x000000000, + 0x000000000, + 0x000000000, + 0x000000000, + 0x000000000, + 0x000000000, + 0x000000000, + 0x000000000, + 0x000000000, + 0x000000000, + 0x000000000, + 0x000000000, + 0x000000000, + 0x000000000, + 0x000000000, + 0x000000000, + 0x000000000, + 0x000000000, + 0x000000000, + 0x000000000, + 0x00005ed0, 0x0, - 0x00005d80, + 0x00005ed0, 0x0, };