1 | /** @file
|
---|
2 | Virtio Serial Device specific type and macro definitions.
|
---|
3 |
|
---|
4 | Copyright (C) 2013-2016, Red Hat, Inc.
|
---|
5 |
|
---|
6 | SPDX-License-Identifier: BSD-2-Clause-Patent
|
---|
7 |
|
---|
8 | **/
|
---|
9 |
|
---|
10 | #ifndef _VIRTIO_SERIAL_H_
|
---|
11 | #define _VIRTIO_SERIAL_H_
|
---|
12 |
|
---|
13 | #include <IndustryStandard/Virtio095.h>
|
---|
14 | #include <IndustryStandard/Virtio10.h>
|
---|
15 |
|
---|
16 | //
|
---|
17 | // Device Configuration
|
---|
18 | //
|
---|
19 | typedef struct {
|
---|
20 | UINT16 Cols;
|
---|
21 | UINT16 Rows;
|
---|
22 | UINT32 MaxPorts;
|
---|
23 | UINT32 EmergWrite;
|
---|
24 | } VIRTIO_SERIAL_CONFIG;
|
---|
25 |
|
---|
26 | //
|
---|
27 | // Control Queue
|
---|
28 | //
|
---|
29 | typedef struct {
|
---|
30 | UINT32 Id;
|
---|
31 | UINT16 Event;
|
---|
32 | UINT16 Value;
|
---|
33 | } VIRTIO_SERIAL_CONTROL;
|
---|
34 |
|
---|
35 | //
|
---|
36 | // Queue Identifiers
|
---|
37 | //
|
---|
38 | #define VIRTIO_SERIAL_Q_RX_PORT0 0
|
---|
39 | #define VIRTIO_SERIAL_Q_TX_PORT0 1
|
---|
40 | #define VIRTIO_SERIAL_Q_RX_CTRL 2
|
---|
41 | #define VIRTIO_SERIAL_Q_TX_CTRL 3
|
---|
42 | #define VIRTIO_SERIAL_Q_RX_BASE 4
|
---|
43 | #define VIRTIO_SERIAL_Q_TX_BASE 5
|
---|
44 |
|
---|
45 | //
|
---|
46 | // Feature Bits
|
---|
47 | //
|
---|
48 | #define VIRTIO_SERIAL_F_SIZE BIT0
|
---|
49 | #define VIRTIO_SERIAL_F_MULTIPORT BIT1
|
---|
50 | #define VIRTIO_SERIAL_F_EMERG_WRITE BIT2
|
---|
51 |
|
---|
52 | //
|
---|
53 | // Events
|
---|
54 | //
|
---|
55 | #define VIRTIO_SERIAL_DEVICE_READY 0
|
---|
56 | #define VIRTIO_SERIAL_DEVICE_ADD 1
|
---|
57 | #define VIRTIO_SERIAL_DEVICE_REMOVE 2
|
---|
58 | #define VIRTIO_SERIAL_PORT_READY 3
|
---|
59 | #define VIRTIO_SERIAL_CONSOLE_PORT 4
|
---|
60 | #define VIRTIO_SERIAL_RESIZE 5
|
---|
61 | #define VIRTIO_SERIAL_PORT_OPEN 6
|
---|
62 | #define VIRTIO_SERIAL_PORT_NAME 7
|
---|
63 |
|
---|
64 | #endif /* _VIRTIO_SERIAL_H_ */
|
---|