<!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-10-07)</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>joel</strong></font>
</td></tr>
<tr><td colspan='3' bgcolor='#dddddd'><pre>2011-10-07 Daniel Hellstrom <daniel@gaisler.com>

        PR 1931/cpukit
        * score/src/percpu.c: The stack must be aligned to CPU alignment
        requirement.
</pre></td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/ChangeLog.diff?r1=text&tr1=1.2939&r2=text&tr2=1.2940&diff_format=h">M</a></td><td width='1%'>1.2940</td><td width='100%'>cpukit/ChangeLog</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/score/src/percpu.c.diff?r1=text&tr1=1.6&r2=text&tr2=1.7&diff_format=h">M</a></td><td width='1%'>1.7</td><td width='100%'>cpukit/score/src/percpu.c</td></tr>
</table>
<pre>
<font color='#006600'>diff -u rtems/cpukit/ChangeLog:1.2939 rtems/cpukit/ChangeLog:1.2940
--- rtems/cpukit/ChangeLog:1.2939       Fri Oct  7 06:06:20 2011
+++ rtems/cpukit/ChangeLog      Fri Oct  7 09:29:18 2011
</font><font color='#997700'>@@ -1,3 +1,9 @@
</font><font color='#000088'>+2011-10-07    Daniel Hellstrom <daniel@gaisler.com>
+
+       PR 1931/cpukit
+       * score/src/percpu.c: The stack must be aligned to CPU alignment
+       requirement.
+
</font> 2011-10-07        Ralf Corsépius <ralf.corsepius@rtems.org>
 
        * score/src/threadhandler.c: Don't undefine __USE_INIT_FINI__ for

<font color='#006600'>diff -u rtems/cpukit/score/src/percpu.c:1.6 rtems/cpukit/score/src/percpu.c:1.7
--- rtems/cpukit/score/src/percpu.c:1.6 Wed May 11 09:22:35 2011
+++ rtems/cpukit/score/src/percpu.c     Fri Oct  7 09:29:19 2011
</font><font color='#997700'>@@ -50,7 +50,7 @@
</font>       p->interrupt_stack_low = _Workspace_Allocate_or_fatal_error( size );
 
       ptr = (uintptr_t) _Addresses_Add_offset( p->interrupt_stack_low, size );
<font color='#880000'>-      ptr &= ~CPU_STACK_ALIGNMENT;
</font><font color='#000088'>+      ptr &= ~(CPU_STACK_ALIGNMENT - 1);
</font>       p->interrupt_stack_high = (void *)ptr;
       p->state = RTEMS_BSP_SMP_CPU_INITIAL_STATE;
       RTEMS_COMPILER_MEMORY_BARRIER();
</pre>
<p> </p>
<a name='cs2'></a>
<table border='0' cellspacing='0' cellpadding='5' width='100%' bgcolor='#eeeeee'>
<tr><td colspan='3' bgcolor='#dddddd'>
 <font color='#bb2222'><strong>joel</strong></font>
</td></tr>
<tr><td colspan='3' bgcolor='#dddddd'><pre>2011-10-07 Daniel Hellstrom <daniel@gaisler.com>

        PR 1932/cpukit
        * cpu_asm.S: At some point the interrupt trap handler causes a
        window-overflow and the window overflow trap handler crashes when
        writing to 0. I found that this is because the WIM was bad, to the
        window overflow handler uses a uninitialized stack pointer in a
        window never used.
         * g3=CWP, not WIM
         * CWP is incremented by done_flushing no need doing that here also
         * I see no reason to create an additional stack frame (save)
         * Must turn off traps when updating WIM (maybe already done by caller?)
