IntrMask (Compact 7)

3/12/2014

This global variable array tells the MIPS kernel which nested interrupts are masked while the current interrupt is being handled.


extern BYTE IntrMask [];

The OEMInitGlobals function in oal.exe uses IntrMask to set the pIntrMask member of OEMGLOBAL. OEMInitGlobals sets the CPU-specific variables before OEMInit executes, so that the kernel can use them. Therefore, you must set pIntrMask by using IntrMask; do not set pIntrMask directly.

Because there is no hard-coded priority scheme in MIPS architecture, the kernel uses two structures that provide information about nested interrupts, IntrMask and IntrPriority.

The IntrMask table defines how to set the interrupt mask while servicing the interrupt. The pIntrMask member of the OEMGLOBAL structure points to the IntrMask table.

The IntrMask table tells the kernel which interrupt mask to set in the CPU during execution of the interrupt service routine. A 1 indicates the interrupt at that bit is masked (the value is negated and shifted before programming the status register).

The following code example shows how you use IntrMask.

// OEM Review : Disabled nested interrupts
IntrMask:
.byte   0x3f   // 00 0000   // for spurious interrupt
.byte   0x3f   // 00 0001
.byte   0x3f   // 00 0010
.byte   0x3f   // 00 0100
.byte   0x3f   // 00 1000
.byte   0x3f   // 01 0000
.byte   0x3f   // 10 0000
.byte   0x00   // padding

Header

Developer Implemented

Show: