Differences between different interrupts: SCI, SMI, NMI and normal interrupt

I am studying Intel architecture. So far, I have come across several types of interrupts:

  • SCI: system management interrupt, a system interrupt used by hardware to notify the OS of ACPI events. SCI is an active, low, affordable, level interrupt.
  • SMI: interrupt system management, interrupt OS transparency generated by interrupt events on legacy systems.
  • NMI: non-maskable interrupt
  • Normal interruption: processed via IDT with vector 0 ~ 255.

Anyone can help compare their significant difference in simple words from the following aspects?

  • How are they intended to be used?
  • How are they generated?
  • Can we generate them using software?
  • How are they processed?

ADD 1

  • What is the priority between all these types of interrupts?

ADD 2

Some related threads:

How is the SCI - System Cotnrol interrupt vector determined?

Various ways to run SMI for a processor

+4
source share
1 answer

At the beginning, the x86 processor had two pins that could be used to notify of an incoming interrupt: INTR (interrupt request) and NMI (Non Maskable Interrupt)

INTR and NMI pins are on the lower left edge of the chip

While the 8086 chip is shown in the figure, these pins stuck until what is known as LAPIC (more on this below) in the Pentium era.

INTR, , CPU ( ) , , , .
IF ( ) (E)FLAGS , .

INTR , 8259A, PIC ( ).

NMI, , CPU 2. , NMI 2.
IF NMI, , NMI : MSb 70h .

NMI : , , ; , , , ( ).

NMI 2, NMI IVT ( , ) IDT ( , ).


DOS 2 BIOS, , (, ECC , - suddend) (, reset ).

, BIOS, cli, NMI, .

BIOS 2, , .
NMI , NMI cli.


Intel , , , .
, SMM ( ).

SMM CPU, 34 2 Intel:

SMM (SMI), ( ), , . ( SMI) , SMI (SMRAM) . SMM SMI , , . SMI , (RSM).

SMM, SMI ( ).

SMM - SMI SMI # SMI-, APIC.

SMI , , SMI # , .

SMI ​​ 386, .
, , Intel SMI 60h-64h, USB-.
PS2 ; SMM 60h-64h USB-.


Pentium Intel LAPIC ( ), INTR NMI , LINT0 LINT1 ( ).
LINT0 LINT1 , 10 2 Intel:

Customizable contacts LINT0 and LINT1

reset LINT0 INTR LINT1 NMI .

, .
, , PCI , . IOAPIC [MSI] s (https://en.wikipedia.org/wiki/Message_Signaled_Interrupts) .


, , SMI :
, , , .

ACPI.

, , SMM, ACPI - (AML).
, .

ACPI - SCI (System Control Interrupt), , - , , .

ACPI:

SCI . , , OS,

SCI , (: ) / ACPI.
SCI , , , /, 9.

SCI , AML .


"" , "":

  • "" .
    , , , .
    , , NMI/SMI : LINT0 .

  • . , SMI, SMI , , SMM, , SMM.

, , , , , / .

6.9 Intel

1 (Highest) Hardware Reset and Machine Checks
            - RESET
            - Machine Check
2 Trap on Task Switch
            - T flag in TSS is set
3 External Hardware Interventions
            - FLUSH
            - STOPCLK
            - SMI
            - INIT
4 Traps on the Previous Instruction
            - Breakpoints
            - Debug Trap Exceptions (TF flag set or data/I-O breakpoint)
5 Nonmaskable Interrupts (NMI)
6 Maskable Hardware Interrupts
7 Code Breakpoint Fault
8 Faults from Fetching Next Instruction
            - Code-Segment Limit Violation
            - Code Page Fault
9 Faults from Decoding the Next Instruction
            - Instruction length > 15 bytes
            - Invalid Opcode
            - Coprocessor Not Available
10 (Lowest) Faults on Executing an Instruction
            - Overflow
            - Bound error
            - Invalid TSS
            - Segment Not Present
            - Stack fault
            - General Protection
            - Data Page Fault
            - Alignment Check
            - x87 FPU Floating-point exception
            - SIMD floating-point exception
            - Virtualization exception

, , SCI ,

/SCI < NMI < SMI

, , .
NMI SMI SCI.

+12

Source: https://habr.com/ru/post/1660656/


All Articles