diff options
| author | Felix Morgner <felix.morgner@ost.ch> | 2025-12-12 13:00:26 +0100 |
|---|---|---|
| committer | Felix Morgner <felix.morgner@ost.ch> | 2025-12-12 13:00:26 +0100 |
| commit | 8fc5f9e3cc28b07b1f120eb1ffedc042fa6662b8 (patch) | |
| tree | c2edd9ade614858e844e27677da8abafdda5a669 /kapi | |
| parent | 0a2c2c408d8fda248d56df349b4c9f9cc5e8bade (diff) | |
| download | teachos-8fc5f9e3cc28b07b1f120eb1ffedc042fa6662b8.tar.xz teachos-8fc5f9e3cc28b07b1f120eb1ffedc042fa6662b8.zip | |
x86_64/kapi: implement remaining mapping steps
Diffstat (limited to 'kapi')
| -rw-r--r-- | kapi/include/kapi/boot.hpp | 2 | ||||
| -rw-r--r-- | kapi/include/kapi/memory/page.hpp | 9 |
2 files changed, 10 insertions, 1 deletions
diff --git a/kapi/include/kapi/boot.hpp b/kapi/include/kapi/boot.hpp index 9c344cf..dd99198 100644 --- a/kapi/include/kapi/boot.hpp +++ b/kapi/include/kapi/boot.hpp @@ -11,7 +11,7 @@ namespace teachos::boot //! @qualifier platform-defined //! An object passed from the early pre-main stage to the kernel executable. - extern "C" information const bootstrap_information; + extern "C" information bootstrap_information; } // namespace teachos::boot #endif diff --git a/kapi/include/kapi/memory/page.hpp b/kapi/include/kapi/memory/page.hpp index 66e8482..0b7083a 100644 --- a/kapi/include/kapi/memory/page.hpp +++ b/kapi/include/kapi/memory/page.hpp @@ -51,6 +51,15 @@ namespace teachos::memory return m_number; } + //! Get a handle n pages after the one referenced by this handle. + //! + //! @param n The positive offset to this page. + //! @return A handle referencing the page n pages after the one referenced by this handle. + constexpr auto operator+(std::size_t n) const noexcept -> page + { + return page{m_number + n}; + } + //! Check if this page handle reference the same frame as another one. //! //! @param other Another page handle. |
