00001
00024 #ifndef _TPL_DRV_DISK_H
00025 #define _TPL_DRV_DISK_H
00026
00027 #include <tpl_drv_common.h>
00028
00034 enum eTplDisk_IOCtl {
00040 DISK_IOCTL_GETBLOCKSIZE = 4,
00041
00049 DISK_IOCTL_SETCACHEREGION,
00050
00057 DISK_IOCTL_PRECACHE,
00058
00066 DISK_IOCTL_FLUSH
00067 };
00068
00072 typedef struct sTplDisk_CacheRegion
00073 {
00074 Uint64 Base;
00075 Uint64 Length;
00076
00084 Uint8 Flags;
00085 Uint8 Priority;
00086
00090 Uint16 CacheSize;
00091 } tTplDisk_CacheRegion;
00092
00096 enum eTplDisk_CacheProtocols
00097 {
00102 DISK_CACHEPROTO_DONTCACHE,
00107 DISK_CACHEPROTO_RECENTLYUSED,
00113 DISK_CACHEPROTO_FULLCACHE,
00114
00120 DISK_CACHEPROTO_EXPLICIT
00121 };
00122
00126 enum eTplDisk_CacheFlags
00127 {
00131 DISK_CACHEFLAG_WRITETHROUGH = 0x10
00132 };
00133
00137 #define DRV_DISK_IOCTLNAMES "get_block_size","set_cache_region","set_precache"
00138
00151 typedef Uint (*tDrvUtil_Callback)(Uint64 Address, Uint Count, void *Buffer, Uint Argument);
00152
00163 extern Uint64 DrvUtil_ReadBlock(Uint64 Start, Uint64 Length, void *Buffer,
00164 tDrvUtil_Callback ReadBlocks, Uint64 BlockSize, Uint Argument);
00176 extern Uint64 DrvUtil_WriteBlock(Uint64 Start, Uint64 Length, void *Buffer,
00177 tDrvUtil_Callback ReadBlocks, tDrvUtil_Callback WriteBlocks,
00178 Uint64 BlockSize, Uint Argument);
00179
00184 #endif