红色这句就是定义了在OAL中的中断起始逻辑终端号,而在MAP.C文件中:
// Function: OALIntrRequestSysIntr
//
// This function allocate new SYSINTR for given IRQ and it there isn't
// static mapping for this IRQ it will create it.
//
UINT32 OALIntrRequestSysIntr(UINT32 count, const UINT32 *pIrqs, UINT32 flags)
{
UINT32 irq, sysIntr;
// If there is mapping for given irq check for special cases
if (g_oalIrq2SysIntr[irq] != SYSINTR_UNDEFINED) {
// If static mapping is requested we fail
if ((flags & OAL_INTR_STATIC) != 0) {
OALMSG(OAL_ERROR, (L"ERROR: OALIntrRequestSysIntr: "
L"Static mapping for IRQ %d already assigned\r\n", irq
));
sysIntr = SYSINTR_UNDEFINED;
goto cleanUp;
}
// If we should translate, return existing SYSINTR
if ((flags & OAL_INTR_TRANSLATE) != 0) {
sysIntr = g_oalIrq2SysIntr[irq];
goto cleanUp;
}
}
// Find next available SYSINTR value...
for (sysIntr = SYSINTR_FIRMWARE; sysIntr < SYSINTR_MAXIMUM; sysIntr++) {
if (g_oalSysIntr2Irq[sysIntr] == OAL_INTR_IRQ_UNDEFINED) break; }
// Any available SYSINTRs left?
if (sysIntr >= SYSINTR_MAXIMUM) {
OALMSG(OAL_ERROR, (L"ERROR: OALIntrRequestSysIntr: "
L"No avaiable SYSINTR found\r\n"
));
sysIntr = SYSINTR_UNDEFINED;
goto cleanUp;
}
// Make SYSINTR -> IRQ association.
g_oalSysIntr2Irq[sysIntr] = irq;
// Make IRQ -> SYSINTR association if required
if ((flags & OAL_INTR_DYNAMIC) != 0) goto cleanUp;
if (
g_oalIrq2SysIntr[irq] == SYSINTR_UNDEFINED ||
(flags & OAL_INTR_FORCE_STATIC) != 0
) {
g_oalIrq2SysIntr[irq] = sysIntr;
}