This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM3358: PRU Started with U-Boot Stops When Kernel Starts

Part Number: AM3358

Hello!

On our Beaglebone Black board we use the PRU to drive an LED matrix at boot time via u-boot. After upgrading to Yocto Dunfell we encountered an issue where in the first few seconds of the kernel booting the LED matrix would suddenly stop showing anything, indicating that the PRU was no longer running. This did not happen on kernel 4.12 using UIO, but does happen on Kernel linux-ti-staging-5.10.158.

What's most strange about this is that it seems the PRU is reset long before the pru_rproc kernel module is loaded, the LED matrix consistently cuts out in the first 3 seconds of boot time,

In u-boot it doesn't seem to be possible to use remoteproc to boot the PRU on the AM3358, so it is unclear to me if there is a straightforward way to handoff the PRU from u-boot to Linux uninterrupted.

Any help would be greatly appreciated and I can supply more details as needed!


In case it is useful here is our uEnv.txt and boot log:
uEnv.txt:
rootpart=1:2
flagpart=1:5
bootdir=/boot
pru1textfile=/lib/firmware/pru-display/text.bin
pru1text=0x4a338000
pru1datafile=/lib/firmware/pru-display/data.bin
pru1data=0x4a302000
shareddatafile=/lib/firmware/pru-display/splash.bin
shareddata=0x4a310000
bootfile=zImage
console=ttyO0,115200n8
fdtaddr=0x88000000
fdtfile=xl-bone.dtb
loadaddr=0x82000000
mmcroot=/dev/mmcblk1p2 ro
mmcrootfstype=ext4 rootwait
optargs=consoleblank=0
mmcargs=setenv bootargs console=${console} root=${mmcroot} rootfstype=${mmcrootfstype} ${optargs}
loadfdt=load mmc ${rootpart} ${fdtaddr} ${bootdir}/${fdtfile}
loadimage=load mmc ${rootpart} ${loadaddr} ${bootdir}/${bootfile}
boot_three=setenv rootpart 1:3; setenv mmcroot /dev/mmcblk1p3
findroot=\
    if test -e mmc ${flagpart} three; then \
        if test -e mmc ${flagpart} three_ok; then \
            run boot_three; \
        elif test ! -e mmc ${flagpart} three_tried; then \
            fatwrite mmc ${flagpart} ${loadaddr} three_tried 4; \
            run boot_three; \
        fi; \
    elif test -e mmc ${flagpart} two; then \
        if test ! -e mmc ${flagpart} two_ok; then \
            if test -e mmc ${flagpart} two_tried; then \
                run boot_three; \
            else \
                fatwrite mmc ${flagpart} ${loadaddr} two_tried 4; \
            fi; \
        fi; \
    fi;
uenvcmd=\
    run findroot; \
    echo Using root partition ${rootpart}; \
    if test "${fdtfile}" = "xl-bone.dtb"; then \
        prussc 0 32 6 14 2666; \
        load mmc ${rootpart} ${pru1text} ${pru1textfile}; \
        load mmc ${rootpart} ${pru1data} ${pru1datafile}; \
        load mmc ${rootpart} ${shareddata} ${shareddatafile}; \
        pruboot 1; \
    fi; \
    if run loadfdt; then \
        echo Loaded ${fdtfile}; \
        if run loadimage; then \
            run mmcargs; \
            bootz ${loadaddr} - ${fdtaddr}; \
        fi; \
    fi;
boot log:
Starting kernel ...

