diff options
Diffstat (limited to 'arch/x86_64/include')
| -rw-r--r-- | arch/x86_64/include/x86_64/debug/qemu_output.hpp | 10 |
1 files changed, 6 insertions, 4 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 index 6ff4da6..61b47d6 100644 --- a/arch/x86_64/include/x86_64/debug/qemu_output.hpp +++ b/arch/x86_64/include/x86_64/debug/qemu_output.hpp @@ -15,13 +15,13 @@ namespace teachos::debug::x86_64 //! This device implements output to the port 0xE9 debug console present in QEMU in Bochs. It is designed to wrap a //! different output device (e.g. a VGA text output device) and forwards the written data accordingly. //! - //! @note Support for the device has to be enabled when the emulator is started. Since there is no reliable way to - //! detect the presence of the port, writes will still happen even if the device is not enabled in the emulator. It is - //! thus possible that the output is simply lost. + //! @note Support for the device has to be enabled when the emulator is started. The device will try to detect if the + //! port is available. If the port is detected, any output to the device will be written to port before being + //! forwarded to the lower device. struct qemu_output : cio::output_device { //! The port to write to. - using dbg = io::x86_64::port<0xE9, char, io::x86_64::port_write>; + using port = io::x86_64::port<0xE9, unsigned char, io::x86_64::port_write, io::x86_64::port_read>; //! Construct a new debug device wrapper for the given output device. //! @@ -34,6 +34,8 @@ namespace teachos::debug::x86_64 private: //! The device to forward the output to. output_device & m_lower; + //! Whether the device has been detected. + bool m_present; }; } // namespace teachos::debug::x86_64 |
