| plan 9 kernel history: overview | file list | diff list |
1990/1231/power/main.c (diff list | history)
| 1990/1229/sys/src/9/power/main.c:39,56 – 1990/1231/sys/src/9/power/main.c:39,45 (short | long | prev | next) | ||
| 1990/0826 | */ int ioid; | |
| 1990/1228 |
| |
| 1990/1229 |
| |
| 1990/1228 |
| |
| 1990/1229 |
| |
| 1990/1228 | ||
| 1990/1229 |
| |
| 1990/1228 | ||
| 1990/11211 | char user[NAMELEN] = "bootes"; | |
| 1990/0227 | void | |
| 1990/1229/sys/src/9/power/main.c:192,218 – 1990/1231/sys/src/9/power/main.c:181,186 | ||
| 1990/0227 | */ | |
| 1990/0907 | *IO2SETMASK = 0xff; | |
| 1990/1228 |
| |
| 1990/1229 |
| |
| 1990/1228 |
| |
| 1990/1229 |
| |
| 1990/1228 |
| |
| 1990/0227 | void | |
| 1990/1229/sys/src/9/power/main.c:734,813 – 1990/1231/sys/src/9/power/main.c:702,800 | ||
| 1990/1229 | } /* | |
| 1990/1231 | * setup the IO2 lance, io buffers are in lance memory | |
| 1990/1229 | */ void | |
| 1990/1231 | lanceIO2setup(Lance *lp) | |
| 1990/1229 | { | |
| 1990/1231 | ushort *sp; /* * reset lance and set parity on its memory */ MODEREG->promenet &= ~1; MODEREG->promenet |= 1; for(sp = LANCERAM; sp < LANCEEND; sp += 1) *sp = 0; lp->sep = 1; lp->lanceram = LANCERAM; lp->lm = (Lancemem*)0; /* * Allocate space in lance memory for the io buffers. * Start at 4k to avoid the initialization block and * descriptor rings. */ lp->lrp = (Etherpkt*)(4*1024); lp->ltp = lp->lrp + lp->nrrb; lp->rp = (Etherpkt*)(((ulong)LANCERAM) + (ulong)lp->lrp); lp->tp = lp->rp + lp->nrrb; | |
| 1990/1229 | } /* | |
| 1990/1231 | * setup the IO3 lance, io buffers are in host memory mapped to * lance address space | |
| 1990/1229 | */ void | |
| 1990/1231 | lanceIO3setup(Lance *lp) | |
| 1990/1229 | { | |
| 1990/1231 | ulong x, y; int index; ushort *sp; int len; /* * reset lance and set parity on its memory */ MODEREG->promenet |= 1; MODEREG->promenet &= ~1; for(sp = LANCE3RAM; sp < LANCE3END; sp += 2) *sp = 0; lp->sep = 4; lp->lanceram = LANCE3RAM; lp->lm = (Lancemem*)0x800000; /* * allocate some host memory for buffers and map it into lance * space */ len = (lp->nrrb + lp->ntrb)*sizeof(Etherpkt); lp->rp = (Etherpkt*)ialloc(len , 1); lp->tp = lp->rp + lp->nrrb; x = (ulong)lp->rp; lp->lrp = (Etherpkt*)(x & 0xFFF); lp->ltp = lp->lrp + lp->nrrb; index = LANCEINDEX; for(y = x+len; x < y; x += 0x1000){ *WRITEMAP = (index<<16) | (x>>12)&0xFFFF; index++; } | |
| 1990/1229 | } /* | |
| 1990/1231 | * set up the lance | |
| 1990/1229 | */ void | |
| 1990/1231 | lancesetup(Lance *lp) | |
| 1990/1229 | { | |
| 1990/1231 | lp->rap = LANCERAP; lp->rdp = LANCERDP; lp->ea[0] = LANCEID[20]>>8; lp->ea[1] = LANCEID[16]>>8; lp->ea[2] = LANCEID[12]>>8; lp->ea[3] = LANCEID[8]>>8; lp->ea[4] = LANCEID[4]>>8; lp->ea[5] = LANCEID[0]>>8; lp->lognrrb = 7; lp->logntrb = 7; lp->nrrb = 1<<lp->lognrrb; lp->ntrb = 1<<lp->logntrb; if(ioid >= IO3R1) lanceIO3setup(lp); else lanceIO2setup(lp); | |
| 1990/1229 | } void | |