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

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  ???????? ???????? ???????? ????????

http://www.xdnf.cn/news/10379.html

相关文章:

  • uv:现代化的 Python 包和项目管理工具
  • 论爱情《态度》
  • 在 ABP VNext 中集成 Serilog:打造可观测、结构化日志系统
  • Java 文件操作 和 IO(4)-- Java文件内容操作(2)-- 字符流操作
  • threejsPBR材质与纹理贴图
  • 跑步前热身动作
  • redis核心知识点
  • PCIE硬件管脚顺序问题解决方案
  • C# 如何获取当前成员函数的函数名
  • C语言:字符函数和字符串函数
  • SoftThinking:让模型学会模糊思考,同时提升准确性和推理速度!!
  • 电路学习(二)之电容
  • 【LaTex公式】使用align环境实现cases文本的换行
  • Java 认识异常
  • 基于FashionMnist数据集的自监督学习(生成式自监督学习AE算法)
  • 浮点数舍入规则_编程语言对比
  • HTML实现端午节主题网站:龙舟争渡,凭吊祭江诵君赋。
  • 【后端高阶面经:架构篇】52、微服务架构:微服务是银弹吗?
  • Arm处理器调试采用jlink硬件调试器的命令使用大全
  • Python训练营打卡 Day41
  • 应急响应靶机-web3-知攻善防实验室
  • 【基础算法】模拟算法
  • Redis 持久化机制详解:RDB 与 AOF 的原理、优缺点与最佳实践
  • Java-File类基本方法使用指南
  • 【深度学习】15. Segment Anything Model (SAM) :基于提示的分割新时代
  • 题解:洛谷 P12672 「LAOI-8」近期我们注意到有网站混淆视听
  • MCP架构深度解析:从基础原理到核心设计
  • c++第三章练习题
  • 每日算法-250531
  • Ubuntu使用说明