aboutsummaryrefslogtreecommitdiff
path: root/arch/x86_64/src/memory/multiboot
diff options
context:
space:
mode:
authorMatteo Gmür <matteo.gmuer1@ost.ch>2024-10-20 07:01:53 +0000
committerMatteo Gmür <matteo.gmuer1@ost.ch>2024-10-20 07:01:53 +0000
commitd728052d62470799f73f6d9a2b8baa2b0b357383 (patch)
treec73e113315b27b3caaca2dac2f8d451d1a260b2d /arch/x86_64/src/memory/multiboot
parent7ebfe9e09efa84044d1470132b7f55ebf53a7f89 (diff)
downloadteachos-d728052d62470799f73f6d9a2b8baa2b0b357383.tar.xz
teachos-d728052d62470799f73f6d9a2b8baa2b0b357383.zip
Add helper methods to phyisca frame
Diffstat (limited to 'arch/x86_64/src/memory/multiboot')
-rw-r--r--arch/x86_64/src/memory/multiboot/reader.cpp15
1 files changed, 7 insertions, 8 deletions
diff --git a/arch/x86_64/src/memory/multiboot/reader.cpp b/arch/x86_64/src/memory/multiboot/reader.cpp
index 8741b44..156b437 100644
--- a/arch/x86_64/src/memory/multiboot/reader.cpp
+++ b/arch/x86_64/src/memory/multiboot/reader.cpp
@@ -19,7 +19,7 @@ namespace teachos::arch::memory::multiboot
{
auto expected_entry_size = mminfo->entry_size;
constexpr auto actual_entry_size = sizeof(memory_area);
- arch::exception_handling::assert(expected_entry_size == actual_entry_size, "Unexpected memory_area entry size");
+ exception_handling::assert(expected_entry_size == actual_entry_size, "Unexpected memory_area entry size");
auto total_size = mminfo->info.size;
auto total_entries_size = total_size - sizeof(memory_map_header) + actual_entry_size;
@@ -34,19 +34,18 @@ namespace teachos::arch::memory::multiboot
{
auto expected_entry_size = symbol->entry_size;
constexpr auto actual_entry_size = sizeof(elf_section_header);
- arch::exception_handling::assert(expected_entry_size == actual_entry_size,
- "Unexpected elf_section_header entry size");
+ exception_handling::assert(expected_entry_size == actual_entry_size, "Unexpected elf_section_header entry size");
auto expected_total_size = symbol->info.size;
auto actual_total_entry_size = actual_entry_size * symbol->number_of_sections;
constexpr auto actual_total_section_size = sizeof(elf_symbols_section_header) - sizeof(uint32_t);
auto actual_total_size = actual_total_entry_size + actual_total_section_size;
- arch::exception_handling::assert(expected_total_size == actual_total_size,
- "Unexpected elf_symbols_section_header total size");
+ exception_handling::assert(expected_total_size == actual_total_size,
+ "Unexpected elf_symbols_section_header total size");
auto begin = reinterpret_cast<elf_section_header *>(&symbol->end);
auto end = begin + symbol->number_of_sections;
- arch::exception_handling::assert(begin->is_null(), "Missing elf_section_header begin");
+ exception_handling::assert(begin->is_null(), "Missing elf_section_header begin");
std::size_t symbol_table_section_count = 0U;
std::size_t dynamic_section_count = 0U;
@@ -80,8 +79,8 @@ namespace teachos::arch::memory::multiboot
}
}
- arch::exception_handling::assert(symbol_table_section_count == 1U, "Unexpected symbol_table_count value");
- arch::exception_handling::assert(dynamic_section_count <= 1U, "Unexpected dynamic_section_count value");
+ exception_handling::assert(symbol_table_section_count == 1U, "Unexpected symbol_table_count value");
+ exception_handling::assert(dynamic_section_count <= 1U, "Unexpected dynamic_section_count value");
}
} // namespace