diff options
Diffstat (limited to 'arch/x86_64/include')
3 files changed, 9 insertions, 4 deletions
diff --git a/arch/x86_64/include/arch/memory/heap/global_heap_allocator.hpp b/arch/x86_64/include/arch/memory/heap/global_heap_allocator.hpp index 6fcab6f..b20a452 100644 --- a/arch/x86_64/include/arch/memory/heap/global_heap_allocator.hpp +++ b/arch/x86_64/include/arch/memory/heap/global_heap_allocator.hpp @@ -77,7 +77,8 @@ namespace teachos::arch::memory::heap private: static heap_allocator * kernel_allocator_instance; ///< Instance used to allocate and deallocate kernel heap memory - [[gnu::section(".user_data")]] static user_heap_allocator * + [[gnu::section(".user_data")]] + static user_heap_allocator * user_allocator_instance; ///< Instance used to allocate and deallocate user heap memory /** diff --git a/arch/x86_64/include/arch/memory/heap/user_heap_allocator.hpp b/arch/x86_64/include/arch/memory/heap/user_heap_allocator.hpp index 1dab047..9d00c19 100644 --- a/arch/x86_64/include/arch/memory/heap/user_heap_allocator.hpp +++ b/arch/x86_64/include/arch/memory/heap/user_heap_allocator.hpp @@ -28,6 +28,7 @@ namespace teachos::arch::memory::heap // Nothing to do } + [[gnu::section(".user_text")]] auto allocate(std::size_t size) -> void *; /** @@ -35,6 +36,7 @@ namespace teachos::arch::memory::heap * * @note Simply does nothing, because this allocator leaks all memory */ + [[gnu::section(".user_text")]] auto deallocate(void * pointer) noexcept -> void; private: diff --git a/arch/x86_64/include/arch/memory/paging/kernel_mapper.hpp b/arch/x86_64/include/arch/memory/paging/kernel_mapper.hpp index 6459107..95d04f4 100644 --- a/arch/x86_64/include/arch/memory/paging/kernel_mapper.hpp +++ b/arch/x86_64/include/arch/memory/paging/kernel_mapper.hpp @@ -139,11 +139,13 @@ namespace teachos::arch::memory::paging entry entry{section.flags}; // TODO: Why exactly are this section required or not required? - // Required to be accesible in User Mode: .user_text (Contains the actuall code executed), .boot_bss (Contains - // statically allocated variables), .boot_rodata (Contains constant data stored in ROM) + // Required to be accesible in User Mode: .user_text (Contains the actual code executed), .boot_bss (Contains + // statically allocated variables), .boot_rodata (Contains constant data stored in ROM), .user_data (Contains + // static user variables // Not required: .text, .rodata, .ctors, .dtors, .bss, .data, .boot_data, .boot_text, .init if (section.physical_address == 0x100000 || section.physical_address == 0x102000 || - section.physical_address == 0x217000) + section.physical_address == 0x217000 || section.physical_address == 0x21D000 || + section.physical_address == 0x209000) { entry.set_user_accesible(); } |
