aboutsummaryrefslogtreecommitdiff
path: root/arch/x86_64
diff options
context:
space:
mode:
authorMatteo Gmür <matteo.gmuer1@ost.ch>2024-10-06 09:12:40 +0000
committerMatteo Gmür <matteo.gmuer1@ost.ch>2024-10-06 09:12:40 +0000
commit8e3c15daad14dfba76444d83bc4133acd00eaf8a (patch)
treeff85d4b721846d471e25fd4d8d7263808ea344db /arch/x86_64
parentf044a1740f49d632d1436df949fa2285918e5937 (diff)
downloadteachos-8e3c15daad14dfba76444d83bc4133acd00eaf8a.tar.xz
teachos-8e3c15daad14dfba76444d83bc4133acd00eaf8a.zip
Revert 8 byte aligning
Diffstat (limited to 'arch/x86_64')
-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);
}