From: Mike Karels Date: Fri, 27 Feb 1987 10:06:55 +0000 (-0800) Subject: mv key initialization to machdep; reboot flags set even on halt; X-Git-Tag: BSD-4_3-Snapshot-Development~6 X-Git-Url: https://git.subgeniuskitty.com/unix-history/.git/commitdiff_plain/ad94d1f7187f9ea1b13bf0095173fb0104afc08d mv key initialization to machdep; reboot flags set even on halt; do reboot more flexibly SCCS-vsn: sys/tahoe/tahoe/machdep.c 1.12 --- diff --git a/usr/src/sys/tahoe/tahoe/machdep.c b/usr/src/sys/tahoe/tahoe/machdep.c index 8d1d88d692..d7d35b60b0 100644 --- a/usr/src/sys/tahoe/tahoe/machdep.c +++ b/usr/src/sys/tahoe/tahoe/machdep.c @@ -1,4 +1,4 @@ -/* machdep.c 1.11 87/02/21 */ +/* machdep.c 1.12 87/02/26 */ #include "param.h" #include "systm.h" @@ -229,6 +229,11 @@ startup(firstaddr) "mbclusters", nmbclusters/4); intenable = 1; /* Enable interrupts from now on */ + /* + * Set up CPU-specific registers, cache, etc. + */ + initcpu(); + /* * Set up buffers, so they can be used to read disk labels. */ @@ -403,8 +408,8 @@ osigcleanup() int waittime = -1; -boot(paniced, arghowto) - int paniced, arghowto; +boot(arghowto) + int arghowto; { register long dummy; /* r12 is reserved */ register int howto; /* r11 == how to boot */ @@ -449,17 +454,17 @@ boot(paniced, arghowto) } mtpr(IPL, 0x1f); /* extreme priority */ devtype = major(rootdev); + *(int *)CPBFLG = howto; if (howto&RB_HALT) { printf("halting (in tight loop); hit ~h\n\n"); mtpr(IPL, 0x1f); for (;;) ; } else { - if (paniced == RB_PANIC) { + if (howto & RB_DUMP) { doadump(); /* TXDB_BOOT's itsself */ /*NOTREACHED*/ } - *(int *)CPBFLG = howto; tocons(CPBOOT); } for (;;) @@ -637,6 +642,20 @@ physstrat(bp, strat, prio) splx(s); } +initcpu() +{ + register struct proc *p; + + p = &proc[0]; +#ifndef lint +#define initkey(which, p, index) \ + which/**/_cache[index] = 1, which/**/_cnt[index] = 1; \ + p->p_/**/which = index; + initkey(ckey, p, MAXCKEY); + initkey(dkey, p, MAXDKEY); +#endif +} + /* * Clear registers on exec */