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.


Lots of pedantic error checking in Palacios proper, especially for memory
[palacios.git] / palacios / src / devices / vga.c
index a507f48..f9c4e90 100644 (file)
@@ -2845,12 +2845,17 @@ static int vga_init(struct v3_vm_info * vm, v3_cfg_tree_t * cfg) {
 
     // Now allocate the maps
     for (i=0;i<MAP_NUM;i++) { 
-       vga->map[i] = (vga_map) V3_VAddr((void*)V3_AllocPages(MAP_SIZE/4096));
-       if (!(vga->map[i])) {
+       void *temp;
+
+       temp = (void*)V3_AllocPages(MAP_SIZE/4096);
+       if (!temp) { 
            PrintError("vga: cannot allocate maps\n");
            free_vga(vga);
            return -1;
        }
+
+       vga->map[i] = (vga_map) V3_VAddr(temp);
+
        memset(vga->map[i],0,MAP_SIZE);
     }