Page 1 of 1

SATA IDENTIFY_DEVICE_DATA Structure 516 bytes

Posted: Thu Aug 08, 2013 5:26 am
by tsdnz
The _IDENTIFY_DEVICE_DATA structure from MS is 516 bytes long
http://msdn.microsoft.com/en-us/library ... s.85).aspx
It is a 32 bit program, so long = dword, otherwise long as qword is 544 bytes.

Any hints?

Re: SATA IDENTIFY_DEVICE_DATA Structure 516 bytes

Posted: Thu Aug 08, 2013 5:33 am
by tsdnz
Also, can I get it to put values into Max48BitLBA[0] & Max48BitLBA[1] ??

These are currently zero

Re: SATA IDENTIFY_DEVICE_DATA Structure 516 bytes

Posted: Thu Aug 08, 2013 11:53 am
by HugeCode
The _IDENTIFY_DEVICE_DATA structure from MS is 516 bytes long
How did you get that number?

Code: Select all

USHORT Signature  :8;
should actually take only one byte of memory.
Also, can I get it to put values into Max48BitLBA[0] & Max48BitLBA[1] ??
wiki:
Word 83: Bit 10 is set if the drive supports LBA48 mode.

Re: SATA IDENTIFY_DEVICE_DATA Structure 516 bytes

Posted: Thu Aug 08, 2013 4:23 pm
by tsdnz
How did you get that number?
516 = sizeof(IDENTIFY_DEVICE_DATA)
Code:
USHORT Signature :8;

should actually take only one byte of memory.
Looks to me like it is only one byte within the context.

Code: Select all

struct {
    byte NVCacheEstimatedTimeToSpinUpInSeconds;
    byte Reserved;
  } NVCacheOptions;
  word ReservedWord220[35];
  word Signature  :8;
  word CheckSum  :8;
Thanks for the wiki link, it has answered two other questions.

Re: SATA IDENTIFY_DEVICE_DATA Structure 516 bytes

Posted: Thu Aug 08, 2013 4:35 pm
by tsdnz
Hi, just thought about packed.

This makes it 512.
__attribute__ ((__packed__))