- Move the setting of bootverbose to a MI SI_SUB_TUNABLES SYSINIT.
- Attach a writable sysctl to bootverbose (debug.bootverbose) so it can be toggled after boot. - Move the printf of the version string to a SI_SUB_COPYRIGHT SYSINIT just afer the display of the copyright message instead of doing it by hand in three MD places.
This commit is contained in:
parent
8b7fa31d30
commit
7a08bae6ec
@ -186,7 +186,7 @@ SYSINIT(cpu, SI_SUB_CPU, SI_ORDER_FIRST, cpu_startup, NULL)
|
|||||||
|
|
||||||
struct msgbuf *msgbufp=0;
|
struct msgbuf *msgbufp=0;
|
||||||
|
|
||||||
int bootverbose = 0, Maxmem = 0;
|
int Maxmem = 0;
|
||||||
long dumplo;
|
long dumplo;
|
||||||
|
|
||||||
int totalphysmem; /* total amount of physical memory in system */
|
int totalphysmem; /* total amount of physical memory in system */
|
||||||
@ -254,13 +254,9 @@ cpu_startup(dummy)
|
|||||||
vm_offset_t firstaddr;
|
vm_offset_t firstaddr;
|
||||||
vm_offset_t minaddr;
|
vm_offset_t minaddr;
|
||||||
|
|
||||||
if (boothowto & RB_VERBOSE)
|
|
||||||
bootverbose++;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Good {morning,afternoon,evening,night}.
|
* Good {morning,afternoon,evening,night}.
|
||||||
*/
|
*/
|
||||||
printf("%s", version);
|
|
||||||
identifycpu();
|
identifycpu();
|
||||||
|
|
||||||
/* startrtclock(); */
|
/* startrtclock(); */
|
||||||
|
@ -230,7 +230,7 @@ SYSCTL_PROC(_machdep, OID_AUTO, msgbuf_clear, CTLTYPE_INT|CTLFLAG_RW,
|
|||||||
&msgbuf_clear, 0, sysctl_machdep_msgbuf_clear, "I",
|
&msgbuf_clear, 0, sysctl_machdep_msgbuf_clear, "I",
|
||||||
"Clear kernel message buffer");
|
"Clear kernel message buffer");
|
||||||
|
|
||||||
int bootverbose = 0, Maxmem = 0;
|
int Maxmem = 0;
|
||||||
long dumplo;
|
long dumplo;
|
||||||
|
|
||||||
vm_offset_t phys_avail[10];
|
vm_offset_t phys_avail[10];
|
||||||
@ -261,13 +261,9 @@ cpu_startup(dummy)
|
|||||||
vm_offset_t minaddr;
|
vm_offset_t minaddr;
|
||||||
int physmem_est;
|
int physmem_est;
|
||||||
|
|
||||||
if (boothowto & RB_VERBOSE)
|
|
||||||
bootverbose++;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Good {morning,afternoon,evening,night}.
|
* Good {morning,afternoon,evening,night}.
|
||||||
*/
|
*/
|
||||||
printf("%s", version);
|
|
||||||
earlysetcpuclass();
|
earlysetcpuclass();
|
||||||
startrtclock();
|
startrtclock();
|
||||||
printcpuinfo();
|
printcpuinfo();
|
||||||
|
@ -230,7 +230,7 @@ SYSCTL_PROC(_machdep, OID_AUTO, msgbuf_clear, CTLTYPE_INT|CTLFLAG_RW,
|
|||||||
&msgbuf_clear, 0, sysctl_machdep_msgbuf_clear, "I",
|
&msgbuf_clear, 0, sysctl_machdep_msgbuf_clear, "I",
|
||||||
"Clear kernel message buffer");
|
"Clear kernel message buffer");
|
||||||
|
|
||||||
int bootverbose = 0, Maxmem = 0;
|
int Maxmem = 0;
|
||||||
long dumplo;
|
long dumplo;
|
||||||
|
|
||||||
vm_offset_t phys_avail[10];
|
vm_offset_t phys_avail[10];
|
||||||
@ -261,13 +261,9 @@ cpu_startup(dummy)
|
|||||||
vm_offset_t minaddr;
|
vm_offset_t minaddr;
|
||||||
int physmem_est;
|
int physmem_est;
|
||||||
|
|
||||||
if (boothowto & RB_VERBOSE)
|
|
||||||
bootverbose++;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Good {morning,afternoon,evening,night}.
|
* Good {morning,afternoon,evening,night}.
|
||||||
*/
|
*/
|
||||||
printf("%s", version);
|
|
||||||
earlysetcpuclass();
|
earlysetcpuclass();
|
||||||
startrtclock();
|
startrtclock();
|
||||||
printcpuinfo();
|
printcpuinfo();
|
||||||
|
@ -174,13 +174,9 @@ cpu_startup(dummy)
|
|||||||
vm_offset_t firstaddr;
|
vm_offset_t firstaddr;
|
||||||
vm_offset_t minaddr;
|
vm_offset_t minaddr;
|
||||||
|
|
||||||
if (boothowto & RB_VERBOSE)
|
|
||||||
bootverbose++;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Good {morning,afternoon,evening,night}.
|
* Good {morning,afternoon,evening,night}.
|
||||||
*/
|
*/
|
||||||
printf("%s", version);
|
|
||||||
identifycpu();
|
identifycpu();
|
||||||
|
|
||||||
/* startrtclock(); */
|
/* startrtclock(); */
|
||||||
|
@ -99,6 +99,8 @@ extern int fallback_elf_brand;
|
|||||||
struct vnode *rootvp;
|
struct vnode *rootvp;
|
||||||
int boothowto = 0; /* initialized so that it can be patched */
|
int boothowto = 0; /* initialized so that it can be patched */
|
||||||
SYSCTL_INT(_debug, OID_AUTO, boothowto, CTLFLAG_RD, &boothowto, 0, "");
|
SYSCTL_INT(_debug, OID_AUTO, boothowto, CTLFLAG_RD, &boothowto, 0, "");
|
||||||
|
int bootverbose;
|
||||||
|
SYSCTL_INT(_debug, OID_AUTO, bootverbose, CTLFLAG_RW, &bootverbose, 0, "");
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* This ensures that there is at least one entry so that the sysinit_set
|
* This ensures that there is at least one entry so that the sysinit_set
|
||||||
@ -239,6 +241,16 @@ print_caddr_t(void *data __unused)
|
|||||||
printf("%s", (char *)data);
|
printf("%s", (char *)data);
|
||||||
}
|
}
|
||||||
SYSINIT(announce, SI_SUB_COPYRIGHT, SI_ORDER_FIRST, print_caddr_t, copyright)
|
SYSINIT(announce, SI_SUB_COPYRIGHT, SI_ORDER_FIRST, print_caddr_t, copyright)
|
||||||
|
SYSINIT(version, SI_SUB_COPYRIGHT, SI_ORDER_SECOND, print_caddr_t, version)
|
||||||
|
|
||||||
|
static void
|
||||||
|
set_boot_verbose(void *data __unused)
|
||||||
|
{
|
||||||
|
|
||||||
|
if (boothowto & RB_VERBOSE)
|
||||||
|
bootverbose++;
|
||||||
|
}
|
||||||
|
SYSINIT(boot_verbose, SI_SUB_TUNABLES, SI_ORDER_ANY, set_boot_verbose, NULL)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
***************************************************************************
|
***************************************************************************
|
||||||
|
Loading…
x
Reference in New Issue
Block a user