blob: a16bd5b4adf86372b1d2bbe9f6176d6a4eb87bf8 [file] [log] [blame]
Elliott Hughes180edef2023-11-02 00:08:05 +00001/*
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 */
Ben Cheng655a7c02013-10-16 16:09:24 -07007#ifndef _UAPI_LINUX_VIRTIO_CONSOLE_H
8#define _UAPI_LINUX_VIRTIO_CONSOLE_H
9#include <linux/types.h>
Christopher Ferris05d08e92016-02-04 13:16:38 -080010#include <linux/virtio_types.h>
Christopher Ferris05d08e92016-02-04 13:16:38 -080011#include <linux/virtio_ids.h>
Ben Cheng655a7c02013-10-16 16:09:24 -070012#include <linux/virtio_config.h>
13#define VIRTIO_CONSOLE_F_SIZE 0
14#define VIRTIO_CONSOLE_F_MULTIPORT 1
Christopher Ferris05d08e92016-02-04 13:16:38 -080015#define VIRTIO_CONSOLE_F_EMERG_WRITE 2
Tao Baod7db5942015-01-28 10:07:51 -080016#define VIRTIO_CONSOLE_BAD_ID (~(__u32) 0)
Ben Cheng655a7c02013-10-16 16:09:24 -070017struct virtio_console_config {
Christopher Ferris25c18d42020-10-14 17:42:58 -070018 __virtio16 cols;
19 __virtio16 rows;
20 __virtio32 max_nr_ports;
21 __virtio32 emerg_wr;
Ben Cheng655a7c02013-10-16 16:09:24 -070022} __attribute__((packed));
23struct virtio_console_control {
Christopher Ferris05d08e92016-02-04 13:16:38 -080024 __virtio32 id;
25 __virtio16 event;
26 __virtio16 value;
Ben Cheng655a7c02013-10-16 16:09:24 -070027};
Ben Cheng655a7c02013-10-16 16:09:24 -070028#define VIRTIO_CONSOLE_DEVICE_READY 0
29#define VIRTIO_CONSOLE_PORT_ADD 1
30#define VIRTIO_CONSOLE_PORT_REMOVE 2
Christopher Ferris05d08e92016-02-04 13:16:38 -080031#define VIRTIO_CONSOLE_PORT_READY 3
Ben Cheng655a7c02013-10-16 16:09:24 -070032#define VIRTIO_CONSOLE_CONSOLE_PORT 4
33#define VIRTIO_CONSOLE_RESIZE 5
34#define VIRTIO_CONSOLE_PORT_OPEN 6
Christopher Ferris05d08e92016-02-04 13:16:38 -080035#define VIRTIO_CONSOLE_PORT_NAME 7
Nick Kralevicha67e4de2013-01-14 11:28:26 -080036#endif