| plan 9 kernel history: overview | file list | diff list |
1991/0710/power/main.c (diff list | history)
| 1990/0227/sys/src/9/power/main.c:371,377 – 1990/0312/sys/src/9/power/main.c:371,377 (short | long) | ||
| 1990/0227 | conf.npage = i*1024/4; conf.npte = 20000; | |
| 1990/0312 | conf.nmod = 2000; | |
| 1990/0227 | conf.nalarm = 1000; conf.norig = 500; conf.nchan = 500; | |
| 1990/0312/sys/src/9/power/main.c:375,383 – 1990/0321/sys/src/9/power/main.c:375,383 (short | long) | ||
| 1990/0227 | conf.nalarm = 1000; conf.norig = 500; conf.nchan = 500; | |
| 1990/0321 | conf.nenv = 400; conf.nenvchar = 20000; conf.npgenv = 400; | |
| 1990/0227 | conf.nmtab = 100; conf.nmount = 500; conf.nmntdev = 30; | |
| 1990/0321/sys/src/9/power/main.c:359,365 – 1990/0322/sys/src/9/power/main.c:359,365 (short | long) | ||
| 1990/0227 | conf.npgrp = 100; x = 0x12345678; | |
| 1990/0322 | for(i=4; i<128; i+=4){ | |
| 1990/0227 | l = (long*)(KSEG1|(i*1024L*1024L)); *l = x; wbflush(); | |
| 1990/0321/sys/src/9/power/main.c:372,378 – 1990/0322/sys/src/9/power/main.c:372,378 | ||
| 1990/0227 | conf.npte = 20000; | |
| 1990/0312 | conf.nmod = 2000; | |
| 1990/0227 |
| |
| 1990/0322 | conf.nalarm = 10000; | |
| 1990/0227 | conf.norig = 500; conf.nchan = 500; | |
| 1990/0321 | conf.nenv = 400; | |
| 1990/0322/sys/src/9/power/main.c:370,376 – 1990/0325/sys/src/9/power/main.c:370,376 (short | long) | ||
| 1990/0227 | } conf.npage = i*1024/4; | |
| 1990/0325 | conf.npte = 40000; | |
| 1990/0312 | conf.nmod = 2000; | |
| 1990/0322 | conf.nalarm = 10000; | |
| 1990/0227 | conf.norig = 500; | |
| 1990/0325/sys/src/9/power/main.c:370,376 – 1990/0409/sys/src/9/power/main.c:370,376 (short | long) | ||
| 1990/0227 | } conf.npage = i*1024/4; | |
| 1990/0325 |
| |
| 1990/0409 | conf.npte = 50000; | |
| 1990/0312 | conf.nmod = 2000; | |
| 1990/0322 | conf.nalarm = 10000; | |
| 1990/0227 | conf.norig = 500; | |
| 1990/0409/sys/src/9/power/main.c:370,376 – 1990/04101/sys/src/9/power/main.c:370,376 (short | long) | ||
| 1990/0227 | } conf.npage = i*1024/4; | |
| 1990/0409 |
| |
| 1990/04101 | conf.npte = 60000; | |
| 1990/0312 | conf.nmod = 2000; | |
| 1990/0322 | conf.nalarm = 10000; | |
| 1990/0227 | conf.norig = 500; | |
| 1990/04101/sys/src/9/power/main.c:370,376 – 1990/0412/sys/src/9/power/main.c:370,376 (short | long) | ||
| 1990/0227 | } conf.npage = i*1024/4; | |
| 1990/04101 |
| |
| 1990/0412 | conf.npte = 4*conf.npage; | |
| 1990/0312 | conf.nmod = 2000; | |
| 1990/0322 | conf.nalarm = 10000; | |
| 1990/0227 | conf.norig = 500; | |
| 1990/0412/sys/src/9/power/main.c:7,17 – 1990/0424/sys/src/9/power/main.c:7,28 (short | long) | ||
| 1990/0227 | #include "ureg.h" #include "init.h" | |
| 1990/0424 | /* * args passed by boot process */ int _argc; char **_argv; char **_env; char *argv[5]; char argx[4][64]; | |
| 1990/0227 | void main(void) { | |
| 1990/0424 | int i; | |
| 1990/0227 | active.exiting = 0; active.machs = 1; | |
| 1990/0424 | arginit(); | |
| 1990/0227 | machinit(); confinit(); lockinit(); | |
| 1990/0412/sys/src/9/power/main.c:33,38 – 1990/0424/sys/src/9/power/main.c:44,63 | ||
| 1990/0227 | } void | |
| 1990/0424 | arginit(void) { int i; if(_argc > 5) _argc = 5; for(i = 1; i < _argc; i++){ strcpy(argx[i-1], _argv[i]); argv[i-1] = &(argx[i-1][0]); } } void | |
| 1990/0227 | machinit(void) { int n; | |
| 1990/0412/sys/src/9/power/main.c:142,153 – 1990/0424/sys/src/9/power/main.c:167,180 | ||
| 1990/0227 | void init0(void) { | |
| 1990/0424 | int i; | |
| 1990/0227 | m->proc = u->p; u->p->state = Running; u->p->mach = m; spllo(); chandevinit(); | |
| 1990/0424 | ||
| 1990/0227 | u->slash = (*devtab[0].attach)(0); u->dot = clone(u->slash, 0); | |
| 1990/0412/sys/src/9/power/main.c:352,362 – 1990/0424/sys/src/9/power/main.c:379,388 | ||
| 1990/0227 | { long x, i, j, *l; | |
| 1990/0424 | #include "conf.h" | |
| 1990/0227 | if(conf.nmach > MAXMACH) panic("confinit"); | |
| 1990/0322 | for(i=4; i<128; i+=4){ | |
| 1990/0412/sys/src/9/power/main.c:369,390 – 1990/0424/sys/src/9/power/main.c:395,401 | ||
| 1990/0227 | x += 0x3141526; } conf.npage = i*1024/4; | |
| 1990/0412 |
| |
| 1990/0312 |
| |
| 1990/0322 |
| |
| 1990/0227 |
| |
| 1990/0321 |
| |
| 1990/0227 |
| |
| 1990/0424 | conf.npte = 4 * conf.npage; | |
| 1990/0227 | conf.nqueue = 5 * conf.nstream; conf.nblock = 16 * conf.nstream; | |
| 1990/0424/sys/src/9/power/main.c:12,19 – 1990/0427/sys/src/9/power/main.c:12,19 (short | long) | ||
| 1990/0424 | */ int _argc; char **_argv; char **_env; | |
| 1990/0427 | char argbuf[512]; int argsize; | |
| 1990/0424 | ||
| 1990/0227 | void main(void) | |
| 1990/0424/sys/src/9/power/main.c:43,60 – 1990/0427/sys/src/9/power/main.c:43,89 | ||
| 1990/0227 | schedinit(); } | |
| 1990/0427 | /* * copy arguments into a temporary buffer. we do this because the arguments * are in memory that may be allocated to processes or kernel buffers. */ | |
| 1990/0227 | void | |
| 1990/0424 | arginit(void) { | |
| 1990/0427 | int i, n; int nbytes; int ssize; char *p; char **argv; char *charp; | |
| 1990/0424 |
| |
| 1990/0427 | /* * trim arguments to make them fit in the buffer */ for(nbytes = i = 0; i < _argc; i++){ n = strlen(_argv[i]) + 1; ssize = BY2WD*(i+2) + ((nbytes+n+(BY2WD-1)) & ~(BY2WD-1)); if(ssize > sizeof(argbuf)) break; nbytes += n; } _argc = i; ssize = BY2WD*(i+1) + ((nbytes+(BY2WD-1)) & ~(BY2WD-1)); | |
| 1990/0424 |
| |
| 1990/0427 | /* * copy arguments into the buffer */ argv = (char**)(argbuf + sizeof(argbuf) - ssize); charp = (char*)(argbuf + sizeof(argbuf) - nbytes); for(i=0; i<_argc; i++){ argv[i] = charp; n = strlen(_argv[i]) + 1; memcpy(charp, _argv[i], n); charp += n; | |
| 1990/0424 | } | |
| 1990/0427 | _argv = argv; argsize = ssize; | |
| 1990/0424 | } void | |
| 1990/0424/sys/src/9/power/main.c:168,184 – 1990/0427/sys/src/9/power/main.c:197,217 | ||
| 1990/0227 | init0(void) { | |
| 1990/0424 | int i; | |
| 1990/0427 | ulong *sp; | |
| 1990/0424 | ||
| 1990/0227 | m->proc = u->p; u->p->state = Running; u->p->mach = m; spllo(); | |
| 1990/0427 | ||
| 1990/0227 | chandevinit(); | |
| 1990/0424 | ||
| 1990/0227 | u->slash = (*devtab[0].attach)(0); u->dot = clone(u->slash, 0); | |
| 1990/0427 | sp = (ulong*)(USTKTOP - argsize); touser(sp); | |
| 1990/0227 | } FPsave initfp; | |
| 1990/0424/sys/src/9/power/main.c:189,194 – 1990/0427/sys/src/9/power/main.c:222,229 | ||
| 1990/0227 | Proc *p; Seg *s; User *up; | |
| 1990/0427 | int i; char **av; | |
| 1990/0227 | p = newproc(); p->pgrp = newpgrp(); | |
| 1990/0424/sys/src/9/power/main.c:211,221 – 1990/0427/sys/src/9/power/main.c:246,262 | ||
| 1990/0227 | up->p = p; /* | |
| 1990/0427 | * User Stack, pass input arguments to boot process | |
| 1990/0227 | */ s = &p->seg[SSEG]; s->proc = p; s->o = neworig(USTKTOP-BY2PG, 1, OWRPERM, 0); | |
| 1990/0427 | s->o->pte[0].page = newpage(0, 0, USTKTOP-BY2PG); memcpy((ulong*)(s->o->pte[0].page->pa|KZERO|(BY2PG-argsize)), argbuf + sizeof(argbuf) - argsize, argsize); av = (char **)(s->o->pte[0].page->pa|KZERO|(BY2PG-argsize)); for(i = 0; i < _argc; i++) av[i] += (char *)USTKTOP - (argbuf + sizeof(argbuf)); | |
| 1990/0227 | s->minva = USTKTOP-BY2PG; s->maxva = USTKTOP; | |
| 1990/0427/sys/src/9/power/main.c:418,424 – 1990/0430/sys/src/9/power/main.c:418,424 (short | long) | ||
| 1990/0227 | void confinit(void) { | |
| 1990/0430 | long x, i, j, *l, *e; | |
| 1990/0227 | ||
| 1990/0424 | #include "conf.h" | |
| 1990/0427/sys/src/9/power/main.c:439,442 – 1990/0430/sys/src/9/power/main.c:439,449 | ||
| 1990/0424 | conf.npte = 4 * conf.npage; | |
| 1990/0227 | conf.nqueue = 5 * conf.nstream; conf.nblock = 16 * conf.nstream; | |
| 1990/0430 | /* * zero memory from bss up */ e = (long *)(i*1024*1024); for(l = &end; l < e; l++) *l = 0; | |
| 1990/0227 | } | |
| 1990/0430/sys/src/9/power/main.c:12,30 – 1990/0504/sys/src/9/power/main.c:12,50 (short | long) | ||
| 1990/0424 | */ int _argc; char **_argv; char **_env; | |
| 1990/0504 | /* * arguments passed to initcode */ | |
| 1990/0427 | char argbuf[512]; int argsize; | |
| 1990/0424 | ||
| 1990/0504 | /* * environment passed to any kernel started by this kernel */ char envbuf[64]; char *env[2]; /* * configuration file read by boot program */ char confbuf[4*1024]; /* * system name */ char sysname[64]; | |
| 1990/0227 | void main(void) { | |
| 1990/0424 | int i; | |
| 1990/0504 | icflush(0, 64*1024); | |
| 1990/0227 | active.exiting = 0; active.machs = 1; | |
| 1990/0424 |
| |
| 1990/0227 | machinit(); confinit(); | |
| 1990/0504 | arginit(); | |
| 1990/0227 | lockinit(); printinit(); tlbinit(); | |
| 1990/0430/sys/src/9/power/main.c:43,92 – 1990/0504/sys/src/9/power/main.c:63,69 | ||
| 1990/0227 | schedinit(); } | |
| 1990/0427 |
| |
| 1990/0227 | void | |
| 1990/0424 |
| |
| 1990/0427 |
| |
| 1990/0424 | ||
| 1990/0427 |
| |
| 1990/0424 | ||
| 1990/0427 |
| |
| 1990/0424 |
| |
| 1990/0427 |
| |
| 1990/0424 |
| |
| 1990/0227 | machinit(void) { int n; | |
| 1990/0430/sys/src/9/power/main.c:413,430 – 1990/0504/sys/src/9/power/main.c:390,541 | ||
| 1990/0227 | where->next = old->next; } | |
| 1990/0504 | typedef struct Conftab { char *sym; ulong *x; } Conftab; #include "conf.h" | |
| 1990/0227 | Conf conf; | |
| 1990/0504 | ulong confeval(char *exp) { char *op; Conftab *ct; /* crunch leading white */ while(*exp==' ' || *exp=='\t') exp++; op = strchr(exp, '+'); if(op != 0){ *op++ = 0; return confeval(exp) + confeval(op); } op = strchr(exp, '*'); if(op != 0){ *op++ = 0; return confeval(exp) * confeval(op); } if(*exp >= '0' && *exp <= '9') return strtoul(exp, 0, 0); /* crunch trailing white */ op = strchr(exp, ' '); if(op) *op = 0; op = strchr(exp, '\t'); if(op) *op = 0; /* lookup in symbol table */ for(ct = conftab; ct->sym; ct++) if(strcmp(exp, ct->sym) == 0) return *(ct->x); return 0; } /* * each line of the configuration is of the form `param = expression'. */ | |
| 1990/0227 | void | |
| 1990/0504 | confset(char *sym) | |
| 1990/0227 | { | |
| 1990/0430 |
| |
| 1990/0504 | char *val, *p; Conftab *ct; ulong x; | |
| 1990/0227 | ||
| 1990/0424 |
| |
| 1990/0504 | /* * parse line */ | |
| 1990/0424 | ||
| 1990/0227 |
| |
| 1990/0504 | /* comment */ if(p = strchr(sym, '#')) *p = 0; | |
| 1990/0227 | ||
| 1990/0504 | /* skip white */ for(p = sym; *p==' ' || *p=='\t'; p++) ; sym = p; /* skip sym */ for(; *p && *p!=' ' && *p!='\t' && *p!='='; p++) ; if(*p) *p++ = 0; /* skip white */ for(; *p==' ' || *p=='\t' || *p=='='; p++) ; val = p; /* * lookup value */ for(ct = conftab; ct->sym; ct++) if(strcmp(sym, ct->sym) == 0){ *(ct->x) = confeval(val); return; } if(strcmp(sym, "sysname")==0){ p = strchr(val, ' '); if(p) *p = 0; strcpy(sysname, val); } } /* * read the ascii configuration left by the boot kernel */ void confread(void) { char *line; char *end; /* * process configuration file */ line = confbuf; while(end = strchr(line, '\n')){ *end = 0; confset(line); line = end+1; } } void confprint(void) { Conftab *ct; /* * lookup value */ for(ct = conftab; ct->sym; ct++) print("%s == %d\n", ct->sym, *ct->x); } void confinit(void) { long x, i, j, *l; /* * copy configuration down from high memory */ strcpy(confbuf, (char *)(0x80000000 + 4*1024*1024 - 4*1024)); /* * size memory */ | |
| 1990/0227 | x = 0x12345678; | |
| 1990/0322 | for(i=4; i<128; i+=4){ | |
| 1990/0227 | l = (long*)(KSEG1|(i*1024L*1024L)); | |
| 1990/0430/sys/src/9/power/main.c:436,449 – 1990/0504/sys/src/9/power/main.c:547,642 | ||
| 1990/0227 | x += 0x3141526; } conf.npage = i*1024/4; | |
| 1990/0504 | /* * set minimal default values */ conf.nmach = 1; conf.nmod = 2000; conf.nalarm = 1000; conf.norig = 9; conf.nchan = 64; conf.nenv = 4; conf.nenvchar = 1000; conf.npgenv = 400; conf.nmtab = 4; conf.nmount = 4; conf.nmntdev = 4; conf.nmntbuf = 4; conf.nmnthdr = 4; conf.nstream = 4; conf.nsrv = 0; conf.nproc = 4; conf.npgrp = 4; | |
| 1990/0424 | conf.npte = 4 * conf.npage; | |
| 1990/0227 | conf.nqueue = 5 * conf.nstream; conf.nblock = 16 * conf.nstream; | |
| 1990/0430 | ||
| 1990/0504 | confread(); if(conf.nmach > MAXMACH) panic("confinit"); } /* * copy arguments passed by the boot kernel (or ROM) into a temporary buffer. * we do this because the arguments are in memory that may be allocated * to processes or kernel buffers. */ #define SYSENV "netaddr=" void arginit(void) { int i, n; int nbytes; int ssize; char *p; char **argv; char *charp; | |
| 1990/0430 | /* | |
| 1990/0504 | * get the system name from the environment | |
| 1990/0430 | */ | |
| 1990/0504 | if(*sysname == 0){ for(argv = _env; *argv; argv++){ if(strncmp(*argv, SYSENV, sizeof(SYSENV)-1)==0){ strcpy(sysname, (*argv) + sizeof(SYSENV)-1); break; } } } strcpy(envbuf, SYSENV); strcat(envbuf, sysname); env[0] = envbuf; env[1] = 0; /* * trim arguments to make them fit in the buffer (argv[0] is sysname) */ nbytes = 0; _argv[0] = sysname; for(i = 0; i < _argc; i++){ n = strlen(_argv[i]) + 1; ssize = BY2WD*(i+2) + ((nbytes+n+(BY2WD-1)) & ~(BY2WD-1)); if(ssize > sizeof(argbuf)) break; nbytes += n; } _argc = i; ssize = BY2WD*(i+1) + ((nbytes+(BY2WD-1)) & ~(BY2WD-1)); /* * copy arguments into the buffer */ argv = (char**)(argbuf + sizeof(argbuf) - ssize); charp = (char*)(argbuf + sizeof(argbuf) - nbytes); for(i=0; i<_argc; i++){ argv[i] = charp; n = strlen(_argv[i]) + 1; memcpy(charp, _argv[i], n); charp += n; } _argv = argv; argsize = ssize; | |
| 1990/0227 | } | |
| 1990/0504/sys/src/9/power/main.c:546,552 – 1990/0614/sys/src/9/power/main.c:546,553 (short | long) | ||
| 1990/0227 | break; x += 0x3141526; } | |
| 1990/0614 | conf.npage0 = i*1024/4; conf.npage = conf.npage0; | |
| 1990/0504 | /* * set minimal default values | |
| 1990/0614/sys/src/9/power/main.c:199,204 – 1990/0617/sys/src/9/power/main.c:199,205 (short | long) | ||
| 1990/0227 | Proc *p; Seg *s; User *up; | |
| 1990/0617 | KMap *k; | |
| 1990/0427 | int i; char **av; | |
| 1990/0227 | ||
| 1990/0614/sys/src/9/power/main.c:219,226 – 1990/0617/sys/src/9/power/main.c:220,229 | ||
| 1990/0227 | /* * User */ | |
| 1990/0617 | k = kmap(p->upage); up = (User*)VA(k); | |
| 1990/0227 | up->p = p; | |
| 1990/0617 | kunmap(k); | |
| 1990/0227 | /* | |
| 1990/0427 | * User Stack, pass input arguments to boot process | |
| 1990/0614/sys/src/9/power/main.c:244,250 – 1990/0617/sys/src/9/power/main.c:247,255 | ||
| 1990/0227 | s->proc = p; s->o = neworig(UTZERO, 1, 0, 0); s->o->pte[0].page = newpage(0, 0, UTZERO); | |
| 1990/0617 | k = kmap(s->o->pte[0].page); memcpy((ulong*)VA(k), initcode, sizeof initcode); kunmap(k); | |
| 1990/0227 | s->minva = 0x1000; s->maxva = 0x2000; | |
| 1990/0617/sys/src/9/power/main.c:57,62 – 1990/0718/sys/src/9/power/main.c:57,63 (short | long) | ||
| 1990/0227 | io2init(); chandevreset(); streaminit(); | |
| 1990/0718 | sysloginit(); | |
| 1990/0227 | pageinit(); userinit(); launchinit(); | |
| 1990/0718/sys/src/9/power/main.c:39,48 – 1990/0801/sys/src/9/power/main.c:39,47 (short | long) | ||
| 1990/0227 | { | |
| 1990/0424 | int i; | |
| 1990/0504 |
| |
| 1990/0801 | machinit(); | |
| 1990/0227 | active.exiting = 0; active.machs = 1; | |
| 1990/0504 | arginit(); | |
| 1990/0227 | lockinit(); | |
| 1990/0718/sys/src/9/power/main.c:69,74 – 1990/0801/sys/src/9/power/main.c:68,74 | ||
| 1990/0227 | { int n; | |
| 1990/0801 | icflush(0, 64*1024); | |
| 1990/0227 | n = m->machno; memset(m, 0, sizeof(Mach)); m->machno = n; | |
| 1990/0801/sys/src/9/power/main.c:246,253 – 1990/0802/sys/src/9/power/main.c:246,258 (short | long) | ||
| 1990/0227 | */ s = &p->seg[TSEG]; s->proc = p; | |
| 1990/0802 | /* * On the mips, init text must be OCACHED to avoid reusing page * and getting in trouble with the hardware instruction cache. */ s->o = neworig(UTZERO, 1, OCACHED, 0); | |
| 1990/0227 | s->o->pte[0].page = newpage(0, 0, UTZERO); | |
| 1990/0802 | s->o->npage = 1; | |
| 1990/0617 | k = kmap(s->o->pte[0].page); memcpy((ulong*)VA(k), initcode, sizeof initcode); kunmap(k); | |
| 1990/0802/sys/src/9/power/main.c:133,142 – 1990/0825/sys/src/9/power/main.c:133,143 (short | long) | ||
| 1990/0227 | /* * Tell CPU 0's SBCC to map all interrupts from the IO2 to MIPS level 5 * | |
| 1990/0825 | * 0x01 level 0 * 0x02 level 1 * 0x04 level 2 * 0x08 level 4 * 0x10 level 5 | |
| 1990/0227 | */ SBCCREG->flevel = 0x10; | |
| 1990/0825/sys/src/9/power/main.c:34,39 – 1990/0826/sys/src/9/power/main.c:34,44 (short | long) | ||
| 1990/0504 | */ char sysname[64]; | |
| 1990/0826 | /* * IO board type */ int ioid; | |
| 1990/0227 | void main(void) { | |
| 1990/0825/sys/src/9/power/main.c:53,64 – 1990/0826/sys/src/9/power/main.c:58,70 | ||
| 1990/0227 | chaninit(); clockinit(); alarminit(); | |
| 1990/0826 | ioboardinit(); | |
| 1990/0227 | chandevreset(); streaminit(); | |
| 1990/0718 | sysloginit(); | |
| 1990/0227 | pageinit(); userinit(); | |
| 1990/0826 | ioboardid(); | |
| 1990/0227 | launchinit(); schedinit(); } | |
| 1990/0825/sys/src/9/power/main.c:100,113 – 1990/0826/sys/src/9/power/main.c:106,140 | ||
| 1990/0227 | *p++ = *q++; } | |
| 1990/0826 | void ioboardid(void) { switch(ioid){ case IO2R1: print("IO2 revision 1\n"); break; case IO2R2: print("IO2 revision 2\n"); break; case IO3R1: print("IO3 revision 1\n"); break; default: print("unknown IO board\n"); break; } } | |
| 1990/0227 | /* * We have to program both the IO2 board to generate interrupts * and the SBCC on CPU 0 to accept them. */ void | |
| 1990/0826 | ioboardinit(void) | |
| 1990/0227 | { long i; | |
| 1990/0826 | ioid = *IOID; | |
| 1990/0227 | /* * reset VME bus (MODEREG is on the IO2) | |
| 1990/0826/sys/src/9/power/main.c:35,43 – 1990/0905/sys/src/9/power/main.c:35,45 (short | long) | ||
| 1990/0504 | char sysname[64]; | |
| 1990/0826 | /* | |
| 1990/0905 | * IO board type, number of interrupt levels, and interrupt enable mask | |
| 1990/0826 | */ int ioid; | |
| 1990/0905 | int iolevels; int iomask; | |
| 1990/0826 | ||
| 1990/0227 | void main(void) | |
| 1990/0826/sys/src/9/power/main.c:133,140 – 1990/0905/sys/src/9/power/main.c:135,157 | ||
| 1990/0826 | ioboardinit(void) | |
| 1990/0227 | { long i; | |
| 1990/0905 | int intrs; | |
| 1990/0826 | ||
| 1990/0905 | /* * set up interrupts based on IO board type */ | |
| 1990/0826 | ioid = *IOID; | |
| 1990/0905 | switch(ioid){ case IO2R1: case IO2R2: iolevels = 8; iomask = 0xff; break; case IO3R1: iolevels = 11; iomask = 0x7fe; break; } | |
| 1990/0227 | /* * reset VME bus (MODEREG is on the IO2) | |
| 1990/0826/sys/src/9/power/main.c:152,160 – 1990/0905/sys/src/9/power/main.c:169,177 | ||
| 1990/0227 | setvmevec(i, novme); /* | |
| 1990/0905 | * tell IO2 to send all interrupts to CPU 0's SBCC | |
| 1990/0227 | */ | |
| 1990/0905 | for(i=0; i<iolevels; i++) | |
| 1990/0227 | INTVECREG->i[i].vec = 0<<8; /* | |
| 1990/0826/sys/src/9/power/main.c:174,186 – 1990/0905/sys/src/9/power/main.c:191,203 | ||
| 1990/0227 | * The SBCC 16 bit registers are read/written as ulong, but only * bits 23-16 and 7-0 are meaningful. */ | |
| 1990/0905 | SBCCREG->fintenable |= iomask; /* turn on all interrupts */ | |
| 1990/0227 | SBCCREG->idintenable |= 0x800000; /* allow interrupts from the IO2 */ /* * enable all interrupts on the IO2 */ | |
| 1990/0905 | *IO2SETMASK = iomask; | |
| 1990/0227 | } void | |
| 1990/0905/sys/src/9/power/main.c:62,67 – 1990/09051/sys/src/9/power/main.c:62,68 (short | long) | ||
| 1990/0227 | alarminit(); | |
| 1990/0826 | ioboardinit(); | |
| 1990/0227 | chandevreset(); | |
| 1990/09051 | sinit(); | |
| 1990/0227 | streaminit(); | |
| 1990/0718 | sysloginit(); | |
| 1990/0227 | pageinit(); | |
| 1990/09051/sys/src/9/power/main.c:35,51 – 1990/0907/sys/src/9/power/main.c:35,47 (short | long) | ||
| 1990/0504 | char sysname[64]; | |
| 1990/0826 | /* | |
| 1990/0905 |
| |
| 1990/0907 | * IO board type | |
| 1990/0826 | */ int ioid; | |
| 1990/0905 |
| |
| 1990/0826 | ||
| 1990/0227 | void main(void) { | |
| 1990/0424 |
| |
| 1990/0801 | machinit(); | |
| 1990/0227 | active.exiting = 0; active.machs = 1; | |
| 1990/09051/sys/src/9/power/main.c:61,73 – 1990/0907/sys/src/9/power/main.c:57,68 | ||
| 1990/0227 | clockinit(); alarminit(); | |
| 1990/0826 | ioboardinit(); | |
| 1990/0907 | ioboardid(); | |
| 1990/0227 | chandevreset(); | |
| 1990/09051 |
| |
| 1990/0227 | streaminit(); | |
| 1990/0718 | sysloginit(); | |
| 1990/0227 | pageinit(); userinit(); | |
| 1990/0826 |
| |
| 1990/0227 | launchinit(); schedinit(); } | |
| 1990/09051/sys/src/9/power/main.c:114,129 – 1990/0907/sys/src/9/power/main.c:109,124 | ||
| 1990/0826 | { switch(ioid){ case IO2R1: | |
| 1990/0907 | iprint("IO2 revision 1\n"); | |
| 1990/0826 | break; case IO2R2: | |
| 1990/0907 | iprint("IO2 revision 2\n"); | |
| 1990/0826 | break; case IO3R1: | |
| 1990/0907 | iprint("IO3 revision 1\n"); | |
| 1990/0826 | break; default: | |
| 1990/0907 | iprint("unknown IO board\n"); | |
| 1990/0826 | break; } } | |
| 1990/09051/sys/src/9/power/main.c:136,166 – 1990/0907/sys/src/9/power/main.c:131,146 | ||
| 1990/0826 | ioboardinit(void) | |
| 1990/0227 | { long i; | |
| 1990/0905 |
| |
| 1990/0826 | ||
| 1990/0905 |
| |
| 1990/0826 | ioid = *IOID; | |
| 1990/0905 |
| |
| 1990/0227 | /* * reset VME bus (MODEREG is on the IO2) */ | |
| 1990/0907 | MODEREG->resetforce = (1<<1) | (1<<0); | |
| 1990/0227 | for(i=0; i<1000000; i++) ; | |
| 1990/0907 | MODEREG->resetforce = (1<<0); | |
| 1990/0227 | MODEREG->masterslave = (SLAVE<<4) | MASTER; /* | |
| 1990/09051/sys/src/9/power/main.c:170,178 – 1990/0907/sys/src/9/power/main.c:150,158 | ||
| 1990/0227 | setvmevec(i, novme); /* | |
| 1990/0905 |
| |
| 1990/0907 | * tell IO2 to sent all interrupts to CPU 0's SBCC | |
| 1990/0227 | */ | |
| 1990/0905 |
| |
| 1990/0907 | for(i=0; i<8; i++) | |
| 1990/0227 | INTVECREG->i[i].vec = 0<<8; /* | |
| 1990/09051/sys/src/9/power/main.c:192,204 – 1990/0907/sys/src/9/power/main.c:172,184 | ||
| 1990/0227 | * The SBCC 16 bit registers are read/written as ulong, but only * bits 23-16 and 7-0 are meaningful. */ | |
| 1990/0905 |
| |
| 1990/0907 | SBCCREG->fintenable |= 0xff; /* allow all interrupts on the IO2 */ | |
| 1990/0227 | SBCCREG->idintenable |= 0x800000; /* allow interrupts from the IO2 */ /* * enable all interrupts on the IO2 */ | |
| 1990/0905 |
| |
| 1990/0907 | *IO2SETMASK = 0xff; | |
| 1990/0227 | } void | |
| 1990/09051/sys/src/9/power/main.c:607,612 – 1990/0907/sys/src/9/power/main.c:587,597 | ||
| 1990/0614 | conf.npage = conf.npage0; | |
| 1990/0504 | /* | |
| 1990/0907 | * clear MP bus error caused by sizing memory */ i = *SBEADDR; /* | |
| 1990/0504 | * set minimal default values */ conf.nmach = 1; | |
| 1990/09051/sys/src/9/power/main.c:629,634 – 1990/0907/sys/src/9/power/main.c:614,622 | ||
| 1990/0424 | conf.npte = 4 * conf.npage; | |
| 1990/0227 | conf.nqueue = 5 * conf.nstream; conf.nblock = 16 * conf.nstream; | |
| 1990/0907 | conf.nnoifc = 1; conf.nnoconv = 32; conf.nurp = 256; | |
| 1990/0430 | ||
| 1990/0504 | confread(); | |
| 1990/0907/sys/src/9/power/main.c:57,63 – 1990/0911/sys/src/9/power/main.c:57,62 (short | long) | ||
| 1990/0227 | clockinit(); alarminit(); | |
| 1990/0826 | ioboardinit(); | |
| 1990/0907 |
| |
| 1990/0227 | chandevreset(); streaminit(); | |
| 1990/0718 | sysloginit(); | |
| 1990/0907/sys/src/9/power/main.c:104,128 – 1990/0911/sys/src/9/power/main.c:103,108 | ||
| 1990/0227 | *p++ = *q++; } | |
| 1990/0826 |
| |
| 1990/0907 |
| |
| 1990/0826 |
| |
| 1990/0907 |
| |
| 1990/0826 |
| |
| 1990/0907 |
| |
| 1990/0826 |
| |
| 1990/0907 |
| |
| 1990/0826 |
| |
| 1990/0227 | /* * We have to program both the IO2 board to generate interrupts * and the SBCC on CPU 0 to accept them. | |
| 1990/0907/sys/src/9/power/main.c:131,146 – 1990/0911/sys/src/9/power/main.c:111,132 | ||
| 1990/0826 | ioboardinit(void) | |
| 1990/0227 | { long i; | |
| 1990/0911 | int noforce; | |
| 1990/0826 | ioid = *IOID; | |
| 1990/0911 | if(ioid >= IO3R1) noforce = 1; else noforce = 0; | |
| 1990/0227 | ||
| 1990/0911 | ||
| 1990/0227 | /* * reset VME bus (MODEREG is on the IO2) */ | |
| 1990/0907 |
| |
| 1990/0911 | MODEREG->resetforce = (1<<1) | noforce; | |
| 1990/0227 | for(i=0; i<1000000; i++) ; | |
| 1990/0907 |
| |
| 1990/0911 | MODEREG->resetforce = noforce; | |
| 1990/0227 | MODEREG->masterslave = (SLAVE<<4) | MASTER; /* | |
| 1990/0907/sys/src/9/power/main.c:596,622 – 1990/0911/sys/src/9/power/main.c:582,608 | ||
| 1990/0504 | */ conf.nmach = 1; conf.nmod = 2000; | |
| 1990/0424 |
| |
| 1990/0227 |
| |
| 1990/0911 | conf.nalarm = 10000; conf.norig = 500; conf.nchan = 1000; conf.npgenv = 800; conf.nmtab = 100; conf.nmount = 5000; conf.nmntdev = 150; conf.nmntbuf = 120; conf.nmnthdr = 120; conf.nstream = 128; conf.nsrv = 32; conf.nproc = 386; conf.npgrp = 100; | |
| 1990/0907 | conf.nnoifc = 1; conf.nnoconv = 32; conf.nurp = 256; | |
| 1990/0911 | conf.nenv = 15*conf.nproc; conf.nenvchar = 20 * conf.nenv; conf.npte = 4 * conf.npage; conf.nqueue = 3 * conf.nstream; conf.nblock = 10 * conf.nstream; | |
| 1990/0430 | ||
| 1990/0504 | confread(); | |
| 1990/0911/sys/src/9/power/main.c:47,52 – 1990/0912/sys/src/9/power/main.c:47,53 (short | long) | ||
| 1990/0227 | active.machs = 1; confinit(); | |
| 1990/0504 | arginit(); | |
| 1990/0912 | sysloginit(); | |
| 1990/0227 | lockinit(); printinit(); tlbinit(); | |
| 1990/0911/sys/src/9/power/main.c:59,65 – 1990/0912/sys/src/9/power/main.c:60,65 | ||
| 1990/0826 | ioboardinit(); | |
| 1990/0227 | chandevreset(); streaminit(); | |
| 1990/0718 |
| |
| 1990/0227 | pageinit(); userinit(); launchinit(); | |
| 1990/0911/sys/src/9/power/main.c:112,123 – 1990/0912/sys/src/9/power/main.c:112,127 | ||
| 1990/0227 | { long i; | |
| 1990/0911 | int noforce; | |
| 1990/0912 | int maxlevel; | |
| 1990/0826 | ioid = *IOID; | |
| 1990/0911 |
| |
| 1990/0912 | if(ioid >= IO3R1){ maxlevel = 11; | |
| 1990/0911 | noforce = 1; | |
| 1990/0912 | } else { maxlevel = 8; | |
| 1990/0911 | noforce = 0; | |
| 1990/0912 | } | |
| 1990/0227 | ||
| 1990/0911 | ||
| 1990/0227 | /* | |
| 1990/0911/sys/src/9/power/main.c:138,144 – 1990/0912/sys/src/9/power/main.c:142,148 | ||
| 1990/0227 | /* | |
| 1990/0907 | * tell IO2 to sent all interrupts to CPU 0's SBCC | |
| 1990/0227 | */ | |
| 1990/0907 |
| |
| 1990/0912 | for(i=0; i<maxlevel; i++) | |
| 1990/0227 | INTVECREG->i[i].vec = 0<<8; /* | |
| 1990/0911/sys/src/9/power/main.c:302,312 – 1990/0912/sys/src/9/power/main.c:306,323 | ||
| 1990/0227 | launch(int n) { Beef *p; | |
| 1990/0912 | long i, s; ulong *ptr; | |
| 1990/0227 | p = (Beef*) 0xb0000500 + n; p->launch = newstart; | |
| 1990/0912 | p->sum = 0; s = 0; ptr = (ulong*)p; for (i = 0; i < sizeof(Beef)/sizeof(ulong); i++) s += *ptr++; p->sum = -(s+1); | |
| 1990/0227 | for(i=0; i<3000000; i++) if(p->launch == 0) break; | |
| 1990/0912/sys/src/9/power/main.c:47,53 – 1990/0928/sys/src/9/power/main.c:47,52 (short | long) | ||
| 1990/0227 | active.machs = 1; confinit(); | |
| 1990/0504 | arginit(); | |
| 1990/0912 |
| |
| 1990/0227 | lockinit(); printinit(); tlbinit(); | |
| 1990/0928/sys/src/9/power/main.c:121,127 – 1990/1002/sys/src/9/power/main.c:121,127 (short | long) | ||
| 1990/0912 | maxlevel = 8; | |
| 1990/0911 | noforce = 0; | |
| 1990/0912 | } | |
| 1990/0227 | ||
| 1990/1002 | print("IO %d\n", ioid); | |
| 1990/0911 | ||
| 1990/0227 | /* * reset VME bus (MODEREG is on the IO2) | |
| Too many diffs (26 > 25). Stopping. | ||