AW: pc686: --enable-rtems-debug not working

Jan.Sommer at dlr.de Jan.Sommer at dlr.de
Tue Apr 23 13:27:14 UTC 2019


Hi Joel,

Thank you for the hint.
It worked and the testsuite runs through again now.
I attached a patch for the master branch.

Best regards,

   Jan

Von: Joel Sherrill [mailto:joel at rtems.org]
Gesendet: Donnerstag, 18. April 2019 15:43
An: Sommer, Jan
Cc: rtems-users at rtems.org
Betreff: Re: pc686: --enable-rtems-debug not working



On Tue, Apr 16, 2019 at 8:01 AM <Jan.Sommer at dlr.de<mailto:Jan.Sommer at dlr.de>> wrote:
Hello,

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:

$ qemu-system-i386 -append --console=/dev/com1 -no-reboot -serial stdio -monitor none -nographic  -kernel ./build/i386-rtems5/c/pc686/testsuites/samples/ticker.exe
i386: isr=0 irr=1
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

*** FATAL ***
fatal source: 7 (RTEMS_FATAL_SOURCE_ASSERT)
fatal code: 1288832 (0x0013aa80)
RTEMS version: 5.0.0.be50969881b97180bf4fc1e2975efd41169e08bb
RTEMS tools: 7.4.0 20181206 (RTEMS 5, RSB 9a3e12e5820918057633798c3fe2a1f952fb4e56, Newlib 1d35a003f)
executing thread is NULL

It seems to stem from rtems/bsps/i386/pc386/clock/ckinit.c:165:

> bsp_interrupt_vector_enable( BSP_PERIODIC_TIMER - BSP_IRQ_VECTOR_BASE );

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.
The BSP still works with the option disabled, but it makes debugging more difficult.
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.

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).

I would try deleting the subtraction in ckinit.c. The interrupt is likely already on so as written it is probably a NOP.

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.

This is all a remnant from converting to the newer BSP interrupt Framework. Just a nit.

Give that a try. It would be nice to see debug work on the pc386.

--joel


Best regards,

   Jan


Deutsches Zentrum für Luft- und Raumfahrt e. V. (DLR)
German Aerospace Center
Simulation and Software Technology | Software for Space Systems and Interactive Visualization | Lilienthalplatz 7 | 38108 Braunschweig | Germany

Jan Sommer
Telephone +49 531 295-2494 | Telefax 0531 295-2767 | jan.sommer at dlr.de<mailto:jan.sommer at dlr.de>
DLR.de/SC

_______________________________________________
users mailing list
users at rtems.org<mailto:users at rtems.org>
http://lists.rtems.org/mailman/listinfo/users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/users/attachments/20190423/a77a3bd1/attachment-0002.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-bsp-pc386-Fix-interrupt-enable-to-make-debug-option-.patch
Type: application/octet-stream
Size: 910 bytes
Desc: 0001-bsp-pc386-Fix-interrupt-enable-to-make-debug-option-.patch
URL: <http://lists.rtems.org/pipermail/users/attachments/20190423/a77a3bd1/attachment-0002.obj>


More information about the users mailing list