1 #ifndef __LUNAIX_ACPI_ACPI_H
2 #define __LUNAIX_ACPI_ACPI_H
4 #include <arch/x86/boot/multiboot.h>
13 // * for quick conversion from a table name into ACPI favoured signature
14 // * use `echo <TableName> | xxd -eg4`
16 #define ACPI_RSDP_SIG_L 0x20445352 // 'RSD '
17 #define ACPI_RSDP_SIG_H 0x20525450 // 'PTR '
19 #define ACPI_MADT_SIG 0x43495041 // 'APIC'
20 #define ACPI_FADT_SIG 0x50434146 // 'FACP' Notice that it is not 'FADT'.
22 // 'MCFG' (Not part of ACPI standard. See PCI Firmware Spec.)
23 #define ACPI_MCFG_SIG 0x4746434d
37 char reserved[3]; // Reserved field
38 } __attribute__((packed)) acpi_rsdp_t;
41 * @brief Main TOC of ACPI tables, provide hassle-free access of ACPI info.
46 // Make it as null terminated
50 struct acpi_mcfg_toc mcfg;
54 acpi_init(multiboot_info_t* mb_info);
60 acpi_gistranslate(u8_t old_irq);
62 #endif /* __LUNAIX_ACPI_ACPI_H */