2023-10-13 01:55 PM - edited 2023-10-18 12:16 PM
I'm still trying to get a fully error free bootup on the stm32mp151 based board. I'm using ST git's for the bootstages and kernel/rootfs are build using the ST yocto layers.
But because i'm unsure which are actually errors and which are just warnings I can ignore. Nor want to start 5 threads for each one, I figured it was best to combine them in one. Chances are likely they are inter related anyway.
I get this error, but further in the bootlog optee is properly initialized, so can this be ignored?
[ 0.109710] Driver 'scmi-optee' was unable to register with bus_type 'tee' because the bus was not initialized.
This is the main issue, am I forgetting someting in the DT? (attached)
[ 0.516254] sysfs: cannot create duplicate filename '/devices/platform/cpufreq-dt'
[ 0.516281] CPU: 0 PID: 38 Comm: kworker/u2:3 Not tainted 6.1.28-dirty #1
[ 0.516303] Hardware name: STM32 (Device Tree Support)
[ 0.516314] Workqueue: events_unbound deferred_probe_work_func
[ 0.516363] unwind_backtrace from show_stack+0x10/0x14
[ 0.516398] show_stack from dump_stack_lvl+0x40/0x4c
[ 0.516425] dump_stack_lvl from sysfs_warn_dup+0x58/0x64
[ 0.516455] sysfs_warn_dup from sysfs_create_dir_ns+0xe8/0xfc
[ 0.516482] sysfs_create_dir_ns from create_dir+0x1c/0x164
[ 0.516512] create_dir from kobject_add_internal+0xa4/0x208
[ 0.516540] kobject_add_internal from kobject_add+0x5c/0xcc
[ 0.516569] kobject_add from device_add+0x110/0x6a0
[ 0.516606] device_add from platform_device_add+0x120/0x250
[ 0.516641] platform_device_add from platform_device_register_full+0x108/0x158
[ 0.516674] platform_device_register_full from stm32_cpufreq_probe+0xf0/0x198
[ 0.516710] stm32_cpufreq_probe from platform_probe+0x5c/0xbc
[ 0.516740] platform_probe from really_probe+0xe0/0x414
[ 0.516767] really_probe from __driver_probe_device+0x9c/0x130
[ 0.516791] __driver_probe_device from driver_probe_device+0x30/0xc0
[ 0.516815] driver_probe_device from __device_attach_driver+0xa8/0x120
[ 0.516840] __device_attach_driver from bus_for_each_drv+0x80/0xd0
[ 0.516864] bus_for_each_drv from __device_attach+0xac/0x214
[ 0.516886] __device_attach from bus_probe_device+0x84/0x8c
[ 0.516909] bus_probe_device from deferred_probe_work_func+0x94/0xd4
[ 0.516932] deferred_probe_work_func from process_one_work+0x1d8/0x518
[ 0.516968] process_one_work from worker_thread+0x220/0x50c
[ 0.516997] worker_thread from kthread+0xd8/0xf4
[ 0.517024] kthread from ret_from_fork+0x14/0x2c
[ 0.517050] Exception stack(0xde8adfb0 to 0xde8adff8)
[ 0.517066] dfa0: 00000000 00000000 00000000 00000000
[ 0.517082] dfc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[ 0.517096] dfe0: 00000000 00000000 00000000 00000000 00000013 00000000
[ 0.517109] kobject_add_internal failed for cpufreq-dt with -EEXIST, don't try to register things with the same name in the same directory.
What are those device links?
[ 3.571308] stpmic1 0-0033: PMIC Chip Version: 0x21
[ 3.626911] stpmic1-regulator 5c002000.i2c:stpmic@33:regulators: Failed to create device link (0x180) with 0-0033
[ 3.651272] stpmic1-regulator 5c002000.i2c:stpmic@33:regulators: Failed to create device link (0x180) with 0-0033
[ 3.660104] stpmic1-regulator 5c002000.i2c:stpmic@33:regulators: Failed to create device link (0x180) with 0-0033
These can be ignored?
[ 3.904198] dwc2 49000000.usb-otg: supply vusb_d not found, using dummy regulator
[ 3.921734] dwc2 49000000.usb-otg: supply vusb_a not found, using dummy regulator
[ 9.682918] systemd[1]: Huge Pages File System was skipped because of an unmet condition check (ConditionPathExists=/sys/kernel/mm/hugepages).
[ 10.247547] systemd[1]: File System Check on Root Device was skipped because of an unmet condition check (ConditionPathIsReadWrite=!/).
[ 10.303876] systemd[1]: systemd-journald.service: unit configures an IP firewall, but the local system does not support BPF/cgroup firewalling.
[ 10.345984] systemd[1]: (This warning is only shown for the first unit using IP firewalling.)
2023-11-17 07:33 AM - edited 2023-11-17 10:52 AM
@allard.potmaIt's probably indeed the same issue, so your posts are where they belong.
2023-11-19 04:25 AM - edited 2023-11-19 05:58 AM
Well I've tried adding the pmic things to the optee device tree... After building with Yocto (st recipes) result is even worse than it was before.
I/TC: OP-TEE version: 3.19.0-dev (gcc version 12.2.0 (GCC)) #1 Fri Oct 14 19:00:05 UTC 2022 arm
I/TC: WARNING: This OP-TEE configuration might be insecure!
I/TC: WARNING: Please check https://optee.readthedocs.io/en/latest/architecture/porting_guidelines.html
I/TC: Primary CPU initializing
I/TC: Platform stm32mp1: flavor PLATFORM_FLAVOR - DT stm32mp151a-tios-mx.dts
I/TC: DTB enables console (non-secure)
E/TC:0 0 probe_dt_drivers:750 Probe sequence result: 0x80000000
E/TC:0 0 Panic
Building optee with the altered device tree (attached) doesn't show any issues.
Next up was using the original one but build to show debug. For some reason, the scripts that build a working setup before now don't even manage to build something that get tf-a loaded... (no errors during build, using the same repo's, dt's identical to the yocto version etc...)
Panic at PC : 0x2ffeb4d1
2023-11-20 12:46 AM
Not sure if this is the problem, and why, but I think this:
interrupts-extended = <&exti 55 IRQ_TYPE_EDGE_FALLING>;
needs to be:
interrupts-extended = <&gpioa 0 IRQ_TYPE_EDGE_FALLING>;
In optee
2023-11-24 10:50 AM - edited 2023-11-24 12:06 PM
So atleast I managed to fix my scripts, no idea how though..
For some reason the fip build did something that optee doesn't like...
Either way, attached are three logs, all of which have optee debug enabled:
@allard.potmaTried altering that interrupt line, same kind of panic.
NOTICE: CPU: STM32MP151AAC Rev.Z
NOTICE: Model: STMicroelectronics custom STM32CubeMX board - openstlinux-6.1-yocto-mickledore-mp1-v23.06.21
NOTICE: BL2: v2.8-stm32mp1-r1.1(release):61924c0(61924c04)
NOTICE: BL2: Built : 18:44:39, Nov 24 2023
NOTICE: BL2: Booting BL32
I/TC: Early console on UART#4
I/TC:
I/TC: Embedded DTB found
I/TC: OP-TEE version: 3.19.0-stm32mp-r1.1-dev (gcc version 11.3.0 (GCC)) #7 Fri Nov 24 19:00:30 UTC 2023 arm
I/TC: WARNING: This OP-TEE configuration might be insecure!
I/TC: WARNING: Please check https://optee.readthedocs.io/en/latest/architecture/porting_guidelines.html
I/TC: Primary CPU initializing
I/TC: WARNING: All debug access are allowed
I/TC: Platform stm32mp1: flavor PLATFORM_FLAVOR - DT stm32mp151a-tios-mx.dts
I/TC: DTB enables console (non-secure)
E/TC:0 0 probe_dt_drivers:750 Probe sequence result: 0x80000000
E/TC:0 0 Panic at core/kernel/dt_driver.c:754 <probe_dt_drivers>
E/TC:0 0 TEE load address @ 0xde000000
E/TC:0 0 Call stack:
E/TC:0 0 0xde002601
E/TC:0 0 0xde014581
E/TC:0 0 0xde0139e1
E/TC:0 0 0xde0150b5
E/TC:0 0 0xde00242f
E/TC:0 0 0xde00019c
According to this it is/was a known bug in ST optee repo?
2023-11-28 01:01 AM
Hello @michiel.tjampens ,
@michiel.tjampens wrote:I get this error, but further in the bootlog optee is properly initialized, so can this be ignored?
[ 0.109710] Driver 'scmi-optee' was unable to register with bus_type 'tee' because the bus was not initialized.
You can ignore this message.
BR,
Christophe