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.


updated the block device interfaces to be more generic, and have the virtio block...
[palacios.git] / palacios / include / devices / ide.h
index 88c593e..b778f1e 100644 (file)
@@ -22,6 +22,7 @@
 
 #ifdef __V3VEE__
 
+#include <devices/block_dev.h>
 
 struct ide_cfg {
     char pci[32];
@@ -29,38 +30,18 @@ struct ide_cfg {
 };
 
 
-#define ATAPI_BLOCK_SIZE 2048
-#define IDE_SECTOR_SIZE 512
-
-typedef enum {IDE_NONE, IDE_DISK, IDE_CDROM} v3_ide_dev_type_t;
-
-struct v3_ide_cd_ops {
-    uint32_t (*get_capacity)(void * private_data);
-    // Reads always operate on 2048 byte blocks
-    int (*read)(uint8_t * buf, int block_count, uint64_t lba, void * private_data);
-};
-
-
-struct v3_ide_hd_ops {
-    uint64_t (*get_capacity)(void * private_data);
-    // Reads always operate on 2048 byte blocks
-    int (*read)(uint8_t * buf, int sector_count, uint64_t lba, void * private_data);
-    int (*write)(uint8_t * buf, int sector_count, uint64_t lba, void * private_data);
-};
-
-
 int v3_ide_register_cdrom(struct vm_device * ide, 
                          uint_t bus_num, 
                          uint_t drive_num, 
                          char * drive_name,
-                         struct v3_ide_cd_ops * ops, 
+                         struct v3_cd_ops * ops, 
                          void * private_data);
 
 int v3_ide_register_harddisk(struct vm_device * ide, 
                             uint_t bus_num, 
                             uint_t drive_num, 
                             char * drive_name,
-                            struct v3_ide_hd_ops * ops, 
+                            struct v3_hd_ops * ops, 
                             void * private_data);