📄 c-dll5.html
字号:
</tr><tr valign="top"><td></td><td><hr></td></tr><tr valign="middle"><td colspan="20"></td></tr></table></p callout></dl><font face="Helvetica, sans-serif" class="sans"><h4 class="H3"><i><a name="85738">3.5.2 Interprocessor Interrupts</a></i></h4></font><dl class="margin"><dl class="margin"><dd><p class="Body"><a name="85740"> </a>Each processor on the backplane has a single <i class="term">input queue</i> for packets received from other processors. There are three methods processors use to determine when to examine their input queues: polling, bus interrupts, and mailbox interrupts.</p><dd><p class="Body"><a name="85742"> </a>When using polling, the processor examines its input queue at fixed intervals. When using interrupts, the sending processor notifies the receiving processor that its input queue contains packets. Interrupt-driven communication is much more efficient than polling.</p><dd><p class="Body"><a name="85743"> </a>However, most backplane buses have a limited number of interrupt lines available on the backplane (for example, VMEbus has seven). Although a processor can use one of these interrupt lines as its input interrupt, each processor must have its own interrupt line. In addition, not all processor boards are capable of generating bus interrupts. Nor can you always use bus interrupts.</p><dd><p class="Body"><a name="85745"> </a>As an alternative interrupt mechanism, you can use <i class="term">mailbox interrupts</i>, also called <i class="term">location monitors</i> because they monitor the access to specific memory locations. A mailbox interrupt specifies a bus address that, when written to or read from, causes a specific interrupt on the processor board. Each board can be set, with hardware jumpers or software registers, to use a different address for its mailbox interrupt.</p><dd><p class="Body"><a name="85746"> </a>To generate a mailbox interrupt, a processor writes to that location. There is effectively no limit to the number of processors that can use mailbox interrupts, because each interrupt requires only a single address on the bus. Most modern processor boards include some kind of mailbox interrupt.</p><dd><p class="Body"><a name="85747"> </a>Each processor must tell the other processors which notification method it uses. Each processor enters its <i class="term">interrupt type</i> and up to three related parameters in the shared-memory data structures. This information is used by the shared-memory network drivers of the other processors when sending packets.</p><dd><p class="Body"><a name="85749"> </a>The interrupt type and parameters for each processor are specified during configuration. The relevant configuration macro is <b class="symbol_UC">SM_INT_TYPE</b> (also <b class="symbol_UC">SM_INT_ARG</b><i class="textVariable">n</i>). The possible values are defined in the header file <b class="file">smNetLib.h</b>. <a href="c-dll5.html#85759">Table 3-5</a> summarizes the available interrupt types and parameters.<p class="table"><h4 class="EntityTitle"><a name="85759"><font face="Helvetica, sans-serif" size="-1" class="sans">Table 3-5: Backplane Interrupt Types</font></a></h4><table border="0" cellpadding="0" cellspacing="0"><tr><td colspan="20"><hr class="tablerule"></td></tr><tr valign="middle"><th rowspan="1" colspan="1"><div class="CellHeading"><b><a name="85769"> </a><font face="Helvetica, sans-serif" size="-1" class="sans">Type</font></b></div></th><td width="10"> </td><th rowspan="1" colspan="1"><div class="CellHeading"><b><a name="85771"> </a><font face="Helvetica, sans-serif" size="-1" class="sans">Arg 1</font></b></div></th><td width="10"> </td><th rowspan="1" colspan="1"><div class="CellHeading"><b><a name="85773"> </a><font face="Helvetica, sans-serif" size="-1" class="sans">Arg 2</font></b></div></th><td width="10"> </td><th rowspan="1" colspan="1"><div class="CellHeading"><b><a name="85775"> </a><font face="Helvetica, sans-serif" size="-1" class="sans">Arg 3</font></b></div></th><td width="10"> </td><th rowspan="1" colspan="1"><div class="CellHeading"><b><a name="85777"> </a><font face="Helvetica, sans-serif" size="-1" class="sans">Description</font></b></div></th><td width="10"> </td></tr><tr><td colspan="20"><hr class="tablerule2"></td></tr><tr valign="top"><td colspan=1 rowspan=1><div class="CellBody"><a name="85779"> </a><b class="symbol_UC">SM_INT_NONE</b> </div></td><td width="10"> </td><td colspan=1 rowspan=1><div class="CellBody"><a name="85781"> </a>-</div></td><td width="10"> </td><td colspan=1 rowspan=1><div class="CellBody"><a name="85783"> </a>-</div></td><td width="10"> </td><td colspan=1 rowspan=1><div class="CellBody"><a name="85785"> </a>-</div></td><td width="10"> </td><td colspan=1 rowspan=1><div class="CellBody"><a name="85787"> </a>Polling</div></td><td width="10"> </td></tr><tr valign="top"><td colspan=1 rowspan=1><div class="CellBody"><a name="85789"> </a><b class="symbol_UC">SM_INT_BUS</b> </div></td><td width="10"> </td><td colspan=1 rowspan=1><div class="CellBody"><a name="85791"> </a>level</div></td><td width="10"> </td><td colspan=1 rowspan=1><div class="CellBody"><a name="85793"> </a>vector</div></td><td width="10"> </td><td colspan=1 rowspan=1><div class="CellBody"><a name="85795"> </a>-</div></td><td width="10"> </td><td colspan=1 rowspan=1><div class="CellBody"><a name="85797"> </a>Bus interrupt</div></td><td width="10"> </td></tr><tr valign="top"><td colspan=1 rowspan=1><div class="CellBody"><a name="85799"> </a><b class="symbol_UC">SM_INT_MAILBOX_1</b> </div></td><td width="10"> </td><td colspan=1 rowspan=1><div class="CellBody"><a name="85801"> </a>address space</div></td><td width="10"> </td><td colspan=1 rowspan=1><div class="CellBody"><a name="85803"> </a>address</div></td><td width="10"> </td><td colspan=1 rowspan=1><div class="CellBody"><a name="85805"> </a>value</div></td><td width="10"> </td><td colspan=1 rowspan=1><div class="CellBody"><a name="85807"> </a>1-byte write mailbox</div></td><td width="10"> </td></tr><tr valign="top"><td colspan=1 rowspan=1><div class="CellBody"><a name="85809"> </a><b class="symbol_UC">SM_INT_MAILBOX_2</b> </div></td><td width="10"> </td><td colspan=1 rowspan=1><div class="CellBody"><a name="85811"> </a>address space</div></td><td width="10"> </td><td colspan=1 rowspan=1><div class="CellBody"><a name="85813"> </a>address</div></td><td width="10"> </td><td colspan=1 rowspan=1><div class="CellBody"><a name="85815"> </a>value</div></td><td width="10"> </td><td colspan=1 rowspan=1><div class="CellBody"><a name="85817"> </a>2-byte write mailbox</div></td><td width="10"> </td></tr><tr valign="top"><td colspan=1 rowspan=1><div class="CellBody"><a name="85819"> </a><b class="symbol_UC">SM_INT_MAILBOX_4</b> </div></td><td width="10"> </td><td colspan=1 rowspan=1><div class="CellBody"><a name="85821"> </a>address space</div></td><td width="10"> </td><td colspan=1 rowspan=1><div class="CellBody"><a name="85823"> </a>address</div></td><td width="10"> </td><td colspan=1 rowspan=1><div class="CellBody"><a name="85825"> </a>value</div></td><td width="10"> </td><td colspan=1 rowspan=1><div class="CellBody"><a name="85827"> </a>4-byte write mailbox</div></td><td width="10"> </td></tr><tr valign="top"><td colspan=1 rowspan=1><div class="CellBody"><a name="85829"> </a><b class="symbol_UC">SM_INT_MAILBOX_R1</b> </div></td><td width="10"> </td><td colspan=1 rowspan=1><div class="CellBody"><a name="85831"> </a>address space</div></td><td width="10"> </td><td colspan=1 rowspan=1><div class="CellBody"><a name="85833"> </a>address</div></td><td width="10"> </td><td colspan=1 rowspan=1><div class="CellBody"><a name="85835"> </a>-</div></td><td width="10"> </td><td colspan=1 rowspan=1><div class="CellBody"><a name="85837"> </a>1-byte read mailbox</div></td><td width="10"> </td></tr><tr valign="top"><td colspan=1 rowspan=1><div class="CellBody"><a name="85839"> </a><b class="symbol_UC">SM_INT_MAILBOX_R2</b> </div></td><td width="10"> </td><td colspan=1 rowspan=1><div class="CellBody"><a name="85841"> </a>address space</div></td><td width="10"> </td><td colspan=1 rowspan=1><div class="CellBody"><a name="85843"> </a>address</div></td><td width="10"> </td><td colspan=1 rowspan=1><div class="CellBody"><a name="85845"> </a>-</div></td><td width="10"> </td><td colspan=1 rowspan=1><div class="CellBody"><a name="85847"> </a>2-byte read mailbox</div></td><td width="10"> </td></tr><tr valign="top"><td colspan=1 rowspan=1><div class="CellBody"><a name="85849"> </a><b class="symbol_UC">SM_INT_MAILBOX_R4</b> </div></td><td width="10"> </td><td colspan=1 rowspan=1><div class="CellBody"><a name="85851"> </a>address space</div></td><td width="10"> </td><td colspan=1 rowspan=1><div class="CellBody"><a name="85853"> </a>address</div></td><td width="10"> </td><td colspan=1 rowspan=1><div class="CellBody"><a name="85855"> </a>-</div></td><td width="10"> </td><td colspan=1 rowspan=1><div class="CellBody"><a name="85858"> </a>4-byte read mailbox</div></td><td width="10"> </td></tr><tr><td colspan="20"><hr class="tablerule"></td></tr><tr valign="middle">
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -