summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>2000-08-11 18:54:47 +0000
committerpeter <peter@FreeBSD.org>2000-08-11 18:54:47 +0000
commit3793476658429412267ab8d5e0de48a9fe68cba5 (patch)
treea76fccd12217975c741cbaedfed49a5d030b32e3 /sys
parentb63adaba9374df1dcdea65a97e4ca4d0d139fe82 (diff)
downloadFreeBSD-src-3793476658429412267ab8d5e0de48a9fe68cba5.zip
FreeBSD-src-3793476658429412267ab8d5e0de48a9fe68cba5.tar.gz
Oops, forgot this file. Log message for completeness:
Clean up some low level bootstrap code: - stop using the evil 'struct trapframe' argument for mi_startup() (formerly main()). There are much better ways of doing it. - do not use prepare_usermode() - setregs() in execve() will do it all for us as long as the p_md.md_regs pointer is set. (which is now done in machdep.c rather than init_main.c. The Alpha port did it this way all along and is much cleaner). - collect all the magic %cr0 etc register settings into one place and have the AP's call that instead of using magic numbers (!!) that keep changing over and over again. - Make it safe to call kthread_create() earlier, including during the device probe sequence. It doesn't need the callback mechanism that NetBSD's version uses. - kthreads created this way are root-less as they exist before the root filesystem is mounted. init(1) is set up so that it aquires the root pointers prior to running. If other kthreads want filesystem acccess we can make this code more generic. - set all threads start times once we have decided what time it is. - init uses a trampoline rather than the evil prepare_usermode() hack. - kern_descrip.c has a couple of tweaks to deal with forking when there is no rootdir or cwd etc. - adjust the early SYSINIT() sequence so that a few prereqisites are in place. eg: make sure the run queue is initialized before doing forks. With this, the USB code can easily create a kthread to do the device tree discovery. (I have tested it, it works nicely). There are still some open issues before this is truely useful. - tsleep() does not like working before the clock is running. It sort-of tries to spin wait, but it can do more useful things now. - stopping a kthread in kld code at unload time is "interesting" but we have a solution for that. The Alpha code needs no changes for this. It already uses pretty much the same strategies, but a little cleaner.
Diffstat (limited to 'sys')
-rw-r--r--sys/sys/kernel.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/sys/sys/kernel.h b/sys/sys/kernel.h
index fe340c9..ac69721 100644
--- a/sys/sys/kernel.h
+++ b/sys/sys/kernel.h
@@ -116,11 +116,12 @@ enum sysinit_sub_id {
SI_SUB_CPU = 0x2000000, /* CPU resource(s)*/
SI_SUB_KLD = 0x2100000, /* KLD and module setup */
SI_SUB_INTRINSIC = 0x2200000, /* proc 0*/
- SI_SUB_DEVFS = 0x2300000, /* get DEVFS ready */
- SI_SUB_DRIVERS = 0x2400000, /* Let Drivers initialize */
- SI_SUB_CONFIGURE = 0x2500000, /* Configure devices */
- SI_SUB_RUN_QUEUE = 0x3000000, /* the run queue*/
- SI_SUB_VM_CONF = 0x3800000, /* config VM, set limits*/
+ SI_SUB_VM_CONF = 0x2300000, /* config VM, set limits*/
+ SI_SUB_RUN_QUEUE = 0x2400000, /* set up run queue*/
+ SI_SUB_CREATE_INIT = 0x2500000, /* create init process*/
+ SI_SUB_DEVFS = 0x3000000, /* get DEVFS ready */
+ SI_SUB_DRIVERS = 0x3100000, /* Let Drivers initialize */
+ SI_SUB_CONFIGURE = 0x3800000, /* Configure devices */
SI_SUB_VFS = 0x4000000, /* virtual file system*/
SI_SUB_CLOCKS = 0x4800000, /* real time and stat clocks*/
SI_SUB_MBUF = 0x5000000, /* mbufs*/
@@ -142,7 +143,6 @@ enum sysinit_sub_id {
SI_SUB_DUMP_CONF = 0xb200000, /* Find dump devices */
SI_SUB_VINUM = 0xb300000, /* Configure vinum */
SI_SUB_MOUNT_ROOT = 0xb400000, /* root mount*/
- SI_SUB_ROOT_FDTAB = 0xb800000, /* root vnode in fd table...*/
SI_SUB_SWAP = 0xc000000, /* swap*/
SI_SUB_INTRINSIC_POST = 0xd000000, /* proc 0 cleanup*/
SI_SUB_KTHREAD_INIT = 0xe000000, /* init process*/
@@ -152,7 +152,7 @@ enum sysinit_sub_id {
SI_SUB_KTHREAD_UPDATE = 0xec00000, /* update daemon*/
SI_SUB_KTHREAD_IDLE = 0xee00000, /* idle procs*/
SI_SUB_SMP = 0xf000000, /* idle procs*/
- SI_SUB_RUN_SCHEDULER = 0xfffffff /* scheduler: no return*/
+ SI_SUB_RUN_SCHEDULER = 0xfffffff /* scheduler*/
};
OpenPOWER on IntegriCloud