From a20045fb209edc1e338039c28634c942e3113ea4 Mon Sep 17 00:00:00 2001 From: Lukas Oesch Date: Mon, 16 Mar 2026 21:06:12 +0100 Subject: Protect boot modules in region_allocator --- arch/x86_64/include/arch/memory/region_allocator.hpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'arch/x86_64/include') 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 -- cgit v1.2.3