<!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 (2010-11-17)</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>2010-11-16 Joel Sherrill <joel.sherrill@oarcorp.com>

        * cpu.c: Remove unused variable reported by clang.
</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.99&r2=text&tr2=1.100&diff_format=h">M</a></td><td width='1%'>1.100</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.c.diff?r1=text&tr1=1.30&r2=text&tr2=1.31&diff_format=h">M</a></td><td width='1%'>1.31</td><td width='100%'>cpukit/score/cpu/sparc/cpu.c</td></tr>
</table>
<pre>
<font color='#006600'>diff -u rtems/cpukit/score/cpu/sparc/ChangeLog:1.99 rtems/cpukit/score/cpu/sparc/ChangeLog:1.100
--- rtems/cpukit/score/cpu/sparc/ChangeLog:1.99 Thu Oct 21 17:17:37 2010
+++ rtems/cpukit/score/cpu/sparc/ChangeLog      Tue Nov 16 11:41:56 2010
</font><font color='#997700'>@@ -1,3 +1,7 @@
</font><font color='#000088'>+2010-11-16    Joel Sherrill <joel.sherrill@oarcorp.com>
+
+       * cpu.c: Remove unused variable reported by clang.
+
</font> 2010-10-21        Joel Sherrill <joel.sherrill@oarcorp.com>
 
        * rtems/score/cpu.h: Add RTEMS_COMPILER_NO_RETURN_ATTRIBUTE to

<font color='#006600'>diff -u rtems/cpukit/score/cpu/sparc/cpu.c:1.30 rtems/cpukit/score/cpu/sparc/cpu.c:1.31
--- rtems/cpukit/score/cpu/sparc/cpu.c:1.30     Sat Mar 27 10:03:09 2010
+++ rtems/cpukit/score/cpu/sparc/cpu.c  Tue Nov 16 11:41:56 2010
</font><font color='#997700'>@@ -281,7 +281,6 @@
</font> )
 {
     uint32_t     stack_high;  /* highest "stack aligned" address */
<font color='#880000'>-    uint32_t     the_size;
</font>     uint32_t     tmp_psr;
 
     /*
<font color='#997700'>@@ -292,8 +291,6 @@
</font>     stack_high = ((uint32_t)(stack_base) + size);
     stack_high &= ~(CPU_STACK_ALIGNMENT - 1);
 
<font color='#880000'>-    the_size = size & ~(CPU_STACK_ALIGNMENT - 1);
-
</font>     /*
      *  See the README in this directory for a diagram of the stack.
      */
</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>2010-11-16 Joel Sherrill <joel.sherrill@oarcorp.com>

        * libcsupport/src/putk.c: Remove useless variable initialization
        pointed out by clang.
</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.2644&r2=text&tr2=1.2645&diff_format=h">M</a></td><td width='1%'>1.2645</td><td width='100%'>cpukit/ChangeLog</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/libcsupport/src/putk.c.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%'>cpukit/libcsupport/src/putk.c</td></tr>
</table>
<pre>
<font color='#006600'>diff -u rtems/cpukit/ChangeLog:1.2644 rtems/cpukit/ChangeLog:1.2645
--- rtems/cpukit/ChangeLog:1.2644       Thu Nov 11 07:37:03 2010
+++ rtems/cpukit/ChangeLog      Tue Nov 16 11:47:06 2010
</font><font color='#997700'>@@ -1,3 +1,8 @@
</font><font color='#000088'>+2010-11-16    Joel Sherrill <joel.sherrill@oarcorp.com>
+
+       * libcsupport/src/putk.c: Remove useless variable initialization
+       pointed out by clang.
+
</font> 2010-11-11        Sebastian Huber <sebastian.huber@embedded-brains.de>
 
        * score/include/rtems/score/userext.h: Documentation.

<font color='#006600'>diff -u rtems/cpukit/libcsupport/src/putk.c:1.2 rtems/cpukit/libcsupport/src/putk.c:1.3
--- rtems/cpukit/libcsupport/src/putk.c:1.2     Sun Nov 29 07:35:32 2009
+++ rtems/cpukit/libcsupport/src/putk.c Tue Nov 16 11:47:06 2010
</font><font color='#997700'>@@ -22,7 +22,7 @@
</font>  */
 void putk(const char *s)
 {
<font color='#880000'>-  const char *p = s;
</font><font color='#000088'>+  const char *p;
</font> 
   for (p=s ; *p ; p++ )
     BSP_output_char(*p);
</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>2010-11-16 Joel Sherrill <joel.sherrill@oarcorp.com>

        * rtems/src/ratemonreportstatistics.c, rtems/src/ratemonresetall.c:
        Remove unchecked return status pointed out by clang.
</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.2645&r2=text&tr2=1.2646&diff_format=h">M</a></td><td width='1%'>1.2646</td><td width='100%'>cpukit/ChangeLog</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/rtems/src/ratemonreportstatistics.c.diff?r1=text&tr1=1.12&r2=text&tr2=1.13&diff_format=h">M</a></td><td width='1%'>1.13</td><td width='100%'>cpukit/rtems/src/ratemonreportstatistics.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/rtems/src/ratemonresetall.c.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%'>cpukit/rtems/src/ratemonresetall.c</td></tr>
</table>
<pre>
<font color='#006600'>diff -u rtems/cpukit/ChangeLog:1.2645 rtems/cpukit/ChangeLog:1.2646
--- rtems/cpukit/ChangeLog:1.2645       Tue Nov 16 11:47:06 2010
+++ rtems/cpukit/ChangeLog      Tue Nov 16 11:48:06 2010
</font><font color='#997700'>@@ -1,5 +1,10 @@
</font> 2010-11-16        Joel Sherrill <joel.sherrill@oarcorp.com>
 
<font color='#000088'>+   * rtems/src/ratemonreportstatistics.c, rtems/src/ratemonresetall.c:
+       Remove unchecked return status pointed out by clang.
+
+2010-11-16     Joel Sherrill <joel.sherrill@oarcorp.com>
+
</font>   * libcsupport/src/putk.c: Remove useless variable initialization
        pointed out by clang.
 

<font color='#006600'>diff -u rtems/cpukit/rtems/src/ratemonreportstatistics.c:1.12 rtems/cpukit/rtems/src/ratemonreportstatistics.c:1.13
--- rtems/cpukit/rtems/src/ratemonreportstatistics.c:1.12       Wed Dec  2 12:22:18 2009
+++ rtems/cpukit/rtems/src/ratemonreportstatistics.c    Tue Nov 16 11:48:06 2010
</font><font color='#997700'>@@ -1,7 +1,7 @@
</font> /*
  *  Rate Monotonic Manager -- Report Statistics for All Periods
  *
<font color='#880000'>- *  COPYRIGHT (c) 1989-2009.
</font><font color='#000088'>+ *  COPYRIGHT (c) 1989-2010.
</font>  *  On-Line Applications Research Corporation (OAR).
  *
  *  The license and distribution terms for this file may be
<font color='#997700'>@@ -103,10 +103,12 @@
</font>       continue;
 
     /* If the above passed, so should this but check it anyway */
<font color='#880000'>-    status = rtems_rate_monotonic_get_status( id, &the_status );
</font>     #if defined(RTEMS_DEBUG)
<font color='#000088'>+      status = rtems_rate_monotonic_get_status( id, &the_status );
</font>       if ( status != RTEMS_SUCCESSFUL )
         continue;
<font color='#000088'>+    #else
+      (void) rtems_rate_monotonic_get_status( id, &the_status );
</font>     #endif
 
     rtems_object_get_name( the_status.owner, sizeof(name), name );

<font color='#006600'>diff -u rtems/cpukit/rtems/src/ratemonresetall.c:1.2 rtems/cpukit/rtems/src/ratemonresetall.c:1.3
--- rtems/cpukit/rtems/src/ratemonresetall.c:1.2        Thu May 17 17:46:45 2007
+++ rtems/cpukit/rtems/src/ratemonresetall.c    Tue Nov 16 11:48:06 2010
</font><font color='#997700'>@@ -1,7 +1,7 @@
</font> /*
  *  Rate Monotonic Manager -- Reset Statistics for All Periods
  *
<font color='#880000'>- *  COPYRIGHT (c) 1989-2007.
</font><font color='#000088'>+ *  COPYRIGHT (c) 1989-2010.
</font>  *  On-Line Applications Research Corporation (OAR).
  *
  *  The license and distribution terms for this file may be
<font color='#997700'>@@ -28,7 +28,6 @@
</font> void rtems_rate_monotonic_reset_all_statistics( void )
 {
   Objects_Id        id;
<font color='#880000'>-  rtems_status_code status;
</font> 
    /*
     *  Prevent allocation or deallocation of any of the periods while
<font color='#997700'>@@ -46,7 +45,7 @@
</font>     for ( id=_Rate_monotonic_Information.minimum_id ;
           id <= _Rate_monotonic_Information.maximum_id ;
           id++ ) {
<font color='#880000'>-      status = rtems_rate_monotonic_reset_statistics( id );
</font><font color='#000088'>+      (void) rtems_rate_monotonic_reset_statistics( id );
</font>     }
 
   /*
</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>joel</strong></font>
</td></tr>
<tr><td colspan='3' bgcolor='#dddddd'><pre>2010-11-16 Joel Sherrill <joel.sherrill@oarcorp.com>

        * score/src/objectnametoid.c, score/src/objectnametoidstring.c:
        Remove useless variable pointed out by clang.
        * score/src/threadstackallocate.c: Remove useless variable
        initialization pointed out by clang.
</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.2646&r2=text&tr2=1.2647&diff_format=h">M</a></td><td width='1%'>1.2647</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/objectnametoid.c.diff?r1=text&tr1=1.14&r2=text&tr2=1.15&diff_format=h">M</a></td><td width='1%'>1.15</td><td width='100%'>cpukit/score/src/objectnametoid.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/score/src/objectnametoidstring.c.diff?r1=text&tr1=1.7&r2=text&tr2=1.8&diff_format=h">M</a></td><td width='1%'>1.8</td><td width='100%'>cpukit/score/src/objectnametoidstring.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/score/src/threadstackallocate.c.diff?r1=text&tr1=1.12&r2=text&tr2=1.13&diff_format=h">M</a></td><td width='1%'>1.13</td><td width='100%'>cpukit/score/src/threadstackallocate.c</td></tr>
</table>
<pre>
<font color='#006600'>diff -u rtems/cpukit/ChangeLog:1.2646 rtems/cpukit/ChangeLog:1.2647
--- rtems/cpukit/ChangeLog:1.2646       Tue Nov 16 11:48:06 2010
+++ rtems/cpukit/ChangeLog      Tue Nov 16 11:50:26 2010
</font><font color='#997700'>@@ -1,5 +1,12 @@
</font> 2010-11-16        Joel Sherrill <joel.sherrill@oarcorp.com>
 
<font color='#000088'>+   * score/src/objectnametoid.c, score/src/objectnametoidstring.c:
+       Remove useless variable pointed out by clang.
+       * score/src/threadstackallocate.c: Remove useless variable
+       initialization pointed out by clang.
+
+2010-11-16     Joel Sherrill <joel.sherrill@oarcorp.com>
+
</font>   * rtems/src/ratemonreportstatistics.c, rtems/src/ratemonresetall.c:
        Remove unchecked return status pointed out by clang.
 

<font color='#006600'>diff -u rtems/cpukit/score/src/objectnametoid.c:1.14 rtems/cpukit/score/src/objectnametoid.c:1.15
--- rtems/cpukit/score/src/objectnametoid.c:1.14        Sun Dec 21 23:52:32 2008
+++ rtems/cpukit/score/src/objectnametoid.c     Tue Nov 16 11:50:26 2010
</font><font color='#997700'>@@ -1,8 +1,7 @@
</font> /*
  *  Object Handler
  *
<font color='#880000'>- *
- *  COPYRIGHT (c) 1989-2008.
</font><font color='#000088'>+ *  COPYRIGHT (c) 1989-2010.
</font>  *  On-Line Applications Research Corporation (OAR).
  *
  *  The license and distribution terms for this file may be
<font color='#997700'>@@ -57,7 +56,6 @@
</font>   bool                       search_local_node;
   Objects_Control           *the_object;
   uint32_t                   index;
<font color='#880000'>-  uint32_t                   name_length;
</font> #if defined(RTEMS_MULTIPROCESSING)
   Objects_Name               name_for_mp;
 #endif
<font color='#997700'>@@ -80,8 +78,6 @@
</font>    search_local_node = true;
 
   if ( search_local_node ) {
<font color='#880000'>-    name_length = information->name_length;
-
</font>     for ( index = 1; index <= information->maximum; index++ ) {
       the_object = information->local_table[ index ];
       if ( !the_object )

<font color='#006600'>diff -u rtems/cpukit/score/src/objectnametoidstring.c:1.7 rtems/cpukit/score/src/objectnametoidstring.c:1.8
--- rtems/cpukit/score/src/objectnametoidstring.c:1.7   Fri Sep 11 15:00:30 2009
+++ rtems/cpukit/score/src/objectnametoidstring.c       Tue Nov 16 11:50:26 2010
</font><font color='#997700'>@@ -1,8 +1,7 @@
</font> /*
  *  Object Handler - Object ID to Name (String)
  *
<font color='#880000'>- *
- *  COPYRIGHT (c) 1989-2008.
</font><font color='#000088'>+ *  COPYRIGHT (c) 1989-2010.
</font>  *  On-Line Applications Research Corporation (OAR).
  *
  *  The license and distribution terms for this file may be
<font color='#997700'>@@ -57,7 +56,6 @@
</font> {
   Objects_Control           *the_object;
   uint32_t                   index;
<font color='#880000'>-  uint32_t                   name_length;
</font> 
   /* ASSERT: information->is_string == true */
 
<font color='#997700'>@@ -68,7 +66,6 @@
</font>     return OBJECTS_INVALID_NAME;
 
   if ( information->maximum != 0 ) {
<font color='#880000'>-    name_length = information->name_length;
</font> 
     for ( index = 1; index <= information->maximum; index++ ) {
       the_object = information->local_table[ index ];

<font color='#006600'>diff -u rtems/cpukit/score/src/threadstackallocate.c:1.12 rtems/cpukit/score/src/threadstackallocate.c:1.13
--- rtems/cpukit/score/src/threadstackallocate.c:1.12   Mon Dec 15 13:21:01 2008
+++ rtems/cpukit/score/src/threadstackallocate.c        Tue Nov 16 11:50:26 2010
</font><font color='#997700'>@@ -1,8 +1,7 @@
</font> /*
<font color='#880000'>- *  Thread Handler
</font><font color='#000088'>+ *  Thread Handler - Stack Allocate Helper
</font>  *
<font color='#880000'>- *
- *  COPYRIGHT (c) 1989-2008.
</font><font color='#000088'>+ *  COPYRIGHT (c) 1989-2010.
</font>  *  On-Line Applications Research Corporation (OAR).
  *
  *  The license and distribution terms for this file may be
<font color='#997700'>@@ -47,7 +46,7 @@
</font> )
 {
   void *stack_addr = 0;
<font color='#880000'>-  size_t the_stack_size = stack_size;
</font><font color='#000088'>+  size_t the_stack_size;
</font> 
   the_stack_size = _Stack_Ensure_minimum( stack_size );
 
</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>joel</strong></font>
</td></tr>
<tr><td colspan='3' bgcolor='#dddddd'><pre>2010-11-16 Joel Sherrill <joel.sherrill@oarcorp.com>

        * libmisc/monitor/mon-monitor.c: Move node code into multiprocessing
        ifdef.
</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.2647&r2=text&tr2=1.2648&diff_format=h">M</a></td><td width='1%'>1.2648</td><td width='100%'>cpukit/ChangeLog</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/libmisc/monitor/mon-monitor.c.diff?r1=text&tr1=1.40&r2=text&tr2=1.41&diff_format=h">M</a></td><td width='1%'>1.41</td><td width='100%'>cpukit/libmisc/monitor/mon-monitor.c</td></tr>
</table>
<pre>
<font color='#006600'>diff -u rtems/cpukit/ChangeLog:1.2647 rtems/cpukit/ChangeLog:1.2648
--- rtems/cpukit/ChangeLog:1.2647       Tue Nov 16 11:50:26 2010
+++ rtems/cpukit/ChangeLog      Tue Nov 16 11:51:02 2010
</font><font color='#997700'>@@ -1,5 +1,10 @@
</font> 2010-11-16        Joel Sherrill <joel.sherrill@oarcorp.com>
 
<font color='#000088'>+   * libmisc/monitor/mon-monitor.c: Move node code into multiprocessing
+       ifdef.
+
+2010-11-16     Joel Sherrill <joel.sherrill@oarcorp.com>
+
</font>   * score/src/objectnametoid.c, score/src/objectnametoidstring.c:
        Remove useless variable pointed out by clang.
        * score/src/threadstackallocate.c: Remove useless variable

<font color='#006600'>diff -u rtems/cpukit/libmisc/monitor/mon-monitor.c:1.40 rtems/cpukit/libmisc/monitor/mon-monitor.c:1.41
--- rtems/cpukit/libmisc/monitor/mon-monitor.c:1.40     Wed Apr  7 09:58:45 2010
+++ rtems/cpukit/libmisc/monitor/mon-monitor.c  Tue Nov 16 11:51:02 2010
</font><font color='#997700'>@@ -106,6 +106,7 @@
</font>       { 0 },
       &rtems_monitor_commands[6],
     },
<font color='#000088'>+#if defined(RTEMS_MULTIPROCESSING)
</font>     { "node",
       "Specify default node number for commands that take id's.\n"
       "  node [ node number ]",
<font color='#997700'>@@ -114,6 +115,7 @@
</font>       { 0 },
       &rtems_monitor_commands[7],
     },
<font color='#000088'>+#endif
</font>     { "symbol",
       "Display value associated with specified symbol. "
       "Defaults to displaying all known symbols.\n"
<font color='#997700'>@@ -359,6 +361,7 @@
</font>     rtems_monitor_suspend(RTEMS_NO_TIMEOUT);
 }
 
<font color='#000088'>+#if defined(RTEMS_MULTIPROCESSING)
</font> void rtems_monitor_node_cmd(
   int                                argc,
   char                             **argv,
<font color='#997700'>@@ -366,30 +369,28 @@
</font>   bool                               verbose __attribute__((unused))
 )
 {
<font color='#880000'>-    uint32_t   new_node = rtems_monitor_default_node;
</font><font color='#000088'>+  uint32_t   new_node = rtems_monitor_default_node;
</font> 
<font color='#880000'>-    switch (argc)
-    {
-        case 1:<span style="background-color: #FF0000"> </span>          /* no node, just set back to ours */
-            new_node = rtems_monitor_node;
-            break;
-
-        case 2:
-            new_node = strtoul(argv[1], 0, 0);
-            break;
-
-        default:
-            fprintf(stdout,"invalid syntax, try 'help node'\n");
-            break;
-    }
</font><font color='#000088'>+  switch (argc) {
+    case 1:<span style="background-color: #FF0000"> </span>              /* no node, just set back to ours */
+      new_node = rtems_monitor_node;
+      break;
+
+    case 2:
+      new_node = strtoul(argv[1], 0, 0);
+      break;
+
+    default:
+      fprintf(stdout,"invalid syntax, try 'help node'\n");
+      break;
+  }
</font> 
<font color='#880000'>-    #if defined(RTEMS_MULTIPROCESSING)
-      if ((new_node >= 1) &&
-        _Configuration_MP_table &&
-        (new_node <= _Configuration_MP_table->maximum_nodes))
-            rtems_monitor_default_node = new_node;
-    #endif
</font><font color='#000088'>+  if ((new_node >= 1) &&
+    _Configuration_MP_table &&
+    (new_node <= _Configuration_MP_table->maximum_nodes))
+       rtems_monitor_default_node = new_node;
</font> }
<font color='#000088'>+#endif
</font> 
 
 /*
</pre>
<p> </p>
<a name='cs6'></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>2010-11-16 Joel Sherrill <joel.sherrill@oarcorp.com>

        PR 1717/cpukit
        * libcsupport/src/gxx_wrappers.c: Free memory on error.
</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.2648&r2=text&tr2=1.2649&diff_format=h">M</a></td><td width='1%'>1.2649</td><td width='100%'>cpukit/ChangeLog</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/libcsupport/src/gxx_wrappers.c.diff?r1=text&tr1=1.22&r2=text&tr2=1.23&diff_format=h">M</a></td><td width='1%'>1.23</td><td width='100%'>cpukit/libcsupport/src/gxx_wrappers.c</td></tr>
</table>
<pre>
<font color='#006600'>diff -u rtems/cpukit/ChangeLog:1.2648 rtems/cpukit/ChangeLog:1.2649
--- rtems/cpukit/ChangeLog:1.2648       Tue Nov 16 11:51:02 2010
+++ rtems/cpukit/ChangeLog      Tue Nov 16 12:51:33 2010
</font><font color='#997700'>@@ -1,5 +1,10 @@
</font> 2010-11-16        Joel Sherrill <joel.sherrill@oarcorp.com>
 
<font color='#000088'>+   PR 1717/cpukit
+       * libcsupport/src/gxx_wrappers.c: Free memory on error.
+
+2010-11-16     Joel Sherrill <joel.sherrill@oarcorp.com>
+
</font>   * libmisc/monitor/mon-monitor.c: Move node code into multiprocessing
        ifdef.
 

<font color='#006600'>diff -u rtems/cpukit/libcsupport/src/gxx_wrappers.c:1.22 rtems/cpukit/libcsupport/src/gxx_wrappers.c:1.23
--- rtems/cpukit/libcsupport/src/gxx_wrappers.c:1.22    Mon Aug 23 02:59:38 2010
+++ rtems/cpukit/libcsupport/src/gxx_wrappers.c Tue Nov 16 12:51:34 2010
</font><font color='#997700'>@@ -80,6 +80,8 @@
</font>   status = rtems_task_variable_add( RTEMS_SELF, (void **)new_key, dtor );
   if ( status == RTEMS_SUCCESSFUL )
     return 0;
<font color='#000088'>+
+  free( new_key );
</font>   return -1;
 }
 
</pre>
<p> </p>
<a name='cs7'></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>
 <font color='#225522'><em>(on branch rtems-4-10-branch)</em></font>
</td></tr>
<tr><td colspan='3' bgcolor='#dddddd'><pre>2010-11-16 Joel Sherrill <joel.sherrilL@OARcorp.com>

        PR 1717/cpukit
        * libcsupport/src/gxx_wrappers.c: Free memory on error.
</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.696.2.109&r2=text&tr2=1.696.2.110&diff_format=h">M</a></td><td width='1%'>1.696.2.110</td><td width='100%'>cpukit/ChangeLog</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/ChangeLog.diff?r1=text&tr1=1.1080.2.61&r2=text&tr2=1.1080.2.62&diff_format=h">M</a></td><td width='1%'>1.1080.2.62</td><td width='100%'>cpukit/ChangeLog</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/ChangeLog.diff?r1=text&tr1=1.1539.2.67&r2=text&tr2=1.1539.2.68&diff_format=h">M</a></td><td width='1%'>1.1539.2.68</td><td width='100%'>cpukit/ChangeLog</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/ChangeLog.diff?r1=text&tr1=1.2346.2.71&r2=text&tr2=1.2346.2.72&diff_format=h">M</a></td><td width='1%'>1.2346.2.72</td><td width='100%'>cpukit/ChangeLog</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/libcsupport/src/gxx_wrappers.c.diff?r1=text&tr1=1.12.2.2&r2=text&tr2=1.12.2.3&diff_format=h">M</a></td><td width='1%'>1.12.2.3</td><td width='100%'>cpukit/libcsupport/src/gxx_wrappers.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/libcsupport/src/gxx_wrappers.c.diff?r1=text&tr1=1.13.2.1&r2=text&tr2=1.13.2.2&diff_format=h">M</a></td><td width='1%'>1.13.2.2</td><td width='100%'>cpukit/libcsupport/src/gxx_wrappers.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/libcsupport/src/gxx_wrappers.c.diff?r1=text&tr1=1.16.2.1&r2=text&tr2=1.16.2.2&diff_format=h">M</a></td><td width='1%'>1.16.2.2</td><td width='100%'>cpukit/libcsupport/src/gxx_wrappers.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/libcsupport/src/gxx_wrappers.c.diff?r1=text&tr1=1.18&r2=text&tr2=1.18.2.1&diff_format=h">M</a></td><td width='1%'>1.18.2.1</td><td width='100%'>cpukit/libcsupport/src/gxx_wrappers.c</td></tr>
</table>
<pre>
<font color='#006600'>diff -u rtems/cpukit/ChangeLog:1.696.2.109 rtems/cpukit/ChangeLog:1.696.2.110
--- rtems/cpukit/ChangeLog:1.696.2.109  Fri Aug 27 12:42:39 2010
+++ rtems/cpukit/ChangeLog      Tue Nov 16 12:52:28 2010
</font><font color='#997700'>@@ -1,3 +1,8 @@
</font><font color='#000088'>+2010-11-16    Joel Sherrill <joel.sherrilL@OARcorp.com>
+
+       PR 1717/cpukit
+       * libcsupport/src/gxx_wrappers.c: Free memory on error.
+
</font> 2010-08-27        Joel Sherrill <joel.sherrilL@OARcorp.com>
 
        PR 1693/filesystem

<font color='#006600'>diff -u rtems/cpukit/ChangeLog:1.1080.2.61 rtems/cpukit/ChangeLog:1.1080.2.62
--- rtems/cpukit/ChangeLog:1.1080.2.61  Fri Aug 27 12:42:50 2010
+++ rtems/cpukit/ChangeLog      Tue Nov 16 12:52:20 2010
</font><font color='#997700'>@@ -1,3 +1,8 @@
</font><font color='#000088'>+2010-11-16    Joel Sherrill <joel.sherrilL@OARcorp.com>
+
+       PR 1717/cpukit
+       * libcsupport/src/gxx_wrappers.c: Free memory on error.
+
</font> 2010-08-27        Joel Sherrill <joel.sherrilL@OARcorp.com>
 
        PR 1693/filesystem

<font color='#006600'>diff -u rtems/cpukit/ChangeLog:1.1539.2.67 rtems/cpukit/ChangeLog:1.1539.2.68
--- rtems/cpukit/ChangeLog:1.1539.2.67  Fri Aug 27 12:42:59 2010
+++ rtems/cpukit/ChangeLog      Tue Nov 16 12:52:13 2010
</font><font color='#997700'>@@ -1,3 +1,8 @@
</font><font color='#000088'>+2010-11-16    Joel Sherrill <joel.sherrilL@OARcorp.com>
+
+       PR 1717/cpukit
+       * libcsupport/src/gxx_wrappers.c: Free memory on error.
+
</font> 2010-08-27        Joel Sherrill <joel.sherrilL@OARcorp.com>
 
        PR 1693/filesystem

<font color='#006600'>diff -u rtems/cpukit/ChangeLog:1.2346.2.71 rtems/cpukit/ChangeLog:1.2346.2.72
--- rtems/cpukit/ChangeLog:1.2346.2.71  Mon Oct 18 17:48:54 2010
+++ rtems/cpukit/ChangeLog      Tue Nov 16 12:52:04 2010
</font><font color='#997700'>@@ -1,3 +1,8 @@
</font><font color='#000088'>+2010-11-16    Joel Sherrill <joel.sherrilL@OARcorp.com>
+
+       PR 1717/cpukit
+       * libcsupport/src/gxx_wrappers.c: Free memory on error.
+
</font> 2010-10-19      Chris Johns <chrisj@rtems.org>
 
        * libfs/src/rfs/rtems-rfs-rtems-file.c: Add missing unlock in

<font color='#006600'>diff -u rtems/cpukit/libcsupport/src/gxx_wrappers.c:1.12.2.2 rtems/cpukit/libcsupport/src/gxx_wrappers.c:1.12.2.3
--- rtems/cpukit/libcsupport/src/gxx_wrappers.c:1.12.2.2        Thu Jan 29 08:33:08 2009
+++ rtems/cpukit/libcsupport/src/gxx_wrappers.c Tue Nov 16 12:52:29 2010
</font><font color='#997700'>@@ -106,6 +106,7 @@
</font>   /* register with RTEMS the buffer that will hold the key values */
   if( rtems_task_variable_add( RTEMS_SELF, (void **)new_key, dtor ) == RTEMS_SUCCESSFUL )
        return 0;
<font color='#000088'>+  free( new_key );
</font>   return -1;
 }
 

<font color='#006600'>diff -u rtems/cpukit/libcsupport/src/gxx_wrappers.c:1.13.2.1 rtems/cpukit/libcsupport/src/gxx_wrappers.c:1.13.2.2
--- rtems/cpukit/libcsupport/src/gxx_wrappers.c:1.13.2.1        Thu Jan 29 08:32:59 2009
+++ rtems/cpukit/libcsupport/src/gxx_wrappers.c Tue Nov 16 12:52:21 2010
</font><font color='#997700'>@@ -106,6 +106,7 @@
</font>   /* register with RTEMS the buffer that will hold the key values */
   if( rtems_task_variable_add( RTEMS_SELF, (void **)new_key, dtor ) == RTEMS_SUCCESSFUL )
        return 0;
<font color='#000088'>+  free( new_key );
</font>   return -1;
 }
 

