aboutsummaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
Diffstat (limited to 'sys')
-rw-r--r--sys/arch/amd64/amd64/machdep.c5
-rw-r--r--sys/kern/init_main.c13
2 files changed, 5 insertions, 13 deletions
diff --git a/sys/arch/amd64/amd64/machdep.c b/sys/arch/amd64/amd64/machdep.c
index f5b6365..1194b63 100644
--- a/sys/arch/amd64/amd64/machdep.c
+++ b/sys/arch/amd64/amd64/machdep.c
@@ -38,6 +38,8 @@
#include <machine/spectre.h>
#include <machine/cpu.h>
#include <machine/uart.h>
+#include <vm/vm.h>
+#include <vm/physseg.h>
#include <firmware/acpi/acpi.h>
__MODULE_NAME("machdep");
@@ -104,6 +106,9 @@ pre_init(void)
uart8250_try_init();
interrupts_init();
gdt_load(&g_gdtr);
+
+ vm_physseg_init();
+ vm_init();
}
void
diff --git a/sys/kern/init_main.c b/sys/kern/init_main.c
index 8b8e431..99f1e87 100644
--- a/sys/kern/init_main.c
+++ b/sys/kern/init_main.c
@@ -34,7 +34,6 @@
#include <sys/timer.h>
#include <firmware/acpi/acpi.h>
#include <vm/physseg.h>
-#include <vm/vm.h>
#include <logo.h>
__MODULE_NAME("init_main");
@@ -84,18 +83,6 @@ main(void)
acpi_init();
- /*
- * TODO: Move these calls to machdep.c whenever
- * possible. It must be documented that
- * this will only be called by processor_init()
- * as the pmap subsystem may rely on architecture
- * specifics that haven't been set up yet... Putting
- * these calls in processor_init() makes things more
- * flexible.
- */
- vm_physseg_init();
- vm_init();
-
processor_init();
list_timers();