[Bug 2148] New: Blackfin doesn't switch tasks, resets dispatch_necessary before querying it
bugzilla-daemon at rtems.org
bugzilla-daemon at rtems.org
Tue Oct 15 17:11:50 UTC 2013
https://www.rtems.org/bugzilla/show_bug.cgi?id=2148
Bug #: 2148
Summary: Blackfin doesn't switch tasks, resets
dispatch_necessary before querying it
Classification: Unclassified
Product: RTEMS
Version: HEAD
Platform: All
OS/Version: RTEMS
Status: NEW
Severity: normal
Priority: P3
Component: cpukit
AssignedTo: joel.sherrill at oarcorp.com
ReportedBy: rtemsdev at ixo.de
Problem xperienced with bf537Stamp BSP on real hardware (a board with
ADSP-BF537 and just SDRAM and flash attached, only PLL, SDRAM, and UART are
initialized):
The ticker sample starts its three tasks, but all stall forever in
rtems_task_wake_after(x) for any x greater than 1. Only the Idle task runs.
The clockISR and rtems_clock_tick are executed and clock count is incremented.
Debugging via JTAG with breakpoint at _Thread_Delay_ends made me discover that:
1. _Thread_Dispatch_necessary = true is set by _Scheduler_priority_unblock
2. Then it is cleared in cpukit/score/cpu/bfin/cpu_asm.S:480 (doDispatch) by
writing 0 to DISPATCH_NEEDED
3. Finally _Thread_Dispatch, called by _ISR15_Handler, doesn't do any
Context_Switch because per_cpu->dispatch_necessary (the very same byte) is
zero.
As a workaround, removing the two lines after doDispatch in cpu_asm.S leads to
a running ticker sample.
doDispatch:
/* r0 = 0: */
/* B[p0] = r0; */
raise 15;
I have not tried other tests yet. I suspect some more inconsistencies. This
doesn't appear like it ever worked...?
Also see discussion here:
http://www.rtems.org/pipermail/rtems-users/2013-October/012038.html
Another occurence with similar outcome, maybe for the same reason:
http://www.rtems.org/pipermail/rtems-users/2013-May/011544.html
Probably in RTEMS since 2008, with background e.g. discussed here:
http://www.rtems.org/pipermail/rtems-users/2008-April/003129.html
--
Configure bugmail: https://www.rtems.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching all bug changes.
More information about the bugs
mailing list