What will cpu do while ints are blocked?

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
shore
Posts: 15
Joined: Wed Sep 04, 2019 9:00 pm

What will cpu do while ints are blocked?

Post by shore »

When interrupt are blocked (cli), If an disk interrupt has been issued, will the cpu simply abandoned it or put it on hold until it is availiable for interrupt???
Korona
Member
Member
Posts: 1000
Joined: Thu May 17, 2007 1:27 pm
Contact:

Re: What will cpu do while ints are blocked?

Post by Korona »

The interrupt is queued in the local APIC's IRR (interrupt request register) request. As soon as IF becomes 1 (e.g., sti is executed), the highest priority interrupt is moved from the IRR to the ISR (interrupt service register). As the IRR only has one bit per interrupt, the information how many interrupts (of the same vector) occurred is lost (regardless of whether IF is 0 or 1).
managarm: Microkernel-based OS capable of running a Wayland desktop (Discord: https://discord.gg/7WB6Ur3). My OS-dev projects: [mlibc: Portable C library for managarm, qword, Linux, Sigma, ...] [LAI: AML interpreter] [xbstrap: Build system for OS distributions].
Post Reply