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的內存。