zephyr/include/xen/console.h
Dmytro Firsov d63a10da54 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>
2021-12-07 12:15:38 -05:00

29 lines
593 B
C

/*
* Copyright (c) 2021 EPAM Systems
*
* SPDX-License-Identifier: Apache-2.0
*/
#ifndef __XEN_CONSOLE_H__
#define __XEN_CONSOLE_H__
#include <init.h>
#include <device.h>
#include <drivers/uart.h>
#include <sys/device_mmio.h>
struct hvc_xen_data {
DEVICE_MMIO_RAM; /* should be first */
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);
#endif /* __XEN_CONSOLE_H__ */