SCRx Port Register
SCR0~SCR4
寄存器,可判断端口Link状态,是否Link Up,端口速度等
系统内存分配
HBA寄存器指向系统内存空间,最多32个端口,每个端口包含Command List
和Received FIS Structure
,
Command List
最多32个,
Received FIS Structure
大小是256字节,
DMA setup FIS
被拷贝到DSFISPIO setup FIS
被拷贝到PSFISD2H Register FIS
被拷贝到RFISSet Device Bits FIS
被拷贝到SDBFIS- When an unknown FIS arrives from the device, the HBA copies it to the UFIS area in this structure, and
sets PxSERR.DIAG.F, which is reflected in PxIS.UFS when the FIS is posted to memory. A maximum of
64-bytes of an unknown FIS type may be sent to an HBA. If an unknown FIS arrives that is longer than
64-bytes, the FIS is considered illegal and is handled as described in section 6.1.2. While the length of
the FIS is unknown to the HBA, it is expected to be known by system software, and therefore only the
valid bytes shall be processed by software. The HBA is not required to tolerate receiving an unknown FIS
when the HBA is expecting a Data FIS from the device or when the HBA is about to transfer a Data FIS to
the device based on the command protocol being used.
Command List
的每一项Command Header
的结构,每一个Command Header
都指向一个Command Table
,PRDTL
指示Command Table
里有多少项(第二级了),16bit,最多65535个,W
指示数据方向,A
指示这是一个ATAPI命令,CFL
指示Command FIS
的长度,PRDBC
指示读写长度,32bit,所以单个Command Header
最大传输2GB数据,每页4KB,则最大0xFFFF000,256MB-4KB。
Command Table
结构如下,CFIS
长度由CFL
决定,最大64字节,ACMD
只有在ATAPI命令时才用到,PRDT
的每一项最大指向一片4MB的内存。