1/*
2 * Copyright 2019, Data61, CSIRO (ABN 41 687 119 230)
3 *
4 * SPDX-License-Identifier: BSD-2-Clause
5 */
6
7#pragma once
8
9#include <sel4vm/guest_vm.h>
10
11#define dev_vconsole dev_uart2
12extern const struct device dev_uart0;
13extern const struct device dev_uart1;
14extern const struct device dev_uart2;
15extern const struct device dev_uart3;
16
17/**
18 * Installs a UART device which provides access to FIFO and IRQ
19 * control registers, but prevents access to configuration registers
20 * @param[in] vm  The vm in which to install the device
21 * @param[in] d   A description of the UART device
22 * @return        0 on success
23 */
24int vm_install_ac_uart(vm_t *vm, const struct device *d);
25
26/**
27 * Installs the default console device. Characters written to the
28 * console are buffered until end of line. The output data will
29 * be printed with a background colour to identify the VM
30 * @param[in] vm The VM in which to install the vconsole device
31 * @return       0 on success
32 */
33int vm_install_vconsole(vm_t *vm);
34