9.4 Interrupt Descriptor Table

中断描述符表

The interrupt descriptor table (IDT) associates each interrupt or exception identifier with a descriptor for the instructions that service the associated event. Like the GDT and LDTs, the IDT is an array of 8-byte descriptors. Unlike the GDT and LDTs, the first entry of the IDT may contain a descriptor. To form an index into the IDT, the processor multiplies the interrupt or exception identifier by eight. Because there are only 256 identifiers, the IDT need not contain more than 256 descriptors. It can contain fewer than 256 entries; entries are required only for interrupt identifiers that are actually used.

中断描述符表(IDT)将每个中断或异常标识与指向服务相关事件的指令描述符联系起来。就象GDT和LDT一样,IDT是一个8字节的描述符数组。但与GDT和LDT不同的是,IDT的第一个项包含一个描述符。处理器将中断或异常的标识乘以8来取得IDT的索引。因为仅有256个标识符,IDT不需要包含多于256个描述符。可以包含少于256个项;仅那些被实际使用到的中断标识需要相对应的项。

The IDT may reside anywhere in physical memory. As Figure 9-1 shows, the processor locates the IDT by means of the IDT register (IDTR). The instructions LIDT and SIDT operate on the IDTR. Both instructions have one explicit operand: the address in memory of a 6-byte area. Figure 9-2 shows the format of this area.

IDT可以放在物理内存的任何地方。正如图9-1所示,处理器通过IDT寄存器(IDTR)的数值来定位IDT。指令LIDT和SIDT操作IDTR。两个指令都有一个明确的操作数:一个6字节的内存区域作为地址。图9-2展示了内存区域的格式。

LIDT (Load IDT register) loads the IDT register with the linear base address and limit values contained in the memory operand. This instruction can be executed only when the CPL is zero. It is normally used by the initialization logic of an operating system when creating an IDT. An operating system may also use it to change from one IDT to another.

LIDT(装入IDT寄存器)将内存操作数装入IDT寄存器,基内包含一个线性地址和限长值。这个指令仅当CPL为0时被执行。操作系统通常在初始化中创建一个IDT后使用该指令。操作系统也可以用它将IDT修改成另一个。

SIDT (Store IDT register) copies the base and limit value stored in IDTR to a memory location. This instruction can be executed at any privilege level.

SIDT(保存IDT寄存器内容)拷贝存储在IDTR中的基址和限长值保存到内存中。这条指令可以在任何特权级别上执行。

9.5 IDT Descriptors 中断描述符

The IDT may contain any of three kinds of descriptor:

IDT表可以包含以下三种描述符

  • Task gates  任务门
  • Interrupt gates 中断门
  • Trap gates 陷阱门

Figure 9-3 illustrates the format of task gates and 80386 interrupt gates and trap gates. (The task gate in an IDT is the same as the task gate already discussed inChapter 7.)

图9-3解释了任务门、中断门及陷阱门的格式。(IDT中的任务门与第7章中讨论过的任务门相同。)

