From aa0929614aad04ef594d4fd42f78afc0e9a72757 Mon Sep 17 00:00:00 2001 From: Bananymous Date: Fri, 4 Aug 2023 15:13:47 +0300 Subject: [PATCH] Kernel: Add more structures to ACPI --- kernel/include/kernel/ACPI.h | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/kernel/include/kernel/ACPI.h b/kernel/include/kernel/ACPI.h index 36df6f5f0e..2af66f293a 100644 --- a/kernel/include/kernel/ACPI.h +++ b/kernel/include/kernel/ACPI.h @@ -9,6 +9,15 @@ namespace Kernel class ACPI { public: + struct GAS + { + uint8_t address_space_id; + uint8_t register_bit_width; + uint8_t register_bit_offset; + uint8_t access_size; + uint64_t address; + } __attribute__((packed)); + struct SDTHeader { uint8_t signature[4]; @@ -81,6 +90,20 @@ namespace Kernel uint64_t hypervison_vendor_identity; } __attribute__((packed)); + struct HPET : public SDTHeader + { + uint8_t hardware_rev_id; + uint8_t comparator_count : 5; + uint8_t count_size_cap : 1; + uint8_t reserved : 1; + uint8_t legacy_replacement_irq_routing_cable : 1; + uint16_t pci_vendor_id; + GAS base_address; + uint8_t hpet_number; + uint16_t main_counter_minimum_clock_tick; + uint8_t page_protection_and_oem_attribute; + } __attribute__((packed)); + public: static BAN::ErrorOr initialize(); static ACPI& get();