首页
社区
课程
招聘
关于LDTR局部描述符表寄存器
发表于: 2010-5-13 03:46 8124

关于LDTR局部描述符表寄存器

2010-5-13 03:46
8124
百度上看到这样的说法

   “LDTR 类似于段寄存器,由程序员可见的16bit寄存器和程序员不可见的高速缓冲寄存器组成。在初始化或切换任务过程中,把描述符对应任务LDT的描述符的选择子装入LDTR,处理器根据LDTR可见部分的选择子从GDT中取出对应描述符,并把LDT的基地址、界限和属性等信息保存在LDTR的不可见高速缓冲寄 存器中。随后对LDT的访问可根据保存在高速缓冲寄存器中的有关信息进行合法性检查。”

我想不明白“初始化或切换任务过程中,对应任务LDT的描述符的选择子装入LDTR” 这个LDT描述符的16位选择子数值是哪来的?

“LDT的基地址、界限和属性等信息保存在LDTR的不可见高速缓冲寄 存器中”这里的基地址、界限 数值又是怎么产生并装入到LDTR中的啊 ?

一些书上好像都没说清楚 LDTR的运作过程 虽然这个东西没必要深究 但是想不明白不爽啊 哎

大牛们谁知道的请指点下吧 谢谢了

[培训]《安卓高级研修班(网课)》月薪三万计划,掌握调试、分析还原ollvm、vmp的方法,定制art虚拟机自动化脱壳的方法

收藏
免费 0
支持
分享
最新回复 (5)
雪    币: 331
活跃值: (57)
能力值: ( LV7,RANK:100 )
在线值:
发帖
回帖
粉丝
2
LLDT - Load Local Descriptor Table Register
0F 00 /2         LLDT r/m16         Load segment selector r/m16 into LDTR

Description
Loads the source operand into the segment selector field of the local descriptor table register (LDTR). The source operand (a general-purpose register or a memory location) contains a segment selector that points to a local descriptor table (LDT). After the segment selector is loaded in the LDTR, the processor uses to segment selector to locate the segment descriptor for the LDT in the global descriptor table (GDT). It then loads the segment limit and base address for the LDT from the segment descriptor into the LDTR. The segment registers DS, ES, SS, FS, GS, and CS are not affected by this instruction, nor is the LDTR field in the task state segment (TSS) for the current task.

If the source operand is 0, the LDTR is marked invalid and all references to descriptors in the LDT (except by the LAR, VERR, VERW or LSL instructions) cause a general protection excep-tion (#GP).

The operand-size attribute has no effect on this instruction.

The LLDT instruction is provided for use in operating-system software; it should not be used in application programs. Also, this instruction can only be executed in protected mode.
2010-5-13 10:24
0
雪    币: 90
活跃值: (91)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
3
金山词霸:  

把源操作数载入这个LDTR的段选择子
这个包含源操作数的段选择子用于指明局部描述符LDT
在这个段选择子被载入LDTR后
处理器就通过这个段选择子来定位GDT中LDT的地址
然后载入LDTR中用来描述LDT的限长和基址
其他段选择子和在任务状态段中的LDTR区不受影响
如果源操作数为0,LDTR寄存器被标记位无效,所有引用的LDT描述符会出现一个通用保护异常

我想问的是源操作数是哪来的  是什么改变了LDTR 从而确定LDT的位置的

LDTR中属于高速缓存区的的基址和限长是哪来的


2010-5-13 19:48
0
雪    币: 90
活跃值: (91)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
4
怎么没人回答啊 多少给点提示啊
2010-5-17 14:09
0
雪    币: 90
活跃值: (91)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
5
不小心回了2条了
2010-5-17 14:10
0
雪    币: 12
活跃值: (10)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
6
不错 过来学习下 哈哈
2010-5-17 14:53
0
游客
登录 | 注册 方可回帖
返回
//