【译】x86程序员手册32-9.4 中断描述符表的更多相关文章

  1. 【译】x86程序员手册08 -2.6中断和异常

    2.6 Interrupts and Exceptions 中断和异常 The 80386 has two mechanisms for interrupting program execution: ...

  2. 【译】x86程序员手册01

    Intel 80386 Reference Programmer's Manual 80386程序员参考手册 Chapter 1 -- Introduction to the 80386 第1章 - ...

  3. 【译】x86程序员手册03 - 2.1内存组织和分段

    2.1 Memory Organization and Segmentation 内存组织和分段 The physical memory of an 80386 system is organized ...

  4. 【译】x86程序员手册39-10.3切换到保护模式

    10.3 Switching to Protected Mode  切换到保护模式 Setting the PE bit of the MSW in CR0 causes the 80386 to b ...

  5. 【译】x86程序员手册11- 4.1系统寄存器

    4.1 Systems Registers 系统寄存器 The registers designed for use by systems programmers fall into these cl ...

  6. 【译】x86程序员手册38-10.2实在址模式下的软件初始化

    10.2 Software Initialization for Real-Address Mode   实地址模式的软件初始化 In real-address mode a few structur ...

  7. 【译】x86程序员手册09-第3章程序指令集

    注:觉得本章内容与理解操作系统不直接相关,所以本章并未看完,也就没有翻译完,放在这里中是为了保证手册的完整.有兴趣的人可以去原址查看. https://pdos.csail.mit.edu/6.828 ...

  8. 【译】x86程序员手册00 - 翻译起因

    从上一次学习MIT的操作系统课程又过去了一年.上次学习并没有坚持下去.想来虽有种种原因,其还在自身无法坚持罢了.故此次再鼓起勇气重新学习,发现课程都已由2014改版为2016了.但大部分内容并没有改变 ...

  9. 【译】x86程序员手册35-9.8异常条件

    译注:一些异常没有翻译,因为看书时主要为了理解linux代码,所以代码中没有主要使用的就没有仔细看.这部分内容后期再看时再进行翻译. 9.8 Exception Conditions 异常条件 The ...

  10. 【译】x86程序员手册31- 第9章 异常和中断

    Chapter 9 Exceptions and Interrupts 第9章 异常和中断 Interrupts and exceptions are special kinds of control ...

随机推荐

  1. Java类加载机制?

    深入研究Java类加载机制 类加载是Java程序运行的第一步,研究类的加载有助于了解JVM执行过程,并指导开发者采取更有效的措施配合程序执行. 研究类加载机制的第二个目的是让程序能动态的控制类加载,比 ...

  2. get the page name from url

    https://stackoverflow.com/questions/1874532/better-way-to-get-page-name The way I interpret the ques ...

  3. Python装饰器单例

    版权声明:本文为博主原创文章,未经博主允许不得转载. https://blog.csdn.net/dutsoft/article/details/52057981#!/usr/bin/python#c ...

  4. net share

    IT知识梳理 2017-11-30 06:57:10 Dos 命令进阶(一)讲解思路 1.Net常用命令 (1)net share - 查看共享命令 net share ipc$ - 设置ipc$共享 ...

  5. vertical-align 和line-height 以及baseline的解析

    line-height是相对于font-size来计算的,vertical-align的百分比值是相对于line-height来计算的,vertical-align的默认是baseline; demo ...

  6. Linux 系统管理命令 - mpstat - CPU信息统计

    命令详解 重要星级: ★★★★☆ 功能说明: mpstat 是 Multiprocessor Statistics 的缩写,是一种实时系统监控工具.mpstat 命令会输出 CPU 的一些统计信息,这 ...

  7. bzoj 1997: [Hnoi2010]Planar【瞎搞+黑白染色】

    脑补一下给出的图:一个环,然后有若干连接环点的边,我们就是要求这些边不重叠 考虑一下不重叠的情况,两个有交边一定要一个在环内一个在环外,所以把相交的边连边,然后跑黑白染色看是否能不矛盾即可(可能算个2 ...

  8. bzoj1303[CQOI2008]中位数图 / 乱搞

    题目描述 给出1~n的一个排列,统计该排列有多少个长度为奇数的连续子序列的中位数是b.中位数是指把所有元素从小到大排列后,位于中间的数. 输入输出格式 输入格式: 第一行为两个正整数n和b,第二行为1 ...

  9. 爬虫—Requests高级用法

    Requests高级用法 1.文件上传 我们知道requests可以模拟提交一些数据.假如有的网站需要上传文件,我们也可以用requests来实现. import requests files = { ...

  10. Vim 插件的安装

    Vim 自带了文本格式化,通过 gg=G 触发.但大数情况下不满足需求,对于特定语言,比如 JavaScript,需要安装相应的插件来实现. 插件的存在形式 Vim 插件以三种形式存在, 单个的 .v ...