Enabling smptests for i386/pc386 (for #2138)
joel at rtems.org
Thu Mar 8 23:56:42 UTC 2018
On Thu, Mar 8, 2018 at 12:22 PM, Amaan Cheval <amaan.cheval at gmail.com>
> In reference to #2138; I'd like to give fixing this issue a shot to get my
> wet with RTEMS.
> I tried enabling the tests in ./testsuites/smptests/ to find a way to make
> test fail at first, so I'd have a frame of reference, but I couldn't quite
> the test to be compiled for i386 at all.
> (I'm not quite sure yet how --enable-tests determines which of the
> get built - I think bspopts.h.in is generated based on the BSP-specific
> Based on the little note about --enable-smp in the docs, I added the
> along with --enable-tests during the configure stage.
> Full command:
> ../kernel/configure --prefix=$HOME/bin/rtems/5-i386 --target=i386-rtems5
> --enable-rtemsbsp=pc386 --enable-posix --enable-tests --enable-smp
I don't think it is your problem but you have to build a higher CPU model
to have atomic instructions. I think pc586-sse is OK.
I tried to build it and got these build errors:
In file included from
error: variable or field 'Interrupt_frame' declared void
error: size of array 'unused_space_for_cache_line_alignment' is too large
Is that what you see?
The history of the SMP effort is that the SPARC, PowerPC, and ARM
turned out to be more attractive to developers and early adopters. The
i386 didn't get updated as the SMP evolved.
The i386 has a handful of known SMP issues with tickets and apparently
some bitrot as the SMP implementation evolved and no one kept the
i386 up to date.
It would be appreciated to fix build errors and get it working no matter
what the issues are. Look at the comparable code in the architectures
I listed to see what the proper thing to do is. I suspect the i386 is not
Disclaimer: the pc386 is based primarily on legacy hardware. It supports
just enough of the new PIC to handle SMP interrupts. This limits the number
of IRQ sources. There is an open project related to that. But the SMP
did work and should be a few patches of rot and known bugs away.
> This results in a failure at the make step (at least as of commit cf2024
> a quick test against 828049, after running bootstrap -H as well)).
> Before the preinstall stage was removed, BSP_HAS_SMP in
> ./c/src/lib/libbsp/i386/pc386/include/bspopts.h.in was undef'd as well,
> seems to be relevant.
> I haven't dug enough into what may be causing the error; I'm sending this
> erring on the side of asking too many questions, since I figured it'd be
> effective to just get help and work faster from the collective genius of
> Am I just doing something inherently misguided in even trying to enable
> tests for i386?
>  https://gist.github.com/AmaanC/03566c18793ff61a25328bfaf395df09
> devel mailing list
> devel at rtems.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the devel