Once an IRQ handler has been registered, the handler routine is executed each time an interrupt occurs. The problem again arises as to how to reconcile the differences between the various platforms. Owing to the nature of things, the differences are not restricted to various C functions with platform-specific implementations but start deep down in the domain of the manually optimized assembly language code used for low-level processing.
Fortunately, several structural similarities between the individual platforms can be identified. For example, the interrupt action on each platform comprises three parts, as discussed earlier. The entry path switches from user mode to kernel mode, then the actual handler routine executes, and finally the kernel switches back to user mode. Even though much assembly language code is involved, there are at least some C fragments that are similar on all platforms. These are discussed below.
Continue reading here: Switching to Kernel Mode
Was this article helpful?