mirror of
https://github.com/RGBCube/serenity
synced 2025-06-19 18:02:08 +00:00

mmap() & mmap_region() methods are removed from ACPI & DMI components, and we replace them with the new MM.allocate_kernel_region() helper. Instead of doing a raw calculation for each VM address, from now on we can use helper functions to do perform those calculations in a neat, reusable and readable way.
40 lines
No EOL
1.2 KiB
C++
40 lines
No EOL
1.2 KiB
C++
#pragma once
|
|
|
|
#include <ACPI/ACPIParser.h>
|
|
#include <AK/OwnPtr.h>
|
|
|
|
class ACPIStaticParser : ACPIParser {
|
|
public:
|
|
static void initialize(ACPI_RAW::RSDPDescriptor20& rsdp);
|
|
static void initialize_without_rsdp();
|
|
static bool is_initialized();
|
|
|
|
virtual ACPI_RAW::SDTHeader* find_table(const char* sig) override;
|
|
virtual void do_acpi_reboot() override;
|
|
virtual void do_acpi_shutdown() override;
|
|
virtual bool is_operable() override { return m_operable; }
|
|
|
|
protected:
|
|
ACPIStaticParser();
|
|
explicit ACPIStaticParser(ACPI_RAW::RSDPDescriptor20&);
|
|
|
|
private:
|
|
void locate_static_data();
|
|
void locate_all_aml_tables();
|
|
void locate_main_system_description_table();
|
|
void initialize_main_system_description_table();
|
|
size_t get_table_size(ACPI_RAW::SDTHeader&);
|
|
u8 get_table_revision(ACPI_RAW::SDTHeader&);
|
|
void init_fadt();
|
|
ACPI_RAW::RSDPDescriptor20* search_rsdp();
|
|
|
|
// Early pointers that are needed really for initializtion only...
|
|
ACPI_RAW::RSDPDescriptor20* m_rsdp;
|
|
ACPI_RAW::SDTHeader* m_main_system_description_table;
|
|
|
|
OwnPtr<ACPI::MainSystemDescriptionTable> m_main_sdt;
|
|
OwnPtr<ACPI::FixedACPIData> m_fadt;
|
|
|
|
Vector<ACPI_RAW::SDTHeader*> m_aml_tables_ptrs;
|
|
bool m_xsdt_supported;
|
|
}; |