百科问答小站 logo
百科问答小站 font logo



如果在内核把特权级切换到用户态之前屏蔽 CPU 对软中断的响应,是不是就再也进不了内核态了? 第1页

  

user avatar   bei-ji-85 网友的相关建议: 
      

CLI — Clear Interrupt Flag

Description

In most cases, CLI clears the IF flag in the EFLAGS register and no other flags are affected. Clearing the IF flag causes the processor to ignore maskable external interrupts. The IF flag and the CLI and STI instruction have no effect on the generation of exceptions and NMI interrupts.

6.3.3 Software-Generated Interrupts

The INT n instruction permits interrupts to be generated from within software by supplying an interrupt vector number as an operand. For example, the INT 35 instruction forces an implicit call to the interrupt handler for interrupt 35.

Any of the interrupt vectors from 0 to 255 can be used as a parameter in this instruction. If the processor's predefined NMI vector is used, however, the response of the processor will not be the same as it would be from an NMI interrupt generated in the normal manner. If vector number 2 (the NMI vector) is used in this instruction, the NMI interrupt handler is called, but the processor’s NMI-handling hardware is not activated.

Interrupts generated in software with the INT n instruction cannot be masked by the IF flag in the EFLAGS register.

注意加粗部分。

另外,SYSENTER/SYSCALL都可以进内核态。

结论就是,不能。




  

相关话题

  现在这个时间段CPU该如何去做选择? 
  如何评价Linux 内核核心成员Theodore Ts'o被 Sage Sharp 指控为强奸辩护者? 
  为什么多数手机芯片能对 MP4 格式文件直接解码,但 RMVB 不行? 
  需要怎样的基本知识才能看懂卡吧图吧大佬们装逼? 
  如何评价AMD Zen3 5000系列CPU? 
  中国没有能力制造中央处理器(CPU),如果超威半导体(AMD)和英特尔商量好在中国卖高价会怎么样? 
  为什么英特尔x86等多数中央处理器不支持源操作数和目标操作数同时为内存的指令? 
  现代中央处理器(CPU)是怎样进行分支预测的? 
  intel i7 6700和4790k? 
  为什么数码圈里只看得起旗舰SOC? 

前一个讨论
都说固态硬盘寿命短,那么有谁把使用寿命用完了吗?
下一个讨论
USB 3.0 速度远不如 SATA,为什么现在外接硬盘柜还是普遍用 USB 接口?





© 2024-11-14 - tinynew.org. All Rights Reserved.
© 2024-11-14 - tinynew.org. 保留所有权利