TianoCore EDK2 master
Loading...
Searching...
No Matches
VirtioSerial.h
Go to the documentation of this file.
1
10#ifndef _VIRTIO_SERIAL_H_
11#define _VIRTIO_SERIAL_H_
12
15
16//
17// Device Configuration
18//
19typedef struct {
20 UINT16 Cols;
21 UINT16 Rows;
22 UINT32 MaxPorts;
23 UINT32 EmergWrite;
25
26//
27// Control Queue
28//
29typedef struct {
30 UINT32 Id;
31 UINT16 Event;
32 UINT16 Value;
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_ */