aboutsummaryrefslogtreecommitdiff
path: root/arch/x86_64/include
diff options
context:
space:
mode:
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