aboutsummaryrefslogtreecommitdiff
path: root/arch/x86_64/include
diff options
context:
space:
mode:
authorMatteo Gmür <matteo.gmuer1@ost.ch>2024-10-13 08:28:30 +0000
committerMatteo Gmür <matteo.gmuer1@ost.ch>2024-10-13 08:28:30 +0000
commit553f3a824511bb8107982b2b2737f5b1dff59855 (patch)
treecaec969baa899969e1171813a028fa50aab8b2a6 /arch/x86_64/include
parentb28082b1642f049fcf171a85c7d6841093b0682a (diff)
downloadteachos-553f3a824511bb8107982b2b2737f5b1dff59855.tar.xz
teachos-553f3a824511bb8107982b2b2737f5b1dff59855.zip
Add missing cpp files to cmake and fix elf alignment issues
Diffstat (limited to 'arch/x86_64/include')
-rw-r--r--arch/x86_64/include/arch/memory/frame_allocator.hpp8
-rw-r--r--arch/x86_64/include/arch/memory/multiboot.hpp11
-rw-r--r--arch/x86_64/include/arch/video/vga/text.hpp1
3 files changed, 10 insertions, 10 deletions
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<typename T>
concept FrameAllocator = requires(T t) {
- { t.allocate_frame() } -> std::optional<frame>;
- { t.deallocate_frame() } -> void;
+ { t.allocate_frame() } -> std::same_as<std::optional<frame>>;
+ { t.deallocate_frame() } -> std::same_as<void>;
};
/**
@@ -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<typename T>
concept Integral = std::is_integral_v<T>;