xref: /aosp_15_r20/bionic/libc/kernel/uapi/linux/virtio_console.h (revision 8d67ca893c1523eb926b9080dbe4e2ffd2a27ba1)
1 /*
2  * This file is auto-generated. Modifications will be lost.
3  *
4  * See https://android.googlesource.com/platform/bionic/+/master/libc/kernel/
5  * for more information.
6  */
7 #ifndef _UAPI_LINUX_VIRTIO_CONSOLE_H
8 #define _UAPI_LINUX_VIRTIO_CONSOLE_H
9 #include <linux/types.h>
10 #include <linux/virtio_types.h>
11 #include <linux/virtio_ids.h>
12 #include <linux/virtio_config.h>
13 #define VIRTIO_CONSOLE_F_SIZE 0
14 #define VIRTIO_CONSOLE_F_MULTIPORT 1
15 #define VIRTIO_CONSOLE_F_EMERG_WRITE 2
16 #define VIRTIO_CONSOLE_BAD_ID (~(__u32) 0)
17 struct virtio_console_config {
18   __virtio16 cols;
19   __virtio16 rows;
20   __virtio32 max_nr_ports;
21   __virtio32 emerg_wr;
22 } __attribute__((packed));
23 struct virtio_console_control {
24   __virtio32 id;
25   __virtio16 event;
26   __virtio16 value;
27 };
28 #define VIRTIO_CONSOLE_DEVICE_READY 0
29 #define VIRTIO_CONSOLE_PORT_ADD 1
30 #define VIRTIO_CONSOLE_PORT_REMOVE 2
31 #define VIRTIO_CONSOLE_PORT_READY 3
32 #define VIRTIO_CONSOLE_CONSOLE_PORT 4
33 #define VIRTIO_CONSOLE_RESIZE 5
34 #define VIRTIO_CONSOLE_PORT_OPEN 6
35 #define VIRTIO_CONSOLE_PORT_NAME 7
36 #endif
37