1

I am a hardware developer who is creating a AHCI interface for an embedded system. I would like to know where the PRD DMA data is created and allocated to the PRDs. As SATA uses DWORDS I am assuming that the data will be aligned to multiples of 4 bytes. I dont have much experience of Linux so would be grateful if someone can point me in the right direction.

Thanks

1 Answers1

1

ahci controller acts as a data movement engine between system memory and SATA devices. Take read operation for example, the rough sequence is as follows:

  • software "builds" command in memory(command header, command table, and corresponding PRDs)
  • software issues this command by configuring Port register, PxCI(and PxSACT if NCQ)
  • AHCI controller fetch and process this command(including data transfer...)
  • software interrupt service get called to process the command completion
  • software read the PRDs to get device content

PRD entries are created/allocated by software(driver) and can be located/retrieved via command table, that is, hardware can locate the command table then retrieve all PRD entries. Besides, ahci spec defines both the PRD address and byte count to be WORD-aligned(minimum)

liaoo
  • 193
  • 2
  • 15