4 #include "kernel/kernel.h"
6 /* ACPI root system description pointer */
8 char signature
[8]; /* must be "RSD PTR " */
16 #define ACPI_SDT_SIGNATURE_LEN 4
18 #define ACPI_SDT_SIGNATURE(name) #name
20 /* header common to all system description tables */
21 struct acpi_sdt_header
{
22 char signature
[ACPI_SDT_SIGNATURE_LEN
];
30 u32_t creator_revision
;
33 struct acpi_madt_hdr
{
34 struct acpi_sdt_header hdr
;
35 u32_t local_apic_address
;
39 #define ACPI_MADT_TYPE_LAPIC 0
40 #define ACPI_MADT_TYPE_IOAPIC 1
41 #define ACPI_MADT_TYPE_INT_SRC 2
42 #define ACPI_MADT_TYPE_NMI_SRC 3
43 #define ACPI_MADT_TYPE_LAPIC_NMI 4
44 #define ACPI_MADT_TYPE_LAPIC_ADRESS 5
45 #define ACPI_MADT_TYPE_IOSAPIC 6
46 #define ACPI_MADT_TYPE_LSAPIC 7
47 #define ACPI_MADT_TYPE_PLATFORM_INT_SRC 8
48 #define ACPI_MADT_TYPE_Lx2APIC 9
49 #define ACPI_MADT_TYPE_Lx2APIC_NMI 10
51 struct acpi_madt_item_hdr
{
56 struct acpi_madt_lapic
{
57 struct acpi_madt_item_hdr hdr
;
63 struct acpi_madt_ioapic
{
64 struct acpi_madt_item_hdr hdr
;
68 u32_t global_int_base
;
71 struct acpi_madt_int_src
{
72 struct acpi_madt_item_hdr hdr
;
79 struct acpi_madt_nmi
{
80 struct acpi_madt_item_hdr hdr
;
88 * Returns a pointer to the io acpi structure in the MADT table in ACPI. The
89 * pointer is valid only until paging is turned off. No memory is allocated in
90 * this function thus no memory needs to be freed
92 struct acpi_madt_ioapic
* acpi_get_ioapic_next(void);
93 /* same as above for local APICs */
94 struct acpi_madt_lapic
* acpi_get_lapic_next(void);
96 #endif /* __ACPI_H__ */