X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=blobdiff_plain;f=palacios%2Finclude%2Fdevices%2Fide.h;h=03d8a48086a132b621fab8ec021e13d840a7a53e;hb=e0519b6111165e0d99987d7f852875366c41bfd9;hp=d35dfe887cf8eb72535994a4456d24abc477b547;hpb=6eecf583b522147ef13faabb634562f6f23bb712;p=palacios.git diff --git a/palacios/include/devices/ide.h b/palacios/include/devices/ide.h index d35dfe8..03d8a48 100644 --- a/palacios/include/devices/ide.h +++ b/palacios/include/devices/ide.h @@ -1,11 +1,48 @@ -#ifndef __IDE_H__ -#define __IDE_H__ - +/* + * Copyright (C) 2002 MandrakeSoft S.A. + * + * MandrakeSoft S.A. + * 43, rue d'Aboukir + * 75002 Paris - France + * http://www.linux-mandrake.com/ + * http://www.mandrakesoft.com/ + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * Major modifications made for the V3VEE project + * + * The V3VEE Project is a joint project between Northwestern University + * and the University of New Mexico. You can find out more at + * http://www.v3vee.org + * + * Copyright (c) 2008, Zheng Cui + * Copyright (c) 2008, Jack Lange + * Copyright (c) 2008, The V3VEE Project + * All rights reserved for original changes + * + */ + +#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; @@ -13,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 @@ -96,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; @@ -168,6 +205,9 @@ struct drive_t { struct sense_info_t sense; struct atapi_t atapi; + /* JRL */ + void * private_data; + Bit8u model_no[41]; }; @@ -203,3 +243,29 @@ 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