diff options
Diffstat (limited to 'acpi.cpp')
-rw-r--r-- | acpi.cpp | 51 |
1 files changed, 0 insertions, 51 deletions
diff --git a/acpi.cpp b/acpi.cpp deleted file mode 100644 index b74a7dc..0000000 --- a/acpi.cpp +++ /dev/null @@ -1,51 +0,0 @@ -#include "textoutput.hpp" - -#include <cstdint> - -extern TextOutput& term; -extern std::uint32_t *acpiRsdp; -extern std::uint32_t *acpiRsdpV2; - -struct XSDP { - char Signature[8]; - std::uint8_t Checksum; - char OEMID[6]; - std::uint8_t Revision; - std::uint32_t RsdtAddress; // deprecated since version 2.0 - - // v2 only! - std::uint32_t Length; - std::uint64_t XsdtAddress; - std::uint8_t ExtendedChecksum; - std::uint8_t reserved[3]; -} __attribute__ ((packed)); - -struct SDTHeader { - char Signature[4]; - std::uint32_t Length; - std::uint8_t Revision; - std::uint8_t Checksum; - char OEMID[6]; - char OEMTableID[8]; - std::uint32_t OEMRevision; - std::uint32_t CreatorID; - std::uint32_t CreatorRevision; -}; - -static XSDP *rsdp = nullptr; - -void acpi_initialize() -{ - if (acpiRsdp) { - term.write("ACPI v1 detected.\n"); - rsdp = reinterpret_cast<XSDP *>(acpiRsdp); - } else if (acpiRsdpV2) { - term.write("ACPI v2 detected, treating as v1.\n"); - rsdp = reinterpret_cast<XSDP *>(acpiRsdpV2); - } - - //if (rsdp) { - // auto sdt = reinterpret_cast<SDTHeader *>(rsdp->RsdtAddress); - //} -} - |