diff options
author | Clyne Sullivan <clyne@bitgloo.com> | 2024-09-30 11:08:46 -0400 |
---|---|---|
committer | Clyne Sullivan <clyne@bitgloo.com> | 2024-09-30 11:08:46 -0400 |
commit | 19d9a04e36e7fb96eebe89e24311408460c29a70 (patch) | |
tree | 4d5f5ba595d5a5e2b59ce7b102c06b77c7be7721 /acpi.cpp | |
parent | 85c8fd05f1a0c0224882c4fafa60003d3ef56cf3 (diff) |
reorganize files
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); - //} -} - |