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.


Merge branch 'devel'
[palacios.git] / palacios / src / devices / ramdisk.c
index 1eef6d6..5879875 100644 (file)
@@ -1361,7 +1361,7 @@ static void rd_raise_interrupt(struct vm_device * dev, struct channel_t * channe
 
     v3_raise_irq(dev->vm, channel->irq);
   } else {
-    PrintError("\t\tRaising irq but irq is disabled\n");
+    PrintDebug("\t\tRaising irq but irq is disabled\n");
   }
   
   return;
@@ -1796,7 +1796,7 @@ int handle_atapi_packet_command(struct vm_device * dev, struct channel_t * chann
                break;
              }
 
-             
+
              if (rd_init_send_atapi_command(dev, channel, atapi_command, toc_length, alloc_length, false) == -1) {
                PrintError("Failed to init send atapi command in read toc (fmt=%d)\n", format);
                return -1;
@@ -2322,54 +2322,54 @@ static int ramdisk_init_device(struct vm_device *dev) {
   rd_init_hardware(ramdisk);
 
 
-  dev_hook_io(dev, PRI_CTRL_PORT, 
-             &read_status_port, &write_ctrl_port);
-
-  dev_hook_io(dev, PRI_DATA_PORT, 
-             &read_data_port, &write_data_port);
-  dev_hook_io(dev, PRI_FEATURES_PORT, 
-             &read_general_port, &write_general_port);
-  dev_hook_io(dev, PRI_SECT_CNT_PORT, 
-             &read_general_port, &write_general_port);
-  dev_hook_io(dev, PRI_SECT_ADDR1_PORT, 
-             &read_general_port, &write_general_port);
-  dev_hook_io(dev, PRI_SECT_ADDR2_PORT, 
-             &read_general_port, &write_general_port);
-  dev_hook_io(dev, PRI_SECT_ADDR3_PORT, 
-             &read_general_port, &write_general_port);
-  dev_hook_io(dev, PRI_DRV_SEL_PORT, 
-             &read_general_port, &write_general_port);
-  dev_hook_io(dev, PRI_CMD_PORT, 
-             &read_status_port, &write_cmd_port);
-
-
-  dev_hook_io(dev, SEC_CTRL_PORT, 
-             &read_status_port, &write_ctrl_port);
-
-  dev_hook_io(dev, SEC_DATA_PORT, 
-             &read_data_port, &write_data_port);
-  dev_hook_io(dev, SEC_FEATURES_PORT, 
-             &read_general_port, &write_general_port);
-  dev_hook_io(dev, SEC_SECT_CNT_PORT, 
-             &read_general_port, &write_general_port);
-  dev_hook_io(dev, SEC_SECT_ADDR1_PORT, 
-             &read_general_port, &write_general_port);
-  dev_hook_io(dev, SEC_SECT_ADDR2_PORT, 
-             &read_general_port, &write_general_port);
-  dev_hook_io(dev, SEC_SECT_ADDR3_PORT, 
-             &read_general_port, &write_general_port);
-  dev_hook_io(dev, SEC_DRV_SEL_PORT, 
-             &read_general_port, &write_general_port);
-  dev_hook_io(dev, SEC_CMD_PORT, 
-             &read_status_port, &write_cmd_port);
-
+  v3_dev_hook_io(dev, PRI_CTRL_PORT, 
+                &read_status_port, &write_ctrl_port);
+
+  v3_dev_hook_io(dev, PRI_DATA_PORT, 
+                &read_data_port, &write_data_port);
+  v3_dev_hook_io(dev, PRI_FEATURES_PORT, 
+                &read_general_port, &write_general_port);
+  v3_dev_hook_io(dev, PRI_SECT_CNT_PORT, 
+                &read_general_port, &write_general_port);
+  v3_dev_hook_io(dev, PRI_SECT_ADDR1_PORT, 
+                &read_general_port, &write_general_port);
+  v3_dev_hook_io(dev, PRI_SECT_ADDR2_PORT, 
+                &read_general_port, &write_general_port);
+  v3_dev_hook_io(dev, PRI_SECT_ADDR3_PORT, 
+                &read_general_port, &write_general_port);
+  v3_dev_hook_io(dev, PRI_DRV_SEL_PORT, 
+                &read_general_port, &write_general_port);
+  v3_dev_hook_io(dev, PRI_CMD_PORT, 
+                &read_status_port, &write_cmd_port);
+
+
+  v3_dev_hook_io(dev, SEC_CTRL_PORT, 
+                &read_status_port, &write_ctrl_port);
+
+  v3_dev_hook_io(dev, SEC_DATA_PORT, 
+                &read_data_port, &write_data_port);
+  v3_dev_hook_io(dev, SEC_FEATURES_PORT, 
+                &read_general_port, &write_general_port);
+  v3_dev_hook_io(dev, SEC_SECT_CNT_PORT, 
+                &read_general_port, &write_general_port);
+  v3_dev_hook_io(dev, SEC_SECT_ADDR1_PORT, 
+                &read_general_port, &write_general_port);
+  v3_dev_hook_io(dev, SEC_SECT_ADDR2_PORT, 
+                &read_general_port, &write_general_port);
+  v3_dev_hook_io(dev, SEC_SECT_ADDR3_PORT, 
+                &read_general_port, &write_general_port);
+  v3_dev_hook_io(dev, SEC_DRV_SEL_PORT, 
+                &read_general_port, &write_general_port);
+  v3_dev_hook_io(dev, SEC_CMD_PORT, 
+                &read_status_port, &write_cmd_port);
+  
   
 
-  dev_hook_io(dev, SEC_ADDR_REG_PORT, 
-             &read_general_port, &write_general_port);
+  v3_dev_hook_io(dev, SEC_ADDR_REG_PORT, 
+                &read_general_port, &write_general_port);
 
-  dev_hook_io(dev, PRI_ADDR_REG_PORT, 
-             &read_general_port, &write_general_port);
+  v3_dev_hook_io(dev, PRI_ADDR_REG_PORT, 
+                &read_general_port, &write_general_port);
 
 
 
@@ -2395,7 +2395,7 @@ static struct vm_device_ops dev_ops = {
 
 
 
-struct vm_device *create_ramdisk()
+struct vm_device * v3_create_ramdisk()
 {
 
   struct ramdisk_t *ramdisk;
@@ -2404,7 +2404,7 @@ struct vm_device *create_ramdisk()
 
   PrintDebug("[create_ramdisk]\n");
 
-  struct vm_device *device = create_device("RAMDISK", &dev_ops, ramdisk);
+  struct vm_device * device = v3_create_device("RAMDISK", &dev_ops, ramdisk);
 
   return device;
 }
@@ -2576,7 +2576,6 @@ static void rd_print_state(struct ramdisk_t * ramdisk) {
 
 
 
-
 static int check_bit_fields(struct controller_t * controller) {
   //Check bit fields
   controller->sector_count = 0;