I have a question regarding the AHCI spec:
Is the variable pDmaXferCnt
in the port used when the transfer is a DMA write or read?
The description in the spec seems to indicate that it isn't, but the PRDs are used instead.
But how does the HBA know how much data is to be sent or received to/from a SATA device?
This information will be available in the sector count of a H2D FIS, but unless I have overlooked it there doesn't seem to be a register of variable that holds this value.
The DX:transmit
state also seems to indicate that pDmaXferCnt
will have a set value, yet I can’t see where it would be set for a DMA read/write operation.
Thanks