aboutsummaryrefslogtreecommitdiff
path: root/sys/kern/init_main.c
diff options
context:
space:
mode:
authorIan Moffett <ian@osmora.org>2024-02-11 23:33:25 -0500
committerIan Moffett <ian@osmora.org>2024-02-11 23:39:58 -0500
commit3ac9a53caabcb8b9f43b5e1638968c027c2c79d6 (patch)
treee5130f8f843c978ab801905730d402fb1a627f8c /sys/kern/init_main.c
parent5d70d99bb5ace9e16cae192c45c137d9100cce4d (diff)
kernel: sched: Add initial sched related code
Signed-off-by: Ian Moffett <ian@osmora.org>
Diffstat (limited to 'sys/kern/init_main.c')
-rw-r--r--sys/kern/init_main.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/sys/kern/init_main.c b/sys/kern/init_main.c
index 99f1e87..2fe84ed 100644
--- a/sys/kern/init_main.c
+++ b/sys/kern/init_main.c
@@ -32,6 +32,8 @@
#include <sys/syslog.h>
#include <sys/machdep.h>
#include <sys/timer.h>
+#include <sys/sched.h>
+#include <machine/cpu_mp.h>
#include <firmware/acpi/acpi.h>
#include <vm/physseg.h>
#include <logo.h>
@@ -72,6 +74,8 @@ list_timers(void)
void
main(void)
{
+ struct cpu_info *ci;
+
pre_init();
tty_init();
syslog_init();
@@ -86,6 +90,11 @@ main(void)
processor_init();
list_timers();
- /* We're done here, halt the processor */
- __ASMV("cli; hlt");
+ ci = this_cpu();
+ if (ap_bootstrap != NULL) {
+ ap_bootstrap(ci);
+ }
+
+ sched_init_processor(ci);
+ __builtin_unreachable();
}