aboutsummaryrefslogtreecommitdiff
path: root/arch/x86_64/include
diff options
context:
space:
mode:
authorMatteo Gmür <matteo.gmuer1@ost.ch>2024-09-30 11:32:56 +0000
committerMatteo Gmür <matteo.gmuer1@ost.ch>2024-09-30 11:32:56 +0000
commit20a5e5377c0f8e0769d67a7928891597bc463e3d (patch)
treeae8bdcd1b5ce516f7262f211e9b1f5241695c216 /arch/x86_64/include
parentd2e1c8ba686d7d4ab32eda91c2f532676e9b8acf (diff)
downloadteachos-20a5e5377c0f8e0769d67a7928891597bc463e3d.tar.xz
teachos-20a5e5377c0f8e0769d67a7928891597bc463e3d.zip
Attempt to print memory map
Diffstat (limited to 'arch/x86_64/include')
-rw-r--r--arch/x86_64/include/arch/boot/multiboot.hpp11
-rw-r--r--arch/x86_64/include/arch/boot/pointers.hpp2
-rw-r--r--arch/x86_64/include/arch/io/port_io.hpp2
-rw-r--r--arch/x86_64/include/arch/kernel/main.hpp2
-rw-r--r--arch/x86_64/include/arch/video/vga/io.hpp4
-rw-r--r--arch/x86_64/include/arch/video/vga/text.hpp3
6 files changed, 15 insertions, 9 deletions
diff --git a/arch/x86_64/include/arch/boot/multiboot.hpp b/arch/x86_64/include/arch/boot/multiboot.hpp
index 9a0757e..4182a18 100644
--- a/arch/x86_64/include/arch/boot/multiboot.hpp
+++ b/arch/x86_64/include/arch/boot/multiboot.hpp
@@ -2,7 +2,8 @@
struct multiboot_tag
{
- uint32_t type;
+ uint16_t type;
+ uint16_t flags;
uint32_t size;
};
@@ -18,6 +19,14 @@ struct multiboot_info
struct multiboot_tag tags;
};
+struct memory_map_entry
+{
+ uint64_t base_addr;
+ uint64_t length;
+ uint32_t type;
+ uint32_t reserved;
+};
+
/*
* Define all multiboot tag types to ther respective values
* The gnu boot information format is defined here:
diff --git a/arch/x86_64/include/arch/boot/pointers.hpp b/arch/x86_64/include/arch/boot/pointers.hpp
index c7424e2..25800f4 100644
--- a/arch/x86_64/include/arch/boot/pointers.hpp
+++ b/arch/x86_64/include/arch/boot/pointers.hpp
@@ -8,4 +8,4 @@ namespace teachos::arch::boot
extern "C" size_t const multiboot_information_pointer;
} // namespace teachos::arch::boot
-#endif \ No newline at end of file
+#endif
diff --git a/arch/x86_64/include/arch/io/port_io.hpp b/arch/x86_64/include/arch/io/port_io.hpp
index 5b61f90..c0f1ef3 100644
--- a/arch/x86_64/include/arch/io/port_io.hpp
+++ b/arch/x86_64/include/arch/io/port_io.hpp
@@ -131,4 +131,4 @@ namespace teachos::arch::io
} // namespace teachos::arch::io
-#endif \ No newline at end of file
+#endif
diff --git a/arch/x86_64/include/arch/kernel/main.hpp b/arch/x86_64/include/arch/kernel/main.hpp
index 6961594..6759eb2 100644
--- a/arch/x86_64/include/arch/kernel/main.hpp
+++ b/arch/x86_64/include/arch/kernel/main.hpp
@@ -8,4 +8,4 @@ namespace teachos::arch::kernel
auto main() -> void;
}
-#endif \ No newline at end of file
+#endif
diff --git a/arch/x86_64/include/arch/video/vga/io.hpp b/arch/x86_64/include/arch/video/vga/io.hpp
index 9226c5c..da9375d 100644
--- a/arch/x86_64/include/arch/video/vga/io.hpp
+++ b/arch/x86_64/include/arch/video/vga/io.hpp
@@ -7,10 +7,8 @@
namespace teachos::arch::video::vga
{
-
namespace crtc
{
-
/**
* @brief The address port of the CRT Controller
*/
@@ -38,4 +36,4 @@ namespace teachos::arch::video::vga
} // namespace teachos::arch::video::vga
-#endif \ No newline at end of file
+#endif
diff --git a/arch/x86_64/include/arch/video/vga/text.hpp b/arch/x86_64/include/arch/video/vga/text.hpp
index 97344da..3b484e5 100644
--- a/arch/x86_64/include/arch/video/vga/text.hpp
+++ b/arch/x86_64/include/arch/video/vga/text.hpp
@@ -138,8 +138,8 @@ namespace teachos::arch::video::vga::text
auto write_number(T value, attribute attribute) -> void
{
T current_value = value;
-
T divisor = 1;
+
while (current_value > 9)
{
divisor *= 10;
@@ -154,7 +154,6 @@ namespace teachos::arch::video::vga::text
write_char(ascii_digit, attribute);
current_value %= divisor;
-
divisor /= 10;
}
}