NOVA User-Level Environment
Version testbox/changed-memory-timing-317-g320d8b5
|
A SATA drive. More...
Public Member Functions | |
void | comreset () |
void | receive_fis (unsigned fislen, unsigned *fis) |
Receive a FIS from the controller. | |
bool | receive (MessageDiskCommit &msg) |
SataDrive (DBus< MessageDisk > &bus_disk, DBus< MessageMemRegion > *bus_memregion, DBus< MessageMem > *bus_mem, unsigned hostdisk, DiskParameter params) | |
Public Member Functions inherited from FisReceiver | |
FisReceiver () | |
void | set_peer (FisReceiver *peer) |
Public Member Functions inherited from StaticReceiver< SataDrive > | |
StaticReceiver () | |
Public Member Functions inherited from Device | |
void | debug_dump () |
Device (const char *debug_name) |
Private Member Functions | |
void | complete_command () |
A command is completed. | |
void | send_pio_setup_fis (unsigned short length, bool irq=false) |
void | send_dma_setup_fis (bool direction) |
void | build_identify_buffer (unsigned short *identify) |
We build the identify response in a buffer to allow to use push_data. | |
unsigned | push_data (unsigned length, void *data, bool &irq) |
Push data to the user by doing DMA via the PRDs. | |
unsigned | readwrite_sectors (bool read, bool lba48_ext) |
Read or write sectors from/to disk. | |
void | execute_command () |
Execute ATA commands. |
Private Attributes | |
DBus< MessageDisk > & | _bus_disk |
unsigned | _hostdisk |
unsigned char | _multiple |
unsigned | _regs [4] |
unsigned char | _ctrl |
unsigned char | _status |
unsigned char | _error |
unsigned | _dsf [7] |
unsigned | _splits [32] |
DiskParameter | _params |
DmaDescriptor | _dma [DMA_DESCRIPTORS] |
Static Private Attributes | |
static unsigned const | DMA_DESCRIPTORS = 64 |
Additional Inherited Members | |
Static Public Member Functions inherited from StaticReceiver< SataDrive > | |
static bool | receive_static (Device *o, M &msg) |
Protected Attributes inherited from FisReceiver | |
FisReceiver * | _peer |
A SATA drive.
It contains the register set of a SATA drive and speaks the SATA transport layer protocol with its FISes.
State: unstable Features: read,write,identify Missing: better error handling, many commands
|
inline |
|
inlineprivate |
We build the identify response in a buffer to allow to use push_data.
|
inlineprivate |
A command is completed.
We send a register d2h FIS to the host.
|
inline |
|
inlineprivate |
Execute ATA commands.
|
inlineprivate |
Push data to the user by doing DMA via the PRDs.
Return the number of byte written.
|
inlineprivate |
Read or write sectors from/to disk.
The new entries do not fit into DMA_DESCRIPTORS, do a single sector transfer This means we have to do a read in our own buffer and than copy them out
|
inline |
|
inlinevirtual |
Receive a FIS from the controller.
Implements FisReceiver.
|
inlineprivate |
|
inlineprivate |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
staticprivate |