Serial ATA spec questions

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
8infy
Member
Member
Posts: 185
Joined: Sun Apr 05, 2020 1:01 pm

Serial ATA spec questions

Post by 8infy »

Hi, I'm reading both Serial ATA and AHCI specifications and they both talk about the "Command register" and the "Device control register"
values, and I even see the osdev tutorial writing magic numbers into those fields in FIS. However, maybe I'm blind but I can't find a
single description about their layouts and bits. Both specs say something like clear ASD bit in the control register but don't actually say
what that bit is :D Could you tell me where I would look for that information and what those registers actually are?
foliagecanine
Member
Member
Posts: 148
Joined: Sun Aug 23, 2020 4:35 pm

Re: Serial ATA spec questions

Post by foliagecanine »

What about the ATA/ATAPI spec?

Device Control Register is discussed in ATA/ATAPI-7 Vol. 1 Section 5.7
Command Register is discussed in ATA/ATAPI-7 Vol. 1 Section 5.3

A Ctrl+F search doesn't turn up anything for "ASD" in the AHCI spec at all. Where do you see "ASD?"
My OS: TritiumOS
https://github.com/foliagecanine/tritium-os
void warranty(laptop_t laptop) { if (laptop.broken) return laptop; }
I don't get it: Why's the warranty void?
8infy
Member
Member
Posts: 185
Joined: Sun Apr 05, 2020 1:01 pm

Re: Serial ATA spec questions

Post by 8infy »

foliagecanine wrote:What about the ATA/ATAPI spec?

Device Control Register is discussed in ATA/ATAPI-7 Vol. 1 Section 5.7
Command Register is discussed in ATA/ATAPI-7 Vol. 1 Section 5.3

A Ctrl+F search doesn't turn up anything for "ASD" in the AHCI spec at all. Where do you see "ASD?"
Thanks, "ASD" was just a random example of some bit flag the spec would tell you to set/clear and then never explain what that bit is :)

UPD: Awesome, looks like this is the spec I was looking for for about 4 hours today, cool. This fills in most of the blanks =D>
I wish AHCI spec would say something like "for more information refer to THIS_SPEC"
xeyes
Member
Member
Posts: 212
Joined: Mon Dec 07, 2020 8:09 am

Re: Serial ATA spec questions

Post by xeyes »

8infy wrote: I wish AHCI spec would say something like "for more information refer to THIS_SPEC"
There's people wishing to pick up some $ selling the specs and memberships.

I hope they won't close the loophole of 'drafts'
Post Reply