How to access HBA_PORT PxCLB from User Space?
Posted: Fri Nov 22, 2013 3:36 am
Hi all,
I do need your help because of being totally stuck on the following issue. I have been writing Linux software that runs in User Space mode under root user. It works with AHCI controller and 4 SATA drives attached to it. I use Intel SATA AHCI Specification (http://www.intel.com/content/www/us/en/ ... ev1_3.html) and hints from http://wiki.osdev.org/AHCI.
I managed to map successfully physical address ABAR5 via mmap command. Now I have all 4 SATA ports and their live values of registers working well. For instance, PxTFD shows changes of status and error registers per each drive correctly.
PROBLEM:
Can't understand how I can map physical memory address from PxCLB. It's needed for sending Register FISes containing ATA Commands to HDD. I just can't access that memory anyhow. Tried to use mmap but all my mapping attemts were failed with MAP_FAILED (-1).
Any hints?
I do need your help because of being totally stuck on the following issue. I have been writing Linux software that runs in User Space mode under root user. It works with AHCI controller and 4 SATA drives attached to it. I use Intel SATA AHCI Specification (http://www.intel.com/content/www/us/en/ ... ev1_3.html) and hints from http://wiki.osdev.org/AHCI.
I managed to map successfully physical address ABAR5 via mmap command. Now I have all 4 SATA ports and their live values of registers working well. For instance, PxTFD shows changes of status and error registers per each drive correctly.
PROBLEM:
Can't understand how I can map physical memory address from PxCLB. It's needed for sending Register FISes containing ATA Commands to HDD. I just can't access that memory anyhow. Tried to use mmap but all my mapping attemts were failed with MAP_FAILED (-1).
Any hints?