summaryrefslogtreecommitdiff
path: root/kern
diff options
context:
space:
mode:
Diffstat (limited to 'kern')
-rw-r--r--kern/kernel.c7
-rw-r--r--kern/kernel.h4
2 files changed, 8 insertions, 3 deletions
diff --git a/kern/kernel.c b/kern/kernel.c
index 760f68e8..07a0f660 100644
--- a/kern/kernel.c
+++ b/kern/kernel.c
@@ -30,7 +30,7 @@ kernel_main(void)
task_setup();
thread_setup();
- /* Interrupts are enabled by this call */
+ cpu_intr_enable();
cpu_mp_setup();
thread_run();
@@ -41,7 +41,10 @@ kernel_main(void)
void __init
kernel_ap_main(void)
{
- assert(cpu_intr_enabled());
+ assert(!cpu_intr_enabled());
+
+ cpu_intr_enable();
+ cpu_ap_sync();
thread_run();
diff --git a/kern/kernel.h b/kern/kernel.h
index 22d5714b..f5821ca6 100644
--- a/kern/kernel.h
+++ b/kern/kernel.h
@@ -26,13 +26,15 @@
/*
* Machine-independent entry point.
+ *
+ * Interrupts must be disabled when calling this function.
*/
void kernel_main(void);
/*
* Entry point for APs.
*
- * Interrupts must be enabled when calling this function.
+ * Interrupts must be disabled when calling this function.
*/
void kernel_ap_main(void);