| 1 |
|
| 2 | |
| 3 | * console.h
|
| 4 | *
|
| 5 | * Console I/O interface for Xen guest OSes.
|
| 6 | *
|
| 7 | * Copyright (c) 2005, Keir Fraser
|
| 8 |
|
| 9 |
|
| 10 | #ifndef __XEN_PUBLIC_IO_CONSOLE_H__
|
| 11 | #define __XEN_PUBLIC_IO_CONSOLE_H__
|
| 12 |
|
| 13 | typedef uint32_t XENCONS_RING_IDX;
|
| 14 |
|
| 15 | #define MASK_XENCONS_IDX(idx, ring) ((idx) & (sizeof(ring)-1))
|
| 16 |
|
| 17 | struct xencons_interface {
|
| 18 | char in[1024];
|
| 19 | char out[2048];
|
| 20 | XENCONS_RING_IDX in_cons, in_prod;
|
| 21 | XENCONS_RING_IDX out_cons, out_prod;
|
| 22 | |
| 23 | * Flag values signaling from backend to frontend whether the console is
|
| 24 | * connected. i.e. Whether it will be serviced and emptied.
|
| 25 | *
|
| 26 | * The flag starts as disconnected.
|
| 27 |
|
| 28 | #define XENCONSOLE_DISCONNECTED 1
|
| 29 | |
| 30 | * The flag is set to connected when the backend connects and the console
|
| 31 | * will be serviced.
|
| 32 |
|
| 33 | #define XENCONSOLE_CONNECTED 0
|
| 34 | uint8_t connection;
|
| 35 | };
|
| 36 |
|
| 37 | #endif
|