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.
6 * The V3VEE Project is a joint project between Northwestern University
7 * and the University of New Mexico. You can find out more at
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.
15 * Author: Jack Lange <jarusl@cs.northwestern.edu>
16 * Author: Erik van der Kouwe <vdkouwe@cs.vu.nl>
18 * This is free software. You are permitted to use,
19 * redistribute, and modify it as specified in the file "V3VEE_LICENSE".
23 #ifndef __VMM_CONSOLE_H__
24 #define __VMM_CONSOLE_H__
26 #include <palacios/vmm.h>
31 typedef void * v3_console_t;
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);
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);
45 struct v3_console_hooks {
46 /* open console device, mode is a combination of TTY_OPEN_MODE_* flags */
47 void *(*open)(void * priv_data, unsigned int width, unsigned int height);
49 void (*close)(void * tty);
51 /* set cursor position */
52 int (*set_cursor)(void * tty, int x, int y);
54 /* output character c with specified style at (x, y) */
55 int (*set_character)(void * tty, int x, int y, char c, unsigned char style);
57 /* scroll the console down the specified number of lines */
58 int (*scroll)(void * tty, int lines);
60 /* force update of console display; all updates by above functions
61 * may be defferred until the next tty_update call
63 int (*update)(void * tty);
67 extern void V3_Init_Console(struct v3_console_hooks * hooks);