pc386 BSP/master branch build failure with smp enabled.
Gedare Bloom
gedare at rtems.org
Sat Sep 12 04:59:46 UTC 2020
On Fri, Sep 11, 2020 at 11:53 AM Karel Gardas <karel.gardas at centrum.cz> wrote:
>
> On 9/11/20 6:16 PM, Gedare Bloom wrote:
> > Looks to be coming through
> >
> > cpukit/score/cpu/i386/include/rtems/asm.h:157 movb
> > imps_apic_cpu_map(\REG),\REG /* CPU ID in REG */
> >
> > The assembler is right to complain. movb has to target one of the
> > 1-byte mnemonics, so this should be %al for the LSB of %eax. One needs
> > to check through this logic carefully, but I think the right thing to
> > do here is:
> > movzbl imps_apic_cpu_map(\REG),\REG
> >
> > That should do the trick. Can you test it locally?
>
> Sure! Builds fine and testsuite testing reveals:
>
Great. I opened #4076 to apply this fix on 5 branch. It should also go
to master. I'll try to remember to circle back to this, probably
after the weekend. If anyone wants to generate the patch or gets to it
sooner, great :)
>
> on Ubuntu 18.04 LTS's Qemu 2.11.1:
>
> Passed: 625
> Failed: 9
> User Input: 6
> Expected Fail: 0
> Indeterminate: 0
> Benchmark: 3
> Timeout: 5
> Invalid: 7
> Wrong Version: 0
> Wrong Build: 0
> Wrong Tools: 0
> ------------------
> Total: 655
> Failures:
> dl06.exe
> psx12.exe
> psxfenv01.exe
> smpmulticast01.exe
> spfatal26.exe
> spfatal30.exe
> sptimecounter02.exe
> tm26.exe
> tmcontext01.exe
> User Input:
> dl10.exe
> monitor.exe
> termios.exe
> top.exe
> capture.exe
> fileio.exe
> Benchmark:
> linpack.exe
> whetstone.exe
> dhrystone.exe
> Timeouts:
> dl05.exe
> ttest02.exe
> cdtest.exe
> cxx_iostream.exe
> smpopenmp01.exe
> Invalid:
> smpfatal09.exe
> spfatal06.exe
> spfatal09.exe
> spfatal12.exe
> spinternalerror01.exe
> spstkalloc02.exe
> sptimecounter01.exe
> Average test time: 0:00:00.535252
> Testing time : 0:05:50.589935
>
>
> on qemu 5.1.0:
>
> Passed: 626
> Failed: 7
> User Input: 6
> Expected Fail: 0
> Indeterminate: 0
> Benchmark: 3
> Timeout: 6
> Invalid: 7
> Wrong Version: 0
> Wrong Build: 0
> Wrong Tools: 0
> ------------------
> Total: 655
> Failures:
> dl06.exe
> psx12.exe
> psxfenv01.exe
> smpfatal03.exe
> smpmulticast01.exe
> spfatal30.exe
> tmcontext01.exe
> User Input:
> dl10.exe
> monitor.exe
> termios.exe
> top.exe
> capture.exe
> fileio.exe
> Benchmark:
> linpack.exe
> whetstone.exe
> dhrystone.exe
> Timeouts:
> dl05.exe
> ttest02.exe
> cdtest.exe
> cxx_iostream.exe
> smpopenmp01.exe
> spfatal26.exe
> Invalid:
> smpfatal09.exe
> spfatal06.exe
> spfatal09.exe
> spfatal12.exe
> spinternalerror01.exe
> spstkalloc02.exe
> sptimecounter01.exe
> Average test time: 0:00:00.705858
> Testing time : 0:07:42.336669
>
>
> and finally on qemu 4.2.1:
>
> Passed: 627
> Failed: 6
> User Input: 6
> Expected Fail: 0
> Indeterminate: 0
> Benchmark: 3
> Timeout: 6
> Invalid: 7
> Wrong Version: 0
> Wrong Build: 0
> Wrong Tools: 0
> ------------------
> Total: 655
> Failures:
> dl06.exe
> psx12.exe
> psxfenv01.exe
> smpmulticast01.exe
> spfatal30.exe
> tmcontext01.exe
> User Input:
> dl10.exe
> monitor.exe
> termios.exe
> top.exe
> capture.exe
> fileio.exe
> Benchmark:
> whetstone.exe
> dhrystone.exe
> linpack.exe
> Timeouts:
> dl05.exe
> ttest02.exe
> cdtest.exe
> cxx_iostream.exe
> smpopenmp01.exe
> spfatal26.exe
> Invalid:
> smpfatal09.exe
> spfatal06.exe
> spfatal09.exe
> spfatal12.exe
> spinternalerror01.exe
> spstkalloc02.exe
> sptimecounter01.exe
> Average test time: 0:00:00.705055
> Testing time : 0:07:41.811329
>
>
> >
> > On Fri, Sep 11, 2020 at 6:54 AM Karel Gardas <karel.gardas at centrum.cz> wrote:
> >>
> >>
> >> Hello,
> >>
> >> I've built 6/rtems-i386 tools using master branch of rtems-source-builder.
> >>
> >> $ i386-rtems6-gcc -v
> >> Using built-in specs.
> >> COLLECT_GCC=i386-rtems6-gcc
> >> COLLECT_LTO_WRAPPER=/export/home/karel/sfw/rtems/6-head-2020-09-11/libexec/gcc/i386-rtems6/10.2.1/lto-wrapper
> >> Target: i386-rtems6
> >> Configured with: ../gnu-mirror-gcc-75f5776/configure
> >> --prefix=/export/home/karel/sfw/rtems/6-head-2020-09-11
> >> --bindir=/export/home/karel/sfw/rtems/6-head-2020-09-11/bin
> >> --exec_prefix=/export/home/karel/sfw/rtems/6-head-2020-09-11
> >> --includedir=/export/home/karel/sfw/rtems/6-head-2020-09-11/include
> >> --libdir=/export/home/karel/sfw/rtems/6-head-2020-09-11/lib
> >> --libexecdir=/export/home/karel/sfw/rtems/6-head-2020-09-11/libexec
> >> --mandir=/export/home/karel/sfw/rtems/6-head-2020-09-11/share/man
> >> --infodir=/export/home/karel/sfw/rtems/6-head-2020-09-11/share/info
> >> --datadir=/export/home/karel/sfw/rtems/6-head-2020-09-11/share
> >> --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=i386-rtems6
> >> --disable-libstdcxx-pch --with-gnu-as --with-gnu-ld --verbose
> >> --with-newlib --disable-nls --without-included-gettext
> >> --disable-win32-registry --enable-version-specific-runtime-libs
> >> --disable-lto --enable-newlib-io-c99-formats --enable-newlib-iconv
> >> --enable-newlib-iconv-encodings=big5,cp775,cp850,cp852,cp855,cp866,euc_jp,euc_kr,euc_tw,iso_8859_1,iso_8859_10,iso_8859_11,iso_8859_13,iso_8859_14,iso_8859_15,iso_8859_2,iso_8859_3,iso_8859_4,iso_8859_5,iso_8859_6,iso_8859_7,iso_8859_8,iso_8859_9,iso_ir_111,koi8_r,koi8_ru,koi8_u,koi8_uni,ucs_2,ucs_2_internal,ucs_2be,ucs_2le,ucs_4,ucs_4_internal,ucs_4be,ucs_4le,us_ascii,utf_16,utf_16be,utf_16le,utf_8,win_1250,win_1251,win_1252,win_1253,win_1254,win_1255,win_1256,win_1257,win_1258
> >> --enable-threads --disable-plugin --enable-libgomp --enable-languages=c,c++
> >> Thread model: rtems
> >> Supported LTO compression algorithms: zlib
> >> gcc version 10.2.1 20200904 (RTEMS 6, RSB
> >> a81a237f3e2318d88a16b31aadb82333498e06fd, Newlib a0d7982) (GCC)
> >>
> >>
> >> I'm using those tools to build pc686 BSP with SMP enabled. The BSP is
> >> configured with:
> >>
> >> $ ../rtems-head/configure --prefix=$HOME/sfw/rtems/6-head-2020-09-11/
> >> --target=i386-rtems6 --enable-maintainer-mode --enable-rtemsbsp=pc686
> >> --enable-posix --enable-smp
> >>
> >> The build fails with:
> >>
> >> make[4]: Entering directory
> >> '/export/home/karel/git/rtems/obj-rtems6/i386-rtems6/c/pc686/cpukit'
> >> depbase=`echo score/cpu/i386/cpu_asm.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
> >> i386-rtems6-gcc --pipe -DHAVE_CONFIG_H -I.
> >> -I/export/home/karel/git/rtems/obj-rtems6/i386-rtems6/c/pc686/include
> >> -I/export/home/karel/git/rtems/rtems-head/cpukit/include
> >> -I/export/home/karel/git/rtems/rtems-head/cpukit/score/cpu/i386/include
> >> -I/export/home/karel/git/rtems/rtems-head/cpukit/libnetworking -DASM
> >> -mtune=pentiumpro -march=pentium -O2 -g -ffunction-sections
> >> -fdata-sections -Wall -Wmissing-prototypes
> >> -Wimplicit-function-declaration -Wstrict-prototypes -Wnested-externs
> >> -mtune=pentiumpro -march=pentium -O2 -g -ffunction-sections
> >> -fdata-sections -Wall -Wmissing-prototypes
> >> -Wimplicit-function-declaration -Wstrict-prototypes -Wnested-externs -MT
> >> score/cpu/i386/cpu_asm.o -MD -MP -MF $depbase.Tpo -c -o
> >> score/cpu/i386/cpu_asm.o
> >> ../../../../../rtems-head/c/src/../../cpukit/score/cpu/i386/cpu_asm.S &&\
> >> mv -f $depbase.Tpo $depbase.Po
> >> ../../../../../rtems-head/c/src/../../cpukit/score/cpu/i386/cpu_asm.S:
> >> Assembler messages:
> >> ../../../../../rtems-head/c/src/../../cpukit/score/cpu/i386/cpu_asm.S:54: Error:
> >> `%edx' not allowed with `movb'
> >> ../../../../../rtems-head/c/src/../../cpukit/score/cpu/i386/cpu_asm.S:78: Warning:
> >> no instruction mnemonic suffix given and no register operands; using
> >> default for `bts'
> >> ../../../../../rtems-head/c/src/../../cpukit/score/cpu/i386/cpu_asm.S:93: Error:
> >> `%ecx' not allowed with `movb'
> >> ../../../../../rtems-head/c/src/../../cpukit/score/cpu/i386/cpu_asm.S:118:
> >> Error: `%edx' not allowed with `movb'
> >> Makefile:11553: recipe for target 'score/cpu/i386/cpu_asm.o' failed
> >> make[4]: *** [score/cpu/i386/cpu_asm.o] Error 1
> >> make[4]: Leaving directory
> >> '/export/home/karel/git/rtems/obj-rtems6/i386-rtems6/c/pc686/cpukit'
> >> Makefile:1272: recipe for target 'cpukit' failed
> >> make[3]: *** [cpukit] Error 2
> >>
> >> it seems the problematic code was added by the patch:
> >>
> >> commit 8937f12f1884f08c8a53fc339d60b1021846882a
> >> Author: Jan Sommer <jan.sommer at dlr.de>
> >> Date: Sun May 31 16:22:54 2020 +0200
> >>
> >> bsp/pc386: Update context switch and restore
> >>
> >> Uses similar flow in cpu_asm.S for i386 as for arm.
> >>
> >>
> >> Shall I add a ticket for this or am I doing anything wrong/unexpected here?
> >>
> >> Thanks,
> >> Karel
> >> _______________________________________________
> >> devel mailing list
> >> devel at rtems.org
> >> http://lists.rtems.org/mailman/listinfo/devel
>
More information about the devel
mailing list