<font color='#006600'>diff -u rtems/cpukit/libcsupport/src/gxx_wrappers.c:1.16.2.1 rtems/cpukit/libcsupport/src/gxx_wrappers.c:1.16.2.2
--- rtems/cpukit/libcsupport/src/gxx_wrappers.c:1.16.2.1        Thu Jan 29 08:32:51 2009
+++ rtems/cpukit/libcsupport/src/gxx_wrappers.c Tue Nov 16 12:52:14 2010
</font><font color='#997700'>@@ -106,6 +106,7 @@
</font>   /* register with RTEMS the buffer that will hold the key values */
   if( rtems_task_variable_add( RTEMS_SELF, (void **)new_key, dtor ) == RTEMS_SUCCESSFUL )
        return 0;
<font color='#000088'>+  free( new_key );
</font>   return -1;
 }
 

<font color='#006600'>diff -u rtems/cpukit/libcsupport/src/gxx_wrappers.c:1.18 rtems/cpukit/libcsupport/src/gxx_wrappers.c:1.18.2.1
--- rtems/cpukit/libcsupport/src/gxx_wrappers.c:1.18    Thu Jan 29 08:32:43 2009
+++ rtems/cpukit/libcsupport/src/gxx_wrappers.c Tue Nov 16 12:52:05 2010
</font><font color='#997700'>@@ -106,6 +106,7 @@
</font>   /* register with RTEMS the buffer that will hold the key values */
   if( rtems_task_variable_add( RTEMS_SELF, (void **)new_key, dtor ) == RTEMS_SUCCESSFUL )
        return 0;
<font color='#000088'>+  free( new_key );
</font>   return -1;
 }
 
</pre>
<p> </p>
<a name='cs8'></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>2010-11-16 Joel Sherrill <joel.sherrill@oarcorp.com>

        * sp70/init.c, sp70/sp70.scn: Fix bug in test which lead to random
        memory corruption.
</pre></td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/sptests/ChangeLog.diff?r1=text&tr1=1.423&r2=text&tr2=1.424&diff_format=h">M</a></td><td width='1%'>1.424</td><td width='100%'>testsuites/sptests/ChangeLog</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/sptests/sp70/init.c.diff?r1=text&tr1=1.1&r2=text&tr2=1.2&diff_format=h">M</a></td><td width='1%'>1.2</td><td width='100%'>testsuites/sptests/sp70/init.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/sptests/sp70/sp70.scn.diff?r1=text&tr1=1.1&r2=text&tr2=1.2&diff_format=h">M</a></td><td width='1%'>1.2</td><td width='100%'>testsuites/sptests/sp70/sp70.scn</td></tr>
</table>
<pre>
<font color='#006600'>diff -u rtems/testsuites/sptests/ChangeLog:1.423 rtems/testsuites/sptests/ChangeLog:1.424
--- rtems/testsuites/sptests/ChangeLog:1.423    Mon Oct 25 23:22:55 2010
+++ rtems/testsuites/sptests/ChangeLog  Tue Nov 16 13:01:29 2010
</font><font color='#997700'>@@ -1,3 +1,8 @@
</font><font color='#000088'>+2010-11-16    Joel Sherrill <joel.sherrill@oarcorp.com>
+
+       * sp70/init.c, sp70/sp70.scn: Fix bug in test which lead to random
+       memory corruption.
+
</font> 2010-10-25        Joel Sherrill <joel.sherrill@oarcorp.com>
 
        * spchain/init.c: Attempt to improve coverage.

<font color='#006600'>diff -u rtems/testsuites/sptests/sp70/init.c:1.1 rtems/testsuites/sptests/sp70/init.c:1.2
--- rtems/testsuites/sptests/sp70/init.c:1.1    Sat Jun 19 11:01:27 2010
+++ rtems/testsuites/sptests/sp70/init.c        Tue Nov 16 13:01:29 2010
</font><font color='#997700'>@@ -12,7 +12,7 @@
</font> #include <tmacros.h>
 #include "test_support.h"
 
<font color='#880000'>-rtems_id          TaskID[4];
</font><font color='#000088'>+rtems_id          TaskID[10];
</font> 
 void create_helper(int task)
 {
<font color='#997700'>@@ -57,6 +57,11 @@
</font>   delete_helper( 4 );
   delete_helper( 5 );
 
<font color='#000088'>+  create_helper( 2 );
+  create_helper( 3 );
+  create_helper( 4 );
+  create_helper( 5 );
+
</font>   puts( "*** END OF TEST 70 ***" );
 
   rtems_test_exit(0);

<font color='#006600'>diff -u rtems/testsuites/sptests/sp70/sp70.scn:1.1 rtems/testsuites/sptests/sp70/sp70.scn:1.2
--- rtems/testsuites/sptests/sp70/sp70.scn:1.1  Sat Jun 19 11:01:27 2010
+++ rtems/testsuites/sptests/sp70/sp70.scn      Tue Nov 16 13:01:29 2010
</font><font color='#997700'>@@ -1 +1,16 @@
</font><font color='#880000'>-XXX fill in with test output
</font><font color='#000088'>+*** TEST 70 ***
+Creating task 1 - OK
+Creating task 2 - OK
+Creating task 3 - OK
+Creating task 4 - OK
+Creating task 5 - OK
+Creating task 6 - OK
+Deleting task 2
+Deleting task 3
+Deleting task 4
+Deleting task 5
+Creating task 2 - OK
+Creating task 3 - OK
+Creating task 4 - OK
+Creating task 5 - OK
+*** END OF TEST 70 ***
</font></pre>
<p> </p>
<a name='cs9'></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>2010-11-16 Joel Sherrill <joel.sherrill@oarcorp.com>

        PR 1718/cpukit
        * sapi/include/confdefs.h: POSIX threads are allocated twice the
        minimum stack space by default. confdefs.h only accounts for one
        minimum -- not the 2x factor.
</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.2649&r2=text&tr2=1.2650&diff_format=h">M</a></td><td width='1%'>1.2650</td><td width='100%'>cpukit/ChangeLog</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/sapi/include/confdefs.h.diff?r1=text&tr1=1.149&r2=text&tr2=1.150&diff_format=h">M</a></td><td width='1%'>1.150</td><td width='100%'>cpukit/sapi/include/confdefs.h</td></tr>
</table>
<pre>
<font color='#006600'>diff -u rtems/cpukit/ChangeLog:1.2649 rtems/cpukit/ChangeLog:1.2650
--- rtems/cpukit/ChangeLog:1.2649       Tue Nov 16 12:51:33 2010
+++ rtems/cpukit/ChangeLog      Tue Nov 16 13:14:09 2010
</font><font color='#997700'>@@ -1,5 +1,12 @@
</font> 2010-11-16        Joel Sherrill <joel.sherrill@oarcorp.com>
 
<font color='#000088'>+   PR 1718/cpukit
+       * sapi/include/confdefs.h: POSIX threads are allocated twice the
+       minimum stack space by default. confdefs.h only accounts for one
+       minimum -- not the 2x factor.
+
+2010-11-16     Joel Sherrill <joel.sherrill@oarcorp.com>
+
</font>   PR 1717/cpukit
        * libcsupport/src/gxx_wrappers.c: Free memory on error.
 

<font color='#006600'>diff -u rtems/cpukit/sapi/include/confdefs.h:1.149 rtems/cpukit/sapi/include/confdefs.h:1.150
--- rtems/cpukit/sapi/include/confdefs.h:1.149  Wed Aug 11 07:16:11 2010
+++ rtems/cpukit/sapi/include/confdefs.h        Tue Nov 16 13:14:10 2010
</font><font color='#997700'>@@ -1319,6 +1319,7 @@
</font> 
   #define CONFIGURE_MEMORY_PER_TASK_FOR_POSIX_API \
     _Configure_From_workspace( \
<font color='#000088'>+      CONFIGURE_MINIMUM_TASK_STACK_SIZE + \
</font>       sizeof (POSIX_API_Control) + \
      (sizeof (void *) * (CONFIGURE_MAXIMUM_POSIX_KEYS)) \
     )
</pre>
<p> </p>
<a name='cs10'></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>
 <font color='#225522'><em>(on branch rtems-4-9-branch)</em></font>
</td></tr>
<tr><td colspan='3' bgcolor='#dddddd'><pre>2010-11-16 Joel Sherrill <joel.sherrilL@OARcorp.com>

        PR 1718/cpukit
        * sapi/include/confdefs.h: POSIX threads are allocated twice the
        minimum stack space by default. confdefs.h only accounts for one
        minimum -- not the 2x factor.
</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.696.2.110&r2=text&tr2=1.696.2.111&diff_format=h">M</a></td><td width='1%'>1.696.2.111</td><td width='100%'>cpukit/ChangeLog</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/ChangeLog.diff?r1=text&tr1=1.1080.2.62&r2=text&tr2=1.1080.2.63&diff_format=h">M</a></td><td width='1%'>1.1080.2.63</td><td width='100%'>cpukit/ChangeLog</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/ChangeLog.diff?r1=text&tr1=1.1539.2.68&r2=text&tr2=1.1539.2.69&diff_format=h">M</a></td><td width='1%'>1.1539.2.69</td><td width='100%'>cpukit/ChangeLog</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/sapi/include/confdefs.h.diff?r1=text&tr1=1.64.2.2&r2=text&tr2=1.64.2.3&diff_format=h">M</a></td><td width='1%'>1.64.2.3</td><td width='100%'>cpukit/sapi/include/confdefs.h</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/sapi/include/confdefs.h.diff?r1=text&tr1=1.79.2.2&r2=text&tr2=1.79.2.3&diff_format=h">M</a></td><td width='1%'>1.79.2.3</td><td width='100%'>cpukit/sapi/include/confdefs.h</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/sapi/include/confdefs.h.diff?r1=text&tr1=1.108.2.5&r2=text&tr2=1.108.2.6&diff_format=h">M</a></td><td width='1%'>1.108.2.6</td><td width='100%'>cpukit/sapi/include/confdefs.h</td></tr>
</table>
<pre>
<font color='#006600'>diff -u rtems/cpukit/ChangeLog:1.696.2.110 rtems/cpukit/ChangeLog:1.696.2.111
--- rtems/cpukit/ChangeLog:1.696.2.110  Tue Nov 16 12:52:28 2010
+++ rtems/cpukit/ChangeLog      Tue Nov 16 13:14:50 2010
</font><font color='#997700'>@@ -1,5 +1,12 @@
</font> 2010-11-16        Joel Sherrill <joel.sherrilL@OARcorp.com>
 
<font color='#000088'>+   PR 1718/cpukit
+       * sapi/include/confdefs.h: POSIX threads are allocated twice the
+       minimum stack space by default. confdefs.h only accounts for one
+       minimum -- not the 2x factor.
+
+2010-11-16     Joel Sherrill <joel.sherrilL@OARcorp.com>
+
</font>   PR 1717/cpukit
        * libcsupport/src/gxx_wrappers.c: Free memory on error.
 

<font color='#006600'>diff -u rtems/cpukit/ChangeLog:1.1080.2.62 rtems/cpukit/ChangeLog:1.1080.2.63
--- rtems/cpukit/ChangeLog:1.1080.2.62  Tue Nov 16 12:52:20 2010
+++ rtems/cpukit/ChangeLog      Tue Nov 16 13:14:34 2010
</font><font color='#997700'>@@ -1,5 +1,12 @@
</font> 2010-11-16        Joel Sherrill <joel.sherrilL@OARcorp.com>
 
<font color='#000088'>+   PR 1718/cpukit
+       * sapi/include/confdefs.h: POSIX threads are allocated twice the
+       minimum stack space by default. confdefs.h only accounts for one
+       minimum -- not the 2x factor.
+
+2010-11-16     Joel Sherrill <joel.sherrilL@OARcorp.com>
+
</font>   PR 1717/cpukit
        * libcsupport/src/gxx_wrappers.c: Free memory on error.
 

<font color='#006600'>diff -u rtems/cpukit/ChangeLog:1.1539.2.68 rtems/cpukit/ChangeLog:1.1539.2.69
--- rtems/cpukit/ChangeLog:1.1539.2.68  Tue Nov 16 12:52:13 2010
+++ rtems/cpukit/ChangeLog      Tue Nov 16 13:14:27 2010
</font><font color='#997700'>@@ -1,5 +1,12 @@
</font> 2010-11-16        Joel Sherrill <joel.sherrilL@OARcorp.com>
 
<font color='#000088'>+   PR 1718/cpukit
+       * sapi/include/confdefs.h: POSIX threads are allocated twice the
+       minimum stack space by default. confdefs.h only accounts for one
+       minimum -- not the 2x factor.
+
+2010-11-16     Joel Sherrill <joel.sherrilL@OARcorp.com>
+
</font>   PR 1717/cpukit
        * libcsupport/src/gxx_wrappers.c: Free memory on error.
 

<font color='#006600'>diff -u rtems/cpukit/sapi/include/confdefs.h:1.64.2.2 rtems/cpukit/sapi/include/confdefs.h:1.64.2.3
--- rtems/cpukit/sapi/include/confdefs.h:1.64.2.2       Tue Sep 16 12:15:45 2008
+++ rtems/cpukit/sapi/include/confdefs.h        Tue Nov 16 13:14:51 2010
</font><font color='#997700'>@@ -650,7 +650,8 @@
</font> #define CONFIGURE_MEMORY_PER_TASK_FOR_POSIX_API \
   ( \
     sizeof (POSIX_API_Control) + \
<font color='#880000'>-   (sizeof (void *) * (CONFIGURE_GNAT_KEYS + CONFIGURE_MAXIMUM_POSIX_KEYS)) \
</font><font color='#000088'>+    CONFIGURE_MINIMUM_TASK_STACK_SIZE + \
+    (sizeof (void *) * (CONFIGURE_GNAT_KEYS + CONFIGURE_MAXIMUM_POSIX_KEYS)) \
</font>   )
 
 #define CONFIGURE_MEMORY_FOR_POSIX_MUTEXES(_mutexes) \

<font color='#006600'>diff -u rtems/cpukit/sapi/include/confdefs.h:1.79.2.2 rtems/cpukit/sapi/include/confdefs.h:1.79.2.3
--- rtems/cpukit/sapi/include/confdefs.h:1.79.2.2       Tue Sep 16 12:13:58 2008
+++ rtems/cpukit/sapi/include/confdefs.h        Tue Nov 16 13:14:35 2010
</font><font color='#997700'>@@ -654,7 +654,8 @@
</font> #define CONFIGURE_MEMORY_PER_TASK_FOR_POSIX_API \
   ( \
     sizeof (POSIX_API_Control) + \
<font color='#880000'>-   (sizeof (void *) * (CONFIGURE_GNAT_KEYS + CONFIGURE_MAXIMUM_POSIX_KEYS)) \
</font><font color='#000088'>+    CONFIGURE_MINIMUM_TASK_STACK_SIZE + \
+    (sizeof (void *) * (CONFIGURE_GNAT_KEYS + CONFIGURE_MAXIMUM_POSIX_KEYS)) \
</font>   )
 
 #define CONFIGURE_MEMORY_FOR_POSIX_MUTEXES(_mutexes) \

<font color='#006600'>diff -u rtems/cpukit/sapi/include/confdefs.h:1.108.2.5 rtems/cpukit/sapi/include/confdefs.h:1.108.2.6
--- rtems/cpukit/sapi/include/confdefs.h:1.108.2.5      Thu Oct 15 13:56:17 2009
+++ rtems/cpukit/sapi/include/confdefs.h        Tue Nov 16 13:14:29 2010
</font><font color='#997700'>@@ -938,6 +938,7 @@
</font> 
   #define CONFIGURE_MEMORY_PER_TASK_FOR_POSIX_API \
     _Configure_From_workspace( \
<font color='#000088'>+      CONFIGURE_MINIMUM_TASK_STACK_SIZE + \
</font>       sizeof (POSIX_API_Control) + \
      (sizeof (void *) * (CONFIGURE_MAXIMUM_POSIX_KEYS)) \
     )
</pre>
<p> </p>
<a name='cs11'></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>2010-11-15  Gedare Bloom <giddyup44@yahoo.com>

        PR 1691/bsps
        * usiii/start/bspinit.S: Create a dummy trap table that jumps
        to the firmware trap table for default trap handlers.
</pre></td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/c/src/lib/libbsp/sparc64/usiii/ChangeLog.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/sparc64/usiii/ChangeLog</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/c/src/lib/libbsp/sparc64/usiii/start/bspinit.S.diff?r1=text&tr1=1.1&r2=text&tr2=1.2&diff_format=h">M</a></td><td width='1%'>1.2</td><td width='100%'>c/src/lib/libbsp/sparc64/usiii/start/bspinit.S</td></tr>
</table>
<pre>
<font color='#006600'>diff -u rtems/c/src/lib/libbsp/sparc64/usiii/ChangeLog:1.2 rtems/c/src/lib/libbsp/sparc64/usiii/ChangeLog:1.3
--- rtems/c/src/lib/libbsp/sparc64/usiii/ChangeLog:1.2  Thu Jun 17 13:54:47 2010
+++ rtems/c/src/lib/libbsp/sparc64/usiii/ChangeLog      Tue Nov 16 17:19:58 2010
</font><font color='#997700'>@@ -1,3 +1,9 @@
</font><font color='#000088'>+2010-11-15  Gedare Bloom <giddyup44@yahoo.com>
+
+       PR 1691/bsps
+       * usiii/start/bspinit.S: Create a dummy trap table that jumps
+       to the firmware trap table for default trap handlers.
+
</font> 2010-06-17        Joel Sherrill <joel.sherrill@oarcorp.com>
 
        * .cvsignore, include/.cvsignore: New files.

<font color='#006600'>diff -u rtems/c/src/lib/libbsp/sparc64/usiii/start/bspinit.S:1.1 rtems/c/src/lib/libbsp/sparc64/usiii/start/bspinit.S:1.2
--- rtems/c/src/lib/libbsp/sparc64/usiii/start/bspinit.S:1.1    Thu Jun 17 11:20:39 2010
+++ rtems/c/src/lib/libbsp/sparc64/usiii/start/bspinit.S        Tue Nov 16 17:19:58 2010
</font><font color='#997700'>@@ -35,12 +35,17 @@
</font>   SYM(_BSP_init):
   save %sp, -STACK_WINDOW_SAVE_AREA_SIZE, %sp
 
<font color='#880000'>-  /* copy firmware trap table so that RTEMS can install ISR handlers */
-  setx  SYM(trap_table), %l0, %o0
-  rdpr  %tba, %o1
-  set TABLE_SIZE, %o2
-  call memcpy
-  nop
</font><font color='#000088'>+  ! copy the tba
+  sethi %hi(real_trap_table), %o0
+  rdpr  %tba, %o2
+  stx   %o2, [%o0 + %lo(real_trap_table)]
+
+!  /* copy firmware trap table so that RTEMS can install ISR handlers */
+!  setx  SYM(trap_table), %l0, %o0
+!  rdpr  %tba, %o1
+!  set TABLE_SIZE, %o2
+!  call memcpy
+!  nop
</font> 
   mov %g0, %o0
   call _take_mmu
</pre>
<p> </p>
<a name='cs12'></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>2010-11-15  Gedare Bloom <giddyup44@yahoo.com>

        PR 1691/bsps
        * shared/include/traptable.h, shared/start/trap_table.S,
        shared/startup/linkcmds: Create a dummy trap table
        that jumps to the firmware trap table for default trap handlers.
</pre></td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/c/src/lib/libbsp/sparc64/ChangeLog.diff?r1=text&tr1=1.5&r2=text&tr2=1.6&diff_format=h">M</a></td><td width='1%'>1.6</td><td width='100%'>c/src/lib/libbsp/sparc64/ChangeLog</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/c/src/lib/libbsp/sparc64/shared/include/traptable.h.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/sparc64/shared/include/traptable.h</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/c/src/lib/libbsp/sparc64/shared/start/trap_table.S.diff?r1=text&tr1=1.1&r2=text&tr2=1.2&diff_format=h">M</a></td><td width='1%'>1.2</td><td width='100%'>c/src/lib/libbsp/sparc64/shared/start/trap_table.S</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/c/src/lib/libbsp/sparc64/shared/startup/linkcmds.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/sparc64/shared/startup/linkcmds</td></tr>
</table>
<pre>
<font color='#006600'>diff -u rtems/c/src/lib/libbsp/sparc64/ChangeLog:1.5 rtems/c/src/lib/libbsp/sparc64/ChangeLog:1.6
--- rtems/c/src/lib/libbsp/sparc64/ChangeLog:1.5        Thu Aug 26 13:04:51 2010
+++ rtems/c/src/lib/libbsp/sparc64/ChangeLog    Tue Nov 16 17:20:08 2010
</font><font color='#997700'>@@ -1,3 +1,10 @@
</font><font color='#000088'>+2010-11-15  Gedare Bloom <giddyup44@yahoo.com>
+
+       PR 1691/bsps
+       * shared/include/traptable.h, shared/start/trap_table.S,
+       shared/startup/linkcmds: Create a dummy trap table
+       that jumps to the firmware trap table for default trap handlers.
+
</font> 2010-08-26  Gedare Bloom <giddyup44@yahoo.com>
 
        PR 1691/bsps

<font color='#006600'>diff -u rtems/c/src/lib/libbsp/sparc64/shared/include/traptable.h:1.2 rtems/c/src/lib/libbsp/sparc64/shared/include/traptable.h:1.3
--- rtems/c/src/lib/libbsp/sparc64/shared/include/traptable.h:1.2       Thu Aug 26 13:04:51 2010
+++ rtems/c/src/lib/libbsp/sparc64/shared/include/traptable.h   Tue Nov 16 17:20:08 2010
</font><font color='#997700'>@@ -14,9 +14,10 @@
</font> 
 #define ENTRY_SIZE (32)
 
<font color='#880000'>-#define TABLE_SIZE (1024*ENTRY_SIZE * 2 /* HACK */ )
</font><font color='#000088'>+#define TABLE_SIZE (1024*ENTRY_SIZE)
</font> 
 #ifndef ASM
<font color='#000088'>+extern void* real_trap_table;
</font> extern void* trap_table[TABLE_SIZE];
 #endif
 

<font color='#006600'>diff -u rtems/c/src/lib/libbsp/sparc64/shared/start/trap_table.S:1.1 rtems/c/src/lib/libbsp/sparc64/shared/start/trap_table.S:1.2
--- rtems/c/src/lib/libbsp/sparc64/shared/start/trap_table.S:1.1        Thu Jun 17 11:20:45 2010
+++ rtems/c/src/lib/libbsp/sparc64/shared/start/trap_table.S    Tue Nov 16 17:20:08 2010
</font><font color='#997700'>@@ -11,194 +11,147 @@
</font>  *<span style="background-color: #FF0000"> </span>
  *  This code defines the space for the trap table used by sun4u.
  *
<font color='#880000'>- *  This file is currently unused.
- *
</font>  * $Id$
  */
 
<font color='#880000'>-
</font> #include <rtems/asm.h>
 #include <rtems/score/cpu.h>
 #include <traptable.h>
 
<font color='#880000'>-#define BAD_TRAP \
-    ta  0; \
-  nop; \
-  nop; \
-  nop; \
-  nop; \
-  nop; \
-  nop; \
</font><font color='#000088'>+.register %g2, #scratch
+
+.macro JUMP_TO_TRAP offset
+  sethi %hi(real_trap_table), %g1;
+  sethi %hi(\offset), %g2;
+  or    %g1, %lo(real_trap_table), %g1;
+  or    %g2, %lo(\offset), %g2;          ! g2 = offset
+  ldx   [%g1], %g1;                      ! g1 = real_trap_table
+  add   %g1, %g2, %g1;                   ! g1 = real_trap_table[offset]
+  jmpl  %g1, %g0;
</font>   nop;
<font color='#000088'>+.endm
</font> 
<font color='#880000'>-.section .ttable
</font><font color='#000088'>+! space to save a pointer to the real trap table
+.section  .data
+  .align 8
+  .global real_trap_table
+  SYM(real_trap_table):
+  .space 8
+
+.section .text
</font>   .align (TABLE_SIZE)
 PUBLIC(trap_table)
   SYM(trap_table):
<font color='#880000'>-  .space TABLE_SIZE
-
-/* These are just bogus traps that aren't used ever
</font> 
<font color='#880000'>-.org trap_table + 8*32
-    BAD_TRAP;                                     ! 8 IAE
-.org trap_table + 9*32
-    BAD_TRAP;                                     ! 9
-.org trap_table + 10*32
-    BAD_TRAP;                                     ! A
-
-.org trap_table + 11*32
-    BAD_TRAP;                                     ! B
-.org trap_table + 12*32
-    BAD_TRAP;                                     ! C
-
-.org trap_table + 16*32
-    BAD_TRAP;                                     ! 10 illegal instruction
-.org trap_table + 17*32
-    BAD_TRAP;                                     ! 11 privileged op_code
-
-.org trap_table + 18*32
-    BAD_TRAP;                                     ! 12 unimplemented LDD
-.org trap_table + 19*32
-    BAD_TRAP;                                     ! 13 unimplemented std
-.org trap_table + 20*32
-    BAD_TRAP;                                     ! 14 dae invalid asi
-.org trap_table + 21*32
-    BAD_TRAP;                                     ! 15 dae priv violation
-.org trap_table + 22*32
-    BAD_TRAP;                                     ! 16 dae nc page
-.org trap_table + 23*32
-    BAD_TRAP;                                     ! 17 dae nfo page
-
-.org trap_table + 32*32
-    BAD_TRAP;                                     ! 20 fp_disabled
-.org trap_table + 33*32
-    BAD_TRAP;                                     ! 21 fp_exception_ieee_754
-.org trap_table + 34*32
-    BAD_TRAP;                                     ! 22 fp_exception_other
-
-.org trap_table + 35*32
-    BAD_TRAP;                                     ! 23 tag_overflow
-
-.org trap_table + 36*32
-    BAD_TRAP;                         ! 24-27 clean_window
-
-
-.org trap_table + 40*32
-    BAD_TRAP;                                     ! 28 div by zero
-<span style="background-color: #FF0000">    </span>
-.org trap_table + 48*32
-    BAD_TRAP;                                     ! 30 data access exception
-
-.org trap_table + 49*32
-    BAD_TRAP;                                     ! 31 data mmu miss
-.org trap_table + 50*32
-    BAD_TRAP;                                     ! 32 data access error
-
-.org trap_table + 52*32
-    BAD_TRAP;                                     ! 34 mem address not aligned<span style="background-color: #FF0000"> </span>
-.org trap_table + 53*32
-    BAD_TRAP;                                     ! 35 LDDF mem address not aligned<span style="background-color: #FF0000"> </span>
-.org trap_table + 54*32
-    BAD_TRAP;                                     ! 36 STDF mem addr not aligned
-.org trap_table + 55*32
-    BAD_TRAP;                                     ! 37 privileged action
-.org trap_table + 56*32
-    BAD_TRAP;                                     ! 38 LDQF mem addr not aligned
-.org trap_table + 57*32
-    BAD_TRAP;                                     ! 39 STQF mem addr not aligned
-
-
-.org trap_table + 65*32
-    BAD_TRAP;                                     ! 41-4F
-                                                  ! interrupt_level_n (1-15)<span style="background-color: #FF0000"> </span>
-.org trap_table + 66*32
-    BAD_TRAP;                                     !<span style="background-color: #FF0000"> </span>
-.org trap_table + 67*32
-    BAD_TRAP;                                     !<span style="background-color: #FF0000"> </span>
-.org trap_table + 68*32
-    BAD_TRAP;                                     !<span style="background-color: #FF0000"> </span>
-.org trap_table + 69*32
-    BAD_TRAP;                                     !<span style="background-color: #FF0000"> </span>
-.org trap_table + 70*32
-    BAD_TRAP;                                     !<span style="background-color: #FF0000"> </span>
-.org trap_table + 71*32
-    BAD_TRAP;                                     !<span style="background-color: #FF0000"> </span>
-.org trap_table + 72*32
-    BAD_TRAP;                                     !<span style="background-color: #FF0000"> </span>
-.org trap_table + 73*32
-    BAD_TRAP;                                     !<span style="background-color: #FF0000"> </span>
-.org trap_table + 74*32
-    BAD_TRAP;                                     !<span style="background-color: #FF0000"> </span>
-.org trap_table + 75*32
-    BAD_TRAP;                                     !<span style="background-color: #FF0000"> </span>
-.org trap_table + 76*32
-    BAD_TRAP;                                     !<span style="background-color: #FF0000"> </span>
-.org trap_table + 77*32
-    BAD_TRAP;                                     !<span style="background-color: #FF0000"> </span>
-.org trap_table + 78*32
-    BAD_TRAP;                                     !<span style="background-color: #FF0000"> </span>
-.org trap_table + 79*32
-    BAD_TRAP;                                     !<span style="background-color: #FF0000"> </span>
-
-.org trap_table + 124*32
-    BAD_TRAP;                                     ! 7C cpu mondo
-
-.org trap_table + 125*32
-    BAD_TRAP;                                     ! 7D dev mondo
-
-.org trap_table + 128*32
-    BAD_TRAP;BAD_TRAP;BAD_TRAP;BAD_TRAP;          ! 80-83 spill_0_normal
-    BAD_TRAP;BAD_TRAP;BAD_TRAP;BAD_TRAP;          ! 84-87 spill_1_normal
-    BAD_TRAP;BAD_TRAP;BAD_TRAP;BAD_TRAP;          ! 88-8B spill_2_normal
-    BAD_TRAP;BAD_TRAP;BAD_TRAP;BAD_TRAP;          ! 8C-8F spill_3_normal
-    BAD_TRAP;BAD_TRAP;BAD_TRAP;BAD_TRAP;          ! 90-93 spill_4_normal
-    BAD_TRAP;BAD_TRAP;BAD_TRAP;BAD_TRAP;          ! 94-97 spill_5_normal
-    BAD_TRAP;BAD_TRAP;BAD_TRAP;BAD_TRAP;          ! 98-9B spill_6_normal
-    BAD_TRAP;BAD_TRAP;BAD_TRAP;BAD_TRAP;          ! 9C-9F spill_7_normal
-
-    BAD_TRAP;BAD_TRAP;BAD_TRAP;BAD_TRAP;          ! A0-A3 spill_0_other
-    BAD_TRAP;BAD_TRAP;BAD_TRAP;BAD_TRAP;          ! A4-A7 spill_1_other
-    BAD_TRAP;BAD_TRAP;BAD_TRAP;BAD_TRAP;          ! A8-AB spill_2_other
-    BAD_TRAP;BAD_TRAP;BAD_TRAP;BAD_TRAP;          ! AC-AF spill_3_other
-    BAD_TRAP;BAD_TRAP;BAD_TRAP;BAD_TRAP;          ! B0-B3 spill_4_other
-    BAD_TRAP;BAD_TRAP;BAD_TRAP;BAD_TRAP;          ! B4-B7 spill_5_other
-    BAD_TRAP;BAD_TRAP;BAD_TRAP;BAD_TRAP;          ! B8-BB spill_6_other
-    BAD_TRAP;BAD_TRAP;BAD_TRAP;BAD_TRAP;          ! BC-BF spill_7_other
-
-    BAD_TRAP;BAD_TRAP;BAD_TRAP;BAD_TRAP;          ! C0-C3 fill_0_normal
-    BAD_TRAP;BAD_TRAP;BAD_TRAP;BAD_TRAP;          ! C4-C7 fill_1_normal
-    BAD_TRAP;BAD_TRAP;BAD_TRAP;BAD_TRAP;          ! C8-CB fill_2_normal
-    BAD_TRAP;BAD_TRAP;BAD_TRAP;BAD_TRAP;          ! CC-CF fill_3_normal
-    BAD_TRAP;BAD_TRAP;BAD_TRAP;BAD_TRAP;          ! D0-D3 fill_4_normal
-    BAD_TRAP;BAD_TRAP;BAD_TRAP;BAD_TRAP;          ! D4-D7 fill_5_normal
-    BAD_TRAP;BAD_TRAP;BAD_TRAP;BAD_TRAP;          ! D8-DB fill_6_normal
-    BAD_TRAP;BAD_TRAP;BAD_TRAP;BAD_TRAP;          ! DC-DF fill_7_normal
-
-    BAD_TRAP;BAD_TRAP;BAD_TRAP;BAD_TRAP;          ! E0-E3 fill_0_other
-    BAD_TRAP;BAD_TRAP;BAD_TRAP;BAD_TRAP;          ! E4-E7 fill_1_other
-    BAD_TRAP;BAD_TRAP;BAD_TRAP;BAD_TRAP;          ! E8-EB fill_2_other
-    BAD_TRAP;BAD_TRAP;BAD_TRAP;BAD_TRAP;          ! EC-EF fill_3_other
-    BAD_TRAP;BAD_TRAP;BAD_TRAP;BAD_TRAP;          ! F0-F3 fill_4_other
-    BAD_TRAP;BAD_TRAP;BAD_TRAP;BAD_TRAP;          ! F4-F7 fill_5_other
-    BAD_TRAP;BAD_TRAP;BAD_TRAP;BAD_TRAP;          ! F8-FB fill_6_other
-    BAD_TRAP;BAD_TRAP;BAD_TRAP;BAD_TRAP;          ! FC-FF fill_7_other
-
-    BAD_TRAP;BAD_TRAP;BAD_TRAP;                   ! 100-17F trap instruction
-    BAD_TRAP;BAD_TRAP;BAD_TRAP;BAD_TRAP;<span style="background-color: #FF0000">                                    </span>
-    BAD_TRAP;BAD_TRAP;BAD_TRAP;BAD_TRAP;BAD_TRAP;BAD_TRAP;BAD_TRAP;BAD_TRAP;
-    BAD_TRAP;BAD_TRAP;BAD_TRAP;BAD_TRAP;BAD_TRAP;BAD_TRAP;BAD_TRAP;BAD_TRAP;
-    BAD_TRAP;BAD_TRAP;BAD_TRAP;BAD_TRAP;BAD_TRAP;BAD_TRAP;BAD_TRAP;BAD_TRAP;
-    BAD_TRAP;BAD_TRAP;BAD_TRAP;BAD_TRAP;BAD_TRAP;BAD_TRAP;BAD_TRAP;BAD_TRAP;
-    BAD_TRAP;BAD_TRAP;BAD_TRAP;BAD_TRAP;BAD_TRAP;BAD_TRAP;BAD_TRAP;BAD_TRAP;
-    BAD_TRAP;BAD_TRAP;BAD_TRAP;BAD_TRAP;BAD_TRAP;BAD_TRAP;BAD_TRAP;BAD_TRAP;
-    BAD_TRAP;BAD_TRAP;BAD_TRAP;BAD_TRAP;BAD_TRAP;BAD_TRAP;BAD_TRAP;BAD_TRAP;
-    BAD_TRAP;BAD_TRAP;BAD_TRAP;BAD_TRAP;BAD_TRAP;BAD_TRAP;BAD_TRAP;BAD_TRAP;
-    BAD_TRAP;BAD_TRAP;BAD_TRAP;BAD_TRAP;BAD_TRAP;BAD_TRAP;BAD_TRAP;BAD_TRAP;
-    BAD_TRAP;BAD_TRAP;BAD_TRAP;BAD_TRAP;BAD_TRAP;BAD_TRAP;BAD_TRAP;BAD_TRAP;
-    BAD_TRAP;BAD_TRAP;BAD_TRAP;BAD_TRAP;BAD_TRAP;BAD_TRAP;BAD_TRAP;BAD_TRAP;
-    BAD_TRAP;BAD_TRAP;BAD_TRAP;BAD_TRAP;BAD_TRAP;BAD_TRAP;BAD_TRAP;BAD_TRAP;
-    BAD_TRAP;BAD_TRAP;BAD_TRAP;BAD_TRAP;BAD_TRAP;BAD_TRAP;BAD_TRAP;BAD_TRAP;
-    BAD_TRAP;BAD_TRAP;BAD_TRAP;BAD_TRAP;BAD_TRAP;BAD_TRAP;BAD_TRAP;BAD_TRAP;
-    BAD_TRAP;BAD_TRAP;BAD_TRAP;BAD_TRAP;BAD_TRAP;BAD_TRAP;BAD_TRAP;BAD_TRAP;
-*/
</font><font color='#000088'>+  .irp idx, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, \
+    11, 12, 13, 14, 15, 16, 17, 18, 19, 20, \
+    21, 22, 23, 24, 25, 26, 27, 28, 29, 30, \
+    31, 32, 33, 34, 35, 36, 37, 38, 39, 40, \
+    41, 42, 43, 44, 45, 46, 47, 48, 49, 50, \
+    51, 52, 53, 54, 55, 56, 57, 58, 59, 60, \
+    61, 62, 63, 64, 65, 66, 67, 68, 69, 70, \
+    71, 72, 73, 74, 75, 76, 77, 78, 79, 80, \
+    81, 82, 83, 84, 85, 86, 87, 88, 89, 90, \
+    91, 92, 93, 94, 95, 96, 97, 98, 99, 100, \
+    101, 102, 103, 104, 105, 106, 107, 108, 109, 110, \
+    111, 112, 113, 114, 115, 116, 117, 118, 119, 120, \
+    121, 122, 123, 124, 125, 126, 127, 128, 129, 130, \
+    131, 132, 133, 134, 135, 136, 137, 138, 139, 140, \
+    141, 142, 143, 144, 145, 146, 147, 148, 149, 150, \
+    151, 152, 153, 154, 155, 156, 157, 158, 159, 160, \
+    161, 162, 163, 164, 165, 166, 167, 168, 169, 170, \
+    171, 172, 173, 174, 175, 176, 177, 178, 179, 180, \
+    181, 182, 183, 184, 185, 186, 187, 188, 189, 190, \
+    191, 192, 193, 194, 195, 196, 197, 198, 199, 200, \
+    201, 202, 203, 204, 205, 206, 207, 208, 209, 210, \
+    211, 212, 213, 214, 215, 216, 217, 218, 219, 220, \
+    221, 222, 223, 224, 225, 226, 227, 228, 229, 230, \
+    231, 232, 233, 234, 235, 236, 237, 238, 239, 240, \
+    241, 242, 243, 244, 245, 246, 247, 248, 249, 250, \
+    251, 252, 253, 254, 255, 256, 257, 258, 259, 260, \
+    261, 262, 263, 264, 265, 266, 267, 268, 269, 270, \
+    271, 272, 273, 274, 275, 276, 277, 278, 279, 280, \
+    281, 282, 283, 284, 285, 286, 287, 288, 289, 290, \
+    291, 292, 293, 294, 295, 296, 297, 298, 299, 300, \
+    301, 302, 303, 304, 305, 306, 307, 308, 309, 310, \
+    311, 312, 313, 314, 315, 316, 317, 318, 319, 320, \
+    321, 322, 323, 324, 325, 326, 327, 328, 329, 330, \
+    331, 332, 333, 334, 335, 336, 337, 338, 339, 340, \
+    341, 342, 343, 344, 345, 346, 347, 348, 349, 350, \
+    351, 352, 353, 354, 355, 356, 357, 358, 359, 360, \
+    361, 362, 363, 364, 365, 366, 367, 368, 369, 370, \
+    371, 372, 373, 374, 375, 376, 377, 378, 379, 380, \
+    381, 382, 383, 384, 385, 386, 387, 388, 389, 390, \
+    391, 392, 393, 394, 395, 396, 397, 398, 399, 400, \
+    401, 402, 403, 404, 405, 406, 407, 408, 409, 410, \
+    411, 412, 413, 414, 415, 416, 417, 418, 419, 420, \
+    421, 422, 423, 424, 425, 426, 427, 428, 429, 430, \
+    431, 432, 433, 434, 435, 436, 437, 438, 439, 440, \
+    441, 442, 443, 444, 445, 446, 447, 448, 449, 450, \
+    451, 452, 453, 454, 455, 456, 457, 458, 459, 460, \
+    461, 462, 463, 464, 465, 466, 467, 468, 469, 470, \
+    471, 472, 473, 474, 475, 476, 477, 478, 479, 480, \
+    481, 482, 483, 484, 485, 486, 487, 488, 489, 490, \
+    491, 492, 493, 494, 495, 496, 497, 498, 499, 500, \
+    501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511
+
+    .org trap_table + ((\idx)*32)
+      JUMP_TO_TRAP( ((\idx)*32) );
+  .endr
+
+  .irp idx, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, \
+    11, 12, 13, 14, 15, 16, 17, 18, 19, 20, \
+    21, 22, 23, 24, 25, 26, 27, 28, 29, 30, \
+    31, 32, 33, 34, 35, 36, 37, 38, 39, 40, \
+    41, 42, 43, 44, 45, 46, 47, 48, 49, 50, \
+    51, 52, 53, 54, 55, 56, 57, 58, 59, 60, \
+    61, 62, 63, 64, 65, 66, 67, 68, 69, 70, \
+    71, 72, 73, 74, 75, 76, 77, 78, 79, 80, \
+    81, 82, 83, 84, 85, 86, 87, 88, 89, 90, \
+    91, 92, 93, 94, 95, 96, 97, 98, 99, 100, \
+    101, 102, 103, 104, 105, 106, 107, 108, 109, 110, \
+    111, 112, 113, 114, 115, 116, 117, 118, 119, 120, \
+    121, 122, 123, 124, 125, 126, 127, 128, 129, 130, \
+    131, 132, 133, 134, 135, 136, 137, 138, 139, 140, \
+    141, 142, 143, 144, 145, 146, 147, 148, 149, 150, \
+    151, 152, 153, 154, 155, 156, 157, 158, 159, 160, \
+    161, 162, 163, 164, 165, 166, 167, 168, 169, 170, \
+    171, 172, 173, 174, 175, 176, 177, 178, 179, 180, \
+    181, 182, 183, 184, 185, 186, 187, 188, 189, 190, \
+    191, 192, 193, 194, 195, 196, 197, 198, 199, 200, \
+    201, 202, 203, 204, 205, 206, 207, 208, 209, 210, \
+    211, 212, 213, 214, 215, 216, 217, 218, 219, 220, \
+    221, 222, 223, 224, 225, 226, 227, 228, 229, 230, \
+    231, 232, 233, 234, 235, 236, 237, 238, 239, 240, \
+    241, 242, 243, 244, 245, 246, 247, 248, 249, 250, \
+    251, 252, 253, 254, 255, 256, 257, 258, 259, 260, \
+    261, 262, 263, 264, 265, 266, 267, 268, 269, 270, \
+    271, 272, 273, 274, 275, 276, 277, 278, 279, 280, \
+    281, 282, 283, 284, 285, 286, 287, 288, 289, 290, \
+    291, 292, 293, 294, 295, 296, 297, 298, 299, 300, \
+    301, 302, 303, 304, 305, 306, 307, 308, 309, 310, \
+    311, 312, 313, 314, 315, 316, 317, 318, 319, 320, \
+    321, 322, 323, 324, 325, 326, 327, 328, 329, 330, \
+    331, 332, 333, 334, 335, 336, 337, 338, 339, 340, \
+    341, 342, 343, 344, 345, 346, 347, 348, 349, 350, \
+    351, 352, 353, 354, 355, 356, 357, 358, 359, 360, \
+    361, 362, 363, 364, 365, 366, 367, 368, 369, 370, \
+    371, 372, 373, 374, 375, 376, 377, 378, 379, 380, \
+    381, 382, 383, 384, 385, 386, 387, 388, 389, 390, \
+    391, 392, 393, 394, 395, 396, 397, 398, 399, 400, \
+    401, 402, 403, 404, 405, 406, 407, 408, 409, 410, \
+    411, 412, 413, 414, 415, 416, 417, 418, 419, 420, \
+    421, 422, 423, 424, 425, 426, 427, 428, 429, 430, \
+    431, 432, 433, 434, 435, 436, 437, 438, 439, 440, \
+    441, 442, 443, 444, 445, 446, 447, 448, 449, 450, \
+    451, 452, 453, 454, 455, 456, 457, 458, 459, 460, \
+    461, 462, 463, 464, 465, 466, 467, 468, 469, 470, \
+    471, 472, 473, 474, 475, 476, 477, 478, 479, 480, \
+    481, 482, 483, 484, 485, 486, 487, 488, 489, 490, \
+    491, 492, 493, 494, 495, 496, 497, 498, 499, 500, \
+    501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511
+
+    .org trap_table + 512*32 + ((\idx)*32)
+      JUMP_TO_TRAP( 512*32 + ((\idx)*32) );
+  .endr
</font> 

<font color='#006600'>diff -u rtems/c/src/lib/libbsp/sparc64/shared/startup/linkcmds:1.2 rtems/c/src/lib/libbsp/sparc64/shared/startup/linkcmds:1.3
--- rtems/c/src/lib/libbsp/sparc64/shared/startup/linkcmds:1.2  Tue Aug  3 13:29:12 2010
+++ rtems/c/src/lib/libbsp/sparc64/shared/startup/linkcmds      Tue Nov 16 17:20:08 2010
</font><font color='#997700'>@@ -202,11 +202,6 @@
</font>      PROVIDE (__stack = .);
      PROVIDE (StackStart = .);
   } > ram
