aboutsummaryrefslogtreecommitdiff
path: root/arch/x86_64/include
diff options
context:
space:
mode:
authorFelix Morgner <felix.morgner@ost.ch>2026-01-15 14:36:25 +0100
committerFelix Morgner <felix.morgner@ost.ch>2026-01-15 14:36:25 +0100
commit693cedc76b061810dfc0dc55e3966d6bf849f397 (patch)
tree5aba1768b822b6d4e70207fdd0a1d8eae9ffc262 /arch/x86_64/include
parent42f9eaea885fa0744d2138a773702327e26f6b7b (diff)
downloadteachos-693cedc76b061810dfc0dc55e3966d6bf849f397.tar.xz
teachos-693cedc76b061810dfc0dc55e3966d6bf849f397.zip
x86_64/debug: add support for QEMU debug console
Diffstat (limited to 'arch/x86_64/include')
-rw-r--r--arch/x86_64/include/x86_64/debug/qemu_output.hpp26
1 files changed, 26 insertions, 0 deletions
diff --git a/arch/x86_64/include/x86_64/debug/qemu_output.hpp b/arch/x86_64/include/x86_64/debug/qemu_output.hpp
new file mode 100644
index 0000000..759a66b
--- /dev/null
+++ b/arch/x86_64/include/x86_64/debug/qemu_output.hpp
@@ -0,0 +1,26 @@
+#ifndef TEACHOS_X86_64_DEBUG_QEMU_OUTPUT_HPP
+#define TEACHOS_X86_64_DEBUG_QEMU_OUTPUT_HPP
+
+#include "kapi/cio.hpp"
+
+#include "x86_64/device_io/port_io.hpp"
+
+#include <string_view>
+
+namespace teachos::debug::x86_64
+{
+ struct qemu_output : cio::output_device
+ {
+ using dbg = io::x86_64::port<0xE9, char, io::x86_64::port_write>;
+
+ qemu_output(output_device & lower);
+
+ auto write(cio::output_stream stream, std::string_view text) -> void override;
+
+ private:
+ output_device & m_lower;
+ };
+
+} // namespace teachos::debug::x86_64
+
+#endif \ No newline at end of file