#3727 new defect

RTEMS 5 raises exception on mvme2100 VME CPU board (PowerPC)

Reported by: Goetz Pfeiffer Owned by:
Priority: high Milestone:
Component: arch/powerpc Version: 5
Severity: blocker Keywords: PowerPC mvme2100 exception
Cc: Blocked By:
Blocking:

Description

Hello,
version 5 of RTEMS crashes on a mvme2100 CPU board.

Here are details of the RTEMS version:

repository  : git://git.rtems.org/rtems.git
branch      : master
version     : cbfc3415607a6943823e8fc47c38408dcc7dbd90
last commit : Thu Mar 14 08:20:54 2019 +0100

build commands:

  ./bootstrap
  mkdir -p build
  cd build
  ../configure --target=powerpc-rtems5 --enable-tests --enable-rtemsbsp="mvme2100 beatnik" --prefix /home/pfeiffer/rtems/rtems/5
  make -sj
  make install

Booted File:

  build/powerpc-rtems5/c/mvme2100/testsuites/libtests/dl10.exe

Boot Messages:

PPC5-Bug>nab

NetBoot about to Begin... Press <ESC> to Bypass, <SPC> to Continue

Network Booting from: DEC21143, Controller 0, Device 0
Device Name: /pci@fec00000/pci1011,19@e,0:0,0
Loading: /opt/IOC/idcp/dl10.exe

Client IP Address      = 193.149.12.202
Server IP Address      = 193.149.12.6
Gateway IP Address     = 193.149.12.1
Subnet IP Address Mask = 255.255.255.0
Boot File Name         = /opt/IOC/idcp/dl10.exe
Argument File Name     = 

Network Boot File load in progress... To abort hit <BREAK>

Bytes Received =&8812400, Bytes Loaded =&8812400
Bytes/Second   =&734366, Elapsed Time =12 Second(s)

Residual-Data Located at: $01F5511C

Exception: Program (Illegal Instruction)
SRR0 =00005000 SRR1 =00083040 Vector-Offset =00700
IP     =00005000 MSR    =00003040 CR     =00000000 FPSCR  =00000000
R0     =00000000 R1     =01F00000 R2     =00000000 R3     =01F5511C
R4     =00005000 R5     =00000000 R6     =00000000 R7     =00000000
R8     =00000000 R9     =00000000 R10    =00000000 R11    =00000000
R12    =00000000 R13    =00000000 R14    =00000000 R15    =00000000
R16    =00000000 R17    =00000000 R18    =00000000 R19    =00000000
R20    =00000000 R21    =00000000 R22    =00000000 R23    =00000000
R24    =00000000 R25    =00000000 R26    =00000000 R27    =00000000
R28    =00000000 R29    =00000000 R30    =00000000 R31    =00000000
SPR0   =9BBF322F SPR1   =00000000 SPR8   =00000000 SPR9   =00000000
00005000 7F454C46  WORD        $7F454C46
PPC5-Bug>

I have seen that dl10.exe compiled for the "beatnik" board support does not crash on a mvme5500 CPU board.

Change History (4)

comment:1 Changed on Mar 28, 2019 at 2:58:42 PM by Goetz Pfeiffer

An exception also occurs when I build the examples-v2 project and load

examples-v2/hello/both_hello/o-optimize/both_hello.ralf

The exceprion with "hello.ralf" does not occur when I use branch "examples-v2-4-10-branch" of examples-v2 and RTEMS 4.10.

comment:2 Changed on Mar 29, 2019 at 12:32:48 PM by Goetz Pfeiffer

It seems that *.exe files cannot be loaded from the mvme2100 CPU anyway, but
*.ralf files do.

So, in order to reproduce the bug you have to check out examples-v2 (https://git.rtems.org/examples-v2), build it and load "both_hello.ralf".

On the mvme2100 cpu this still gives an exception.

The command

hexdump both_hello.ralf | less 

shows that the file starts with ".ELF" in ASCII representation, so it is an probably an ELF file. This is probably not the format the CPU bootloader can load.

I verified that for the "beatnik" board support, the file "both_hello.ralf" does not start with ".ELF", and there the hello world example works.

comment:3 Changed on Mar 29, 2019 at 1:22:00 PM by Joel Sherrill

The transformation step on linked executables (.exe) to downloadable images (.ralf) was dropped from the build system between 4.11 and 5. This is now something that should be done manually.

Specifically the bsp-post-link step is no longer performed. For BSPs that had one, the bsp-post-link definition is still present but not used in the RTEMS build tree. I am unsure offhand it if is used when building applications against the installed RTEMS image like the examples-v2 do with the rtems_waf build system (assuming waf is what you used there)

https://git.rtems.org/rtems/tree/bsps/powerpc/motorola_powerpc/config/mvme2100.cfg

I think this may be what you are seeing.

comment:4 in reply to:  3 Changed on Mar 29, 2019 at 10:33:47 PM by Chris Johns

Replying to Joel Sherrill:

I am unsure offhand it if is used when building applications against the installed RTEMS image like the examples-v2 do with the rtems_waf build system (assuming waf is what you used there)

It will depend on the build system used to build examples-v2. The 4.10 would be Makefile.inc based and if the internal change to drop the post link conversion is exposed to the make build of examples-v2 it would also be dropped. The waf build does not support any post link conversions because there is no clean way this information could be captured. The work to add this type of support in a uniform way is complex and large given the number of BSPs we have.

Note: See TracTickets for help on using tickets.