Shared_Includes/structures/ATA_ATAPI.INC
2024-12-24 01:33:34 +10:00

651 lines
17 KiB
Plaintext

;ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ;
STRUCT _ATA_IDENTIFY_DEVICE_DATA ;word | byte
;Reserved1 bit 0
;Retired3 bit 1
;ResponseIncomplete bit 2
;Retired2 bit 3..5
;FixedDevice bit 6
;RemovableMedia bit 7
;Retired1 bit 8..14
;DeviceType bit 15
.GeneralConfiguration WORD ; 0 0
.NumCylinders WORD ; 1 2
.SpecificConfiguration WORD ; 2 4
.NumHeads WORD ; 3 6
.NumUnformattedBytesPerTrack WORD ; 4 8
.NumUnformattedBytesPerSector WORD ; 5 10
.NumSectorsPerTrack WORD ; 6 12
.VendorUnique7 BLOCK 6 ; 7 14
.SerialNumber BLOCK 20 ; 10 20
.BufferType WORD ; 20 40
.BufferSizeMul_512 WORD ; 21 42
.Obsolete22 WORD ; 22 44
.FirmwareRevision BLOCK 8 ; 23 46
.ModelNumber BLOCK 40 ; 27 54
.MaximumBlockTransfer BYTE ; 47 94
.VendorUnique2 BYTE ; 95
;FeatureSupported bit 0
;Reserved bit 1..15
.TrustedComputing WORD ; 48 96
;CurrentLongPhysicalSectorAlignment bit 0..1
;Reserved bit 2..7
.Capabilities_low BYTE ; 49 98
;DMAsupported bit 8
;LBAsupported bit 9
;IORDYdisable bit 10
;IORDYsupported bit 11
;Obsolete1 bit 12
;OverlapOperationSupported bit 13
;CommandQueuingSupported bit 14
;InterleavedDMAsupported bit 15
.Capabilities_high BYTE ; 99
.Reserved50 WORD ; 50 100
.ObsoleteWords51 WORD ; 51 102
.ObsoleteWords52 WORD ; 52 104
;FieldsInWords54_58Valid bit 0
;FieldsInWords64_70Valid bit 1
;FieldsInWord88_Valid bit 2
;Reserved bit 3..15
.TranslationFieldsValid WORD ; 53 106
.NumberOfCurrentCylinders_low BYTE ; 54 108
.NumberOfCurrentCylinders_high BYTE ; 109
.NumberOfCurrentHeads_low BYTE ; 55 110
.NumberOfCurrentHeads_high BYTE ; 111
.CurrentSectorsPerTrack_low BYTE ; 56 112
.CurrentSectorsPerTrack_high BYTE ; 113
.CurrentSectorCapacity DWORD ; 57 114
;SectorsPerInt bit 0..7
;MultiSectorSettingValid bit 8
;Reserved bit 9..11
;SanitizeFeatureSupported bit 12
;CryptoScrambleExtCommandSupported bit 13
;OverwriteExtCommandSupported bit 14
;BlockEraseExtCommandSupported bit 15
.CurrentMultiSectorSetting WORD ; 59 118
.UserAddressableSectors DWORD ; 60 120
;TransferModesSupported bit 0..7
;TransferModeActive bit 8..15
.SingleWordDMA WORD ; 62 124
;TransferModesSupported bit 0..7
;TransferModeActive bit 8..15
.MultiWordDMA WORD ; 63 126
.AdvancedPIOModes BYTE ; 64 128
.ReservedByte129 BYTE ; 129
.MinimumMWXferCycleTime WORD ; 65 130
.RecommendedMWXferCycleTime WORD ; 66 132
.MinimumPIOCycleTime WORD ; 67 134
.MinimumPIOCycleTimeIORDY WORD ; 68 136
;ZonedCapabilities bit 0..1
;NonVolatileWriteCache bit 2
;ExtendedUserAddressableSectors bit 3
;DeviceEncryptsAllUserData bit 4
;ReadZeroAfterTrim bit 5
;Optional28BitCommands bit 6
;IEEE1667 bit 7
.AdditionalSupported_low BYTE ; 69 138
;DownloadMicrocodeDma bit 8
;SetMaxSetPasswordUnlockDMA bit 9
;WriteBufferDMA bit 10
;ReadBufferDMA bit 11
;DeviceConfigIdentifySetDMA bit 12
;LPSAERC bit 13
;DeterministicReadAfterTrim bit 14
;CFastSpec bit 15
.AdditionalSupported_high BYTE ; 139
.ReservedWords70 BLOCK 10 ; 70 140
.QueueDepth WORD ; 75 150
.SerialAtaCapabilities DWORD ; 76 152
.SerialAtaFeaturesSupported WORD ; 78 156
.SerialAtaFeaturesEnabled WORD ; 79 158
.MajorRevision WORD ; 80 160
.MinorRevision WORD ; 81 162
;SmartCommands bit 0
;SecurityMode bit 1
;RemovableMediaFeature bit 2
;PowerManagement bit 3
;Reserved1 bit 4
;WriteCache bit 5
;LookAhead bit 6
;ReleaseInterrupt bit 7
;ServiceInterrupt bit 8
;DeviceReset bit 9
;HostProtectedArea bit 10
;Obsolete1 bit 11
;WriteBuffer bit 12
;ReadBuffer bit 13
;Nop bit 14
;Obsolete2 bit 15
;DownloadMicrocode bit 16
;DmaQueued bit 17
;Cfa bit 18
;AdvancedPm bit 19
;Msn bit 20
;PowerUpInStandby bit 21
;ManualPowerUp bit 22
;Reserved2 bit 23
;SetMax bit 24
;Acoustics bit 25
;BigLba bit 26
;DeviceConfigOverlay bit 27
;FlushCache bit 28
;FlushCacheExt bit 29
;WordValid83 bit 30..31
;SmartErrorLog bit 32
;SmartSelfTest bit 33
;MediaSerialNumber bit 34
;MediaCardPassThrough bit 35
;StreamingFeature bit 36
;GpLogging bit 37
;WriteFua bit 38
;WriteQueuedFua bit 39
;WWN64Bit bit 40
;URGReadStream bit 41
;URGWriteStream bit 42
;ReservedForTechReport bit 43.44
;IdleWithUnloadFeature bit 45
;WordValid bit 46..47
.CommandSetSupport BLOCK 6 ; 82 164
;SmartCommands bit 0
;SecurityMode bit 1
;RemovableMediaFeature bit 2
;PowerManagement bit 3
;Reserved1 bit 4
;WriteCache bit 5
;LookAhead bit 6
;ReleaseInterrupt bit 7
;ServiceInterrupt bit 8
;DeviceReset bit 9
;HostProtectedArea bit 10
;Obsolete1 bit 11
;WriteBuffer bit 12
;ReadBuffer bit 13
;Nop bit 14
;Obsolete2 bit 15
;DownloadMicrocode bit 16
;DmaQueued bit 17
;Cfa bit 18
;AdvancedPm bit 19
;Msn bit 20
;PowerUpInStandby bit 21
;ManualPowerUp bit 22
;Reserved2 bit 23
;SetMax bit 24
;Acoustics bit 25
;BigLba bit 26
;DeviceConfigOverlay bit 27
;FlushCache bit 28
;FlushCacheExt bit 29
;Resrved3 bit 30
;Words119_120Valid bit 31
;SmartErrorLog bit 32
;SmartSelfTest bit 33
;MediaSerialNumber bit 34
;MediaCardPassThrough bit 35
;StreamingFeature bit 36
;GpLogging bit 37
;WriteFua bit 38
;WriteQueuedFua bit 39
;WWN64Bit bit 40
;URGReadStream bit 41
;URGWriteStream bit 42
;ReservedForTechReport bit 43..44
;IdleWithUnloadFeature bit 45
;Reserved4 bit 46..47
.CommandSetActive BLOCK 6 ; 85 170
.UltraDMASupport BYTE ; 88 176
.UltraDMAActive BYTE ; 177
;USHORT TimeRequired : 15
;USHORT ExtendedTimeReported : 1
.NormalSecurityEraseUnit WORD ; 89 178
;USHORT TimeRequired : 15
;USHORT ExtendedTimeReported : 1
.EnhancedSecurityEraseUnit WORD ; 90 180
.CurrentAPMLevel BYTE ; 91 182
.ReservedByte183 BYTE ; 183
.MasterPasswordID WORD ; 92 184
.HardwareResetResult WORD ; 93 186
.CurrentAcousticValue BYTE ; 94 188
.RecommendedAcousticValue BYTE ; 189
.StreamMinRequestSize WORD ; 95 190
.StreamingTransferTimeDMA WORD ; 96 192
.StreamingAccessLatencyDMAPIO WORD ; 97 194
.StreamingPerfGranularity DWORD ; 98 196
.Max48BitLBA BLOCK 8 ; 100 200
.StreamingTransferTime WORD ; 104 208
.DsmCap WORD ; 105 210
;LogicalSectorsPerPhysicalSector : 4
;Reserved0 : 8
;LogicalSectorLongerThan256Words : 1
;MultipleLogicalSectorsPerPhysicalSector : 1
;Reserved1 : 2
.PhysicalLogicalSectorSize WORD ; 106 212
.InterSeekDelay WORD ; 107 214
.WorldWideName BLOCK 8 ; 108 216
.ReservedForWorldWideName128 BLOCK 8 ; 112 224
.ReservedForTlcTechnicalReport WORD ; 116 232
.WordsPerLogicalSector DWORD ; 117 234
;ReservedForDrqTechnicalReport : 1
;WriteReadVerify : 1
;WriteUncorrectableExt : 1
;ReadWriteLogDmaExt : 1
;DownloadMicrocodeMode3 : 1
;FreefallControl : 1
;SenseDataReporting : 1
;ExtendedPowerConditions : 1
;Reserved0 : 6
;WordValid : 2
.CommandSetSupportExt WORD ; 119 238
;ReservedForDrqTechnicalReport : 1
;WriteReadVerify : 1
;WriteUncorrectableExt : 1
;ReadWriteLogDmaExt : 1
;DownloadMicrocodeMode3 : 1
;FreefallControl : 1
;SenseDataReporting : 1
;ExtendedPowerConditions : 1
;Reserved0 : 6
;Reserved1 : 2
.CommandSetActiveExt WORD ; 120 240
.Reserved121 BLOCK 12 ; 121 242
.MsnSupport BYTE ; 127 254
.ReservedByte255 BYTE ; 255
;SecuritySupported : 1
;SecurityEnabled : 1
;SecurityLocked : 1
;SecurityFrozen : 1
;SecurityCountExpired : 1
;EnhancedSecurityEraseSupported : 1
;Reserved0 : 2
;SecurityLevel : 1
;Reserved1 : 7
.SecurityStatus WORD ; 128 256
.ReservedBlock129 BLOCK 62 ; 129 258
;MaximumCurrentInMA : 12
;CfaPowerMode1Disabled : 1
;CfaPowerMode1Required : 1
;Reserved0 : 1
;Word160Supported : 1
.CfaPowerMode1 WORD ; 160 320
.ReservedBlock161 BLOCK 14 ; 161 322
.NominalFormFactor WORD ; 168 336
;SupportsTrim : 1
;Reserved0 : 15
.DataSetManagementFeature WORD ; 169 338
.AdditionalProductID BLOCK 8 ; 170 340
.ReservedForCfaWord174 DWORD ; 174 348
.CurrentMediaSerialNumber BLOCK 60," " ; 176 352
;Supported : 1
;Reserved0 : 1
;WriteSameSuported : 1
;ErrorRecoveryControlSupported : 1
;FeatureControlSuported : 1
;DataTablesSuported : 1
;Reserved1 : 6
;VendorSpecific : 4
.SCTCommandTransport WORD ; 206 412
.ReservedWord207 DWORD ; 207 414
;AlignmentOfLogicalWithinPhysical : 14
;Word209Supported : 1
;Reserved0 : 1
.BlockAlignment WORD ; 209 418
.WriteReadVerifySectorCountMode3Only DWORD ; 210 420
.WriteReadVerifySectorCountMode2Only DWORD ; 212 424
;.NVCachePowerModeEnabled : 1
;.Reserved0 : 3
;.NVCacheFeatureSetEnabled : 1
;.Reserved1 : 3
;.NVCachePowerModeVersion : 4
;.NVCacheFeatureSetVersion : 4
.NVCacheCapabilities WORD ; 214 428
.NVCacheSizeLSW WORD ; 215 430
.NVCacheSizeMSW WORD ; 216 432
.NominalMediaRotationRate WORD ; 217 434
.ReservedWord218 WORD ; 218 436
.NVCacheEstimatedTimeToSpinUpInSeconds BYTE ; 219 438
.NVCacheOptionsReserved BYTE ; 439
.WriteReadVerifySectorCountMode BYTE ; 220 440
.Reserved441 BLOCK 3,0 ; 441
;MajorVersion : 12
;TransportType : 4
.TransportMajorVersion WORD ; 222 444
.TransportMinorVersion WORD ; 223 446
.ReservedWord224 BLOCK 12,0 ; 224 448
.ExtendedNumberOfUserAddressableSectors BLOCK 8,0 ; 230 460
.MinBlocksPerDownloadMicrocodeMode03 WORD ; 234 468
.MaxBlocksPerDownloadMicrocodeMode03 WORD ; 235 470
.ReservedWord236 BLOCK 38,0 ; 236 472
.Signature BYTE ; 255 510
.CheckSum BYTE ; 511
ENDS
;ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ;
;ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ;
/*
General configuration bit-significant information:
15:14 10 = ATAPI device
11 = Reserved
13 Reserved
12:8 Field indicates command packet set used by device
7 Obsolete
6:5 00 = Device shall set DRQ to one within 3 ms of receiving PACKET command.
01 = Obsolete.
10 = Device shall set DRQ to one within 50 ?s of receiving PACKET command.
11 = Reserved
4:3 Reserved
2 Incomplete response
1:0 00 = 12 byte command packet
01 = 16 byte command packet
1x = Reserved
*/
STRUCT _ATAPI_IDENTIFY_DEVICE_DATA ;word | byte
;PacketCommandSize bit 0..1
;ResponseIncomplete bit 2
;Reserved bit 3..4
;DRQlag bit 5..6
;Obsolete bit 7
;DeviceType bit 8..12
;Reserved bit 13
;DeviceInterface bit 14..15
.GeneralConfiguration WORD ; 0 0
.ReservedWord1 WORD ; 1 2
.SpecificConfiguration WORD ; 2 4
.ReservedWord3 BLOCK 14,0 ; 3 6
.SerialNumber BLOCK 20 ; 10 20
.ReservedWord20 BLOCK 6,0 ; 20 40
.FirmwareRevision BLOCK 8 ; 23 46
.ModelNumber BLOCK 40 ; 27 54
.ReservedWord47 DWORD ; 47 94
;
;
.Capabilities_low BYTE ; 49 98
;DMAsupported bit 8
;Obsolete bit 9
;IORDYdisable bit 10
;IORDYsupported bit 11
.Capabilities_high BYTE ; 99
.Capabilities_2_low BYTE ; 50 100
.Capabilities_2_high BYTE ; 101
.ObsoleteWords51 WORD ; 51 102
.ObsoleteWords52 WORD ; 52 104
;Obsolete bit 0
;FieldsInWords64_70Valid bit 1
;FieldsInWord88_Valid bit 2
;Reserved bit 3..15
.TranslationFieldsValid WORD ; 53 106
.ReservedWord54 BLOCK 16,0 ; 54 108
;TransferModesSupported bit 0..10
;Reserved bit 11..14
;DMA_Dir_Bit_Required_in_Packed bit 15
.DirModeDMA WORD ; 62 124
;TransferModesSupported bit 0..7
;TransferModeActive bit 8..15
.MultiWordDMA WORD ; 63 126
.AdvancedPIOModes WORD ; 64 128
.MinimumMWXferCycleTime WORD ; 65 130
.RecommendedMWXferCycleTime WORD ; 66 132
.MinimumPIOCycleTime WORD ; 67 134
.MinimumPIOCycleTimeIORDY WORD ; 68 136
.ReservedWords69 BLOCK 14 ; 69 138
.SerialAtaCapabilities DWORD ; 76 152
.SerialAtaFeaturesSupported WORD ; 78 156
.SerialAtaFeaturesEnabled WORD ; 79 158
.MajorRevision WORD ; 80 160
.MinorRevision WORD ; 81 162
;SmartCommands bit 0
;SecurityMode bit 1
;RemovableMediaFeature bit 2 = 1
;PowerManagement bit 3
;PackedFeatures bit 4 = 1
;WriteCache bit 5
;LookAhead bit 6
;ReleaseInterrupt bit 7
;ServiceInterrupt bit 8
;DeviceReset bit 9
;HostProtectedArea bit 10
;Obsolete1 bit 11
;WriteBuffer bit 12
;ReadBuffer bit 13
;NopCmd bit 14
;Obsolete bit 15
;DownloadMicrocode bit 16
;Reserved bit 17..19
;Msn bit 20
;PowerUpInStandby bit 21
;ManualPowerUp bit 22
;Reserved bit 23
;SetMax bit 24
;Acoustics bit 25
;Reserved bit 26
;DeviceConfigOverlay bit 27
;FlushCache bit 28
;Reserved bit 29
;Obsolete bit 30..31
;Reserved bit 32..36
;GpLogging bit 37
;Reserved bit 38..45
;Obsolete bit 46..47
.CommandSetSupport BLOCK 6 ; 82 164
;SmartCommands bit 0
;SecurityMode bit 1
;RemovableMediaFeature bit 2
;PowerManagement bit 3
;Reserved1 bit 4
;WriteCache bit 5
;LookAhead bit 6
;ReleaseInterrupt bit 7
;ServiceInterrupt bit 8
;DeviceReset bit 9
;HostProtectedArea bit 10
;Obsolete1 bit 11
;WriteBuffer bit 12
;ReadBuffer bit 13
;Nop bit 14
;Obsolete2 bit 15
;DownloadMicrocode bit 16
;DmaQueued bit 17
;Cfa bit 18
;AdvancedPm bit 19
;Msn bit 20
;PowerUpInStandby bit 21
;ManualPowerUp bit 22
;Reserved2 bit 23
;SetMax bit 24
;Acoustics bit 25
;BigLba bit 26
;DeviceConfigOverlay bit 27
;FlushCache bit 28
;FlushCacheExt bit 29
;Resrved3 bit 30
;Words119_120Valid bit 31
;SmartErrorLog bit 32
;SmartSelfTest bit 33
;MediaSerialNumber bit 34
;MediaCardPassThrough bit 35
;StreamingFeature bit 36
;GpLogging bit 37
;WriteFua bit 38
;WriteQueuedFua bit 39
;WWN64Bit bit 40
;URGReadStream bit 41
;URGWriteStream bit 42
;ReservedForTechReport bit 43..44
;IdleWithUnloadFeature bit 45
;Reserved4 bit 46..47
.CommandSetActive BLOCK 6 ; 85 170
.UltraDMASupport BYTE ; 88 176
.UltraDMAActive BYTE ; 177
.NormalSecurityEraseUnit WORD ; 89 178
.EnhancedSecurityEraseUnit WORD ; 90 180
.CurrentAPMLevel BYTE ; 91 182
.ReservedByte183 BYTE ; 183
.MasterPasswordID WORD ; 92 184
.HardwareResetResult WORD ; 93 186
.ReservedWord94 BLOCK 28,0 ; 94 188
.WorldWideName BLOCK 8 ; 108 216
.ReservedForWorldWideName128 BLOCK 8 ; 112 224
.ReservedBlock116 BLOCK 18 ; 116 232
.AtapiByteCountZeroBehavior WORD ; 125 250
.Reserved126 DWORD ; 126 252
;SecuritySupported : 1
;SecurityEnabled : 1
;SecurityLocked : 1
;SecurityFrozen : 1
;SecurityCountExpired : 1
;EnhancedSecurityEraseSupported : 1
;Reserved0 : 2
;SecurityLevel : 1
;Reserved1 : 7
.SecurityStatus WORD ; 128 256
.ReservedBlock129 BLOCK 62 ; 129 258
;MaximumCurrentInMA : 12
;CfaPowerMode1Disabled : 1
;CfaPowerMode1Required : 1
;Reserved0 : 1
;Word160Supported : 1
.CfaReserved BLOCK 32,0 ; 160 320
.reserved176 BLOCK 92,0 ; 176 352
;MajorVersion : 12
;TransportType : 4
.TransportMajorVersion WORD ; 222 444
.TransportMinorVersion WORD ; 223 446
.Reserved224 BLOCK 62,0 ; 224 448
.Signature BYTE ; 255 510
.CheckSum BYTE ; 511
ENDS
;ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ;
;ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ;
STRUCT _ATAPI_INQUIRY_DATA ; size 254 bytes
.peripheral_type BYTE 0 ; #00 0
.removable_media BYTE #80 ; #01 1 ; bit7=1 - removable
.version BYTE 0 ; #02 2
.response_data_format BYTE 0 ; #03 3
.addnl_length BYTE ; #04 4 ;Numbers of bytes following this one.
.reserved BLOCK 3,0 ; #05 5
.vendor_info BLOCK 8," " ; #08 8
.product_id BLOCK 16," " ; #10 16
.product_revision_level DWORD 0 ; #20 32
.vendor_specific_1 BLOCK 20,0 ; #24 36
.reserved_block BLOCK 40,0 ; #38 56
.vendor_specific_2 BLOCK 158,0; ; #60 96
ENDS ; #FE 254
;ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ;
;ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ;
/*
// Identify device type via INQUIRY data.
//
switch (Idata.peripheral_type & 0x1f) {
case 0x00:
//
// Magnetic Disk
//
MediaInfo->DeviceType = IdeLS120;
MediaInfo->MediaPresent = FALSE;
MediaInfo->LastBlock = 0;
MediaInfo->BlockSize = 0x200;
MediaInfo2->InterfaceType = MSG_ATAPI_DP;
MediaInfo2->RemovableMedia = TRUE;
MediaInfo2->MediaPresent = FALSE;
MediaInfo2->ReadOnly = FALSE;
MediaInfo2->BlockSize = 0x200;
MediaInfo2->LastBlock = 0;
break;
case 0x05:
//
// CD-ROM
//
MediaInfo->DeviceType = IdeCDROM;
MediaInfo->MediaPresent = FALSE;
MediaInfo->LastBlock = 0;
MediaInfo->BlockSize = 0x800;
MediaInfo2->InterfaceType = MSG_ATAPI_DP;
MediaInfo2->RemovableMedia = TRUE;
MediaInfo2->MediaPresent = FALSE;
MediaInfo2->ReadOnly = TRUE;
MediaInfo2->BlockSize = 0x200;
MediaInfo2->LastBlock = 0;
break;
default:
return EFI_UNSUPPORTED;
}
*/
;ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ;
/*
ATAPI_PeripheralDevice:
Table 30 - Peripheral Device Types
Code
Description
00h Direct-access device (e.g. magnetic disk)
01h - 04h Reserved
05h CD-ROM device
06h Reserved
07h Optical memory device (eg. some optical disks)
08h - 1Eh Reserved
1Fh Unknown or no device type
The Peripheral Device Type shall be set to 05h to indicate a CD-ROM Device.
*/