</pre></td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/score/cpu/sparc/ChangeLog.diff?r1=text&tr1=1.106&r2=text&tr2=1.107&diff_format=h">M</a></td><td width='1%'>1.107</td><td width='100%'>cpukit/score/cpu/sparc/ChangeLog</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/score/cpu/sparc/cpu_asm.S.diff?r1=text&tr1=1.19&r2=text&tr2=1.20&diff_format=h">M</a></td><td width='1%'>1.20</td><td width='100%'>cpukit/score/cpu/sparc/cpu_asm.S</td></tr>
</table>
<pre>
<font color='#006600'>diff -u rtems/cpukit/score/cpu/sparc/ChangeLog:1.106 rtems/cpukit/score/cpu/sparc/ChangeLog:1.107
--- rtems/cpukit/score/cpu/sparc/ChangeLog:1.106        Tue Sep 27 04:17:55 2011
+++ rtems/cpukit/score/cpu/sparc/ChangeLog      Fri Oct  7 09:31:44 2011
</font><font color='#997700'>@@ -1,3 +1,15 @@
</font><font color='#000088'>+2011-10-07    Daniel Hellstrom <daniel@gaisler.com>
+
+       PR 1932/cpukit
+       * cpu_asm.S: At some point the interrupt trap handler causes a
+       window-overflow and the window overflow trap handler crashes when
+       writing to 0. I found that this is because the WIM was bad, to the
+       window overflow handler uses a uninitialized stack pointer in a
+       window never used.<span style="background-color: #FF0000"> </span>
+        * g3=CWP, not WIM
+        * CWP is incremented by done_flushing no need doing that here also
+        * I see no reason to create an additional stack frame (save)
+        * Must turn off traps when updating WIM (maybe already done by caller?)<span style="background-color: #FF0000">        </span>
</font> 2011-09-27        Sebastian Huber <sebastian.huber@embedded-brains.de>
 
        PR 1914/cpukit

<font color='#006600'>diff -u rtems/cpukit/score/cpu/sparc/cpu_asm.S:1.19 rtems/cpukit/score/cpu/sparc/cpu_asm.S:1.20
--- rtems/cpukit/score/cpu/sparc/cpu_asm.S:1.19 Wed Mar 16 15:05:05 2011
+++ rtems/cpukit/score/cpu/sparc/cpu_asm.S      Fri Oct  7 09:31:44 2011
</font><font color='#997700'>@@ -336,22 +336,22 @@
</font>  *
  *  This routine is only used to switch to the first task on a
  *  secondary core in an SMP configuration.  We do not need to
<font color='#880000'>- *  flush all the windows and, in fact, this can be dangerous
</font><font color='#000088'>+ *  flush any windows and, in fact, this can be dangerous
</font>  *  as they may or may not be initialized properly.  So we just
  *  reinitialize the PSR and WIM.
  */
         PUBLIC(_CPU_Context_switch_to_first_task_smp)
 SYM(_CPU_Context_switch_to_first_task_smp):
<font color='#880000'>-        save    %sp, -CPU_MINIMUM_STACK_FRAME_SIZE, %sp
-
-        mov    %psr, %g1<span style="background-color: #FF0000">         </span> ! Initialize WIM
-       add     %g1, 1, %g2
-       and     %g2, 0x7, %g2
-       set     1, %g3
-       sll     %g3, %g2, %g3
-        mov     %g3, %wim
-        ba      done_flushing
-        mov     %i0, %o1                      ! in the delay slot
</font><font color='#000088'>+      mov     %psr, %g1               ! Turn of traps when modifying WIM
+       andn    %g1, SPARC_PSR_ET_MASK, %g1
+       mov     %g1, %psr
+       /* WIM and PSR will be set in done_flushing, it need args:
+        * g1=PSR, g3=CWP, o1=Context
+        */
+       and     %g1, SPARC_NUMBER_OF_REGISTER_WINDOWS - 1, %g3
+       nop
+       mov     %o0, %o1                ! in the delay slot
+       ba,a    done_flushing
</font> #endif
 
 /* end of file */
</pre>
<p> </p>
<a name='cs3'></a>
<table border='0' cellspacing='0' cellpadding='5' width='100%' bgcolor='#eeeeee'>
<tr><td colspan='3' bgcolor='#dddddd'>
 <font color='#bb2222'><strong>joel</strong></font>
