AHCI Real Hardware problem

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
AlfredTH
Posts: 9
Joined: Tue Mar 05, 2019 12:44 pm

AHCI Real Hardware problem

Post by AlfredTH »

Hey, thanks a lot for your awesome work, OSDev !

I'm following https://wiki.osdev.org/AHCI, and I'm trying to read disk sectors now, and I understand the given code at 70%.
Paging is enabled and I identity-mapped all these AHCI spaces as I needed, fixing a lot of the page faults I was initially getting.
On Qemu I can and I'm very happy with the result, I was able to read 3 sectors without a problem;
however on real hardware (my Toshiba Satellite Pro NB10-a-125), about the command slots which are gathered at this line (in find_cmdslot):

Code: Select all

uint32_t slots = (port->sact | port->ci);
This combination returns 0, which means there are no available command slots on my AHCI Sata hardware (PCI Class+Interface mode: 1, 6, 1 = AHCI SATA).
Obviously this prevent any disk read, this is annoying.

I have no idea how to understand why aren't there any slot available...
Can someone help me on this ?
Post Reply