summaryrefslogtreecommitdiff
path: root/src/kernel/shutdown.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/kernel/shutdown.c')
-rw-r--r--src/kernel/shutdown.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/kernel/shutdown.c b/src/kernel/shutdown.c
new file mode 100644
index 0000000..9f7ccc7
--- /dev/null
+++ b/src/kernel/shutdown.c
@@ -0,0 +1,20 @@
+#include "paging.h"
+#include "window.h"
+#include "fat.h"
+#include "log.h"
+
+__attribute__ ((noreturn))
+void shutdown() {
+ logf(LOG_INFO, "Shutting down...");
+
+ asm ("cli");
+ switch_to_kernel_cr3();
+
+ fat_ready_shutdown();
+
+ logf(LOG_INFO, "Finished getting ready for shutdown.");
+
+ show_shutdown();
+ while (1)
+ asm ("hlt");
+} \ No newline at end of file