blob: 6eb4d2aec6e7c4dbf43a8ee485f0b51bbf6b217d [file] [log] [blame]
Nick Kralevicha67e4de2013-01-14 11:28:26 -08001/****************************************************************************
2 ****************************************************************************
3 ***
4 *** This header was automatically generated from a Linux kernel header
5 *** of the same name, to make information necessary for userspace to
6 *** call into the kernel available to libc. It contains only constants,
7 *** structures, and macros generated from the original header, and thus,
8 *** contains no copyrightable information.
9 ***
10 *** To edit the content of this header, modify the corresponding
11 *** source file (e.g. under external/kernel-headers/original/) then
12 *** run bionic/libc/kernel/tools/update_all.py
13 ***
14 *** Any manual change here will be lost the next time this script will
15 *** be run. You've been warned!
16 ***
17 ****************************************************************************
18 ****************************************************************************/
Ben Cheng655a7c02013-10-16 16:09:24 -070019#ifndef _UAPI_LINUX_VIRTIO_CONSOLE_H
20#define _UAPI_LINUX_VIRTIO_CONSOLE_H
21#include <linux/types.h>
Christopher Ferris05d08e92016-02-04 13:16:38 -080022#include <linux/virtio_types.h>
Christopher Ferris05d08e92016-02-04 13:16:38 -080023#include <linux/virtio_ids.h>
Ben Cheng655a7c02013-10-16 16:09:24 -070024#include <linux/virtio_config.h>
25#define VIRTIO_CONSOLE_F_SIZE 0
26#define VIRTIO_CONSOLE_F_MULTIPORT 1
Christopher Ferris05d08e92016-02-04 13:16:38 -080027#define VIRTIO_CONSOLE_F_EMERG_WRITE 2
Tao Baod7db5942015-01-28 10:07:51 -080028#define VIRTIO_CONSOLE_BAD_ID (~(__u32) 0)
Ben Cheng655a7c02013-10-16 16:09:24 -070029struct virtio_console_config {
Christopher Ferris25c18d42020-10-14 17:42:58 -070030 __virtio16 cols;
31 __virtio16 rows;
32 __virtio32 max_nr_ports;
33 __virtio32 emerg_wr;
Ben Cheng655a7c02013-10-16 16:09:24 -070034} __attribute__((packed));
35struct virtio_console_control {
Christopher Ferris05d08e92016-02-04 13:16:38 -080036 __virtio32 id;
37 __virtio16 event;
38 __virtio16 value;
Ben Cheng655a7c02013-10-16 16:09:24 -070039};
Ben Cheng655a7c02013-10-16 16:09:24 -070040#define VIRTIO_CONSOLE_DEVICE_READY 0
41#define VIRTIO_CONSOLE_PORT_ADD 1
42#define VIRTIO_CONSOLE_PORT_REMOVE 2
Christopher Ferris05d08e92016-02-04 13:16:38 -080043#define VIRTIO_CONSOLE_PORT_READY 3
Ben Cheng655a7c02013-10-16 16:09:24 -070044#define VIRTIO_CONSOLE_CONSOLE_PORT 4
45#define VIRTIO_CONSOLE_RESIZE 5
46#define VIRTIO_CONSOLE_PORT_OPEN 6
Christopher Ferris05d08e92016-02-04 13:16:38 -080047#define VIRTIO_CONSOLE_PORT_NAME 7
Nick Kralevicha67e4de2013-01-14 11:28:26 -080048#endif