This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Help to debug boot issue

Hello

I have done a custom PCB based on Olinuxino open-source hardware. I'm having the following messages when I'm trying to boot, can someone help me to identify how to solve this?

U-Boot SPL 2021.04+olimex-1-20211108.075936 (Nov 08 2021 - 08:00:41 +0000)
DRAM: 2048 MiB
Trying to boot from MMC1
ASSERT: lib/xlat_tables_v2/xlat_tables_core.c:1150
BACKTRACE: START: assert
0: EL3: 0x48910
1: EL3: 0x4bd24
2: EL3: 0x4985c
3: EL3: 0x49964
4: EL3: 0x440bc
5: EL3: 0x11fac
6: EL3: 0x1189c
BACKTRACE: END: assert

Thanks in advance.

  • I assume you are using Arm Trusted Firmware from the limited assertion log information.

    See https://git.trustedfirmware.org/TF-A/trusted-firmware-a.git/tree/lib/xlat_tables_v2/xlat_tables_core.c for the source code.

    The assertion failure shows that you are trying to access the privileged EL (for example, EL2 or EL3) from a non-privileged EL (for example, EL0) or a less-privileged EL (EL1).   It is a programming mistake and you have to fix that.

  • Hello

    Thanks for your reply. I already managed how to go further, but now I'm stopping in "kernel BUG at arch/arm64/kernel/traps.c:407!". Is this related to what? Kernel? Root file system? Any advice please...

    HELLO! BOOT0 is starting!------!-!
    boot0 commit : 8
    boot0 version : 4.0.0
    set pll start
    set pll end
    rtc[0] value = 0x00000000
    rtc[1] value = 0x00000000
    rtc[2] value = 0x00000000
    rtc[3] value = 0x00000000
    rtc[4] value = 0x00000000
    rtc[5] value = 0x00000000
    DRAM driver version: V1.0
    DRAM Type = 3 (2:DDR2,3:DDR3,6:LPDDR2,7:LPDDR3)
    DRAM clk = 672 MHz
    DRAM zq value: 003b3bbb
    rsb_send_initseq: rsb clk 400Khz -> 3Mhz
    PMU: AXP81X
    ddr voltage = 1500 mv
    DRAM dual rank full DQ gate training OK
    DRAM size = 2048 MB
    DRAM init ok
    dram size =2048
    card boot number = 0, boot0 copy = 0
    card no is 0
    sdcard 0 line count 4
    [mmc]: mmc driver ver 2015-05-08 20:06
    [mmc]: sdc0 spd mode error, 2
    [mmc]: Wrong media type 0x00000000
    [mmc]: ***Try SD card 0***
    [mmc]: HSSDR52/SDR25 4 bit
    [mmc]: 50000000 Hz
    [mmc]: 15193 MB
    [mmc]: ***SD/MMC 0 init OK!!!***
    sdcard 0 init ok
    The size of uboot is 000f0000.
    sum=9373abea
    src_sum=9373abea
    Succeed in loading uboot from sdmmc flash.
    boot0: start load other image
    boot0: Loading BL3-1
    Loading file 0 at address 0x40000000,size 0x0000b400 success
    boot0: Loading scp
    Loading file 2 at address 0x00040000,size 0x00019c00 success
    set arisc reset to de-assert state
    Ready to disable icache.
    J9=▒ Configuring SPC Controller
    NOTICE: BL3-1: v1.0(debug):0bc348a
    NOTICE: BL3-1: Built : 01:16:30, Jan 4 2017
    NOTICE: BL3-1 commit: 0bc348ab272ad81a4faf128ef38f4724f36fded6

    INFO: BL3-1: Initializing runtime services
    INFO: BL3-1: Preparing for EL3 exit to normal world
    INFO: BL3-1: Next image address = 0x4a000000
    INFO: BL3-1: Next image spsr = 0x1d3


    U-Boot 2014.07-4-pine64-gf38a9d4 (Nov 23 2021 - 06:21:41) Allwinner Technology

    uboot commit : f38a9d42a764cb9c1afa31ea0bc9757bbff901e4

    rsb: secure monitor exist
    [ 0.388]pmbus: ready
    [ 0.391][ARISC] :arisc initialize
    [ 0.826][ARISC] :arisc_dvfs_cfg_vf_table: support only one vf_table
    [SCP] :sunxi-arisc driver begin startup 2
    [SCP] :arisc_para size:1a8
    [SCP] :arisc version: [v0.1.76]
    [SCP] :sunxi-arisc driver v1.10 is starting
    [ 0.987][ARISC] :sunxi-arisc driver startup succeeded
    [ 1.032]PMU: AXP81X
    [ 1.034]PMU: AXP81X found
    bat_vol=1091, ratio=100
    [ 1.041]PMU: dcdc2 1100
    [ 1.044]PMU: cpux 1008 Mhz,AXI=336 Mhz
    PLL6=600 Mhz,AHB1=200 Mhz, APB1=100Mhz AHB2=300Mhz MBus=400Mhz
    device_type = 3253, onoff=1
    dcdc1_vol = 3300, onoff=1
    dcdc2_vol = 1100, onoff=1
    dcdc6_vol = 1100, onoff=1
    aldo1_vol = 3300, onoff=1
    aldo2_vol = 1800, onoff=1
    aldo3_vol = 3000, onoff=1
    dldo1_vol = 3300, onoff=0
    dldo2_vol = 3300, onoff=0
    dldo3_vol = 2800, onoff=0
    dldo4_vol = 3300, onoff=1
    eldo1_vol = 1800, onoff=1
    eldo2_vol = 1800, onoff=0
    eldo3_vol = 1800, onoff=0
    fldo1_vol = 1200, onoff=0
    fldo2_vol = 1100, onoff=1
    gpio0_vol = 3100, onoff=0
    gpio1_vol = 3100, onoff=0
    vbus not exist
    no battery, limit to dc
    run key detect
    no key found
    no uart input
    DRAM: 2 GiB
    fdt addr: 0xb6eba640
    Relocation Offset is: 75f0c000
    In: serial
    Out: serial
    Err: serial
    gic: sec monitor mode
    [ 1.892]start
    drv_disp_init
    init_clocks: finish init_clocks.
    enable power vcc-hdmi-33, ret=0
    drv_disp_init finish
    boot_disp.output_disp=0
    boot_disp.output_type=3
    boot_disp.output_mode=10
    fetch script data boot_disp.auto_hpd fail
    disp0 device type(4) enable
    attched ok, mgr0<-->device1, type=4, mode=10
    [ 2.561]end
    workmode = 0,storage type = 1
    [ 2.566]MMC: 0
    [mmc]: mmc driver ver 2015-06-03 13:50:00
    SUNXI SD/MMC: 0
    [mmc]: start mmc_calibrate_delay_unit, don't access device...
    [mmc]: delay chain cal done, sample: 200(ps)
    [mmc]: media type 0x0
    [mmc]: Wrong media type 0x0
    [mmc]: ************Try SD card 0************
    [mmc]: host caps: 0x27
    [mmc]: MID 03 PSN 379f237a
    [mmc]: PNM SC16G -- 0x53-43-31-36-47
    [mmc]: PRV 8.0
    [mmc]: MDT m-7 y-2019
    [mmc]: speed mode : HSSDR52/SDR25
    [mmc]: clock : 50000000 Hz
    [mmc]: bus_width : 4 bit
    [mmc]: user capacity : 15193 MB
    [mmc]: ************SD/MMC 0 init OK!!!************
    [mmc]: erase_grp_size : 0x1WrBlk*0x200=0x200 Byte
    [mmc]: secure_feature : 0x0
    [mmc]: secure_removal_type : 0x0
    [ 2.931]sunxi flash init ok
    [mmc]: Has init
    [ 3.018]---drivers/mmc/mmc.c 2733 mmc_init
    reading uboot.env
    FAT: Misaligned buffer address (b6e945e8)
    --------fastboot partitions--------
    mbr not exist
    base bootcmd=run mmcbootcmd
    bootcmd set setargs_mmc
    key 0
    recovery key high 12, low 10
    fastboot key high 6, low 4
    no misc partition is found
    to be run cmd=run mmcbootcmd
    update dtb dram start
    update dtb dram end
    serial is: 340078f4c71c34100ad0
    Model: a64-olinuxino
    no battery exist
    sunxi_bmp_logo_display
    [mmc]: Has init
    [ 3.615]---drivers/mmc/mmc.c 2733 mmc_init
    reading bootlogo.bmp
    3148922 bytes read in 160 ms (18.8 MiB/s)
    bmp file buffer: 0x41000000, bmp_info.buffer: 47400000
    fetch script data boot_disp.output_full fail
    screen_id =0, screen_width =1920, screen_height =1080
    frame buffer address 47400036
    [ 4.673]inter uboot shell
    Hit any key to stop autoboot: 0
    [mmc]: Has init
    [ 7.930]---drivers/mmc/mmc.c 2733 mmc_init
    reading uEnv.txt
    [mmc]: blkcnt should not be 0
    118 bytes read in 5 ms (22.5 KiB/s)
    Loading boot environment ...
    [mmc]: Has init
    [ 7.952]---drivers/mmc/mmc.c 2733 mmc_init
    reading boot.scr
    ** Unable to read file boot.scr **
    Booting with defaults ...
    [mmc]: Has init
    [ 7.972]---drivers/mmc/mmc.c 2733 mmc_init
    reading a64/a64-olinuxino.dtb
    67677 bytes read in 8 ms (8.1 MiB/s)
    [mmc]: Has init
    [ 8.028]---drivers/mmc/mmc.c 2733 mmc_init
    reading a64/Image
    19787784 bytes read in 985 ms (19.2 MiB/s)
    [mmc]: Has init
    [ 9.027]---drivers/mmc/mmc.c 2733 mmc_init
    reading initrd.gz
    1104262 bytes read in 57 ms (18.5 MiB/s)
    ## Flattened Device Tree blob at 45000000
    Booting using the fdt blob at 0x45000000
    reserving fdt memory region: addr=41010000 size=10000
    reserving fdt memory region: addr=41020000 size=800
    reserving fdt memory region: addr=40100000 size=4000
    reserving fdt memory region: addr=40104000 size=1000
    reserving fdt memory region: addr=40105000 size=1000
    reserving fdt memory region: addr=45000000 size=11000
    Loading Ramdisk to b6da5000, end b6eb2986 ... OK
    Loading Device Tree to 44feb000, end 44ffefff ... OK

    Starting kernel ...

    [mmc]: MMC Device 2 not found
    [mmc]: mmc 2 not find, so not exit
    INFO: BL3-1: Next image address = 0x41000000
    INFO: BL3-1: Next image spsr = 0x3c5
    [ 0.000000] Internal error: Oops - BUG: 0 [#1] SMP
    [ 0.000000] Modules linked in:
    [ 0.000000] CPU: 0 PID: 0 Comm: swapper Not tainted 5.10.60 #1
    [ 0.000000] Hardware name: sun50iw1p1 (DT)
    [ 0.000000] pstate: 00000085 (nzcv daIf -PAN -UAO -TCO BTYPE=--)
    [ 0.000000] pc : do_undefinstr+0x358/0x378
    [ 0.000000] lr : do_undefinstr+0x270/0x378
    [ 0.000000] sp : ffff800011133cc0
    [ 0.000000] x29: ffff800011133cc0 x28: ffff800011141640
    [ 0.000000] x27: ffff800010c2ff60 x26: ffff800010c5f930
    [ 0.000000] x25: 0000000000000003 x24: ffffff00ff000000
    [ 0.000000] x23: 0000000040000085 x22: ffff8000100104f0
    [ 0.000000] x21: ffff800011133ea0 x20: ffff800011141640
    [ 0.000000] x19: ffff800011133d50 x18: 0000000000000001
    [ 0.000000] x17: 0000000000000000 x16: 0000000000000000
    [ 0.000000] x15: ffffffffffffffff x14: ffffffffff000000
    [ 0.000000] x13: ffffffffffffffff x12: 0000000000000018
    [ 0.000000] x11: 0000000000000020 x10: 0101010101010101
    [ 0.000000] x9 : fffffffffffffffe x8 : 7f7f7f7f7f7f7f7f
    [ 0.000000] x7 : fefefeff6862726f x6 : ffff800011133d18
    [ 0.000000] x5 : 0000000000000000 x4 : ffff8000112e4110
    [ 0.000000] x3 : 0000000000000000 x2 : ffff8000111435a8
    [ 0.000000] x1 : ffff8000112e4110 x0 : 0000000040000085
    [ 0.000000] Call trace:
    [ 0.000000] do_undefinstr+0x358/0x378
    [ 0.000000] el1_undef+0x30/0x50
    [ 0.000000] el1_sync_handler+0x8c/0xc8
    [ 0.000000] el1_sync+0x88/0x140
    [ 0.000000] get_cpu_ops+0x0/0x20
    [ 0.000000] setup_arch+0x414/0x594
    [ 0.000000] start_kernel+0x80/0x534
    [ 0.000000] ------------[ cut here ]------------
    [ 0.000000] kernel BUG at arch/arm64/kernel/traps.c:407!

  • It is weird that after "starting kernel...", the code execution flow shows "INFO: BL3-1: Next image address = 0x41000000
    INFO: BL3-1: Next image spsr = 0x3c5".  From u-boot, you should configure and jump to Linux kernel address, but you jumps the BL31 wrongly or at least BL31 entry point overlaps part of your kernel memory.