Palacios Public Git Repository

To checkout Palacios execute

  git clone http://v3vee.org/palacios/palacios.web/palacios.git
This will give you the master branch. You probably want the devel branch or one of the release branches. To switch to the devel branch, simply execute
  cd palacios
  git checkout --track -b devel origin/devel
The other branches are similar.


clear instruction to 0 before decoding with xed
[palacios.git] / palacios / include / palacios / vmm_console.h
1 /*
2  * This file is part of the Palacios Virtual Machine Monitor developed
3  * by the V3VEE Project with funding from the United States National 
4  * Science Foundation and the Department of Energy.  
5  *
6  * The V3VEE Project is a joint project between Northwestern University
7  * and the University of New Mexico.  You can find out more at 
8  * http://www.v3vee.org
9  *
10  * Copyright (c) 2010, Jack Lange <jarusl@cs.northwestern.edu> 
11  * Copyright (c) 2010, Erik van der Kouwe <vdkouwe@cs.vu.nl>
12  * Copyright (c) 2010, The V3VEE Project <http://www.v3vee.org> 
13  * All rights reserved.
14  *
15  * Author: Jack Lange <jarusl@cs.northwestern.edu>
16  * Author: Erik van der Kouwe <vdkouwe@cs.vu.nl>
17  *
18  * This is free software.  You are permitted to use,
19  * redistribute, and modify it as specified in the file "V3VEE_LICENSE".
20  */
21
22
23 #ifndef __VMM_CONSOLE_H__
24 #define __VMM_CONSOLE_H__
25
26 #include <palacios/vmm.h>
27
28
29 #ifdef __V3VEE__
30
31 typedef void * v3_console_t;
32
33 v3_console_t v3_console_open(struct v3_vm_info * vm, uint32_t width, uint32_t height);
34 void v3_console_close(v3_console_t cons);
35
36 int v3_console_set_cursor(v3_console_t cons, int x, int y);
37 int v3_console_set_char(v3_console_t cons, int x, int y, char c, uint8_t style);
38 int v3_console_scroll(v3_console_t cons, int lines);
39 int v3_console_update(v3_console_t cons);
40 int v3_console_set_text_resolution(v3_console_t cons, int cols, int rows);
41
42 #endif
43
44
45
46 struct v3_console_hooks {
47     /* open console device, mode is a combination of TTY_OPEN_MODE_* flags */
48     void *(*open)(void * priv_data, unsigned int width, unsigned int height);
49     
50     void (*close)(void * tty);
51
52     /* set cursor position */
53     int (*set_cursor)(void * tty, int x, int y);
54
55     /* output character c with specified style at (x, y) */
56     int (*set_character)(void * tty, int x, int y, char c, unsigned char style);
57
58     /* scroll the console down the specified number of lines */
59     int (*scroll)(void * tty, int lines);
60
61     /* change the text resolution (always followed by a full screen update) */
62     int (*set_text_resolution)(void * tty, int cols, int rows);
63
64     /* force update of console display; all updates by above functions
65      * may be defferred until the next tty_update call 
66      */
67     int (*update)(void * tty);
68 };
69
70
71 extern void V3_Init_Console(struct v3_console_hooks * hooks);
72
73 #endif