Changeset View
Changeset View
Standalone View
Standalone View
usr.sbin/bhyve/uart_emul.h
| Show All 25 Lines | |||||
| * SUCH DAMAGE. | * SUCH DAMAGE. | ||||
| * | * | ||||
| * $FreeBSD$ | * $FreeBSD$ | ||||
| */ | */ | ||||
| #ifndef _UART_EMUL_H_ | #ifndef _UART_EMUL_H_ | ||||
| #define _UART_EMUL_H_ | #define _UART_EMUL_H_ | ||||
| #define UART_IO_BAR_SIZE 8 | #define UART_IO_BAR_SIZE 8 | ||||
| struct uart_softc; | struct uart_softc; | ||||
| struct vm_snapshot_meta; | |||||
| typedef void (*uart_intr_func_t)(void *arg); | typedef void (*uart_intr_func_t)(void *arg); | ||||
| struct uart_softc *uart_init(uart_intr_func_t intr_assert, | struct uart_softc *uart_init(uart_intr_func_t intr_assert, | ||||
| uart_intr_func_t intr_deassert, void *arg); | uart_intr_func_t intr_deassert, void *arg); | ||||
| int uart_legacy_alloc(int unit, int *ioaddr, int *irq); | int uart_legacy_alloc(int unit, int *ioaddr, int *irq); | ||||
| uint8_t uart_read(struct uart_softc *sc, int offset); | uint8_t uart_read(struct uart_softc *sc, int offset); | ||||
| void uart_write(struct uart_softc *sc, int offset, uint8_t value); | void uart_write(struct uart_softc *sc, int offset, uint8_t value); | ||||
| int uart_set_backend(struct uart_softc *sc, const char *opt); | int uart_set_backend(struct uart_softc *sc, const char *opt); | ||||
| #ifdef BHYVE_SNAPSHOT | |||||
| int uart_snapshot(struct uart_softc *sc, struct vm_snapshot_meta *meta); | |||||
| #endif | |||||
| #endif | #endif | ||||