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 / src / palacios / vmm_graphics_console.c
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) 2011, Peter Dinda <pdinda@northwestern.edu>
11  * Copyright (c) 2011, The V3VEE Project <http://www.v3vee.org> 
12  * All rights reserved.
13  *
14  * Author: Peter Dinda <pdinda@northwestern.edu>
15  *
16  * This is free software.  You are permitted to use,
17  * redistribute, and modify it as specified in the file "V3VEE_LICENSE".
18  */
19
20
21 #include <palacios/vmm_graphics_console.h>
22 #include <palacios/vmm.h>
23 #include <palacios/vmm_debug.h>
24 #include <palacios/vmm_types.h>
25 #include <palacios/vm_guest.h>
26
27 struct v3_graphics_console_hooks * graphics_console_hooks = 0;
28
29 v3_graphics_console_t v3_graphics_console_open(struct v3_vm_info * vm, 
30                                                struct v3_frame_buffer_spec *desired_spec,
31                                                struct v3_frame_buffer_spec *actual_spec)
32 {                                              
33     V3_ASSERT(graphics_console_hooks != NULL);
34     V3_ASSERT(graphics_console_hooks->open != NULL);
35
36     return graphics_console_hooks->open(vm->host_priv_data, desired_spec, actual_spec);
37 }
38
39 void v3_graphics_console_close(v3_graphics_console_t cons) 
40 {
41     V3_ASSERT(graphics_console_hooks);
42     V3_ASSERT(graphics_console_hooks->close);
43
44     graphics_console_hooks->close(cons);
45 }
46
47 void * v3_graphics_console_get_frame_buffer_data_read(v3_graphics_console_t cons, struct v3_frame_buffer_spec *spec) 
48 {
49     V3_ASSERT(graphics_console_hooks != NULL);
50     V3_ASSERT(graphics_console_hooks->get_data_read != NULL);
51     
52     return graphics_console_hooks->get_data_read(cons, spec);
53 }
54
55
56 void  v3_graphics_console_release_frame_buffer_data_read(v3_graphics_console_t cons)
57 {
58     V3_ASSERT(graphics_console_hooks != NULL);
59     V3_ASSERT(graphics_console_hooks->release_data_read != NULL);
60     
61     return graphics_console_hooks->release_data_read(cons);
62 }
63
64 void * v3_graphics_console_get_frame_buffer_data_rw(v3_graphics_console_t cons, struct v3_frame_buffer_spec *spec) 
65 {
66     V3_ASSERT(graphics_console_hooks != NULL);
67     V3_ASSERT(graphics_console_hooks->get_data_rw != NULL);
68     
69     return graphics_console_hooks->get_data_rw(cons, spec);
70 }
71
72 void v3_graphics_console_release_frame_buffer_data_rw(v3_graphics_console_t cons)
73 {
74     V3_ASSERT(graphics_console_hooks != NULL);
75     V3_ASSERT(graphics_console_hooks->release_data_rw != NULL);
76     
77     return graphics_console_hooks->release_data_rw(cons);
78 }
79
80
81
82 int v3_graphics_console_inform_update(v3_graphics_console_t cons) {
83     V3_ASSERT(graphics_console_hooks != NULL);
84     V3_ASSERT(graphics_console_hooks->changed != NULL);
85     
86     return graphics_console_hooks->changed(cons);
87 }
88
89 void V3_Init_Graphics_Console(struct v3_graphics_console_hooks * hooks) {
90     graphics_console_hooks = hooks;
91     PrintDebug("V3 graphics console inited\n");
92
93     return;
94 }