<div dir="ltr"><div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Apr 16, 2019 at 8:01 AM <<a href="mailto:Jan.Sommer@dlr.de">Jan.Sommer@dlr.de</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hello,<br>
<br>
if I build the pc686 BSP with --enable-rtems-debug activated I can't run any of the testsuites examples, but get the following error:<br>
<br>
$ qemu-system-i386 -append --console=/dev/com1 -no-reboot -serial stdio -monitor none -nographic  -kernel ./build/i386-rtems5/c/pc686/testsuites/samples/ticker.exe  <br>
i386: isr=0 irr=1<br>
assertion "bsp_interrupt_is_valid_vector(vector)" failed: file "../../../../../../../../refex-rtems/c/src/lib/libbsp/i386/pc386/../../../../../../bsps/i386/shared/irq/irq.c", line 275, function: bsp_interrupt_vector_enable<br>
<br>
*** FATAL ***<br>
fatal source: 7 (RTEMS_FATAL_SOURCE_ASSERT)<br>
fatal code: 1288832 (0x0013aa80)<br>
RTEMS version: 5.0.0.be50969881b97180bf4fc1e2975efd41169e08bb<br>
RTEMS tools: 7.4.0 20181206 (RTEMS 5, RSB 9a3e12e5820918057633798c3fe2a1f952fb4e56, Newlib 1d35a003f)<br>
executing thread is NULL<br>
<br>
It seems to stem from rtems/bsps/i386/pc386/clock/ckinit.c:165:<br>
<br>
> bsp_interrupt_vector_enable( BSP_PERIODIC_TIMER - BSP_IRQ_VECTOR_BASE );<br>
<br>
because "BSP_PERIODIC_TIMER - BSP_IRQ_VECTOR_BASE" equates to 0xFFFFFFE0, but the subsequent assert on bsp_interrupt_is_valid_vector() only allows vectors between 0 and 16.<br>
The BSP still works with the option disabled, but it makes debugging more difficult.<br>
Does someone has some guidance on this problem. I could remove the assert in bsp_interrupt_vector_enable, but I am a bit hesitant with simply removing things from core files.<br></blockquote><div><br></div><div>I suspect based on the other uses and math that this check is valid but that the calls to bsp_interrupt_vector_enable and bsp_interrupt_vector_disable in pc386/clock/ckinit.c should not be subtracting the BSP_IRQ_VECTOR_BASE. BSP_IRQ_VECTOR_BASE is set to BSP_IRQ_VECTOR_BASE which is used in conjunction with IDT manipulation. The vector passed into  bsp_interrupt_vector_*able directly corresponds to a source on the two i2859s (0-15). </div><div><br></div><div>I would try deleting the subtraction in ckinit.c. The interrupt is likely already on so as written it is probably a NOP.</div><div><br></div><div>The similar subtraction in btimer.c is probably right because the benchmark timer is installing a raw timer and the math is subtracting from an IDT index.</div><div><br></div><div>This is all a remnant from converting to the newer BSP interrupt Framework. Just a nit.</div><div><br></div><div>Give that a try. It would be nice to see debug work on the pc386.</div><div><br></div><div>--joel</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
Best regards,<br>
<br>
   Jan<br>
<br>
<br>
Deutsches Zentrum für Luft- und Raumfahrt e. V. (DLR)<br>
German Aerospace Center<br>
Simulation and Software Technology | Software for Space Systems and Interactive Visualization | Lilienthalplatz 7 | 38108 Braunschweig | Germany<br>
<br>
Jan Sommer<br>
Telephone +49 531 295-2494 | Telefax 0531 295-2767 | <a href="mailto:jan.sommer@dlr.de" target="_blank">jan.sommer@dlr.de</a><br>
DLR.de/SC<br>
<br>
_______________________________________________<br>
users mailing list<br>
<a href="mailto:users@rtems.org" target="_blank">users@rtems.org</a><br>
<a href="http://lists.rtems.org/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.rtems.org/mailman/listinfo/users</a><br>
</blockquote></div></div></div>