<font color='#880000'>-
-  /* made-up section for the trap-table, which has a very high alignment */
-  . = ALIGN(1024*32);
-  .ttable   : { *(.ttable) } > ram
-<span style="background-color: #FF0000">  </span>
</font> }
 
 
</pre>
<p> </p>
<a name='cs13'></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>2010-11-16 Gedare Bloom <giddyup44@yahoo.com>

        PR 1691/bsps
        * shared/clock/ckinit.c: The sparc64/shared/clock driver has
        a bug that causes nested timer interrupts to not be serviced,
        which leads to non-preemptive behavior especially when dispatching
        work from the timer ISR.
</pre></td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/c/src/lib/libbsp/sparc64/ChangeLog.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%'>c/src/lib/libbsp/sparc64/ChangeLog</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/c/src/lib/libbsp/sparc64/shared/clock/ckinit.c.diff?r1=text&tr1=1.1&r2=text&tr2=1.2&diff_format=h">M</a></td><td width='1%'>1.2</td><td width='100%'>c/src/lib/libbsp/sparc64/shared/clock/ckinit.c</td></tr>
</table>
<pre>
<font color='#006600'>diff -u rtems/c/src/lib/libbsp/sparc64/ChangeLog:1.6 rtems/c/src/lib/libbsp/sparc64/ChangeLog:1.7
--- rtems/c/src/lib/libbsp/sparc64/ChangeLog:1.6        Tue Nov 16 17:20:08 2010
+++ rtems/c/src/lib/libbsp/sparc64/ChangeLog    Tue Nov 16 17:22:13 2010
</font><font color='#997700'>@@ -1,3 +1,11 @@
</font><font color='#000088'>+2010-11-16    Gedare Bloom <giddyup44@yahoo.com>
+
+       PR 1691/bsps
+       * shared/clock/ckinit.c: The sparc64/shared/clock driver has
+       a bug that causes nested timer interrupts to not be serviced,
+       which leads to non-preemptive behavior especially when dispatching
+       work from the timer ISR.
+
</font> 2010-11-15  Gedare Bloom <giddyup44@yahoo.com>
 
        PR 1691/bsps

