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. ip地址的唯一性是如何保证的

    连接ISP网络时,运行商就分配了一个ip地址,所以,ip地址是运营商指定的. 账户只是控制是否可以接入而已,只要是插上网线,就已经动态分配了ip地址.

  2. 深入理解Java执行时数据区

    前情回想 在本专栏的前12篇博客中. 我们主要大致介绍了什么是JVM, 而且具体介绍了class文件的格式. 对于深入理解Java, 或者深入理解运行于JVM上的其它语言, 深入理解class文件格式 ...

  3. js数组清空和去重

    1.splice var ary = [1,2,3,4]; ary.splice(0,ary.length); console.log(ary); // 输出 Array[0],空数组,即被清空了 2 ...

  4. 加载之ready和onload

    页面加载完成有两种事件,一是ready,表示文档结构已经加载完成(不包含图片等非文字媒体文件),二是onload,指示页面包含图片等文件在内的所有元素都加载完成. 真不知道这个标题该怎么取,暂时就先凑 ...

  5. Cmake的介绍和使用 Cmake实践【转】

    本文转载自:http://www.cppblog.com/Roger/archive/2011/11/17/160368.html Cmake的介绍和使用 Cmake实践 Cmake优点: 1.    ...

  6. string operation in powershell

    https://blogs.technet.microsoft.com/heyscriptingguy/2014/07/15/keep-your-hands-clean-use-powershell- ...

  7. Serializable 接口与 Java 序列化与反序列化

    0. 序列化的意义 从内存到本地即为本地化或者在网络中进行传输,或叫序列化,持久化. 某 Java 类实现 Serializable 接口的目的是为了可持久化(简单理解为本地化),比如网络传输或本地存 ...

  8. Watir: Get document detail information in Watir.

    ie.#{element}(:id,"foo").document.currentstyle.attributeAsCamelCase so ie.#{element}(:id,& ...

  9. AutoIT: GUISetFont VS GUICtrlSetFont

    GUISetFont 可以设置默认字体,后面的资源都会用该字体,而 GUICtrlSetFont 可以对特定控件的字体进行设置. ;Combo,setfont, GUICtrlSetFont $fon ...

  10. 服务器开发入门——理解异步I/O

    对于服务器程序,I/O是制约系统性能最关键的因素.对于需要处理大量连接的高并发服务器程序,异步I/O几乎是不二的选择.Linux和Windows都为异步I/O构建了大量的基础设施.本文总结了一下Lin ...