diff options
author | Marvin Borner | 2020-09-06 14:07:21 +0200 |
---|---|---|
committer | Marvin Borner | 2020-09-06 14:07:21 +0200 |
commit | a35b6b09b90da7180e3c1321abb313d581f9530c (patch) | |
tree | 0a82489d7d3e0ef46a2ca7df767eb3a034660cc5 /kernel/inc | |
parent | c2d88b639c759e06444c1bf0efdd96e243d3a6c2 (diff) |
Added some ACPI tables
Diffstat (limited to 'kernel/inc')
-rw-r--r-- | kernel/inc/acpi.h | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/kernel/inc/acpi.h b/kernel/inc/acpi.h index f620d55..2b4c76e 100644 --- a/kernel/inc/acpi.h +++ b/kernel/inc/acpi.h @@ -7,6 +7,17 @@ #define RSDP_MAGIC "RSD PTR " #define RSDT_MAGIC "RSDT" +#define MADT_MAGIC "APIC" +#define FADT_MAGIC "FACP" +#define HPET_MAGIC "HPET" + +struct address_structure { + u8 address_space_id; + u8 register_bit_width; + u8 register_bit_offset; + u8 reserved; + u64 address; +}; struct sdt_header { char signature[4]; @@ -32,11 +43,40 @@ struct rsdt { u32 sdt_pointer[]; }; +struct madt { + struct sdt_header header; + u32 local_address; + u32 flags; +}; + +struct fadt { + struct sdt_header header; + // TODO: FADT table (big!) +}; + +struct hpet { + struct sdt_header header; + u8 hardware_rev_id; + u8 comparator_count : 5; + u8 counter_size : 1; + u8 reserved : 1; + u8 legacy_replacement : 1; + u16 pci_vendor_id; + struct address_structure address; + u8 hpet_number; + u16 minimum_tick; + u8 page_protection; +}; + struct rsdp { struct sdp_header header; struct rsdt *rsdt; }; +struct madt *madt; +struct fadt *fadt; +struct hpet *hpet; + void acpi_install(); #endif |