ARM SMP Clock driver errors
Darshit Shah
darnir at gmail.com
Mon Jun 20 13:40:16 UTC 2016
Hi,
Last week the clock driver for SMP ARM BSPs was fixed which allowed me
to start executing the SMP tests for my GSoC project. However, today I
seem to be stuck with a clock driver issue again.
When I try to execute SMP tests, the tests exit with no output and a
exit code of 0. On trying to run them in QEMU and breaking on
_Terminate(), I found out that the tests exit because of an
`RTEMS_FATAL_SOURCE_BSP` error which propagates from the
`a9mpcore_clock_secondary_initialization` method. The complete backtrace
is:
(gdb) bt
#0 _Terminate (the_source=RTEMS_FATAL_SOURCE_BSP, is_internal=false, the_error=261) at ../../../../../../../src/rtems/c/src/../../cpukit/score/src/interr.c:39
#1 0x0010f76a in rtems_fatal (source=RTEMS_FATAL_SOURCE_BSP, error=261) at ../../../../../../../src/rtems/c/src/../../cpukit/sapi/src/fatal2.c:34
#2 0x00100b0c in bsp_fatal (code=BSP_ARM_A9MPCORE_FATAL_CLOCK_SMP_INIT) at ../../../../../.././realview_pbx_a9_qemu_smp/lib/include/bsp/fatal.h:130
#3 0x00100d0a in a9mpcore_clock_secondary_initialization (gt=0x1f000200, cmpval=5963712, interval=1000000) at ../../../../../../../../../src/rtems/c/src/lib/libbsp/arm/realview-pbx-a9/../shared/arm-a9mpcore-clock-config.c:131
#4 0x00100dc2 in a9mpcore_clock_initialize () at ../../../../../../../../../src/rtems/c/src/lib/libbsp/arm/realview-pbx-a9/../shared/arm-a9mpcore-clock-config.c:151
#5 0x00100f92 in Clock_initialize (major=1, minor=0, pargp=0x0) at ../../../../../../../../../src/rtems/c/src/lib/libbsp/arm/realview-pbx-a9/../shared/../../shared/clockdrv_shell.h:236
#6 0x0011e6f0 in rtems_io_initialize (major=1, minor=0, argument=0x0) at ../../../../../../../src/rtems/c/src/../../cpukit/sapi/src/ioinitialize.c:36
#7 0x0010f79e in _IO_Initialize_all_drivers () at ../../../../../../../src/rtems/c/src/../../cpukit/sapi/src/io.c:33
#8 0x0010f73a in rtems_initialize_executive () at ../../../../../../../src/rtems/c/src/../../cpukit/sapi/src/exinit.c:139
#9 0x00101316 in boot_card (cmdline=0x0) at ../../../../../../../../../src/rtems/c/src/lib/libbsp/arm/realview-pbx-a9/../../shared/bootcard.c:78
#10 0x00100112 in bsp_vector_table_copy_done () at ../../../../../../../../../src/rtems/c/src/lib/libbsp/arm/realview-pbx-a9/../shared/start/start.S:279
Backtrace stopped: previous frame identical to this frame (corrupt stack?)
This seems to imply that RTEMS is exiting because the check on line 131
in arm-19mpcore-clock-config.c hits true and hence raises an error:
if (cmpval - a9mpcore_clock_get_counter(gt) >= interval)
And this seems to me to be a race condition since when running under
GDB, this condition sometimes evaluates to false and the code continues
executing. However, everytime that happens, RTEMS gets stuck in an
infinite loop.
As a result, I am again unable to execute SMP tests. If there is any
more debugging information I can provide, please let me know.
System: Arch Linux
RTEMS Baseline: 16706b723f788cd26a3d5cb475f5468a68dcf263
RSB Bareline: c476de6150f39afdf142c6f4420c59ba2f1aa2fe
QEMU Version: 2.3.50 (Couldn't find the commit hash, but built using RSB
at the above mentioned baseline)
--
Thanking You,
Darshit Shah
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 843 bytes
Desc: not available
URL: <http://lists.rtems.org/pipermail/devel/attachments/20160620/617cf02f/attachment.bin>
More information about the devel
mailing list