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.


added timer support...
[palacios.git] / palacios / src / palacios / vmm_util.c
1 #include <palacios/vmm_util.h>
2
3 #include <palacios/vmm.h>
4
5 extern struct vmm_os_hooks * os_hooks;
6
7
8 void PrintTraceHex(unsigned char x) {
9   unsigned char z;
10   
11   z = (x >> 4) & 0xf;
12   PrintTrace("%x", z);
13   z = x & 0xf;
14   PrintTrace("%x", z);
15 }
16
17 void PrintTraceLL(ullong_t num) {
18   unsigned char * z = (unsigned char *)&num;
19   int i;
20   
21   for (i = 7; i >= 0; i--) {
22     PrintTraceHex(*(z + i));
23   }
24 }
25
26
27 void PrintTraceMemDump(unsigned char *start, int n)
28 {
29   int i, j;
30
31   for (i = 0; i < n; i += 16) {
32     PrintTrace("%8x", (unsigned)(start + i));
33     for (j = i; (j < (i + 16)) && (j < n); j += 2) {
34       PrintTrace(" ");
35       PrintTraceHex(*((unsigned char *)(start + j)));
36       if ((j + 1) < n) { 
37         PrintTraceHex(*((unsigned char *)(start + j + 1)));
38       }
39     }
40     PrintTrace(" ");
41     for (j = i; (j < (i + 16)) && (j < n); j++) {
42       PrintTrace("%c", ((start[j] >= 32) && (start[j] <= 126)) ? start[j] : '.');
43     }
44     PrintTrace("\n");
45   }
46 }
47
48
49