搜尋此網誌

2011年12月7日 星期三

ATA-Physical sector size and Logical Sector Size(Identify)

IDENTIFY DEVICE - (ECh, PIO Data-in)

Word 106: Physical sector size / Logical Sector Size
Physical sector size / Logical Sector Size
  • [15] Shall be cleared to zero
  • [14] Shall be set to one
  • [13] 1 = Device has multiple logical sectors per physical sector.
  • [12] 1 = Device Logical Sector Longer than 256 Words
  • [11:4] Reserved
  • [3:0] 2X logical sectors per physical sector

Word 106: Physical sector size / Logical Sector Size
If bit 14 of word 106 is set to one and bit 15 of word 106 is cleared to zero, the contents of word 106 contain valid information.  If not, information is not valid in this word.
Bit 13 of word 106 shall be set to one to indicate that the device has more than one logical sector per physical sector.
Bit 12 of word 106 shall be set to 1 to indicate that the device has been formatted with a logical sector size larger than 256 words.  Bit 12 of word 106 shall be cleared to 0 to indicate that words 117-118 are invalid and that the logical sector size is 256 words. 
Bits (11:4) of word 106 are reserved.
Bits (3:0) of word 106 indicate the size of the device physical sectors in power of two logical sectors.
Examples:
Bits (3:0): 0 = 20 = 1 logical sector per physical sector
Bits (3:0): 1 = 21 = 2 logical sector per physical sector
Bits (3:0): 2 = 22 = 4 logical sector per physical sector
Bits (3:0): 3 = 23 = 8 logical sector per physical sector


Words 117-118: Logical Sector Size
  • Words per Logical Sector
Words 117,118 indicate the size of device logical sectors in words.  The value of words 117,118 shall be equal to or greater than 256.  The value in words 117,118 shall be valid when word 106 bit 12 is set to 1.  All logical sectors on a device shall be 117,118 words long.

2011年11月15日 星期二

WRITE DMA EXT (35h)

WRITE DMA EXT (35h)
Inputs:
Register
7
6
5
4
3
2
1
0
Features
Current
Reserved
Previous
Reserved
Sector Count
Current
Sector count (7:0)
Previous
Sector count (15:8)
LBA Low
Current
LBA (7:0)
Previous
LBA (31:24)
LBA Mid
Current
LBA (15:8)
Previous
LBA (39:32)
LBA High
Current
LBA (23:16)
Previous
LBA (47:40)
Device
obs
LBA
obs
DEV
Reserved
Command
35h

Normal Outputs:
Register
7
6
5
4
3
2
1
0
Error
na
Sector Count
HOB = 0
Reserved
HOB = 1
Reserved
LBA Low
HOB = 0
Reserved
HOB = 1
Reserved
LBA Mid
HOB = 0
Reserved
HOB = 1
Reserved
LBA High
HOB = 0
Reserved
HOB = 1
Reserved
Device
obs
na
obs
DEV
Reserved
Status
BSY
DRDY
DF
na
DRQ
na
na
ERR

Error Outputs:
Register
7
6
5
4
3
2
1
0
Error
ICRC
WP
MC
IDNF
MCR
ABRT
NM
obs
Sector Count
HOB = 0
Reserved
HOB = 1
Reserved
LBA Low
HOB = 0
LBA (7:0)
HOB = 1
LBA (31:24)
LBA Mid
HOB = 0
LBA (15:8)
HOB = 1
LBA (39:32)
LBA High
HOB = 0
LBA (23:16)
HOB = 1
LBA (47:40)
Device
obs
na
obs
DEV
Reserved
Status
BSY
DRDY
DF
na
DRQ
na
na
ERR

READ DMA EXT(25h)

READ DMA EXT(25h)
Inputs:
Register
7
6
5
4
3
2
1
0
Features
Current
Reserved
Previous
Reserved
Sector Count
Current
Sector count (7:0)
Previous
Sector count (15:8)
LBA Low
Current
LBA (7:0)
Previous
LBA (31:24)
LBA Mid
Current
LBA (15:8)
Previous
LBA (39:32)
LBA High
Current
LBA (23:16)
Previous
LBA (47:40)
Device
obs
LBA
obs
DEV
Reserved
Command
25h

Normal Outputs:
Register
7
6
5
4
3
2
1
0
Error
na
Sector Count
HOB = 0
Reserved
HOB = 1
Reserved
LBA Low
HOB = 0
Reserved
HOB = 1
Reserved
LBA Mid
HOB = 0
Reserved
HOB = 1
Reserved
LBA High
HOB = 0
Reserved
HOB = 1
Reserved
Device
obs
na
obs
DEV
Reserved
Status
BSY
DRDY
DF
na
DRQ
na
na
ERR

Error Outputs:
Register
7
6
5
4
3
2
1
0
Error
ICRC
UNC
MC
IDNF
MCR
ABRT
NM
obs
Sector Count
HOB = 0
Reserved
HOB = 1
Reserved
LBA Low
HOB = 0
LBA (7:0)
HOB = 1
LBA (31:24)
LBA Mid
HOB = 0
LBA (15:8)
HOB = 1
LBA (39:32)
LBA High
HOB = 0
LBA (23:16)
HOB = 1
LBA (47:40)
Device
obs
na
obs
DEV
Reserved
Status
BSY
DRDY
DF
na
DRQ
na
na
ERR