From 6fb9d1f602970ac89fbb37843fd3e99f56f0f7d8 Mon Sep 17 00:00:00 2001 From: Marvin Borner Date: Tue, 29 Oct 2019 00:53:15 +0100 Subject: Some minor improvements --- src/kernel/acpi/acpi.c | 3 +++ src/kernel/kernel.c | 7 +++++-- 2 files changed, 8 insertions(+), 2 deletions(-) (limited to 'src') 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 #include #include +#include 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; -- cgit v1.2.3