百科问答小站 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 已经做到了 12 代,但很多人的笔记本电脑仍在使用 5 代或更早的处理器? 
  AMD 锐龙 9 6900HX 曝光,集成全新 RX 680M 图形单元,还有哪些细节值得关注? 
  Linux内核代码大佬们如何观看的? 
  为什么有的地方叫X86-64,有的地方叫AMD64? 
  有消息称台积电获得向华为供货许可,如何看待这一消息? 
  中断为什么一定要在内核空间处理,如果把中断放到用户态处理可能会产生什么问题? 
  分析称苹果 M1 Ultra 造价约 300~350 美元,低于英特尔至强处理器,价低的原因是什么? 
  苹果M1芯片真香,但是未来寿命如何,多久会被市场淘汰? 
  其他配置相同的情况下i5和amd的R5和R7笔记本CPU,执行同样的中等压力的任务,哪个会更安静一些? 
  为什么手机上wifi都用sdio接口,不用usb接口? 

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





© 2024-12-22 - tinynew.org. All Rights Reserved.
© 2024-12-22 - tinynew.org. 保留所有权利