<font color='#006600'>diff -u rtems/c/src/lib/libbsp/sparc64/shared/clock/ckinit.c:1.1 rtems/c/src/lib/libbsp/sparc64/shared/clock/ckinit.c:1.2
--- rtems/c/src/lib/libbsp/sparc64/shared/clock/ckinit.c:1.1    Thu Jun 17 11:20:44 2010
+++ rtems/c/src/lib/libbsp/sparc64/shared/clock/ckinit.c        Tue Nov 16 17:22:13 2010
</font><font color='#997700'>@@ -50,11 +50,16 @@
</font> {
   uint64_t tick_reg;
   int bit_mask;
<font color='#880000'>-
</font><font color='#000088'>+  uint64_t pil_reg;
</font> 
   bit_mask = SPARC_SOFTINT_TM_MASK | SPARC_SOFTINT_SM_MASK | (1<<14);
   sparc64_clear_interrupt_bits(bit_mask);
 
<font color='#000088'>+  sparc64_get_pil(pil_reg);
+  if(pil_reg == 0xe) { /* 0xe is the tick compare interrupt (softint(14)) */
+    pil_reg--;
+    sparc64_set_pil(pil_reg); /* enable the next timer interrupt */
+  }
</font>   /* Note: sun4v uses stick_cmpr for clock driver for M5 simulator, which<span style="background-color: #FF0000"> </span>
    * does not currently have tick_cmpr implemented */
   /* TODO: this could be more efficiently implemented as a single assembly<span style="background-color: #FF0000"> </span>
<font color='#997700'>@@ -85,7 +90,6 @@
</font>   uint64_t tick_reg;<span style="background-color: #FF0000"><span style="background-color: #FF0000"> </span>        </span>
   int bit_mask;
 
<font color='#880000'>-
</font>   bit_mask = SPARC_SOFTINT_TM_MASK | SPARC_SOFTINT_SM_MASK | (1<<14);
   sparc64_clear_interrupt_bits(bit_mask);
 
</pre>
<p> </p>
<a name='cs14'></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>2010-11-16 Gedare Bloom <giddyup44@yahoo.com>

        * rtems/score/sparc64.h: Fix typo.
</pre></td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/score/cpu/sparc64/ChangeLog.diff?r1=text&tr1=1.5&r2=text&tr2=1.6&diff_format=h">M</a></td><td width='1%'>1.6</td><td width='100%'>cpukit/score/cpu/sparc64/ChangeLog</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/score/cpu/sparc64/rtems/score/sparc64.h.diff?r1=text&tr1=1.1&r2=text&tr2=1.2&diff_format=h">M</a></td><td width='1%'>1.2</td><td width='100%'>cpukit/score/cpu/sparc64/rtems/score/sparc64.h</td></tr>
</table>
<pre>
<font color='#006600'>diff -u rtems/cpukit/score/cpu/sparc64/ChangeLog:1.5 rtems/cpukit/score/cpu/sparc64/ChangeLog:1.6
--- rtems/cpukit/score/cpu/sparc64/ChangeLog:1.5        Thu Oct 21 17:18:05 2010
+++ rtems/cpukit/score/cpu/sparc64/ChangeLog    Tue Nov 16 17:22:47 2010
</font><font color='#997700'>@@ -1,3 +1,7 @@
</font><font color='#000088'>+2010-11-16    Gedare Bloom <giddyup44@yahoo.com>
+
+       * rtems/score/sparc64.h: Fix typo.
+
</font> 2010-10-21        Joel Sherrill <joel.sherrill@oarcorp.com>
 
        * rtems/score/cpu.h: Add RTEMS_COMPILER_NO_RETURN_ATTRIBUTE to

<font color='#006600'>diff -u rtems/cpukit/score/cpu/sparc64/rtems/score/sparc64.h:1.1 rtems/cpukit/score/cpu/sparc64/rtems/score/sparc64.h:1.2
--- rtems/cpukit/score/cpu/sparc64/rtems/score/sparc64.h:1.1    Tue Jun 15 17:43:56 2010
+++ rtems/cpukit/score/cpu/sparc64/rtems/score/sparc64.h        Tue Nov 16 17:22:47 2010
</font><font color='#997700'>@@ -186,7 +186,7 @@
</font> #define sparc64_set_pstate( _pstate ) \
   do { \
     asm volatile ( \
<font color='#880000'>-      "wrpr  %g0, %0, %%pstate " : "=r" ((_pstate)) : "0" ((_pstate)) ); \
</font><font color='#000088'>+      "wrpr  %%g0, %0, %%pstate " : "=r" ((_pstate)) : "0" ((_pstate)) ); \
</font>   } while ( 0 )
 
 /*
<font color='#997700'>@@ -201,7 +201,7 @@
</font> 
 #define sparc64_set_pil( _pil ) \
   do { \
<font color='#880000'>-    asm volatile ( "wrpr  %g0, %0, %%pil " : "=r" ((_pil)) : "0" ((_pil)) ); \
</font><font color='#000088'>+    asm volatile ( "wrpr  %%g0, %0, %%pil " : "=r" ((_pil)) : "0" ((_pil)) ); \
</font>   } while ( 0 )
 
 
</pre>
<p> </p>
<a name='cs15'></a>
<table border='0' cellspacing='0' cellpadding='5' width='100%' bgcolor='#eeeeee'>
<tr><td colspan='3' bgcolor='#dddddd'>
 <font color='#bb2222'><strong>sh</strong></font>
</td></tr>
<tr><td colspan='3' bgcolor='#dddddd'><pre>2010-11-12 Sebastian Huber <sebastian.huber@embedded-brains.de>

        * make/custom/dp2.cfg, startup/linkcmds.dp2: New files.
        * Makefile.am, preinstall.am: Reflect change above.  Install
        <bsp/utility.h>.  Install BestComm header files.
        * configure.ac: Changed BSP options.
        * include/mpc5200.h: Added module structures and register defines.
        * bestcomm/bestcomm_api.c, bestcomm/bestcomm_api.h,
        bestcomm/bestcomm_glue.c, bestcomm/bestcomm_glue.h,
        bestcomm/bestcomm_priv.h, bestcomm/load_task.c,
        bestcomm/tasksetup_bdtable.c, bestcomm/task_api/bestcomm_cntrl.h: C++
        compatibility.  Use special heap to manage the SRAM region.  Use
        interrupt extension API.  Fixed warnings.
        * console/console.c: Fixed console registration.  Fixed warnings.
        Added GPS module registration.
        * ide/pcmcia_ide.h: Fixed clock value macros.
        * ide/pcmcia_ide.c: Update for BestComm API changes.
        DP2 specific initialization.  Removed zero loop in PIO receive
        function.
        * include/bsp.h: Added DP2 variant.  Removed obsolete defines.
        * include/mscan-base.h, mscan/mscan-base.c: Use volatile qualifier.
        Format.
        * irq/irq.c: Fixed peripheral interrupt handling.
        * network_5200/network.c: Update for BestComm API changes.
        * start/start.S: U-Boot fixes.
        * startup/cpuinit.c: Enable write-back cache strategy.  Added special
        memory regions.
        * startup/linkcmds.brs5l: Fixed memory size.
</pre></td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/c/src/lib/libbsp/powerpc/gen5200/ChangeLog.diff?r1=text&tr1=1.149&r2=text&tr2=1.150&diff_format=h">M</a></td><td width='1%'>1.150</td><td width='100%'>c/src/lib/libbsp/powerpc/gen5200/ChangeLog</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/c/src/lib/libbsp/powerpc/gen5200/Makefile.am.diff?r1=text&tr1=1.41&r2=text&tr2=1.42&diff_format=h">M</a></td><td width='1%'>1.42</td><td width='100%'>c/src/lib/libbsp/powerpc/gen5200/Makefile.am</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/c/src/lib/libbsp/powerpc/gen5200/bestcomm/bestcomm_api.h.diff?r1=text&tr1=1.4&r2=text&tr2=1.5&diff_format=h">M</a></td><td width='1%'>1.5</td><td width='100%'>c/src/lib/libbsp/powerpc/gen5200/bestcomm/bestcomm_api.h</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/c/src/lib/libbsp/powerpc/gen5200/bestcomm/bestcomm_api.c.diff?r1=text&tr1=1.4&r2=text&tr2=1.5&diff_format=h">M</a></td><td width='1%'>1.5</td><td width='100%'>c/src/lib/libbsp/powerpc/gen5200/bestcomm/bestcomm_api.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/c/src/lib/libbsp/powerpc/gen5200/bestcomm/bestcomm_glue.h.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/powerpc/gen5200/bestcomm/bestcomm_glue.h</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/c/src/lib/libbsp/powerpc/gen5200/bestcomm/bestcomm_glue.c.diff?r1=text&tr1=1.7&r2=text&tr2=1.8&diff_format=h">M</a></td><td width='1%'>1.8</td><td width='100%'>c/src/lib/libbsp/powerpc/gen5200/bestcomm/bestcomm_glue.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/c/src/lib/libbsp/powerpc/gen5200/bestcomm/bestcomm_priv.h.diff?r1=text&tr1=1.3&r2=text&tr2=1.4&diff_format=h">M</a></td><td width='1%'>1.4</td><td width='100%'>c/src/lib/libbsp/powerpc/gen5200/bestcomm/bestcomm_priv.h</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/c/src/lib/libbsp/powerpc/gen5200/bestcomm/load_task.c.diff?r1=text&tr1=1.7&r2=text&tr2=1.8&diff_format=h">M</a></td><td width='1%'>1.8</td><td width='100%'>c/src/lib/libbsp/powerpc/gen5200/bestcomm/load_task.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/c/src/lib/libbsp/powerpc/gen5200/bestcomm/task_api/bestcomm_cntrl.h.diff?r1=text&tr1=1.3&r2=text&tr2=1.4&diff_format=h">M</a></td><td width='1%'>1.4</td><td width='100%'>c/src/lib/libbsp/powerpc/gen5200/bestcomm/task_api/bestcomm_cntrl.h</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/c/src/lib/libbsp/powerpc/gen5200/bestcomm/tasksetup_bdtable.c.diff?r1=text&tr1=1.4&r2=text&tr2=1.5&diff_format=h">M</a></td><td width='1%'>1.5</td><td width='100%'>c/src/lib/libbsp/powerpc/gen5200/bestcomm/tasksetup_bdtable.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/c/src/lib/libbsp/powerpc/gen5200/configure.ac.diff?r1=text&tr1=1.18&r2=text&tr2=1.19&diff_format=h">M</a></td><td width='1%'>1.19</td><td width='100%'>c/src/lib/libbsp/powerpc/gen5200/configure.ac</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/c/src/lib/libbsp/powerpc/gen5200/console/console.c.diff?r1=text&tr1=1.21&r2=text&tr2=1.22&diff_format=h">M</a></td><td width='1%'>1.22</td><td width='100%'>c/src/lib/libbsp/powerpc/gen5200/console/console.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/c/src/lib/libbsp/powerpc/gen5200/ide/pcmcia_ide.h.diff?r1=text&tr1=1.5&r2=text&tr2=1.6&diff_format=h">M</a></td><td width='1%'>1.6</td><td width='100%'>c/src/lib/libbsp/powerpc/gen5200/ide/pcmcia_ide.h</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/c/src/lib/libbsp/powerpc/gen5200/ide/pcmcia_ide.c.diff?r1=text&tr1=1.12&r2=text&tr2=1.13&diff_format=h">M</a></td><td width='1%'>1.13</td><td width='100%'>c/src/lib/libbsp/powerpc/gen5200/ide/pcmcia_ide.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/c/src/lib/libbsp/powerpc/gen5200/include/bsp.h.diff?r1=text&tr1=1.24&r2=text&tr2=1.25&diff_format=h">M</a></td><td width='1%'>1.25</td><td width='100%'>c/src/lib/libbsp/powerpc/gen5200/include/bsp.h</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/c/src/lib/libbsp/powerpc/gen5200/include/mpc5200.h.diff?r1=text&tr1=1.10&r2=text&tr2=1.11&diff_format=h">M</a></td><td width='1%'>1.11</td><td width='100%'>c/src/lib/libbsp/powerpc/gen5200/include/mpc5200.h</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/c/src/lib/libbsp/powerpc/gen5200/include/mscan-base.h.diff?r1=text&tr1=1.4&r2=text&tr2=1.5&diff_format=h">M</a></td><td width='1%'>1.5</td><td width='100%'>c/src/lib/libbsp/powerpc/gen5200/include/mscan-base.h</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/c/src/lib/libbsp/powerpc/gen5200/irq/irq.c.diff?r1=text&tr1=1.21&r2=text&tr2=1.22&diff_format=h">M</a></td><td width='1%'>1.22</td><td width='100%'>c/src/lib/libbsp/powerpc/gen5200/irq/irq.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/c/src/lib/libbsp/powerpc/gen5200/make/custom/dp2.cfg?rev=1.1&content-type=text/vnd.viewcvs-markup">A</a></td><td width='1%'><font color="#000088">1.1</font></td><td width='100%'><font color="#000088">c/src/lib/libbsp/powerpc/gen5200/make/custom/dp2.cfg</font></td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/c/src/lib/libbsp/powerpc/gen5200/mscan/mscan-base.c.diff?r1=text&tr1=1.4&r2=text&tr2=1.5&diff_format=h">M</a></td><td width='1%'>1.5</td><td width='100%'>c/src/lib/libbsp/powerpc/gen5200/mscan/mscan-base.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/c/src/lib/libbsp/powerpc/gen5200/network_5200/network.c.diff?r1=text&tr1=1.13&r2=text&tr2=1.14&diff_format=h">M</a></td><td width='1%'>1.14</td><td width='100%'>c/src/lib/libbsp/powerpc/gen5200/network_5200/network.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/c/src/lib/libbsp/powerpc/gen5200/preinstall.am.diff?r1=text&tr1=1.17&r2=text&tr2=1.18&diff_format=h">M</a></td><td width='1%'>1.18</td><td width='100%'>c/src/lib/libbsp/powerpc/gen5200/preinstall.am</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/c/src/lib/libbsp/powerpc/gen5200/startup/cpuinit.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%'>c/src/lib/libbsp/powerpc/gen5200/startup/cpuinit.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/c/src/lib/libbsp/powerpc/gen5200/startup/linkcmds.brs5l.diff?r1=text&tr1=1.7&r2=text&tr2=1.8&diff_format=h">M</a></td><td width='1%'>1.8</td><td width='100%'>c/src/lib/libbsp/powerpc/gen5200/startup/linkcmds.brs5l</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/c/src/lib/libbsp/powerpc/gen5200/startup/linkcmds.dp2?rev=1.1&content-type=text/vnd.viewcvs-markup">A</a></td><td width='1%'><font color="#000088">1.1</font></td><td width='100%'><font color="#000088">c/src/lib/libbsp/powerpc/gen5200/startup/linkcmds.dp2</font></td></tr>
</table>
<pre>
<font color='#006600'>diff -u rtems/c/src/lib/libbsp/powerpc/gen5200/ChangeLog:1.149 rtems/c/src/lib/libbsp/powerpc/gen5200/ChangeLog:1.150
--- rtems/c/src/lib/libbsp/powerpc/gen5200/ChangeLog:1.149      Wed Jun 30 02:43:56 2010
+++ rtems/c/src/lib/libbsp/powerpc/gen5200/ChangeLog    Mon Nov 15 04:55:01 2010
</font><font color='#997700'>@@ -1,3 +1,32 @@
</font><font color='#000088'>+2010-11-12    Sebastian Huber <sebastian.huber@embedded-brains.de>
+
+       * make/custom/dp2.cfg, startup/linkcmds.dp2: New files.
+       * Makefile.am, preinstall.am: Reflect change above.  Install
+       <bsp/utility.h>.  Install BestComm header files.
+       * configure.ac: Changed BSP options.
+       * include/mpc5200.h: Added module structures and register defines.
+       * bestcomm/bestcomm_api.c, bestcomm/bestcomm_api.h,
+       bestcomm/bestcomm_glue.c, bestcomm/bestcomm_glue.h,
+       bestcomm/bestcomm_priv.h, bestcomm/load_task.c,
+       bestcomm/tasksetup_bdtable.c, bestcomm/task_api/bestcomm_cntrl.h: C++
+       compatibility.  Use special heap to manage the SRAM region.  Use
+       interrupt extension API.  Fixed warnings.
+       * console/console.c: Fixed console registration.  Fixed warnings.
+       Added GPS module registration.
+       * ide/pcmcia_ide.h: Fixed clock value macros.
+       * ide/pcmcia_ide.c: Update for BestComm API changes.
+       DP2 specific initialization.  Removed zero loop in PIO receive
+       function.
+       * include/bsp.h: Added DP2 variant.  Removed obsolete defines.
+       * include/mscan-base.h, mscan/mscan-base.c: Use volatile qualifier.
+       Format.
+       * irq/irq.c: Fixed peripheral interrupt handling.
+       * network_5200/network.c: Update for BestComm API changes.
+       * start/start.S: U-Boot fixes.
+       * startup/cpuinit.c: Enable write-back cache strategy.  Added special
+       memory regions.
+       * startup/linkcmds.brs5l: Fixed memory size.
+
</font> 2010-06-30        Peter Dufault <dufault@hda.com>
 
        PR 1588/cpukit

<font color='#006600'>diff -u rtems/c/src/lib/libbsp/powerpc/gen5200/Makefile.am:1.41 rtems/c/src/lib/libbsp/powerpc/gen5200/Makefile.am:1.42
--- rtems/c/src/lib/libbsp/powerpc/gen5200/Makefile.am:1.41     Fri Apr 30 07:45:13 2010
+++ rtems/c/src/lib/libbsp/powerpc/gen5200/Makefile.am  Mon Nov 15 04:55:01 2010
</font><font color='#997700'>@@ -7,6 +7,10 @@
</font> include $(top_srcdir)/../../../../automake/compile.am
 
 include_bspdir = $(includedir)/bsp
<font color='#000088'>+include_bestcommdir = $(include_bspdir)/bestcomm
+include_bestcomm_includedir = $(include_bestcommdir)/include
+include_bestcomm_include_mgt5200dir = $(include_bestcomm_includedir)/mgt5200
+include_bestcomm_task_apidir = $(include_bestcommdir)/task_api
</font> 
 dist_project_lib_DATA = bsp_specs
 
<font color='#997700'>@@ -37,6 +41,7 @@
</font> EXTRA_DIST += startup/linkcmds.icecube
 EXTRA_DIST += startup/linkcmds.pm520_cr825
 EXTRA_DIST += startup/linkcmds.pm520_ze30
<font color='#000088'>+EXTRA_DIST += startup/linkcmds.dp2
</font> 
 noinst_LIBRARIES += libbsp.a
 libbsp_a_SOURCES =
<font color='#997700'>@@ -59,6 +64,20 @@
</font>     bestcomm/task_api/bestcomm_api_mem.h bestcomm/task_api/bestcomm_cntrl.h \
     bestcomm/task_api/tasksetup_bdtable.h \
     bestcomm/task_api/tasksetup_general.h
<font color='#000088'>+include_bestcomm_HEADERS = bestcomm/bestcomm_priv.h \
+       bestcomm/dma_image.h \
+       bestcomm/dma_image.capi.h \
+       bestcomm/bestcomm_api.h \
+       bestcomm/bestcomm_glue.h
+include_bestcomm_include_HEADERS = bestcomm/include/ppctypes.h \
+       bestcomm/include/mgt5200/sdma.h \
+       bestcomm/include/mgt5200/mgt5200.h
+include_bestcomm_include_mgt5200_HEADERS = bestcomm/include/mgt5200/mgt5200.h \
+       bestcomm/include/mgt5200/sdma.h
+include_bestcomm_task_api_HEADERS = bestcomm/task_api/tasksetup_general.h \
+       bestcomm/task_api/tasksetup_bdtable.h \
+       bestcomm/task_api/bestcomm_cntrl.h \
+       bestcomm/task_api/bestcomm_api_mem.h
</font> 
 # clock
 # clock
<font color='#997700'>@@ -72,6 +91,7 @@
</font> 
 include_bsp_HEADERS = ../../shared/include/irq-generic.h \
        ../../shared/include/irq-info.h \
<font color='#000088'>+   ../../shared/include/utility.h \
</font>   include/irq.h \
        include/i2cdrv.h \
        include/i2c.h \

<font color='#006600'>diff -u rtems/c/src/lib/libbsp/powerpc/gen5200/bestcomm/bestcomm_api.h:1.4 rtems/c/src/lib/libbsp/powerpc/gen5200/bestcomm/bestcomm_api.h:1.5
--- rtems/c/src/lib/libbsp/powerpc/gen5200/bestcomm/bestcomm_api.h:1.4  Sun Nov 29 09:27:07 2009
+++ rtems/c/src/lib/libbsp/powerpc/gen5200/bestcomm/bestcomm_api.h      Mon Nov 15 04:55:01 2010
</font><font color='#997700'>@@ -36,12 +36,18 @@
</font>  * linked.
  */
 
<font color='#000088'>+#include <rtems.h>
+
</font> #include "include/ppctypes.h"
 #include "include/mgt5200/sdma.h"
 #include "task_api/tasksetup_bdtable.h"
 #include "task_api/bestcomm_cntrl.h"
 #include "task_api/bestcomm_api_mem.h"
 
<font color='#000088'>+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
</font> /*!
  * \brief      TaskSetup() debugging
  *
<font color='#997700'>@@ -271,8 +277,10 @@
</font>  * TaskId TaskSetup( TaskName_t TaskName,
  *                   TaskSetupParamSet_t *TaskSetupParams );
  */
<font color='#880000'>-#define                    TaskSetup(TaskName, TaskSetupParams)    \
</font><font color='#000088'>+#define                       TaskSetupHelper(TaskName, TaskSetupParams)      \
</font>                           TaskSetup_ ## TaskName (TaskName ## _api, TaskSetupParams)
<font color='#000088'>+#define                    TaskSetup(TaskName, TaskSetupParams) \
+                               TaskSetupHelper(TaskName, TaskSetupParams)
</font> 
 const char             *TaskVersion(void);
 
<font color='#997700'>@@ -283,9 +291,6 @@
</font> void                      TasksLoadImage(sdma_regs *sdma);
 int                            TasksAttachImage(sdma_regs *sdma);
 
<font color='#880000'>-uint32                     TasksGetSramOffset(void);
-void                   TasksSetSramOffset(uint32 sram_offset);
-
</font> int                               TaskStart(TaskId taskId, uint32 autoStartEnable,
                                                  TaskId autoStartTask, uint32 intrEnable);
 int                            TaskStop(TaskId taskId);
<font color='#997700'>@@ -327,7 +332,7 @@
</font>  */
 static inline TaskBD_t *TaskGetBD(TaskId taskId, BDIdx bd)
 {
<font color='#880000'>-   TaskBD_t *bdTab;
</font><font color='#000088'>+      void *bdTab;
</font> 
        bdTab = TaskBDIdxTable[taskId].BDTablePtr;
        if (TaskBDIdxTable[taskId].numPtr == 1) {
<font color='#997700'>@@ -350,7 +355,7 @@
</font>  */
 static inline TaskBD_t *TaskGetBDRing(TaskId taskId)
 {
<font color='#880000'>-   return TaskBDIdxTable[taskId].BDTablePtr;
</font><font color='#000088'>+      return (TaskBD_t *) TaskBDIdxTable[taskId].BDTablePtr;
</font> }
 
 /*!
<font color='#997700'>@@ -448,4 +453,8 @@
</font>   return TaskBDIdxTable[taskId].currBDInUse;
 }
 
<font color='#000088'>+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
</font> #endif    /* __BESTCOMM_API_H */

<font color='#006600'>diff -u rtems/c/src/lib/libbsp/powerpc/gen5200/bestcomm/bestcomm_api.c:1.4 rtems/c/src/lib/libbsp/powerpc/gen5200/bestcomm/bestcomm_api.c:1.5
--- rtems/c/src/lib/libbsp/powerpc/gen5200/bestcomm/bestcomm_api.c:1.4  Sun Nov 29 09:27:07 2009
+++ rtems/c/src/lib/libbsp/powerpc/gen5200/bestcomm/bestcomm_api.c      Mon Nov 15 04:55:01 2010
</font><font color='#997700'>@@ -70,11 +70,6 @@
</font> sint64 MBarPhysOffsetGlobal;
 
 /*
<font color='#880000'>- * Offset to free space in SRAM after task code and buffer descriptors.
- */
-uint32 SramOffsetGlobal = 0;
-
-/*
</font>  * This flag is false when TaskStart() has not yet been called on a
  * task newly configured by TaskSetup() or TaskStop() has been called.
  * Otherwise it is true.  It is possible that a task disabled itself
<font color='#997700'>@@ -185,48 +180,6 @@
</font> }
 
 /*!
<font color='#880000'>- * \brief  This function returns the value of the internal variable
- *                     used to keep track of used space in SRAM.
- *
- * \returns The number of bytes from the beginning of SRAM to the end
- *                     used space in the SRAM.
- *
- * This function will return the offset to free space in the SRAM
- * not used by the CAPI. \b Note: The returned value is based
- * on what is in TasksSetSramOffset. This function can
- * not determine what SRAM space was used by another process. There must
- * be some way external to the CAPI to keep track of SRAM space. This
- * function only returns the internal variable used to keep track of buffer
- * descriptors.
- */
-uint32 TasksGetSramOffset(void)
-{
-       return SramOffsetGlobal;
-}
-
-/*!
- * \brief      This function stores the number of bytes from the
- *                     beginning of SRAM to the end of the used space.
- *
- * \param      sram_offset     Number of bytes until the beginning of
- *                                             free space in the SRAM.
- *
- * This function sets the free space offset in SRAM.  It must be called
- * before setup in multi-task environments. It is the application's
- * job to determine where the free space in SRAM is. This sets the
- * base offset for the buffer descriptor variables during setup, so to
- * deallocate buffers that have already been set this function should be
- * called with a new offset.
- */
-void TasksSetSramOffset(uint32 sram_offset)
-{
-       /*
-     * Set the SramOffsetGlobal variable to be used by TaskSetup_BDTable
-        */
-       SramOffsetGlobal = sram_offset;
-}
-
-/*!
</font>  * \brief Start an initialized task running.
  * \param      taskId  Task handle passed back from a successful TaskSetup()
  * \param      autoStartEnable Boolean for whether autostart bit is enabled.

<font color='#006600'>diff -u rtems/c/src/lib/libbsp/powerpc/gen5200/bestcomm/bestcomm_glue.h:1.2 rtems/c/src/lib/libbsp/powerpc/gen5200/bestcomm/bestcomm_glue.h:1.3
--- rtems/c/src/lib/libbsp/powerpc/gen5200/bestcomm/bestcomm_glue.h:1.2 Sun Jan  1 01:51:59 2006
+++ rtems/c/src/lib/libbsp/powerpc/gen5200/bestcomm/bestcomm_glue.h     Mon Nov 15 04:55:01 2010
</font><font color='#997700'>@@ -19,7 +19,11 @@
</font> #ifndef _BESTCOMM_GLUE_H
 #define _BESTCOMM_GLUE_H
 
<font color='#880000'>-#include <rtems.h>
</font><font color='#000088'>+#include <rtems/irq-extension.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
</font> 
 /*=========================================================================*\
 | Function:                                                                 |
<font color='#997700'>@@ -69,8 +73,8 @@
</font> | Input Parameters:                                                         |
 \*-------------------------------------------------------------------------*/
  int bestcomm_taskno,                          /* task number for handler  */
<font color='#880000'>- void (*the_handler)(rtems_irq_hdl_param),     /* function to call         */
- rtems_irq_hdl_param the_param
</font><font color='#000088'>+ rtems_interrupt_handler handler,              /* function to call         */
+ void *arg
</font>  );
 /*-------------------------------------------------------------------------*\
 | Return Value:                                                             |
<font color='#997700'>@@ -99,4 +103,12 @@
</font> |    none                                                                   |
 \*=========================================================================*/
 
<font color='#000088'>+void *bestcomm_malloc(size_t size);
+
+void bestcomm_free(void *ptr);
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
</font> #endif /* _BESTCOMM_GLUE_H */

<font color='#006600'>diff -u rtems/c/src/lib/libbsp/powerpc/gen5200/bestcomm/bestcomm_glue.c:1.7 rtems/c/src/lib/libbsp/powerpc/gen5200/bestcomm/bestcomm_glue.c:1.8
--- rtems/c/src/lib/libbsp/powerpc/gen5200/bestcomm/bestcomm_glue.c:1.7 Sat Sep  6 12:14:37 2008
+++ rtems/c/src/lib/libbsp/powerpc/gen5200/bestcomm/bestcomm_glue.c     Mon Nov 15 04:55:01 2010
</font><font color='#997700'>@@ -16,8 +16,8 @@
</font> +-----------------------------------------------------------------+
 | this file contains glue functions to the Freescale BestComm API |
 \*===============================================================*/
<font color='#000088'>+#include <assert.h>
</font> #include <rtems.h>
<font color='#880000'>-#include <rtems/error.h>
</font> #include <bsp.h>
 #include <bsp/irq.h>
 #include "../include/mpc5200.h"
<font color='#997700'>@@ -28,6 +28,10 @@
</font> #include "bestcomm_glue.h"
 #include "include/mgt5200/sdma.h"
 
<font color='#000088'>+extern const uint32 taskTableBytes;
+
+static Heap_Control bestcomm_heap;
+
</font> /*=========================================================================*\
 | Function:                                                                 |
 \*-------------------------------------------------------------------------*/
<font color='#997700'>@@ -46,15 +50,12 @@
</font> |    none                                                                   |
 \*=========================================================================*/
 {
<font color='#880000'>-  rtems_interrupt_level level;
</font>   if (0 != ((1UL<<bestcomm_taskno) & SDMA_INT_BIT_IMPL)) {
<font color='#880000'>-    rtems_interrupt_disable(level);
</font>     /*
      * valid task number
      * enable interrupt in bestcomm mask
      */
<font color='#880000'>-    SDMA_INT_ENABLE(&mpc5200.IntMask,bestcomm_taskno);
-    rtems_interrupt_enable(level);
</font><font color='#000088'>+    SDMA_INT_ENABLE(&mpc5200.sdma.IntMask,bestcomm_taskno);
</font>   }
 }
 
<font color='#997700'>@@ -76,24 +77,21 @@
</font> |    none                                                                   |
 \*=========================================================================*/
 {
<font color='#880000'>-  rtems_interrupt_level level;
</font>   if (0 != ((1UL<<bestcomm_taskno) & SDMA_INT_BIT_IMPL)) {
<font color='#880000'>-    rtems_interrupt_disable(level);
</font>     /*
      * valid task number
      * disable interrupt in bestcomm mask
      */
<font color='#880000'>-    SDMA_INT_DISABLE(&mpc5200.IntMask,bestcomm_taskno);
-    rtems_interrupt_enable(level);
</font><font color='#000088'>+    SDMA_INT_DISABLE(&mpc5200.sdma.IntMask,bestcomm_taskno);
</font>   }
 }
 
 typedef struct {
<font color='#880000'>-  void                 (*the_handler)(rtems_irq_hdl_param);
-  rtems_irq_hdl_param  the_param;
</font><font color='#000088'>+  rtems_interrupt_handler handler;
+  void *arg;
</font> } bestcomm_glue_irq_handlers_t;
 
<font color='#880000'>-bestcomm_glue_irq_handlers_t bestcomm_glue_irq_handlers[32];
</font><font color='#000088'>+static bestcomm_glue_irq_handlers_t bestcomm_glue_irq_handlers[32];
</font> 
 /*=========================================================================*\
 | Function:                                                                 |
<font color='#997700'>@@ -107,8 +105,8 @@
</font> | Input Parameters:                                                         |
 \*-------------------------------------------------------------------------*/
  int bestcomm_taskno,                          /* task number for handler  */
<font color='#880000'>- void (*the_handler)(rtems_irq_hdl_param),     /* function to call         */
- rtems_irq_hdl_param the_param
</font><font color='#000088'>+ rtems_interrupt_handler handler,              /* function to call         */
+ void *arg
</font> )
 /*-------------------------------------------------------------------------*\
 | Return Value:                                                             |
<font color='#997700'>@@ -120,8 +118,8 @@
</font>      * valid task number
      * install handler
      */
<font color='#880000'>-    bestcomm_glue_irq_handlers[bestcomm_taskno].the_handler = the_handler;
-    bestcomm_glue_irq_handlers[bestcomm_taskno].the_param   = the_param;
</font><font color='#000088'>+    bestcomm_glue_irq_handlers[bestcomm_taskno].handler = handler;
+    bestcomm_glue_irq_handlers[bestcomm_taskno].arg = arg;
</font>   }
 }
 
<font color='#997700'>@@ -136,8 +134,7 @@
</font> +---------------------------------------------------------------------------+
 | Input Parameters:                                                         |
 \*-------------------------------------------------------------------------*/
<font color='#880000'>- rtems_irq_hdl_param handle              /* irq specific handle (not used) */
-
</font><font color='#000088'>+ void *arg                               /* irq specific handle (not used) */
</font> )
 /*-------------------------------------------------------------------------*\
 | Return Value:                                                             |
<font color='#997700'>@@ -147,23 +144,23 @@
</font>   uint32_t pending;
   int curr_taskno;
 
<font color='#880000'>-  pending = mpc5200.IntPend & ~mpc5200.IntMask;
</font><font color='#000088'>+  pending = mpc5200.sdma.IntPend & ~mpc5200.sdma.IntMask;
</font>   curr_taskno = 0;
   while (pending != 0) {
     if ((pending & (1UL<<curr_taskno)) != 0) {
<font color='#880000'>-      if (bestcomm_glue_irq_handlers[curr_taskno].the_handler == NULL) {
</font><font color='#000088'>+      if (bestcomm_glue_irq_handlers[curr_taskno].handler != NULL) {
</font>   /*
<font color='#880000'>-    * This should never happen. we have a pending IRQ but no handler
-        * let's clear this pending bit
</font><font color='#000088'>+       * call proper handler
</font>    */
<font color='#880000'>-   SDMA_CLEAR_IEVENT(&mpc5200.IntPend,curr_taskno);
</font><font color='#000088'>+      bestcomm_glue_irq_handlers[curr_taskno].handler
+         (bestcomm_glue_irq_handlers[curr_taskno].arg);
</font>       }
       else {
        /*
<font color='#880000'>-    * call proper handler
</font><font color='#000088'>+       * This should never happen. we have a pending IRQ but no handler
+        * let's clear this pending bit
</font>    */
<font color='#880000'>-   bestcomm_glue_irq_handlers[curr_taskno].the_handler
-         (bestcomm_glue_irq_handlers[curr_taskno].the_param);
</font><font color='#000088'>+      SDMA_CLEAR_IEVENT(&mpc5200.sdma.IntPend,curr_taskno);
</font>       }
       /*
        * clear this bit in our pending copy
<font color='#997700'>@@ -175,32 +172,6 @@
</font>   }
 }
 
<font color='#880000'>-void bestcomm_glue_on(const rtems_irq_connect_data* ptr)
-  {
-  }
-
-
-void bestcomm_glue_isOn(const rtems_irq_connect_data* ptr)
-  {
-  /*return BSP_irq_enabled_at_cpm(ptr->name);*/
-  }
-
-
-void bestcomm_glue_off(const rtems_irq_connect_data* ptr)
-  {
-  }
-
-static rtems_irq_connect_data bestcomm_glue_irq_data =
-  {
-
-  BSP_SIU_IRQ_SMARTCOMM,
-  (rtems_irq_hdl)        bestcomm_glue_irq_dispatcher,
-  (rtems_irq_hdl_param)  NULL,
-  (rtems_irq_enable)     bestcomm_glue_on,
-  (rtems_irq_disable)    bestcomm_glue_off,
-  (rtems_irq_is_enabled) bestcomm_glue_isOn
-  };
-
</font> static bool bestcomm_glue_is_initialized = false;
 /*=========================================================================*\
 | Function:                                                                 |
<font color='#997700'>@@ -224,12 +195,24 @@
</font> |    none                                                                   |
 \*=========================================================================*/
 {
<font color='#000088'>+  rtems_status_code sc = RTEMS_SUCCESSFUL;
+  uintptr_t heap_status = 0;
+
</font>   if (!bestcomm_glue_is_initialized) {
     bestcomm_glue_is_initialized = true;
<font color='#000088'>+
+    heap_status = _Heap_Initialize(
+      &bestcomm_heap,
+      (char *) &mpc5200.sram [0] + taskTableBytes,
+      sizeof(mpc5200.sram) - taskTableBytes,
+      4
+    );
+    assert(heap_status != 0);
+
</font>     /*
      * Set task bar to begin of sram
      */
<font color='#880000'>-    mpc5200.taskBar = (uint32_t)(&(mpc5200.sram[0]));
</font><font color='#000088'>+    mpc5200.sdma.taskBar = (uint32_t)(&(mpc5200.sram[0]));
</font> 
 #if 0
     /*
<font color='#997700'>@@ -244,18 +227,35 @@
</font>      * the COMM bus. (Yes, _PE -- prefetch enable -- should probably be
      * named _PD.)
      */
<font color='#880000'>-    mpc5200.PtdCntrl |= SDMA_PTDCNTRL_PE;
</font><font color='#000088'>+    mpc5200.sdma.PtdCntrl |= SDMA_PTDCNTRL_PE;
</font> 
     TasksInitAPI((uint8*)&mpc5200);
 
<font color='#880000'>-    TasksLoadImage( (void *)&(mpc5200.taskBar));
</font><font color='#000088'>+    TasksLoadImage( (void *)&(mpc5200.sdma.taskBar));
</font> 
     /*
      * initialize interrupt dispatcher
      */
<font color='#880000'>-      if(!BSP_install_rtems_irq_handler (&bestcomm_glue_irq_data)) {
-       rtems_panic ("Can't attach MPC5x00 BestComm interrupt handler\n");
-      }
</font><font color='#000088'>+    sc = rtems_interrupt_handler_install(
+      BSP_SIU_IRQ_SMARTCOMM,
+      "BESTCOMM",
+      RTEMS_INTERRUPT_UNIQUE,
+      bestcomm_glue_irq_dispatcher,
+      NULL
+    );
+    assert(sc == RTEMS_SUCCESSFUL);
+  }
+}
</font> 
<font color='#000088'>+void *bestcomm_malloc(size_t size)
+{
+  return _Heap_Allocate(&bestcomm_heap, size);
+}
+
+void bestcomm_free(void *ptr)
+{
+  if (ptr != NULL) {
+    bool ok = _Heap_Free(&bestcomm_heap, ptr);
+    assert(ok);
</font>   }
 }

<font color='#006600'>diff -u rtems/c/src/lib/libbsp/powerpc/gen5200/bestcomm/bestcomm_priv.h:1.3 rtems/c/src/lib/libbsp/powerpc/gen5200/bestcomm/bestcomm_priv.h:1.4
--- rtems/c/src/lib/libbsp/powerpc/gen5200/bestcomm/bestcomm_priv.h:1.3 Sun Nov 29 09:27:07 2009
+++ rtems/c/src/lib/libbsp/powerpc/gen5200/bestcomm/bestcomm_priv.h     Mon Nov 15 04:55:02 2010
</font><font color='#997700'>@@ -31,7 +31,6 @@
</font>  * private data structures that should not be manipulated by API users.
  */
 
<font color='#880000'>-extern uint32           SramOffsetGlobal;
</font> extern TaskBDIdxTable_t TaskBDIdxTable[MAX_TASKS];
 extern int              TaskRunning[MAX_TASKS];
 extern sint64                  MBarPhysOffsetGlobal;

<font color='#006600'>diff -u rtems/c/src/lib/libbsp/powerpc/gen5200/bestcomm/load_task.c:1.7 rtems/c/src/lib/libbsp/powerpc/gen5200/bestcomm/load_task.c:1.8
--- rtems/c/src/lib/libbsp/powerpc/gen5200/bestcomm/load_task.c:1.7     Sun Nov 29 09:27:07 2009
+++ rtems/c/src/lib/libbsp/powerpc/gen5200/bestcomm/load_task.c Mon Nov 15 04:55:02 2010
</font><font color='#997700'>@@ -81,6 +81,4 @@
</font>           tt->fdt              = (sdma->taskBar & 0xFFFFFF00) + tt->fdt;
                tt->context  += sdma->taskBar;
        }