</td></tr>
<tr><td colspan='3' bgcolor='#dddddd'><pre>2011-10-07 Daniel Hellstrom <daniel@gaisler.com>

        PR 1933/cpukit
        * shared/irq_asm.S: From code inspection I have found the following
        issues (most SMP), and some improvements in irq_asm.S. I would need a
        long test with interrupts to verify the interrupt handler better,
        however I can not see that these patches hurt. Please see comment per
        hunk below, One should go through the file to indent delay-slots
        correctly, I have fixed some in the patch areas. An extra space is
        added in front of delay slots to indicate a delay slot.
</pre></td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/c/src/lib/libbsp/sparc/ChangeLog.diff?r1=text&tr1=1.88&r2=text&tr2=1.89&diff_format=h">M</a></td><td width='1%'>1.89</td><td width='100%'>c/src/lib/libbsp/sparc/ChangeLog</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/c/src/lib/libbsp/sparc/shared/irq_asm.S.diff?r1=text&tr1=1.2&r2=text&tr2=1.3&diff_format=h">M</a></td><td width='1%'>1.3</td><td width='100%'>c/src/lib/libbsp/sparc/shared/irq_asm.S</td></tr>
</table>
<pre>
<font color='#006600'>diff -u rtems/c/src/lib/libbsp/sparc/ChangeLog:1.88 rtems/c/src/lib/libbsp/sparc/ChangeLog:1.89
--- rtems/c/src/lib/libbsp/sparc/ChangeLog:1.88 Thu Jul 28 12:33:07 2011
+++ rtems/c/src/lib/libbsp/sparc/ChangeLog      Fri Oct  7 09:35:03 2011
</font><font color='#997700'>@@ -1,3 +1,14 @@
</font><font color='#000088'>+2011-10-07    Daniel Hellstrom <daniel@gaisler.com>
+
+       PR 1933/cpukit
+       * shared/irq_asm.S: From code inspection I have found the following
+       issues (most SMP), and some improvements in irq_asm.S. I would need a
+       long test with interrupts to verify the interrupt handler better,
+       however I can not see that these patches hurt. Please see comment per
+       hunk below, One should go through the file to indent delay-slots
+       correctly, I have fixed some in the patch areas. An extra space is
+       added in front of delay slots to indicate a delay slot.
+
</font> 2011-07-28        Jennifer Averett <Jennifer.Averett@OARcorp.com>
 
        PR 1801

<font color='#006600'>diff -u rtems/c/src/lib/libbsp/sparc/shared/irq_asm.S:1.2 rtems/c/src/lib/libbsp/sparc/shared/irq_asm.S:1.3
--- rtems/c/src/lib/libbsp/sparc/shared/irq_asm.S:1.2   Thu Jul 28 12:33:07 2011
+++ rtems/c/src/lib/libbsp/sparc/shared/irq_asm.S       Fri Oct  7 09:35:03 2011
</font><font color='#997700'>@@ -267,8 +267,6 @@
</font>   add     %l5, %l7, %l5
     #endif
         ld       [%l5], %l5    /* l5 = pointer to per CPU */
<font color='#880000'>-        nop
-        nop
</font> 
         /*
          *  On multi-core system, we need to use SMP safe versions
<font color='#997700'>@@ -277,9 +275,8 @@
</font>          *  _ISR_SMP_Enter returns the interrupt nest level.  If we are
          *  outermost interrupt, then we need to switch stacks.
          */
<font color='#880000'>-        mov      %sp, %fp
</font>         call    SYM(_ISR_SMP_Enter), 0
<font color='#880000'>-        nop                             ! delay slot
</font><font color='#000088'>+         mov      %sp, %fp              ! delay slot
</font>   cmp     %o0, 0
 #else
         /*
<font color='#997700'>@@ -321,8 +318,8 @@
</font>         /*
          *  Do we need to switch to the interrupt stack?
          */
