aboutsummaryrefslogtreecommitdiff
path: root/kernel/kapi
diff options
context:
space:
mode:
authorFelix Morgner <felix.morgner@ost.ch>2026-04-06 15:10:04 +0200
committerFelix Morgner <felix.morgner@ost.ch>2026-04-06 15:11:47 +0200
commit4d938cd31a35cd4322fe914edd568faa5391c9c2 (patch)
tree749af894d900cbb903ba9e51853a42f0c5427594 /kernel/kapi
parent3dcd14a0570fef3bcc68d7df42fe3ff4cd496f93 (diff)
downloadteachos-4d938cd31a35cd4322fe914edd568faa5391c9c2.tar.xz
teachos-4d938cd31a35cd4322fe914edd568faa5391c9c2.zip
kernel/acpi: implement basic table discovery
Diffstat (limited to 'kernel/kapi')
-rw-r--r--kernel/kapi/acpi.cpp45
1 files changed, 45 insertions, 0 deletions
diff --git a/kernel/kapi/acpi.cpp b/kernel/kapi/acpi.cpp
index 787bcff..998d7a0 100644
--- a/kernel/kapi/acpi.cpp
+++ b/kernel/kapi/acpi.cpp
@@ -65,6 +65,51 @@ namespace kapi::acpi
return validate_checksum({reinterpret_cast<std::byte const *>(this), m_length});
}
+ [[nodiscard]] auto system_description_table_header::checksum() const noexcept -> std::uint8_t
+ {
+ return m_checksum;
+ }
+
+ [[nodiscard]] auto system_description_table_header::creator_revision() const noexcept -> std::uint32_t
+ {
+ return m_creator_revision;
+ }
+
+ [[nodiscard]] auto system_description_table_header::creator_id() const noexcept -> std::uint32_t
+ {
+ return m_creator_id;
+ }
+
+ [[nodiscard]] auto system_description_table_header::length() const noexcept -> kstd::units::bytes
+ {
+ return kstd::units::bytes{m_length};
+ }
+
+ [[nodiscard]] auto system_description_table_header::oem_id() const noexcept -> std::string_view
+ {
+ return {m_oem_id.data(), m_oem_id.size()};
+ }
+
+ [[nodiscard]] auto system_description_table_header::oem_revision() const noexcept -> std::uint32_t
+ {
+ return m_oem_revision;
+ }
+
+ [[nodiscard]] auto system_description_table_header::oem_table_id() const noexcept -> std::string_view
+ {
+ return {m_oem_table_id.data(), m_oem_table_id.size()};
+ }
+
+ [[nodiscard]] auto system_description_table_header::revision() const noexcept -> std::uint8_t
+ {
+ return m_revision;
+ }
+
+ [[nodiscard]] auto system_description_table_header::signature() const noexcept -> std::string_view
+ {
+ return {m_signature.data(), m_signature.size()};
+ }
+
auto init(root_system_description_pointer const & sdp) -> bool
{
auto static constinit initialized = std::atomic_flag{};