aboutsummaryrefslogtreecommitdiff
path: root/arch/x86_64/include
diff options
context:
space:
mode:
authorLukas Oesch <lukasoesch20@gmail.com>2026-03-16 21:06:12 +0100
committerLukas Oesch <lukasoesch20@gmail.com>2026-03-17 16:44:31 +0100
commita20045fb209edc1e338039c28634c942e3113ea4 (patch)
treea41a6ba7e4e8530e9594066c66d0dae7fcb275ca /arch/x86_64/include
parent292c5ff7c0c0ae89cfed7124c3ad931b9f555d19 (diff)
downloadteachos-a20045fb209edc1e338039c28634c942e3113ea4.tar.xz
teachos-a20045fb209edc1e338039c28634c942e3113ea4.zip
Protect boot modules in region_allocator
Diffstat (limited to 'arch/x86_64/include')
-rw-r--r--arch/x86_64/include/arch/memory/region_allocator.hpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/x86_64/include/arch/memory/region_allocator.hpp b/arch/x86_64/include/arch/memory/region_allocator.hpp
index 1c5885e..c7a836f 100644
--- a/arch/x86_64/include/arch/memory/region_allocator.hpp
+++ b/arch/x86_64/include/arch/memory/region_allocator.hpp
@@ -42,6 +42,11 @@ namespace arch::memory
//! These include available, unavailable, and reclaimable regions. In general, only frames that are located in
//! non-reserved (as in available) regions should be allocated for page storage.
multiboot2::memory_map memory_map;
+
+ //! The loader supplied Multiboot2 information structure.
+ //!
+ //! This is used to query boot module ranges so these frames can be excluded from early allocations.
+ multiboot2::information_view const * mbi;
};
using region = multiboot2::memory_map::region;
@@ -80,6 +85,7 @@ namespace arch::memory
kapi::memory::frame m_kernel_end; //!< The end of the kernel image in physical memory.
kapi::memory::frame m_multiboot_start; //!< The start of the Multiboot2 information in physical memory.
kapi::memory::frame m_multiboot_end; //!< The end of the Multiboot2 information in physical memory.
+ multiboot2::information_view const * m_multiboot_information; //!< Source of Multiboot2 module ranges.
};
} // namespace arch::memory