On 09/25/2014 05:47 PM, Philippe Gerum wrote:
> On 09/25/2014 05:42 PM, Philippe Gerum wrote:
>> On 09/25/2014 05:14 PM, Philippe Gerum wrote:
>>> On 09/25/2014 04:52 PM, Reitinger, Peter wrote:
>>>> Dear Xenomai people,
>>>>
>>>> I have recently tried to migrate from 2.x to 3.x, but when I tried to run
>>>> xeno-test, I get the following output:
>>>>
>>>>
>>>
>>> [snip]
>>>
>>>> [ 94.434282] [Xenomai] bad syscall <167772715>
>>>> Segmentation fault
>>>> root@dimm-am335x:/usr/xenomai/bin#
>>>>
>>>>
>>>>
>>>> Probably I just forgot one or another little thing to adapt...?
>>>>
>>>
>>> This is not a Xenomai 3 syscall signature, but a Xenomai 2.x's. Could
>>> you provide the output of /usr/xenomai/bin/version -a?
>>>
>>
>> Never mind, I can reproduce on igep, this looks like arm-specific. I'll
>> follow up on this. Thanks.
>>
>
> Ok, the watchdog fired while running the quata scheduling test, which is
> legitimate with the default 4s threshold. What went wrong is that some
> of the watchdog bits were not updated to the new syscall format.
> Raising CONFIG_XENO_OPT_WATCHDOG_TIMEOUT to a larger value will prevent
> the trigger (or disabling CONFIG_XENO_OPT_WATCHDOG as well), while I'm
> fixing this.
>
Nope, disabling the watchdog won't be enough, as the Cobalt core uses a
mayday trap internally for other purpose. However, this patch should fix
the issue:
diff --git a/kernel/cobalt/arch/arm/mayday.c
b/kernel/cobalt/arch/arm/mayday.c
index d6b7924..724200b 100644
--- a/kernel/cobalt/arch/arm/mayday.c
+++ b/kernel/cobalt/arch/arm/mayday.c
@@ -35,7 +35,7 @@ void xnarch_setup_mayday_page(void *page)
* ef000000 svc 0x00000000
* e3a00000 mov r0, #0
* e5800000 str r0, [r0] ; <bug>
- * 0a00022b .word 0x0a00022b ; __xn_sys_mayday << 24
+ * 1000005e .word 0x1000005e ; sc_cobalt_mayday |
__COBALT_SYSCALL_BIT
* 000f0042 .word 0x000f0042
*
* elif ARM_OABI
@@ -44,7 +44,7 @@ void xnarch_setup_mayday_page(void *page)
* ef9f0042 swi 0x009f0042
* e3a00000 mov r0, #0
* e5800000 str r0, [r0] ; <bug>
- * 0a00022b .word 0x0a00022b ; __xn_sys_mayday << 24
+ * 1000005e .word 0x1000005e ; sc_cobalt_mayday |
__COBALT_SYSCALL_BIT
*
* endif
*
@@ -69,7 +69,7 @@ void xnarch_setup_mayday_page(void *page)
.swi_0 = 0xef000000,
.mov_r0 = 0xe3a00000,
.str_r0 = 0xe5800000,
- .cst_r0 = 0x0a00022b,
+ .cst_r0 = sc_cobalt_mayday | __COBALT_SYSCALL_BIT,
.cst_r7 = 0x000f0042,
};
#else /* OABI */
@@ -84,7 +84,7 @@ void xnarch_setup_mayday_page(void *page)
.swi_syscall = 0xef9f0042,
.mov_r0 = 0xe3a00000,
.str_r0 = 0xe5800000,
- .cst_r0 = 0x0a00022b,
+ .cst_r0 = sc_cobalt_mayday | __COBALT_SYSCALL_BIT,
};
#endif /* OABI */
--
Philippe.
_______________________________________________
Xenomai mailing list
[email protected]
http://www.xenomai.org/mailman/listinfo/xenomai