X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=blobdiff_plain;f=palacios%2Finclude%2Fdevices%2Fide.h;h=14e915fd76b505361b0a33ede8707dc928ecbc84;hb=c669591f0754b80c6b429d4c15c3c320388a37c3;hp=88c593ee679b54a744d6d91c4974c767194bbb1f;hpb=37c18b2c2335a41c68c2f0b779fd2b7d51ab216d;p=palacios.git diff --git a/palacios/include/devices/ide.h b/palacios/include/devices/ide.h index 88c593e..14e915f 100644 --- a/palacios/include/devices/ide.h +++ b/palacios/include/devices/ide.h @@ -23,51 +23,8 @@ #ifdef __V3VEE__ -struct ide_cfg { - char pci[32]; - char southbridge[32]; -}; - -#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, - 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); - - - - - -int v3_ide_get_geometry(struct vm_device * ide_dev, int channel_num, int drive_num, +int v3_ide_get_geometry(void * ide_data, int channel_num, int drive_num, uint32_t * cylinders, uint32_t * heads, uint32_t * sectors);