[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 5.10.158-gd9ca44672c (oe-user@oe-host) (arm-poky-linux-gnueabi-gcc (GCC) 9.5.0, GNU ld (GNU Binutils) 2.34.0.20200910) #1 PREEMPT Tue Jan 24 02:11:13 UTC 2023
[    0.000000] CPU: ARMv7 Processor [413fc082] revision 2 (ARMv7), cr=10c5387d
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[    0.000000] OF: fdt: Machine model: Vorne XL (BeagleBone Black)
[    0.000000] Memory policy: Data cache writeback
[    0.000000] efi: UEFI not found.
[    0.000000] cma: Failed to reserve 512 MiB
[    0.000000] Zone ranges:
[    0.000000]   Normal   [mem 0x0000000080000000-0x000000009fdfffff]
[    0.000000]   HighMem  empty
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000080000000-0x000000009e8fffff]
[    0.000000]   node   0: [mem 0x000000009e900000-0x000000009e9fffff]
[    0.000000]   node   0: [mem 0x000000009ea00000-0x000000009fdfffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000080000000-0x000000009fdfffff]
[    0.000000] CPU: All CPU(s) started in SVC mode.
[    0.000000] AM335X ES2.1 (sgx neon)
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 129412
[    0.000000] Kernel command line: console=ttyO0,115200n8 root=/dev/mmcblk1p2 ro rootfstype=ext4 rootwait consoleblank=0
[    0.000000] Dentry cache hash table entries: 65536 (order: 6, 262144 bytes, linear)
[    0.000000] Inode-cache hash table entries: 32768 (order: 5, 131072 bytes, linear)
[    0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[    0.000000] Memory: 499452K/522240K available (10240K kernel code, 757K rwdata, 3548K rodata, 1024K init, 283K bss, 22788K reserved, 0K cma-reserved, 0K highmem)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] rcu: Preemptible hierarchical RCU implementation.
[    0.000000] rcu:     RCU event tracing is enabled.
[    0.000000]  Trampoline variant of Tasks RCU enabled.
[    0.000000]  Tracing variant of Tasks RCU enabled.
[    0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 10 jiffies.
[    0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
[    0.000000] IRQ: Found an INTC at 0x(ptrval) (revision 5.0) with 128 interrupts
[    0.000000] TI gptimer clocksource: always-on /ocp/interconnect@44c00000/segment@200000/target-module@31000
[    0.000010] sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 89478484971ns
[    0.000028] clocksource: dmtimer: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns
[    0.000394] TI gptimer clockevent: 24000000 Hz at /ocp/interconnect@48000000/segment@0/target-module@40000
[    0.001786] Console: colour dummy device 80x30
[    0.001827] WARNING: Your 'console=ttyO0' has been replaced by 'ttyS0'
[    0.001834] This ensures that you still see kernel messages. Please
[    0.001840] update your kernel commandline.
[    0.001890] Calibrating delay loop... 996.14 BogoMIPS (lpj=4980736)
[    0.090471] pid_max: default: 32768 minimum: 301
[    0.090627] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.090643] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.091519] CPU: Testing write buffer coherency: ok
[    0.091596] CPU0: Spectre v2: using BPIALL workaround
[    0.092652] Setting up static identity map for 0x80100000 - 0x80100060
[    0.092814] rcu: Hierarchical SRCU implementation.
[    0.092911] EFI services will not be available.
[    0.093301] devtmpfs: initialized
[    0.105544] VFP support v0.3: implementor 41 architecture 3 part 30 variant c rev 3
[    0.105811] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.105836] futex hash table entries: 256 (order: -1, 3072 bytes, linear)
[    0.105970] pinctrl core: initialized pinctrl subsystem
[    0.106789] DMI not present or invalid.
[    0.107499] NET: Registered protocol family 16
[    0.108069] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.126385] l3-aon-clkctrl:0000:0: failed to disable
[    0.127592] thermal_sys: Registered thermal governor 'fair_share'
[    0.127604] thermal_sys: Registered thermal governor 'bang_bang'
[    0.127618] thermal_sys: Registered thermal governor 'step_wise'
[    0.127626] thermal_sys: Registered thermal governor 'user_space'
[    0.128259] cpuidle: using governor ladder
[    0.128302] cpuidle: using governor menu
[    1.274097] No ATAGs?
[    1.274127] hw-breakpoint: debug architecture 0x4 unsupported.
[    1.300880] iommu: Default domain type: Translated
[    1.303078] SCSI subsystem initialized
[    1.303551] mc: Linux media interface: v0.10
[    1.303593] videodev: Linux video capture interface: v2.00
[    1.303707] pps_core: LinuxPPS API ver. 1 registered
[    1.303719] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    1.303741] PTP clock support registered
[    1.304729] Advanced Linux Sound Architecture Driver Initialized.
[    1.306094] clocksource: Switched to clocksource dmtimer
[    1.313547] NET: Registered protocol family 2
[    1.313839] IP idents hash table entries: 8192 (order: 4, 65536 bytes, linear)
[    1.314935] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 4096 bytes, linear)
[    1.315000] TCP established hash table entries: 4096 (order: 2, 16384 bytes, linear)
[    1.315042] TCP bind hash table entries: 4096 (order: 2, 16384 bytes, linear)
[    1.315080] TCP: Hash tables configured (established 4096 bind 4096)
[    1.315189] UDP hash table entries: 256 (order: 0, 4096 bytes, linear)
[    1.315212] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes, linear)
[    1.315353] NET: Registered protocol family 1
[    1.315955] RPC: Registered named UNIX socket transport module.
[    1.315970] RPC: Registered udp transport module.
[    1.315977] RPC: Registered tcp transport module.
[    1.315983] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    1.315995] NET: Registered protocol family 44
[    1.316016] PCI: CLS 0 bytes, default 64
[    1.317180] hw perfevents: enabled with armv7_cortex_a8 PMU driver, 5 counters available
[    1.318425] Initialise system trusted keyrings
[    1.318841] workingset: timestamp_bits=14 max_order=17 bucket_order=3
[    1.322738] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    1.323604] NFS: Registering the id_resolver key type
[    1.323671] Key type id_resolver registered
[    1.323682] Key type id_legacy registered
[    1.323783] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
[    1.323794] nfs4flexfilelayout_init: NFSv4 Flexfile Layout Driver Registering...
[    1.323833] ntfs: driver 2.1.32 [Flags: R/O].
[    1.324473] Key type asymmetric registered
[    1.324493] Asymmetric key parser 'x509' registered
[    1.324542] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 244)
[    1.324554] io scheduler mq-deadline registered
[    1.324563] io scheduler kyber registered
[    1.594479] ti-sysc: probe of 44e31000.target-module failed with error -16
[    1.644571] ti-sysc: probe of 48040000.target-module failed with error -16
[    1.739488] omap-mailbox 480c8000.mailbox: omap mailbox rev 0x400
[    1.867801] debugfs: Directory '49000000.dma' with parent 'dmaengine' already present!
[    1.867849] edma 49000000.dma: TI EDMA DMA engine driver
[    1.887212] pinctrl-single 44e10800.pinmux: 142 pins, size 568
[    1.939249] Serial: 8250/16550 driver, 10 ports, IRQ sharing enabled
[    1.943844] 44e09000.serial: ttyS0 at MMIO 0x44e09000 (irq = 20, base_baud = 3000000) is a 8250
[    2.629250] printk: console [ttyS0] enabled
[    2.635437] 481a8000.serial: ttyS4 at MMIO 0x481a8000 (irq = 38, base_baud = 3000000) is a 8250
[    2.645972] 481aa000.serial: ttyS5 at MMIO 0x481aa000 (irq = 39, base_baud = 3000000) is a 8250
[    2.657904] omap_rng 48310000.rng: Random Number Generator ver. 20
[    2.666453] random: crng init done
[    2.686418] brd: module loaded
[    2.696377] loop: module loaded
[    2.766129] davinci_mdio 4a101000.mdio: davinci mdio revision 1.6, bus freq 1000000
[    2.776287] davinci_mdio 4a101000.mdio: phy[0]: device 4a101000.mdio:00, driver SMSC LAN8710/LAN8720
[    2.786029] cpsw-switch 4a100000.switch: initialized cpsw ale version 1.4
[    2.792983] cpsw-switch 4a100000.switch: ALE Table size 1024
[    2.798831] cpsw-switch 4a100000.switch: cpts: overflow check period 500 (jiffies)
[    2.806475] cpsw-switch 4a100000.switch: CPTS: ref_clk_freq:250000000 calc_mult:2147483648 calc_shift:29 error:0 nsec/sec
[    2.817589] cpsw-switch 4a100000.switch: Detected MACID = 00:35:ff:95:da:53
[    2.825469] cpsw-switch 4a100000.switch: initialized (regs 0x4a100000, pool size 256) hw_ver:0019010C 1.12 (0)
[    2.836771] i2c /dev entries driver
[    2.843136] cpuidle: enable-method property 'ti,am3352' found operations
[    2.850621] sdhci: Secure Digital Host Controller Interface driver
[    2.856878] sdhci: Copyright(c) Pierre Ossman
[    2.862297] sdhci-pltfm: SDHCI platform and OF driver helper
[    2.870467] sdhci-omap 481d8000.mmc: supply vqmmc not found, using dummy regulator
[    2.879189] ledtrig-cpu: registered to indicate activity on CPUs
[    2.899820] pinctrl-single 44e10800.pinmux: pin PIN107 already requested by 44e10800.pinmux; cannot claim for 48038000.mcasp
[    2.926102] pinctrl-single 44e10800.pinmux: pin-107 (48038000.mcasp) status -22
[    2.933451] pinctrl-single 44e10800.pinmux: could not request pin 107 (PIN107) from group mcasp0_pins  on device pinctrl-single
[    2.946440] davinci-mcasp 48038000.mcasp: Error applying setting, reverse things back
[    2.954346] davinci-mcasp: probe of 48038000.mcasp failed with error -22
[    2.962117] NET: Registered protocol family 10
[    2.967758] Segment Routing with IPv6
[    2.971517] sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
[    2.977547] mmc1: SDHCI controller on 481d8000.mmc [481d8000.mmc] using External DMA
[    2.987139] NET: Registered protocol family 17
[    2.992126] Key type dns_resolver registered
[    2.997219] omap_voltage_late_init: Voltage driver support not added
[    3.004598] Loading compiled-in X.509 certificates
[    3.021734] gpio-26 (relay_output): hogged as output/low
[    3.027332] gpio-27 (input_mode_output): hogged as output/low
[    3.033662] OMAP GPIO hardware version 0.1
[    3.066644] tps65217-pmic: Failed to locate of_node [id: -1]
[    3.077510] mmc1: new high speed MMC card at address 0001
[    3.084266] mmcblk1: mmc1:0001 M62704 3.56 GiB
[    3.089797] tps65217-bl: Failed to locate of_node [id: -1]
[    3.095702] mmcblk1boot0: mmc1:0001 M62704 partition 1 2.00 MiB
[    3.103872] mmcblk1boot1: mmc1:0001 M62704 partition 2 2.00 MiB
[    3.110162] tps65217 0-0024: TPS65217 ID 0xe version 1.2
[    3.116251] mmcblk1rpmb: mmc1:0001 M62704 partition 3 512 KiB, chardev (243:0)
[    3.124024] pinctrl-single 44e10800.pinmux: pin PIN40 already requested by 44e10800.pinmux; cannot claim for 0-0070
[    3.134558] pinctrl-single 44e10800.pinmux: pin-40 (0-0070) status -22
[    3.141129] pinctrl-single 44e10800.pinmux: could not request pin 40 (PIN40) from group nxp_hdmi_bonelt_pins  on device pinctrl-single
[    3.153278] tda998x 0-0070: Error applying setting, reverse things back
[    3.159950] tda998x: probe of 0-0070 failed with error -22
[    3.165565] omap_i2c 44e0b000.i2c: bus 0 rev0.11 at 400 kHz
[    3.171844] gpio-46 (xl_status_output): hogged as output/low
[    3.177600] gpio-48 (digital_display): hogged as output/low
[    3.183207] gpio-50 (digital_display): hogged as output/low
[    3.188828] gpio-51 (digital_display): hogged as output/low
[    3.194434] gpio-60 (digital_display): hogged as output/low
[    3.202993]  mmcblk1: p1 p2
[    3.207559] omap_i2c 4819c000.i2c: bus 2 rev0.11 at 100 kHz
[    3.213755] gpio-66 (spi_select): hogged as output/low
[    3.220010] gpio-67 (spi_select): hogged as output/low
[    3.225191] gpio-68 (spi_select): hogged as output/low
[    3.230485] gpio-69 (spi_select): hogged as output/low
[    3.242172] cpu cpu0: _opp_add_static_v2: opp key field not found
[    3.248516] cpu cpu0: _of_add_opp_table_v2: Failed to add OPP, -19
[    3.255026] cpu cpu0: OPP table can't be empty
[    3.261142] omap_gpio 44e07000.gpio: Could not set line 6 debounce to 200000 microseconds (-22)
[    3.273117] ALSA device list:
[    3.278760]   No soundcards found.
[    3.282815] sdhci-omap 48060000.mmc: Got CD GPIO
[    3.287933] sdhci-omap 48060000.mmc: supply vqmmc not found, using dummy regulator
[    3.346405] mmc0: SDHCI controller on 48060000.mmc [48060000.mmc] using External DMA
[    3.360966] EXT4-fs (mmcblk1p2): INFO: recovery required on readonly filesystem
[    3.368496] EXT4-fs (mmcblk1p2): write access will be enabled during recovery
[    3.795364] EXT4-fs (mmcblk1p2): recovery complete
[    3.801497] EXT4-fs (mmcblk1p2): mounted filesystem with ordered data mode. Opts: (null)
[    3.809755] VFS: Mounted root (ext4 filesystem) readonly on device 179:2.
[    3.817511] devtmpfs: mounted
[    3.822003] Freeing unused kernel memory: 1024K
[    3.827121] Run /sbin/init as init process
[    4.009130] systemd[1]: System time before build time, advancing clock.
[    4.062617] systemd[1]: systemd 244.5+ running in system mode. (-PAM -AUDIT -SELINUX +IMA -APPARMOR -SMACK +SYSVINIT +UTMP -LIBCRYPTSETUP -GCRYPT -GNUTLS +ACL +XZ -LZ4 -SECCOMP +BLKID -ELFUTILS +KMOD -IDN2 -IDN -PCRE2 default-hierarchy=hybrid)
[    4.085107] systemd[1]: Detected architecture arm.

