Page 1 of 1
[SOLVED]Which specification defines SATA signatures?
Posted: Mon Nov 16, 2020 2:43 am
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.
Re: Which specification defines SATA signatures?
Posted: Mon Nov 16, 2020 4:23 pm
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.
Re: Which specification defines SATA signatures?
Posted: Wed Nov 18, 2020 7:20 am
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?
Re: Which specification defines SATA signatures?
Posted: Wed Nov 18, 2020 11:58 am
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.
Re: Which specification defines SATA signatures?
Posted: Thu Nov 19, 2020 5:24 am
by tokusan
Thank you! I found them!