ATA和ATAPI类型硬盘区别方法
2010-08-26 17:37
896 查看
ATA和ATAPI类型硬盘区别方法
2010-05-21 17:48
http://hi.baidu.com/linuxcasting/blog/item/3b04d7383e78f4ff3b87ce39.html
2010-05-21 17:48
目前,计算机主板IDE控制器连接的硬盘有ATA(AT Attachment)类型和ATAPI(AT Attachment Packet Interface)类型。那么,软件程序BIOS或者Linux内核是如何才能识别出硬盘是那种类型的呢? 在参考文档[1]中,定义了识别硬盘类型的方法,如下所示: A device not implementing the PACKET command feature set shall place the signature in the Command Block registers listed below for power-on reset, hardware reset, software reset, and the EXECUTE DEVICE DIAGNOSTIC command. If the device does not implement the PACKET command feature set, the signature shall be: Sector Count 01h LBA Low 01h LBA Mid 00h LBA High 00h Device 00h A device implementing the PACKET command feature set shall place the signature in the Command Block registers listed below for power-on reset, hardware reset, software reset, the EXECUTE DEVICE DIAGNOSTIC command, and the DEVICE RESET command. If the device implements the PACKET command feature set, the signature shall be: Sector Count 01h LBA Low 01h LBA Mid 14h LBA High EBh Device 000x0000b where x equals 0 except when responding to a DEVICE RESET, IDENTIFY DEVICE, or READ SECTOR(S) command. For a DEVICE RESET, IDENTIFY DEVICE, or READ SECTOR(S) command the value of x is not changed from that existing when the command is written to the Command register. 在经过软件复位或者硬件复位等操作后,比较LBA Mid和LBA High寄存器中的值是否分别是14h和EBh,就可知连接的硬盘是ATA(AT Attachment)类型还是ATAPI(AT Attachment Packet Interface)类型。 参考文档: [1]. Information Technology – AT Attachment with Packet Interface – 6(ATA /ATAPI-6) |
相关文章推荐
- 【JavaScript】基本数据类型与引用数据类型区别(及为什么String、Boolean、Number基本数据类型会有属性和方法?)
- (面试)C#类和接口、虚方法和抽象方法及值类型和引用类型的区别 1.C#类和接口的区别
- 类类型作为方法的参数时,使用 ref 和不使用ref的区别?
- python序列类型字符串的方法L.index()与L.find()区别
- C#类和接口、虚方法和抽象方法及值类型和引用类型的区别
- Override和Overload的区别,Overloaded的方法是否可以改变返回值的类型?
- C#类和接口、虚方法和抽象方法及值类型和引用类型的区别
- WINDOWS 7下将硬盘由ATA修改为AHCI的方法
- String类型中slice()、substr()和substring()方法的区别
- C#类和接口、虚方法和抽象方法及值类型和引用类型的区别
- C#类和接口、虚方法和抽象方法及值类型和引用类型的区别(转)
- Overload和Override的区别。Overloaded的方法是否可以改变返回值的类型?
- js中精确判断对象类型--关于typeof 和Object.prototype.toString方法的区别
- C# 中==和Equals方法在引用类型中的区别
- C#类和接口、虚方法和抽象方法及值类型和引用类型的区别
- js中的typeof和instanceof的用法和区别(附类型判断方法)
- 【转】C#类和接口、虚方法和抽象方法及 值类型和引用类型的区别
- 重载(overload)和重写(override)的区别?重载的方法能否根据返回类型进行区分?
- 面试题:Overload和Override的区别。Overload的方法是否可以改变返回值的类型?
- java中,方法参数是基本类型和引用类型的区别