[SOLVED]Which specification defines SATA signatures?

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
User avatar
tokusan
Member
Member
Posts: 29
Joined: Mon Feb 24, 2020 10:18 pm
Location: Japan

[SOLVED]Which specification defines SATA signatures?

Post by tokusan »

Hello, I'm reading AHCI article of this OSDev wiki.
In the code of "Detect attached SATA devices " section, SATA signatures are encoded as C macros. (https://wiki.osdev.org/AHCI#Detect_atta ... TA_devices)

Code: Select all

#define	SATA_SIG_ATA	0x00000101	// SATA drive
#define	SATA_SIG_ATAPI	0xEB140101	// SATAPI drive
#define	SATA_SIG_SEMB	0xC33C0101	// Enclosure management bridge
#define	SATA_SIG_PM	0x96690101	// Port multiplier
My question is: which specification defines these signatures? Or are these signatures the calculated values?

Thanks.
Last edited by tokusan on Thu Nov 19, 2020 5:24 am, edited 1 time in total.
Octocontrabass
Member
Member
Posts: 5568
Joined: Mon Mar 25, 2013 7:01 pm

Re: Which specification defines SATA signatures?

Post by Octocontrabass »

Code: Select all

#define	SATA_SIG_ATA	0x00000101	// SATA drive
#define	SATA_SIG_ATAPI	0xEB140101	// SATAPI drive
These two signatures are defined by the ATA Command Set specification. They're backwards-compatible with the IBM 5170 Fixed Disk and Diskette Drive Adapter and with SFF-8020i, respectively. They are not specific to SATA.

Code: Select all

#define	SATA_SIG_SEMB	0xC33C0101	// Enclosure management bridge
#define	SATA_SIG_PM	0x96690101	// Port multiplier
These two signatures are defined by the SATA specification, but they're also listed as "reserved for SATA" in the ATA Command Set spec.

The AHCI specification defines how the four bytes of each signature are combined into a single 32-bit value.
User avatar
tokusan
Member
Member
Posts: 29
Joined: Mon Feb 24, 2020 10:18 pm
Location: Japan

Re: Which specification defines SATA signatures?

Post by tokusan »

Thank you for your reply, but I couldn't find the definitions. Could you tell me which sections of these specs define these signatures?
Octocontrabass
Member
Member
Posts: 5568
Joined: Mon Mar 25, 2013 7:01 pm

Re: Which specification defines SATA signatures?

Post by Octocontrabass »

In the newest ATA Command Set draft I can find, the signatures are listed in table 319 on page 536.

The SATA specification is not available to the public, but I'm sure you can find a copy somewhere at a significant discount. In revision 3.2, the signatures are figure 398 on page 731 (with a typo!) and figure 416 on page 748. In revision 3.0, the signatures are figure 228 on page 539 and figure 246 on page 556.

In the current version of the AHCI specification, the signature mapping is described in section 3.3.9 on page 29.
User avatar
tokusan
Member
Member
Posts: 29
Joined: Mon Feb 24, 2020 10:18 pm
Location: Japan

Re: Which specification defines SATA signatures?

Post by tokusan »

Thank you! I found them!
Post Reply