aboutsummaryrefslogtreecommitdiff
path: root/arch/x86_64/src
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86_64/src')
-rw-r--r--arch/x86_64/src/kernel/main.cpp14
1 files changed, 2 insertions, 12 deletions
diff --git a/arch/x86_64/src/kernel/main.cpp b/arch/x86_64/src/kernel/main.cpp
index 3436127..d94cbba 100644
--- a/arch/x86_64/src/kernel/main.cpp
+++ b/arch/x86_64/src/kernel/main.cpp
@@ -19,8 +19,7 @@ namespace teachos::arch::kernel
auto begin = &mminfo->entries;
auto end = begin + entry_amount;
- for (auto entry = begin; entry != end;
- entry = (teachos::arch::memory::memory_area *)(((uint8_t *)entry) + ((mminfo->entry_size + 7) & ~7)))
+ for (auto entry = begin; entry != end; ++entry)
{
video::vga::text::write("Looping Memory area", video::vga::text::common_attributes::green_on_black);
}
@@ -30,16 +29,7 @@ namespace teachos::arch::kernel
{
auto begin = &symbol->sections;
auto end = begin + symbol->num;
-
- /*
- * Loop over the elf section to access the information needed.
- * Sections are defined in the header file and are padded so that each
- * Section starts at an 8-bytes aligned adress.
- *
- * The increment part aligns the size to an 8-byte address.
- */
- for (auto section = begin; section != end;
- section = (teachos::arch::memory::elf_section_header *)(((uint8_t *)section) + ((symbol->entsize + 7) & ~7)))
+ for (auto section = begin; section != end; ++section)
{
video::vga::text::write("Looping Code section", video::vga::text::common_attributes::green_on_black);
}