diff options
author | Marvin Borner | 2019-10-29 00:53:15 +0100 |
---|---|---|
committer | Marvin Borner | 2019-10-29 00:53:15 +0100 |
commit | 6fb9d1f602970ac89fbb37843fd3e99f56f0f7d8 (patch) | |
tree | bc1fceb5603f114af91d47a668f495d95907c3fe /src/kernel | |
parent | 8a2a587f6f45a92eb66bd04d5e1c524d38348a7c (diff) |
Some minor improvements
Diffstat (limited to 'src/kernel')
-rw-r--r-- | src/kernel/acpi/acpi.c | 3 | ||||
-rw-r--r-- | src/kernel/kernel.c | 7 |
2 files changed, 8 insertions, 2 deletions
diff --git a/src/kernel/acpi/acpi.c b/src/kernel/acpi/acpi.c index b90c730..24da496 100644 --- a/src/kernel/acpi/acpi.c +++ b/src/kernel/acpi/acpi.c @@ -3,6 +3,7 @@ #include <kernel/timer/timer.h> #include <kernel/acpi/acpi.h> #include <stddef.h> +#include <kernel/system.h> struct FACP *facp; uint32_t *SMI_CMD; @@ -153,6 +154,8 @@ int acpi_install() { SLP_EN = 1 << 13; SCI_EN = 1; + vga_log("Installed ACPI", 5); + return 0; } // Else: \_S5 parse error } // Else: \_S5 not present diff --git a/src/kernel/kernel.c b/src/kernel/kernel.c index dc93824..75867a8 100644 --- a/src/kernel/kernel.c +++ b/src/kernel/kernel.c @@ -9,6 +9,7 @@ void init() { vga_log("Installing basic features of Melvix...", 0); + // Install features timer_install(); gdt_install(); init_serial(); @@ -17,15 +18,17 @@ void init() { idt_install(); isrs_install(); irq_install(); - keyboard_install(); set_optimal_resolution(); + // Install drivers + asm volatile ("cli"); + keyboard_install(); asm volatile ("sti"); } void kernel_main(void) { init(); - // __asm__ ("div %0" :: "r"(0)); // Exception testing x/0 + // asm volatile ("div %0" :: "r"(0)); // Exception testing x/0 loop: asm volatile ("hlt"); goto loop; |