aboutsummaryrefslogtreecommitdiff
path: root/arch/x86_64
diff options
context:
space:
mode:
authorFelix Morgner <felix.morgner@ost.ch>2025-07-14 21:29:10 +0000
committerFelix Morgner <felix.morgner@ost.ch>2025-07-14 21:29:10 +0000
commit05ac8c2bdd000d27b38411db2223eabb649c318f (patch)
treeb374fb6d8e7c068520547b2c25e7ce28c137e167 /arch/x86_64
parent3a47a8bd0edcfa3aa03562d0a5c390ef85ad0c6b (diff)
downloadteachos-05ac8c2bdd000d27b38411db2223eabb649c318f.tar.xz
teachos-05ac8c2bdd000d27b38411db2223eabb649c318f.zip
build: reintroduce bootable ISO
Diffstat (limited to 'arch/x86_64')
-rw-r--r--arch/x86_64/src/boot/boot.s2
-rw-r--r--arch/x86_64/src/io.cpp14
-rw-r--r--arch/x86_64/src/vga/text.cpp2
-rw-r--r--arch/x86_64/support/grub.cfg.in2
4 files changed, 12 insertions, 8 deletions
diff --git a/arch/x86_64/src/boot/boot.s b/arch/x86_64/src/boot/boot.s
index 5488073..728380d 100644
--- a/arch/x86_64/src/boot/boot.s
+++ b/arch/x86_64/src/boot/boot.s
@@ -105,7 +105,7 @@ mesage_long_mode_not_supported:
* We need a pointer to our current position in the VGA text buffer.
*/
.global vga_buffer_pointer
-vga_buffer_pointer: .long 0xb8000
+vga_buffer_pointer: .quad 0xb8000
/**
* Code for the bootstrapping process.
diff --git a/arch/x86_64/src/io.cpp b/arch/x86_64/src/io.cpp
index 5fb1c85..8e9e411 100644
--- a/arch/x86_64/src/io.cpp
+++ b/arch/x86_64/src/io.cpp
@@ -6,15 +6,21 @@ namespace teachos::arch::io
auto init() -> void
{
+ x86_64::vga::text::cursor(false);
+
teachos::set_print_handler(
[](auto text) { return x86_64::vga::text::write(text, x86_64::vga::text::common_attributes::green_on_black); });
- teachos::set_println_handler(
- [](auto text) { return x86_64::vga::text::write(text, x86_64::vga::text::common_attributes::green_on_black); });
+ teachos::set_println_handler([](auto text) {
+ x86_64::vga::text::write(text, x86_64::vga::text::common_attributes::green_on_black);
+ x86_64::vga::text::newline();
+ });
teachos::set_print_error_handler(
[](auto text) { return x86_64::vga::text::write(text, x86_64::vga::text::common_attributes::red_on_black); });
- teachos::set_println_error_handler(
- [](auto text) { return x86_64::vga::text::write(text, x86_64::vga::text::common_attributes::red_on_black); });
+ teachos::set_println_error_handler([](auto text) {
+ x86_64::vga::text::write(text, x86_64::vga::text::common_attributes::red_on_black);
+ x86_64::vga::text::newline();
+ });
teachos::println("[x86-64] Basic VGA text output initialized.");
}
diff --git a/arch/x86_64/src/vga/text.cpp b/arch/x86_64/src/vga/text.cpp
index 9b7946d..16abf08 100644
--- a/arch/x86_64/src/vga/text.cpp
+++ b/arch/x86_64/src/vga/text.cpp
@@ -14,8 +14,6 @@ namespace teachos::x86_64::vga::text
{
namespace
{
- // auto constexpr DEFAULT_VGA_TEXT_BUFFER_ADDRESS = 0xB8000;
-
auto buffer_offset = std::ptrdiff_t{};
auto constexpr DEFAULT_TEXT_BUFFER_WIDTH = 80U;
diff --git a/arch/x86_64/support/grub.cfg.in b/arch/x86_64/support/grub.cfg.in
index 86674dd..49f19ce 100644
--- a/arch/x86_64/support/grub.cfg.in
+++ b/arch/x86_64/support/grub.cfg.in
@@ -2,6 +2,6 @@ timeout=2
default=0
menuentry "TeachOS" {
- multiboot2 /$<TARGET_FILE_NAME:teachos::kernel>
+ multiboot2 /$<TARGET_FILE_NAME:kernel>
boot
} \ No newline at end of file