From 693cedc76b061810dfc0dc55e3966d6bf849f397 Mon Sep 17 00:00:00 2001 From: Felix Morgner Date: Thu, 15 Jan 2026 14:36:25 +0100 Subject: x86_64/debug: add support for QEMU debug console --- arch/x86_64/include/x86_64/debug/qemu_output.hpp | 26 ++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 arch/x86_64/include/x86_64/debug/qemu_output.hpp (limited to 'arch/x86_64/include') 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 + +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 -- cgit v1.2.3