大硬盘常用端口

1F3H  LBA块地址0~7位
1F4H  LBA块地址8~15位
1F5H  LBA块地址16~23位
1F6H  0-3位: LBA块地址24~27位
      第4位: 驱动器
            0 = 主盘
            1 = 从盘
      第5位  寻址方式
            0 = CHS
            1 = LBA

这样28位LBA地址可以寻址131G空间

 

 

查了ATAPI7标准,48位LBA用的依然是1F3H,1F4H,1F5H三个寄存器来存储LBA地址,1F2存储扇区数。但是每一个寄存器都要连续写两次。
1F2H: 第一次写扇区数的8-15位,第二次写扇区数的0-7位
1F3H: 第一次写LBA的24-31位,第二次写LBA的0-7位
1F4H: 第一次写LBA的32-39位,第二次写LBA的8-15位
1F5H: 第一次写LBA的40-47位,第二次写LBA的16-23位
1F6H: 低4位保留,高4位和以前一样

这样的设计完全和旧的28位LBA兼容

主要命令:
- 读扇区,DMA方式  25H                   
- 读扇区          24H
- 写扇区,DMA方式  35H
- 写扇区          34H


以上资料来源: ATAPI-7标准文档·卷2

 

上面提到的内容在标准文档的第25页。 下面是原文:

In a device implementing the 48-bit Address feature set, the Features register, the Sector Count register, the
LBA Low register, the LBA Mid register, and the LBA High register are each a two byte deep FIFO. Each time
one of these registers is written, the new content written is placed into the “most recently written” location and
the previous content of the register is moved to “previous content” location. For example, when a 48-bit Address
feature set READ SECTOR(S) EXT command is written to the device Command register, the address used by
the command is as described in Table 3.
Table 3 - 48-bit addresses
Register    “most recently written”    “previous content”
Features      Reserved                    Reserved
Sector Count  Sector count (7:0)          Sector count (15:8)
LBA Low      LBA (7:0)                  LBA (31:24)
LBA Mid      LBA (15:8)                  LBA (39:32)
LBA High      LBA (23:16)                LBA (47:40)
Device register Bits 7 and 5 are obsolete, the LBA bit shall be set to one, the DEV bit shall indicate the selected device, bits (3:0) are reserved

  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值