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.


Cache information interface and implementation for AMD and Intel on Linux
[palacios.git] / linux_usr / v3_mem_reset.c
1 #include <stdio.h>
2 #include <stdlib.h>
3 #include <string.h>
4 #include <fcntl.h>
5 #include <sys/ioctl.h>
6 #include <sys/types.h>
7
8 #include "v3_ctrl.h"
9
10 int main(int argc, char *argv[]) 
11 {
12     int v3_fd;
13
14     if (argc!=2 || strcmp(argv[1],"-f")) { 
15         printf("usage: v3_mem_reset -f\n\n"
16                "This will deinit and then init the memory manager.\n\nYou probably do not want to do this.\n");
17         return -1;
18     }
19
20    
21     v3_fd = open("/dev/v3vee", O_RDONLY);
22     if (v3_fd == -1) {
23         printf("Error opening V3Vee control device\n");
24         return -1;
25     }
26
27     ioctl(v3_fd, V3_RESET_MEMORY, NULL);
28     close(v3_fd);
29
30     return 0;
31 }