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