--- Cannot embed stylesheet: [Errno 2] No such file or directory: '../../../aros.css' --->
| `AROS_LH1(ULONG,`_ |
AROS_LHA(struct IORequest *, io, A1),
Return the fixed value zero. This entrypoint does not search for or read a rigid disk block.
io - Unused. May be NULL.
Always zero. The value does not establish that a rigid disk block exists at logical block zero.
No device I/O is issued. The request and its error field are left unchanged. This entrypoint provides no discovery status.
| `AROS_LH1(ULONG,`_ |
AROS_LHA(struct IORequest *, io, A1),
Return the sector-size exponent stored for the opened unit.
io - Request for a successfully opened ata.device unit.
Both io and io_Unit must be valid. Keep the unit open
throughout the call.
The stored base-two exponent of the sector size in bytes, returned as ULONG. For example, 9 denotes 512-byte sectors and 11 denotes 2048-byte sectors. This is not a byte count.
The call reads the cached unit value without issuing device I/O or checking media presence. It leaves the request and its error field unchanged. The request and unit pointers are not validated. No error result is provided for an unopened, closed or invalid request.
| `--background--`_ | aoHidd_ATAUnit_ConfiguredModes | aoHidd_ATAUnit_MultiSector | aoHidd_ATAUnit_XferModes |
Unit class is private to ata.device. Instances of this class represent devices connected to IDE buses, and can be used to obtain information about these devices.
[..G], ULONG
Tells which transfer modes are currently configured for use with the drive. The returned value is a bitmask of the same flags as for aoHidd_ATAUnit_XferModes attribute.
Currently ata.device does not distinguish between PIO modes and does not set any bit for them. Absence of DMA mode flags automatically means that PIO mode is used.
[..G], UBYTE
Tells maximum allowed number of sectors for multisector transfer.
[..G], ULONG
Tells which transfer modes are supported by this device. The returned value is a bitwise combination of the following flags (see include/hidd/ata.h): AF_XFER_PIO(x) - PIO mode number x (0 - 4) AF_XFER_MDMA(x) - multiword DMA mode number x (0 - 2) AF_XFER_UDMA(x) - Ultra DMA mode number x (0 - 6) AF_XFER_48BIT - LBA48 block addressing AF_XFER_RWMILTI - Multisector PIO AF_XFER_PACKET - ATAPI AF_XFER_LBA - LBA28 block addressing AF_XFER_PIO32 - 32-bit PIO
32-bit PIO is actually controller's property and not drive's property. Because of this AF_XFER_PIO32 flag can never be returned by this attribute. Nevertheless, it can be returned by aoHidd_ATAUnit_ConfiguredModes attribute.
This class serves as a base class for implementing IDE (ATA) bus drivers. One particularity of this class is that IDE bus is very speed-critical. At the other hand, the driver implements very lowlevel operations which are called quite often. OOP_DoMethod() call is not fast enough, and in order to circumvent this limitation, additionally to normal OOP API IDE bus drivers offer two additional non-standard interfaces. Internally they are implemented as library-alike function table plus driver-specific data. For the purpose of some performance optimizations the function table is private to ata.device and managed entirely by the base class. Driver classes have access only to data portion. These interfaces are documented below.
DMA interface is optional, and is needed in order to support DMA data transfers. Function table for the interface consists of the following functions: BOOL dma_Setup(void *obj, APTR buffer, IPTR size, BOOL read) - Prepare the controller to DMA data transfer. The last argument is TRUE for read operation and FALSE for write. The function should return TRUE for success or FALSE for failure. VOID dma_Start(void *obj) - Start DMA transfer. VOID dma_End(void *obj, APTR buffer, IPTR size, BOOL read) - End DMA transfer and perform post-transfer cleanup of the given region. ULONG dma_Result(void *obj) - Get resulting status of the operation. The function should return 0 for successful completion or error code to be passed up to ata.device caller in io_Result field of the IORequest.
PIO interface is responsible for accessing I/O registers on the IDE bus, as well as performing PIO-mode 16- and 32-bit data transfers. This interface is mandatory and must be implemented by the driver, however some functions are optional. They can be either omitted entirely from the function table, or set to NULL pointers. Control functions table for the interface consists of the following functions (listed in their order in the array): VOID ata_out(void *obj, UBYTE val, UWORD offset) - Write byte into primary register bank with the given offset. UBYTE ata_in(void *obj, UWORD offset) - Read byte from primary register bank with the given offset. VOID ata_out_alt(void *obj, UBYTE val, UWORD offset) - Write byte into alternate register bank with the given offset. This function is optional. UBYTE ata_in_alt(void *obj, UWORD offset) - Read byte from alternate register bank with the given offset. This function is optional. Transfer functions table for the interface consists of the following functions (listed in their order in the array): VOID ata_outsw(void *obj, APTR address, ULONG count) - Perform 16-bit PIO data write operation from the given memory region of the given size. VOID ata_insw(void *obj, APTR address, ULONG count) - Perform 16-bit PIO data read operation into the given memory region of the given size. VOID ata_outsl(void *obj, APTR address, ULONG count) - Perform 32-bit PIO data write operation from the given memory region of the given size. This function is optional. UBYTE ata_insl(void *obj, APTR address, ULONG count) - Perform 32-bit PIO data read operation into the given memory region of the given size. This function is optional.
[I..], APTR *
Specifies control functions table for building PIO interface object. The function table is an array of function pointers terminated by -1 value. The terminator must be present for purpose of binary compatibility with future extensions.
This function table is mandatory to be implemented by the driver.
[..G], BOOL
Tells whether the bus driver implements moHidd_ATABus_SetXferMode method.
Current version of ata.device does not use this attribute, and it is considered reserved.
[I..], BOOL
Specifies size of DMA interface data structure.
[I..], APTR *
Specifies function table for building DMA interface object. If not supplied, the bus is considered not DMA-capable.
[..G], OOP_Object *
Returns a pointer to OOP object of private unit class, representing a master drive on the bus, or NULL if there's no master device.
[I..], BOOL
Specifies size of PIO interface data structure.
[I..], APTR *
Specifies transfers function table for building PIO interface object. The function table is an array of function pointers terminated by -1 value. The terminator must be present for purpose of binary compatibility with future extensions.
This function table is mandatory to be implemented by the driver.
[..G], OOP_Object *
Returns a pointer to OOP object of private unit class, representing a slave drive on the bus, or NULL if there's no master device.
[.SG], BOOL
When queried, tells whether the bus supports 32-bit PIO data transfers. When set, enables or disables 32-bit mode for PIO data transfers.
[..G], BOOL
Tells whether the bus currently uses 80-conductor cable.
This attribute actually makes difference only for DMA modes. If your bus driver returns FALSE, ata.device will not use modes higher than UDMA2 on the bus.
[..G], BOOL
Tells whether the bus supports DMA transfers.
[..G], BOOL
Tells whether the bus supports alternate registers bank (ata_AltControl and ata_AltStatus).
APTR OOP_DoMethod(OOP_Object *obj, struct pHidd_ATABus_GetDMAInterface *Msg); APTR HIDD_ATABus_GetDMAInterface(void);
Instantiates encapsulated DMA interface object and returns its pointer.
None
A pointer to opaque DMA interface object or NULL upon failure or if DMA is not supported by this bus.
This method should be overloaded by driver subclasses in order to initialize data portion of the interface object.
APTR OOP_DoMethod(OOP_Object *obj, struct pHidd_ATABus_GetPIOInterface *Msg); APTR HIDD_ATABus_GetPIOInterface(void);
Instantiates encapsulated PIO interface object and returns its pointer.
None
A pointer to opaque PIO interface object or NULL in case of failure.
This method should be overloaded by driver subclasses in order to initialize data portion of the interface object.
APTR OOP_DoMethod(OOP_Object *obj, struct pHidd_ATABus_SetXferMode *Msg); APTR HIDD_ATABus_SetXferMode(UBYTE unit, ata_XferMode mode);
Sets the desired transfer mode for the given drive on the bus controller.
unit - drive number (0 for master and 1 for slave) mode - Mode number (see hidd/ata.h)
TRUE if successful or FALSE if the desired mode is not supported by the hardware.
The default implementation is provided for drivers not supporting DMA and always returns FALSE if the caller attempts to set any of DMA modes.
Current version of ata.device does not use this method, and it is considered reserved.
APTR OOP_DoMethod(OOP_Object *obj, struct pHidd_ATABus_Shutdown *Msg); APTR HIDD_ATABus_Shutdown(void);
Instantly shutdown all activity on the bus.
None
None
This method is called by ata.device during system reset handler execution.