Article ID: 000077320 Content Type: Troubleshooting Last Reviewed: 03/15/2019

Why does it show “Bad mode in Error handler detected on CPU2, code 0xbf000000 – Serror” on Linux during accessing registers in FPGA part through the S10 SoC lwsoc2fpga bridge?

Environment

  • Intel® Quartus® Prime Pro Edition
  • BUILT IN - ARTICLE INTRO SECOND COMPONENT
    Description

    You may see the error above when using devmem2 to access the registers on FPGA part through lwsoc2fpga bridge. The devmem2 is operating in user space for Linux which is EL0. By default, all HPS Peripherals will be assumed as Privileged. In this case, you need to change a slave as non-Privileged for devmem2 to access. The log just likes as below:

    root@stratix10swvp:~# devmem2 0xf9001080 w 1

    /dev/mem opened.

    [  143.622724] Bad mode in Error handler detected on CPU2, code 0xbf000000 -- SError

    Memory mapped at address 0xffffa02b8000.

    Read at address  0xF9001080 (0xffffa02b8080): 0x0000000000000007

    [  143.631637] Internal error: Oops - bad mode: 0 [#2] PREEMPT SMP

    [  143.646851] Modules linked in: leds_gpio ip_tables x_tables ipv6

    [  143.652846] CPU: 2 PID: 1780 Comm: devmem2 Tainted: G      D         4.12.0 #1

    [  143.660032] Hardware name: SoCFPGA Stratix 10 SoCDK (DT)

    [  143.665319] task: ffff80003bec0000 task.stack: ffff80003b4a0000

    [  143.671214] PC is at 0xffffa01b62d0

    [  143.674685] LR is at 0xffffa01aa3d4

    [  143.678157] pc : [<0000ffffa01b62d0>] lr : [<0000ffffa01aa3d4>] pstate: 60000000

    [  143.685516] sp : 0000fffff4c1e710

    [  143.688814] x29: 0000fffff4c1e710 x28: 0000000000000000

    [  143.694103] x27: 0000000000000007 x26: 0000000000000001

    [  143.699391] x25: 0000ffffa02b8080 x24: 0000000000000003

    [  143.704679] x23: 0000000000000001 x22: 0000fffff4c1e9e0

    [  143.709967] x21: 0000fffff4c1e9e0 x20: 0000fffff4c1e890

    [  143.715256] x19: 0000fffff4c1e790 x18: 0000000000000001

    [  143.720544] x17: 0000ffffa0191ce0 x16: 0000000000411250

    [  143.725832] x15: 0000ffffa02bd030 x14: 0000ffffa0147c8c

    [  143.731121] x13: 0000ffffa02bc000 x12: ffffffffffffffff

    [  143.736409] x11: 0000fffff4c1e980 x10: 0000fffff4c1e980

    [  143.741698] x9 : ffffff80ffffffd0 x8 : 0000fffff4c1e950

    [  143.746986] x7 : 0000000000000001 x6 : 0000ffffa0136040

    [  143.752274] x5 : 0000ffffa02ad6f0 x4 : 0000ffffa0289808

    [  143.757562] x3 : 0000fffff4c1e9e0 x2 : ffffffffffffffff

    [  143.762850] x1 : 0000fffff4c1e9e0 x0 : 0000fffff4c1e790

    [  143.768140] Process devmem2 (pid: 1780, stack limit = 0xffff80003b4a0000)

    [  143.774980] ---[ end trace 530aa55983d4a86d ]---

    Segmentation fault 

    Broadcast message from systemd-journald@stratix10swvp (Sun 2017-09-24 07:20:59 UTC):

    kernel[1711]: [  143.631637] Internal error: Oops - bad mode: 0 [#2] PREEMPT SMP

    Resolution

    You can change the privilege in U-Boot with command below to solve this issue.

    mw 0xffd248000x60000000

    Related Products

    This article applies to 1 products

    Intel® Programmable Devices