autoconf.c:
Add cpu_rootconf and cpu_dumpconf so that configuring these two devices can be better controlled by the MI configuration code. machdep.c: MD initialization code for the new callout interface. trap.c: Add support for printing out whether cam interrupts are masked during a panic.
This commit is contained in:
parent
51fbeeacb4
commit
6450b2fc55
@ -34,7 +34,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)autoconf.c 7.1 (Berkeley) 5/9/91
|
||||
* $Id: autoconf.c,v 1.74 1997/07/22 20:12:32 fsmp Exp $
|
||||
* $Id: autoconf.c,v 1.75 1997/09/09 12:48:56 jmg Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -192,6 +192,13 @@ configure(dummy)
|
||||
configure_start();
|
||||
|
||||
/* Allow all routines to decide for themselves if they want intrs */
|
||||
/*
|
||||
* XXX Since this cannot be achieved on all architectures, we should
|
||||
* XXX go back to disabling all interrupts until configuration is
|
||||
* XXX completed and switch any devices that rely on the current
|
||||
* XXX behavior to no longer rely on interrupts or to register an
|
||||
* XXX interrupt_driven_config_hook for the task.
|
||||
*/
|
||||
#ifdef APIC_IO
|
||||
bsp_apic_configure();
|
||||
enable_intr();
|
||||
@ -221,9 +228,6 @@ configure(dummy)
|
||||
pccard_configure();
|
||||
#endif
|
||||
|
||||
if (setdumpdev(dumpdev) != 0)
|
||||
dumpdev = NODEV;
|
||||
|
||||
configure_finish();
|
||||
|
||||
cninit_finish();
|
||||
@ -266,7 +270,19 @@ configure(dummy)
|
||||
|
||||
printf("Device configuration finished.\n");
|
||||
}
|
||||
setconf();
|
||||
cold = 0;
|
||||
if (bootverbose)
|
||||
printf("configure() finished.\n");
|
||||
}
|
||||
|
||||
void
|
||||
cpu_rootconf()
|
||||
{
|
||||
/*
|
||||
* XXX NetBSD has a much cleaner approach to finding root.
|
||||
* XXX We should adopt their code.
|
||||
*/
|
||||
#ifdef CD9660
|
||||
if ((boothowto & RB_CDROM)) {
|
||||
if (bootverbose)
|
||||
@ -351,11 +367,13 @@ configure(dummy)
|
||||
if (!mountrootfsname) {
|
||||
panic("Nobody wants to mount my root for me");
|
||||
}
|
||||
}
|
||||
|
||||
setconf();
|
||||
cold = 0;
|
||||
if (bootverbose)
|
||||
printf("configure() finished.\n");
|
||||
void
|
||||
cpu_dumpconf()
|
||||
{
|
||||
if (setdumpdev(dumpdev) != 0)
|
||||
dumpdev = NODEV;
|
||||
}
|
||||
|
||||
static int
|
||||
|
@ -35,7 +35,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)machdep.c 7.4 (Berkeley) 6/3/91
|
||||
* $Id: machdep.c,v 1.263 1997/09/04 15:23:33 davidg Exp $
|
||||
* $Id: machdep.c,v 1.264 1997/09/21 15:03:57 peter Exp $
|
||||
*/
|
||||
|
||||
#include "apm.h"
|
||||
@ -237,6 +237,15 @@ cpu_startup(dummy)
|
||||
*/
|
||||
setup_netisrs(&netisr_set);
|
||||
|
||||
/*
|
||||
* Calculate callout wheel size
|
||||
*/
|
||||
for (callwheelsize = 1, callwheelbits = 0;
|
||||
callwheelsize < ncallout;
|
||||
callwheelsize <<= 1, ++callwheelbits)
|
||||
;
|
||||
callwheelmask = callwheelsize - 1;
|
||||
|
||||
/*
|
||||
* Allocate space for system data structures.
|
||||
* The first available kernel virtual address is in "v".
|
||||
@ -261,6 +270,7 @@ again:
|
||||
#define valloclim(name, type, num, lim) \
|
||||
(name) = (type *)v; v = (caddr_t)((lim) = ((name)+(num)))
|
||||
valloc(callout, struct callout, ncallout);
|
||||
valloc(callwheel, struct callout_tailq, callwheelsize);
|
||||
#ifdef SYSVSHM
|
||||
valloc(shmsegs, struct shmid_ds, shminfo.shmmni);
|
||||
#endif
|
||||
@ -358,9 +368,14 @@ again:
|
||||
/*
|
||||
* Initialize callouts
|
||||
*/
|
||||
callfree = callout;
|
||||
for (i = 1; i < ncallout; i++)
|
||||
callout[i-1].c_next = &callout[i];
|
||||
SLIST_INIT(&callfree);
|
||||
for (i = 0; i < ncallout; i++) {
|
||||
SLIST_INSERT_HEAD(&callfree, &callout[i], c_links.sle);
|
||||
}
|
||||
|
||||
for (i = 0; i < callwheelsize; i++) {
|
||||
TAILQ_INIT(&callwheel[i]);
|
||||
}
|
||||
|
||||
#if defined(USERCONFIG)
|
||||
#if defined(USERCONFIG_BOOT)
|
||||
|
@ -35,7 +35,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)trap.c 7.4 (Berkeley) 5/13/91
|
||||
* $Id: trap.c,v 1.109 1997/08/28 14:36:54 jlemon Exp $
|
||||
* $Id: trap.c,v 1.110 1997/09/05 08:54:54 peter Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -780,6 +780,8 @@ trap_fatal(frame)
|
||||
printf("tty ");
|
||||
if ((cpl & bio_imask) == bio_imask)
|
||||
printf("bio ");
|
||||
if ((cpl & cam_imask) == cam_imask)
|
||||
printf("cam ");
|
||||
if (cpl == 0)
|
||||
printf("none");
|
||||
#ifdef SMP
|
||||
|
@ -34,7 +34,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)autoconf.c 7.1 (Berkeley) 5/9/91
|
||||
* $Id: autoconf.c,v 1.74 1997/07/22 20:12:32 fsmp Exp $
|
||||
* $Id: autoconf.c,v 1.75 1997/09/09 12:48:56 jmg Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -192,6 +192,13 @@ configure(dummy)
|
||||
configure_start();
|
||||
|
||||
/* Allow all routines to decide for themselves if they want intrs */
|
||||
/*
|
||||
* XXX Since this cannot be achieved on all architectures, we should
|
||||
* XXX go back to disabling all interrupts until configuration is
|
||||
* XXX completed and switch any devices that rely on the current
|
||||
* XXX behavior to no longer rely on interrupts or to register an
|
||||
* XXX interrupt_driven_config_hook for the task.
|
||||
*/
|
||||
#ifdef APIC_IO
|
||||
bsp_apic_configure();
|
||||
enable_intr();
|
||||
@ -221,9 +228,6 @@ configure(dummy)
|
||||
pccard_configure();
|
||||
#endif
|
||||
|
||||
if (setdumpdev(dumpdev) != 0)
|
||||
dumpdev = NODEV;
|
||||
|
||||
configure_finish();
|
||||
|
||||
cninit_finish();
|
||||
@ -266,7 +270,19 @@ configure(dummy)
|
||||
|
||||
printf("Device configuration finished.\n");
|
||||
}
|
||||
setconf();
|
||||
cold = 0;
|
||||
if (bootverbose)
|
||||
printf("configure() finished.\n");
|
||||
}
|
||||
|
||||
void
|
||||
cpu_rootconf()
|
||||
{
|
||||
/*
|
||||
* XXX NetBSD has a much cleaner approach to finding root.
|
||||
* XXX We should adopt their code.
|
||||
*/
|
||||
#ifdef CD9660
|
||||
if ((boothowto & RB_CDROM)) {
|
||||
if (bootverbose)
|
||||
@ -351,11 +367,13 @@ configure(dummy)
|
||||
if (!mountrootfsname) {
|
||||
panic("Nobody wants to mount my root for me");
|
||||
}
|
||||
}
|
||||
|
||||
setconf();
|
||||
cold = 0;
|
||||
if (bootverbose)
|
||||
printf("configure() finished.\n");
|
||||
void
|
||||
cpu_dumpconf()
|
||||
{
|
||||
if (setdumpdev(dumpdev) != 0)
|
||||
dumpdev = NODEV;
|
||||
}
|
||||
|
||||
static int
|
||||
|
@ -35,7 +35,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)machdep.c 7.4 (Berkeley) 6/3/91
|
||||
* $Id: machdep.c,v 1.263 1997/09/04 15:23:33 davidg Exp $
|
||||
* $Id: machdep.c,v 1.264 1997/09/21 15:03:57 peter Exp $
|
||||
*/
|
||||
|
||||
#include "apm.h"
|
||||
@ -237,6 +237,15 @@ cpu_startup(dummy)
|
||||
*/
|
||||
setup_netisrs(&netisr_set);
|
||||
|
||||
/*
|
||||
* Calculate callout wheel size
|
||||
*/
|
||||
for (callwheelsize = 1, callwheelbits = 0;
|
||||
callwheelsize < ncallout;
|
||||
callwheelsize <<= 1, ++callwheelbits)
|
||||
;
|
||||
callwheelmask = callwheelsize - 1;
|
||||
|
||||
/*
|
||||
* Allocate space for system data structures.
|
||||
* The first available kernel virtual address is in "v".
|
||||
@ -261,6 +270,7 @@ again:
|
||||
#define valloclim(name, type, num, lim) \
|
||||
(name) = (type *)v; v = (caddr_t)((lim) = ((name)+(num)))
|
||||
valloc(callout, struct callout, ncallout);
|
||||
valloc(callwheel, struct callout_tailq, callwheelsize);
|
||||
#ifdef SYSVSHM
|
||||
valloc(shmsegs, struct shmid_ds, shminfo.shmmni);
|
||||
#endif
|
||||
@ -358,9 +368,14 @@ again:
|
||||
/*
|
||||
* Initialize callouts
|
||||
*/
|
||||
callfree = callout;
|
||||
for (i = 1; i < ncallout; i++)
|
||||
callout[i-1].c_next = &callout[i];
|
||||
SLIST_INIT(&callfree);
|
||||
for (i = 0; i < ncallout; i++) {
|
||||
SLIST_INSERT_HEAD(&callfree, &callout[i], c_links.sle);
|
||||
}
|
||||
|
||||
for (i = 0; i < callwheelsize; i++) {
|
||||
TAILQ_INIT(&callwheel[i]);
|
||||
}
|
||||
|
||||
#if defined(USERCONFIG)
|
||||
#if defined(USERCONFIG_BOOT)
|
||||
|
@ -35,7 +35,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)trap.c 7.4 (Berkeley) 5/13/91
|
||||
* $Id: trap.c,v 1.109 1997/08/28 14:36:54 jlemon Exp $
|
||||
* $Id: trap.c,v 1.110 1997/09/05 08:54:54 peter Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -780,6 +780,8 @@ trap_fatal(frame)
|
||||
printf("tty ");
|
||||
if ((cpl & bio_imask) == bio_imask)
|
||||
printf("bio ");
|
||||
if ((cpl & cam_imask) == cam_imask)
|
||||
printf("cam ");
|
||||
if (cpl == 0)
|
||||
printf("none");
|
||||
#ifdef SMP
|
||||
|
@ -35,7 +35,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)trap.c 7.4 (Berkeley) 5/13/91
|
||||
* $Id: trap.c,v 1.109 1997/08/28 14:36:54 jlemon Exp $
|
||||
* $Id: trap.c,v 1.110 1997/09/05 08:54:54 peter Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -780,6 +780,8 @@ trap_fatal(frame)
|
||||
printf("tty ");
|
||||
if ((cpl & bio_imask) == bio_imask)
|
||||
printf("bio ");
|
||||
if ((cpl & cam_imask) == cam_imask)
|
||||
printf("cam ");
|
||||
if (cpl == 0)
|
||||
printf("none");
|
||||
#ifdef SMP
|
||||
|
Loading…
x
Reference in New Issue
Block a user