<font color='#880000'>-        bnz      dont_switch_stacks      ! No, then do not switch stacks
-        ld       [%l5 + PER_CPU_INTERRUPT_STACK_HIGH], %sp
</font><font color='#000088'>+        beq,a    dont_switch_stacks      ! No, then do not switch stacks
+         ld      [%l5 + PER_CPU_INTERRUPT_STACK_HIGH], %sp
</font> 
 dont_switch_stacks:
         /*
<font color='#997700'>@@ -358,6 +355,7 @@
</font>         nop                             ! delay slot
        cmp     %o0, 0
        bz      simple_return
<font color='#000088'>+    nop
</font> #else
         !sethi    %hi(SYM(_Thread_Dispatch_disable_level)), %l4
         !ld       [%l5 + PER_CPU_ISR_NEST_LEVEL], %l7
<font color='#997700'>@@ -405,7 +403,7 @@
</font>         ld       [%l6 + %lo(SYM(_CPU_ISR_Dispatch_disable))], %l7
         orcc     %l7, %g0, %g0   ! Is this thread already doing an ISR?
         bnz      simple_return   ! Yes, then do a "simple" exit
<font color='#880000'>-        nop
</font><font color='#000088'>+         nop
</font> 
         /*
          *  If a context switch is necessary, then do fudge stack to
<font color='#997700'>@@ -413,11 +411,9 @@
</font>          */
 
         ldub     [%l5 + PER_CPU_DISPATCH_NEEDED], %l5
<font color='#880000'>-        nop
-        nop
-
</font>         orcc     %l5, %g0, %g0   ! Is thread switch necessary?
         bz       simple_return   ! No, then return
<font color='#000088'>+         nop
</font> #endif
         /*
          *  Invoke interrupt dispatcher.
<font color='#997700'>@@ -479,16 +475,11 @@
</font>         nop
     #endif
         ld       [%l5], %l5    /* l5 = pointer to per CPU */
<font color='#880000'>-        nop
-        nop
</font> #else
         sethi    %hi(_Per_CPU_Information), %l5
         add      %l5, %lo(_Per_CPU_Information), %l5
 #endif
         ldub     [%l5 + PER_CPU_DISPATCH_NEEDED], %l5
<font color='#880000'>-        nop
-        nop
-
</font>         orcc     %l5, %g0, %g0   ! Is thread switch necessary?
         bz       allow_nest_again
         nop
</pre>
<p> </p>
<a name='cs4'></a>
<table border='0' cellspacing='0' cellpadding='5' width='100%' bgcolor='#eeeeee'>
<tr><td colspan='3' bgcolor='#dddddd'>
 <font color='#bb2222'><strong>ralf</strong></font>
</td></tr>
<tr><td colspan='3' bgcolor='#dddddd'><pre>2011-10-07 Ralf Corsépius <ralf.corsepius@rtems.org>

        * shared/console/console.c: Remove stray local decl of "close".
</pre></td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/c/src/lib/libbsp/powerpc/ChangeLog.diff?r1=text&tr1=1.268&r2=text&tr2=1.269&diff_format=h">M</a></td><td width='1%'>1.269</td><td width='100%'>c/src/lib/libbsp/powerpc/ChangeLog</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/c/src/lib/libbsp/powerpc/shared/console/console.c.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%'>c/src/lib/libbsp/powerpc/shared/console/console.c</td></tr>
</table>
<pre>
<font color='#006600'>diff -u rtems/c/src/lib/libbsp/powerpc/ChangeLog:1.268 rtems/c/src/lib/libbsp/powerpc/ChangeLog:1.269
--- rtems/c/src/lib/libbsp/powerpc/ChangeLog:1.268      Wed Aug 31 10:54:18 2011
+++ rtems/c/src/lib/libbsp/powerpc/ChangeLog    Fri Oct  7 09:25:31 2011
</font><font color='#997700'>@@ -1,3 +1,7 @@
</font><font color='#000088'>+2011-10-07    Ralf Corsépius <ralf.corsepius@rtems.org>
+
+       * shared/console/console.c: Remove stray local decl of "close".
+
</font> 2011-08-31        Sebastian Huber <sebastian.huber@embedded-brains.de>
 
        * shared/startup/linkcmds.base: New file.

<font color='#006600'>diff -u rtems/c/src/lib/libbsp/powerpc/shared/console/console.c:1.20 rtems/c/src/lib/libbsp/powerpc/shared/console/console.c:1.21
--- rtems/c/src/lib/libbsp/powerpc/shared/console/console.c:1.20        Fri Jan 28 14:29:52 2011
+++ rtems/c/src/lib/libbsp/powerpc/shared/console/console.c     Fri Oct  7 09:25:31 2011
</font><font color='#997700'>@@ -26,8 +26,6 @@
</font> #include <assert.h>
 #include <stdlib.h>
 
