| plan 9 kernel history: overview | file list | diff list |
1991/0906/pc/main.c (diff list | history)
| 1991/0905/sys/src/9/pc/main.c:7,17 – 1991/0906/sys/src/9/pc/main.c:7,16 (short | long | prev | next) | ||
| 1991/0716 | #include "ureg.h" #include "init.h" | |
| 1991/0629 | ||
| 1991/0716 |
| |
| 1991/0711 | ||
| 1991/0906 | char user[NAMELEN] = "bootes"; | |
| 1991/0905 | ||
| 1991/0716 | void | |
| 1991/0702 | main(void) | |
| 1991/0625 | { | |
| 1991/0905/sys/src/9/pc/main.c:23,28 – 1991/0906/sys/src/9/pc/main.c:22,28 | ||
| 1991/0827 | print("%ludK bytes of physical memory\n", (conf.base1 + conf.npage1*BY2PG)/1024); | |
| 1991/0711 | mmuinit(); | |
| 1991/0718 | trapinit(); | |
| 1991/0906 | mathinit(); | |
| 1991/0719 | kbdinit(); | |
| 1991/0718 | clockinit(); faultinit(); | |
| 1991/0905/sys/src/9/pc/main.c:52,58 – 1991/0906/sys/src/9/pc/main.c:52,57 | ||
| 1991/0716 | memset(m, 0, sizeof(Mach)); m->machno = n; m->mmask = 1<<m->machno; | |
| 1991/0625 | } | |
| 1991/0905/sys/src/9/pc/main.c:90,97 – 1991/0906/sys/src/9/pc/main.c:89,94 | ||
| 1991/0716 | User *up; KMap *k; | |
| 1991/0905 |
| |
| 1991/0711 | ||
| 1991/0716 | p = newproc(); p->pgrp = newpgrp(); p->egrp = newegrp(); | |
| 1991/0905/sys/src/9/pc/main.c:99,104 – 1991/0906/sys/src/9/pc/main.c:96,102 | ||
| 1991/0716 | strcpy(p->text, "*init*"); p->fpstate = FPinit; | |
| 1991/0906 | fpoff(); | |
| 1991/0716 | /* * Kernel Stack | |
| 1991/0905/sys/src/9/pc/main.c:224,251 – 1991/0906/sys/src/9/pc/main.c:222,298 | ||
| 1991/0711 | } | |
| 1991/0716 | /* | |
| 1991/0906 | * math coprocessor error */ void matherror(Ureg *ur) { postnote(u->p, 1, "math: 837 error", 0); } /* * math coprocessor emulation fault */ void mathemu(Ureg *ur) { switch(u->p->fpstate){ case FPinit: fpinit(); u->p->fpstate = FPactive; break; case FPinactive: fprestore(&u->fpsave); u->p->fpstate = FPactive; break; case FPactive: print("emu actv 0x%lux\n", getcr0()); postnote(u->p, 1, "math: emulation", 0); break; } } /* * math coprocessor segment overrun */ void mathover(Ureg *ur) { postnote(u->p, 1, "math: segment overrun", 0); } void mathinit(void) { setvec(Matherrorvec, matherror); setvec(Mathemuvec, mathemu); setvec(Mathovervec, mathover); } /* | |
| 1991/0716 | * set up floating point for a new process | |
| 1991/0703 | void | |
| 1991/0716 | procsetup(Proc *p) | |
| 1991/0703 | { | |
| 1991/0716 | p->fpstate = FPinit; | |
| 1991/0906 | fpoff(); | |
| 1991/0705 | } | |
| 1991/0712 | /* | |
| 1991/0716 |
| |
| 1991/0906 | * Save the mach dependent part of the process state. | |
| 1991/0712 | */ | |
| 1991/0705 | void | |
| 1991/0716 | procsave(uchar *state, int len) | |
| 1991/0705 | { | |
| 1991/0906 | if(u->p->fpstate == FPactive){ fpsave(&u->fpsave); u->p->fpstate = FPinactive; } | |
| 1991/0712 | } /* | |
| 1991/0716 | * Restore what procsave() saves | |
| 1991/0712 | */ | |
| 1991/0716 | void procrestore(Proc *p, uchar *state) | |
| 1991/0905/sys/src/9/pc/main.c:258,264 – 1991/0906/sys/src/9/pc/main.c:305,313 | ||
| 1991/0716 | panic("firmware"); | |
| 1991/0712 | } | |
| 1991/0906 | /* * make noise, blink lights */ | |
| 1991/0716 | void buzz(int f, int d) | |
| 1991/0712 | { | |
| 1991/0905/sys/src/9/pc/main.c:268,274 – 1991/0906/sys/src/9/pc/main.c:317,322 | ||
| 1991/0716 | lights(int val) { | |
| 1991/0702 | } | |
| 1991/0803 |
| |