qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

simple serial device emulation


From: Hinko Kocevar
Subject: simple serial device emulation
Date: Fri, 10 Sep 2021 21:35:35 +0200

I have an emulated MMIO area holding couple of registers that deal with serial UART. Very simple access to the Tx and Rx registers from the userspace point of view involves polling for a bit in one register and then writing another; when there is room for another character. When the guest app does write to a MMIO Tx register, as expected, io_writex() is invoked and my handler is invoked. At the moment it does not do much. I'm thinking now that the character needs to be fed to the serial device instance or something.

Where should I look for suitable examples in the qemu code? I reckon that other machines exist that do the similar. I found lots of serial_mm_init() and sysbus_mmio_map() uses around serial port instances but I'm not sure how to couple my "serial ops" to the "bus" or SerialMM (if that is the way to go).

Thanks!
//hinko

--
.. the more I see the less I believe.., AE AoR

reply via email to

[Prev in Thread] Current Thread [Next in Thread]