| plan 9 kernel history: overview | file list | diff list |
1990/0612/gnot/main.c (diff list | history)
| 1990/0612/sys/src/9/gnot/main.c:7,22 – 1990/0613/sys/src/9/gnot/main.c:7,26 (short | long | prev | next) | ||
| 1990/03091 | #include "ureg.h" #include "init.h" | |
| 1990/0312 |
| |
| 1990/0613 | typedef struct Boot Boot; struct Boot { | |
| 1990/0312 | long station; long traffic; char user[NAMELEN]; char server[64]; char line[64]; | |
| 1990/0613 | }; | |
| 1990/0312 | #define BOOT ((Boot*)0) char protouser[NAMELEN]; | |
| 1990/0613 | char bootline[64]; | |
| 1990/06021 | int bank[2]; | |
| 1990/0312 | void unloadboot(void); | |
| 1990/0612/sys/src/9/gnot/main.c:48,53 – 1990/0613/sys/src/9/gnot/main.c:52,58 | ||
| 1990/0312 | unloadboot(void) { strncpy(protouser, BOOT->user, NAMELEN); | |
| 1990/0613 | memcpy(bootline, BOOT->line, 64); | |
| 1990/0312 | } void | |
| 1990/0612/sys/src/9/gnot/main.c:86,91 – 1990/0613/sys/src/9/gnot/main.c:91,99 | ||
| 1990/03091 | void init0(void) { | |
| 1990/0613 | Chan *c; u->nerrlab = 0; | |
| 1990/03091 | m->proc = u->p; u->p->state = Running; u->p->mach = m; | |
| 1990/0612/sys/src/9/gnot/main.c:94,100 – 1990/0613/sys/src/9/gnot/main.c:102,113 | ||
| 1990/03091 | u->slash = (*devtab[0].attach)(0); u->dot = clone(u->slash, 0); | |
| 1990/0613 | if(!waserror()){ c = namec("#e/bootline", Acreate, OWRITE, 0600); (*devtab[c->type].write)(c, bootline, 64); close(c); } poperror(); | |
| 1990/03091 | touser(); } | |
| 1990/0612/sys/src/9/gnot/main.c:242,260 – 1990/0613/sys/src/9/gnot/main.c:255,273 | ||
| 1990/06021 | return 0; va = UZERO; /* user page 1 is free to play with */ putmmu(va, PTEVALID|(base+0)*1024L*1024L/BY2PG); | |
| 1990/0613 | *(ulong*)va = 0; /* 0 at 0M */ | |
| 1990/06021 | putmmu(va, PTEVALID|(base+1)*1024L*1024L/BY2PG); | |
| 1990/0613 | *(ulong*)va = 1; /* 1 at 1M */ | |
| 1990/06021 | putmmu(va, PTEVALID|(base+4)*1024L*1024L/BY2PG); | |
| 1990/0613 | *(ulong*)va = 4; /* 4 at 4M */ | |
| 1990/06021 | putmmu(va, PTEVALID|(base+0)*1024L*1024L/BY2PG); | |
| 1990/0613 | if(*(ulong*)va == 0) | |
| 1990/06021 | return 16; putmmu(va, PTEVALID|(base+1)*1024L*1024L/BY2PG); | |
| 1990/0613 | if(*(ulong*)va == 1) | |
| 1990/06021 | return 4; | |
| 1990/0613 | putmmu(va, PTEVALID|(base+0)*1024L*1024L/BY2PG); if(*(ulong*)va == 4) | |
| 1990/06021 | return 1; return 0; } | |