AppleGenericPCATARoot.h [plain text]
#ifndef _APPLEGENERICPCATAROOT_H
#define _APPLEGENERICPCATAROOT_H
#include <IOKit/IOService.h>
#define PRI_CMD_ADDR 0x1f0
#define PRI_CTR_ADDR 0x3f4
#define SEC_CMD_ADDR 0x170
#define SEC_CTR_ADDR 0x374
#define PRI_ISA_IRQ 14
#define SEC_ISA_IRQ 15
#define PRI_CHANNEL_ID 0
#define SEC_CHANNEL_ID 1
class AppleGenericPCATARoot : public IOService
{
OSDeclareDefaultStructors( AppleGenericPCATARoot )
protected:
OSSet * fChannels;
OSSet * fOpenChannels;
IOService * fProvider;
virtual OSSet * createATAChannels( void );
virtual IORegistryEntry * getDTChannelEntry( int channelID );
virtual OSDictionary * createNativeModeChannelInfo( UInt32 ataChannel );
virtual OSDictionary * createLegacyModeChannelInfo( UInt32 ataChannel );
virtual OSDictionary * createChannelInfo( UInt32 ataChannel,
UInt16 commandPort,
UInt16 controlPort,
UInt8 interruptVector );
public:
virtual bool start( IOService * provider );
virtual void free();
virtual bool handleOpen( IOService * client,
IOOptionBits options,
void * arg );
virtual void handleClose( IOService * client,
IOOptionBits options );
virtual bool handleIsOpen( const IOService * client ) const;
};
class AppleGenericPCATAPCIRoot : public AppleGenericPCATARoot
{
OSDeclareDefaultStructors( AppleGenericPCATAPCIRoot )
public:
virtual IOService * probe( IOService * provider,
SInt32 * score );
};
#endif