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.


booting geekos up to the timer initialization
[palacios.git] / palacios / src / geekos / vm.c
index 02bbd28..f2c0343 100644 (file)
@@ -270,14 +270,29 @@ int RunVMM(struct Boot_Info * bootInfo) {
        region_start += reg->length;
       }
       
-      add_shadow_region_passthrough(&vm_info, 0xc0000, 0xc8000, 0xc0000);
+      //     
       add_shadow_region_passthrough(&vm_info, 0x0, 0xa0000, (addr_t)Allocate_VMM_Pages(160));
       add_shadow_region_passthrough(&vm_info, 0xa0000, 0xc0000, 0xa0000); 
-      if (add_shadow_region_passthrough(&vm_info, 0xc8000, 0xf0000, (addr_t)Allocate_VMM_Pages(40)) == -1) {
-       PrintDebug("Error adding shadow region\n");
+      
+
+
+      // TEMP
+       add_shadow_region_passthrough(&vm_info, 0xc0000, 0xc8000, 0xc0000);
+
+      if (1) {
+       add_shadow_region_passthrough(&vm_info, 0xc7000, 0xc8000, (addr_t)Allocate_VMM_Pages(1));
+       if (add_shadow_region_passthrough(&vm_info, 0xc8000, 0xf0000, (addr_t)Allocate_VMM_Pages(40)) == -1) {
+         PrintDebug("Error adding shadow region\n");
+       }
+      } else {
+       add_shadow_region_passthrough(&vm_info, 0xc0000, 0xc8000, 0xc0000);
+       add_shadow_region_passthrough(&vm_info, 0xc8000, 0xf0000, 0xc8000);
       }
 
 
+      add_shadow_region_passthrough(&vm_info, 0x100000, 0x2000000, (addr_t)Allocate_VMM_Pages(8192));
+
+
       print_shadow_map(&(vm_info.mem_map));
 
       hook_io_port(&(vm_info.io_map), 0x61, &IO_Read, &IO_Write, NULL);
@@ -295,19 +310,20 @@ int RunVMM(struct Boot_Info * bootInfo) {
       hook_io_port(&(vm_info.io_map), 0x403, &IO_Read, &IO_Write_to_Serial, NULL);
 
       {
-       //struct vm_device * nvram = create_nvram();
+       struct vm_device * nvram = create_nvram();
        //struct vm_device * timer = create_timer();
        struct vm_device * pic = create_pic();
 
-       //attach_device(&(vm_info), nvram);
+       attach_device(&(vm_info), nvram);
        //attach_device(&(vm_info), timer);
        attach_device(&(vm_info), pic);
 
        PrintDebugDevMgr(&(vm_info.dev_mgr));
       }
 
-
       hook_irq(&vm_info, 6);
+      hook_irq(&vm_info, 14);
+      hook_irq(&vm_info, 15);
 
       vm_info.rip = 0xfff0;
       vm_info.vm_regs.rsp = 0x0;