SATA IDENTIFY_DEVICE_DATA Structure 516 bytes

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
tsdnz
Member
Member
Posts: 333
Joined: Sun Jun 16, 2013 4:09 am

SATA IDENTIFY_DEVICE_DATA Structure 516 bytes

Post 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?
tsdnz
Member
Member
Posts: 333
Joined: Sun Jun 16, 2013 4:09 am

Re: SATA IDENTIFY_DEVICE_DATA Structure 516 bytes

Post by tsdnz »

Also, can I get it to put values into Max48BitLBA[0] & Max48BitLBA[1] ??

These are currently zero
HugeCode
Member
Member
Posts: 112
Joined: Mon Dec 17, 2012 9:12 am

Re: SATA IDENTIFY_DEVICE_DATA Structure 516 bytes

Post 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.
tsdnz
Member
Member
Posts: 333
Joined: Sun Jun 16, 2013 4:09 am

Re: SATA IDENTIFY_DEVICE_DATA Structure 516 bytes

Post 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.
tsdnz
Member
Member
Posts: 333
Joined: Sun Jun 16, 2013 4:09 am

Re: SATA IDENTIFY_DEVICE_DATA Structure 516 bytes

Post by tsdnz »

Hi, just thought about packed.

This makes it 512.
__attribute__ ((__packed__))
Post Reply