X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=blobdiff_plain;f=palacios%2Finclude%2Fdevices%2Fide.h;h=b778f1efa334ebabf4bf431308f943684d9a139f;hb=6cbdc3c14d417e26bf6dfdf08e19e09db44fdf51;hp=e0356b215f62e5648064a36aa1306e36a1f68868;hpb=4659d019e2f65b9397e2289a9add28a3adf47cf8;p=palacios.git diff --git a/palacios/include/devices/ide.h b/palacios/include/devices/ide.h index e0356b2..b778f1e 100644 --- a/palacios/include/devices/ide.h +++ b/palacios/include/devices/ide.h @@ -21,27 +21,12 @@ #define __DEVICES_IDE_H__ #ifdef __V3VEE__ -#include +#include -#define ATAPI_BLOCK_SIZE 2048 -#define IDE_SECTOR_SIZE 512 - -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)(uint8_t * buf, int count, int lba, void * private_data); - -}; - - -struct v3_ide_hd_ops { - uint32_t (*get_capacity)(void * private_data); - // Reads always operate on 2048 byte blocks - int (*read)(uint8_t * buf, int count, int lba, void * private_data); - +struct ide_cfg { + char pci[32]; + char southbridge[32]; }; @@ -49,21 +34,23 @@ 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); -struct vm_device * v3_create_ide(); +int v3_ide_get_geometry(struct vm_device * ide_dev, int channel_num, int drive_num, + uint32_t * cylinders, uint32_t * heads, uint32_t * sectors); + #endif // ! __V3VEE__