<font color='#880000'>-
-       SramOffsetGlobal = taskTableBytes;
</font> }

<font color='#006600'>diff -u rtems/c/src/lib/libbsp/powerpc/gen5200/bestcomm/task_api/bestcomm_cntrl.h:1.3 rtems/c/src/lib/libbsp/powerpc/gen5200/bestcomm/task_api/bestcomm_cntrl.h:1.4
--- rtems/c/src/lib/libbsp/powerpc/gen5200/bestcomm/task_api/bestcomm_cntrl.h:1.3       Sun Nov 29 09:27:07 2009
+++ rtems/c/src/lib/libbsp/powerpc/gen5200/bestcomm/task_api/bestcomm_cntrl.h   Mon Nov 15 04:55:02 2010
</font><font color='#997700'>@@ -88,46 +88,54 @@
</font>  * Task control macros
  ******************************************************************************/
 #define SDMA_TASK_CFG(RegAddr, TaskNum, AutoStart, AutoStartNum) { \
<font color='#880000'>-   *(((uint16 *)RegAddr)+TaskNum) = (uint16)(0x0000     |  \
</font><font color='#000088'>+      *(((volatile uint16 *)RegAddr)+TaskNum) = (uint16)(0x0000     |  \
</font>                                                                    ((AutoStart!=0)<<7) |  \
                                                                         (AutoStartNum&0xF)  ); \
 }
 
 #define SDMA_TASK_AUTO_START(RegAddr, TaskNum, AutoStart, AutoStartNum) { \
<font color='#880000'>-   *(((uint16 *)RegAddr)+TaskNum) = (uint16)((*(((uint16 *)RegAddr)+TaskNum) & \
</font><font color='#000088'>+      *(((volatile uint16 *)RegAddr)+TaskNum) = (uint16)((*(((volatile uint16 *)RegAddr)+TaskNum) & \
</font>                                                                    (uint16) 0xff30) | ((uint16)(0x0000 |  \
                                                                         ((AutoStart!=0)<<7) |  \
                                                                         (AutoStartNum&0xF))  )); \
 }
 
 #define SDMA_TASK_ENABLE(RegAddr, TaskNum) {   \
<font color='#880000'>-   *(((uint16 *)RegAddr)+TaskNum) |=  (uint16)0x8000; \
</font><font color='#000088'>+      *(((volatile uint16 *)RegAddr)+TaskNum) |=  (uint16)0x8000; \
</font> }
 
 #define SDMA_TASK_DISABLE(RegAddr, TaskNum) {  \
<font color='#880000'>-   *(((uint16 *)RegAddr)+TaskNum) &= ~(uint16)0x8000; \
</font><font color='#000088'>+      *(((volatile uint16 *)RegAddr)+TaskNum) &= ~(uint16)0x8000; \
</font> }
 
 #define SDMA_TASK_STATUS(RegAddr, TaskNum)     \
<font color='#880000'>-   *(((uint16 *)RegAddr)+TaskNum)
</font><font color='#000088'>+      *(((volatile uint16 *)RegAddr)+TaskNum)
</font> 
 
 /*******************************************************************************
  * Interrupt control macros
  ******************************************************************************/
<font color='#880000'>-#define SDMA_INT_ENABLE(RegAddr, Bit) {    \
-       *((uint32 *)RegAddr) &= ~((uint32)(1<<Bit)); \
-}
-
-#define SDMA_INT_DISABLE(RegAddr, Bit) {       \
-       *((uint32 *)(RegAddr)) |= ((uint32)(1<<Bit)); \
-}
</font><font color='#000088'>+#define SDMA_INT_ENABLE(RegAddr, Bit) \
+  do { \
+    rtems_interrupt_level level; \
+    rtems_interrupt_disable(level); \
+    *((volatile uint32 *) RegAddr) &= ~((uint32) (1 << Bit)); \
+    rtems_interrupt_enable(level); \
+  } while (0)
+
+#define SDMA_INT_DISABLE(RegAddr, Bit) \
+  do { \
+    rtems_interrupt_level level; \
+    rtems_interrupt_disable(level); \
+    *((volatile uint32 *) (RegAddr)) |= ((uint32)(1 << Bit)); \
+    rtems_interrupt_enable(level); \
+  } while (0)
</font> 
 #define SDMA_INT_SOURCE(RegPend, RegMask)      \
<font color='#880000'>-   (*((uint32 *)(RegPend)) & (~*((uint32 *)(RegMask))) & (uint32)SDMA_INT_BIT_IMPL)
</font><font color='#000088'>+      (*((volatile uint32 *)(RegPend)) & (~*((volatile uint32 *)(RegMask))) & (uint32)SDMA_INT_BIT_IMPL)
</font> 
 #define SDMA_INT_PENDING(RegPend, RegMask)     \
<font color='#880000'>-   (*((uint32 *)(RegPend)) & (~*((uint32 *)(RegMask))))
</font><font color='#000088'>+      (*((volatile uint32 *)(RegPend)) & (~*((volatile uint32 *)(RegMask))))
</font> 
 #define SDMA_INT_TEST(IntSource, Bit)  \
        (((uint32)IntSource) & ((uint32)(1<<Bit)))
<font color='#997700'>@@ -139,7 +147,7 @@
</font> 
 /* Clear the IntPend bit */
 #define SDMA_CLEAR_IEVENT(RegAddr, Bit) {      \
<font color='#880000'>-   *((uint32 *)RegAddr) = ((uint32)(1<<Bit)); \
</font><font color='#000088'>+      *((volatile uint32 *)RegAddr) = ((uint32)(1<<Bit)); \
</font> }
 
 #define SDMA_GET_PENDINGBIT(sdma, Bit) \
<font color='#997700'>@@ -175,7 +183,7 @@
</font> 
 /* Determine which task caused a TEA on the XLB */
 #define SDMA_TEA_SOURCE(RegPend)       \
<font color='#880000'>-   (uint32)(((*(uint32 *)RegPend)>>SDMA_INT_BIT_TEA_TASK) & 0xF)
</font><font color='#000088'>+      (uint32)(((*(volatile uint32 *)RegPend)>>SDMA_INT_BIT_TEA_TASK) & 0xF)
</font> 
 
 /*******************************************************************************
<font color='#997700'>@@ -221,8 +229,8 @@
</font> /* Note that masking the size w/ 0x3 gives the desired value for uint32 */
 /*    (expressed as 4), namely 0. */
 #define SDMA_SET_SIZE(RegAddr, TaskNum, SrcSize, DstSize)                      \
<font color='#880000'>-   *(((uint8 *)RegAddr)+((uint32)(TaskNum/2))) =                                   \
-       (uint8)((*(((uint8 *)RegAddr)+((uint32)(TaskNum/2))) &                      \
</font><font color='#000088'>+      *(((volatile uint8 *)RegAddr)+((uint32)(TaskNum/2))) =                                  \
+       (uint8)((*(((volatile uint8 *)RegAddr)+((uint32)(TaskNum/2))) &                     \
</font>                   ((TaskNum%2) ? 0xf0 : 0x0f)) |                                                  \
        ((uint8)(((SrcSize & 0x3)<<2) |                                                                       \
                        ( DstSize & 0x3 ) ) <<(4*((int)(1-(TaskNum%2))))));
<font color='#997700'>@@ -231,8 +239,8 @@
</font> /* Set the Initiator in TCR */
 #define SDMA_SET_INIT(RegAddr, TaskNum, Initiator)                                     \
 {                                                                                                                                      \
<font color='#880000'>-   *(((uint16 *)RegAddr)+TaskNum) &= (uint16)0xE0FF;                           \
-       *(((uint16 *)RegAddr)+TaskNum) |= (((0x01F & Initiator)<<8) | \
</font><font color='#000088'>+      *(((volatile uint16 *)RegAddr)+TaskNum) &= (uint16)0xE0FF;                          \
+       *(((volatile uint16 *)RegAddr)+TaskNum) |= (((0x01F & Initiator)<<8) |        \
</font>                                                                     (0<<SDMA_TCR_BIT_HOLD));                \
 }
 
<font color='#997700'>@@ -248,16 +256,16 @@
</font> 
 /* Set the Initiator Priority */
 #define SDMA_SET_INITIATOR_PRIORITY(sdma, initiator, priority) \
<font color='#880000'>-   *(((uint8 *)&sdma->IPR0)+initiator) = priority;
</font><font color='#000088'>+      *(((volatile uint8 *)&sdma->IPR0)+initiator) = priority;
</font> 
 
 /* Read DRD initiator number */
 #define SDMA_INIT_READ(PtrDRD) \
<font color='#880000'>-   (((*(uint32 *)PtrDRD)>>SDMA_DRD_BIT_INIT) & (uint32)0x1F)
</font><font color='#000088'>+      (((*(volatile uint32 *)PtrDRD)>>SDMA_DRD_BIT_INIT) & (uint32)0x1F)
</font> 
 /* Write DRD initiator number */
 #define SDMA_INIT_WRITE(PtrDRD, Initiator) {                                   \
<font color='#880000'>-   *(uint32 *)PtrDRD = ((*(uint32 *)PtrDRD) & 0xFC1FFFFF) |    \
</font><font color='#000088'>+      *(volatile uint32 *)PtrDRD = ((*(volatile uint32 *)PtrDRD) & 0xFC1FFFFF) |  \
</font>                                           (Initiator<<SDMA_DRD_BIT_INIT);                   \
 }
 

<font color='#006600'>diff -u rtems/c/src/lib/libbsp/powerpc/gen5200/bestcomm/tasksetup_bdtable.c:1.4 rtems/c/src/lib/libbsp/powerpc/gen5200/bestcomm/tasksetup_bdtable.c:1.5
--- rtems/c/src/lib/libbsp/powerpc/gen5200/bestcomm/tasksetup_bdtable.c:1.4     Sun Nov 29 09:27:07 2009
+++ rtems/c/src/lib/libbsp/powerpc/gen5200/bestcomm/tasksetup_bdtable.c Mon Nov 15 04:55:02 2010
</font><font color='#997700'>@@ -22,7 +22,10 @@
</font> *
 ******************************************************************************/
 
<font color='#000088'>+#include <assert.h>
+
</font> #include "bestcomm_api.h"
<font color='#000088'>+#include "bestcomm_glue.h"
</font> #include "task_api/tasksetup_bdtable.h"
 #include "include/mgt5200/mgt5200.h"
 
<font color='#997700'>@@ -40,8 +43,6 @@
</font> 
 TaskBDIdxTable_t TaskBDIdxTable[MAX_TASKS];
 
<font color='#880000'>-static uint8 *TaskTableFree = 0;
-
</font> void TaskSetup_BDTable(volatile uint32 *BasePtr, volatile uint32 *LastPtr, volatile uint32 *StartPtr,
                                           int TaskNum, uint32 NumBD, uint16 MaxBD,
                                           uint8 NumPtr, ApiConfig_t ApiConfig, uint32 Status)
<font color='#997700'>@@ -50,16 +51,6 @@
</font>   uint32 *ptr;
 
        /*
<font color='#880000'>-    * If another process has not used SRAM already, then the start value
-        * will have to be passed in using the TasksSetSramOffset() function.
-        */
-       if (SramOffsetGlobal == 0) {
-               SramOffsetGlobal = taskTableBytes;
-       }
-
-       TaskTableFree = MBarGlobal + MBAR_SRAM + SramOffsetGlobal;
-
-       /*
</font>    * First time through the Buffer Descriptor table configuration
         * set the buffer descriptor table with parameters that will not
         * change since they are determined by the task itself. The
<font color='#997700'>@@ -70,25 +61,31 @@
</font>    * of the table.
         */
        if (TaskBDIdxTable[TaskNum].BDTablePtr == 0) {
<font color='#880000'>-           TaskBDIdxTable[TaskNum].BDTablePtr  = TaskTableFree;
-               TaskBDIdxTable[TaskNum].numPtr      = NumPtr;
-               TaskBDIdxTable[TaskNum].apiConfig   = ApiConfig;
-               TaskBDIdxTable[TaskNum].BDStartPtr  = StartPtr;
-
-               *StartPtr = *BasePtr  = (uint32)((uint32)TaskBDIdxTable[TaskNum].BDTablePtr
-                       <span style="background-color: #FF0000"> </span>          + MBarPhysOffsetGlobal);
</font><font color='#000088'>+              size_t AllocSize = 0;
+               void *AllocBegin = NULL;
</font> 
                switch (NumPtr) {
                        case 1:
<font color='#880000'>-                           SramOffsetGlobal += MaxBD*sizeof(TaskBD1_t);
</font><font color='#000088'>+                              AllocSize += MaxBD*sizeof(TaskBD1_t);
</font>                           break;
                        case 2:
<font color='#880000'>-                           SramOffsetGlobal += MaxBD*sizeof(TaskBD2_t);
</font><font color='#000088'>+                              AllocSize += MaxBD*sizeof(TaskBD2_t);
</font>                           break;
                        default:
<font color='#880000'>-                           /* error */
</font><font color='#000088'>+                              assert(0);
</font>                           break;
                }
<font color='#000088'>+
+               AllocBegin = bestcomm_malloc(AllocSize);
+               assert(AllocBegin != NULL);
+
+               TaskBDIdxTable[TaskNum].BDTablePtr  = AllocBegin;
+               TaskBDIdxTable[TaskNum].numPtr      = NumPtr;
+               TaskBDIdxTable[TaskNum].apiConfig   = ApiConfig;
+               TaskBDIdxTable[TaskNum].BDStartPtr  = StartPtr;
+
+               *StartPtr = *BasePtr  = (uint32)((uint32)TaskBDIdxTable[TaskNum].BDTablePtr
+                       <span style="background-color: #FF0000"> </span>          + MBarPhysOffsetGlobal);
</font>   }
 
        TaskBDIdxTable[TaskNum].currBDInUse     = 0;

<font color='#006600'>diff -u rtems/c/src/lib/libbsp/powerpc/gen5200/configure.ac:1.18 rtems/c/src/lib/libbsp/powerpc/gen5200/configure.ac:1.19
--- rtems/c/src/lib/libbsp/powerpc/gen5200/configure.ac:1.18    Tue Jun 29 13:52:50 2010
+++ rtems/c/src/lib/libbsp/powerpc/gen5200/configure.ac Mon Nov 15 04:55:01 2010
</font><font color='#997700'>@@ -25,11 +25,6 @@
</font> [If defined, the instruction cache will be enabled after address translation
  is turned on.])
 
<font color='#880000'>-RTEMS_BSPOPTS_SET([HAS_UBOOT],[icecube],[1])
-RTEMS_BSPOPTS_SET([HAS_UBOOT],[pm520_*],[1])
-RTEMS_BSPOPTS_HELP([HAS_UBOOT],
-[If defined, board boots via U-Boot])
-
</font> RTEMS_BSPOPTS_SET([BENCHMARK_IRQ_PROCESSING],[*],[0])
 RTEMS_BSPOPTS_HELP([BENCHMARK_IRQ_PROCESSING],
 [If set to !0, enable code to benchmark IRQ processing.])
<font color='#997700'>@@ -53,17 +48,14 @@
</font> RTEMS_BSPOPTS_HELP([BSP_RESET_BOARD_AT_EXIT],
 [If set to !0, reset the board when the application exits.])
 
<font color='#880000'>-RTEMS_BSPOPTS_SET([BSP_GPIOPCR_INITMASK],[pm520_ze30],[0x337F3F77])
-RTEMS_BSPOPTS_SET([BSP_GPIOPCR_INITVAL],[pm520_ze30],[0x01552114])
-
-RTEMS_BSPOPTS_SET([BSP_GPIOPCR_INITMASK],[pm520_cr825],[0x330F0F77])
-RTEMS_BSPOPTS_SET([BSP_GPIOPCR_INITVAL],[pm520_cr825],[0x01050444])
</font><font color='#000088'>+RTEMS_BSPOPTS_SET([BSP_GPIOPCR_INITMASK],[pm520_ze30],[0x037F3F07])
+RTEMS_BSPOPTS_SET([BSP_GPIOPCR_INITVAL],[pm520_ze30],[0x01552104])
</font> 
 RTEMS_BSPOPTS_SET([BSP_GPIOPCR_INITMASK],[brs5l],[0xb30F0F77])
 RTEMS_BSPOPTS_SET([BSP_GPIOPCR_INITVAL],[brs5l],[0x91050444])
 
<font color='#880000'>-RTEMS_BSPOPTS_SET([BSP_GPIOPCR_INITMASK],[icecube],[0x330F0F77])
-RTEMS_BSPOPTS_SET([BSP_GPIOPCR_INITVAL],[icecube],[0x01050444])
</font><font color='#000088'>+RTEMS_BSPOPTS_SET([BSP_GPIOPCR_INITMASK],[dp2],[0x337F3F77])
+RTEMS_BSPOPTS_SET([BSP_GPIOPCR_INITVAL],[dp2],[0x03550040])
</font> 
 RTEMS_BSPOPTS_SET([BSP_GPIOPCR_INITMASK],[*],[0x330F0F77])
 RTEMS_BSPOPTS_SET([BSP_GPIOPCR_INITVAL],[*],[0x01050444])
<font color='#997700'>@@ -83,27 +75,52 @@
</font> RTEMS_BSPOPTS_SET([BSP_UART_AVAIL_MASK],[brs5l],[0x07])
 ## on icecube, we only have PSC1
 RTEMS_BSPOPTS_SET([BSP_UART_AVAIL_MASK],[icecube],[0x01])
<font color='#000088'>+## dp2: PSC2 (via USB connector), PSC6 (GPS module)
+RTEMS_BSPOPTS_SET([BSP_UART_AVAIL_MASK],[dp2],[0x22])
+## default
</font> RTEMS_BSPOPTS_SET([BSP_UART_AVAIL_MASK],[*],[0x01])
 RTEMS_BSPOPTS_HELP([BSP_UART_AVAIL_MASK],
 [bit mask to specify the UARTS (PSCs), which should be enabled on this board.<span style="background-color: #FF0000"> </span>
  Must match the hardware requirements. PSC1 corresponds to the LSB])
 
<font color='#000088'>+RTEMS_BSPOPTS_SET([MPC5200_PSC_INDEX_FOR_GPS_MODULE],[dp2],[5])
+RTEMS_BSPOPTS_HELP([MPC5200_PSC_INDEX_FOR_GPS_MODULE],[PSC index for GPS module, if defined results in '/dev/gps'])
+
+RTEMS_BSPOPTS_SET([SINGLE_CHAR_MODE],[dp2],[])
+RTEMS_BSPOPTS_SET([SINGLE_CHAR_MODE],[*],[1])
+RTEMS_BSPOPTS_HELP([SINGLE_CHAR_MODE],[enable single character mode for the PSC console driver])
+
+RTEMS_BSPOPTS_SET([UARTS_USE_TERMIOS_INT],[dp2],[1])
+RTEMS_BSPOPTS_HELP([UARTS_USE_TERMIOS_INT],[enable interrupt support for the PSC console driver])
+
+RTEMS_BSPOPTS_SET([PRINTK_MINOR],[dp2],[1])
+RTEMS_BSPOPTS_SET([PRINTK_MINOR],[*],[0])
+RTEMS_BSPOPTS_HELP([PRINTK_MINOR],[console minor number used by printk()])
+
</font> RTEMS_BSPOPTS_SET([PM520_ZE30],[pm520_ze30],[1])
 RTEMS_BSPOPTS_HELP([PM520_ZE30],
<font color='#880000'>-[If defined, use custom settings of for the pm520_ze30 BSP])
</font><font color='#000088'>+[enable settings for PM520 ZE30])
</font> 
 RTEMS_BSPOPTS_SET([PM520_CR825],[pm520_cr825],[1])
 RTEMS_BSPOPTS_HELP([PM520_CR825],
<font color='#880000'>-[If defined, use custom settings of for the pm520_cr825 BSP])
</font><font color='#000088'>+[enable settings for PM520 CR825])
</font> 
 RTEMS_BSPOPTS_SET([icecube],[icecube],[1])
 RTEMS_BSPOPTS_HELP([icecube],
<font color='#880000'>-[If defined, use custom settings of for the icecube BSP])
</font><font color='#000088'>+[enable settings for IceCube])
</font> 
 RTEMS_BSPOPTS_SET([BRS5L],[brs5l],[1])
 RTEMS_BSPOPTS_HELP([BRS5L],
<font color='#880000'>-[If defined, use custom settings of for the brs5l BSP])
</font><font color='#000088'>+[enable settings for BRS5L])
+
+RTEMS_BSPOPTS_SET([BSP_TYPE_DP2],[dp2],[1])
+RTEMS_BSPOPTS_HELP([BSP_TYPE_DP2],
+[enable settings for DP2])
</font> 
<font color='#000088'>+RTEMS_BSPOPTS_SET([HAS_UBOOT],[pm520*],[1])
+RTEMS_BSPOPTS_SET([HAS_UBOOT],[icecube],[1])
+RTEMS_BSPOPTS_SET([HAS_UBOOT],[dp2],[1])
+RTEMS_BSPOPTS_HELP([HAS_UBOOT],[enable U-Boot startup])
</font> 
 RTEMS_CHECK_NETWORKING
 AM_CONDITIONAL(HAS_NETWORKING,test "$HAS_NETWORKING" = "yes")

<font color='#006600'>diff -u rtems/c/src/lib/libbsp/powerpc/gen5200/console/console.c:1.21 rtems/c/src/lib/libbsp/powerpc/gen5200/console/console.c:1.22
--- rtems/c/src/lib/libbsp/powerpc/gen5200/console/console.c:1.21       Thu Mar 25 15:26:51 2010
+++ rtems/c/src/lib/libbsp/powerpc/gen5200/console/console.c    Mon Nov 15 04:55:02 2010
</font><font color='#997700'>@@ -95,6 +95,8 @@
</font> /*                                                                     */
 /***********************************************************************/
 
<font color='#000088'>+#include <assert.h>
+
</font> #include <rtems.h>
 #include "../include/mpc5200.h"
 #include <bsp.h>
<font color='#997700'>@@ -233,12 +235,12 @@
</font>  /*
   * Set upper timer counter
   */
<font color='#880000'>-  psc->ctur = (uint16_t)(baud >> 16);
</font><font color='#000088'>+  psc->ctur = (uint8_t) (baud >> 8);
</font> 
  /*
   * Set lower timer counter
   */
<font color='#880000'>-  psc->ctlr = (uint16_t)(baud & 0x0000FFFF);
</font><font color='#000088'>+  psc->ctlr = (uint8_t) baud;
</font> 
  /*
   * Reset mode pointer
<font color='#997700'>@@ -499,10 +501,7 @@
</font>   /*
    * Install rtems irq handler
    */
<font color='#880000'>-  if (!BSP_install_rtems_irq_handler (&consoleIrqData)) {
-    printk("Unable to connect PSC Irq handler\n");
-    rtems_fatal_error_occurred(1);
-  }
</font><font color='#000088'>+  assert(BSP_install_rtems_irq_handler(&consoleIrqData) == 1);
</font> #endif
 
   /*
<font color='#997700'>@@ -675,6 +674,7 @@
</font>   rtems_device_minor_number console_minor;
   char dev_name[] = "/dev/ttyx";
   uint32_t tty_num = 0;
<font color='#000088'>+  bool first = true;
</font> 
   /*
    * Always use and set up TERMIOS
<font color='#997700'>@@ -695,20 +695,27 @@
</font>       mpc5200_uart_psc_initialize(console_minor); /* /dev/tty0 */
       dev_name[8] = '0' + tty_num;
       status = rtems_io_register_name (dev_name, major, console_minor);
<font color='#000088'>+      assert(status == RTEMS_SUCCESSFUL);
+
+      #ifdef MPC5200_PSC_INDEX_FOR_GPS_MODULE
+        if (console_minor == MPC5200_PSC_INDEX_FOR_GPS_MODULE) {
+          status = rtems_io_register_name("/dev/gps", major, console_minor);
+          assert(status == RTEMS_SUCCESSFUL);
+        }
+      #endif
</font> 
<font color='#880000'>-      if (status != RTEMS_SUCCESSFUL)
-        rtems_fatal_error_occurred(status);
</font><font color='#000088'>+      if (first) {
+        first = false;
+
+        /* Now register the RTEMS console */
+        status = rtems_io_register_name ("/dev/console", major, console_minor);
+        assert(status == RTEMS_SUCCESSFUL);
+      }
</font> 
       tty_num++;
     }
   }
 
<font color='#880000'>-  /* Now register the RTEMS console */
-  status = rtems_io_register_name ("/dev/console", major, PSC1_MINOR);
-
-  if(status != RTEMS_SUCCESSFUL)
-    rtems_fatal_error_occurred (status);
-
</font>   console_initialized = true;
   return RTEMS_SUCCESSFUL;
 }

<font color='#006600'>diff -u rtems/c/src/lib/libbsp/powerpc/gen5200/ide/pcmcia_ide.h:1.5 rtems/c/src/lib/libbsp/powerpc/gen5200/ide/pcmcia_ide.h:1.6
--- rtems/c/src/lib/libbsp/powerpc/gen5200/ide/pcmcia_ide.h:1.5 Mon Oct 16 21:40:57 2006
+++ rtems/c/src/lib/libbsp/powerpc/gen5200/ide/pcmcia_ide.h     Mon Nov 15 04:55:02 2010
</font><font color='#997700'>@@ -80,11 +80,7 @@
</font> #define ATA_HCFG_IORDY                               (1 << 24)
 #define ATA_HCFG_IE                                  (1 << 25)
 
<font color='#880000'>-#if 0
-#define COUNT_VAL(nsec)                              (((nsec)%(IPB_CLOCK/1000000)) ? (((nsec)/(IPB_CLOCK/1000000)) + 1) : ((nsec)/(IPB_CLOCK/1000000)))
-#else
-#define COUNT_VAL(nsec)                              (((nsec)*(IPB_CLOCK/1000000)/1000) + 1)
-#endif
</font><font color='#000088'>+#define COUNT_VAL(nsec)                              (((nsec) * (IPB_CLOCK / 1000000) + 999) / 1000)
</font> 
 #define PIO_3                                        0
 #define PIO_4                                        1

<font color='#006600'>diff -u rtems/c/src/lib/libbsp/powerpc/gen5200/ide/pcmcia_ide.c:1.12 rtems/c/src/lib/libbsp/powerpc/gen5200/ide/pcmcia_ide.c:1.13
--- rtems/c/src/lib/libbsp/powerpc/gen5200/ide/pcmcia_ide.c:1.12        Sun Nov 29 09:27:07 2009
+++ rtems/c/src/lib/libbsp/powerpc/gen5200/ide/pcmcia_ide.c     Mon Nov 15 04:55:02 2010
</font><font color='#997700'>@@ -122,8 +122,8 @@
</font> #include "../bestcomm/task_api/bestcomm_cntrl.h"
 #include "../bestcomm/task_api/tasksetup_bdtable.h"
 
<font color='#880000'>-#define IDE_RECV_TASK_NO            TASK_GEN_DP_BD_0
-#define TASK_GEN_DP_BD_1            TASK_GEN_DP_BD_1
</font><font color='#000088'>+#define IDE_RX_TASK_NO TASK_GEN_DP_BD_0
+#define IDE_TX_TASK_NO TASK_GEN_DP_BD_1
</font> static TaskId pcmcia_ide_rxTaskId;        /* SDMA RX task ID */
 static TaskId pcmcia_ide_txTaskId;     /* SDMA TX task ID */
 #define PCMCIA_IDE_RD_SECTOR_SIZE 512   /* FIXME: make this better... */
<font color='#997700'>@@ -152,6 +152,20 @@
</font>   bool ide_card_plugged = false; /* assume: we don't have a card plugged in */
   struct mpc5200_gpt *gpt = (struct mpc5200_gpt *)(&mpc5200.gpt[GPT2]);
 
<font color='#000088'>+  #ifdef BSP_TYPE_DP2
+    /* Deactivate RESET signal */
+    rtems_interrupt_level level;
+    rtems_interrupt_disable(level);
+    mpc5200.gpiowe |= GPIO_W_PIN_PSC1_4;
+    mpc5200.gpiowod &= ~GPIO_W_PIN_PSC1_4;
+    mpc5200.gpiowdd |= GPIO_W_PIN_PSC1_4;
+    mpc5200.gpiowdo |= GPIO_W_PIN_PSC1_4;
+    rtems_interrupt_enable(level);
+    /* FIXME */
+    volatile int i = 0;
+    while (++i < 20000000);
+  #endif
+
</font>   /* enable card detection on GPT2 */
   gpt->emsel = (GPT_EMSEL_GPIO_IN | GPT_EMSEL_TIMER_MS_GPIO);
 
<font color='#997700'>@@ -167,6 +181,14 @@
</font> 
   }
 
