xenvm: drivers: serial: add interrupt-driven API for Xen PV console

This commit adds support of interrupt-driven API for UART-like Xen PV
console driver. It is implemented via Xen event channels. It allows to
send and receive data by chunks (not single symbols) and without
polling.

Signed-off-by: Dmytro Firsov <dmytro_firsov@epam.com>
This commit is contained in:
Dmytro Firsov 2021-09-17 00:10:49 +03:00 committed by Anas Nashif
commit d63a10da54
3 changed files with 129 additions and 0 deletions

View file

@ -16,6 +16,11 @@ struct hvc_xen_data {
const struct device *dev;
struct xencons_interface *intf;
uint64_t evtchn;
#ifdef CONFIG_UART_INTERRUPT_DRIVEN
uart_irq_callback_user_data_t irq_cb;
void *irq_cb_data;
#endif /* CONFIG_UART_INTERRUPT_DRIVEN */
};
int xen_console_init(const struct device *dev);