|
|
1.1 ! root 1: /* ! 2: * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. ! 3: * ! 4: * @APPLE_LICENSE_HEADER_START@ ! 5: * ! 6: * The contents of this file constitute Original Code as defined in and ! 7: * are subject to the Apple Public Source License Version 1.1 (the ! 8: * "License"). You may not use this file except in compliance with the ! 9: * License. Please obtain a copy of the License at ! 10: * http://www.apple.com/publicsource and read it before using this file. ! 11: * ! 12: * This Original Code and all software distributed under the License are ! 13: * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER ! 14: * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, ! 15: * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, ! 16: * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the ! 17: * License for the specific language governing rights and limitations ! 18: * under the License. ! 19: * ! 20: * @APPLE_LICENSE_HEADER_END@ ! 21: */ ! 22: /* ! 23: * Copyright (c) 1999 Apple Computer, Inc. All rights reserved. ! 24: * ! 25: * HISTORY ! 26: * ! 27: */ ! 28: ! 29: ! 30: #ifndef _IOKIT_IOFWDCLPROGRAM_H ! 31: #define _IOKIT_IOFWDCLPROGRAM_H ! 32: ! 33: #include <libkern/c++/OSObject.h> ! 34: #include <IOKit/firewire/IOFWIsoch.h> ! 35: #include <IOKit/firewire/IOFireWireBus.h> ! 36: #include <IOKit/IOMemoryCursor.h> ! 37: ! 38: class IODCLProgram : public OSObject ! 39: { ! 40: OSDeclareAbstractStructors(IODCLProgram) ! 41: ! 42: protected: ! 43: SInt32 fDCLTaskToKernel; ! 44: SInt32 fDataTaskToKernel; ! 45: IOByteCount fDataBase; ! 46: IOMemoryDescriptor *fDCLDesc; ! 47: IOMemoryDescriptor *fDataDesc; ! 48: IOMemoryCursor *fDataCursor; ! 49: IOFireWireBus::CallUserProc * fCallUser; ! 50: void *fCallRefCon; // Refcon for user call ! 51: ! 52: DCLCommandPtr convertDCLPtrToKernel(DCLCommandPtr dcl) ! 53: {if (dcl) return (DCLCommandPtr)((UInt32)dcl + fDCLTaskToKernel); else return dcl;}; ! 54: ! 55: DCLCommandPtr convertDCLPtrFromKernel(DCLCommandPtr dcl) ! 56: {if (dcl) return (DCLCommandPtr)((UInt32)dcl - fDCLTaskToKernel); else return dcl;}; ! 57: ! 58: void * convertDataPtrToKernel(void *ptr) ! 59: {if (ptr) return (void *)((UInt32)ptr + fDataTaskToKernel); else return ptr;}; ! 60: ! 61: UInt32 getPhysicalSegs(void *addr, IOByteCount len, ! 62: IOMemoryCursor::PhysicalSegment segs[], UInt32 maxSegs); ! 63: ! 64: void dumpDCL(DCLCommand *op); ! 65: ! 66: virtual void free(); ! 67: ! 68: public: ! 69: ! 70: virtual bool init(IOFireWireBus::DCLTaskInfo *info=NULL); ! 71: virtual IOReturn allocateHW(IOFWSpeed speed, UInt32 chan) = 0; ! 72: virtual IOReturn releaseHW() = 0; ! 73: virtual IOReturn compile(IOFWSpeed speed, UInt32 chan) = 0; ! 74: virtual IOReturn notify(UInt32 notificationType, ! 75: DCLCommandPtr *dclCommandList, UInt32 numDCLCommands) = 0; ! 76: virtual IOReturn start() = 0; ! 77: virtual void stop() = 0; ! 78: ! 79: }; ! 80: ! 81: #endif /* ! _IOKIT_IOFWDCLPROGRAM_H */ ! 82:
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.