got it…i accidentally built a 32bit uboot-binary for r64 (had forgotten to enable the arch=arm64 in build.conf)
but i see this error in uboot (seems to come from my env loading which loads to loadaddr=0x44000000):
ERROR: reserving fdt memory region failed (addr=0 size=43000000 flags=4)
maybe because uboot tries to allocate memory in region already blocked by kernel fdt?
and on running this:
echo c > /proc/sysrq-trigger
i get a stacktrace:
root@bpi-r64:~# echo c > /proc/sysrq-trigger
[ 236.402700] sysrq: Trigger a crash
[ 236.406121] Kernel panic - not syncing: sysrq triggered crash
[ 236.411863] CPU: 0 PID: 298 Comm: bash Tainted: G S 5.17.0-rc1-bpi-r64-r64 #1
[ 236.420298] Hardware name: Bananapi BPI-R64 (DT)
[ 236.424910] Call trace:
[ 236.427350] dump_backtrace+0xe0/0x114
[ 236.431105] show_stack+0x18/0x64
[ 236.434419] dump_stack_lvl+0x68/0x84
[ 236.438081] dump_stack+0x18/0x34
[ 236.441393] panic+0x130/0x2e8
[ 236.444445] sysrq_reset_seq_param_set+0x0/0x94
[ 236.448977] __handle_sysrq+0xc0/0x174
[ 236.452724] write_sysrq_trigger+0x9c/0xf8
[ 236.456819] proc_reg_write+0x8c/0xa4
[ 236.460479] vfs_write+0x90/0x108
[ 236.463792] ksys_write+0x70/0xdc
[ 236.467105] __arm64_sys_write+0x18/0x24
[ 236.471024] invoke_syscall+0x6c/0xf8
[ 236.474685] el0_svc_common.constprop.0+0xb0/0xdc
[ 236.479387] do_el0_svc+0x44/0x74
[ 236.482700] el0_svc+0x20/0x4c
[ 236.485752] el0t_64_sync_handler+0xcc/0x154
[ 236.490018] el0t_64_sync+0x1a0/0x1a4
[ 236.493679] SMP: stopping secondary CPUs
[ 236.497607] Kernel Offset: disabled
[ 236.501088] CPU features: 0x0,00006002,00000842
[ 236.505613] Memory Limit: none
[ 236.508663] ---[ end Kernel panic - not syncing: sysrq triggered crash ]---
source:
u-boot and linux 5.17
based on dts change i guess i need the CONFIG_ARM_PSCI_CPUIDLE_DOMAIN in kernel, right (currently set to “n”)?
but still the crash…
root@bpi-r64:~# zgrep 'PSTORE' /proc/config.gz
CONFIG_PSTORE=y
CONFIG_PSTORE_DEFAULT_KMSG_BYTES=10240
CONFIG_PSTORE_DEFLATE_COMPRESS=y
# CONFIG_PSTORE_LZO_COMPRESS is not set
# CONFIG_PSTORE_LZ4_COMPRESS is not set
# CONFIG_PSTORE_LZ4HC_COMPRESS is not set
# CONFIG_PSTORE_842_COMPRESS is not set
# CONFIG_PSTORE_ZSTD_COMPRESS is not set
CONFIG_PSTORE_COMPRESS=y
CONFIG_PSTORE_DEFLATE_COMPRESS_DEFAULT=y
CONFIG_PSTORE_COMPRESS_DEFAULT="deflate"
CONFIG_PSTORE_CONSOLE=y
CONFIG_PSTORE_PMSG=y
CONFIG_PSTORE_RAM=y
# CONFIG_PSTORE_BLK is not set
root@bpi-r64:~# zgrep 'IDLE' /proc/config.gz
CONFIG_NO_HZ_IDLE=y
CONFIG_CPU_IDLE=y
CONFIG_CPU_IDLE_MULTIPLE_DRIVERS=y
# CONFIG_CPU_IDLE_GOV_LADDER is not set
CONFIG_CPU_IDLE_GOV_MENU=y
# CONFIG_CPU_IDLE_GOV_TEO is not set
CONFIG_DT_IDLE_STATES=y
# CONFIG_ARM_CPUIDLE is not set
CONFIG_ARM_PSCI_CPUIDLE=y
CONFIG_ARM_PSCI_CPUIDLE_DOMAIN=y
CONFIG_GENERIC_SMP_IDLE_THREAD=y
CONFIG_GENERIC_IDLE_POLL_SETUP=y
# CONFIG_IDLE_PAGE_TRACKING is not set
# CONFIG_NETFILTER_XT_TARGET_IDLETIMER is not set
or is this as intended (c=crash)?
sysrq: Trigger a crash
but i have nothing in the /sys/fs/pstore/ dir
root@bpi-r64:~# mount -t pstore pstore /sys/fs/pstore
mount: /sys/fs/pstore: pstore already mounted on /sys/fs/pstore.
root@bpi-r64:~# ls /sys/fs/pstore/
root@bpi-r64:~#
looks like in uboot there is something in pstore
BPI-R64> pstore display
Compressed buffer, display not available
BPI-R64>
but in linux still empty
root@bpi-r64:~# dmesg | grep -i pstore
[ 0.015542] pstore: Registered ramoops as persistent store backend
[ 1.582087] pstore: Using crash dump compression: deflate
root@bpi-r64:~#
root@bpi-r64:~# ls /sys/fs/pstore/
root@bpi-r64:~#
after reboot (without power-loss) pstore in uboot is empty again
so i disabled compression in linux and i can see content in uboot…
BPI-R64> pstore display
**** Dump
Panic#1 Part1
<7>[ 7.500652] mt7615e 0000:01:00.0: enabling bus mastering
<7>[ 7.500835] mtk-pcie 1a143000.pcie: msi#0 address_hi 0x0 address_lo 0x410b50c0
...
<6>[ 57.450520] sysrq: Trigger a crash
<0>[ 57.453941] Kernel panic - not syncing: sysrq triggered crash
<7>[ 57.459684] CPU: 1 PID: 292 Comm: bash Tainted: G S 5.17.0-rc1-bpi-r64-r64 #4
<7>[ 57.468118] Hardware name: Bananapi BPI-R64 (DT)
<7>[ 57.472729] Call trace:
<7>[ 57.475168] dump_backtrace+0xe0/0x114
so pstore seems to work across boot (wait after crash for reboot), so after display the pstore in uboot booting into same linux kernel again…but pstore there is empty again