当前位置: 首页 > news >正文

atapi!IdeReadWrite函数分析下之Send read command


第一部分:

#define SRB_USES_DMA(Srb)               (((ULONG_PTR)Srb->SrbExtension) & 2)

    [+0x028] SrbExtension     : 0x2 [Type: void *]


第二部分:

#define IDE_COMMAND_READ_DMA                    0xC8

        //
        // Send read command.
        //
        if (SRB_USES_DMA(Srb)) {

            IdePortOutPortByte (
                               baseIoAddress1->Command,
                               IDE_COMMAND_READ_DMA);

#define IdePortOutPortByte(addr, data) WRITE_PORT_UCHAR(addr, data)  


第三部分:

0: kd> dt HW_DEVICE_EXTENSION 0x895e98a8                    esi=895e98a8
atapi!HW_DEVICE_EXTENSION
   +0x000 CurrentSrb       : 0x89529734 _SCSI_REQUEST_BLOCK
   +0x004 BaseIoAddress1   : _IDE_REGISTERS_1
   +0x028 BaseIoAddress2   : _IDE_REGISTERS_2
   +0x034 BaseIoAddress1Length : 8
   +0x038 BaseIoAddress2Length : 1
0: kd> dx -id 0,0,899a2278 -r1 (*((atapi!_IDE_REGISTERS_1 *)0x895e98ac))
(*((atapi!_IDE_REGISTERS_1 *)0x895e98ac))                 [Type: _IDE_REGISTERS_1]
    [+0x000] RegistersBaseAddress : 0x1f0 : Unable to read memory at Address 0x1f0 [Type: unsigned char *]
    [+0x004] Data             : 0x1f0 : Unable to read memory at Address 0x1f0 [Type: unsigned short *]
    [+0x008] Error            : 0x1f1 : Unable to read memory at Address 0x1f1 [Type: unsigned char *]
    [+0x00c] BlockCount       : 0x1f2 : Unable to read memory at Address 0x1f2 [Type: unsigned char *]
    [+0x010] BlockNumber      : 0x1f3 : Unable to read memory at Address 0x1f3 [Type: unsigned char *]
    [+0x014] CylinderLow      : 0x1f4 : Unable to read memory at Address 0x1f4 [Type: unsigned char *]
    [+0x018] CylinderHigh     : 0x1f5 : Unable to read memory at Address 0x1f5 [Type: unsigned char *]
    [+0x01c] DriveSelect      : 0x1f6 : Unable to read memory at Address 0x1f6 [Type: unsigned char *]
    [+0x020] Command          : 0x1f7 : Unable to read memory at Address 0x1f7 [Type: unsigned char *]

第四部分:

0: kd> p
atapi!IdeReadWrite+0x1da:
f729cd04 68c8000000      push    0C8h
0: kd> p
atapi!IdeReadWrite+0x1df:
f729cd09 ff7624          push    dword ptr [esi+24h]
0: kd> r
eax=00000060 ebx=804f4d68 ecx=000000e0 edx=000001f5 esi=895e98a8 edi=89529734


0: kd> pr
eax=00000060 ebx=804f4d68 ecx=000000e0 edx=000001f5 esi=895e98a8 edi=89529734
eip=f729cd0c esp=f78d5ef0 ebp=f78d5f0c iopl=0         nv up ei pl nz na po nc
cs=0008  ss=0010  ds=0023  es=0023  fs=0030  gs=0000             efl=00000202
atapi!IdeReadWrite+0x1e2:
f729cd0c ffd3            call    ebx {hal!WRITE_PORT_UCHAR (804f4d68)}


0: kd> dd 0x025fe000
025fe000  ???????? ???????? ???????? ????????
025fe010  ???????? ???????? ???????? ????????
025fe020  ???????? ???????? ???????? ????????
025fe030  ???????? ???????? ???????? ????????
025fe040  ???????? ???????? ???????? ????????

相关文章:

  • 边缘计算场景下的大模型落地:基于 Cherry Studio 的 DeepSeek-R1-0528 本地部署
  • Linux 下如何查看进程的资源限制信息?
  • 第二十章 文本处理
  • HTML实现端午节主题网站:龙舟争渡,凭吊祭江诵君赋。
  • 光电设计大赛智能车激光对抗方案分享:低成本高效备赛攻略
  • 人工智能在智能健康监测中的创新应用与未来趋势
  • 【Netty系列】消息编码解码框架
  • JS基础知识(第十五天)
  • day15 leetcode-hot100-29(链表8)
  • 一周学会Pandas2之Python数据处理与分析-数据重塑与透视-melt() - 融化 / 逆透视 (宽 -> 长)
  • 深入理解交叉熵损失函数——全面推演各种形式
  • python:PyMOL 能处理 *.pdb 文件吗?
  • 《操作系统真相还原》——初探保护模式
  • java开发中#和$的区别
  • 火绒 6.0 全家桶合集 - 绿色单文件提取版 (垃圾清理/右键管理/弹窗拦截等)
  • Centos环境下安装/重装MySQL完整教程
  • 深度学习|pytorch基本运算-广播失效
  • QT6引入QMediaPlaylist类
  • redis核心知识点
  • LeetCode Hot100 (贪心)
  • 手机wordpress无法评论/项链seo关键词
  • 网站建设的原则有哪些方面/哈尔滨优化推广公司
  • wordpress回收站 恢复/北京网站优化排名
  • 做同行的旅游网站/网站制作报价
  • 梵客家装靠谱吗/百度关键词优化软件
  • 网站服务器租用时间/做网站公司