From 40c91984152a238351529d2611fe627040f6a618 Mon Sep 17 00:00:00 2001 From: Felix Morgner Date: Fri, 24 Jul 2026 19:33:03 +0200 Subject: kapi: rename boot_module to module --- kapi/kapi/boot_modules.hpp | 6 +++--- kapi/kapi/boot_modules/boot_module.hpp | 25 ------------------------- kapi/kapi/boot_modules/bus.hpp | 10 +++++----- kapi/kapi/boot_modules/module.hpp | 25 +++++++++++++++++++++++++ kapi/kapi/boot_modules/registry.hpp | 6 +++--- 5 files changed, 36 insertions(+), 36 deletions(-) delete mode 100644 kapi/kapi/boot_modules/boot_module.hpp create mode 100644 kapi/kapi/boot_modules/module.hpp (limited to 'kapi') diff --git a/kapi/kapi/boot_modules.hpp b/kapi/kapi/boot_modules.hpp index 49a83ef5..7f47c628 100644 --- a/kapi/kapi/boot_modules.hpp +++ b/kapi/kapi/boot_modules.hpp @@ -1,9 +1,9 @@ #ifndef TEACHOS_KAPI_BOOT_MODULES_HPP #define TEACHOS_KAPI_BOOT_MODULES_HPP -#include // IWYU pragma: export -#include // IWYU pragma: export -#include // IWYU pragma: export +#include // IWYU pragma: export +#include // IWYU pragma: export +#include // IWYU pragma: export namespace kapi::boot_modules { diff --git a/kapi/kapi/boot_modules/boot_module.hpp b/kapi/kapi/boot_modules/boot_module.hpp deleted file mode 100644 index 85de7ab0..00000000 --- a/kapi/kapi/boot_modules/boot_module.hpp +++ /dev/null @@ -1,25 +0,0 @@ -#ifndef TEACHOS_KAPI_BOOT_MODULES_BOOT_MODULE_HPP -#define TEACHOS_KAPI_BOOT_MODULES_BOOT_MODULE_HPP - -// IWYU pragma: private, include - -#include - -#include -#include - -namespace kapi::boot_modules -{ - // ! The boot module struct - // ! - // ! The boot module struct represents a module loaded by the bootloader, and contains information about it, such as - // ! its name, virtual start address, and size. - struct boot_module - { - std::string_view name{}; - memory::linear_address start_address{}; - std::size_t size{}; - }; -} // namespace kapi::boot_modules - -#endif \ No newline at end of file diff --git a/kapi/kapi/boot_modules/bus.hpp b/kapi/kapi/boot_modules/bus.hpp index 7e3c773c..2c52677e 100644 --- a/kapi/kapi/boot_modules/bus.hpp +++ b/kapi/kapi/boot_modules/bus.hpp @@ -3,7 +3,7 @@ // IWYU pragma: private, include -#include +#include #include #include @@ -24,7 +24,7 @@ namespace kapi::boot_modules [[nodiscard]] auto virtual command_line() const -> std::string_view = 0; - [[nodiscard]] auto virtual module() const -> boot_module const & = 0; + [[nodiscard]] auto virtual module() const -> module const & = 0; }; struct boot_module_driver_identification @@ -38,17 +38,17 @@ namespace kapi::boot_modules struct boot_module_device final : kapi::devices::device, boot_module_identification { - boot_module_device(std::size_t index, boot_module const & module); + boot_module_device(std::size_t index, struct module const & module); [[nodiscard]] auto command_line() const -> std::string_view override; - [[nodiscard]] auto module() const -> boot_module const & override; + [[nodiscard]] auto module() const -> struct module const & override; protected: auto query_interface(kapi::devices::interface interface) -> void * override; private: - boot_module m_module; + struct module m_module; }; struct boot_module_bus final : kapi::devices::bus, kapi::devices::bus_protocol diff --git a/kapi/kapi/boot_modules/module.hpp b/kapi/kapi/boot_modules/module.hpp new file mode 100644 index 00000000..14898132 --- /dev/null +++ b/kapi/kapi/boot_modules/module.hpp @@ -0,0 +1,25 @@ +#ifndef TEACHOS_KAPI_BOOT_MODULES_MODULE_HPP +#define TEACHOS_KAPI_BOOT_MODULES_MODULE_HPP + +// IWYU pragma: private, include + +#include + +#include +#include + +namespace kapi::boot_modules +{ + // ! The boot module struct + // ! + // ! The boot module struct represents a module loaded by the bootloader, and contains information about it, such as + // ! its name, virtual start address, and size. + struct module + { + std::string_view name{}; + memory::linear_address start_address{}; + std::size_t size{}; + }; +} // namespace kapi::boot_modules + +#endif \ No newline at end of file diff --git a/kapi/kapi/boot_modules/registry.hpp b/kapi/kapi/boot_modules/registry.hpp index 4c659fa4..33dc2169 100644 --- a/kapi/kapi/boot_modules/registry.hpp +++ b/kapi/kapi/boot_modules/registry.hpp @@ -3,7 +3,7 @@ // IWYU pragma: private, include -#include +#include #include @@ -21,7 +21,7 @@ namespace kapi::boot_modules //! providing access to them for the rest of the kernel. struct registry { - using container = kstd::vector; + using container = kstd::vector; using value_type = container::value_type; using const_reference = container::const_reference; @@ -63,7 +63,7 @@ namespace kapi::boot_modules [[nodiscard]] auto operator[](std::size_t index) const noexcept -> const_reference; - auto add(boot_module module) -> void; + auto add(module module) -> void; private: container m_modules{}; -- cgit v1.2.3