I'm trying to get a better understanding of how interrupts work (both hardware and software) and the privileges that go with them.
If we use the NIC as an example. When the OS creates the IDT, does the entry for the NIC descriptor point to the built in driver that handles it. If the user were to then install a 3rd party driver for the NIC, would the IDT be modified to point to the new driver?
Would an interrupt from a USB controller point to a USB driver?
What would be the privilege level of this IDT entry and what purpose would it serve? I have read somewhere that hardware interrupts ignore the privilege level and allowed to run regardless, but I'm not sure if this is true.
With software interrupts, what sort of interrupts would these do. If it is wanting to access functions of the kernel, are all these accessed through the same interrupt that has level 3 privileges?
What sort of software interrupts are there and what do user mode programs do with them, or do user mode programs just use software interrupts to access the kernel.
I have being trying to piece it all together from online sources but I'm just wondering if anyone could make it clear how the whole process works.
Any help would be much appreciated.
Thanks.