refactor: one more step towards arch-agnostic design
[lunaix-os.git] / lunaix-os / includes / hal / acpi / acpi.h
index 46713b8f54f618fed20db0bed74bed181831dd13..de44d3aea936da422417b2185f1e912f2691532e 100644 (file)
@@ -1,7 +1,6 @@
 #ifndef __LUNAIX_ACPI_ACPI_H
 #define __LUNAIX_ACPI_ACPI_H
 
-#include <arch/x86/boot/multiboot.h>
 #include <stddef.h>
 #include <stdint.h>
 
 #define ACPI_RSDP_SIG_L 0x20445352 // 'RSD '
 #define ACPI_RSDP_SIG_H 0x20525450 // 'PTR '
 
-#define ACPI_MADT_SIG 0x43495041 // 'APIC'
-#define ACPI_FADT_SIG 0x50434146 // 'FACP' Notice that it is not 'FADT'.
+#define ACPI_MADT_SIG 0x43495041   // 'APIC'
+#define ACPI_FADT_SIG 0x50434146   // 'FACP' Notice that it is not 'FADT'.
 
 // 'MCFG' (Not part of ACPI standard. See PCI Firmware Spec.)
 #define ACPI_MCFG_SIG 0x4746434d
 
 typedef struct
 {
-    uint32_t signature_l;
-    uint32_t signature_h;
-    uint8_t chksum;
+    u32_t signature_l;
+    u32_t signature_h;
+    u8_t chksum;
     char oem_id[6];
     // Revision
-    uint8_t rev;
+    u8_t rev;
     acpi_rsdt_t* rsdt;
-    uint32_t length;
+    u32_t length;
     acpi_sdthdr_t* xsdt;
-    uint8_t x_chksum;
+    u8_t x_chksum;
     char reserved[3]; // Reserved field
 } __attribute__((packed)) acpi_rsdp_t;
 
@@ -51,12 +50,12 @@ typedef struct
 } acpi_context;
 
 int
-acpi_init(multiboot_info_t* mb_info);
+acpi_init();
 
 acpi_context*
 acpi_get_context();
 
-uint8_t
-acpi_gistranslate(uint8_t old_irq);
+u8_t
+acpi_gsimap(u8_t old_irq);
 
 #endif /* __LUNAIX_ACPI_ACPI_H */