<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>change log for rtems (2011-08-14)</title>
</head>
<body text='#000000' bgcolor='#ffffff'>
<a name='cs1'></a>
<table border='0' cellspacing='0' cellpadding='5' width='100%' bgcolor='#eeeeee'>
<tr><td colspan='3' bgcolor='#dddddd'>
<font color='#bb2222'><strong>ccj</strong></font>
</td></tr>
<tr><td colspan='3' bgcolor='#dddddd'><pre>2011-08-14 Chris Johns <chrisj@rtems.org>
* rtems/score/cpu.h: Clear the vector table for simple vectored
interrupts.
* irq.c: Add support for using the IIC with the Altera HAL.
</pre></td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/score/cpu/nios2/ChangeLog.diff?r1=text&tr1=1.33&r2=text&tr2=1.34&diff_format=h">M</a></td><td width='1%'>1.34</td><td width='100%'>cpukit/score/cpu/nios2/ChangeLog</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/score/cpu/nios2/irq.c.diff?r1=text&tr1=1.9&r2=text&tr2=1.10&diff_format=h">M</a></td><td width='1%'>1.10</td><td width='100%'>cpukit/score/cpu/nios2/irq.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/score/cpu/nios2/rtems/score/cpu.h.diff?r1=text&tr1=1.20&r2=text&tr2=1.21&diff_format=h">M</a></td><td width='1%'>1.21</td><td width='100%'>cpukit/score/cpu/nios2/rtems/score/cpu.h</td></tr>
</table>
<pre>
<font color='#006600'>diff -u rtems/cpukit/score/cpu/nios2/ChangeLog:1.33 rtems/cpukit/score/cpu/nios2/ChangeLog:1.34
--- rtems/cpukit/score/cpu/nios2/ChangeLog:1.33 Wed Aug 10 10:00:53 2011
+++ rtems/cpukit/score/cpu/nios2/ChangeLog Sun Aug 14 02:38:14 2011
</font><font color='#997700'>@@ -1,3 +1,9 @@
</font><font color='#000088'>+2011-08-14 Chris Johns <chrisj@rtems.org>
+
+ * rtems/score/cpu.h: Clear the vector table for simple vectored
+ interrupts.
+ * irq.c: Add support for using the IIC with the Altera HAL.
+<span style="background-color: #FF0000"> </span>
</font> 2011-08-10 Sebastian Huber <sebastian.huber@embedded-brains.de>
* rtems/score/cpu.h: Removed superfluous comments. Format. Include
<font color='#006600'>diff -u rtems/cpukit/score/cpu/nios2/irq.c:1.9 rtems/cpukit/score/cpu/nios2/irq.c:1.10
--- rtems/cpukit/score/cpu/nios2/irq.c:1.9 Thu Apr 21 14:05:14 2011
+++ rtems/cpukit/score/cpu/nios2/irq.c Sun Aug 14 02:38:14 2011
</font><font color='#997700'>@@ -34,7 +34,73 @@
</font>
register unsigned long *stack_ptr __asm__ ("sp");
<font color='#000088'>+RTEMS_INLINE_ROUTINE void
+__Dipatch_interrupt_vector(uint32_t vector, proc_ptr pp)
+{
+ if ( _ISR_Vector_table[ vector] )
+ {
+ (*_ISR_Vector_table[ vector ])(vector, pp);
+ };
+}
+
+#if (RTEMS_NIOS_USE_ALT_HAL == TRUE)
+
+#include <bsp/alt/nios2.h>
+
+RTEMS_INLINE_ROUTINE void __IIC_Handler(void)
+{
+ uint32_t active;
+ uint32_t mask;
+ uint32_t vector;
+
+ /*
+ * Obtain from the interrupt controller a bit list of pending interrupts,
+ * and then process the highest priority interrupt. This process loops,
+ * loading the active interrupt list on each pass until alt_irq_pending()
+ * return zero.
+ *
+ * The maximum interrupt latency for the highest priority interrupt is
+ * reduced by finding out which interrupts are pending as late as possible.
+ * Consider the case where the high priority interupt is asserted during
+ * the interrupt entry sequence for a lower priority interrupt to see why
+ * this is the case.
+ */
+
+ NIOS2_READ_IPENDING (active);
+
+ while (active)
+ {
+ vector = 0;
+ mask = 1;
+
+ /*
+ * Test each bit in turn looking for an active interrupt. Once one is
+ * found, the interrupt handler asigned by a call to alt_irq_register() is
+ * called to clear the interrupt condition.
+ */
+
+ while (active)
+ {
+ if (active & mask)
+ {
+ __Dipatch_interrupt_vector(vector, NULL);
+ active &= ~mask;
+ }
+ mask <<= 1;
+ ++vector;
+ };
+
+ NIOS2_READ_IPENDING (active);
+ }
+<span style="background-color: #FF0000"> </span>
+}
+#endif
+
+#if (RTEMS_NIOS_USE_ALT_HAL == TRUE)
+void __ISR_Handler(void)
+#else
</font> void __ISR_Handler(uint32_t vector, CPU_Interrupt_frame *ifr)
<font color='#000088'>+#endif
</font> {
register uint32_t level;
<font color='#997700'>@@ -52,11 +118,12 @@
</font>
_Thread_Dispatch_increment_disable_level();
<font color='#880000'>- if ( _ISR_Vector_table[ vector] )
- {
- (*_ISR_Vector_table[ vector ])(vector, ifr);
- };
-
</font><font color='#000088'>+#if (RTEMS_NIOS_USE_ALT_HAL == TRUE)
+ __IIC_Handler();
+#else
+ __Dipatch_interrupt_vector(vector, ifr);
+#endif
+<span style="background-color: #FF0000"> </span>
</font> /* Make sure that interrupts are disabled again */
_CPU_ISR_Disable( level );
<font color='#997700'>@@ -87,5 +154,3 @@
</font> {
_CPU_Fatal_halt(0xECC0);
}
<font color='#880000'>-
-
</font>
<font color='#006600'>diff -u rtems/cpukit/score/cpu/nios2/rtems/score/cpu.h:1.20 rtems/cpukit/score/cpu/nios2/rtems/score/cpu.h:1.21
--- rtems/cpukit/score/cpu/nios2/rtems/score/cpu.h:1.20 Wed Aug 10 10:00:53 2011
+++ rtems/cpukit/score/cpu/nios2/rtems/score/cpu.h Sun Aug 14 02:38:14 2011
</font><font color='#997700'>@@ -182,7 +182,12 @@
</font> uint32_t ipending;
} CPU_Exception_frame;
<font color='#000088'>+#if (CPU_SIMPLE_VECTORED_INTERRUPTS == TRUE)
+#define _CPU_Initialize_vectors() \
+ memset(_ISR_Vector_table, 0, sizeof(ISR_Handler_entry) * ISR_NUMBER_OF_VECTORS)
+#else
</font> #define _CPU_Initialize_vectors()
<font color='#000088'>+#endif
</font>
#define _CPU_ISR_Disable( _isr_cookie ) \
do { \
</pre>
<p> </p>
<p>--<br />
<small>Generated by <a href="http://www.codewiz.org/projects/index.html#loginfo">Deluxe Loginfo</a> 2.122 by Bernardo Innocenti <bernie@develer.com></small></p>
</body>
</html>