summaryrefslogtreecommitdiff
path: root/kern/kernel.c
diff options
context:
space:
mode:
authorRichard Braun <rbraun@sceen.net>2014-05-14 20:27:02 +0200
committerRichard Braun <rbraun@sceen.net>2014-05-14 20:27:02 +0200
commit8d7c92193b3f887c3ebe3d844786a2c435edbec3 (patch)
treef9ae1ab88c83404e250bbfb7a8e10fa61390de92 /kern/kernel.c
parente097916b966ae4eee8f650f56bf070e9859e1cec (diff)
Improve the description of multi-processor setup
Diffstat (limited to 'kern/kernel.c')
-rw-r--r--kern/kernel.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/kern/kernel.c b/kern/kernel.c
index ea11bf2b..62d75b52 100644
--- a/kern/kernel.c
+++ b/kern/kernel.c
@@ -39,8 +39,17 @@ kernel_main(void)
llsync_setup();
/*
- * Enabling application processors must be the last step before starting
- * the scheduler.
+ * Enabling application processors is done late in the boot process for
+ * two reasons :
+ * - It's much simpler to bootstrap with interrupts disabled on all
+ * processors, enabling them only when necessary on the BSP.
+ * - Depending on the architecture, the pmap module could create per
+ * processor page tables. Once done, keeping the kernel page tables
+ * synchronized requires interrupts (and potentially scheduling)
+ * enabled on all processors.
+ *
+ * Anything done after this call and before running the scheduler must
+ * not alter physical mappings.
*/
cpu_mp_setup();