BarryServer : Git

All the code for all my projects
// BarryServer : Git / Nucleus / commit / acd091571545e40dc85fc691d9d0b12cf4d363ee / kernel / acpi / acpi.c

// Related

Nucleus

Barry Initialise ACPI later acd0915 (3 years, 3 months ago)
diff --git a/kernel/acpi/acpi.c b/kernel/acpi/acpi.c
index c30fde8..2774dbe 100644
--- a/kernel/acpi/acpi.c
+++ b/kernel/acpi/acpi.c
@@ -1,10 +1,11 @@
 /*
- * This file controls the ACPI
+ * This file controls the ACPI.
  */
 
 #include <stdint.h>
 #include <string.h>
 #include <nucleus/panic.h>
+#include <nucleus/memory.h>
 #include "acpi.h"
 
 /* Root System Descriptor Pointer */
@@ -61,6 +62,9 @@ init_acpi(void *ebda)
 	uint32_t j;
 	struct SDTHeader *rsdt = (void *) ((struct RSDPDesc *) sig)->rsdt;
 	struct SDTHeader **table = (void *) (rsdt + 1);
+	set_page((uintptr_t) rsdt, PAGE_ADDR((uintptr_t) rsdt) |
+	         PTE_PRESENT | PTE_WRITE);
+	flush_tlb((uintptr_t) rsdt);
 	for (i = 0; i < (rsdt->length - sizeof(struct SDTHeader)) / 4; i++) {
 		if (!checksum(table[i]))
 			continue;