There are two mechanisms for interrupting an instruction stream to start executing the appropriate MCP routines; Interrupt Procedures and Hardware Call Procedures.
An Interrupt Procedure is executed as a response to certain Instruction Interrupts or Condition Interrupts to transfer control of the processor to the MCP kernel.
The Conditions that may cause an Interrupt Procedure to be executed are: Alarm Time Reached, Task Time Limit Reached, Real-Time I/O completed, Normal I/O completed and External Interrupt detected.
All the Condition Interrupts are maskable. This means that for each individual condition, there exists a mask bit that works as follows. A Condition Interrupt will cause the Interrupt Procedure to be executed if and only if its corresponding mask bit is set. Note that Instruction Interrupts are non-maskable.
The Condition Interrupt(s) will be reset during the execution of the Interrupt Procedure only if the corresponding mask bit is set.
The Interrupts (Instruction or Condition) are gathered in a two digit field as described in the following table:
|Reserved||MSD=X||3||Must Be Zero|
|External||1||Overtemp, IPC and MP|
|Task Timer||0||Task Timer MSD = 0|
|Reserved||MSD=Y||3||Must Be Zero|
|Real Time I/O||2||I/O Complete, Real-Time Device|
|Alarm Timer||1||Alarm Timer reached.|
|Normal I/O||0||I/O Complete, Normal Device|
The Interrupt Mask doesn't allow the Instruction Interrupt to be masked.
The interrupts are reported to the MCP Kernel (Task #1) via the Interrupt Descriptor which is located in the Kernel Data Area (Task #1, Environment #0). The Interrupt Descriptor format is C1000XY01) where XY is the two digit interrupt field as described above. Except for the Instruction Interrupt bit, all the bits in XY are the result of the logical AND of the pending interrupt conditions and the associated interrupt mask bits.
The External Interrupt, MSD bit 1 in the Interrupt Descriptor is used to report up to three different conditions, which can be active simulataneously. They are Overtemperature, Interprocessor Communicate, and Maintenance Processor (MP). To differentiate between the three possible conditions, and External Interrupt Descriptor is written in the Kernel Data Area along with the reporting of the External Interrupt bit in the Interrupt Descriptor.
The External Interrupt Descriptor is a two digit field which is described as follows:
Note that there is only one global mask bit for up to three External Interrupts.
After detection of an Overtemperature condition, a processor-dependent time-delay occurs before the system is powered off.
If any Condition Interrupt is active, the Interrupt Procedure is initiated at the end of the current instruction whereas if an Instruction Interrupt is active, the Interrupt Procedure is initiated immediately.
The Instruction Interrupt bit, digit X bit 2 in the Interrupt Descriptor, is used to report an interrupt that can be cause by up to four different instructions. They are Kernel Request, Lock, failed Branch Reinstate Virtual and failed hcl_procedure. In the case of the Lock instruction, up to four different variants can cause an interrupt.
If an Instruction Interrupt is active, an Instruction Interrupt Cause Descriptor is written in the Kernel Data Area along with the reporting of the Instruction bit in the Interrupt Descriptor.
The Instruction Interrupt Cause Descriptor is an eight digit field which format is C1000XY002). The XY field is described as follows:
|07||Failed Branch Reinstate Virtual|
|06||Executed Kernel Request instruction|
|05||Failed Hardware Call Procedure|
In the case of a Lock or Kernel Request instruction, an additional information is provided by another descriptor: the Instruction Interrupt Cause Extension Descriptor. For the Lock instruction this descriptor carries the Reinstate List Entry base pointer of a task linked to the task that is executing the Lock instruction. The format of the descriptor is C7AAAAAA. For the Kernel Request instruction, the descriptor carries the kernel request code provided by the BF field of the instruction. The format of the descriptor is C1000BF0.
The instruction address of the first instruction to be executed when the interrupted task is reinstated is included in the state. That field may either be the address of the interrupted instruction or the address of the next instruction, which can be either in the current Environment or another Environment.
The current instruction address is reported in the following cases:
The next instruction address is reported in the following cases:
An interrupt caused by a failed Hardware Call Procedure may store inconsistent values depending upon the cause of the failure.
A Hardware Call procedure is executed as a response to certain processor detected faults. A Hardware Call Procedure changes the system environment and transfers control to a software error handling routine.
The instruction address of the failing instruction is included in the state that is stored as a result of the following faults:
The instruction address of the next instruction to be executed (unless one of the faults that require that the address of the failing instruction be stored is also present) is included in the state that is stored as a result of the following faults:
If an interrupt condition and a hardware call condition exist at the same time, the following algorithm is applied:
An attempt to execute a Hardware Call Procedure while in KERNEL Mode will cause the processor in KERNEL mode to halt, after storing the fault indicators in the R/D Storage Area field in the Kernel Data Area.
When the processor halts, a SNAP picture is taken (if enabled). The processor cannot continue from this point since the error that caused the halt is in a non-recovarable portion of the system. The error must be cured and the system restarted manually. Note that since this processor halted while owning the lock required for access to KERNEL mode, all other processors on the system will, in a very short time, become dormant waiting for Kernel Mode access.