<font color='#880000'>-extern int close(int fd);
-
</font> #include <bsp.h>
 #include <bsp/irq.h>
 #include <rtems/bspIo.h>
</pre>
<p> </p>
<a name='cs5'></a>
<table border='0' cellspacing='0' cellpadding='5' width='100%' bgcolor='#eeeeee'>
<tr><td colspan='3' bgcolor='#dddddd'>
 <font color='#bb2222'><strong>ralf</strong></font>
</td></tr>
<tr><td colspan='3' bgcolor='#dddddd'><pre>2011-10-07 Ralf Corsépius <ralf.corsepius@rtems.org>

        * shared/startup/bspstart.c: Comment out unused vars.
</pre></td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/c/src/lib/libbsp/powerpc/ChangeLog.diff?r1=text&tr1=1.269&r2=text&tr2=1.270&diff_format=h">M</a></td><td width='1%'>1.270</td><td width='100%'>c/src/lib/libbsp/powerpc/ChangeLog</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/c/src/lib/libbsp/powerpc/shared/startup/bspstart.c.diff?r1=text&tr1=1.57&r2=text&tr2=1.58&diff_format=h">M</a></td><td width='1%'>1.58</td><td width='100%'>c/src/lib/libbsp/powerpc/shared/startup/bspstart.c</td></tr>
</table>
<pre>
<font color='#006600'>diff -u rtems/c/src/lib/libbsp/powerpc/ChangeLog:1.269 rtems/c/src/lib/libbsp/powerpc/ChangeLog:1.270
--- rtems/c/src/lib/libbsp/powerpc/ChangeLog:1.269      Fri Oct  7 09:25:31 2011
+++ rtems/c/src/lib/libbsp/powerpc/ChangeLog    Fri Oct  7 09:29:38 2011
</font><font color='#997700'>@@ -1,5 +1,6 @@
</font> 2011-10-07        Ralf Corsépius <ralf.corsepius@rtems.org>
 
<font color='#000088'>+   * shared/startup/bspstart.c: Comment out unused vars.
</font>   * shared/console/console.c: Remove stray local decl of "close".
 
 2011-08-31     Sebastian Huber <sebastian.huber@embedded-brains.de>

<font color='#006600'>diff -u rtems/c/src/lib/libbsp/powerpc/shared/startup/bspstart.c:1.57 rtems/c/src/lib/libbsp/powerpc/shared/startup/bspstart.c:1.58
--- rtems/c/src/lib/libbsp/powerpc/shared/startup/bspstart.c:1.57       Mon Jul 18 11:35:08 2011
+++ rtems/c/src/lib/libbsp/powerpc/shared/startup/bspstart.c    Fri Oct  7 09:29:38 2011
</font><font color='#997700'>@@ -143,8 +143,8 @@
</font> #endif
   uintptr_t intrStackStart;
   uintptr_t intrStackSize;
<font color='#880000'>-  ppc_cpu_id_t myCpu;
-  ppc_cpu_revision_t myCpuRevision;
</font><font color='#000088'>+/*  ppc_cpu_id_t myCpu; */
+/*  ppc_cpu_revision_t myCpuRevision; */
</font>   prep_t boardManufacturer;
   motorolaBoard myBoard;
   Triv121PgTbl pt=0;
<font color='#997700'>@@ -154,8 +154,8 @@
</font>    * function store the result in global variables so that it can be used
    * later...
    */
<font color='#880000'>-  myCpu<span style="background-color: #FF0000"> </span>      = get_ppc_cpu_type();
-  myCpuRevision = get_ppc_cpu_revision();
</font><font color='#000088'>+  /* myCpu<span style="background-color: #FF0000"> </span>      = */ get_ppc_cpu_type();
+  /* myCpuRevision = */ get_ppc_cpu_revision();
</font> 
   /*
    * Init MMU block address translation to enable hardware access
</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>