aboutsummaryrefslogtreecommitdiff
path: root/arch/x86_64/src/memory
diff options
context:
space:
mode:
authorMatteo Gmür <matteo.gmuer1@ost.ch>2024-10-08 11:30:01 +0000
committerMatteo Gmür <matteo.gmuer1@ost.ch>2024-10-08 11:30:01 +0000
commit7edd03e9a14a3025b4d2b2ff51d838d20b79b2c4 (patch)
treed156c915f05067ea699522f0705863917b00558a /arch/x86_64/src/memory
parentbb2089599007fb5e25e613e67088a05731df4347 (diff)
downloadteachos-7edd03e9a14a3025b4d2b2ff51d838d20b79b2c4.tar.xz
teachos-7edd03e9a14a3025b4d2b2ff51d838d20b79b2c4.zip
Added doxygen comments to all fields and structs
Diffstat (limited to 'arch/x86_64/src/memory')
-rw-r--r--arch/x86_64/src/memory/multiboot.cpp41
1 files changed, 41 insertions, 0 deletions
diff --git a/arch/x86_64/src/memory/multiboot.cpp b/arch/x86_64/src/memory/multiboot.cpp
new file mode 100644
index 0000000..91e7550
--- /dev/null
+++ b/arch/x86_64/src/memory/multiboot.cpp
@@ -0,0 +1,41 @@
+#include "multiboot.hpp"
+
+namespace teachos::arch::memory
+{
+ auto elf_section_flags::writeable() const -> bool { return is_bit_set(0); }
+
+ auto elf_section_flags::occupies_memory() const -> bool { return is_bit_set(1); }
+
+ auto elf_section_flags::is_executable() const -> bool { return is_bit_set(2); }
+
+ auto elf_section_flags::contains_duplicate_data() const -> bool { return is_bit_set(4); }
+
+ auto elf_section_flags::contains_strings() const -> bool { return is_bit_set(5); }
+
+ auto elf_section_flags::section_header_info_is_section_header_table_index() const -> bool { return is_bit_set(6); }
+
+ auto elf_section_flags::preserve_ordering_after_combination() const -> bool { return is_bit_set(7); }
+
+ auto elf_section_flags::requires_special_os_processing() const -> bool { return is_bit_set(8); }
+
+ auto elf_section_flags::is_section_group_member() const -> bool { return is_bit_set(9); }
+
+ auto elf_section_flags::holds_thread_local_data() const -> bool { return is_bit_set(10); }
+
+ auto elf_section_flags::is_compressed() const -> bool { return is_bit_set(11); }
+
+ auto elf_section_flags::has_special_ordering_requirements() const -> bool { return is_bit_set(30); }
+
+ auto elf_section_flags::is_excluded_unless_referenced_or_allocated() const -> bool { return is_bit_set(31); }
+
+ auto elf_section_flags::operator==(elf_section_flags const & other) const -> bool { return flags == other.flags; }
+
+ auto elf_section_flags::is_bit_set(uint8_t index) const -> bool { return flags[index] == 1; }
+
+ auto elf_section_header::is_null() const -> bool
+ {
+ return name_table_index == 0U && type == elf_section_type::UNSPECIFIED &&
+ flags == teachos::arch::memory::elf_section_flags{0U} && virtual_address == 0U && file_offset == 0U &&
+ additional_information == 0U && address_alignment == 0U && fixed_table_entry_size == 0U;
+ }
+} // namespace teachos::arch::memory