Elliott Hughes | 180edef | 2023-11-02 00:08:05 +0000 | [diff] [blame] | 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 | */ |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 7 | #ifndef _UAPI_LINUX_VIRTIO_CONSOLE_H |
| 8 | #define _UAPI_LINUX_VIRTIO_CONSOLE_H |
| 9 | #include <linux/types.h> |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 10 | #include <linux/virtio_types.h> |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 11 | #include <linux/virtio_ids.h> |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 12 | #include <linux/virtio_config.h> |
| 13 | #define VIRTIO_CONSOLE_F_SIZE 0 |
| 14 | #define VIRTIO_CONSOLE_F_MULTIPORT 1 |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 15 | #define VIRTIO_CONSOLE_F_EMERG_WRITE 2 |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 16 | #define VIRTIO_CONSOLE_BAD_ID (~(__u32) 0) |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 17 | struct virtio_console_config { |
Christopher Ferris | 25c18d4 | 2020-10-14 17:42:58 -0700 | [diff] [blame] | 18 | __virtio16 cols; |
| 19 | __virtio16 rows; |
| 20 | __virtio32 max_nr_ports; |
| 21 | __virtio32 emerg_wr; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 22 | } __attribute__((packed)); |
| 23 | struct virtio_console_control { |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 24 | __virtio32 id; |
| 25 | __virtio16 event; |
| 26 | __virtio16 value; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 27 | }; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 28 | #define VIRTIO_CONSOLE_DEVICE_READY 0 |
| 29 | #define VIRTIO_CONSOLE_PORT_ADD 1 |
| 30 | #define VIRTIO_CONSOLE_PORT_REMOVE 2 |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 31 | #define VIRTIO_CONSOLE_PORT_READY 3 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 32 | #define VIRTIO_CONSOLE_CONSOLE_PORT 4 |
| 33 | #define VIRTIO_CONSOLE_RESIZE 5 |
| 34 | #define VIRTIO_CONSOLE_PORT_OPEN 6 |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 35 | #define VIRTIO_CONSOLE_PORT_NAME 7 |
Nick Kralevich | a67e4de | 2013-01-14 11:28:26 -0800 | [diff] [blame] | 36 | #endif |