Welcome to Poky (Yocto Project Reference Distro) 3.1.22 (dunfell)!

[    4.137160] systemd[1]: Set hostname to <xl>.
[    4.431337] systemd[1]: sysinit.target: Wants dependency dropin /etc/systemd/system/sysinit.target.wants/networking.service target /etc/init.d/networking has different name
[    4.630248] systemd[1]: multi-user.target: Wants dependency dropin /etc/systemd/system/multi-user.target.wants/syslog.service target /lib/systemd/system/rsyslog.service has different name
[    4.879674] systemd[1]: Created slice system-serial\x2dgetty.slice.
[  OK  ] Created slice system-serial\x2dgetty.slice.
[    4.918246] systemd[1]: Created slice User and Session Slice.
[  OK  ] Created slice User and Session Slice.
[    4.956893] systemd[1]: Started Dispatch Password Requests to Console Directory Watch.
[  OK  ] Started Dispatch Password …ts to Console Directory Watch.
[    4.996815] systemd[1]: Started Forward Password Requests to Wall Directory Watch.
[  OK  ] Started Forward Password R…uests to Wall Directory Watch.
[    5.036777] systemd[1]: Reached target Paths.
[  OK  ] Reached target Paths.
[    5.076445] systemd[1]: Reached target Remote File Systems.
[  OK  ] Reached target Remote File Systems.
[    5.116396] systemd[1]: Reached target Slices.
[  OK  ] Reached target Slices.
[    5.156426] systemd[1]: Reached target Swap.
[  OK  ] Reached target Swap.
[    5.211778] systemd[1]: Listening on RPCbind Server Activation Socket.
[  OK  ] Listening on RPCbind Server Activation Socket.
[    5.246533] systemd[1]: Reached target RPC Port Mapper.
[  OK  ] Reached target RPC Port Mapper.
[    5.287449] systemd[1]: Listening on Syslog Socket.
[  OK  ] Listening on Syslog Socket.
[    5.327045] systemd[1]: Listening on initctl Compatibility Named Pipe.
[  OK  ] Listening on initctl Compatibility Named Pipe.
[    5.372034] systemd[1]: Condition check resulted in Journal Audit Socket being skipped.
[    5.381535] systemd[1]: Listening on Journal Socket (/dev/log).
[  OK  ] Listening on Journal Socket (/dev/log).
[    5.417451] systemd[1]: Listening on Journal Socket.
[  OK  ] Listening on Journal Socket.
[    5.457488] systemd[1]: Listening on udev Control Socket.
[  OK  ] Listening on udev Control Socket.
[    5.497069] systemd[1]: Listening on udev Kernel Socket.
[  OK  ] Listening on udev Kernel Socket.
[    5.537197] systemd[1]: Condition check resulted in Huge Pages File System being skipped.
[    5.552234] systemd[1]: Mounting POSIX Message Queue File System...
         Mounting POSIX Message Queue File System...
