The Great Watchdog Hack

Chris Johns cjohns at cybertec.com.au
Mon Dec 9 01:00:36 UTC 2002


Joel Sherrill wrote:

> Paul Evans wrote:>
> >This isn't working, so I'm wondering where RTEMS is spending it's time
> >during power up. Any ideas?
>
> Zero'ing the workspace could be a huge consumer of time.  This can be
> disabled by the BSP via the do_zero_of_workspace of the CPU
> Configuration Table.

Are you sure this is ok ?

When I was checking the IDLE code for changes in the printing of the IDLE label by 
the monitor I noticed a comment in cpukit/score/src/threadcreateidle.c:

   /*
    *  The entire workspace is zeroed during its initialization.  Thus, all
    *  fields not explicitly assigned were explicitly zeroed by
    *  _Workspace_Initialization.
    */

   _Thread_Idle = _Thread_Internal_allocate();

Could this cause problems if the workspace is not initialised ?

> You could also hook each of the initialization user extension points
> and reset it.

.. or have the timer interrupt contain a counter that is decremented until 0 and 
while not zero it hits the watchdog. Set the counter to be long enough to allow the 
initialisation to complete.

-- 
  Chris Johns, cjohns at cybertec.com.au




More information about the users mailing list