0

I have an issue with initialising and running AHCI port on my devboard. Processor has SATA host controller with 2 ports implemented (port 0 & port 1). SSD drive w/ SATA interface is connected to the port 1.

According to "Serial ATA AHCI 1.3.1 Specification", chapter "10.3.1 Start (PxCMD.ST)" a bunch of conditions should be satisfied before setting PxCMD.ST to '1'. After setting this bit, PxCMD.CR should be set to indicate that port is ready and runs.

The problem is PxCMD.CR never comes to be set.

State before enabling PxCMD.ST:

  • port is in idle state, PxCMD.ST and PxCMD.CR are both '0'
  • FIS Receive Enable, PxCMD.FRE is '1'
  • Drive is connected to the port, PxSSTS = 0x00000133 (SSTS.IPM = 1, SSTS.SPD = 3, SSTS.DET = 3), PxTFD = 0x00000150 (TFD.STS.BSY = 0, TFD.STS.DRQ = 0, TFD.STS.ERR = 0)
  • PxCLB/PxCLBU are set with physical addresses to buffer and buffer is aligned. (1KB buffer, 1KB aligned)
  • PxCMD = 0x00404010 (PxCMD.FBSCP = 1 & PxCMD.FRE = 1)

After setting PxCMD.ST, PxCMD = 0x00404011 and PxCMD.CR stays '0'

  • PxSERR = 0 stay the same. ERR is cleaned in advance before setting PxCMD.FRE
  • PxSCTL = 0x00000330 (IPM = 3, SPD = 3, DET = 0)
  • PxTFD = 0x00000150 stay the same
  • PxSIG = 0x00000101. The reg has 0xFFFFFFFF when drive is not connected.


Assuming that PxSIG is set and PxSERR is '0' more likely that PLL for SATA HC is set correctly.

I have concerns about PxTFD.ERR = 1 (when drive is disconnected PxTFD has default 0x7F value and PxTFD.ERR = 0) but didn't find is it relevant or nor considering that still TFD.STS.ERR = 0


Any ideal what is missed?



PS: It has nothing to do w/ Linux.

user3124812
  • 1,861
  • 3
  • 18
  • 39
  • Maybe you should add the exact manufacturer/model/SoC model for your devboard... As this seems to be quite near to the hardware, this might be an important detail... – ppeterka May 18 '17 at 12:55
  • Its Xilinx Zynq UltraScale+ SoC and corresponding dev board 'ZCU102' (https://www.xilinx.com/products/boards-and-kits/ek-u1-zcu102-g.html) – user3124812 May 18 '17 at 22:39

0 Answers0