do reboot more flexibly
SCCS-vsn: sys/tahoe/tahoe/machdep.c 1.12
-/* machdep.c 1.11 87/02/21 */
+/* machdep.c 1.12 87/02/26 */
#include "param.h"
#include "systm.h"
#include "param.h"
#include "systm.h"
"mbclusters", nmbclusters/4);
intenable = 1; /* Enable interrupts from now on */
"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.
*/
/*
* Set up buffers, so they can be used to read disk labels.
*/
-boot(paniced, arghowto)
- int paniced, arghowto;
+boot(arghowto)
+ int arghowto;
{
register long dummy; /* r12 is reserved */
register int howto; /* r11 == how to boot */
{
register long dummy; /* r12 is reserved */
register int howto; /* r11 == how to boot */
}
mtpr(IPL, 0x1f); /* extreme priority */
devtype = major(rootdev);
}
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 (howto&RB_HALT) {
printf("halting (in tight loop); hit ~h\n\n");
mtpr(IPL, 0x1f);
for (;;)
;
} else {
- if (paniced == RB_PANIC) {
doadump(); /* TXDB_BOOT's itsself */
/*NOTREACHED*/
}
doadump(); /* TXDB_BOOT's itsself */
/*NOTREACHED*/
}
- *(int *)CPBFLG = howto;
tocons(CPBOOT);
}
for (;;)
tocons(CPBOOT);
}
for (;;)
+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
*/
/*
* Clear registers on exec
*/