X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=blobdiff_plain;f=palacios%2Finclude%2Fdevices%2Fide.h;h=fd6cf0472e61419171c73d3cefd60674910b5df0;hb=66a1a4c7a9edcd7d8bc207aca093d694a6e6b5b2;hp=dd1b4b2d51860e16e8433a14641c51bfca8dde10;hpb=e70e95962c26832628d586e07f9cd1a2e1852d72;p=palacios.git diff --git a/palacios/include/devices/ide.h b/palacios/include/devices/ide.h index dd1b4b2..fd6cf04 100644 --- a/palacios/include/devices/ide.h +++ b/palacios/include/devices/ide.h @@ -34,14 +34,15 @@ * */ -#ifndef __IDE_H__ -#define __IDE_H__ - +#ifndef __DEVICES_IDE_H__ +#define __DEVICES_IDE_H__ #ifdef __V3VEE__ + + #include -#ifdef __V3_32BIT__ + typedef long off_t; typedef sint32_t ssize_t; typedef unsigned int rd_bool; @@ -49,7 +50,7 @@ typedef uchar_t Bit8u; typedef ushort_t Bit16u; typedef uint32_t Bit32u; typedef uint64_t Bit64u; -#endif + #define MAX_ATA_CHANNEL 4 @@ -132,7 +133,7 @@ struct cdrom_t { rd_bool ready; rd_bool locked; - struct cdrom_interface * cd; + struct cdrom_ops * cd; uint32_t capacity; int next_lba; @@ -204,6 +205,10 @@ struct drive_t { struct sense_info_t sense; struct atapi_t atapi; + + /* JRL */ + void * private_data; + Bit8u model_no[41]; }; @@ -239,3 +244,30 @@ struct ramdisk_t { #endif + +#if 0 + +// FLAT MODE +// Open a image. Returns non-negative if successful. +//int open (const char* pathname); + +// Open an image with specific flags. Returns non-negative if successful. +int rd_open (const char* pathname, int flags); + +// Close the image. +void rd_close (); + +// Position ourselves. Return the resulting offset from the +// beginning of the file. +off_t rd_lseek (off_t offset, int whence); + +// Read count bytes to the buffer buf. Return the number of +// bytes read (count). +ssize_t rd_read (void* buf, size_t count); + +// Write count bytes from buf. Return the number of bytes +// written (count). +ssize_t rd_write (const void* buf, size_t count); + + +#endif