<font color='#000088'>+#define DMA1_T0(val) BSP_BFLD32(COUNT_VAL(val), 0, 7)
+#define DMA1_TD(val) BSP_BFLD32(COUNT_VAL(val), 8, 15)
+#define DMA1_TK(val) BSP_BFLD32(COUNT_VAL(val), 16, 23)
+#define DMA1_TM(val) BSP_BFLD32(COUNT_VAL(val), 24, 31)
+
+#define DMA2_TH(val) BSP_BFLD32(COUNT_VAL(val), 0, 7)
+#define DMA2_TJ(val) BSP_BFLD32(COUNT_VAL(val), 8, 15)
+#define DMA2_TN(val) BSP_BFLD32(COUNT_VAL(val), 16, 23)
</font> 
 rtems_status_code mpc5200_pcmciaide_config_io_speed(int minor, uint16_t modes_avail)
   {
<font color='#997700'>@@ -199,6 +221,9 @@
</font>   mpc5200.ata_pio1 = ATA_PIO_TIMING_1(pio_t0, pio_t2_8, pio_t2_16);
   mpc5200.ata_pio2 = ATA_PIO_TIMING_2(pio_t4, pio_t1, pio_ta);
 
<font color='#000088'>+  mpc5200.ata_dma1 = DMA1_T0(120) | DMA1_TD(70) | DMA1_TK(25) | DMA1_TM(25);
+  mpc5200.ata_dma2 = DMA2_TH(10) | DMA2_TJ(5) | DMA2_TN(10);
+
</font>   return RTEMS_SUCCESSFUL;
 
   }
<font color='#997700'>@@ -237,10 +262,10 @@
</font>  */
 static void pcmcia_ide_recv_dmairq_hdl(rtems_irq_hdl_param unused)
 {
<font color='#880000'>-  SDMA_CLEAR_IEVENT(&mpc5200.IntPend,TASK_GEN_DP_BD_0);
</font><font color='#000088'>+  SDMA_CLEAR_IEVENT(&mpc5200.sdma.IntPend,IDE_RX_TASK_NO);
</font> 
 /*Disable receive ints*/
<font color='#880000'>-  bestcomm_glue_irq_disable(TASK_GEN_DP_BD_0);
</font><font color='#000088'>+  bestcomm_glue_irq_disable(IDE_RX_TASK_NO);
</font> 
   pcmcia_ide_rxInterrupts++;<span style="background-color: #FF0000"> </span>             /* Rx int has occurred */
 
<font color='#997700'>@@ -252,10 +277,10 @@
</font> static void pcmcia_ide_xmit_dmairq_hdl(rtems_irq_hdl_param unused)
 {
 
<font color='#880000'>-  SDMA_CLEAR_IEVENT(&mpc5200.IntPend,TASK_GEN_DP_BD_1);
</font><font color='#000088'>+  SDMA_CLEAR_IEVENT(&mpc5200.sdma.IntPend,IDE_TX_TASK_NO);
</font> 
   /*Disable transmit ints*/
<font color='#880000'>-  bestcomm_glue_irq_disable(TASK_GEN_DP_BD_1);
</font><font color='#000088'>+  bestcomm_glue_irq_disable(IDE_TX_TASK_NO);
</font> 
   pcmcia_ide_txInterrupts++;<span style="background-color: #FF0000"> </span>             /* Tx int has occurred */
 
<font color='#997700'>@@ -287,7 +312,7 @@
</font>   rxParam.IncrDst      = sizeof(uint16_t);
   rxParam.SzDst               = sizeof(uint16_t);  /* XXX: set this to 32 bit? */
 
<font color='#880000'>-  pcmcia_ide_rxTaskId  = TaskSetup(TASK_GEN_DP_BD_0,&rxParam );
</font><font color='#000088'>+  pcmcia_ide_rxTaskId  = TaskSetup(IDE_RX_TASK_NO,&rxParam );
</font> 
   /*
    * Setup the TX task.
<font color='#997700'>@@ -303,7 +328,7 @@
</font>   txParam.IncrDst      = 0;
   txParam.SzDst        = sizeof(uint16_t);
 
<font color='#880000'>-  pcmcia_ide_txTaskId  = TaskSetup( TASK_GEN_DP_BD_1, &txParam );
</font><font color='#000088'>+  pcmcia_ide_txTaskId  = TaskSetup( IDE_TX_TASK_NO, &txParam );
</font>   /*
    * FIXME: Init BD rings
    */
<font color='#997700'>@@ -314,9 +339,10 @@
</font>   /*
    * connect interrupt handlers
    */
<font color='#880000'>-  bestcomm_glue_irq_install(TASK_GEN_DP_BD_1,pcmcia_ide_xmit_dmairq_hdl,NULL);
-  bestcomm_glue_irq_install(TASK_GEN_DP_BD_0,pcmcia_ide_recv_dmairq_hdl,NULL);
</font><font color='#000088'>+  bestcomm_glue_irq_install(IDE_TX_TASK_NO,pcmcia_ide_xmit_dmairq_hdl,NULL);
+  bestcomm_glue_irq_install(IDE_RX_TASK_NO,pcmcia_ide_recv_dmairq_hdl,NULL);
</font> }
<font color='#000088'>+#endif /* IDE_USE_DMA */
</font> 
 void mpc5200_pcmciaide_dma_blockop(bool is_write,
                                   int minor,
<font color='#997700'>@@ -326,6 +352,7 @@
</font>                              uint32_t *pos)
 
 {
<font color='#000088'>+#if IDE_USE_DMA
</font>   /*
    * Nameing:
    * - a block is one unit of data on disk (multiple sectors)
<font color='#997700'>@@ -367,9 +394,9 @@
</font>       /*
        * fill in BD, set interrupt if needed
        */
<font color='#880000'>-    SDMA_CLEAR_IEVENT(&mpc5200.IntPend,(is_write
-                                         ? TASK_GEN_DP_BD_1
-                                         : TASK_GEN_DP_BD_0));
</font><font color='#000088'>+    SDMA_CLEAR_IEVENT(&mpc5200.sdma.IntPend,(is_write
+                                         ? IDE_TX_TASK_NO
+                                         : IDE_RX_TASK_NO));
</font>       if (is_write) {
        TaskBDAssign(pcmcia_ide_txTaskId ,
                     (void *)bufs[bufs_to_dma].buffer,
<font color='#997700'>@@ -406,10 +433,10 @@
</font>       /*
        * enable interrupts, wait for interrupt event
        */
<font color='#880000'>-      rtems_task_ident(RTEMS_SELF,0,(rtems_id *)&pcmcia_ide_hdl_task);
</font><font color='#000088'>+      pcmcia_ide_hdl_task = rtems_task_self();
</font>       bestcomm_glue_irq_enable((is_write
<font color='#880000'>-                           ? TASK_GEN_DP_BD_1
-                               : TASK_GEN_DP_BD_0));
</font><font color='#000088'>+                              ? IDE_TX_TASK_NO
+                               : IDE_RX_TASK_NO));
</font> 
       rtems_event_receive(PCMCIA_IDE_INTERRUPT_EVENT,
                          RTEMS_WAIT | RTEMS_EVENT_ANY,
<font color='#997700'>@@ -442,8 +469,8 @@
</font>              (nxt_bd_idx != TASK_ERR_BD_BUSY)       &&
                 (bufs_from_dma < bufs_to_dma));
   }
<font color='#880000'>-}
</font> #endif /* IDE_USE_DMA */
<font color='#000088'>+}
</font> 
 
 void mpc5200_pcmciaide_read_block(int minor, uint32_t block_size, rtems_blkdev_sg_buffer *bufs,
<font color='#997700'>@@ -521,18 +548,6 @@
</font>       }
     }
 #endif
<font color='#880000'>-    while (cnt < block_size) {
-      *lbuf++ = 0; /* fill buffer with dummy data */
-      cnt += 2;
-      (*pos) += 2;
-
-      if((*pos) == llength) {
-       (*pos) = 0;
-       (*cbuf)++;
-       lbuf = bufs[(*cbuf)].buffer;
-       llength = bufs[(*cbuf)].length;
-      }
-    }
</font>   }
 }
 

<font color='#006600'>diff -u rtems/c/src/lib/libbsp/powerpc/gen5200/include/bsp.h:1.24 rtems/c/src/lib/libbsp/powerpc/gen5200/include/bsp.h:1.25
--- rtems/c/src/lib/libbsp/powerpc/gen5200/include/bsp.h:1.24   Thu Mar 25 15:26:51 2010
+++ rtems/c/src/lib/libbsp/powerpc/gen5200/include/bsp.h        Mon Nov 15 04:55:02 2010
</font><font color='#997700'>@@ -96,6 +96,8 @@
</font>  *     Embedded Planet EP5200
  */
 
<font color='#000088'>+#elif defined (BSP_TYPE_DP2)
+
</font> #else
 #error "board type not defined"
 #endif
<font color='#997700'>@@ -165,14 +167,6 @@
</font> 
 /* functions */
 
<font color='#880000'>-/* console modes (only termios) */
-#ifdef  PRINTK_MINOR
-#undef  PRINTK_MINOR
-#endif
-#define PRINTK_MINOR PSC1_MINOR
-
-#define SINGLE_CHAR_MODE
-/* #define UARTS_USE_TERMIOS_INT   1 */
</font> /* #define SHOW_MORE_INIT_SETTINGS 1 */
 
 /* ata modes */

<font color='#006600'>diff -u rtems/c/src/lib/libbsp/powerpc/gen5200/include/mpc5200.h:1.10 rtems/c/src/lib/libbsp/powerpc/gen5200/include/mpc5200.h:1.11
--- rtems/c/src/lib/libbsp/powerpc/gen5200/include/mpc5200.h:1.10       Fri Apr 30 07:45:13 2010
+++ rtems/c/src/lib/libbsp/powerpc/gen5200/include/mpc5200.h    Mon Nov 15 04:55:02 2010
</font><font color='#997700'>@@ -26,32 +26,9 @@
</font> /* Additional Harpo Core SPR definitions (603le only) */
 #define CSRR0    58   /* Critical Interrupt SRR0 */
 #define CSRR1    59   /* Critical Interrupt SRR1 */
<font color='#880000'>-#define SPRG4   276   /* Special Purpose Register 4 */
-#define SPRG5   277   /* Special Purpose Register 5 */
-#define SPRG6   278   /* Special Purpose Register 6 */
-#define SPRG7   279   /* Special Purpose Register 7 */
-#define IBAT4U  560   /* Instruction BAT #0 Upper/Lower */
-#define IBAT4L  561
-#define IBAT5U  562   /* Instruction BAT #1 Upper/Lower */
-#define IBAT5L  563
-#define IBAT6U  564   /* Instruction BAT #2 Upper/Lower */
-#define IBAT6L  565
-#define IBAT7U  566   /* Instruction BAT #3 Upper/Lower */
-#define IBAT7L  567
-#define DBAT4U  568   /* Data BAT #0 Upper/Lower */
-#define DBAT4L  569
-#define DBAT5U  570   /* Data BAT #1 Upper/Lower */
-#define DBAT5L  571
-#define DBAT6U  572   /* Data BAT #2 Upper/Lower */
-#define DBAT6L  573
-#define DBAT7U  574   /* Data BAT #3 Upper/Lower */
-#define DBAT7L  575
</font> #define DABR2  1000   /* Data Address Breakpoint #2 */
 #define DBCR   1001   /* Data Address Breakpoint Control */
 #define IBCR   1002   /* Instruction Breakpoint Control */
<font color='#880000'>-#define HID1   1009   /* Hardware Implementation 1 */
-#define HID2   1011   /* Hardware Implementation 2 */
-#define DABR   1013   /* Data Address Breakpoint */
</font> #define IABR2  1018   /* Instruction Breakpoint #2 */
 
 /*
<font color='#997700'>@@ -68,8 +45,7 @@
</font> #ifndef ASM
 #include <rtems.h>
 
<font color='#880000'>-/* You can directly use the bit value from the MPC5200B User's Manual */
-#define MPC5200_BIT32(bit) (((uint32_t) 1) << (31 - (bit)))
</font><font color='#000088'>+#include <bsp/utility.h>
</font> 
 #ifdef __cplusplus
 extern "C" {
<font color='#997700'>@@ -232,6 +208,177 @@
</font> #define FEC_FIFO_CNTRL_OF_MASK  0x00080000 /* overflow mask */
 /*                              0x0007ffff    reserved */
 
<font color='#000088'>+#define SDMA_TCR_EN BSP_BBIT16(0)
+#define SDMA_TCR_VAL BSP_BBIT16(1)
+#define SDMA_TCR_ALW_INIT BSP_BBIT16(2)
+#define SDMA_TCR_IN(val) BSP_BFLD16(val, 3, 7)
+#define SDMA_TCR_AUTO_START BSP_BBIT16(8)
+#define SDMA_TCR_HIGH_EN BSP_BBIT16(9)
+#define SDMA_TCR_HOLD BSP_BBIT16(10)
+#define SDMA_TCR_AS(val) BSP_BFLD16(val, 12, 15)
+
+#define SDMA_IPR_HOLD BSP_BBIT8(0)
+#define SDMA_IPR_PRIOR(val) BSP_BFLD8(val, 5, 7)
+
+#define SDMA_REQMUX_SET_31(reg, val) BSP_BFLD32SET(reg, val, 0, 1)
+#define SDMA_REQMUX_SET_30(reg, val) BSP_BFLD32SET(reg, val, 2, 3)
+#define SDMA_REQMUX_SET_29(reg, val) BSP_BFLD32SET(reg, val, 4, 5)
+#define SDMA_REQMUX_SET_28(reg, val) BSP_BFLD32SET(reg, val, 6, 7)
+#define SDMA_REQMUX_SET_27(reg, val) BSP_BFLD32SET(reg, val, 8, 9)
+#define SDMA_REQMUX_SET_26(reg, val) BSP_BFLD32SET(reg, val, 10, 11)
+#define SDMA_REQMUX_SET_25(reg, val) BSP_BFLD32SET(reg, val, 12, 13)
+#define SDMA_REQMUX_SET_24(reg, val) BSP_BFLD32SET(reg, val, 14, 15)
+#define SDMA_REQMUX_SET_23(reg, val) BSP_BFLD32SET(reg, val, 16, 17)
+#define SDMA_REQMUX_SET_22(reg, val) BSP_BFLD32SET(reg, val, 18, 19)
+#define SDMA_REQMUX_SET_21(reg, val) BSP_BFLD32SET(reg, val, 20, 21)
+#define SDMA_REQMUX_SET_20(reg, val) BSP_BFLD32SET(reg, val, 22, 23)
+#define SDMA_REQMUX_SET_19(reg, val) BSP_BFLD32SET(reg, val, 24, 25)
+#define SDMA_REQMUX_SET_18(reg, val) BSP_BFLD32SET(reg, val, 26, 27)
+#define SDMA_REQMUX_SET_17(reg, val) BSP_BFLD32SET(reg, val, 28, 29)
+#define SDMA_REQMUX_SET_16(reg, val) BSP_BFLD32SET(reg, val, 30, 31)
+
+/* SDMA / BestComm */
+typedef struct {
+  uint32_t taskBar;
+  uint32_t currentPointer;
+  uint32_t endPointer;
+  uint32_t variablePointer;
+  uint8_t IntVect1;
+  uint8_t IntVect2;
+  uint16_t PtdCntrl;
+  uint32_t IntPend;
+  uint32_t IntMask;
+  uint16_t tcr [16];
+  uint8_t ipr [32];
+  uint32_t cReqSelect;
+  uint32_t task_size0;
+  uint32_t task_size1;
+  uint32_t reserved_0;
+  uint32_t reserved_1;
+  uint32_t Value1;
+  uint32_t Value2;
+  uint32_t Control;
+  uint32_t Status;
+} mpc5200_sdma;
+
+typedef struct {
+#define CSC_CFG_WAITP(val) BSP_BFLD32(val, 0, 7)
+#define CSC_CFG_WAITX(val) BSP_BFLD32(val, 8, 15)
+#define CSC_CFG_MX BSP_BBIT32(16)
+#define CSC_CFG_AA BSP_BBIT32(18)
+#define CSC_CFG_CE BSP_BBIT32(19)
+#define CSC_CFG_AS(val) BSP_BFLD32(val, 20, 21)
+#define CSC_CFG_DS(val) BSP_BFLD32(val, 22, 23)
+#define CSC_CFG_BANK(val) BSP_BFLD32(val, 24, 25)
+#define CSC_CFG_WTYP(val) BSP_BFLD32(val, 26, 27)
+#define CSC_CFG_WS BSP_BBIT32(28)
+#define CSC_CFG_RS BSP_BBIT32(29)
+#define CSC_CFG_WO BSP_BBIT32(30)
+#define CSC_CFG_RO BSP_BBIT32(31)
+  uint32_t config_0;
+  uint32_t config_1;
+  uint32_t config_2;
+  uint32_t config_3;
+  uint32_t config_4;
+  uint32_t config_5;
+
+#define CSC_CTRL_ME BSP_BBIT32(7)
+  uint32_t control;
+
+#define CSC_STAT_WOERR BSP_BBIT32(2)
+#define CSC_STAT_ROERR BSP_BBIT32(3)
+#define CSC_STAT_GET_CSXERR(reg) BSP_BFLD32GET(reg, 5, 7)
+  uint32_t status;
+
+  uint32_t config_6;
+  uint32_t config_7;
+
+#define CSC_BST_CTRL_CW7 BSP_BBIT32(0)
+#define CSC_BST_CTRL_SLB7 BSP_BBIT32(1)
+#define CSC_BST_CTRL_BRE7 BSP_BBIT32(3)
+#define CSC_BST_CTRL_CW6 BSP_BBIT32(4)
+#define CSC_BST_CTRL_SLB6 BSP_BBIT32(5)
+#define CSC_BST_CTRL_BRE6 BSP_BBIT32(7)
+#define CSC_BST_CTRL_CW5 BSP_BBIT32(8)
+#define CSC_BST_CTRL_SLB5 BSP_BBIT32(9)
+#define CSC_BST_CTRL_BRE5 BSP_BBIT32(11)
+#define CSC_BST_CTRL_CW4 BSP_BBIT32(12)
+#define CSC_BST_CTRL_SLB4 BSP_BBIT32(13)
+#define CSC_BST_CTRL_BRE4 BSP_BBIT32(15)
+#define CSC_BST_CTRL_CW3 BSP_BBIT32(16)
+#define CSC_BST_CTRL_SLB3 BSP_BBIT32(17)
+#define CSC_BST_CTRL_BRE3 BSP_BBIT32(19)
+#define CSC_BST_CTRL_CW2 BSP_BBIT32(20)
+#define CSC_BST_CTRL_SLB2 BSP_BBIT32(21)
+#define CSC_BST_CTRL_BRE2 BSP_BBIT32(23)
+#define CSC_BST_CTRL_CW1 BSP_BBIT32(24)
+#define CSC_BST_CTRL_SLB1 BSP_BBIT32(25)
+#define CSC_BST_CTRL_BRE1 BSP_BBIT32(27)
+#define CSC_BST_CTRL_CW0 BSP_BBIT32(28)
+#define CSC_BST_CTRL_SLB0 BSP_BBIT32(29)
+#define CSC_BST_CTRL_BRE0 BSP_BBIT32(31)
+  uint32_t burst_control;
+
+#define CSC_DCYC_CTRL_DC7(val) BSP_BFLD32(val, 2, 3)
+#define CSC_DCYC_CTRL_SET_DC7(reg, val) BSP_BFLD32SET(reg, val, 2, 3)
+#define CSC_DCYC_CTRL_DC6(val) BSP_BFLD32(val, 6, 7)
+#define CSC_DCYC_CTRL_SET_DC6(reg, val) BSP_BFLD32SET(reg, val, 6, 7)
+#define CSC_DCYC_CTRL_DC5(val) BSP_BFLD32(val, 10, 11)
+#define CSC_DCYC_CTRL_SET_DC5(reg, val) BSP_BFLD32SET(reg, val, 10, 11)
+#define CSC_DCYC_CTRL_DC4(val) BSP_BFLD32(val, 14, 15)
+#define CSC_DCYC_CTRL_SET_DC4(reg, val) BSP_BFLD32SET(reg, val, 14, 15)
+#define CSC_DCYC_CTRL_DC3(val) BSP_BFLD32(val, 18, 19)
+#define CSC_DCYC_CTRL_SET_DC3(reg, val) BSP_BFLD32SET(reg, val, 18, 19)
+#define CSC_DCYC_CTRL_DC2(val) BSP_BFLD32(val, 22, 23)
+#define CSC_DCYC_CTRL_SET_DC2(reg, val) BSP_BFLD32SET(reg, val, 22, 23)
+#define CSC_DCYC_CTRL_DC1(val) BSP_BFLD32(val, 26, 27)
+#define CSC_DCYC_CTRL_SET_DC1(reg, val) BSP_BFLD32SET(reg, val, 26, 27)
+#define CSC_DCYC_CTRL_DC0(val) BSP_BFLD32(val, 30, 31)
+#define CSC_DCYC_CTRL_SET_DC0(reg, val) BSP_BFLD32SET(reg, val, 30, 31)
+  uint32_t deadcycle_control;
+
+  uint8_t reserved [208];
+} mpc5200_csc;
+
+typedef struct {
+  uint32_t memory_address_base;
+  uint32_t cs0_start_address;
+  uint32_t cs0_stop_address;
+  uint32_t cs1_start_address;
+  uint32_t cs1_stop_address;
+  uint32_t cs2_start_address;
+  uint32_t cs2_stop_address;
+  uint32_t cs3_start_address;
+  uint32_t cs3_stop_address;
+  uint32_t cs4_start_address;
+  uint32_t cs4_stop_address;
+  uint32_t cs5_start_address;
+  uint32_t cs5_stop_address;
+  uint32_t sdram_chip_select_0;
+  uint32_t sdram_chip_select_1;
+  uint8_t reserved_0 [16];
+  uint32_t boot_start_address;
+  uint32_t boot_stop_address;
+
+#define MM_IPBI_CTRL_CS7ENA BSP_BBIT16(4)
+#define MM_IPBI_CTRL_CS6ENA BSP_BBIT16(5)
+#define MM_IPBI_CTRL_BOOTENA BSP_BBIT16(6)
+#define MM_IPBI_CTRL_CS5ENA BSP_BBIT16(10)
+#define MM_IPBI_CTRL_CS4ENA BSP_BBIT16(11)
+#define MM_IPBI_CTRL_CS3ENA BSP_BBIT16(12)
+#define MM_IPBI_CTRL_CS2ENA BSP_BBIT16(13)
+#define MM_IPBI_CTRL_CS1ENA BSP_BBIT16(14)
+#define MM_IPBI_CTRL_CS0ENA BSP_BBIT16(15)
+  uint16_t ipbi_control;
+
+  uint16_t wait_state_enable;
+  uint32_t cs6_start_address;
+  uint32_t cs6_stop_address;
+  uint32_t cs7_start_address;
+  uint32_t cs7_stop_address;
+  uint8_t reserved_1 [152];
+} mpc5200_mm;
+
</font> /*
 *************************************************************************
 *                 MPC5x00 internal register memory map                  *
<font color='#997700'>@@ -241,12 +388,7 @@
</font>   /*
    * memory map registers (MBAR + 0)
    */
<font color='#880000'>-  volatile uint8_t    mm[0x80];
-
-  /*
-   * arbiter registers (processor bus) (MBAR + 0x80)
-   */
-  volatile uint8_t    arb[0x80];
</font><font color='#000088'>+  volatile mpc5200_mm mm;
</font> 
   /*
    * SDRAM memory controller registers (MBAR + 0x100)
<font color='#997700'>@@ -261,7 +403,7 @@
</font>   /*
    * chip selct controller registers(MBAR + 0x300)
    */
<font color='#880000'>-  volatile uint8_t    csc[0x100];
</font><font color='#000088'>+  volatile mpc5200_csc csc;
</font> 
   /*
    * SmartComm timer registers (MBAR + 0x400)
<font color='#997700'>@@ -275,6 +417,26 @@
</font>   volatile uint32_t    per_pri_1;         /* + 0x04 */
   volatile uint32_t    per_pri_2;         /* + 0x08 */
   volatile uint32_t    per_pri_3;         /* + 0x0C */
<font color='#000088'>+
+#define ICTL_EET_ECLR0 BSP_BBIT32(4)
+#define ICTL_EET_ECLR1 BSP_BBIT32(5)
+#define ICTL_EET_ECLR2 BSP_BBIT32(6)
+#define ICTL_EET_ECLR3 BSP_BBIT32(7)
+#define ICTL_EET_ETYPE0(val) BSP_BFLD32(val, 8, 9)
+#define ICTL_EET_ETYPE1(val) BSP_BFLD32(val, 10, 11)
+#define ICTL_EET_ETYPE2(val) BSP_BFLD32(val, 12, 13)
+#define ICTL_EET_ETYPE3(val) BSP_BFLD32(val, 14, 15)
+#define ICTL_EET_SET_ETYPE0(reg, val) BSP_BFLD32SET(reg, val, 8, 9)
+#define ICTL_EET_SET_ETYPE1(reg, val) BSP_BFLD32SET(reg, val, 10, 11)
+#define ICTL_EET_SET_ETYPE2(reg, val) BSP_BFLD32SET(reg, val, 12, 13)
+#define ICTL_EET_SET_ETYPE3(reg, val) BSP_BFLD32SET(reg, val, 14, 15)
+#define ICTL_EET_MEE BSP_BBIT32(19)
+#define ICTL_EET_EENA0 BSP_BBIT32(20)
+#define ICTL_EET_EENA1 BSP_BBIT32(21)
+#define ICTL_EET_EENA2 BSP_BBIT32(22)
+#define ICTL_EET_EENA3 BSP_BBIT32(23)
+#define ICTL_EET_CEB BSP_BBIT32(31)
+
</font>   volatile uint32_t    ext_en_type;       /* + 0x10 */
   volatile uint32_t    crit_pri_main_mask;/* + 0x14 */
   volatile uint32_t    main_pri_1;        /* + 0x18 */
<font color='#997700'>@@ -499,30 +661,30 @@
</font>   #define GPIO_PCR_PSC2                   0x00000070
   #define GPIO_PCR_PSC1                   0x00000007
 
<font color='#880000'>-  #define GPIO_S_PIN_IR_USB_CLK MPC5200_BIT32(2)
-  #define GPIO_S_PIN_IRDA_TX MPC5200_BIT32(3)
-  #define GPIO_S_PIN_ETH_11 MPC5200_BIT32(4)
-  #define GPIO_S_PIN_ETH_10 MPC5200_BIT32(5)
-  #define GPIO_S_PIN_ETH_9 MPC5200_BIT32(6)
-  #define GPIO_S_PIN_ETH_8 MPC5200_BIT32(7)
-  #define GPIO_S_PIN_USB1_8 MPC5200_BIT32(12)
-  #define GPIO_S_PIN_USB1_7 MPC5200_BIT32(13)
-  #define GPIO_S_PIN_USB1_6 MPC5200_BIT32(14)
-  #define GPIO_S_PIN_USB1_0 MPC5200_BIT32(15)
-  #define GPIO_S_PIN_PSC3_7 MPC5200_BIT32(18)
-  #define GPIO_S_PIN_PSC3_6 MPC5200_BIT32(19)
-  #define GPIO_S_PIN_PSC3_3 MPC5200_BIT32(20)
-  #define GPIO_S_PIN_PSC3_2 MPC5200_BIT32(21)
-  #define GPIO_S_PIN_PSC3_1 MPC5200_BIT32(22)
-  #define GPIO_S_PIN_PSC3_0 MPC5200_BIT32(23)
-  #define GPIO_S_PIN_PSC2_3 MPC5200_BIT32(24)
-  #define GPIO_S_PIN_PSC2_2 MPC5200_BIT32(25)
-  #define GPIO_S_PIN_PSC2_1 MPC5200_BIT32(26)
-  #define GPIO_S_PIN_PSC2_0 MPC5200_BIT32(27)
-  #define GPIO_S_PIN_PSC1_3 MPC5200_BIT32(28)
-  #define GPIO_S_PIN_PSC1_2 MPC5200_BIT32(29)
-  #define GPIO_S_PIN_PSC1_1 MPC5200_BIT32(30)
-  #define GPIO_S_PIN_PSC1_0 MPC5200_BIT32(31)
</font><font color='#000088'>+  #define GPIO_S_PIN_IR_USB_CLK BSP_BBIT32(2)
+  #define GPIO_S_PIN_IRDA_TX BSP_BBIT32(3)
+  #define GPIO_S_PIN_ETH_11 BSP_BBIT32(4)
+  #define GPIO_S_PIN_ETH_10 BSP_BBIT32(5)
+  #define GPIO_S_PIN_ETH_9 BSP_BBIT32(6)
+  #define GPIO_S_PIN_ETH_8 BSP_BBIT32(7)
+  #define GPIO_S_PIN_USB1_8 BSP_BBIT32(12)
+  #define GPIO_S_PIN_USB1_7 BSP_BBIT32(13)
+  #define GPIO_S_PIN_USB1_6 BSP_BBIT32(14)
+  #define GPIO_S_PIN_USB1_0 BSP_BBIT32(15)
+  #define GPIO_S_PIN_PSC3_7 BSP_BBIT32(18)
+  #define GPIO_S_PIN_PSC3_6 BSP_BBIT32(19)
+  #define GPIO_S_PIN_PSC3_3 BSP_BBIT32(20)
+  #define GPIO_S_PIN_PSC3_2 BSP_BBIT32(21)
+  #define GPIO_S_PIN_PSC3_1 BSP_BBIT32(22)
+  #define GPIO_S_PIN_PSC3_0 BSP_BBIT32(23)
+  #define GPIO_S_PIN_PSC2_3 BSP_BBIT32(24)
+  #define GPIO_S_PIN_PSC2_2 BSP_BBIT32(25)
+  #define GPIO_S_PIN_PSC2_1 BSP_BBIT32(26)
+  #define GPIO_S_PIN_PSC2_0 BSP_BBIT32(27)
+  #define GPIO_S_PIN_PSC1_3 BSP_BBIT32(28)
+  #define GPIO_S_PIN_PSC1_2 BSP_BBIT32(29)
+  #define GPIO_S_PIN_PSC1_1 BSP_BBIT32(30)
+  #define GPIO_S_PIN_PSC1_0 BSP_BBIT32(31)
</font> 
   volatile uint32_t gpiosen;      /* + 0x04 */
   volatile uint32_t gpiosod;      /* + 0x08 */
<font color='#997700'>@@ -530,29 +692,29 @@
</font>   volatile uint32_t gpiosdo;      /* + 0x10 */
   volatile uint32_t gpiosdi;      /* + 0x14 */
 
<font color='#880000'>-  #define GPIO_O_PIN_ETH_7 MPC5200_BIT32(0)
-  #define GPIO_O_PIN_ETH_6 MPC5200_BIT32(1)
-  #define GPIO_O_PIN_ETH_5 MPC5200_BIT32(2)
-  #define GPIO_O_PIN_ETH_4 MPC5200_BIT32(3)
-  #define GPIO_O_PIN_ETH_3 MPC5200_BIT32(4)
-  #define GPIO_O_PIN_ETH_2 MPC5200_BIT32(5)
-  #define GPIO_O_PIN_ETH_1 MPC5200_BIT32(6)
-  #define GPIO_O_PIN_ETH_0 MPC5200_BIT32(7)
-  #define GPIO_O_PIN_I2C_3 MPC5200_BIT32(13)
-  #define GPIO_O_PIN_I2C_0 MPC5200_BIT32(14)
-  #define GPIO_O_PIN_I2C_1 MPC5200_BIT32(15)
</font><font color='#000088'>+  #define GPIO_O_PIN_ETH_7 BSP_BBIT32(0)
+  #define GPIO_O_PIN_ETH_6 BSP_BBIT32(1)
+  #define GPIO_O_PIN_ETH_5 BSP_BBIT32(2)
+  #define GPIO_O_PIN_ETH_4 BSP_BBIT32(3)
+  #define GPIO_O_PIN_ETH_3 BSP_BBIT32(4)
+  #define GPIO_O_PIN_ETH_2 BSP_BBIT32(5)
+  #define GPIO_O_PIN_ETH_1 BSP_BBIT32(6)
+  #define GPIO_O_PIN_ETH_0 BSP_BBIT32(7)
+  #define GPIO_O_PIN_I2C_3 BSP_BBIT32(13)
+  #define GPIO_O_PIN_I2C_0 BSP_BBIT32(14)
+  #define GPIO_O_PIN_I2C_1 BSP_BBIT32(15)
</font> 
   volatile uint32_t gpiooe;     /* + 0x18 */
   volatile uint32_t gpioodo;      /* + 0x1C */
 
<font color='#880000'>-  #define GPIO_I_PIN_ETH_16 MPC5200_BIT32(0)
-  #define GPIO_I_PIN_ETH_15 MPC5200_BIT32(1)
-  #define GPIO_I_PIN_ETH_14 MPC5200_BIT32(2)
-  #define GPIO_I_PIN_ETH_13 MPC5200_BIT32(3)
-  #define GPIO_I_PIN_USB1_9 MPC5200_BIT32(4)
-  #define GPIO_I_PIN_PSC3_8 MPC5200_BIT32(5)
-  #define GPIO_I_PIN_PSC3_5 MPC5200_BIT32(6)
-  #define GPIO_I_PIN_PSC3_4 MPC5200_BIT32(7)
</font><font color='#000088'>+  #define GPIO_I_PIN_ETH_16 BSP_BBIT32(0)
+  #define GPIO_I_PIN_ETH_15 BSP_BBIT32(1)
+  #define GPIO_I_PIN_ETH_14 BSP_BBIT32(2)
+  #define GPIO_I_PIN_ETH_13 BSP_BBIT32(3)
+  #define GPIO_I_PIN_USB1_9 BSP_BBIT32(4)
+  #define GPIO_I_PIN_PSC3_8 BSP_BBIT32(5)
+  #define GPIO_I_PIN_PSC3_5 BSP_BBIT32(6)
+  #define GPIO_I_PIN_PSC3_4 BSP_BBIT32(7)
</font> 
   volatile uint32_t gpiosie;      /* + 0x20 */
   #define GPIO_SIE_SINT_7_ETH_16_PIN 0x80000000
<font color='#997700'>@@ -589,6 +751,15 @@
</font>   #define GPIO_SIIE_SINT_0_PSC3_4_PIN 0x01000000
 
   volatile uint32_t gpiosiit;     /* + 0x34 */
<font color='#000088'>+  #define GPIO_SIIT_SET_ETH_16_PIN(reg, val) BSP_BFLD32SET(reg, val, 0, 1)
+  #define GPIO_SIIT_SET_ETH_15_PIN(reg, val) BSP_BFLD32SET(reg, val, 2, 3)
+  #define GPIO_SIIT_SET_ETH_14_PIN(reg, val) BSP_BFLD32SET(reg, val, 4, 5)
+  #define GPIO_SIIT_SET_ETH_13_PIN(reg, val) BSP_BFLD32SET(reg, val, 6, 7)
+  #define GPIO_SIIT_SET_USB1_9_PIN(reg, val) BSP_BFLD32SET(reg, val, 8, 9)
+  #define GPIO_SIIT_SET_PSC3_8_PIN(reg, val) BSP_BFLD32SET(reg, val, 10, 11)
+  #define GPIO_SIIT_SET_PSC3_5_PIN(reg, val) BSP_BFLD32SET(reg, val, 12, 13)
+  #define GPIO_SIIT_SET_PSC3_4_PIN(reg, val) BSP_BFLD32SET(reg, val, 14, 15)
+
</font>   #define GPIO_SIIT_SINT_7_ETH_16_PIN_MASK 0xc0000000
   #define GPIO_SIIT_SINT_6_ETH_15_PIN_MASK 0x30000000
   #define GPIO_SIIT_SINT_5_ETH_14_PIN_MASK 0x0c000000
<font color='#997700'>@@ -641,14 +812,14 @@
</font>    * GPIO wakeup registers (MBAR + 0xC00)
    */
 
<font color='#880000'>-  #define GPIO_W_PIN_GPIO_WKUP_7 MPC5200_BIT32(0)
-  #define GPIO_W_PIN_GPIO_WKUP_6 MPC5200_BIT32(1)
-  #define GPIO_W_PIN_PSC6_1 MPC5200_BIT32(2)
-  #define GPIO_W_PIN_PSC6_0 MPC5200_BIT32(3)
-  #define GPIO_W_PIN_ETH_17 MPC5200_BIT32(4)
-  #define GPIO_W_PIN_PSC3_9 MPC5200_BIT32(5)
-  #define GPIO_W_PIN_PSC2_4 MPC5200_BIT32(6)
-  #define GPIO_W_PIN_PSC1_4 MPC5200_BIT32(7)
</font><font color='#000088'>+  #define GPIO_W_PIN_GPIO_WKUP_7 BSP_BBIT32(0)
+  #define GPIO_W_PIN_GPIO_WKUP_6 BSP_BBIT32(1)
+  #define GPIO_W_PIN_PSC6_1 BSP_BBIT32(2)
+  #define GPIO_W_PIN_PSC6_0 BSP_BBIT32(3)
+  #define GPIO_W_PIN_ETH_17 BSP_BBIT32(4)
+  #define GPIO_W_PIN_PSC3_9 BSP_BBIT32(5)
+  #define GPIO_W_PIN_PSC2_4 BSP_BBIT32(6)
+  #define GPIO_W_PIN_PSC1_4 BSP_BBIT32(7)
</font> 
   volatile uint32_t gpiowe;     /* + 0x00 */
   volatile uint32_t gpiowod;    /* + 0x04 */
<font color='#997700'>@@ -685,83 +856,8 @@
</font>   /*
    * SmartComm DMA registers (MBAR + 0x1200)
    */
<font color='#880000'>-  volatile uint32_t taskBar;          /* + 0x00 sdTpb */
-  volatile uint32_t currentPointer;   /* + 0x04 sdMdeComplex */
-  volatile uint32_t endPointer;       /* + 0x08 sdMdeComplex */
-  volatile uint32_t variablePointer;  /* + 0x0c sdMdeComplex */
-
-  /*
-   * The following are Priority Task Decoder (ptd) regs in sdma/rtl_v/sdPtd.v.
-   * The ptd register map below is from the smartcomm spec, table 3-2, page 3-54.
-   * The spec shows the ptd map as 20 words, but sdPtd.v has only implemented 19.
-   * The word commented out below is the one which is not implemented.
-   */
</font><font color='#000088'>+  volatile mpc5200_sdma sdma;
</font> 
<font color='#880000'>-  /*  volatile uint8_t  IntVect; */ /*
-  * + 0xXX sdPtd read only
-  */
-
-  /*  volatile uint8_t  res0[3]; */ /*
-   * + 0xXX sdPtd read only
-   */
-  volatile uint8_t IntVect1;    /* + 0x10 sdPtd */
-  volatile uint8_t IntVect2;    /* + 0x11 sdPtd */
-  volatile uint16_t PtdCntrl;   /* + 0x12 sdPtd */
-
-  volatile uint32_t IntPend;    /* + 0x14 sdPtd */
-  volatile uint32_t IntMask;    /* + 0x18 sdPtd */
-
-  volatile uint32_t TCR01;      /* + 0x1c sdPtd */
-  volatile uint32_t TCR23;      /* + 0x20 sdPtd */
-  volatile uint32_t TCR45;      /* + 0x24 sdPtd */
-  volatile uint32_t TCR67;      /* + 0x28 sdPtd */
-  volatile uint32_t TCR89;      /* + 0x2c sdPtd */
-  volatile uint32_t TCRAB;      /* + 0x30 sdPtd */
-  volatile uint32_t TCRCD;      /* + 0x34 sdPtd */
-  volatile uint32_t TCREF;      /* + 0x38 sdPtd */
-
-  volatile uint8_t IPR0;        /* + 0x3c sdPtd */
-  volatile uint8_t IPR1;        /* + 0x3d sdPtd */
-  volatile uint8_t IPR2;        /* + 0x3e sdPtd */
-  volatile uint8_t IPR3;        /* + 0x3f sdPtd */
-  volatile uint8_t IPR4;        /* + 0x40 sdPtd */
-  volatile uint8_t IPR5;        /* + 0x41 sdPtd */
-  volatile uint8_t IPR6;        /* + 0x42 sdPtd */
-  volatile uint8_t IPR7;        /* + 0x43 sdPtd */
-  volatile uint8_t IPR8;        /* + 0x44 sdPtd */
-  volatile uint8_t IPR9;        /* + 0x45 sdPtd */
-  volatile uint8_t IPR10;       /* + 0x46 sdPtd */
-  volatile uint8_t IPR11;       /* + 0x47 sdPtd */
-  volatile uint8_t IPR12;       /* + 0x48 sdPtd */
-  volatile uint8_t IPR13;       /* + 0x49 sdPtd */
-  volatile uint8_t IPR14;       /* + 0x4a sdPtd */
-  volatile uint8_t IPR15;       /* + 0x4b sdPtd */
-  volatile uint8_t IPR16;       /* + 0x4c sdPtd */
-  volatile uint8_t IPR17;       /* + 0x4d sdPtd */
-  volatile uint8_t IPR18;       /* + 0x4e sdPtd */
-  volatile uint8_t IPR19;       /* + 0x4f sdPtd */
-  volatile uint8_t IPR20;       /* + 0x50 sdPtd */
-  volatile uint8_t IPR21;       /* + 0x51 sdPtd */
-  volatile uint8_t IPR22;       /* + 0x52 sdPtd */
-  volatile uint8_t IPR23;       /* + 0x53 sdPtd */
-  volatile uint8_t IPR24;       /* + 0x54 sdPtd */
-  volatile uint8_t IPR25;       /* + 0x55 sdPtd */
-  volatile uint8_t IPR26;       /* + 0x56 sdPtd */
-  volatile uint8_t IPR27;       /* + 0x57 sdPtd */
-  volatile uint8_t IPR28;       /* + 0x58 sdPtd */
-  volatile uint8_t IPR29;       /* + 0x59 sdPtd */
-  volatile uint8_t IPR30;       /* + 0x5a sdPtd */
-  volatile uint8_t IPR31;       /* + 0x5b sdPtd */
-
-  volatile uint32_t res5;       /* reserved */
-  volatile uint32_t res6;       /* reserved */
-  volatile uint32_t res7;       /* reserved */
-  volatile uint32_t MDEDebug;   /* + 0x68 sdMdeComplex */
-  volatile uint32_t ADSDebug;   /* + 0x6c sdAdsTop */
-  volatile uint32_t Value1;     /* + 0x70 sdDbg */
-  volatile uint32_t Value2;     /* + 0x74 sdDbg */
-  volatile uint32_t Control;    /* + 0x78 sdDbg */
-  volatile uint32_t Status;     /* + 0x7c sdDbg */
</font>   volatile uint32_t EU00;       /* + 0x80 sdMac macer reg */
   volatile uint32_t EU01;       /* + 0x84 sdMac macemr reg */
   volatile uint32_t EU02;       /* + 0x88 unused */
<font color='#997700'>@@ -816,8 +912,32 @@
</font>   volatile uint32_t reserved14;       /* MBAR_XLB_ARB + 0x0038 reserved */
   volatile uint32_t reserved15;       /* MBAR_XLB_ARB + 0x003c reserved */
 
<font color='#000088'>+#define XLB_CFG_PLDIS BSP_BBIT32(0)
+#define XLB_CFG_BSDIS BSP_BBIT32(15)
+#define XLB_CFG_SE BSP_BBIT32(16)
+#define XLB_CFG_USE_WWF BSP_BBIT32(17)
+#define XLB_CFG_TBEN BSP_BBIT32(18)
+#define XLB_CFG_WS BSP_BBIT32(20)
+#define XLB_CFG_SP(val) BSP_BFLD32(val, 21, 23)
+#define XLB_CFG_SET_SP(reg, val) BSP_BFLD32SET(reg, val, 21, 23)
+#define XLB_CFG_PM(val) BSP_BFLD32(val, 25, 26)
+#define XLB_CFG_SET_PM(reg, val) BSP_BFLD32SET(reg, val, 25, 26)
+#define XLB_CFG_BA BSP_BBIT32(28)
+#define XLB_CFG_DT BSP_BBIT32(29)
+#define XLB_CFG_AT BSP_BBIT32(30)
+
</font>   volatile uint32_t config;           /* MBAR_XLB_ARB + 0x0040 */
   volatile uint32_t version;          /* MBAR_XLB_ARB + 0x0044 */
<font color='#000088'>+
+#define XLB_ST_SEA BSP_BBIT32(23)
+#define XLB_ST_MM BSP_BBIT32(24)
+#define XLB_ST_TTA BSP_BBIT32(25)
+#define XLB_ST_TTR BSP_BBIT32(26)
+#define XLB_ST_ECW BSP_BBIT32(27)
+#define XLB_ST_TTM BSP_BBIT32(28)
+#define XLB_ST_BA BSP_BBIT32(29)
+#define XLB_ST_DT BSP_BBIT32(30)
+#define XLB_ST_AT BSP_BBIT32(31)
</font>                                       /*             read only = 0x0001 */
   volatile uint32_t xlb_status;       /* MBAR_XLB_ARB + 0x0048 */
   volatile uint32_t int_enable;       /* MBAR_XLB_ARB + 0x004c */
<font color='#997700'>@@ -1150,7 +1270,20 @@
</font> 
   /* ATA FIFO registers (offset 0x3C-0x50) */
   volatile uint32_t ata_rtfdwr;   /* + 0x3C */
<font color='#000088'>+
+#define ATA_RTFSR_ERR BSP_BBIT32(9)
+#define ATA_RTFSR_UF BSP_BBIT32(10)
+#define ATA_RTFSR_OF BSP_BBIT32(11)
+#define ATA_RTFSR_FULL BSP_BBIT32(12)
+#define ATA_RTFSR_HI BSP_BBIT32(13)
+#define ATA_RTFSR_LO BSP_BBIT32(14)
+#define ATA_RTFSR_EMPTY BSP_BBIT32(15)
+
</font>   volatile uint32_t ata_rtfsr;    /* + 0x40 */
<font color='#000088'>+
+#define ATA_RTFCR_WFR BSP_BBIT32(2)
+#define ATA_RTFCR_GR(val) BSP_BFLD32(val, 5, 7)
+
</font>   volatile uint32_t ata_rtfcr;    /* + 0x44 */
   volatile uint32_t ata_rtfar;    /* + 0x48 */
   volatile uint32_t ata_rtfrpr;   /* + 0x4C */

<font color='#006600'>diff -u rtems/c/src/lib/libbsp/powerpc/gen5200/include/mscan-base.h:1.4 rtems/c/src/lib/libbsp/powerpc/gen5200/include/mscan-base.h:1.5
--- rtems/c/src/lib/libbsp/powerpc/gen5200/include/mscan-base.h:1.4     Sat Mar 27 09:59:17 2010
+++ rtems/c/src/lib/libbsp/powerpc/gen5200/include/mscan-base.h Mon Nov 15 04:55:02 2010
</font><font color='#997700'>@@ -248,35 +248,35 @@
</font>   uint8_t tier;
 } mscan_context;
 
