diff options
Diffstat (limited to 'libs/acpi/acpi/data/rsdt.hpp')
| -rw-r--r-- | libs/acpi/acpi/data/rsdt.hpp | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/libs/acpi/acpi/data/rsdt.hpp b/libs/acpi/acpi/data/rsdt.hpp new file mode 100644 index 0000000..b43f066 --- /dev/null +++ b/libs/acpi/acpi/data/rsdt.hpp @@ -0,0 +1,42 @@ +#ifndef ACPI_DATA_RSDT_HPP +#define ACPI_DATA_RSDT_HPP + +#include <acpi/acpi.hpp> +#include <acpi/common/table_signature.hpp> +#include <acpi/common/table_type.hpp> +#include <acpi/common/vla_table.hpp> + +#include <array> +#include <cstddef> + +namespace acpi +{ + + template<> + struct table_signature<struct rsdt> + { + constexpr char static const value[] = "RSDT"; // NOLINT + }; + + template<> + struct table_type<table_signature_v<struct rsdt>> + { + using type = struct rsdt; + }; + + struct rsdt_entry + { + [[nodiscard]] auto address() const noexcept -> table_header *; + [[nodiscard]] auto length() const noexcept -> std::size_t; + + private: + std::array<std::byte, 4> m_data{}; + }; + + struct rsdt : vla_table<rsdt_entry, rsdt> + { + }; + +} // namespace acpi + +#endif
\ No newline at end of file |
