From 553f3a824511bb8107982b2b2737f5b1dff59855 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matteo=20Gm=C3=BCr?= Date: Sun, 13 Oct 2024 08:28:30 +0000 Subject: Add missing cpp files to cmake and fix elf alignment issues --- arch/x86_64/include/arch/memory/frame_allocator.hpp | 8 ++++---- arch/x86_64/include/arch/memory/multiboot.hpp | 11 ++++++----- arch/x86_64/include/arch/video/vga/text.hpp | 1 - 3 files changed, 10 insertions(+), 10 deletions(-) (limited to 'arch/x86_64/include') diff --git a/arch/x86_64/include/arch/memory/frame_allocator.hpp b/arch/x86_64/include/arch/memory/frame_allocator.hpp index 3989cdf..a52cc46 100644 --- a/arch/x86_64/include/arch/memory/frame_allocator.hpp +++ b/arch/x86_64/include/arch/memory/frame_allocator.hpp @@ -52,8 +52,8 @@ namespace teachos::arch::memory template concept FrameAllocator = requires(T t) { - { t.allocate_frame() } -> std::optional; - { t.deallocate_frame() } -> void; + { t.allocate_frame() } -> std::same_as>; + { t.deallocate_frame() } -> std::same_as; }; /** @@ -81,11 +81,11 @@ namespace teachos::arch::memory */ area_frame_allocator(std::size_t kernel_start, std::size_t kernel_end, std::size_t multiboot_start, std::size_t multiboot_end, memory_area * memory_areas) - : kernel_start(frame{kernel_start}) + : areas(memory_areas) + , kernel_start(frame{kernel_start}) , kernel_end(frame{kernel_end}) , multiboot_start(frame{multiboot_start}) , multiboot_end(frame{multiboot_end}) - , areas(memory_areas) { choose_next_area(); } diff --git a/arch/x86_64/include/arch/memory/multiboot.hpp b/arch/x86_64/include/arch/memory/multiboot.hpp index c049a29..d66ca35 100644 --- a/arch/x86_64/include/arch/memory/multiboot.hpp +++ b/arch/x86_64/include/arch/memory/multiboot.hpp @@ -307,11 +307,12 @@ namespace teachos::arch::memory */ struct elf_symbols_section { - multi_boot_tag tag; ///< Basic multi_boot_tag information - uint32_t number_of_sections; ///< Number of sections in the sections array - uint32_t entry_size; ///< Size of each entry in the sections array - uint32_t section_index; ///< Index to the string table used for symbol names - alignas(8) struct elf_section_header sections; ///< Specific sectons + multi_boot_tag tag; ///< Basic multi_boot_tag information + uint32_t number_of_sections; ///< Number of sections in the sections array + uint32_t entry_size; ///< Size of each entry in the sections array + uint32_t section_index; ///< Index to the string table used for symbol names + std::byte end; ///< Marks the end of the tag, used to mark the beginning of any additional data + ///< contained in the section, to ensure byte alignment is actually 4 byte }; } // namespace teachos::arch::memory diff --git a/arch/x86_64/include/arch/video/vga/text.hpp b/arch/x86_64/include/arch/video/vga/text.hpp index 9c4c701..79ec7be 100644 --- a/arch/x86_64/include/arch/video/vga/text.hpp +++ b/arch/x86_64/include/arch/video/vga/text.hpp @@ -121,7 +121,6 @@ namespace teachos::arch::video::vga::text */ auto write_char(char code_point, attribute attribute) -> void; - // TODO: Move concepts to their own file/folder template concept Integral = std::is_integral_v; -- cgit v1.2.3