<font color='#880000'>-bool mscan_enable( mscan *m, unsigned bit_rate);
</font><font color='#000088'>+bool mscan_enable( volatile mscan *m, unsigned bit_rate);
</font> 
<font color='#880000'>-void mscan_disable( mscan *m);
</font><font color='#000088'>+void mscan_disable( volatile mscan *m);
</font> 
<font color='#880000'>-void mscan_interrupts_disable( mscan *m);
</font><font color='#000088'>+void mscan_interrupts_disable( volatile mscan *m);
</font> 
<font color='#880000'>-bool mscan_set_bit_rate( mscan *m, unsigned bit_rate);
</font><font color='#000088'>+bool mscan_set_bit_rate( volatile mscan *m, unsigned bit_rate);
</font> 
<font color='#880000'>-void mscan_initialization_mode_enter( mscan *m, mscan_context *context);
</font><font color='#000088'>+void mscan_initialization_mode_enter( volatile mscan *m, mscan_context *context);
</font> 
<font color='#880000'>-void mscan_initialization_mode_leave( mscan *m, const mscan_context *context);
</font><font color='#000088'>+void mscan_initialization_mode_leave( volatile mscan *m, const mscan_context *context);
</font> 
<font color='#880000'>-void mscan_sleep_mode_enter( mscan *m);
</font><font color='#000088'>+void mscan_sleep_mode_enter( volatile mscan *m);
</font> 
<font color='#880000'>-void mscan_sleep_mode_leave( mscan *m);
</font><font color='#000088'>+void mscan_sleep_mode_leave( volatile mscan *m);
</font> 
<font color='#880000'>-volatile uint8_t *mscan_id_acceptance_register( mscan *m, unsigned i);
</font><font color='#000088'>+volatile uint8_t *mscan_id_acceptance_register( volatile mscan *m, unsigned i);
</font> 
<font color='#880000'>-volatile uint8_t *mscan_id_mask_register( mscan *m, unsigned i);
</font><font color='#000088'>+volatile uint8_t *mscan_id_mask_register( volatile mscan *m, unsigned i);
</font> 
<font color='#880000'>-unsigned mscan_filter_number( mscan *m);
</font><font color='#000088'>+unsigned mscan_filter_number( volatile mscan *m);
</font> 
<font color='#880000'>-bool mscan_set_filter_number( mscan *m, unsigned number);
</font><font color='#000088'>+bool mscan_set_filter_number( volatile mscan *m, unsigned number);
</font> 
<font color='#880000'>-bool mscan_filter_operation( mscan *m, bool set, unsigned index, uint32_t *id, uint32_t *mask);
</font><font color='#000088'>+bool mscan_filter_operation( volatile mscan *m, bool set, unsigned index, uint32_t *id, uint32_t *mask);
</font> 
<font color='#880000'>-void mscan_filter_clear( mscan *m);
</font><font color='#000088'>+void mscan_filter_clear( volatile mscan *m);
</font> 
<font color='#880000'>-void mscan_get_error_counters( mscan *m, unsigned *rec, unsigned *tec);
</font><font color='#000088'>+void mscan_get_error_counters( volatile mscan *m, unsigned *rec, unsigned *tec);
</font> 
 /** @} */
 

<font color='#006600'>diff -u rtems/c/src/lib/libbsp/powerpc/gen5200/irq/irq.c:1.21 rtems/c/src/lib/libbsp/powerpc/gen5200/irq/irq.c:1.22
--- rtems/c/src/lib/libbsp/powerpc/gen5200/irq/irq.c:1.21       Sat Mar 27 09:59:17 2010
+++ rtems/c/src/lib/libbsp/powerpc/gen5200/irq/irq.c    Mon Nov 15 04:55:02 2010
</font><font color='#997700'>@@ -480,19 +480,38 @@
</font> }
 #endif
 
<font color='#000088'>+static void dispatch(uint32_t irq, uint32_t offset, volatile uint32_t *maskreg)
+{
+  #if (ALLOW_IRQ_NESTING == 1)
+    uint32_t msr;
+  #endif
+
+  uint32_t mask = *maskreg;
+
+  irq += offset;
+
+  *maskreg = mask | irqMaskTable [irq];
+
+  #if (ALLOW_IRQ_NESTING == 1)
+    msr = ppc_external_exceptions_enable();
+  #endif
+
+  bsp_interrupt_handler_dispatch(irq);
+
+  #if (ALLOW_IRQ_NESTING == 1)
+    ppc_external_exceptions_disable(msr);
+  #endif
+
+  *maskreg = mask;
+}
+
</font> /*
  * High level IRQ handler called from shared_raw_irq_code_entry
  */
 int C_dispatch_irq_handler(BSP_Exception_frame *frame, unsigned excNum)
 {
<font color='#880000'>-  register unsigned int irq;
-  register unsigned int pmce;
-  register unsigned int crit_pri_main_mask,
-    per_mask;
-
-#if (ALLOW_IRQ_NESTING == 1)
-  uint32_t msr;
-#endif
</font><font color='#000088'>+  uint32_t irq;
+  uint32_t pmce;
</font> 
 #if (BENCHMARK_IRQ_PROCESSING == 1)
   uint64_t start,
<font color='#997700'>@@ -518,133 +537,8 @@
</font> 
       break;
 
<font color='#880000'>-    case ASM_60X_SYSMGMT_VECTOR:
-
-      /* get the content of main interrupt status register */
-      pmce = mpc5200.pmce;
-
-      /* main interrupts may be routed to SMI, see bit SMI/INT select
-       * bit in main int. priorities
-       */
-      while (CHK_MSE_STICKY( pmce)) {
-
-        /* check for main interrupt sources (hirarchical order)
-         * -> LO_int indicates peripheral sources
-         */
-        if (CHK_MSE_STICKY( pmce)) {
-          /* get source of main interrupt */
-          irq = MSE_SOURCE( pmce);
-          switch (irq) {
-
-              /* irq1-3, RTC, GPIO, TMR0-7 detected (attention:
-               * slice timer 2 is always routed to SMI)
-               */
-            case 0:            /* slice timer 2 */
-            case 1:
-            case 2:
-            case 3:
-            case 5:
-            case 6:
-            case 7:
-            case 8:
-            case 9:
-            case 10:
-            case 11:
-            case 12:
-            case 13:
-            case 14:
-            case 15:
-            case 16:
-
-              /* add proper offset for main interrupts in
-               * the siu handler array
-               */
-              irq += BSP_MAIN_IRQ_LOWEST_OFFSET;
-
-              /* save original mask and disable all lower
-               * priorized main interrupts
-               */
-              crit_pri_main_mask = mpc5200.crit_pri_main_mask;
-              mpc5200.crit_pri_main_mask |= irqMaskTable [irq];
-
-#if (ALLOW_IRQ_NESTING == 1)
-              /* enable interrupt nesting */
-              msr = ppc_external_exceptions_enable();
-#endif
-
-              /* Dispatch interrupt handlers */
-              bsp_interrupt_handler_dispatch( irq);
-
-#if (ALLOW_IRQ_NESTING == 1)
-              /* disable interrupt nesting */
-              ppc_external_exceptions_disable( msr);
-#endif
-
-              /* restore original interrupt mask */
-              mpc5200.crit_pri_main_mask = crit_pri_main_mask;
-
-              break;
-
-              /* peripheral LO_int interrupt source detected */
-            case 4:
-
-              /* check for valid peripheral interrupt source */
-              if (CHK_PSE_STICKY( pmce)) {
-                /* get source of peripheral interrupt */
-                irq = PSE_SOURCE( pmce);
-
-                /* add proper offset for peripheral interrupts
-                 * in the siu handler array
-                 */
-                irq += BSP_PER_IRQ_LOWEST_OFFSET;
-
-                /* save original mask and disable all lower
-                 * priorized main interrupts
-                 */
-                per_mask = mpc5200.per_mask;
-                mpc5200.per_mask |= irqMaskTable [irq];
-
-#if (ALLOW_IRQ_NESTING == 1)
-                /* enable interrupt nesting */
-                msr = ppc_external_exceptions_enable();
-#endif
-
-                /* Dispatch interrupt handlers */
-                bsp_interrupt_handler_dispatch( irq);
-
-#if (ALLOW_IRQ_NESTING == 1)
-                /* disable interrupt nesting */
-                ppc_external_exceptions_disable( msr);
-#endif
-
-                /* restore original interrupt mask */
-                mpc5200.per_mask = per_mask;
-
-                /* force re-evaluation of peripheral interrupts */
-                CLR_PSE_STICKY( mpc5200.pmce);
-              } else {
-                /* this case may not occur: no valid peripheral
-                 * interrupt source
-                 */
-                printk( "No valid peripheral LO_int interrupt source\n");
-              }
-              break;
-              /* error: unknown interrupt source */
-            default:
-              printk( "Unknown peripheral LO_int interrupt source\n");
-              break;
-          }
-
-          /* force re-evaluation of main interrupts */
-          CLR_MSE_STICKY( mpc5200.pmce);
-        }
-
-        /* get the content of main interrupt status register */
-        pmce = mpc5200.pmce;
-      }
-      break;
-
</font>     case ASM_EXT_VECTOR:
<font color='#000088'>+    case ASM_60X_SYSMGMT_VECTOR:
</font>       /* get the content of main interrupt status register */
       pmce = mpc5200.pmce;
 
<font color='#997700'>@@ -682,30 +576,7 @@
</font>                 /* get source of peripheral interrupt */
                 irq = PSE_SOURCE( pmce);
 
<font color='#880000'>-                /* add proper offset for peripheral interrupts in the
-                 * siu handler array */
-                irq += BSP_PER_IRQ_LOWEST_OFFSET;
-
-                /* save original mask and disable all lower
-                 * priorized main interrupts */
-                per_mask = mpc5200.per_mask;
-                mpc5200.per_mask |= irqMaskTable [irq];
-
-#if (ALLOW_IRQ_NESTING == 1)
-                /* enable interrupt nesting */
-                msr = ppc_external_exceptions_enable();
-#endif
-
-                /* Dispatch interrupt handlers */
-                bsp_interrupt_handler_dispatch( irq);
-
-#if (ALLOW_IRQ_NESTING == 1)
-                /* disable interrupt nesting */
-                ppc_external_exceptions_disable( msr);
-#endif
-
-                /* restore original interrupt mask */
-                mpc5200.per_mask = per_mask;
</font><font color='#000088'>+                dispatch(irq, BSP_PER_IRQ_LOWEST_OFFSET, &mpc5200.per_mask);
</font> 
                 /* force re-evaluation of peripheral interrupts */
                 CLR_PSE_STICKY( mpc5200.pmce);
<font color='#997700'>@@ -734,6 +605,7 @@
</font> 
               /* irq1-3, RTC, GPIO, TMR0-7 detected (attention: slice timer
                * 2 is always routed to SMI) */
<font color='#000088'>+            case 0:
</font>             case 1:
             case 2:
             case 3:
<font color='#997700'>@@ -749,30 +621,7 @@
</font>             case 14:
             case 15:
             case 16:
<font color='#880000'>-              /* add proper offset for main interrupts in the siu
-               * handler array */
-              irq += BSP_MAIN_IRQ_LOWEST_OFFSET;
-
-              /* save original mask and disable all lower priorized
-               * main interrupts*/
-              crit_pri_main_mask = mpc5200.crit_pri_main_mask;
-              mpc5200.crit_pri_main_mask |= irqMaskTable [irq];
-
-#if (ALLOW_IRQ_NESTING == 1)
-              /* enable interrupt nesting */
-              msr = ppc_external_exceptions_enable();
-#endif
-
-              /* Dispatch interrupt handlers */
-              bsp_interrupt_handler_dispatch( irq);
-
-#if (ALLOW_IRQ_NESTING == 1)
-              /* disable interrupt nesting */
-              ppc_external_exceptions_disable( msr);
-#endif
-
-              /* restore original interrupt mask */
-              mpc5200.crit_pri_main_mask = crit_pri_main_mask;
</font><font color='#000088'>+              dispatch(irq, BSP_MAIN_IRQ_LOWEST_OFFSET, &mpc5200.crit_pri_main_mask);
</font>               break;
 
               /* peripheral LO_int interrupt source detected */
<font color='#997700'>@@ -782,30 +631,7 @@
</font>                 /* get source of peripheral interrupt */
                 irq = PSE_SOURCE( pmce);
 
<font color='#880000'>-                /* add proper offset for peripheral interrupts in the siu
-                 * handler array */
-                irq += BSP_PER_IRQ_LOWEST_OFFSET;
-
-                /* save original mask and disable all lower priorized main
-                 * interrupts */
-                per_mask = mpc5200.per_mask;
-                mpc5200.per_mask |= irqMaskTable [irq];
-
-#if (ALLOW_IRQ_NESTING == 1)
-                /* enable interrupt nesting */
-                msr = ppc_external_exceptions_enable();
-#endif
-
-                /* Dispatch interrupt handlers */
-                bsp_interrupt_handler_dispatch( irq);
-
-#if (ALLOW_IRQ_NESTING == 1)
-                /* disable interrupt nesting */
-                ppc_external_exceptions_disable( msr);
-#endif
-
-                /* restore original interrupt mask */
-                mpc5200.per_mask = per_mask;
</font><font color='#000088'>+                dispatch(irq, BSP_PER_IRQ_LOWEST_OFFSET, &mpc5200.per_mask);
</font> 
                 /* force re-evaluation of peripheral interrupts */
                 CLR_PSE_STICKY( mpc5200.pmce);
<font color='#997700'>@@ -824,6 +650,17 @@
</font>           /* force re-evaluation of main interrupts */
           CLR_MSE_STICKY( mpc5200.pmce);
         }