[    5.602661] systemd[1]: Mounting Kernel Debug File System...
         Mounting Kernel Debug File System...
[    5.653108] systemd[1]: Starting Create list of static device nodes for the current kernel...
         Starting Create list of st…odes for the current kernel...
[    5.713502] systemd[1]: Starting RPC Bind...
         Starting RPC Bind...
[    5.762529] systemd[1]: Starting File System Check on Root Device...
         Starting File System Check on Root Device...
[    5.828037] systemd[1]: Starting Journal Service...
         Starting Journal Service...
[    5.878966] systemd[1]: Starting Load Kernel Modules...
         Starting Load Kernel Modules...
[    5.947374] systemd[1]: Starting udev Coldplug all Devices...
         Starting udev Coldplug all Devices...
[    6.017735] pfi: loading out-of-tree module taints kernel.
[    6.024009] pfi: interface=eth0, pin=47
[    6.040595] systemd[1]: Started RPC Bind.
[  OK  ] Started RPC Bind.
[    6.062289] pfi: initialization succeeded
[    6.088059] systemd[1]: Mounted POSIX Message Queue File System.
[  OK  ] Mounted POSIX Message Queue File System.
[    6.127673] systemd[1]: Mounted Kernel Debug File System.
[  OK  ] Mounted Kernel Debug File System.
[    6.160389] systemd[1]: Started Create list of static device nodes for the current kernel.
[  OK  ] Started Create list of sta… nodes for the current kernel.
[    6.227338] systemd[1]: Started File System Check on Root Device.
[  OK  ] Started File System Check on Root Device.
[    6.260775] systemd[1]: Started Load Kernel Modules.
[  OK  ] Started Load Kernel Modules.
[    6.318406] systemd[1]: Condition check resulted in FUSE Control File System being skipped.
[    6.377457] systemd[1]: Mounting Kernel Configuration File System...
         Mounting Kernel Configuration File System...
[    6.423054] systemd[1]: Starting Remount Root and Kernel File Systems...
         Starting Remount Root and Kernel File Systems...
[    6.492436] systemd[1]: Starting Apply Kernel Variables...
         Starting Apply Kernel Variables...[    6.547187] EXT4-fs (mmcblk1p2): re-mounted. Opts: nodelalloc

[    6.620740] systemd[1]: Mounted Kernel Configuration File System.