首页
社区
课程
招聘
WDM驱动程序内加汇编代码问题
发表于: 2007-2-24 20:57 4972

WDM驱动程序内加汇编代码问题

2007-2-24 20:57
4972
在一WDM驱动的DriverEntry函数内加入了
_asm
{
  ...
  int 13h
}
这样的代码
为什么一运行就蓝屏了呢wdm驱动不是运行在RING0的吗

[课程]Android-CTF解题方法汇总!

收藏
免费 0
支持
分享
最新回复 (6)
雪    币: 202
活跃值: (10)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
2
不懂,学习中..........
2007-2-25 09:35
0
雪    币: 290
活跃值: (535)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
3
WDM中还能用INT13H吗?
2007-2-25 23:44
0
雪    币: 291
活跃值: (213)
能力值: ( LV12,RANK:210 )
在线值:
发帖
回帖
粉丝
4
int 13h是SIMD浮点异常,结果当然是BSOD
注意这个和DOS下的中断向量表是不同的啊,DOS下int 13h是BIOS调用,而Windows下是SIMD浮点异常

下面是Window的中断描述符表的一部分
Interrupt Descriptor Table
Base: 8003F400   Limit: 000007FF

Selector        - Segment Selector for destination code segment
Offset                - Offset to procedure entry point
DPL                ?Descriptor privilege level
P                ?Segment present
D                - Size of gate: 1 = 32 bits; 0 = 16 bits D

--------------------------------------------------------------------------------------------------------------
Int.  Sel.:Offset    DPL  P   D        Descriptor Type   Description
--------------------------------------------------------------------------------------------------------------
0000  0008:804E0BFF   0   P   32 bits  Interrupt Gate   Fault       Divide Error
0001  0008:82FC201D   0   P   32 bits  Interrupt Gate   Fault/Trap  Debug
0002  0058:0000112E   0   P            Task Gate        Interrupt   NMI Interrupt
0003  0008:82FC203C   3   P   32 bits  Interrupt Gate   Trap        Breakpoint
0004  0008:804E12E0   3   P   32 bits  Interrupt Gate   Trap        Overflow
0005  0008:804E1441   0   P   32 bits  Interrupt Gate   Fault       BOUND Range Exceeded
0006  0008:F7D7816D   0   P   32 bits  Interrupt Gate   Fault       Invalid Opcode (Undefined Opcode). Was introduced in the Pentium Pro processor
0007  0008:804E1C33   0   P   32 bits  Interrupt Gate   Fault       Device Not Available (No Math Coprocessor)
0008  0050:00001188   0   P            Task Gate        Abort       Double Fault
0009  0008:804E2060   0   P   32 bits  Interrupt Gate   Fault       Coprocessor Segment Overrun (reserved). IA-32 processors after the Intel386 processor do not generate this exception.
000A  0008:804E2185   0   P   32 bits  Interrupt Gate   Fault       Invalid TSS
000B  0008:804E22CA   0   P   32 bits  Interrupt Gate   Fault       Segment Not Present
000C  0008:804E2530   0   P   32 bits  Interrupt Gate   Fault       Stack-Segment Fault
000D  0008:804E2827   0   P   32 bits  Interrupt Gate   Fault       General Protection
000E  0008:F7D77FC2   0   P   32 bits  Interrupt Gate   Fault       Page Fault
000F  0008:804E325A   0   P   32 bits  Interrupt Gate               Intel reserved. Do not use
0010  0008:804E337F   0   P   32 bits  Interrupt Gate   Fault       x87 FPU Floating-Point Error (Math Fault)
0011  0008:804E34BD   0   P   32 bits  Interrupt Gate   Fault       Alignment Check. Was introduced in the Intel486 processor.
0012  00A0:804E325A   0   P            Task Gate        Abort       Machine Check. Was introduced in the Pentium processor and enhanced in the P6 family processors.
0013  0008:804E362B   0   P   32 bits  Interrupt Gate   Fault       SIMD Floating-Point Exception. Was introduced in the Pentium III processor.
2007-2-26 17:46
0
雪    币: 224
活跃值: (10)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
5
您说的DOS下int 13h是BIOS调用让我产生了一点疑惑
那在MBR中的代码是不是连中断都不能调用了?因为那个时候DOS还没有被加载
还有个疑问windows下是不是就算在ring0下也无法调用BOIS中断了呢?
2007-2-27 15:38
0
雪    币: 2134
活跃值: (14)
能力值: (RANK:170 )
在线值:
发帖
回帖
粉丝
6
最初由 jwtck 发布
您说的DOS下int 13h是BIOS调用让我产生了一点疑惑
那在MBR中的代码是不是连中断都不能调用了?因为那个时候DOS还没有被加载
还有个疑问windows下是不是就算在ring0下也无法调用BOIS中断了呢?


建议看一下加载顺序
2007-2-27 16:54
0
雪    币: 291
活跃值: (213)
能力值: ( LV12,RANK:210 )
在线值:
发帖
回帖
粉丝
7
                             / Dos启动->初始化Dos系统相关的中断向量
系统复位->初始化中断向量表->|
                             \ Windows启动->初始化中断描述符表->进入保护模式->这时原实模式下的中断向量表不能直接访问
Windows会建立自己的中断处理程序,所以int 13h调的是Windows的SIMD浮点异常处理例程而不是实模式下的BIOS调用
2007-2-27 21:09
0
游客
登录 | 注册 方可回帖
返回
//