<font color='#000088'>+
+        if (CHK_PSE_STICKY( pmce)) {
+          /* get source of peripheral interrupt */
+          irq = PSE_SOURCE( pmce);
+
+          dispatch(irq, BSP_PER_IRQ_LOWEST_OFFSET, &mpc5200.per_mask);
+
+          /* force re-evaluation of peripheral interrupts */
+          CLR_PSE_STICKY( mpc5200.pmce);
+        }
+
</font>         /* get the content of main interrupt status register */
         pmce = mpc5200.pmce;
       }

<font color='#006600'>diff -u /dev/null rtems/c/src/lib/libbsp/powerpc/gen5200/make/custom/dp2.cfg:1.1
--- /dev/null   Wed Nov 17 08:11:17 2010
+++ rtems/c/src/lib/libbsp/powerpc/gen5200/make/custom/dp2.cfg  Mon Nov 15 04:55:02 2010
</font><font color='#997700'>@@ -0,0 +1,7 @@
</font><font color='#000088'>+#
+#  Config file for Direct Prototyping Data Processing (DP2) board.
+#
+#  $Id$
+#
+
+include $(RTEMS_ROOT)/make/custom/gen5200.inc
</font>
<font color='#006600'>diff -u rtems/c/src/lib/libbsp/powerpc/gen5200/mscan/mscan-base.c:1.4 rtems/c/src/lib/libbsp/powerpc/gen5200/mscan/mscan-base.c:1.5
--- rtems/c/src/lib/libbsp/powerpc/gen5200/mscan/mscan-base.c:1.4       Sat Mar 27 09:59:17 2010
+++ rtems/c/src/lib/libbsp/powerpc/gen5200/mscan/mscan-base.c   Mon Nov 15 04:55:02 2010
</font><font color='#997700'>@@ -139,7 +139,7 @@
</font>  * @brief Sets the bit rate for the MSCAN module @a m to @a can_bit_rate
  * in [bits/s].
  */
<font color='#880000'>-bool mscan_set_bit_rate( mscan *m, unsigned can_bit_rate)
</font><font color='#000088'>+bool mscan_set_bit_rate( volatile mscan *m, unsigned can_bit_rate)
</font> {
   mscan_context context;
   unsigned prescale_val = 0;
<font color='#997700'>@@ -204,7 +204,7 @@
</font> /**
  * @brief Disables all interrupts for the MSCAN module @a m.
  */
<font color='#880000'>-void mscan_interrupts_disable( mscan *m)
</font><font color='#000088'>+void mscan_interrupts_disable( volatile mscan *m)
</font> {
   m->rier = 0;
   m->tier = 0;
<font color='#997700'>@@ -215,7 +215,7 @@
</font>  *
  * Saves the current MSCAN context in @a context.
  */
<font color='#880000'>-void mscan_initialization_mode_enter( mscan *m, mscan_context *context)
</font><font color='#000088'>+void mscan_initialization_mode_enter( volatile mscan *m, mscan_context *context)
</font> {
   /* Save context */
   context->ctl0 = m->ctl0 & CTL0_TIME;
<font color='#997700'>@@ -242,7 +242,7 @@
</font>  *
  * Saves the previous MSCAN context saved in @a context.
  */
<font color='#880000'>-void mscan_initialization_mode_leave( mscan *m, const mscan_context *context)
</font><font color='#000088'>+void mscan_initialization_mode_leave( volatile mscan *m, const mscan_context *context)
</font> {
   /* Clear initialization mode request */
   m->ctl0 &= ~CTL0_INITRQ;
<font color='#997700'>@@ -264,7 +264,7 @@
</font> /**
  * @brief Enter sleep mode for the MSCAN module @a m.
  */
<font color='#880000'>-void mscan_sleep_mode_enter( mscan *m)
</font><font color='#000088'>+void mscan_sleep_mode_enter( volatile mscan *m)
</font> {
   /* Request sleep mode */
   m->ctl0 |= CTL0_SLPRQ;
<font color='#997700'>@@ -278,7 +278,7 @@
</font> /**
  * @brief Leave sleep mode for the MSCAN module @a m.
  */
<font color='#880000'>-void mscan_sleep_mode_leave( mscan *m)
</font><font color='#000088'>+void mscan_sleep_mode_leave( volatile mscan *m)
</font> {
   /* Clear sleep mode request */
   m->ctl0 &= ~CTL0_SLPRQ;
<font color='#997700'>@@ -294,7 +294,7 @@
</font>  *
  * The module is set to listen only mode.
  */
<font color='#880000'>-bool mscan_enable( mscan *m, unsigned bit_rate)
</font><font color='#000088'>+bool mscan_enable( volatile mscan *m, unsigned bit_rate)
</font> {
   bool s = true;
 
<font color='#997700'>@@ -327,7 +327,7 @@
</font>  *
  * The module is set to sleep mode and disabled afterwards.
  */
<font color='#880000'>-void mscan_disable( mscan *m)
</font><font color='#000088'>+void mscan_disable( volatile mscan *m)
</font> {
   mscan_context context;
 
<font color='#997700'>@@ -345,7 +345,7 @@
</font>  * @brief Sets the filter ID and mask registers of the MSCAN module @a m to
  * default values.
  */
<font color='#880000'>-void mscan_filter_clear( mscan *m)
</font><font color='#000088'>+void mscan_filter_clear( volatile mscan *m)
</font> {
   mscan_context context;
 
<font color='#997700'>@@ -380,7 +380,7 @@
</font>  * @see MSCAN_FILTER_NUMBER_MIN, MSCAN_FILTER_NUMBER_2, MSCAN_FILTER_NUMBER_4
  * and MSCAN_FILTER_NUMBER_MAX.
  */
<font color='#880000'>-unsigned mscan_filter_number( mscan *m)
</font><font color='#000088'>+unsigned mscan_filter_number( volatile mscan *m)
</font> {
   uint8_t idam = m->idac & IDAC_IDAM;
 
<font color='#997700'>@@ -403,7 +403,7 @@
</font>  * @see MSCAN_FILTER_NUMBER_MIN, MSCAN_FILTER_NUMBER_2, MSCAN_FILTER_NUMBER_4
  * and MSCAN_FILTER_NUMBER_MAX.
  */
<font color='#880000'>-bool mscan_set_filter_number( mscan *m, unsigned number)
</font><font color='#000088'>+bool mscan_set_filter_number( volatile mscan *m, unsigned number)
</font> {
   mscan_context context;
   uint8_t idac = IDAC_IDAM1 | IDAC_IDAM0;
<font color='#997700'>@@ -442,7 +442,7 @@
</font>  *
  * @warning The index @a i is not checked if it is in range.
  */
<font color='#880000'>-volatile uint8_t *mscan_id_acceptance_register( mscan *m, unsigned i)
</font><font color='#000088'>+volatile uint8_t *mscan_id_acceptance_register( volatile mscan *m, unsigned i)
</font> {
   volatile uint8_t *const idar [8] = {
     &m->idar0,
<font color='#997700'>@@ -464,7 +464,7 @@
</font>  *
  * @warning The index @a i is not checked if it is in range.
  */
<font color='#880000'>-volatile uint8_t *mscan_id_mask_register( mscan *m, unsigned i)
</font><font color='#000088'>+volatile uint8_t *mscan_id_mask_register( volatile mscan *m, unsigned i)
</font> {
   volatile uint8_t *const idmr [8] = {
     &m->idmr0,
<font color='#997700'>@@ -488,7 +488,7 @@
</font>  * Returns true if the operation was successful.
  */
 bool mscan_filter_operation(
<font color='#880000'>-  mscan *m,
</font><font color='#000088'>+  volatile mscan *m,
</font>   bool set,
   unsigned index,
   uint32_t *id,
<font color='#997700'>@@ -543,7 +543,7 @@
</font>  * @brief Returns the receiver and transmitter error counter values in @a rec
  * and @a tec of MSCAN module @a m.
  */
<font color='#880000'>-void mscan_get_error_counters( mscan *m, unsigned *rec, unsigned *tec)
</font><font color='#000088'>+void mscan_get_error_counters( volatile mscan *m, unsigned *rec, unsigned *tec)
</font> {
   mscan_context context;
 

<font color='#006600'>diff -u rtems/c/src/lib/libbsp/powerpc/gen5200/network_5200/network.c:1.13 rtems/c/src/lib/libbsp/powerpc/gen5200/network_5200/network.c:1.14
--- rtems/c/src/lib/libbsp/powerpc/gen5200/network_5200/network.c:1.13  Sun Nov 29 09:27:07 2009
+++ rtems/c/src/lib/libbsp/powerpc/gen5200/network_5200/network.c       Mon Nov 15 04:55:02 2010
</font><font color='#997700'>@@ -92,14 +92,12 @@
</font> #define GET_BD_STATUS(bd)         ((bd)->Status & 0xffff0000)
 #define GET_BD_LENGTH(bd)              ((bd)->Status & 0x0000ffff)
 #define GET_SDMA_PENDINGBIT(Bit)   \
<font color='#880000'>-   (mpc5200.IntPend & (uint32)(1<<Bit))
</font><font color='#000088'>+   (mpc5200.sdma.IntPend & (uint32)(1<<Bit))
</font> 
 #include "../bestcomm/bestcomm_api.h"
 #include "../bestcomm/task_api/bestcomm_cntrl.h"
 #include "../bestcomm/task_api/tasksetup_bdtable.h"
 
<font color='#880000'>-extern TaskBDIdxTable_t TaskBDIdxTable[MAX_TASKS];
-
</font> static TaskId rxTaskId;   /* SDMA RX task ID */
 static TaskId txTaskId;        /* SDMA TX task ID */
 
<font color='#997700'>@@ -673,7 +671,7 @@
</font>   if(GET_SDMA_PENDINGBIT(FEC_RECV_TASK_NO))
     {
 
<font color='#880000'>-      SDMA_CLEAR_IEVENT(&mpc5200.IntPend,FEC_RECV_TASK_NO);
</font><font color='#000088'>+      SDMA_CLEAR_IEVENT(&mpc5200.sdma.IntPend,FEC_RECV_TASK_NO);
</font> 
       bestcomm_glue_irq_disable(FEC_RECV_TASK_NO);/*Disable receive ints*/
 
<font color='#997700'>@@ -693,7 +691,7 @@
</font>   if(GET_SDMA_PENDINGBIT(FEC_XMIT_TASK_NO))
     {
 
<font color='#880000'>-      SDMA_CLEAR_IEVENT(&mpc5200.IntPend,FEC_XMIT_TASK_NO);
</font><font color='#000088'>+      SDMA_CLEAR_IEVENT(&mpc5200.sdma.IntPend,FEC_XMIT_TASK_NO);
</font> 
       bestcomm_glue_irq_disable(FEC_XMIT_TASK_NO);/*Disable tx ints*/
 
<font color='#997700'>@@ -815,7 +813,7 @@
</font>       /*
        * Clear old events
        */
<font color='#880000'>-      SDMA_CLEAR_IEVENT(&mpc5200.IntPend,FEC_XMIT_TASK_NO);
</font><font color='#000088'>+      SDMA_CLEAR_IEVENT(&mpc5200.sdma.IntPend,FEC_XMIT_TASK_NO);
</font> 
       /*
        * Wait for buffer descriptor to become available.
<font color='#997700'>@@ -983,7 +981,7 @@
</font>     /*
      * Clear old events
      */
<font color='#880000'>-    SDMA_CLEAR_IEVENT(&mpc5200.IntPend,FEC_RECV_TASK_NO);
</font><font color='#000088'>+    SDMA_CLEAR_IEVENT(&mpc5200.sdma.IntPend,FEC_RECV_TASK_NO);
</font>     /*
      * Get the first BD pointer and its length.
      */
<font color='#997700'>@@ -1400,9 +1398,9 @@
</font>       /*
        * Set priority of different initiators
        */
<font color='#880000'>-      mpc5200.IPR0 = 7;    /* always initiator     */
-      mpc5200.IPR3 = 6;        /* eth rx initiator     */
-      mpc5200.IPR4 = 5;        /* eth tx initiator     */
</font><font color='#000088'>+      mpc5200.sdma.ipr [0] = 7;       /* always initiator     */
+      mpc5200.sdma.ipr [3] = 6;        /* eth rx initiator     */
+      mpc5200.sdma.ipr [4] = 5;        /* eth tx initiator     */
</font> 
       /*
        * Start driver tasks

<font color='#006600'>diff -u rtems/c/src/lib/libbsp/powerpc/gen5200/preinstall.am:1.17 rtems/c/src/lib/libbsp/powerpc/gen5200/preinstall.am:1.18
--- rtems/c/src/lib/libbsp/powerpc/gen5200/preinstall.am:1.17   Fri Apr 30 07:45:13 2010
+++ rtems/c/src/lib/libbsp/powerpc/gen5200/preinstall.am        Mon Nov 15 04:55:01 2010
</font><font color='#997700'>@@ -33,6 +33,26 @@
</font>   @: > $(PROJECT_INCLUDE)/bsp/$(dirstamp)
 PREINSTALL_DIRS += $(PROJECT_INCLUDE)/bsp/$(dirstamp)
 
<font color='#000088'>+$(PROJECT_INCLUDE)/bsp/bestcomm/$(dirstamp):
+       @$(MKDIR_P) $(PROJECT_INCLUDE)/bsp/bestcomm
+       @: > $(PROJECT_INCLUDE)/bsp/bestcomm/$(dirstamp)
+PREINSTALL_DIRS += $(PROJECT_INCLUDE)/bsp/bestcomm/$(dirstamp)
+
+$(PROJECT_INCLUDE)/bsp/bestcomm/include/$(dirstamp):
+       @$(MKDIR_P) $(PROJECT_INCLUDE)/bsp/bestcomm/include
+       @: > $(PROJECT_INCLUDE)/bsp/bestcomm/include/$(dirstamp)
+PREINSTALL_DIRS += $(PROJECT_INCLUDE)/bsp/bestcomm/include/$(dirstamp)
+
+$(PROJECT_INCLUDE)/bsp/bestcomm/include/mgt5200/$(dirstamp):
+       @$(MKDIR_P) $(PROJECT_INCLUDE)/bsp/bestcomm/include/mgt5200
+       @: > $(PROJECT_INCLUDE)/bsp/bestcomm/include/mgt5200/$(dirstamp)
+PREINSTALL_DIRS += $(PROJECT_INCLUDE)/bsp/bestcomm/include/mgt5200/$(dirstamp)
+
+$(PROJECT_INCLUDE)/bsp/bestcomm/task_api/$(dirstamp):
+       @$(MKDIR_P) $(PROJECT_INCLUDE)/bsp/bestcomm/task_api
+       @: > $(PROJECT_INCLUDE)/bsp/bestcomm/task_api/$(dirstamp)
+PREINSTALL_DIRS += $(PROJECT_INCLUDE)/bsp/bestcomm/task_api/$(dirstamp)
+
</font> $(PROJECT_LIB)/bsp_specs: bsp_specs $(PROJECT_LIB)/$(dirstamp)
        $(INSTALL_DATA) $< $(PROJECT_LIB)/bsp_specs
 PREINSTALL_FILES += $(PROJECT_LIB)/bsp_specs
<font color='#997700'>@@ -89,6 +109,62 @@
</font>   $(INSTALL_DATA) $< $(PROJECT_LIB)/linkcmds
 TMPINSTALL_FILES += $(PROJECT_LIB)/linkcmds
 
<font color='#000088'>+$(PROJECT_INCLUDE)/bsp/bestcomm/bestcomm_priv.h: bestcomm/bestcomm_priv.h $(PROJECT_INCLUDE)/bsp/bestcomm/$(dirstamp)
+       $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp/bestcomm/bestcomm_priv.h
+PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp/bestcomm/bestcomm_priv.h
+
+$(PROJECT_INCLUDE)/bsp/bestcomm/dma_image.h: bestcomm/dma_image.h $(PROJECT_INCLUDE)/bsp/bestcomm/$(dirstamp)
+       $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp/bestcomm/dma_image.h
+PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp/bestcomm/dma_image.h
+
+$(PROJECT_INCLUDE)/bsp/bestcomm/dma_image.capi.h: bestcomm/dma_image.capi.h $(PROJECT_INCLUDE)/bsp/bestcomm/$(dirstamp)
+       $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp/bestcomm/dma_image.capi.h
+PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp/bestcomm/dma_image.capi.h
+
+$(PROJECT_INCLUDE)/bsp/bestcomm/bestcomm_api.h: bestcomm/bestcomm_api.h $(PROJECT_INCLUDE)/bsp/bestcomm/$(dirstamp)
+       $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp/bestcomm/bestcomm_api.h
+PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp/bestcomm/bestcomm_api.h
+
+$(PROJECT_INCLUDE)/bsp/bestcomm/bestcomm_glue.h: bestcomm/bestcomm_glue.h $(PROJECT_INCLUDE)/bsp/bestcomm/$(dirstamp)
+       $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp/bestcomm/bestcomm_glue.h
+PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp/bestcomm/bestcomm_glue.h
+
+$(PROJECT_INCLUDE)/bsp/bestcomm/include/ppctypes.h: bestcomm/include/ppctypes.h $(PROJECT_INCLUDE)/bsp/bestcomm/include/$(dirstamp)
+       $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp/bestcomm/include/ppctypes.h
+PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp/bestcomm/include/ppctypes.h
+
+$(PROJECT_INCLUDE)/bsp/bestcomm/include/sdma.h: bestcomm/include/mgt5200/sdma.h $(PROJECT_INCLUDE)/bsp/bestcomm/include/$(dirstamp)
+       $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp/bestcomm/include/sdma.h
+PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp/bestcomm/include/sdma.h
+
+$(PROJECT_INCLUDE)/bsp/bestcomm/include/mgt5200.h: bestcomm/include/mgt5200/mgt5200.h $(PROJECT_INCLUDE)/bsp/bestcomm/include/$(dirstamp)
+       $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp/bestcomm/include/mgt5200.h
+PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp/bestcomm/include/mgt5200.h
+
+$(PROJECT_INCLUDE)/bsp/bestcomm/include/mgt5200/mgt5200.h: bestcomm/include/mgt5200/mgt5200.h $(PROJECT_INCLUDE)/bsp/bestcomm/include/mgt5200/$(dirstamp)
+       $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp/bestcomm/include/mgt5200/mgt5200.h
+PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp/bestcomm/include/mgt5200/mgt5200.h
+
+$(PROJECT_INCLUDE)/bsp/bestcomm/include/mgt5200/sdma.h: bestcomm/include/mgt5200/sdma.h $(PROJECT_INCLUDE)/bsp/bestcomm/include/mgt5200/$(dirstamp)
+       $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp/bestcomm/include/mgt5200/sdma.h
+PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp/bestcomm/include/mgt5200/sdma.h
+
+$(PROJECT_INCLUDE)/bsp/bestcomm/task_api/tasksetup_general.h: bestcomm/task_api/tasksetup_general.h $(PROJECT_INCLUDE)/bsp/bestcomm/task_api/$(dirstamp)
+       $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp/bestcomm/task_api/tasksetup_general.h
+PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp/bestcomm/task_api/tasksetup_general.h
+
+$(PROJECT_INCLUDE)/bsp/bestcomm/task_api/tasksetup_bdtable.h: bestcomm/task_api/tasksetup_bdtable.h $(PROJECT_INCLUDE)/bsp/bestcomm/task_api/$(dirstamp)
+       $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp/bestcomm/task_api/tasksetup_bdtable.h
+PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp/bestcomm/task_api/tasksetup_bdtable.h
+
+$(PROJECT_INCLUDE)/bsp/bestcomm/task_api/bestcomm_cntrl.h: bestcomm/task_api/bestcomm_cntrl.h $(PROJECT_INCLUDE)/bsp/bestcomm/task_api/$(dirstamp)
+       $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp/bestcomm/task_api/bestcomm_cntrl.h
+PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp/bestcomm/task_api/bestcomm_cntrl.h
+
+$(PROJECT_INCLUDE)/bsp/bestcomm/task_api/bestcomm_api_mem.h: bestcomm/task_api/bestcomm_api_mem.h $(PROJECT_INCLUDE)/bsp/bestcomm/task_api/$(dirstamp)
+       $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp/bestcomm/task_api/bestcomm_api_mem.h
+PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp/bestcomm/task_api/bestcomm_api_mem.h
+
</font> $(PROJECT_INCLUDE)/bsp/irq-generic.h: ../../shared/include/irq-generic.h $(PROJECT_INCLUDE)/bsp/$(dirstamp)
        $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp/irq-generic.h
 PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp/irq-generic.h
<font color='#997700'>@@ -97,6 +173,10 @@
</font>   $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp/irq-info.h
 PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp/irq-info.h
 
<font color='#000088'>+$(PROJECT_INCLUDE)/bsp/utility.h: ../../shared/include/utility.h $(PROJECT_INCLUDE)/bsp/$(dirstamp)
+       $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp/utility.h
+PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp/utility.h
+
</font> $(PROJECT_INCLUDE)/bsp/irq.h: include/irq.h $(PROJECT_INCLUDE)/bsp/$(dirstamp)
        $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp/irq.h
 PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp/irq.h

<font color='#006600'>diff -u rtems/c/src/lib/libbsp/powerpc/gen5200/startup/cpuinit.c:1.9 rtems/c/src/lib/libbsp/powerpc/gen5200/startup/cpuinit.c:1.10
--- rtems/c/src/lib/libbsp/powerpc/gen5200/startup/cpuinit.c:1.9        Sun Nov 29 09:27:07 2009
+++ rtems/c/src/lib/libbsp/powerpc/gen5200/startup/cpuinit.c    Mon Nov 15 04:55:02 2010
</font><font color='#997700'>@@ -112,16 +112,16 @@
</font>   bat_ptr->batl.pp   = flg_bpp;
 }
 
<font color='#880000'>-#if defined (BRS5L)
-void cpu_init_bsp(void)
</font><font color='#000088'>+static void cpu_init_bsp(void)
</font> {
<font color='#000088'>+#if defined (BRS5L)
</font>   BAT dbat;
 
   calc_dbat_regvals(
     &dbat,
     (uint32_t) bsp_ram_start,
     (uint32_t) bsp_ram_size,
<font color='#880000'>-    true,
</font><font color='#000088'>+    false,
</font>     false,
     false,
     false,
<font color='#997700'>@@ -133,7 +133,7 @@
</font>     &dbat,
     (uint32_t) bsp_rom_start,
     (uint32_t) bsp_rom_size,
<font color='#880000'>-    true,
</font><font color='#000088'>+    false,
</font>     false,
     false,
     false,
<font color='#997700'>@@ -164,10 +164,7 @@
</font>     BPP_RW
   );
   SET_DBAT(3,dbat.batu,dbat.batl);
<font color='#880000'>-}
</font> #elif defined (HAS_UBOOT)
<font color='#880000'>-void cpu_init_bsp(void)
-{
</font>   BAT dbat;
   uint32_t start = 0;
 
<font color='#997700'>@@ -178,7 +175,7 @@
</font>     &dbat,
     bsp_uboot_board_info.bi_memstart,
     bsp_uboot_board_info.bi_memsize,
<font color='#880000'>-    true,
</font><font color='#000088'>+    false,
</font>     false,
     false,
     false,
<font color='#997700'>@@ -203,7 +200,7 @@
</font>     &dbat,
     start,
     bsp_uboot_board_info.bi_flashsize,
<font color='#880000'>-    true,
</font><font color='#000088'>+    false,
</font>     false,
     false,
     false,
<font color='#997700'>@@ -242,11 +239,45 @@
</font>     );
     SET_DBAT(3,dbat.batu,dbat.batl);
   }
<font color='#880000'>-}
</font> #else
 #warning "Using BAT register values set by environment"
 #endif
 
<font color='#000088'>+#if defined(BSP_TYPE_DP2)
+  /* Enable BAT4-7 */
+  PPC_SET_SPECIAL_PURPOSE_REGISTER_BITS(HID2, BSP_BBIT32(13));
+
+  /* FPGA */
+  calc_dbat_regvals(
+    &dbat,
+    0xf0020000,
+    128 * 1024,
+    false,
+    true,
+    false,
+    true,
+    BPP_RW
+  );
+  SET_DBAT(4, dbat.batu, dbat.batl);
+#elif defined(PM520_ZE30)
+  /* Enable BAT4-7 */
+  PPC_SET_SPECIAL_PURPOSE_REGISTER_BITS(HID2, BSP_BBIT32(13));
+
+  /* External CC770 CAN controller available in version 2 */
+  calc_dbat_regvals(
+    &dbat,
+    0xf2000000,
+    128 * 1024,
+    false,
+    true,
+    false,
+    true,
+    BPP_RW
+  );
+  SET_DBAT(4, dbat.batu, dbat.batl);
+#endif
+}
+
</font> void cpu_init(void)
 {
   uint32_t msr;

<font color='#006600'>diff -u rtems/c/src/lib/libbsp/powerpc/gen5200/startup/linkcmds.brs5l:1.7 rtems/c/src/lib/libbsp/powerpc/gen5200/startup/linkcmds.brs5l:1.8
--- rtems/c/src/lib/libbsp/powerpc/gen5200/startup/linkcmds.brs5l:1.7   Wed Sep  3 10:40:11 2008
+++ rtems/c/src/lib/libbsp/powerpc/gen5200/startup/linkcmds.brs5l       Mon Nov 15 04:55:02 2010
</font><font color='#997700'>@@ -5,7 +5,7 @@
</font>  */
 
 MEMORY {
<font color='#880000'>-   RAM : ORIGIN = 0x0, LENGTH = 256M
</font><font color='#000088'>+      RAM : ORIGIN = 0x0, LENGTH = 128M
</font>   ROM : ORIGIN = 0xffe00000, LENGTH = 2M
        DPRAM : ORIGIN = 0xff000000, LENGTH = 1k
        REGS : ORIGIN = 0xf0000000, LENGTH = 64k

<font color='#006600'>diff -u /dev/null rtems/c/src/lib/libbsp/powerpc/gen5200/startup/linkcmds.dp2:1.1
--- /dev/null   Wed Nov 17 08:11:17 2010
+++ rtems/c/src/lib/libbsp/powerpc/gen5200/startup/linkcmds.dp2 Mon Nov 15 04:55:02 2010
</font><font color='#997700'>@@ -0,0 +1,15 @@
</font><font color='#000088'>+/**
+ * @file
+ *
+ * Linker command file for the Direct Prototyping Data Processing board.
+ */
+
+MEMORY {
+       RAM : ORIGIN = 0x0, LENGTH = 64M
+       ROM : ORIGIN = 0xffe00000, LENGTH = 2M
+       DPRAM : ORIGIN = 0xff000000, LENGTH = 1k
+       REGS : ORIGIN = 0xf0000000, LENGTH = 64k
+       NIRVANA : ORIGIN = 0x0, LENGTH = 0
+}
+
+INCLUDE linkcmds.base
</font></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>