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. SVN服务器端的使用

    SVN服务器端的使用 1.下载VirtualSVN Server,安装好后打开,右键Repository->新建->Repository创意一个版本库.默认点击下一步,输入要创建版本库的名 ...

  2. Lightoj 1005 Rooks(DP)

    A rook is a piece used in the game of chess which is played on a board of square grids. A rook can o ...

  3. caioj1271&&poj3071: 概率期望值2:足球

    见到网上的大佬们都用了位运算..表示看不懂就自己想了,还挺好想的(然而我不会告诉你我因为p的数组问题卡了半小时顺便D了ZZZ大佬的数据) DP方程(伪)就是:第t轮第i个队晋级的可能=第t-1轮第i个 ...

  4. Ubuntu+anaconda环境里安装opencv

    在Ubuntu的Anaconda环境下安装OpenCV比较方便,直接在终端中输入以下命令: conda install --channel https://conda.anaconda.org/men ...

  5. CentOS 6.6实现永久修改DNS地址的方法

    本文实例讲述了CentOS 6.6实现永久修改DNS地址的方法. 百牛信息技术bainiu.ltd整理发布于博客园 分享给大家供大家参考,具体如下:1.配置ip地址文件 /etc/sysconfig/ ...

  6. Mysql数据库的数据类型、索引、锁、事务和视图

    Mysql数据库的数据类型.索引.锁.事务和视图 数据的类型 1)数据类型: 数据长什么样? 数据需要多少空间来存放? 系统内置数据类型和用户定义数据类型 2)MySql 支持多种列类型: 数值类型 ...

  7. bzoj 4481: [Jsoi2015]非诚勿扰【期望+树状数组】

    首先很容易计算对于一个如意郎君列表里有x个男性的女性,编号排第i位的男性被选的概率是 \[ p*(1-p)^{i-1}+p*(1-p)^{i-1+n}+p*(1-p)^{i-1+n}+- \] \[ ...

  8. bzoj 4245: [ONTAK2015]OR-XOR【按位贪心】

    知道按位贪心但是不知道怎么贪-- 求一个a的异或前缀和s,然后按位从大到小贪心,ans的当前位能为0的条件是s中有>=m个位置这一位为0且没有flag,并且s[n]的这一位为0 如果符合要求,那 ...

  9. bzoj 1597: [Usaco2008 Mar]土地购买【斜率优化】

    按xy降序排序,把能被完全包含的去掉 然后就得到了x升序y降序的一个数组 然后方程就显然了:f[i]=min(f[j]+y[j+1]x[i]) 斜率优化转移 说起来我还不会斜率优化呢是不是该学一下了 ...

  10. poj 1815 Friendship【最小割】

    网络流的题总是出各种奇怪的错啊--没写过邻接表版的dinic,然后bfs扫到t点不直接return 1就会TTTTTLE-- 题目中的操作是"去掉人",很容易想到拆点,套路一般是( ...