|
|
1.1 ! root 1: /* ! 2: * Copyright (c) 1999 Apple Computer, Inc. All rights reserved. ! 3: * ! 4: * @APPLE_LICENSE_HEADER_START@ ! 5: * ! 6: * "Portions Copyright (c) 1999 Apple Computer, Inc. All Rights ! 7: * Reserved. This file contains Original Code and/or Modifications of ! 8: * Original Code as defined in and that are subject to the Apple Public ! 9: * Source License Version 1.0 (the 'License'). You may not use this file ! 10: * except in compliance with the License. Please obtain a copy of the ! 11: * License at http://www.apple.com/publicsource and read it before using ! 12: * this file. ! 13: * ! 14: * The Original Code and all software distributed under the License are ! 15: * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER ! 16: * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, ! 17: * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, ! 18: * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the ! 19: * License for the specific language governing rights and limitations ! 20: * under the License." ! 21: * ! 22: * @APPLE_LICENSE_HEADER_END@ ! 23: */ ! 24: /* ! 25: * Copyright 1997-1998 by Apple Computer, Inc., All rights reserved. ! 26: * Copyright 1994-1997 NeXT Software, Inc., All rights reserved. ! 27: * ! 28: * IdeCntCmds.m - IDE commands interface. ! 29: * ! 30: * HISTORY ! 31: * 17-July-1994 Rakesh Dubey at NeXT ! 32: * Created. ! 33: */ ! 34: ! 35: #import <driverkit/return.h> ! 36: #import <driverkit/driverTypes.h> ! 37: #import <driverkit/IODevice.h> ! 38: #import <driverkit/machine/directDevice.h> ! 39: #import <driverkit/generalFuncs.h> ! 40: #import "IdeCntPublic.h" ! 41: ! 42: ! 43: /* ! 44: * IDE commands to the controller. These methods are used by the Disk objects ! 45: * via the IdeSendCmd:ToDrive: interface. They also might be invoked by one ! 46: * of the internal methods. ! 47: */ ! 48: ! 49: @interface IdeController(Commands) ! 50: ! 51: /* ! 52: * The following commands use the revelant register values from ! 53: * ideRegsAddrs as inputs. In case of a command failure (i.e., when the ! 54: * returned value is IDER_CMD_ERROR, all registers are dumped into ! 55: * ideRegsAddrs structure. ! 56: */ ! 57: ! 58: - (ide_return_t) ideReadGetInfoCommon:(ideRegsVal_t *)ideRegs ! 59: client:(struct vm_map *)client ! 60: addr:(caddr_t)xferAddr ! 61: command:(unsigned)cmd; ! 62: ! 63: - (ide_return_t) ideReadMultiple:(ideRegsVal_t *)ideRegs ! 64: client:(struct vm_map *)client ! 65: addr:(caddr_t)xferAddr; ! 66: ! 67: - (ide_return_t) ideWrite:(ideRegsVal_t *)ideRegs ! 68: client:(struct vm_map *)client ! 69: addr:(caddr_t)addr; ! 70: ! 71: - (ide_return_t) ideWriteMultiple:(ideRegsVal_t *)ideRegs ! 72: client: (struct vm_map *)client ! 73: addr:(caddr_t)addr; ! 74: ! 75: - (ide_return_t) ideReadVerifySeekCommon:(ideRegsVal_t *)ideRegs ! 76: command:(unsigned)cmd; ! 77: ! 78: - (ide_return_t) performDMATest; ! 79: ! 80: /* ! 81: * ideDiagnose and ideSetParams:numHeads:ForDrive are also used by the ! 82: * controller class. ! 83: */ ! 84: ! 85: - (ide_return_t)ideDiagnose:(unsigned *)error; ! 86: ! 87: - (ide_return_t)ideSetParams:(unsigned)sectCnt numHeads:(unsigned)nHeads ! 88: ForDrive:(unsigned)drive; ! 89: ! 90: - (ide_return_t)ideSetDriveFeature:(unsigned char)feature ! 91: value:(unsigned char)val transferType:(ideTransferType_t)type; ! 92: ! 93: - (ide_return_t) ideRestore:(ideRegsVal_t *)ideRegs; ! 94: ! 95: - (ide_return_t) ideSetMultiSectorMode:(ideRegsVal_t *)ideRegs ! 96: numSectors:(unsigned char)nSectors; ! 97: ! 98: ! 99: - (ideRegsVal_t)logToPhys:(unsigned)block numOfBlocks:(unsigned)nblk; ! 100: ! 101: /* ! 102: * These methods are used by the IdeDisk class. ! 103: */ ! 104: - (IOReturn) ideExecuteCmd : (ideIoReq_t *)ideIoReq ! 105: ToDrive: (unsigned char) drive; ! 106: ! 107: @end
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.