2017-05-19 20:28:49 +01:00
|
|
|
// /***************************************************************************
|
2020-02-27 12:31:23 +00:00
|
|
|
// Aaru Data Preservation Suite
|
2015-10-16 01:55:55 +01:00
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
|
//
|
2016-07-28 18:13:49 +01:00
|
|
|
// Filename : Identify.cs
|
|
|
|
|
// Author(s) : Natalia Portillo <claunia@claunia.com>
|
2015-10-16 01:55:55 +01:00
|
|
|
//
|
2016-07-28 18:13:49 +01:00
|
|
|
// Component : Device structures decoders.
|
2015-10-16 01:55:55 +01:00
|
|
|
//
|
|
|
|
|
// --[ Description ] ----------------------------------------------------------
|
|
|
|
|
//
|
2016-07-28 18:13:49 +01:00
|
|
|
// Decodes ATA IDENTIFY DEVICE response.
|
2015-10-16 01:55:55 +01:00
|
|
|
//
|
|
|
|
|
// --[ License ] --------------------------------------------------------------
|
|
|
|
|
//
|
2016-07-28 18:13:49 +01:00
|
|
|
// This library is free software; you can redistribute it and/or modify
|
|
|
|
|
// it under the terms of the GNU Lesser General Public License as
|
|
|
|
|
// published by the Free Software Foundation; either version 2.1 of the
|
2015-10-16 01:55:55 +01:00
|
|
|
// License, or (at your option) any later version.
|
|
|
|
|
//
|
2016-07-28 18:13:49 +01:00
|
|
|
// This library is distributed in the hope that it will be useful, but
|
|
|
|
|
// WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
|
// Lesser General Public License for more details.
|
2015-10-16 01:55:55 +01:00
|
|
|
//
|
2016-07-28 18:13:49 +01:00
|
|
|
// You should have received a copy of the GNU Lesser General Public
|
|
|
|
|
// License along with this library; if not, see <http://www.gnu.org/licenses/>.
|
2015-10-16 01:55:55 +01:00
|
|
|
//
|
|
|
|
|
// ----------------------------------------------------------------------------
|
2022-02-18 10:02:39 +00:00
|
|
|
// Copyright © 2011-2022 Natalia Portillo
|
2015-10-16 01:55:55 +01:00
|
|
|
// ****************************************************************************/
|
2016-07-28 18:13:49 +01:00
|
|
|
|
2022-03-07 07:36:42 +00:00
|
|
|
namespace Aaru.Decoders.ATA;
|
|
|
|
|
|
2015-10-16 01:55:55 +01:00
|
|
|
using System;
|
2017-12-22 02:04:18 +00:00
|
|
|
using System.Diagnostics.CodeAnalysis;
|
2015-10-17 01:26:17 +01:00
|
|
|
using System.Text;
|
2020-02-27 00:33:24 +00:00
|
|
|
using Aaru.CommonTypes.Structs.Devices.SCSI;
|
2015-10-16 01:55:55 +01:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
// Information from following standards:
|
|
|
|
|
// T10-791D rev. 4c (ATA)
|
|
|
|
|
// T10-948D rev. 4c (ATA-2)
|
|
|
|
|
// T13-1153D rev. 18 (ATA/ATAPI-4)
|
|
|
|
|
// T13-1321D rev. 3 (ATA/ATAPI-5)
|
|
|
|
|
// T13-1410D rev. 3b (ATA/ATAPI-6)
|
|
|
|
|
// T13-1532D rev. 4b (ATA/ATAPI-7)
|
|
|
|
|
// T13-1699D rev. 3f (ATA8-ACS)
|
|
|
|
|
// T13-1699D rev. 4a (ATA8-ACS)
|
|
|
|
|
// T13-2015D rev. 2 (ACS-2)
|
|
|
|
|
// T13-2161D rev. 5 (ACS-3)
|
|
|
|
|
// CF+ & CF Specification rev. 1.4 (CFA)
|
|
|
|
|
[SuppressMessage("ReSharper", "InconsistentNaming"), SuppressMessage("ReSharper", "MemberCanBeInternal"),
|
|
|
|
|
SuppressMessage("ReSharper", "MemberCanBePrivate.Global")]
|
|
|
|
|
public static class Identify
|
2015-10-16 01:55:55 +01:00
|
|
|
{
|
2022-03-06 13:29:37 +00:00
|
|
|
public static string Prettify(byte[] IdentifyDeviceResponse)
|
2015-10-16 01:55:55 +01:00
|
|
|
{
|
2022-03-06 13:29:37 +00:00
|
|
|
if(IdentifyDeviceResponse.Length != 512)
|
|
|
|
|
return null;
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
CommonTypes.Structs.Devices.ATA.Identify.IdentifyDevice? decoded =
|
|
|
|
|
CommonTypes.Structs.Devices.ATA.Identify.Decode(IdentifyDeviceResponse);
|
2015-10-17 01:26:17 +01:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
return Prettify(decoded);
|
|
|
|
|
}
|
2015-10-17 01:26:17 +01:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
public static string Prettify(CommonTypes.Structs.Devices.ATA.Identify.IdentifyDevice? IdentifyDeviceResponse)
|
|
|
|
|
{
|
|
|
|
|
if(IdentifyDeviceResponse == null)
|
|
|
|
|
return null;
|
2015-10-17 01:26:17 +01:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
var sb = new StringBuilder();
|
2015-10-17 01:26:17 +01:00
|
|
|
|
2022-03-07 07:36:42 +00:00
|
|
|
var atapi = false;
|
|
|
|
|
var cfa = false;
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
CommonTypes.Structs.Devices.ATA.Identify.IdentifyDevice ATAID = IdentifyDeviceResponse.Value;
|
2015-10-17 01:26:17 +01:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(ATAID.GeneralConfiguration.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.GeneralConfigurationBit.
|
|
|
|
|
NonMagnetic))
|
|
|
|
|
if((ushort)ATAID.GeneralConfiguration != 0x848A)
|
|
|
|
|
atapi = true;
|
2019-11-25 00:54:38 +00:00
|
|
|
else
|
2022-03-06 13:29:37 +00:00
|
|
|
cfa = true;
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(atapi)
|
|
|
|
|
sb.AppendLine("ATAPI device");
|
|
|
|
|
else if(cfa)
|
|
|
|
|
sb.AppendLine("CompactFlash device");
|
|
|
|
|
else
|
|
|
|
|
sb.AppendLine("ATA device");
|
2015-10-17 01:26:17 +01:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(ATAID.Model != "")
|
|
|
|
|
sb.AppendFormat("Model: {0}", ATAID.Model).AppendLine();
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(ATAID.FirmwareRevision != "")
|
|
|
|
|
sb.AppendFormat("Firmware revision: {0}", ATAID.FirmwareRevision).AppendLine();
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(ATAID.SerialNumber != "")
|
|
|
|
|
sb.AppendFormat("Serial #: {0}", ATAID.SerialNumber).AppendLine();
|
2015-10-17 01:26:17 +01:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(ATAID.AdditionalPID != "")
|
|
|
|
|
sb.AppendFormat("Additional product ID: {0}", ATAID.AdditionalPID).AppendLine();
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(ATAID.CommandSet3.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CommandSetBit3.MustBeSet) &&
|
|
|
|
|
!ATAID.CommandSet3.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CommandSetBit3.MustBeClear))
|
|
|
|
|
{
|
2022-03-07 07:36:42 +00:00
|
|
|
if(ATAID.EnabledCommandSet3.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CommandSetBit3.MediaSerial))
|
2022-03-06 13:29:37 +00:00
|
|
|
{
|
|
|
|
|
if(ATAID.MediaManufacturer != "")
|
|
|
|
|
sb.AppendFormat("Media manufacturer: {0}", ATAID.MediaManufacturer).AppendLine();
|
2015-10-17 01:26:17 +01:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(ATAID.MediaSerial != "")
|
|
|
|
|
sb.AppendFormat("Media serial #: {0}", ATAID.MediaSerial).AppendLine();
|
2015-10-17 01:26:17 +01:00
|
|
|
}
|
|
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(ATAID.EnabledCommandSet3.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CommandSetBit3.WWN))
|
|
|
|
|
sb.AppendFormat("World Wide Name: {0:X16}", ATAID.WWN).AppendLine();
|
|
|
|
|
}
|
2015-10-17 01:26:17 +01:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
bool ata1 = false, ata2 = false, ata3 = false, ata4 = false, ata5 = false, ata6 = false, ata7 = false,
|
|
|
|
|
acs = false, acs2 = false, acs3 = false, acs4 = false;
|
2015-10-17 01:26:17 +01:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if((ushort)ATAID.MajorVersion == 0x0000 ||
|
|
|
|
|
(ushort)ATAID.MajorVersion == 0xFFFF)
|
|
|
|
|
{
|
|
|
|
|
// Obsolete in ATA-2, if present, device supports ATA-1
|
|
|
|
|
ata1 |=
|
|
|
|
|
ATAID.GeneralConfiguration.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.GeneralConfigurationBit.
|
|
|
|
|
FastIDE) ||
|
|
|
|
|
ATAID.GeneralConfiguration.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.GeneralConfigurationBit.
|
|
|
|
|
SlowIDE) ||
|
|
|
|
|
ATAID.GeneralConfiguration.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.GeneralConfigurationBit.
|
|
|
|
|
UltraFastIDE);
|
|
|
|
|
|
|
|
|
|
ata2 |= ATAID.ExtendedIdentify.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.ExtendedIdentifyBit.
|
|
|
|
|
Words64to70Valid);
|
|
|
|
|
|
|
|
|
|
if(!ata1 &&
|
|
|
|
|
!ata2 &&
|
|
|
|
|
!atapi &&
|
|
|
|
|
!cfa)
|
|
|
|
|
ata2 = true;
|
|
|
|
|
|
|
|
|
|
ata4 |= atapi;
|
|
|
|
|
ata3 |= cfa;
|
|
|
|
|
|
|
|
|
|
if(cfa && ata1)
|
|
|
|
|
ata1 = false;
|
|
|
|
|
|
|
|
|
|
if(cfa && ata2)
|
|
|
|
|
ata2 = false;
|
|
|
|
|
|
|
|
|
|
ata5 |= ATAID.Signature == 0xA5;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
ata1 |= ATAID.MajorVersion.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.MajorVersionBit.Ata1);
|
|
|
|
|
ata2 |= ATAID.MajorVersion.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.MajorVersionBit.Ata2);
|
|
|
|
|
ata3 |= ATAID.MajorVersion.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.MajorVersionBit.Ata3);
|
|
|
|
|
ata4 |= ATAID.MajorVersion.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.MajorVersionBit.AtaAtapi4);
|
|
|
|
|
ata5 |= ATAID.MajorVersion.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.MajorVersionBit.AtaAtapi5);
|
|
|
|
|
ata6 |= ATAID.MajorVersion.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.MajorVersionBit.AtaAtapi6);
|
|
|
|
|
ata7 |= ATAID.MajorVersion.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.MajorVersionBit.AtaAtapi7);
|
|
|
|
|
acs |= ATAID.MajorVersion.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.MajorVersionBit.Ata8ACS);
|
|
|
|
|
acs2 |= ATAID.MajorVersion.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.MajorVersionBit.ACS2);
|
|
|
|
|
acs3 |= ATAID.MajorVersion.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.MajorVersionBit.ACS3);
|
|
|
|
|
acs4 |= ATAID.MajorVersion.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.MajorVersionBit.ACS4);
|
|
|
|
|
}
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-07 07:36:42 +00:00
|
|
|
var maxatalevel = 0;
|
|
|
|
|
var minatalevel = 255;
|
2022-03-06 13:29:37 +00:00
|
|
|
sb.Append("Supported ATA versions: ");
|
2018-06-22 08:08:38 +01:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(ata1)
|
|
|
|
|
{
|
|
|
|
|
sb.Append("ATA-1 ");
|
|
|
|
|
maxatalevel = 1;
|
|
|
|
|
minatalevel = 1;
|
|
|
|
|
}
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(ata2)
|
|
|
|
|
{
|
|
|
|
|
sb.Append("ATA-2 ");
|
|
|
|
|
maxatalevel = 2;
|
2018-06-22 08:08:38 +01:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(minatalevel > 2)
|
|
|
|
|
minatalevel = 2;
|
|
|
|
|
}
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(ata3)
|
|
|
|
|
{
|
|
|
|
|
sb.Append("ATA-3 ");
|
|
|
|
|
maxatalevel = 3;
|
2018-06-22 08:08:38 +01:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(minatalevel > 3)
|
|
|
|
|
minatalevel = 3;
|
|
|
|
|
}
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(ata4)
|
|
|
|
|
{
|
|
|
|
|
sb.Append("ATA/ATAPI-4 ");
|
|
|
|
|
maxatalevel = 4;
|
2018-06-22 08:08:38 +01:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(minatalevel > 4)
|
|
|
|
|
minatalevel = 4;
|
|
|
|
|
}
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(ata5)
|
|
|
|
|
{
|
|
|
|
|
sb.Append("ATA/ATAPI-5 ");
|
|
|
|
|
maxatalevel = 5;
|
2018-06-22 08:08:38 +01:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(minatalevel > 5)
|
|
|
|
|
minatalevel = 5;
|
|
|
|
|
}
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(ata6)
|
|
|
|
|
{
|
|
|
|
|
sb.Append("ATA/ATAPI-6 ");
|
|
|
|
|
maxatalevel = 6;
|
2018-06-22 08:08:38 +01:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(minatalevel > 6)
|
|
|
|
|
minatalevel = 6;
|
|
|
|
|
}
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(ata7)
|
|
|
|
|
{
|
|
|
|
|
sb.Append("ATA/ATAPI-7 ");
|
|
|
|
|
maxatalevel = 7;
|
2018-06-22 08:08:38 +01:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(minatalevel > 7)
|
|
|
|
|
minatalevel = 7;
|
|
|
|
|
}
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(acs)
|
|
|
|
|
{
|
|
|
|
|
sb.Append("ATA8-ACS ");
|
|
|
|
|
maxatalevel = 8;
|
2018-06-22 08:08:38 +01:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(minatalevel > 8)
|
|
|
|
|
minatalevel = 8;
|
|
|
|
|
}
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(acs2)
|
|
|
|
|
{
|
|
|
|
|
sb.Append("ATA8-ACS2 ");
|
|
|
|
|
maxatalevel = 9;
|
2018-06-22 08:08:38 +01:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(minatalevel > 9)
|
|
|
|
|
minatalevel = 9;
|
|
|
|
|
}
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(acs3)
|
|
|
|
|
{
|
|
|
|
|
sb.Append("ATA8-ACS3 ");
|
|
|
|
|
maxatalevel = 10;
|
|
|
|
|
|
|
|
|
|
if(minatalevel > 10)
|
|
|
|
|
minatalevel = 10;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if(acs4)
|
|
|
|
|
{
|
|
|
|
|
sb.Append("ATA8-ACS4 ");
|
|
|
|
|
maxatalevel = 11;
|
|
|
|
|
|
|
|
|
|
if(minatalevel > 11)
|
|
|
|
|
minatalevel = 11;
|
|
|
|
|
}
|
2018-06-22 08:08:38 +01:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
sb.AppendLine();
|
|
|
|
|
|
|
|
|
|
sb.Append("Maximum ATA revision supported: ");
|
|
|
|
|
|
|
|
|
|
if(maxatalevel >= 3)
|
|
|
|
|
switch(ATAID.MinorVersion)
|
2015-10-17 01:26:17 +01:00
|
|
|
{
|
2022-03-06 13:29:37 +00:00
|
|
|
case 0x0000:
|
|
|
|
|
case 0xFFFF:
|
|
|
|
|
sb.AppendLine("Minor ATA version not specified");
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
break;
|
|
|
|
|
case 0x0001:
|
|
|
|
|
sb.AppendLine("ATA (ATA-1) X3T9.2 781D prior to revision 4");
|
2018-06-22 08:08:38 +01:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
break;
|
|
|
|
|
case 0x0002:
|
|
|
|
|
sb.AppendLine("ATA-1 published, ANSI X3.221-1994");
|
2015-10-17 01:26:17 +01:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
break;
|
|
|
|
|
case 0x0003:
|
|
|
|
|
sb.AppendLine("ATA (ATA-1) X3T9.2 781D revision 4");
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
break;
|
|
|
|
|
case 0x0004:
|
|
|
|
|
sb.AppendLine("ATA-2 published, ANSI X3.279-1996");
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
break;
|
|
|
|
|
case 0x0005:
|
|
|
|
|
sb.AppendLine("ATA-2 X3T10 948D prior to revision 2k");
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
break;
|
|
|
|
|
case 0x0006:
|
|
|
|
|
sb.AppendLine("ATA-3 X3T10 2008D revision 1");
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
break;
|
|
|
|
|
case 0x0007:
|
|
|
|
|
sb.AppendLine("ATA-2 X3T10 948D revision 2k");
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
break;
|
|
|
|
|
case 0x0008:
|
|
|
|
|
sb.AppendLine("ATA-3 X3T10 2008D revision 0");
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
break;
|
|
|
|
|
case 0x0009:
|
|
|
|
|
sb.AppendLine("ATA-2 X3T10 948D revision 3");
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
break;
|
|
|
|
|
case 0x000A:
|
|
|
|
|
sb.AppendLine("ATA-3 published, ANSI X3.298-1997");
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
break;
|
|
|
|
|
case 0x000B:
|
|
|
|
|
sb.AppendLine("ATA-3 X3T10 2008D revision 6");
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
break;
|
|
|
|
|
case 0x000C:
|
|
|
|
|
sb.AppendLine("ATA-3 X3T13 2008D revision 7");
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
break;
|
|
|
|
|
case 0x000D:
|
|
|
|
|
sb.AppendLine("ATA/ATAPI-4 X3T13 1153D revision 6");
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
break;
|
|
|
|
|
case 0x000E:
|
|
|
|
|
sb.AppendLine("ATA/ATAPI-4 T13 1153D revision 13");
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
break;
|
|
|
|
|
case 0x000F:
|
|
|
|
|
sb.AppendLine("ATA/ATAPI-4 X3T13 1153D revision 7");
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
break;
|
|
|
|
|
case 0x0010:
|
|
|
|
|
sb.AppendLine("ATA/ATAPI-4 T13 1153D revision 18");
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
break;
|
|
|
|
|
case 0x0011:
|
|
|
|
|
sb.AppendLine("ATA/ATAPI-4 T13 1153D revision 15");
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
break;
|
|
|
|
|
case 0x0012:
|
|
|
|
|
sb.AppendLine("ATA/ATAPI-4 published, ANSI INCITS 317-1998");
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
break;
|
|
|
|
|
case 0x0013:
|
|
|
|
|
sb.AppendLine("ATA/ATAPI-5 T13 1321D revision 3");
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
break;
|
|
|
|
|
case 0x0014:
|
|
|
|
|
sb.AppendLine("ATA/ATAPI-4 T13 1153D revision 14");
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
break;
|
|
|
|
|
case 0x0015:
|
|
|
|
|
sb.AppendLine("ATA/ATAPI-5 T13 1321D revision 1");
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
break;
|
|
|
|
|
case 0x0016:
|
|
|
|
|
sb.AppendLine("ATA/ATAPI-5 published, ANSI INCITS 340-2000");
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
break;
|
|
|
|
|
case 0x0017:
|
|
|
|
|
sb.AppendLine("ATA/ATAPI-4 T13 1153D revision 17");
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
break;
|
|
|
|
|
case 0x0018:
|
|
|
|
|
sb.AppendLine("ATA/ATAPI-6 T13 1410D revision 0");
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
break;
|
|
|
|
|
case 0x0019:
|
|
|
|
|
sb.AppendLine("ATA/ATAPI-6 T13 1410D revision 3a");
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
break;
|
|
|
|
|
case 0x001A:
|
|
|
|
|
sb.AppendLine("ATA/ATAPI-7 T13 1532D revision 1");
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
break;
|
|
|
|
|
case 0x001B:
|
|
|
|
|
sb.AppendLine("ATA/ATAPI-6 T13 1410D revision 2");
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
break;
|
|
|
|
|
case 0x001C:
|
|
|
|
|
sb.AppendLine("ATA/ATAPI-6 T13 1410D revision 1");
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
break;
|
|
|
|
|
case 0x001D:
|
|
|
|
|
sb.AppendLine("ATA/ATAPI-7 published ANSI INCITS 397-2005");
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
break;
|
|
|
|
|
case 0x001E:
|
|
|
|
|
sb.AppendLine("ATA/ATAPI-7 T13 1532D revision 0");
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
break;
|
|
|
|
|
case 0x001F:
|
|
|
|
|
sb.AppendLine("ACS-3 Revision 3b");
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
break;
|
|
|
|
|
case 0x0021:
|
|
|
|
|
sb.AppendLine("ATA/ATAPI-7 T13 1532D revision 4a");
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
break;
|
|
|
|
|
case 0x0022:
|
|
|
|
|
sb.AppendLine("ATA/ATAPI-6 published, ANSI INCITS 361-2002");
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
break;
|
|
|
|
|
case 0x0027:
|
|
|
|
|
sb.AppendLine("ATA8-ACS revision 3c");
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
break;
|
|
|
|
|
case 0x0028:
|
|
|
|
|
sb.AppendLine("ATA8-ACS revision 6");
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
break;
|
|
|
|
|
case 0x0029:
|
|
|
|
|
sb.AppendLine("ATA8-ACS revision 4");
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
break;
|
|
|
|
|
case 0x0031:
|
|
|
|
|
sb.AppendLine("ACS-2 Revision 2");
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
break;
|
|
|
|
|
case 0x0033:
|
|
|
|
|
sb.AppendLine("ATA8-ACS Revision 3e");
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
break;
|
|
|
|
|
case 0x0039:
|
|
|
|
|
sb.AppendLine("ATA8-ACS Revision 4c");
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
break;
|
|
|
|
|
case 0x0042:
|
|
|
|
|
sb.AppendLine("ATA8-ACS Revision 3f");
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
break;
|
|
|
|
|
case 0x0052:
|
|
|
|
|
sb.AppendLine("ATA8-ACS revision 3b");
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
break;
|
|
|
|
|
case 0x006D:
|
|
|
|
|
sb.AppendLine("ACS-3 Revision 5");
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
break;
|
|
|
|
|
case 0x0082:
|
|
|
|
|
sb.AppendLine("ACS-2 published, ANSI INCITS 482-2012");
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
break;
|
|
|
|
|
case 0x0107:
|
|
|
|
|
sb.AppendLine("ATA8-ACS revision 2d");
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
break;
|
|
|
|
|
case 0x0110:
|
|
|
|
|
sb.AppendLine("ACS-2 Revision 3");
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
break;
|
|
|
|
|
case 0x011B:
|
|
|
|
|
sb.AppendLine("ACS-3 Revision 4");
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
break;
|
|
|
|
|
default:
|
|
|
|
|
sb.AppendFormat("Unknown ATA revision 0x{0:X4}", ATAID.MinorVersion).AppendLine();
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
break;
|
|
|
|
|
}
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
switch((ATAID.TransportMajorVersion & 0xF000) >> 12)
|
|
|
|
|
{
|
|
|
|
|
case 0x0:
|
|
|
|
|
sb.Append("Parallel ATA device: ");
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if((ATAID.TransportMajorVersion & 0x0002) == 0x0002)
|
|
|
|
|
sb.Append("ATA/ATAPI-7 ");
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if((ATAID.TransportMajorVersion & 0x0001) == 0x0001)
|
|
|
|
|
sb.Append("ATA8-APT ");
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
sb.AppendLine();
|
2015-10-17 01:26:17 +01:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
break;
|
|
|
|
|
case 0x1:
|
|
|
|
|
sb.Append("Serial ATA device: ");
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if((ATAID.TransportMajorVersion & 0x0001) == 0x0001)
|
|
|
|
|
sb.Append("ATA8-AST ");
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if((ATAID.TransportMajorVersion & 0x0002) == 0x0002)
|
|
|
|
|
sb.Append("SATA 1.0a ");
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if((ATAID.TransportMajorVersion & 0x0004) == 0x0004)
|
|
|
|
|
sb.Append("SATA II Extensions ");
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if((ATAID.TransportMajorVersion & 0x0008) == 0x0008)
|
|
|
|
|
sb.Append("SATA 2.5 ");
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if((ATAID.TransportMajorVersion & 0x0010) == 0x0010)
|
|
|
|
|
sb.Append("SATA 2.6 ");
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if((ATAID.TransportMajorVersion & 0x0020) == 0x0020)
|
|
|
|
|
sb.Append("SATA 3.0 ");
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if((ATAID.TransportMajorVersion & 0x0040) == 0x0040)
|
|
|
|
|
sb.Append("SATA 3.1 ");
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
sb.AppendLine();
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
break;
|
|
|
|
|
case 0xE:
|
|
|
|
|
sb.AppendLine("SATA Express device");
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
break;
|
|
|
|
|
default:
|
|
|
|
|
sb.AppendFormat("Unknown transport type 0x{0:X1}", (ATAID.TransportMajorVersion & 0xF000) >> 12).
|
|
|
|
|
AppendLine();
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
break;
|
|
|
|
|
}
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(atapi)
|
|
|
|
|
{
|
|
|
|
|
// Bits 12 to 8, SCSI Peripheral Device Type
|
|
|
|
|
switch((PeripheralDeviceTypes)(((ushort)ATAID.GeneralConfiguration & 0x1F00) >> 8))
|
|
|
|
|
{
|
|
|
|
|
case PeripheralDeviceTypes.DirectAccess: //0x00,
|
|
|
|
|
sb.AppendLine("ATAPI Direct-access device");
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2015-10-17 01:26:17 +01:00
|
|
|
break;
|
2022-03-06 13:29:37 +00:00
|
|
|
case PeripheralDeviceTypes.SequentialAccess: //0x01,
|
|
|
|
|
sb.AppendLine("ATAPI Sequential-access device");
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2015-10-17 01:26:17 +01:00
|
|
|
break;
|
2022-03-06 13:29:37 +00:00
|
|
|
case PeripheralDeviceTypes.PrinterDevice: //0x02,
|
|
|
|
|
sb.AppendLine("ATAPI Printer device");
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2015-10-17 01:26:17 +01:00
|
|
|
break;
|
2022-03-06 13:29:37 +00:00
|
|
|
case PeripheralDeviceTypes.ProcessorDevice: //0x03,
|
|
|
|
|
sb.AppendLine("ATAPI Processor device");
|
2015-10-17 01:26:17 +01:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
break;
|
|
|
|
|
case PeripheralDeviceTypes.WriteOnceDevice: //0x04,
|
|
|
|
|
sb.AppendLine("ATAPI Write-once device");
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
break;
|
|
|
|
|
case PeripheralDeviceTypes.MultiMediaDevice: //0x05,
|
|
|
|
|
sb.AppendLine("ATAPI CD-ROM/DVD/etc device");
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
break;
|
|
|
|
|
case PeripheralDeviceTypes.ScannerDevice: //0x06,
|
|
|
|
|
sb.AppendLine("ATAPI Scanner device");
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
break;
|
|
|
|
|
case PeripheralDeviceTypes.OpticalDevice: //0x07,
|
|
|
|
|
sb.AppendLine("ATAPI Optical memory device");
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
break;
|
|
|
|
|
case PeripheralDeviceTypes.MediumChangerDevice: //0x08,
|
|
|
|
|
sb.AppendLine("ATAPI Medium change device");
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
break;
|
|
|
|
|
case PeripheralDeviceTypes.CommsDevice: //0x09,
|
|
|
|
|
sb.AppendLine("ATAPI Communications device");
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
break;
|
|
|
|
|
case PeripheralDeviceTypes.PrePressDevice1: //0x0A,
|
|
|
|
|
sb.AppendLine("ATAPI Graphics arts pre-press device (defined in ASC IT8)");
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
break;
|
|
|
|
|
case PeripheralDeviceTypes.PrePressDevice2: //0x0B,
|
|
|
|
|
sb.AppendLine("ATAPI Graphics arts pre-press device (defined in ASC IT8)");
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
break;
|
|
|
|
|
case PeripheralDeviceTypes.ArrayControllerDevice: //0x0C,
|
|
|
|
|
sb.AppendLine("ATAPI Array controller device");
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
break;
|
|
|
|
|
case PeripheralDeviceTypes.EnclosureServiceDevice: //0x0D,
|
|
|
|
|
sb.AppendLine("ATAPI Enclosure services device");
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
break;
|
|
|
|
|
case PeripheralDeviceTypes.SimplifiedDevice: //0x0E,
|
|
|
|
|
sb.AppendLine("ATAPI Simplified direct-access device");
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
break;
|
|
|
|
|
case PeripheralDeviceTypes.OCRWDevice: //0x0F,
|
|
|
|
|
sb.AppendLine("ATAPI Optical card reader/writer device");
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
break;
|
|
|
|
|
case PeripheralDeviceTypes.BridgingExpander: //0x10,
|
|
|
|
|
sb.AppendLine("ATAPI Bridging Expanders");
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
break;
|
|
|
|
|
case PeripheralDeviceTypes.ObjectDevice: //0x11,
|
|
|
|
|
sb.AppendLine("ATAPI Object-based Storage Device");
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
break;
|
|
|
|
|
case PeripheralDeviceTypes.ADCDevice: //0x12,
|
|
|
|
|
sb.AppendLine("ATAPI Automation/Drive Interface");
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
break;
|
|
|
|
|
case PeripheralDeviceTypes.WellKnownDevice: //0x1E,
|
|
|
|
|
sb.AppendLine("ATAPI Well known logical unit");
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
break;
|
|
|
|
|
case PeripheralDeviceTypes.UnknownDevice: //0x1F
|
|
|
|
|
sb.AppendLine("ATAPI Unknown or no device type");
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
break;
|
|
|
|
|
default:
|
|
|
|
|
sb.AppendFormat("ATAPI Unknown device type field value 0x{0:X2}",
|
|
|
|
|
((ushort)ATAID.GeneralConfiguration & 0x1F00) >> 8).AppendLine();
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
break;
|
|
|
|
|
}
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
// ATAPI DRQ behaviour
|
|
|
|
|
switch(((ushort)ATAID.GeneralConfiguration & 0x60) >> 5)
|
|
|
|
|
{
|
|
|
|
|
case 0:
|
|
|
|
|
sb.AppendLine("Device shall set DRQ within 3 ms of receiving PACKET");
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
break;
|
|
|
|
|
case 1:
|
|
|
|
|
sb.AppendLine("Device shall assert INTRQ when DRQ is set to one");
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
break;
|
|
|
|
|
case 2:
|
|
|
|
|
sb.AppendLine("Device shall set DRQ within 50 µs of receiving PACKET");
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
break;
|
|
|
|
|
default:
|
|
|
|
|
sb.AppendFormat("Unknown ATAPI DRQ behaviour code {0}",
|
|
|
|
|
((ushort)ATAID.GeneralConfiguration & 0x60) >> 5).AppendLine();
|
2015-10-17 01:26:17 +01:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
break;
|
|
|
|
|
}
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
// ATAPI PACKET size
|
|
|
|
|
switch((ushort)ATAID.GeneralConfiguration & 0x03)
|
|
|
|
|
{
|
|
|
|
|
case 0:
|
|
|
|
|
sb.AppendLine("ATAPI device uses 12 byte command packet");
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
break;
|
|
|
|
|
case 1:
|
|
|
|
|
sb.AppendLine("ATAPI device uses 16 byte command packet");
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
break;
|
|
|
|
|
default:
|
2022-03-07 07:36:42 +00:00
|
|
|
sb.AppendFormat("Unknown ATAPI packet size code {0}", (ushort)ATAID.GeneralConfiguration & 0x03).
|
|
|
|
|
AppendLine();
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else if(!cfa)
|
|
|
|
|
{
|
|
|
|
|
if(minatalevel >= 5)
|
2022-03-07 07:36:42 +00:00
|
|
|
if(ATAID.GeneralConfiguration.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.GeneralConfigurationBit.
|
|
|
|
|
IncompleteResponse))
|
2022-03-06 13:29:37 +00:00
|
|
|
sb.AppendLine("Incomplete identify response");
|
2015-10-17 01:26:17 +01:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(ATAID.GeneralConfiguration.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.GeneralConfigurationBit.
|
|
|
|
|
NonMagnetic))
|
|
|
|
|
sb.AppendLine("Device uses non-magnetic media");
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(ATAID.GeneralConfiguration.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.GeneralConfigurationBit.
|
|
|
|
|
Removable))
|
|
|
|
|
sb.AppendLine("Device is removable");
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(minatalevel <= 5)
|
2022-03-07 07:36:42 +00:00
|
|
|
if(ATAID.GeneralConfiguration.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.GeneralConfigurationBit.
|
|
|
|
|
Fixed))
|
2022-03-06 13:29:37 +00:00
|
|
|
sb.AppendLine("Device is fixed");
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(ata1)
|
2015-10-17 01:26:17 +01:00
|
|
|
{
|
2022-03-07 07:36:42 +00:00
|
|
|
if(ATAID.GeneralConfiguration.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.GeneralConfigurationBit.
|
|
|
|
|
SlowIDE))
|
2022-03-06 13:29:37 +00:00
|
|
|
sb.AppendLine("Device transfer rate is <= 5 Mb/s");
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-07 07:36:42 +00:00
|
|
|
if(ATAID.GeneralConfiguration.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.GeneralConfigurationBit.
|
|
|
|
|
FastIDE))
|
2022-03-06 13:29:37 +00:00
|
|
|
sb.AppendLine("Device transfer rate is > 5 Mb/s but <= 10 Mb/s");
|
2015-10-17 01:26:17 +01:00
|
|
|
|
2022-03-07 07:36:42 +00:00
|
|
|
if(ATAID.GeneralConfiguration.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.GeneralConfigurationBit.
|
|
|
|
|
UltraFastIDE))
|
2022-03-06 13:29:37 +00:00
|
|
|
sb.AppendLine("Device transfer rate is > 10 Mb/s");
|
2016-04-19 02:11:47 +01:00
|
|
|
|
2022-03-07 07:36:42 +00:00
|
|
|
if(ATAID.GeneralConfiguration.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.GeneralConfigurationBit.
|
|
|
|
|
SoftSector))
|
2022-03-06 13:29:37 +00:00
|
|
|
sb.AppendLine("Device is soft sectored");
|
2015-10-17 01:26:17 +01:00
|
|
|
|
2022-03-07 07:36:42 +00:00
|
|
|
if(ATAID.GeneralConfiguration.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.GeneralConfigurationBit.
|
|
|
|
|
HardSector))
|
2022-03-06 13:29:37 +00:00
|
|
|
sb.AppendLine("Device is hard sectored");
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-07 07:36:42 +00:00
|
|
|
if(ATAID.GeneralConfiguration.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.GeneralConfigurationBit.
|
|
|
|
|
NotMFM))
|
2022-03-06 13:29:37 +00:00
|
|
|
sb.AppendLine("Device is not MFM encoded");
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-07 07:36:42 +00:00
|
|
|
if(ATAID.GeneralConfiguration.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.GeneralConfigurationBit.
|
|
|
|
|
FormatGapReq))
|
2022-03-06 13:29:37 +00:00
|
|
|
sb.AppendLine("Format speed tolerance gap is required");
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-07 07:36:42 +00:00
|
|
|
if(ATAID.GeneralConfiguration.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.GeneralConfigurationBit.
|
|
|
|
|
TrackOffset))
|
2022-03-06 13:29:37 +00:00
|
|
|
sb.AppendLine("Track offset option is available");
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-07 07:36:42 +00:00
|
|
|
if(ATAID.GeneralConfiguration.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.GeneralConfigurationBit.
|
|
|
|
|
DataStrobeOffset))
|
2022-03-06 13:29:37 +00:00
|
|
|
sb.AppendLine("Data strobe offset option is available");
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-07 07:36:42 +00:00
|
|
|
if(ATAID.GeneralConfiguration.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.GeneralConfigurationBit.
|
|
|
|
|
RotationalSpeedTolerance))
|
2022-03-06 13:29:37 +00:00
|
|
|
sb.AppendLine("Rotational speed tolerance is higher than 0,5%");
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-07 07:36:42 +00:00
|
|
|
if(ATAID.GeneralConfiguration.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.GeneralConfigurationBit.
|
|
|
|
|
SpindleControl))
|
2022-03-06 13:29:37 +00:00
|
|
|
sb.AppendLine("Spindle motor control is implemented");
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-07 07:36:42 +00:00
|
|
|
if(ATAID.GeneralConfiguration.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.GeneralConfigurationBit.
|
|
|
|
|
HighHeadSwitch))
|
2022-03-06 13:29:37 +00:00
|
|
|
sb.AppendLine("Head switch time is bigger than 15 µs.");
|
|
|
|
|
}
|
|
|
|
|
}
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(ATAID.NominalRotationRate != 0x0000 &&
|
|
|
|
|
ATAID.NominalRotationRate != 0xFFFF)
|
|
|
|
|
if(ATAID.NominalRotationRate == 0x0001)
|
|
|
|
|
sb.AppendLine("Device does not rotate.");
|
|
|
|
|
else
|
|
|
|
|
sb.AppendFormat("Device rotate at {0} rpm", ATAID.NominalRotationRate).AppendLine();
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
uint logicalSectorSize = 0;
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(!atapi)
|
|
|
|
|
{
|
|
|
|
|
uint physicalSectorSize;
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if((ATAID.PhysLogSectorSize & 0x8000) == 0x0000 &&
|
|
|
|
|
(ATAID.PhysLogSectorSize & 0x4000) == 0x4000)
|
|
|
|
|
{
|
|
|
|
|
if((ATAID.PhysLogSectorSize & 0x1000) == 0x1000)
|
|
|
|
|
if(ATAID.LogicalSectorWords <= 255 ||
|
|
|
|
|
ATAID.LogicalAlignment == 0xFFFF)
|
|
|
|
|
logicalSectorSize = 512;
|
|
|
|
|
else
|
|
|
|
|
logicalSectorSize = ATAID.LogicalSectorWords * 2;
|
|
|
|
|
else
|
|
|
|
|
logicalSectorSize = 512;
|
2015-10-17 01:26:17 +01:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if((ATAID.PhysLogSectorSize & 0x2000) == 0x2000)
|
|
|
|
|
physicalSectorSize = logicalSectorSize * (uint)Math.Pow(2, ATAID.PhysLogSectorSize & 0xF);
|
2018-06-22 08:08:38 +01:00
|
|
|
else
|
2022-03-06 13:29:37 +00:00
|
|
|
physicalSectorSize = logicalSectorSize;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
logicalSectorSize = 512;
|
|
|
|
|
physicalSectorSize = 512;
|
|
|
|
|
}
|
2015-10-17 01:26:17 +01:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
sb.AppendFormat("Physical sector size: {0} bytes", physicalSectorSize).AppendLine();
|
|
|
|
|
sb.AppendFormat("Logical sector size: {0} bytes", logicalSectorSize).AppendLine();
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(logicalSectorSize != physicalSectorSize &&
|
|
|
|
|
(ATAID.LogicalAlignment & 0x8000) == 0x0000 &&
|
|
|
|
|
(ATAID.LogicalAlignment & 0x4000) == 0x4000)
|
|
|
|
|
sb.AppendFormat("Logical sector starts at offset {0} from physical sector",
|
|
|
|
|
ATAID.LogicalAlignment & 0x3FFF).AppendLine();
|
2015-10-17 01:26:17 +01:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(minatalevel <= 5)
|
|
|
|
|
if(ATAID.CurrentCylinders > 0 &&
|
|
|
|
|
ATAID.CurrentHeads > 0 &&
|
|
|
|
|
ATAID.CurrentSectorsPerTrack > 0)
|
2015-10-17 01:26:17 +01:00
|
|
|
{
|
2022-03-06 13:29:37 +00:00
|
|
|
sb.AppendFormat("Cylinders: {0} max., {1} current", ATAID.Cylinders, ATAID.CurrentCylinders).
|
|
|
|
|
AppendLine();
|
2015-10-17 01:26:17 +01:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
sb.AppendFormat("Heads: {0} max., {1} current", ATAID.Heads, ATAID.CurrentHeads).AppendLine();
|
|
|
|
|
|
|
|
|
|
sb.AppendFormat("Sectors per track: {0} max., {1} current", ATAID.SectorsPerTrack,
|
|
|
|
|
ATAID.CurrentSectorsPerTrack).AppendLine();
|
|
|
|
|
|
|
|
|
|
sb.AppendFormat("Sectors addressable in CHS mode: {0} max., {1} current",
|
|
|
|
|
ATAID.Cylinders * ATAID.Heads * ATAID.SectorsPerTrack, ATAID.CurrentSectors).
|
|
|
|
|
AppendLine();
|
2015-10-17 01:26:17 +01:00
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
2022-03-06 13:29:37 +00:00
|
|
|
sb.AppendFormat("Cylinders: {0}", ATAID.Cylinders).AppendLine();
|
|
|
|
|
sb.AppendFormat("Heads: {0}", ATAID.Heads).AppendLine();
|
|
|
|
|
sb.AppendFormat("Sectors per track: {0}", ATAID.SectorsPerTrack).AppendLine();
|
2015-10-17 01:26:17 +01:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
sb.AppendFormat("Sectors addressable in CHS mode: {0}",
|
|
|
|
|
ATAID.Cylinders * ATAID.Heads * ATAID.SectorsPerTrack).AppendLine();
|
|
|
|
|
}
|
2015-10-17 01:26:17 +01:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(ATAID.Capabilities.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CapabilitiesBit.LBASupport))
|
|
|
|
|
sb.AppendFormat("{0} sectors in 28-bit LBA mode", ATAID.LBASectors).AppendLine();
|
2015-10-17 01:26:17 +01:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(ATAID.CommandSet2.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CommandSetBit2.LBA48))
|
|
|
|
|
sb.AppendFormat("{0} sectors in 48-bit LBA mode", ATAID.LBA48Sectors).AppendLine();
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(minatalevel <= 5)
|
|
|
|
|
if(ATAID.CurrentSectors > 0)
|
|
|
|
|
sb.AppendFormat("Device size in CHS mode: {0} bytes, {1} Mb, {2} MiB",
|
|
|
|
|
(ulong)ATAID.CurrentSectors * logicalSectorSize,
|
|
|
|
|
(ulong)ATAID.CurrentSectors * logicalSectorSize / 1000 / 1000,
|
|
|
|
|
(ulong)ATAID.CurrentSectors * 512 / 1024 / 1024).AppendLine();
|
|
|
|
|
else
|
|
|
|
|
{
|
2022-03-07 07:36:42 +00:00
|
|
|
var currentSectors = (ulong)(ATAID.Cylinders * ATAID.Heads * ATAID.SectorsPerTrack);
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
sb.AppendFormat("Device size in CHS mode: {0} bytes, {1} Mb, {2} MiB",
|
|
|
|
|
currentSectors * logicalSectorSize,
|
|
|
|
|
currentSectors * logicalSectorSize / 1000 / 1000,
|
|
|
|
|
currentSectors * 512 / 1024 / 1024).AppendLine();
|
|
|
|
|
}
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(ATAID.Capabilities.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CapabilitiesBit.LBASupport))
|
2022-11-13 19:38:02 +00:00
|
|
|
switch((ulong)ATAID.LBASectors * logicalSectorSize / 1024 / 1024)
|
|
|
|
|
{
|
|
|
|
|
case > 1000000:
|
|
|
|
|
sb.AppendFormat("Device size in 28-bit LBA mode: {0} bytes, {1} Tb, {2} TiB",
|
|
|
|
|
(ulong)ATAID.LBASectors * logicalSectorSize,
|
|
|
|
|
(ulong)ATAID.LBASectors * logicalSectorSize / 1000 / 1000 / 1000 / 1000,
|
|
|
|
|
(ulong)ATAID.LBASectors * 512 / 1024 / 1024 / 1024 / 1024).AppendLine();
|
|
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
case > 1000:
|
|
|
|
|
sb.AppendFormat("Device size in 28-bit LBA mode: {0} bytes, {1} Gb, {2} GiB",
|
|
|
|
|
(ulong)ATAID.LBASectors * logicalSectorSize,
|
|
|
|
|
(ulong)ATAID.LBASectors * logicalSectorSize / 1000 / 1000 / 1000,
|
|
|
|
|
(ulong)ATAID.LBASectors * 512 / 1024 / 1024 / 1024).AppendLine();
|
|
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
default:
|
|
|
|
|
sb.AppendFormat("Device size in 28-bit LBA mode: {0} bytes, {1} Mb, {2} MiB",
|
|
|
|
|
(ulong)ATAID.LBASectors * logicalSectorSize,
|
|
|
|
|
(ulong)ATAID.LBASectors * logicalSectorSize / 1000 / 1000,
|
|
|
|
|
(ulong)ATAID.LBASectors * 512 / 1024 / 1024).AppendLine();
|
|
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
}
|
2022-03-06 13:29:37 +00:00
|
|
|
|
|
|
|
|
if(ATAID.CommandSet2.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CommandSetBit2.LBA48))
|
|
|
|
|
if(ATAID.CommandSet5.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CommandSetBit5.ExtSectors))
|
2022-11-13 19:38:02 +00:00
|
|
|
switch(ATAID.ExtendedUserSectors * logicalSectorSize / 1024 / 1024)
|
|
|
|
|
{
|
|
|
|
|
case > 1000000:
|
|
|
|
|
sb.AppendFormat("Device size in 48-bit LBA mode: {0} bytes, {1} Tb, {2} TiB",
|
|
|
|
|
ATAID.ExtendedUserSectors * logicalSectorSize,
|
|
|
|
|
ATAID.ExtendedUserSectors * logicalSectorSize / 1000 / 1000 / 1000 / 1000,
|
|
|
|
|
ATAID.ExtendedUserSectors * logicalSectorSize / 1024 / 1024 / 1024 / 1024).
|
|
|
|
|
AppendLine();
|
|
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
case > 1000:
|
|
|
|
|
sb.AppendFormat("Device size in 48-bit LBA mode: {0} bytes, {1} Gb, {2} GiB",
|
|
|
|
|
ATAID.ExtendedUserSectors * logicalSectorSize,
|
|
|
|
|
ATAID.ExtendedUserSectors * logicalSectorSize / 1000 / 1000 / 1000,
|
|
|
|
|
ATAID.ExtendedUserSectors * logicalSectorSize / 1024 / 1024 / 1024).
|
|
|
|
|
AppendLine();
|
|
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
default:
|
|
|
|
|
sb.AppendFormat("Device size in 48-bit LBA mode: {0} bytes, {1} Mb, {2} MiB",
|
|
|
|
|
ATAID.ExtendedUserSectors * logicalSectorSize,
|
|
|
|
|
ATAID.ExtendedUserSectors * logicalSectorSize / 1000 / 1000,
|
|
|
|
|
ATAID.ExtendedUserSectors * logicalSectorSize / 1024 / 1024).AppendLine();
|
|
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
}
|
2022-03-06 13:29:37 +00:00
|
|
|
else
|
2022-11-13 19:38:02 +00:00
|
|
|
switch(ATAID.LBA48Sectors * logicalSectorSize / 1024 / 1024)
|
|
|
|
|
{
|
|
|
|
|
case > 1000000:
|
|
|
|
|
sb.AppendFormat("Device size in 48-bit LBA mode: {0} bytes, {1} Tb, {2} TiB",
|
|
|
|
|
ATAID.LBA48Sectors * logicalSectorSize,
|
|
|
|
|
ATAID.LBA48Sectors * logicalSectorSize / 1000 / 1000 / 1000 / 1000,
|
|
|
|
|
ATAID.LBA48Sectors * logicalSectorSize / 1024 / 1024 / 1024 / 1024).
|
|
|
|
|
AppendLine();
|
|
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
case > 1000:
|
|
|
|
|
sb.AppendFormat("Device size in 48-bit LBA mode: {0} bytes, {1} Gb, {2} GiB",
|
|
|
|
|
ATAID.LBA48Sectors * logicalSectorSize,
|
|
|
|
|
ATAID.LBA48Sectors * logicalSectorSize / 1000 / 1000 / 1000,
|
|
|
|
|
ATAID.LBA48Sectors * logicalSectorSize / 1024 / 1024 / 1024).AppendLine();
|
|
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
default:
|
|
|
|
|
sb.AppendFormat("Device size in 48-bit LBA mode: {0} bytes, {1} Mb, {2} MiB",
|
|
|
|
|
ATAID.LBA48Sectors * logicalSectorSize,
|
|
|
|
|
ATAID.LBA48Sectors * logicalSectorSize / 1000 / 1000,
|
|
|
|
|
ATAID.LBA48Sectors * logicalSectorSize / 1024 / 1024).AppendLine();
|
|
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
}
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(ata1 || cfa)
|
|
|
|
|
{
|
|
|
|
|
if(cfa)
|
|
|
|
|
sb.AppendFormat("{0} sectors in card", ATAID.SectorsPerCard).AppendLine();
|
2015-10-17 01:26:17 +01:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(ATAID.UnformattedBPT > 0)
|
|
|
|
|
sb.AppendFormat("{0} bytes per unformatted track", ATAID.UnformattedBPT).AppendLine();
|
2015-10-17 01:26:17 +01:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(ATAID.UnformattedBPS > 0)
|
|
|
|
|
sb.AppendFormat("{0} bytes per unformatted sector", ATAID.UnformattedBPS).AppendLine();
|
|
|
|
|
}
|
|
|
|
|
}
|
2015-10-17 01:26:17 +01:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if((ushort)ATAID.SpecificConfiguration != 0x0000 &&
|
|
|
|
|
(ushort)ATAID.SpecificConfiguration != 0xFFFF)
|
|
|
|
|
switch(ATAID.SpecificConfiguration)
|
|
|
|
|
{
|
2022-03-07 07:36:42 +00:00
|
|
|
case CommonTypes.Structs.Devices.ATA.Identify.SpecificConfigurationEnum.RequiresSetIncompleteResponse:
|
2022-03-06 13:29:37 +00:00
|
|
|
sb.AppendLine("Device requires SET FEATURES to spin up and IDENTIFY DEVICE response is incomplete.");
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
break;
|
|
|
|
|
case CommonTypes.Structs.Devices.ATA.Identify.SpecificConfigurationEnum.RequiresSetCompleteResponse:
|
|
|
|
|
sb.AppendLine("Device requires SET FEATURES to spin up and IDENTIFY DEVICE response is complete.");
|
2015-10-17 01:26:17 +01:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
break;
|
|
|
|
|
case CommonTypes.Structs.Devices.ATA.Identify.SpecificConfigurationEnum.
|
|
|
|
|
NotRequiresSetIncompleteResponse:
|
|
|
|
|
sb.AppendLine("Device does not require SET FEATURES to spin up and IDENTIFY DEVICE response is incomplete.");
|
2015-10-17 01:26:17 +01:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
break;
|
2022-03-07 07:36:42 +00:00
|
|
|
case CommonTypes.Structs.Devices.ATA.Identify.SpecificConfigurationEnum.NotRequiresSetCompleteResponse:
|
2022-03-06 13:29:37 +00:00
|
|
|
sb.AppendLine("Device does not require SET FEATURES to spin up and IDENTIFY DEVICE response is complete.");
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
break;
|
|
|
|
|
default:
|
|
|
|
|
sb.AppendFormat("Unknown device specific configuration 0x{0:X4}",
|
|
|
|
|
(ushort)ATAID.SpecificConfiguration).AppendLine();
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
break;
|
2015-10-17 01:26:17 +01:00
|
|
|
}
|
2018-06-22 08:08:38 +01:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
// Obsolete since ATA-2, however, it is yet used in ATA-8 devices
|
|
|
|
|
if(ATAID.BufferSize != 0x0000 &&
|
|
|
|
|
ATAID.BufferSize != 0xFFFF &&
|
|
|
|
|
ATAID.BufferType != 0x0000 &&
|
|
|
|
|
ATAID.BufferType != 0xFFFF)
|
|
|
|
|
switch(ATAID.BufferType)
|
|
|
|
|
{
|
|
|
|
|
case 1:
|
|
|
|
|
sb.AppendFormat("{0} KiB of single ported single sector buffer", ATAID.BufferSize * 512 / 1024).
|
|
|
|
|
AppendLine();
|
2015-10-17 01:26:17 +01:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
break;
|
|
|
|
|
case 2:
|
|
|
|
|
sb.AppendFormat("{0} KiB of dual ported multi sector buffer", ATAID.BufferSize * 512 / 1024).
|
|
|
|
|
AppendLine();
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
break;
|
|
|
|
|
case 3:
|
|
|
|
|
sb.AppendFormat("{0} KiB of dual ported multi sector buffer with read caching",
|
|
|
|
|
ATAID.BufferSize * 512 / 1024).AppendLine();
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
break;
|
|
|
|
|
default:
|
|
|
|
|
sb.AppendFormat("{0} KiB of unknown type {1} buffer", ATAID.BufferSize * 512 / 1024,
|
|
|
|
|
ATAID.BufferType).AppendLine();
|
|
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
}
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(ATAID.EccBytes != 0x0000 &&
|
|
|
|
|
ATAID.EccBytes != 0xFFFF)
|
|
|
|
|
sb.AppendFormat("READ/WRITE LONG has {0} extra bytes", ATAID.EccBytes).AppendLine();
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
sb.AppendLine();
|
|
|
|
|
|
|
|
|
|
sb.Append("Device capabilities:");
|
|
|
|
|
|
2022-03-07 07:36:42 +00:00
|
|
|
if(ATAID.Capabilities.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CapabilitiesBit.StandardStandbyTimer))
|
2022-03-06 13:29:37 +00:00
|
|
|
sb.AppendLine().Append("Standby time values are standard");
|
|
|
|
|
|
|
|
|
|
if(ATAID.Capabilities.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CapabilitiesBit.IORDY))
|
|
|
|
|
{
|
|
|
|
|
sb.AppendLine().Append("IORDY is supported");
|
|
|
|
|
|
|
|
|
|
if(ATAID.Capabilities.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CapabilitiesBit.CanDisableIORDY))
|
|
|
|
|
sb.Append(" and can be disabled");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if(ATAID.Capabilities.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CapabilitiesBit.DMASupport))
|
|
|
|
|
sb.AppendLine().Append("DMA is supported");
|
|
|
|
|
|
|
|
|
|
if(ATAID.Capabilities2.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CapabilitiesBit2.MustBeSet) &&
|
|
|
|
|
!ATAID.Capabilities2.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CapabilitiesBit2.MustBeClear))
|
|
|
|
|
if(ATAID.Capabilities2.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CapabilitiesBit2.
|
|
|
|
|
SpecificStandbyTimer))
|
|
|
|
|
sb.AppendLine().Append("Device indicates a specific minimum standby timer value");
|
|
|
|
|
|
|
|
|
|
if(ATAID.Capabilities3.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CapabilitiesBit3.MultipleValid))
|
|
|
|
|
{
|
|
|
|
|
sb.AppendLine().
|
|
|
|
|
AppendFormat("A maximum of {0} sectors can be transferred per interrupt on READ/WRITE MULTIPLE",
|
|
|
|
|
ATAID.MultipleSectorNumber);
|
2015-10-17 01:26:17 +01:00
|
|
|
|
2022-03-07 07:36:42 +00:00
|
|
|
sb.AppendLine().AppendFormat("Device supports setting a maximum of {0} sectors", ATAID.MultipleMaxSectors);
|
2022-03-06 13:29:37 +00:00
|
|
|
}
|
|
|
|
|
|
2022-03-07 07:36:42 +00:00
|
|
|
if(ATAID.Capabilities.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CapabilitiesBit.PhysicalAlignment1) ||
|
2022-03-06 13:29:37 +00:00
|
|
|
ATAID.Capabilities.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CapabilitiesBit.PhysicalAlignment0))
|
2022-03-07 07:36:42 +00:00
|
|
|
sb.AppendLine().AppendFormat("Long Physical Alignment setting is {0}", (ushort)ATAID.Capabilities & 0x03);
|
2022-03-06 13:29:37 +00:00
|
|
|
|
|
|
|
|
if(ata1)
|
|
|
|
|
if(ATAID.TrustedComputing.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.TrustedComputingBit.
|
|
|
|
|
TrustedComputing))
|
|
|
|
|
sb.AppendLine().Append("Device supports doubleword I/O");
|
|
|
|
|
|
|
|
|
|
if(atapi)
|
|
|
|
|
{
|
|
|
|
|
if(ATAID.Capabilities.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CapabilitiesBit.InterleavedDMA))
|
|
|
|
|
sb.AppendLine().Append("ATAPI device supports interleaved DMA");
|
2015-10-17 01:26:17 +01:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(ATAID.Capabilities.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CapabilitiesBit.CommandQueue))
|
|
|
|
|
sb.AppendLine().Append("ATAPI device supports command queueing");
|
2015-10-17 01:26:17 +01:00
|
|
|
|
2022-03-07 07:36:42 +00:00
|
|
|
if(ATAID.Capabilities.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CapabilitiesBit.OverlapOperation))
|
2022-03-06 13:29:37 +00:00
|
|
|
sb.AppendLine().Append("ATAPI device supports overlapped operations");
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2021-08-17 21:23:22 +01:00
|
|
|
if(ATAID.Capabilities.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CapabilitiesBit.
|
2022-03-06 13:29:37 +00:00
|
|
|
RequiresATASoftReset))
|
|
|
|
|
sb.AppendLine().Append("ATAPI device requires ATA software reset");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if(minatalevel <= 3)
|
|
|
|
|
{
|
|
|
|
|
sb.AppendLine().AppendFormat("PIO timing mode: {0}", ATAID.PIOTransferTimingMode);
|
|
|
|
|
sb.AppendLine().AppendFormat("DMA timing mode: {0}", ATAID.DMATransferTimingMode);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
sb.AppendLine().Append("Advanced PIO: ");
|
|
|
|
|
|
|
|
|
|
if(ATAID.APIOSupported.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.TransferMode.Mode0))
|
|
|
|
|
sb.Append("PIO0 ");
|
|
|
|
|
|
|
|
|
|
if(ATAID.APIOSupported.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.TransferMode.Mode1))
|
|
|
|
|
sb.Append("PIO1 ");
|
|
|
|
|
|
|
|
|
|
if(ATAID.APIOSupported.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.TransferMode.Mode2))
|
|
|
|
|
sb.Append("PIO2 ");
|
|
|
|
|
|
|
|
|
|
if(ATAID.APIOSupported.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.TransferMode.Mode3))
|
|
|
|
|
sb.Append("PIO3 ");
|
|
|
|
|
|
|
|
|
|
if(ATAID.APIOSupported.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.TransferMode.Mode4))
|
|
|
|
|
sb.Append("PIO4 ");
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(ATAID.APIOSupported.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.TransferMode.Mode5))
|
|
|
|
|
sb.Append("PIO5 ");
|
|
|
|
|
|
|
|
|
|
if(ATAID.APIOSupported.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.TransferMode.Mode6))
|
|
|
|
|
sb.Append("PIO6 ");
|
|
|
|
|
|
|
|
|
|
if(ATAID.APIOSupported.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.TransferMode.Mode7))
|
|
|
|
|
sb.Append("PIO7 ");
|
|
|
|
|
|
|
|
|
|
if(minatalevel <= 3 &&
|
|
|
|
|
!atapi)
|
|
|
|
|
{
|
|
|
|
|
sb.AppendLine().Append("Single-word DMA: ");
|
|
|
|
|
|
|
|
|
|
if(ATAID.DMASupported.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.TransferMode.Mode0))
|
2015-10-17 01:26:17 +01:00
|
|
|
{
|
2022-03-06 13:29:37 +00:00
|
|
|
sb.Append("DMA0 ");
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(ATAID.DMAActive.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.TransferMode.Mode0))
|
|
|
|
|
sb.Append("(active) ");
|
2015-10-17 01:26:17 +01:00
|
|
|
}
|
2018-06-22 08:08:38 +01:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(ATAID.DMASupported.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.TransferMode.Mode1))
|
|
|
|
|
{
|
|
|
|
|
sb.Append("DMA1 ");
|
2015-10-17 01:26:17 +01:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(ATAID.DMAActive.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.TransferMode.Mode1))
|
|
|
|
|
sb.Append("(active) ");
|
|
|
|
|
}
|
2015-10-17 01:26:17 +01:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(ATAID.DMASupported.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.TransferMode.Mode2))
|
2015-10-17 01:26:17 +01:00
|
|
|
{
|
2022-03-06 13:29:37 +00:00
|
|
|
sb.Append("DMA2 ");
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(ATAID.DMAActive.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.TransferMode.Mode2))
|
|
|
|
|
sb.Append("(active) ");
|
2015-10-17 01:26:17 +01:00
|
|
|
}
|
|
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(ATAID.DMASupported.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.TransferMode.Mode3))
|
|
|
|
|
{
|
|
|
|
|
sb.Append("DMA3 ");
|
2015-10-17 01:26:17 +01:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(ATAID.DMAActive.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.TransferMode.Mode3))
|
|
|
|
|
sb.Append("(active) ");
|
|
|
|
|
}
|
2015-10-17 01:26:17 +01:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(ATAID.DMASupported.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.TransferMode.Mode4))
|
2015-10-17 01:26:17 +01:00
|
|
|
{
|
2022-03-06 13:29:37 +00:00
|
|
|
sb.Append("DMA4 ");
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(ATAID.DMAActive.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.TransferMode.Mode4))
|
|
|
|
|
sb.Append("(active) ");
|
|
|
|
|
}
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(ATAID.DMASupported.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.TransferMode.Mode5))
|
|
|
|
|
{
|
|
|
|
|
sb.Append("DMA5 ");
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(ATAID.DMAActive.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.TransferMode.Mode5))
|
|
|
|
|
sb.Append("(active) ");
|
2015-10-17 01:26:17 +01:00
|
|
|
}
|
|
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(ATAID.DMASupported.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.TransferMode.Mode6))
|
2015-10-17 01:26:17 +01:00
|
|
|
{
|
2022-03-06 13:29:37 +00:00
|
|
|
sb.Append("DMA6 ");
|
|
|
|
|
|
|
|
|
|
if(ATAID.DMAActive.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.TransferMode.Mode6))
|
|
|
|
|
sb.Append("(active) ");
|
2015-10-17 01:26:17 +01:00
|
|
|
}
|
|
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(ATAID.DMASupported.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.TransferMode.Mode7))
|
|
|
|
|
{
|
|
|
|
|
sb.Append("DMA7 ");
|
2015-10-17 01:26:17 +01:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(ATAID.DMAActive.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.TransferMode.Mode7))
|
|
|
|
|
sb.Append("(active) ");
|
|
|
|
|
}
|
|
|
|
|
}
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
sb.AppendLine().Append("Multi-word DMA: ");
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(ATAID.MDMASupported.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.TransferMode.Mode0))
|
|
|
|
|
{
|
|
|
|
|
sb.Append("MDMA0 ");
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(ATAID.MDMAActive.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.TransferMode.Mode0))
|
|
|
|
|
sb.Append("(active) ");
|
|
|
|
|
}
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(ATAID.MDMASupported.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.TransferMode.Mode1))
|
|
|
|
|
{
|
|
|
|
|
sb.Append("MDMA1 ");
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(ATAID.MDMAActive.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.TransferMode.Mode1))
|
|
|
|
|
sb.Append("(active) ");
|
|
|
|
|
}
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(ATAID.MDMASupported.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.TransferMode.Mode2))
|
|
|
|
|
{
|
|
|
|
|
sb.Append("MDMA2 ");
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(ATAID.MDMAActive.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.TransferMode.Mode2))
|
|
|
|
|
sb.Append("(active) ");
|
|
|
|
|
}
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(ATAID.MDMASupported.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.TransferMode.Mode3))
|
|
|
|
|
{
|
|
|
|
|
sb.Append("MDMA3 ");
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(ATAID.MDMAActive.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.TransferMode.Mode3))
|
|
|
|
|
sb.Append("(active) ");
|
|
|
|
|
}
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(ATAID.MDMASupported.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.TransferMode.Mode4))
|
|
|
|
|
{
|
|
|
|
|
sb.Append("MDMA4 ");
|
2018-06-22 08:08:38 +01:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(ATAID.MDMAActive.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.TransferMode.Mode4))
|
|
|
|
|
sb.Append("(active) ");
|
|
|
|
|
}
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(ATAID.MDMASupported.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.TransferMode.Mode5))
|
|
|
|
|
{
|
|
|
|
|
sb.Append("MDMA5 ");
|
2018-06-22 08:08:38 +01:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(ATAID.MDMAActive.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.TransferMode.Mode5))
|
|
|
|
|
sb.Append("(active) ");
|
|
|
|
|
}
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(ATAID.MDMASupported.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.TransferMode.Mode6))
|
|
|
|
|
{
|
|
|
|
|
sb.Append("MDMA6 ");
|
2018-06-22 08:08:38 +01:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(ATAID.MDMAActive.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.TransferMode.Mode6))
|
|
|
|
|
sb.Append("(active) ");
|
|
|
|
|
}
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(ATAID.MDMASupported.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.TransferMode.Mode7))
|
|
|
|
|
{
|
|
|
|
|
sb.Append("MDMA7 ");
|
2018-06-22 08:08:38 +01:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(ATAID.MDMAActive.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.TransferMode.Mode7))
|
|
|
|
|
sb.Append("(active) ");
|
|
|
|
|
}
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
sb.AppendLine().Append("Ultra DMA: ");
|
2018-06-22 08:08:38 +01:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(ATAID.UDMASupported.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.TransferMode.Mode0))
|
|
|
|
|
{
|
|
|
|
|
sb.Append("UDMA0 ");
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(ATAID.UDMAActive.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.TransferMode.Mode0))
|
|
|
|
|
sb.Append("(active) ");
|
|
|
|
|
}
|
2018-06-22 08:08:38 +01:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(ATAID.UDMASupported.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.TransferMode.Mode1))
|
|
|
|
|
{
|
|
|
|
|
sb.Append("UDMA1 ");
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(ATAID.UDMAActive.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.TransferMode.Mode1))
|
|
|
|
|
sb.Append("(active) ");
|
|
|
|
|
}
|
2018-06-22 08:08:38 +01:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(ATAID.UDMASupported.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.TransferMode.Mode2))
|
|
|
|
|
{
|
|
|
|
|
sb.Append("UDMA2 ");
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(ATAID.UDMAActive.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.TransferMode.Mode2))
|
|
|
|
|
sb.Append("(active) ");
|
|
|
|
|
}
|
2015-10-17 01:26:17 +01:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(ATAID.UDMASupported.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.TransferMode.Mode3))
|
|
|
|
|
{
|
|
|
|
|
sb.Append("UDMA3 ");
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(ATAID.UDMAActive.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.TransferMode.Mode3))
|
|
|
|
|
sb.Append("(active) ");
|
|
|
|
|
}
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(ATAID.UDMASupported.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.TransferMode.Mode4))
|
|
|
|
|
{
|
|
|
|
|
sb.Append("UDMA4 ");
|
2018-06-22 08:08:38 +01:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(ATAID.UDMAActive.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.TransferMode.Mode4))
|
|
|
|
|
sb.Append("(active) ");
|
|
|
|
|
}
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(ATAID.UDMASupported.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.TransferMode.Mode5))
|
|
|
|
|
{
|
|
|
|
|
sb.Append("UDMA5 ");
|
2018-06-22 08:08:38 +01:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(ATAID.UDMAActive.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.TransferMode.Mode5))
|
|
|
|
|
sb.Append("(active) ");
|
|
|
|
|
}
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(ATAID.UDMASupported.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.TransferMode.Mode6))
|
|
|
|
|
{
|
|
|
|
|
sb.Append("UDMA6 ");
|
2018-06-22 08:08:38 +01:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(ATAID.UDMAActive.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.TransferMode.Mode6))
|
|
|
|
|
sb.Append("(active) ");
|
|
|
|
|
}
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(ATAID.UDMASupported.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.TransferMode.Mode7))
|
|
|
|
|
{
|
|
|
|
|
sb.Append("UDMA7 ");
|
2018-06-22 08:08:38 +01:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(ATAID.UDMAActive.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.TransferMode.Mode7))
|
|
|
|
|
sb.Append("(active) ");
|
|
|
|
|
}
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(ATAID.MinMDMACycleTime != 0 &&
|
|
|
|
|
ATAID.RecMDMACycleTime != 0)
|
|
|
|
|
sb.AppendLine().
|
|
|
|
|
AppendFormat("At minimum {0} ns. transfer cycle time per word in MDMA, " + "{1} ns. recommended",
|
|
|
|
|
ATAID.MinMDMACycleTime, ATAID.RecMDMACycleTime);
|
2018-06-22 08:08:38 +01:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(ATAID.MinPIOCycleTimeNoFlow != 0)
|
|
|
|
|
sb.AppendLine().
|
|
|
|
|
AppendFormat("At minimum {0} ns. transfer cycle time per word in PIO, " + "without flow control",
|
|
|
|
|
ATAID.MinPIOCycleTimeNoFlow);
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(ATAID.MinPIOCycleTimeFlow != 0)
|
|
|
|
|
sb.AppendLine().
|
|
|
|
|
AppendFormat("At minimum {0} ns. transfer cycle time per word in PIO, " + "with IORDY flow control",
|
|
|
|
|
ATAID.MinPIOCycleTimeFlow);
|
2018-06-22 08:08:38 +01:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(ATAID.MaxQueueDepth != 0)
|
|
|
|
|
sb.AppendLine().AppendFormat("{0} depth of queue maximum", ATAID.MaxQueueDepth + 1);
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(atapi)
|
|
|
|
|
{
|
|
|
|
|
if(ATAID.PacketBusRelease != 0)
|
|
|
|
|
sb.AppendLine().AppendFormat("{0} ns. typical to release bus from receipt of PACKET",
|
|
|
|
|
ATAID.PacketBusRelease);
|
2018-06-22 08:08:38 +01:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(ATAID.ServiceBusyClear != 0)
|
|
|
|
|
sb.AppendLine().AppendFormat("{0} ns. typical to clear BSY bit from receipt of SERVICE",
|
|
|
|
|
ATAID.ServiceBusyClear);
|
|
|
|
|
}
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if((ATAID.TransportMajorVersion & 0xF000) >> 12 == 0x1 ||
|
|
|
|
|
(ATAID.TransportMajorVersion & 0xF000) >> 12 == 0xE)
|
|
|
|
|
{
|
|
|
|
|
if(!ATAID.SATACapabilities.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.SATACapabilitiesBit.Clear))
|
|
|
|
|
{
|
|
|
|
|
if(ATAID.SATACapabilities.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.SATACapabilitiesBit.
|
|
|
|
|
Gen1Speed))
|
|
|
|
|
sb.AppendLine().Append("SATA 1.5Gb/s is supported");
|
2015-10-17 01:26:17 +01:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(ATAID.SATACapabilities.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.SATACapabilitiesBit.
|
|
|
|
|
Gen2Speed))
|
|
|
|
|
sb.AppendLine().Append("SATA 3.0Gb/s is supported");
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(ATAID.SATACapabilities.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.SATACapabilitiesBit.
|
|
|
|
|
Gen3Speed))
|
|
|
|
|
sb.AppendLine().Append("SATA 6.0Gb/s is supported");
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(ATAID.SATACapabilities.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.SATACapabilitiesBit.
|
|
|
|
|
PowerReceipt))
|
|
|
|
|
sb.AppendLine().Append("Receipt of host initiated power management requests is supported");
|
2018-06-22 08:08:38 +01:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(ATAID.SATACapabilities.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.SATACapabilitiesBit.
|
|
|
|
|
PHYEventCounter))
|
|
|
|
|
sb.AppendLine().Append("PHY Event counters are supported");
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(ATAID.SATACapabilities.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.SATACapabilitiesBit.
|
|
|
|
|
HostSlumbTrans))
|
|
|
|
|
sb.AppendLine().Append("Supports host automatic partial to slumber transitions is supported");
|
2018-06-22 08:08:38 +01:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(ATAID.SATACapabilities.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.SATACapabilitiesBit.
|
|
|
|
|
DevSlumbTrans))
|
|
|
|
|
sb.AppendLine().Append("Supports device automatic partial to slumber transitions is supported");
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(ATAID.SATACapabilities.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.SATACapabilitiesBit.NCQ))
|
|
|
|
|
{
|
|
|
|
|
sb.AppendLine().Append("NCQ is supported");
|
2018-06-22 08:08:38 +01:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(ATAID.SATACapabilities.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.SATACapabilitiesBit.
|
|
|
|
|
NCQPriority))
|
|
|
|
|
sb.AppendLine().Append("NCQ priority is supported");
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(ATAID.SATACapabilities.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.SATACapabilitiesBit.
|
|
|
|
|
UnloadNCQ))
|
|
|
|
|
sb.AppendLine().Append("Unload is supported with outstanding NCQ commands");
|
|
|
|
|
}
|
2015-10-17 01:26:17 +01:00
|
|
|
}
|
2018-06-22 08:08:38 +01:00
|
|
|
|
2022-03-07 07:36:42 +00:00
|
|
|
if(!ATAID.SATACapabilities2.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.SATACapabilitiesBit2.Clear))
|
2015-10-17 01:26:17 +01:00
|
|
|
{
|
2022-03-06 13:29:37 +00:00
|
|
|
if(!ATAID.SATACapabilities.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.SATACapabilitiesBit.
|
|
|
|
|
Clear) &&
|
|
|
|
|
ATAID.SATACapabilities.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.SATACapabilitiesBit.NCQ))
|
|
|
|
|
{
|
2022-03-07 07:36:42 +00:00
|
|
|
if(ATAID.SATACapabilities2.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.SATACapabilitiesBit2.
|
|
|
|
|
NCQMgmt))
|
2022-03-06 13:29:37 +00:00
|
|
|
sb.AppendLine().Append("NCQ queue management is supported");
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-07 07:36:42 +00:00
|
|
|
if(ATAID.SATACapabilities2.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.SATACapabilitiesBit2.
|
|
|
|
|
NCQStream))
|
2022-03-06 13:29:37 +00:00
|
|
|
sb.AppendLine().Append("NCQ streaming is supported");
|
|
|
|
|
}
|
2018-06-22 08:08:38 +01:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(atapi)
|
|
|
|
|
{
|
2022-03-07 07:36:42 +00:00
|
|
|
if(ATAID.SATACapabilities2.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.SATACapabilitiesBit2.
|
|
|
|
|
HostEnvDetect))
|
2022-03-06 13:29:37 +00:00
|
|
|
sb.AppendLine().Append("ATAPI device supports host environment detection");
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-07 07:36:42 +00:00
|
|
|
if(ATAID.SATACapabilities2.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.SATACapabilitiesBit2.
|
|
|
|
|
DevAttSlimline))
|
2022-03-06 13:29:37 +00:00
|
|
|
sb.AppendLine().Append("ATAPI device supports attention on slimline connected devices");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//sb.AppendFormat("Negotiated speed = {0}", ((ushort)ATAID.SATACapabilities2 & 0x000E) >> 1);
|
2015-10-17 01:26:17 +01:00
|
|
|
}
|
2022-03-06 13:29:37 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if(ATAID.InterseekDelay != 0x0000 &&
|
|
|
|
|
ATAID.InterseekDelay != 0xFFFF)
|
|
|
|
|
sb.AppendLine().AppendFormat("{0} microseconds of interseek delay for ISO-7779 acoustic testing",
|
|
|
|
|
ATAID.InterseekDelay);
|
2018-06-22 08:08:38 +01:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if((ushort)ATAID.DeviceFormFactor != 0x0000 &&
|
|
|
|
|
(ushort)ATAID.DeviceFormFactor != 0xFFFF)
|
|
|
|
|
switch(ATAID.DeviceFormFactor)
|
2015-10-17 01:26:17 +01:00
|
|
|
{
|
2022-03-06 13:29:37 +00:00
|
|
|
case CommonTypes.Structs.Devices.ATA.Identify.DeviceFormFactorEnum.FiveAndQuarter:
|
|
|
|
|
sb.AppendLine().Append("Device nominal size is 5.25\"");
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
break;
|
|
|
|
|
case CommonTypes.Structs.Devices.ATA.Identify.DeviceFormFactorEnum.ThreeAndHalf:
|
|
|
|
|
sb.AppendLine().Append("Device nominal size is 3.5\"");
|
2018-06-22 08:08:38 +01:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
break;
|
|
|
|
|
case CommonTypes.Structs.Devices.ATA.Identify.DeviceFormFactorEnum.TwoAndHalf:
|
|
|
|
|
sb.AppendLine().Append("Device nominal size is 2.5\"");
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
break;
|
|
|
|
|
case CommonTypes.Structs.Devices.ATA.Identify.DeviceFormFactorEnum.OnePointEight:
|
|
|
|
|
sb.AppendLine().Append("Device nominal size is 1.8\"");
|
2015-10-17 01:26:17 +01:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
break;
|
|
|
|
|
case CommonTypes.Structs.Devices.ATA.Identify.DeviceFormFactorEnum.LessThanOnePointEight:
|
|
|
|
|
sb.AppendLine().Append("Device nominal size is smaller than 1.8\"");
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
break;
|
|
|
|
|
default:
|
|
|
|
|
sb.AppendLine().AppendFormat("Device nominal size field value {0} is unknown",
|
|
|
|
|
ATAID.DeviceFormFactor);
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
break;
|
|
|
|
|
}
|
2015-10-17 01:26:17 +01:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(atapi)
|
|
|
|
|
if(ATAID.ATAPIByteCount > 0)
|
|
|
|
|
sb.AppendLine().AppendFormat("{0} bytes count limit for ATAPI", ATAID.ATAPIByteCount);
|
2015-10-17 01:26:17 +01:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(cfa)
|
|
|
|
|
if((ATAID.CFAPowerMode & 0x8000) == 0x8000)
|
2015-10-17 01:26:17 +01:00
|
|
|
{
|
2022-03-06 13:29:37 +00:00
|
|
|
sb.AppendLine().Append("CompactFlash device supports power mode 1");
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if((ATAID.CFAPowerMode & 0x2000) == 0x2000)
|
|
|
|
|
sb.AppendLine().Append("CompactFlash power mode 1 required for one or more commands");
|
2015-10-17 01:26:17 +01:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if((ATAID.CFAPowerMode & 0x1000) == 0x1000)
|
|
|
|
|
sb.AppendLine().Append("CompactFlash power mode 1 is disabled");
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
sb.AppendLine().AppendFormat("CompactFlash device uses a maximum of {0} mA",
|
|
|
|
|
ATAID.CFAPowerMode & 0x0FFF);
|
|
|
|
|
}
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
sb.AppendLine();
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
sb.AppendLine().Append("Command set and features:");
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(ATAID.CommandSet.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CommandSetBit.Nop))
|
|
|
|
|
{
|
|
|
|
|
sb.AppendLine().Append("NOP is supported");
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(ATAID.EnabledCommandSet.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CommandSetBit.Nop))
|
|
|
|
|
sb.Append(" and enabled");
|
|
|
|
|
}
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(ATAID.CommandSet.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CommandSetBit.ReadBuffer))
|
|
|
|
|
{
|
|
|
|
|
sb.AppendLine().Append("READ BUFFER is supported");
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(ATAID.EnabledCommandSet.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CommandSetBit.ReadBuffer))
|
|
|
|
|
sb.Append(" and enabled");
|
|
|
|
|
}
|
2015-10-17 01:26:17 +01:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(ATAID.CommandSet.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CommandSetBit.WriteBuffer))
|
|
|
|
|
{
|
|
|
|
|
sb.AppendLine().Append("WRITE BUFFER is supported");
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(ATAID.EnabledCommandSet.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CommandSetBit.WriteBuffer))
|
|
|
|
|
sb.Append(" and enabled");
|
|
|
|
|
}
|
2015-10-17 01:26:17 +01:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(ATAID.CommandSet.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CommandSetBit.HPA))
|
|
|
|
|
{
|
|
|
|
|
sb.AppendLine().Append("Host Protected Area is supported");
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(ATAID.EnabledCommandSet.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CommandSetBit.HPA))
|
|
|
|
|
sb.Append(" and enabled");
|
|
|
|
|
}
|
2015-10-17 01:26:17 +01:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(ATAID.CommandSet.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CommandSetBit.DeviceReset))
|
|
|
|
|
{
|
|
|
|
|
sb.AppendLine().Append("DEVICE RESET is supported");
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(ATAID.EnabledCommandSet.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CommandSetBit.DeviceReset))
|
|
|
|
|
sb.Append(" and enabled");
|
|
|
|
|
}
|
2015-10-17 01:26:17 +01:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(ATAID.CommandSet.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CommandSetBit.Service))
|
|
|
|
|
{
|
|
|
|
|
sb.AppendLine().Append("SERVICE interrupt is supported");
|
2015-10-17 01:26:17 +01:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(ATAID.EnabledCommandSet.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CommandSetBit.Service))
|
|
|
|
|
sb.Append(" and enabled");
|
|
|
|
|
}
|
2015-10-17 01:26:17 +01:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(ATAID.CommandSet.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CommandSetBit.Release))
|
|
|
|
|
{
|
|
|
|
|
sb.AppendLine().Append("Release is supported");
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(ATAID.EnabledCommandSet.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CommandSetBit.Release))
|
|
|
|
|
sb.Append(" and enabled");
|
|
|
|
|
}
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(ATAID.CommandSet.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CommandSetBit.LookAhead))
|
|
|
|
|
{
|
|
|
|
|
sb.AppendLine().Append("Look-ahead read is supported");
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(ATAID.EnabledCommandSet.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CommandSetBit.LookAhead))
|
|
|
|
|
sb.Append(" and enabled");
|
|
|
|
|
}
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(ATAID.CommandSet.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CommandSetBit.WriteCache))
|
|
|
|
|
{
|
|
|
|
|
sb.AppendLine().Append("Write cache is supported");
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(ATAID.EnabledCommandSet.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CommandSetBit.WriteCache))
|
|
|
|
|
sb.Append(" and enabled");
|
|
|
|
|
}
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(ATAID.CommandSet.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CommandSetBit.Packet))
|
|
|
|
|
{
|
|
|
|
|
sb.AppendLine().Append("PACKET is supported");
|
2015-10-17 01:26:17 +01:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(ATAID.EnabledCommandSet.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CommandSetBit.Packet))
|
|
|
|
|
sb.Append(" and enabled");
|
|
|
|
|
}
|
2015-10-17 01:26:17 +01:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(ATAID.CommandSet.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CommandSetBit.PowerManagement))
|
|
|
|
|
{
|
|
|
|
|
sb.AppendLine().Append("Power management is supported");
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-07 07:36:42 +00:00
|
|
|
if(ATAID.EnabledCommandSet.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CommandSetBit.PowerManagement))
|
2022-03-06 13:29:37 +00:00
|
|
|
sb.Append(" and enabled");
|
|
|
|
|
}
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(ATAID.CommandSet.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CommandSetBit.RemovableMedia))
|
|
|
|
|
{
|
|
|
|
|
sb.AppendLine().Append("Removable media feature set is supported");
|
2015-10-17 01:26:17 +01:00
|
|
|
|
2022-03-07 07:36:42 +00:00
|
|
|
if(ATAID.EnabledCommandSet.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CommandSetBit.RemovableMedia))
|
2022-03-06 13:29:37 +00:00
|
|
|
sb.Append(" and enabled");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if(ATAID.CommandSet.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CommandSetBit.SecurityMode))
|
|
|
|
|
{
|
|
|
|
|
sb.AppendLine().Append("Security mode is supported");
|
2015-10-17 01:26:17 +01:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(ATAID.EnabledCommandSet.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CommandSetBit.SecurityMode))
|
|
|
|
|
sb.Append(" and enabled");
|
|
|
|
|
}
|
2015-10-17 01:26:17 +01:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(ATAID.Capabilities.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CapabilitiesBit.LBASupport))
|
|
|
|
|
sb.AppendLine().Append("28-bit LBA is supported");
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(ATAID.CommandSet2.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CommandSetBit2.MustBeSet) &&
|
|
|
|
|
!ATAID.CommandSet2.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CommandSetBit2.MustBeClear))
|
|
|
|
|
{
|
|
|
|
|
if(ATAID.CommandSet2.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CommandSetBit2.LBA48))
|
2015-10-17 01:26:17 +01:00
|
|
|
{
|
2022-03-06 13:29:37 +00:00
|
|
|
sb.AppendLine().Append("48-bit LBA is supported");
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(ATAID.EnabledCommandSet2.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CommandSetBit2.LBA48))
|
2019-11-25 00:54:38 +00:00
|
|
|
sb.Append(" and enabled");
|
2015-10-17 01:26:17 +01:00
|
|
|
}
|
2018-06-22 08:08:38 +01:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(ATAID.CommandSet2.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CommandSetBit2.FlushCache))
|
2015-10-17 01:26:17 +01:00
|
|
|
{
|
2022-03-06 13:29:37 +00:00
|
|
|
sb.AppendLine().Append("FLUSH CACHE is supported");
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-07 07:36:42 +00:00
|
|
|
if(ATAID.EnabledCommandSet2.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CommandSetBit2.FlushCache))
|
2019-11-25 00:54:38 +00:00
|
|
|
sb.Append(" and enabled");
|
2015-10-17 01:26:17 +01:00
|
|
|
}
|
2018-06-22 08:08:38 +01:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(ATAID.CommandSet2.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CommandSetBit2.FlushCacheExt))
|
2015-10-17 01:26:17 +01:00
|
|
|
{
|
2022-03-06 13:29:37 +00:00
|
|
|
sb.AppendLine().Append("FLUSH CACHE EXT is supported");
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(ATAID.EnabledCommandSet2.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CommandSetBit2.
|
|
|
|
|
FlushCacheExt))
|
2019-11-25 00:54:38 +00:00
|
|
|
sb.Append(" and enabled");
|
2015-10-17 01:26:17 +01:00
|
|
|
}
|
2018-06-22 08:08:38 +01:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(ATAID.CommandSet2.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CommandSetBit2.DCO))
|
2015-10-17 01:26:17 +01:00
|
|
|
{
|
2022-03-06 13:29:37 +00:00
|
|
|
sb.AppendLine().Append("Device Configuration Overlay feature set is supported");
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(ATAID.EnabledCommandSet2.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CommandSetBit2.DCO))
|
2019-11-25 00:54:38 +00:00
|
|
|
sb.Append(" and enabled");
|
2015-10-17 01:26:17 +01:00
|
|
|
}
|
2018-06-22 08:08:38 +01:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(ATAID.CommandSet2.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CommandSetBit2.AAM))
|
2015-10-17 01:26:17 +01:00
|
|
|
{
|
2022-03-06 13:29:37 +00:00
|
|
|
sb.AppendLine().Append("Automatic Acoustic Management is supported");
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(ATAID.EnabledCommandSet2.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CommandSetBit2.AAM))
|
|
|
|
|
sb.AppendFormat(" and enabled with value {0} (vendor recommends {1}", ATAID.CurrentAAM,
|
|
|
|
|
ATAID.RecommendedAAM);
|
2015-10-17 01:26:17 +01:00
|
|
|
}
|
2018-06-22 08:08:38 +01:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(ATAID.CommandSet2.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CommandSetBit2.SetMax))
|
2015-10-17 01:26:17 +01:00
|
|
|
{
|
2022-03-06 13:29:37 +00:00
|
|
|
sb.AppendLine().Append("SET MAX security extension is supported");
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(ATAID.EnabledCommandSet2.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CommandSetBit2.SetMax))
|
2019-11-25 00:54:38 +00:00
|
|
|
sb.Append(" and enabled");
|
2015-10-17 01:26:17 +01:00
|
|
|
}
|
2018-06-22 08:08:38 +01:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(ATAID.CommandSet2.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CommandSetBit2.
|
|
|
|
|
AddressOffsetReservedAreaBoot))
|
2015-10-17 01:26:17 +01:00
|
|
|
{
|
2022-03-06 13:29:37 +00:00
|
|
|
sb.AppendLine().Append("Address Offset Reserved Area Boot is supported");
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(ATAID.EnabledCommandSet2.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CommandSetBit2.
|
|
|
|
|
AddressOffsetReservedAreaBoot))
|
2019-11-25 00:54:38 +00:00
|
|
|
sb.Append(" and enabled");
|
2015-10-17 01:26:17 +01:00
|
|
|
}
|
2018-06-22 08:08:38 +01:00
|
|
|
|
2022-03-07 07:36:42 +00:00
|
|
|
if(ATAID.CommandSet2.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CommandSetBit2.SetFeaturesRequired))
|
2022-03-06 13:29:37 +00:00
|
|
|
sb.AppendLine().Append("SET FEATURES is required before spin-up");
|
|
|
|
|
|
|
|
|
|
if(ATAID.CommandSet2.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CommandSetBit2.PowerUpInStandby))
|
2015-10-17 01:26:17 +01:00
|
|
|
{
|
2022-03-06 13:29:37 +00:00
|
|
|
sb.AppendLine().Append("Power-up in standby is supported");
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(ATAID.EnabledCommandSet2.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CommandSetBit2.
|
|
|
|
|
PowerUpInStandby))
|
2019-11-25 00:54:38 +00:00
|
|
|
sb.Append(" and enabled");
|
2015-10-17 01:26:17 +01:00
|
|
|
}
|
2018-06-22 08:08:38 +01:00
|
|
|
|
2022-03-07 07:36:42 +00:00
|
|
|
if(ATAID.CommandSet2.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CommandSetBit2.RemovableNotification))
|
2015-10-17 01:26:17 +01:00
|
|
|
{
|
2022-03-06 13:29:37 +00:00
|
|
|
sb.AppendLine().Append("Removable Media Status Notification is supported");
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(ATAID.EnabledCommandSet2.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CommandSetBit2.
|
|
|
|
|
RemovableNotification))
|
2019-11-25 00:54:38 +00:00
|
|
|
sb.Append(" and enabled");
|
2015-10-17 01:26:17 +01:00
|
|
|
}
|
2018-06-22 08:08:38 +01:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(ATAID.CommandSet2.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CommandSetBit2.APM))
|
2015-10-17 01:26:17 +01:00
|
|
|
{
|
2022-03-06 13:29:37 +00:00
|
|
|
sb.AppendLine().Append("Advanced Power Management is supported");
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(ATAID.EnabledCommandSet2.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CommandSetBit2.APM))
|
|
|
|
|
sb.AppendFormat(" and enabled with value {0}", ATAID.CurrentAPM);
|
2015-10-17 01:26:17 +01:00
|
|
|
}
|
2018-06-22 08:08:38 +01:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(ATAID.CommandSet2.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CommandSetBit2.CompactFlash))
|
2015-10-17 01:26:17 +01:00
|
|
|
{
|
2022-03-06 13:29:37 +00:00
|
|
|
sb.AppendLine().Append("CompactFlash feature set is supported");
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(ATAID.EnabledCommandSet2.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CommandSetBit2.
|
|
|
|
|
CompactFlash))
|
2019-11-25 00:54:38 +00:00
|
|
|
sb.Append(" and enabled");
|
2015-10-17 01:26:17 +01:00
|
|
|
}
|
2018-06-22 08:08:38 +01:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(ATAID.CommandSet2.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CommandSetBit2.RWQueuedDMA))
|
2015-10-17 01:26:17 +01:00
|
|
|
{
|
2022-03-06 13:29:37 +00:00
|
|
|
sb.AppendLine().Append("READ DMA QUEUED and WRITE DMA QUEUED are supported");
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(ATAID.EnabledCommandSet2.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CommandSetBit2.
|
|
|
|
|
RWQueuedDMA))
|
2019-11-25 00:54:38 +00:00
|
|
|
sb.Append(" and enabled");
|
2015-10-17 01:26:17 +01:00
|
|
|
}
|
2018-06-22 08:08:38 +01:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(ATAID.CommandSet2.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CommandSetBit2.DownloadMicrocode))
|
2015-10-17 01:26:17 +01:00
|
|
|
{
|
2022-03-06 13:29:37 +00:00
|
|
|
sb.AppendLine().Append("DOWNLOAD MICROCODE is supported");
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(ATAID.EnabledCommandSet2.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CommandSetBit2.
|
|
|
|
|
DownloadMicrocode))
|
2019-11-25 00:54:38 +00:00
|
|
|
sb.Append(" and enabled");
|
2015-10-17 01:26:17 +01:00
|
|
|
}
|
2022-03-06 13:29:37 +00:00
|
|
|
}
|
2018-06-22 08:08:38 +01:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(ATAID.CommandSet.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CommandSetBit.SMART))
|
|
|
|
|
{
|
|
|
|
|
sb.AppendLine().Append("S.M.A.R.T. is supported");
|
|
|
|
|
|
|
|
|
|
if(ATAID.EnabledCommandSet.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CommandSetBit.SMART))
|
|
|
|
|
sb.Append(" and enabled");
|
|
|
|
|
}
|
|
|
|
|
|
2022-03-07 07:36:42 +00:00
|
|
|
if(ATAID.SCTCommandTransport.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.SCTCommandTransportBit.Supported))
|
2022-03-06 13:29:37 +00:00
|
|
|
sb.AppendLine().Append("S.M.A.R.T. Command Transport is supported");
|
2016-04-19 02:11:47 +01:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(ATAID.CommandSet3.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CommandSetBit3.MustBeSet) &&
|
|
|
|
|
!ATAID.CommandSet3.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CommandSetBit3.MustBeClear))
|
|
|
|
|
{
|
|
|
|
|
if(ATAID.CommandSet3.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CommandSetBit3.SMARTSelfTest))
|
2015-10-17 01:26:17 +01:00
|
|
|
{
|
2022-03-06 13:29:37 +00:00
|
|
|
sb.AppendLine().Append("S.M.A.R.T. self-testing is supported");
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(ATAID.EnabledCommandSet3.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CommandSetBit3.
|
|
|
|
|
SMARTSelfTest))
|
|
|
|
|
sb.Append(" and enabled");
|
|
|
|
|
}
|
2018-06-22 08:08:38 +01:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(ATAID.CommandSet3.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CommandSetBit3.SMARTLog))
|
|
|
|
|
{
|
|
|
|
|
sb.AppendLine().Append("S.M.A.R.T. error logging is supported");
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-07 07:36:42 +00:00
|
|
|
if(ATAID.EnabledCommandSet3.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CommandSetBit3.SMARTLog))
|
2022-03-06 13:29:37 +00:00
|
|
|
sb.Append(" and enabled");
|
|
|
|
|
}
|
2018-06-22 08:08:38 +01:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(ATAID.CommandSet3.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CommandSetBit3.IdleImmediate))
|
|
|
|
|
{
|
|
|
|
|
sb.AppendLine().Append("IDLE IMMEDIATE with UNLOAD FEATURE is supported");
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(ATAID.EnabledCommandSet3.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CommandSetBit3.
|
|
|
|
|
IdleImmediate))
|
|
|
|
|
sb.Append(" and enabled");
|
|
|
|
|
}
|
2018-06-22 08:08:38 +01:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(ATAID.CommandSet3.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CommandSetBit3.WriteURG))
|
|
|
|
|
sb.AppendLine().Append("URG bit is supported in WRITE STREAM DMA EXT and WRITE STREAM EXT");
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(ATAID.CommandSet3.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CommandSetBit3.ReadURG))
|
|
|
|
|
sb.AppendLine().Append("URG bit is supported in READ STREAM DMA EXT and READ STREAM EXT");
|
2018-06-22 08:08:38 +01:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(ATAID.CommandSet3.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CommandSetBit3.WWN))
|
|
|
|
|
sb.AppendLine().Append("Device has a World Wide Name");
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(ATAID.CommandSet3.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CommandSetBit3.FUAWriteQ))
|
|
|
|
|
{
|
|
|
|
|
sb.AppendLine().Append("WRITE DMA QUEUED FUA EXT is supported");
|
2018-06-22 08:08:38 +01:00
|
|
|
|
2022-03-07 07:36:42 +00:00
|
|
|
if(ATAID.EnabledCommandSet3.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CommandSetBit3.FUAWriteQ))
|
2022-03-06 13:29:37 +00:00
|
|
|
sb.Append(" and enabled");
|
|
|
|
|
}
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(ATAID.CommandSet3.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CommandSetBit3.FUAWrite))
|
|
|
|
|
{
|
|
|
|
|
sb.AppendLine().Append("WRITE DMA FUA EXT and WRITE MULTIPLE FUA EXT are supported");
|
2018-06-22 08:08:38 +01:00
|
|
|
|
2022-03-07 07:36:42 +00:00
|
|
|
if(ATAID.EnabledCommandSet3.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CommandSetBit3.FUAWrite))
|
2022-03-06 13:29:37 +00:00
|
|
|
sb.Append(" and enabled");
|
|
|
|
|
}
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(ATAID.CommandSet3.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CommandSetBit3.GPL))
|
|
|
|
|
{
|
|
|
|
|
sb.AppendLine().Append("General Purpose Logging is supported");
|
2018-06-22 08:08:38 +01:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(ATAID.EnabledCommandSet3.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CommandSetBit3.GPL))
|
|
|
|
|
sb.Append(" and enabled");
|
|
|
|
|
}
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(ATAID.CommandSet3.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CommandSetBit3.Streaming))
|
|
|
|
|
{
|
|
|
|
|
sb.AppendLine().Append("Streaming feature set is supported");
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-07 07:36:42 +00:00
|
|
|
if(ATAID.EnabledCommandSet3.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CommandSetBit3.Streaming))
|
2022-03-06 13:29:37 +00:00
|
|
|
sb.Append(" and enabled");
|
|
|
|
|
}
|
2018-06-22 08:08:38 +01:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(ATAID.CommandSet3.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CommandSetBit3.MCPT))
|
|
|
|
|
{
|
|
|
|
|
sb.AppendLine().Append("Media Card Pass Through command set is supported");
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(ATAID.EnabledCommandSet3.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CommandSetBit3.MCPT))
|
|
|
|
|
sb.Append(" and enabled");
|
|
|
|
|
}
|
2018-06-22 08:08:38 +01:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(ATAID.CommandSet3.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CommandSetBit3.MediaSerial))
|
|
|
|
|
{
|
|
|
|
|
sb.AppendLine().Append("Media Serial is supported");
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(ATAID.EnabledCommandSet3.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CommandSetBit3.
|
|
|
|
|
MediaSerial))
|
|
|
|
|
sb.Append(" and valid");
|
|
|
|
|
}
|
|
|
|
|
}
|
2018-06-22 08:08:38 +01:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(ATAID.CommandSet4.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CommandSetBit4.MustBeSet) &&
|
|
|
|
|
!ATAID.CommandSet4.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CommandSetBit4.MustBeClear))
|
|
|
|
|
{
|
|
|
|
|
if(ATAID.CommandSet4.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CommandSetBit4.DSN))
|
|
|
|
|
{
|
|
|
|
|
sb.AppendLine().Append("DSN feature set is supported");
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(ATAID.EnabledCommandSet4.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CommandSetBit4.DSN))
|
|
|
|
|
sb.Append(" and enabled");
|
|
|
|
|
}
|
2018-06-22 08:08:38 +01:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(ATAID.CommandSet4.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CommandSetBit4.AMAC))
|
|
|
|
|
{
|
|
|
|
|
sb.AppendLine().Append("Accessible Max Address Configuration is supported");
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(ATAID.EnabledCommandSet4.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CommandSetBit4.AMAC))
|
|
|
|
|
sb.Append(" and enabled");
|
|
|
|
|
}
|
2018-06-22 08:08:38 +01:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(ATAID.CommandSet4.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CommandSetBit4.ExtPowerCond))
|
|
|
|
|
{
|
|
|
|
|
sb.AppendLine().Append("Extended Power Conditions are supported");
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(ATAID.EnabledCommandSet4.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CommandSetBit4.
|
|
|
|
|
ExtPowerCond))
|
|
|
|
|
sb.Append(" and enabled");
|
2015-10-17 01:26:17 +01:00
|
|
|
}
|
|
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(ATAID.CommandSet4.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CommandSetBit4.ExtStatusReport))
|
2015-10-17 01:26:17 +01:00
|
|
|
{
|
2022-03-06 13:29:37 +00:00
|
|
|
sb.AppendLine().Append("Extended Status Reporting is supported");
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(ATAID.EnabledCommandSet4.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CommandSetBit4.
|
|
|
|
|
ExtStatusReport))
|
2019-11-25 00:54:38 +00:00
|
|
|
sb.Append(" and enabled");
|
2015-10-17 01:26:17 +01:00
|
|
|
}
|
|
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(ATAID.CommandSet4.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CommandSetBit4.FreeFallControl))
|
|
|
|
|
{
|
|
|
|
|
sb.AppendLine().Append("Free-fall control feature set is supported");
|
|
|
|
|
|
|
|
|
|
if(ATAID.EnabledCommandSet4.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CommandSetBit4.
|
|
|
|
|
FreeFallControl))
|
|
|
|
|
sb.Append(" and enabled");
|
|
|
|
|
}
|
2015-10-17 01:26:17 +01:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(ATAID.CommandSet4.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CommandSetBit4.
|
|
|
|
|
SegmentedDownloadMicrocode))
|
2015-10-17 01:26:17 +01:00
|
|
|
{
|
2022-03-06 13:29:37 +00:00
|
|
|
sb.AppendLine().Append("Segmented feature in DOWNLOAD MICROCODE is supported");
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(ATAID.EnabledCommandSet4.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CommandSetBit4.
|
|
|
|
|
SegmentedDownloadMicrocode))
|
|
|
|
|
sb.Append(" and enabled");
|
|
|
|
|
}
|
2018-06-22 08:08:38 +01:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(ATAID.CommandSet4.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CommandSetBit4.RWDMAExtGpl))
|
|
|
|
|
{
|
|
|
|
|
sb.AppendLine().Append("READ/WRITE DMA EXT GPL are supported");
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(ATAID.EnabledCommandSet4.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CommandSetBit4.
|
|
|
|
|
RWDMAExtGpl))
|
|
|
|
|
sb.Append(" and enabled");
|
|
|
|
|
}
|
2018-06-22 08:08:38 +01:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(ATAID.CommandSet4.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CommandSetBit4.WriteUnc))
|
|
|
|
|
{
|
|
|
|
|
sb.AppendLine().Append("WRITE UNCORRECTABLE is supported");
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-07 07:36:42 +00:00
|
|
|
if(ATAID.EnabledCommandSet4.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CommandSetBit4.WriteUnc))
|
2022-03-06 13:29:37 +00:00
|
|
|
sb.Append(" and enabled");
|
|
|
|
|
}
|
2018-06-22 08:08:38 +01:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(ATAID.CommandSet4.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CommandSetBit4.WRV))
|
|
|
|
|
{
|
|
|
|
|
sb.AppendLine().Append("Write/Read/Verify is supported");
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(ATAID.EnabledCommandSet4.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CommandSetBit4.WRV))
|
|
|
|
|
sb.Append(" and enabled");
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
sb.AppendLine().AppendFormat("{0} sectors for Write/Read/Verify mode 2", ATAID.WRVSectorCountMode2);
|
|
|
|
|
sb.AppendLine().AppendFormat("{0} sectors for Write/Read/Verify mode 3", ATAID.WRVSectorCountMode3);
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(ATAID.EnabledCommandSet4.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CommandSetBit4.WRV))
|
|
|
|
|
sb.AppendLine().AppendFormat("Current Write/Read/Verify mode: {0}", ATAID.WRVMode);
|
|
|
|
|
}
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(ATAID.CommandSet4.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CommandSetBit4.DT1825))
|
|
|
|
|
{
|
|
|
|
|
sb.AppendLine().Append("DT1825 is supported");
|
2018-06-22 08:08:38 +01:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(ATAID.EnabledCommandSet4.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CommandSetBit4.DT1825))
|
|
|
|
|
sb.Append(" and enabled");
|
|
|
|
|
}
|
|
|
|
|
}
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(ATAID.Capabilities3.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CapabilitiesBit3.BlockErase))
|
|
|
|
|
sb.AppendLine().Append("BLOCK ERASE EXT is supported");
|
2018-06-22 08:08:38 +01:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(ATAID.Capabilities3.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CapabilitiesBit3.Overwrite))
|
|
|
|
|
sb.AppendLine().Append("OVERWRITE EXT is supported");
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(ATAID.Capabilities3.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CapabilitiesBit3.CryptoScramble))
|
|
|
|
|
sb.AppendLine().Append("CRYPTO SCRAMBLE EXT is supported");
|
2018-06-22 08:08:38 +01:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(ATAID.CommandSet5.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CommandSetBit5.DeviceConfDMA))
|
2022-03-07 07:36:42 +00:00
|
|
|
sb.AppendLine().Append("DEVICE CONFIGURATION IDENTIFY DMA and DEVICE CONFIGURATION SET DMA are supported");
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(ATAID.CommandSet5.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CommandSetBit5.ReadBufferDMA))
|
|
|
|
|
sb.AppendLine().Append("READ BUFFER DMA is supported");
|
2018-06-22 08:08:38 +01:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(ATAID.CommandSet5.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CommandSetBit5.WriteBufferDMA))
|
|
|
|
|
sb.AppendLine().Append("WRITE BUFFER DMA is supported");
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(ATAID.CommandSet5.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CommandSetBit5.DownloadMicroCodeDMA))
|
|
|
|
|
sb.AppendLine().Append("DOWNLOAD MICROCODE DMA is supported");
|
2018-06-22 08:08:38 +01:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(ATAID.CommandSet5.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CommandSetBit5.SetMaxDMA))
|
|
|
|
|
sb.AppendLine().Append("SET PASSWORD DMA and SET UNLOCK DMA are supported");
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(ATAID.CommandSet5.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CommandSetBit5.Ata28))
|
|
|
|
|
sb.AppendLine().Append("Not all 28-bit commands are supported");
|
2015-10-17 01:26:17 +01:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(ATAID.CommandSet5.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CommandSetBit5.CFast))
|
|
|
|
|
sb.AppendLine().Append("Device follows CFast specification");
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(ATAID.CommandSet5.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CommandSetBit5.IEEE1667))
|
|
|
|
|
sb.AppendLine().Append("Device follows IEEE-1667");
|
2018-06-22 08:08:38 +01:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(ATAID.CommandSet5.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CommandSetBit5.DeterministicTrim))
|
|
|
|
|
{
|
|
|
|
|
sb.AppendLine().Append("Read after TRIM is deterministic");
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(ATAID.CommandSet5.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CommandSetBit5.ReadZeroTrim))
|
|
|
|
|
sb.AppendLine().Append("Read after TRIM returns empty data");
|
|
|
|
|
}
|
2018-06-22 08:08:38 +01:00
|
|
|
|
2022-03-07 07:36:42 +00:00
|
|
|
if(ATAID.CommandSet5.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CommandSetBit5.LongPhysSectorAligError))
|
2022-03-06 13:29:37 +00:00
|
|
|
sb.AppendLine().Append("Device supports Long Physical Sector Alignment Error Reporting Control");
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(ATAID.CommandSet5.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CommandSetBit5.Encrypted))
|
|
|
|
|
sb.AppendLine().Append("Device encrypts all user data");
|
2018-06-22 08:08:38 +01:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(ATAID.CommandSet5.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CommandSetBit5.AllCacheNV))
|
|
|
|
|
sb.AppendLine().Append("Device's write cache is non-volatile");
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(ATAID.CommandSet5.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CommandSetBit5.ZonedBit0) ||
|
|
|
|
|
ATAID.CommandSet5.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CommandSetBit5.ZonedBit1))
|
|
|
|
|
sb.AppendLine().Append("Device is zoned");
|
2018-06-22 08:08:38 +01:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(ATAID.Capabilities3.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CapabilitiesBit3.Sanitize))
|
|
|
|
|
{
|
|
|
|
|
sb.AppendLine().Append("Sanitize feature set is supported");
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
sb.AppendLine().
|
|
|
|
|
Append(ATAID.Capabilities3.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CapabilitiesBit3.
|
|
|
|
|
SanitizeCommands)
|
|
|
|
|
? "Sanitize commands are specified by ACS-3 or higher"
|
|
|
|
|
: "Sanitize commands are specified by ACS-2");
|
2018-06-22 08:08:38 +01:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(ATAID.Capabilities3.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CapabilitiesBit3.
|
|
|
|
|
SanitizeAntifreeze))
|
|
|
|
|
sb.AppendLine().Append("SANITIZE ANTIFREEZE LOCK EXT is supported");
|
|
|
|
|
}
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(!ata1 &&
|
|
|
|
|
maxatalevel >= 8)
|
2022-03-07 07:36:42 +00:00
|
|
|
if(ATAID.TrustedComputing.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.TrustedComputingBit.Set) &&
|
|
|
|
|
!ATAID.TrustedComputing.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.TrustedComputingBit.Clear) &&
|
2022-03-06 13:29:37 +00:00
|
|
|
ATAID.TrustedComputing.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.TrustedComputingBit.
|
|
|
|
|
TrustedComputing))
|
|
|
|
|
sb.AppendLine().Append("Trusted Computing feature set is supported");
|
|
|
|
|
|
|
|
|
|
if((ATAID.TransportMajorVersion & 0xF000) >> 12 == 0x1 ||
|
|
|
|
|
(ATAID.TransportMajorVersion & 0xF000) >> 12 == 0xE)
|
|
|
|
|
{
|
|
|
|
|
if(!ATAID.SATACapabilities.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.SATACapabilitiesBit.Clear))
|
|
|
|
|
if(ATAID.SATACapabilities.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.SATACapabilitiesBit.
|
|
|
|
|
ReadLogDMAExt))
|
|
|
|
|
sb.AppendLine().Append("READ LOG DMA EXT is supported");
|
|
|
|
|
|
2022-03-07 07:36:42 +00:00
|
|
|
if(!ATAID.SATACapabilities2.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.SATACapabilitiesBit2.Clear))
|
2022-03-06 13:29:37 +00:00
|
|
|
if(ATAID.SATACapabilities2.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.SATACapabilitiesBit2.
|
|
|
|
|
FPDMAQ))
|
|
|
|
|
sb.AppendLine().Append("RECEIVE FPDMA QUEUED and SEND FPDMA QUEUED are supported");
|
2018-06-22 08:08:38 +01:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(!ATAID.SATAFeatures.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.SATAFeaturesBit.Clear))
|
|
|
|
|
{
|
|
|
|
|
if(ATAID.SATAFeatures.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.SATAFeaturesBit.
|
|
|
|
|
NonZeroBufferOffset))
|
2015-10-17 01:26:17 +01:00
|
|
|
{
|
2022-03-06 13:29:37 +00:00
|
|
|
sb.AppendLine().Append("Non-zero buffer offsets are supported");
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(ATAID.EnabledSATAFeatures.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.SATAFeaturesBit.
|
|
|
|
|
NonZeroBufferOffset))
|
2019-11-25 00:54:38 +00:00
|
|
|
sb.Append(" and enabled");
|
2015-10-17 01:26:17 +01:00
|
|
|
}
|
2018-06-22 08:08:38 +01:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(ATAID.SATAFeatures.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.SATAFeaturesBit.DMASetup))
|
2015-10-17 01:26:17 +01:00
|
|
|
{
|
2022-03-06 13:29:37 +00:00
|
|
|
sb.AppendLine().Append("DMA Setup auto-activation is supported");
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(ATAID.EnabledSATAFeatures.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.SATAFeaturesBit.
|
|
|
|
|
DMASetup))
|
2019-11-25 00:54:38 +00:00
|
|
|
sb.Append(" and enabled");
|
2015-10-17 01:26:17 +01:00
|
|
|
}
|
2018-06-22 08:08:38 +01:00
|
|
|
|
2022-03-07 07:36:42 +00:00
|
|
|
if(ATAID.SATAFeatures.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.SATAFeaturesBit.InitPowerMgmt))
|
2015-10-17 01:26:17 +01:00
|
|
|
{
|
2022-03-06 13:29:37 +00:00
|
|
|
sb.AppendLine().Append("Device-initiated power management is supported");
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(ATAID.EnabledSATAFeatures.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.SATAFeaturesBit.
|
|
|
|
|
InitPowerMgmt))
|
2019-11-25 00:54:38 +00:00
|
|
|
sb.Append(" and enabled");
|
2015-10-17 01:26:17 +01:00
|
|
|
}
|
2018-06-22 08:08:38 +01:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(ATAID.SATAFeatures.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.SATAFeaturesBit.InOrderData))
|
2015-10-17 01:26:17 +01:00
|
|
|
{
|
2022-03-06 13:29:37 +00:00
|
|
|
sb.AppendLine().Append("In-order data delivery is supported");
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(ATAID.EnabledSATAFeatures.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.SATAFeaturesBit.
|
|
|
|
|
InOrderData))
|
2019-11-25 00:54:38 +00:00
|
|
|
sb.Append(" and enabled");
|
2015-10-17 01:26:17 +01:00
|
|
|
}
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-11-13 19:38:02 +00:00
|
|
|
switch(atapi)
|
|
|
|
|
{
|
|
|
|
|
case false:
|
2015-10-17 01:26:17 +01:00
|
|
|
{
|
2022-11-13 19:38:02 +00:00
|
|
|
if(ATAID.SATAFeatures.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.SATAFeaturesBit.
|
|
|
|
|
HardwareFeatureControl))
|
|
|
|
|
{
|
|
|
|
|
sb.AppendLine().Append("Hardware Feature Control is supported");
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-11-13 19:38:02 +00:00
|
|
|
if(ATAID.EnabledSATAFeatures.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.
|
|
|
|
|
SATAFeaturesBit.HardwareFeatureControl))
|
|
|
|
|
sb.Append(" and enabled");
|
|
|
|
|
}
|
2018-06-22 08:08:38 +01:00
|
|
|
|
2022-11-13 19:38:02 +00:00
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
case true:
|
2015-10-17 01:26:17 +01:00
|
|
|
{
|
2022-11-13 19:38:02 +00:00
|
|
|
if(ATAID.SATAFeatures.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.SATAFeaturesBit.
|
|
|
|
|
AsyncNotification))
|
|
|
|
|
{
|
|
|
|
|
sb.AppendLine().Append("Asynchronous notification is supported");
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-11-13 19:38:02 +00:00
|
|
|
if(ATAID.EnabledSATAFeatures.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.
|
|
|
|
|
SATAFeaturesBit.AsyncNotification))
|
|
|
|
|
sb.Append(" and enabled");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
break;
|
2015-10-17 01:26:17 +01:00
|
|
|
}
|
2022-11-13 19:38:02 +00:00
|
|
|
}
|
2018-06-22 08:08:38 +01:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(ATAID.SATAFeatures.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.SATAFeaturesBit.
|
|
|
|
|
SettingsPreserve))
|
2015-10-17 01:26:17 +01:00
|
|
|
{
|
2022-03-06 13:29:37 +00:00
|
|
|
sb.AppendLine().Append("Software Settings Preservation is supported");
|
2016-04-19 02:11:47 +01:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(ATAID.EnabledSATAFeatures.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.SATAFeaturesBit.
|
|
|
|
|
SettingsPreserve))
|
|
|
|
|
sb.Append(" and enabled");
|
2015-10-17 01:26:17 +01:00
|
|
|
}
|
|
|
|
|
|
2022-03-07 07:36:42 +00:00
|
|
|
if(ATAID.SATAFeatures.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.SATAFeaturesBit.NCQAutoSense))
|
2022-03-06 13:29:37 +00:00
|
|
|
sb.AppendLine().Append("NCQ Autosense is supported");
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(ATAID.EnabledSATAFeatures.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.SATAFeaturesBit.
|
|
|
|
|
EnabledSlumber))
|
|
|
|
|
sb.AppendLine().Append("Automatic Partial to Slumber transitions are enabled");
|
2015-10-17 01:26:17 +01:00
|
|
|
}
|
2022-03-06 13:29:37 +00:00
|
|
|
}
|
2015-10-17 01:26:17 +01:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if((ATAID.RemovableStatusSet & 0x03) > 0)
|
|
|
|
|
sb.AppendLine().Append("Removable Media Status Notification feature set is supported");
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(ATAID.FreeFallSensitivity != 0x00 &&
|
|
|
|
|
ATAID.FreeFallSensitivity != 0xFF)
|
|
|
|
|
sb.AppendLine().AppendFormat("Free-fall sensitivity set to {0}", ATAID.FreeFallSensitivity);
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(ATAID.DataSetMgmt.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.DataSetMgmtBit.Trim))
|
|
|
|
|
sb.AppendLine().Append("TRIM is supported");
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(ATAID.DataSetMgmtSize > 0)
|
|
|
|
|
sb.AppendLine().AppendFormat("DATA SET MANAGEMENT can receive a maximum of {0} blocks of 512 bytes",
|
|
|
|
|
ATAID.DataSetMgmtSize);
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
sb.AppendLine().AppendLine();
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(ATAID.SecurityStatus.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.SecurityStatusBit.Supported))
|
|
|
|
|
{
|
|
|
|
|
sb.AppendLine("Security:");
|
2015-10-17 01:26:17 +01:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(ATAID.SecurityStatus.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.SecurityStatusBit.Enabled))
|
2015-10-17 01:26:17 +01:00
|
|
|
{
|
2022-03-06 13:29:37 +00:00
|
|
|
sb.AppendLine("Security is enabled");
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-07 07:36:42 +00:00
|
|
|
sb.AppendLine(ATAID.SecurityStatus.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.SecurityStatusBit.
|
|
|
|
|
Locked) ? "Security is locked"
|
|
|
|
|
: "Security is not locked");
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-07 07:36:42 +00:00
|
|
|
sb.AppendLine(ATAID.SecurityStatus.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.SecurityStatusBit.
|
|
|
|
|
Frozen) ? "Security is frozen"
|
|
|
|
|
: "Security is not frozen");
|
2015-10-17 01:26:17 +01:00
|
|
|
|
2022-03-07 07:36:42 +00:00
|
|
|
sb.AppendLine(ATAID.SecurityStatus.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.SecurityStatusBit.
|
|
|
|
|
Expired) ? "Security count has expired"
|
|
|
|
|
: "Security count has not expired");
|
2018-06-22 08:08:38 +01:00
|
|
|
|
2022-03-07 07:36:42 +00:00
|
|
|
sb.AppendLine(ATAID.SecurityStatus.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.SecurityStatusBit.
|
|
|
|
|
Maximum) ? "Security level is maximum"
|
|
|
|
|
: "Security level is high");
|
2015-10-17 01:26:17 +01:00
|
|
|
}
|
2022-03-06 13:29:37 +00:00
|
|
|
else
|
|
|
|
|
sb.AppendLine("Security is not enabled");
|
2015-10-17 01:26:17 +01:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(ATAID.SecurityStatus.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.SecurityStatusBit.Enhanced))
|
|
|
|
|
sb.AppendLine("Supports enhanced security erase");
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
sb.AppendFormat("{0} minutes to complete secure erase", ATAID.SecurityEraseTime * 2).AppendLine();
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(ATAID.SecurityStatus.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.SecurityStatusBit.Enhanced))
|
2022-03-07 07:36:42 +00:00
|
|
|
sb.AppendFormat("{0} minutes to complete enhanced secure erase", ATAID.EnhancedSecurityEraseTime * 2).
|
|
|
|
|
AppendLine();
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
sb.AppendFormat("Master password revision code: {0}", ATAID.MasterPasswordRevisionCode).AppendLine();
|
|
|
|
|
}
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(ATAID.CommandSet3.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CommandSetBit3.MustBeSet) &&
|
|
|
|
|
!ATAID.CommandSet3.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CommandSetBit3.MustBeClear) &&
|
|
|
|
|
ATAID.CommandSet3.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.CommandSetBit3.Streaming))
|
|
|
|
|
{
|
|
|
|
|
sb.AppendLine().AppendLine("Streaming:");
|
|
|
|
|
sb.AppendFormat("Minimum request size is {0}", ATAID.StreamMinReqSize);
|
|
|
|
|
sb.AppendFormat("Streaming transfer time in PIO is {0}", ATAID.StreamTransferTimePIO);
|
|
|
|
|
sb.AppendFormat("Streaming transfer time in DMA is {0}", ATAID.StreamTransferTimeDMA);
|
|
|
|
|
sb.AppendFormat("Streaming access latency is {0}", ATAID.StreamAccessLatency);
|
|
|
|
|
sb.AppendFormat("Streaming performance granularity is {0}", ATAID.StreamPerformanceGranularity);
|
|
|
|
|
}
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-07 07:36:42 +00:00
|
|
|
if(ATAID.SCTCommandTransport.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.SCTCommandTransportBit.Supported))
|
2022-03-06 13:29:37 +00:00
|
|
|
{
|
|
|
|
|
sb.AppendLine().AppendLine("S.M.A.R.T. Command Transport (SCT):");
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(ATAID.SCTCommandTransport.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.SCTCommandTransportBit.
|
|
|
|
|
LongSectorAccess))
|
|
|
|
|
sb.AppendLine("SCT Long Sector Address is supported");
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(ATAID.SCTCommandTransport.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.SCTCommandTransportBit.
|
|
|
|
|
WriteSame))
|
|
|
|
|
sb.AppendLine("SCT Write Same is supported");
|
2017-12-19 20:33:03 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(ATAID.SCTCommandTransport.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.SCTCommandTransportBit.
|
|
|
|
|
ErrorRecoveryControl))
|
|
|
|
|
sb.AppendLine("SCT Error Recovery Control is supported");
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(ATAID.SCTCommandTransport.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.SCTCommandTransportBit.
|
|
|
|
|
FeaturesControl))
|
|
|
|
|
sb.AppendLine("SCT Features Control is supported");
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if(ATAID.SCTCommandTransport.HasFlag(CommonTypes.Structs.Devices.ATA.Identify.SCTCommandTransportBit.
|
|
|
|
|
DataTables))
|
|
|
|
|
sb.AppendLine("SCT Data Tables are supported");
|
|
|
|
|
}
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if((ATAID.NVCacheCaps & 0x0010) == 0x0010)
|
|
|
|
|
{
|
|
|
|
|
sb.AppendLine().AppendLine("Non-Volatile Cache:");
|
|
|
|
|
sb.AppendLine().AppendFormat("Version {0}", (ATAID.NVCacheCaps & 0xF000) >> 12).AppendLine();
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if((ATAID.NVCacheCaps & 0x0001) == 0x0001)
|
|
|
|
|
{
|
|
|
|
|
sb.Append("Power mode feature set is supported");
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
if((ATAID.NVCacheCaps & 0x0002) == 0x0002)
|
|
|
|
|
sb.Append(" and enabled");
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
sb.AppendLine();
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
sb.AppendLine().AppendFormat("Version {0}", (ATAID.NVCacheCaps & 0x0F00) >> 8).AppendLine();
|
|
|
|
|
}
|
2019-11-25 00:54:38 +00:00
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
sb.AppendLine().AppendFormat("Non-Volatile Cache is {0} bytes", ATAID.NVCacheSize * logicalSectorSize).
|
|
|
|
|
AppendLine();
|
2015-10-17 01:26:17 +01:00
|
|
|
}
|
2022-03-06 13:29:37 +00:00
|
|
|
|
|
|
|
|
#if DEBUG
|
|
|
|
|
sb.AppendLine();
|
|
|
|
|
|
|
|
|
|
if(ATAID.VendorWord9 != 0x0000 &&
|
|
|
|
|
ATAID.VendorWord9 != 0xFFFF)
|
|
|
|
|
sb.AppendFormat("Word 9: 0x{0:X4}", ATAID.VendorWord9).AppendLine();
|
|
|
|
|
|
|
|
|
|
if((ATAID.VendorWord47 & 0x7F) != 0x7F &&
|
|
|
|
|
(ATAID.VendorWord47 & 0x7F) != 0x00)
|
|
|
|
|
sb.AppendFormat("Word 47 bits 15 to 8: 0x{0:X2}", ATAID.VendorWord47).AppendLine();
|
|
|
|
|
|
|
|
|
|
if(ATAID.VendorWord51 != 0x00 &&
|
|
|
|
|
ATAID.VendorWord51 != 0xFF)
|
|
|
|
|
sb.AppendFormat("Word 51 bits 7 to 0: 0x{0:X2}", ATAID.VendorWord51).AppendLine();
|
|
|
|
|
|
|
|
|
|
if(ATAID.VendorWord52 != 0x00 &&
|
|
|
|
|
ATAID.VendorWord52 != 0xFF)
|
|
|
|
|
sb.AppendFormat("Word 52 bits 7 to 0: 0x{0:X2}", ATAID.VendorWord52).AppendLine();
|
|
|
|
|
|
|
|
|
|
if(ATAID.ReservedWord64 != 0x00 &&
|
|
|
|
|
ATAID.ReservedWord64 != 0xFF)
|
|
|
|
|
sb.AppendFormat("Word 64 bits 15 to 8: 0x{0:X2}", ATAID.ReservedWord64).AppendLine();
|
|
|
|
|
|
|
|
|
|
if(ATAID.ReservedWord70 != 0x0000 &&
|
|
|
|
|
ATAID.ReservedWord70 != 0xFFFF)
|
|
|
|
|
sb.AppendFormat("Word 70: 0x{0:X4}", ATAID.ReservedWord70).AppendLine();
|
|
|
|
|
|
|
|
|
|
if(ATAID.ReservedWord73 != 0x0000 &&
|
|
|
|
|
ATAID.ReservedWord73 != 0xFFFF)
|
|
|
|
|
sb.AppendFormat("Word 73: 0x{0:X4}", ATAID.ReservedWord73).AppendLine();
|
|
|
|
|
|
|
|
|
|
if(ATAID.ReservedWord74 != 0x0000 &&
|
|
|
|
|
ATAID.ReservedWord74 != 0xFFFF)
|
|
|
|
|
sb.AppendFormat("Word 74: 0x{0:X4}", ATAID.ReservedWord74).AppendLine();
|
|
|
|
|
|
|
|
|
|
if(ATAID.ReservedWord116 != 0x0000 &&
|
|
|
|
|
ATAID.ReservedWord116 != 0xFFFF)
|
|
|
|
|
sb.AppendFormat("Word 116: 0x{0:X4}", ATAID.ReservedWord116).AppendLine();
|
|
|
|
|
|
2022-03-07 07:36:42 +00:00
|
|
|
for(var i = 0; i < ATAID.ReservedWords121.Length; i++)
|
2022-03-06 13:29:37 +00:00
|
|
|
if(ATAID.ReservedWords121[i] != 0x0000 &&
|
|
|
|
|
ATAID.ReservedWords121[i] != 0xFFFF)
|
|
|
|
|
sb.AppendFormat("Word {1}: 0x{0:X4}", ATAID.ReservedWords121[i], 121 + i).AppendLine();
|
|
|
|
|
|
2022-03-07 07:36:42 +00:00
|
|
|
for(var i = 0; i < ATAID.ReservedWords129.Length; i++)
|
2022-03-06 13:29:37 +00:00
|
|
|
if(ATAID.ReservedWords129[i] != 0x0000 &&
|
|
|
|
|
ATAID.ReservedWords129[i] != 0xFFFF)
|
|
|
|
|
sb.AppendFormat("Word {1}: 0x{0:X4}", ATAID.ReservedWords129[i], 129 + i).AppendLine();
|
|
|
|
|
|
2022-03-07 07:36:42 +00:00
|
|
|
for(var i = 0; i < ATAID.ReservedCFA.Length; i++)
|
2022-03-06 13:29:37 +00:00
|
|
|
if(ATAID.ReservedCFA[i] != 0x0000 &&
|
|
|
|
|
ATAID.ReservedCFA[i] != 0xFFFF)
|
|
|
|
|
sb.AppendFormat("Word {1} (CFA): 0x{0:X4}", ATAID.ReservedCFA[i], 161 + i).AppendLine();
|
|
|
|
|
|
|
|
|
|
if(ATAID.ReservedWord174 != 0x0000 &&
|
|
|
|
|
ATAID.ReservedWord174 != 0xFFFF)
|
|
|
|
|
sb.AppendFormat("Word 174: 0x{0:X4}", ATAID.ReservedWord174).AppendLine();
|
|
|
|
|
|
|
|
|
|
if(ATAID.ReservedWord175 != 0x0000 &&
|
|
|
|
|
ATAID.ReservedWord175 != 0xFFFF)
|
|
|
|
|
sb.AppendFormat("Word 175: 0x{0:X4}", ATAID.ReservedWord175).AppendLine();
|
|
|
|
|
|
|
|
|
|
if(ATAID.ReservedCEATAWord207 != 0x0000 &&
|
|
|
|
|
ATAID.ReservedCEATAWord207 != 0xFFFF)
|
|
|
|
|
sb.AppendFormat("Word 207 (CE-ATA): 0x{0:X4}", ATAID.ReservedCEATAWord207).AppendLine();
|
|
|
|
|
|
|
|
|
|
if(ATAID.ReservedCEATAWord208 != 0x0000 &&
|
|
|
|
|
ATAID.ReservedCEATAWord208 != 0xFFFF)
|
|
|
|
|
sb.AppendFormat("Word 208 (CE-ATA): 0x{0:X4}", ATAID.ReservedCEATAWord208).AppendLine();
|
|
|
|
|
|
|
|
|
|
if(ATAID.NVReserved != 0x00 &&
|
|
|
|
|
ATAID.NVReserved != 0xFF)
|
|
|
|
|
sb.AppendFormat("Word 219 bits 15 to 8: 0x{0:X2}", ATAID.NVReserved).AppendLine();
|
|
|
|
|
|
|
|
|
|
if(ATAID.WRVReserved != 0x00 &&
|
|
|
|
|
ATAID.WRVReserved != 0xFF)
|
|
|
|
|
sb.AppendFormat("Word 220 bits 15 to 8: 0x{0:X2}", ATAID.WRVReserved).AppendLine();
|
|
|
|
|
|
|
|
|
|
if(ATAID.ReservedWord221 != 0x0000 &&
|
|
|
|
|
ATAID.ReservedWord221 != 0xFFFF)
|
|
|
|
|
sb.AppendFormat("Word 221: 0x{0:X4}", ATAID.ReservedWord221).AppendLine();
|
|
|
|
|
|
2022-03-07 07:36:42 +00:00
|
|
|
for(var i = 0; i < ATAID.ReservedCEATA224.Length; i++)
|
2022-03-06 13:29:37 +00:00
|
|
|
if(ATAID.ReservedCEATA224[i] != 0x0000 &&
|
|
|
|
|
ATAID.ReservedCEATA224[i] != 0xFFFF)
|
|
|
|
|
sb.AppendFormat("Word {1} (CE-ATA): 0x{0:X4}", ATAID.ReservedCEATA224[i], 224 + i).AppendLine();
|
|
|
|
|
|
2022-03-07 07:36:42 +00:00
|
|
|
for(var i = 0; i < ATAID.ReservedWords.Length; i++)
|
2022-03-06 13:29:37 +00:00
|
|
|
if(ATAID.ReservedWords[i] != 0x0000 &&
|
|
|
|
|
ATAID.ReservedWords[i] != 0xFFFF)
|
|
|
|
|
sb.AppendFormat("Word {1}: 0x{0:X4}", ATAID.ReservedWords[i], 236 + i).AppendLine();
|
|
|
|
|
#endif
|
|
|
|
|
return sb.ToString();
|
2015-10-16 01:55:55 +01:00
|
|
|
}
|
2017-12-19 20:33:03 +00:00
|
|
|
}
|