X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?p=palacios.git;a=blobdiff_plain;f=palacios%2Finclude%2Fdevices%2Fide.h;h=a5b6ea01b3114ca4649da774b7adde0fa18e4781;hp=ee6f2c5d2071227ccc3c83857947017dfa32d8ab;hb=6fe0528310bec884ed00c8d97b45d18120a32e3f;hpb=262421e0f445e5427698043eb5b3309f9768a1f2 diff --git a/palacios/include/devices/ide.h b/palacios/include/devices/ide.h index ee6f2c5..a5b6ea0 100644 --- a/palacios/include/devices/ide.h +++ b/palacios/include/devices/ide.h @@ -24,6 +24,38 @@ #include +typedef enum {IDE_DISK, IDE_CDROM, IDE_NONE} 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_block)(uchar_t * buf, int offset, void * private_data); + +}; + + +struct v3_ide_hd_ops { + + +}; + + +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, + 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, + void * private_data); + + + struct vm_device * v3_create_ide();