* RK3588 optee question
@ 2026-08-11 11:51 Alexander Shiyan
2026-08-11 12:19 ` Ahmad Fatoum
` (2 more replies)
0 siblings, 3 replies; 9+ messages in thread
From: Alexander Shiyan @ 2026-08-11 11:51 UTC (permalink / raw)
To: Barebox List
Hello All.
BL31 = rockchip bl31 from rkbin
BL32 = tee.bin builded from https://github.com/OP-TEE/optee_os.git
DDR cb12b99cc23 hcy 25/10/17-18:57:13,fwver: v1.21
...
NOTICE: BL31: v2.3():v2.3-964-g8319968f5:derrick.huang, fwver: v1.54
NOTICE: BL31: Built : 17:20:23, Dec 26 2025
...
INFO: BL31: Initialising Exception Handling Framework
INFO: BL31: Initializing runtime services
INFO: BL31: Initializing BL32
INFO: BL31: Preparing for EL3 exit to normal world
INFO: Entry point address = 0xb00000
INFO: SPSR = 0x3c9
barebox 2026.07.0-00839-g50ae8812b950-dirty #144 Tue Aug 11 14:39:36 MSK 2026
Board: Diasom DS-RK3588-BTB-EVB
rockchip-dmc memory-controller.of: Detected memory size: 0x100000000
netconsole: registered as netconsole-1
fan53555-regulator rk86020: FAN53555 Option[10] Rev[1] Detected!
vdd2_ddr: Bringing 500000uV into 1100000-1100000uV
vddq_ddr: Bringing 500000uV into 600000-600000uV
rockchip_saradc fec10000.adc@fec10000.of: registered as aiodev0
BTB revision: 3
EVB revision: 2
EVB HAT Addon detected.
arm-scmi firmware:scmi.of: SCMI Protocol v2.0 'rockchip:' Firmware version 0x0
optee: smc_abi: probing for conduit method.
optee: smc_abi: revision 4.10 (71196403f6f9f642)
ERROR: optee: smc_abi: driver requires OP-TEE dynamic shared memory support
ERROR: optee firmware:optee.of: probe failed: Function not implemented
psci psci.of: detected version 1.1
xHCI xHCI0: USB XHCI 1.10
ehci fc800000.usb@fc800000.of: USB EHCI 1.00
ehci fc880000.usb@fc880000.of: USB EHCI 1.00
xHCI xHCI1: USB XHCI 1.10
fan53555-regulator rk86021: FAN53555 Option[10] Rev[1] Detected!
fan53555-regulator rk86030: FAN53555 Option[10] Rev[1] Detected!
rtl8169_eth pci-10ec:8125.0: found RTL8125B (base=0x0000000a00000000)
mdio_bus: miibus0: probed
dw_mmc fe2c0000.mmc@fe2c0000.of: registered as mmc1
mmc1: detected SD card version 3.0
WARNING: mmc1: GPT:Primary header thinks Alt. header is not at the end
of the disk.
WARNING: mmc1: GPT:2976871 != 62333951
WARNING: mmc1: GPT:Alternate GPT header not at the end of the disk.
WARNING: mmc1: GPT:2976871 != 62333951
mmc1: GPT: will repair later if global.system.gpt_refresh=1
mmc1: registered mmc1
rk3568-dwcmshc-sdhci fe2e0000.mmc@fe2e0000.of: registered as mmc0
mmc0: detected MMC card version 5.1
mmc0: registered mmc0.boot0
mmc0: registered mmc0.boot1
mmc0: registered mmc0
i2c3: Added multiplexed i2c bus 9
i2c3: Added multiplexed i2c bus 10
i2c3: Added multiplexed i2c bus 11
i2c3: Added multiplexed i2c bus 12
pca954x pca95460: registered 4 multiplexed busses for I2C switch
xHCI xHCI2: USB XHCI 1.10
rockchip-dw-pcie a40000000.pcie@fe150000.of: Phy link never came up
rtl8169_eth pci-10ec:8125.1: found RTL8125B (base=0x0000000980000000)
mdio_bus: miibus1: probed
Setup Machine ID from EMMC serial: 1815144414
nv variable modified, will save nv variables on shutdown
malloc space: 0xb0000000 -> 0xedd0ffff (size 989.1 MiB)
CAM0: No cameras detected.
CAM1: Camera AR0234 detected.
envfs: no envfs (magic mismatch) - envfs never written?
eth1: Got preset MAC address from NVMEM: 80:34:28:75:d4:d4
eth0: Got preset MAC address from NVMEM: 80:34:28:75:cf:e7
Hit any to stop autoboot: 2
barebox@Diasom DS-RK3588-BTB-EVB-HAT:/ rksecure -i
Failed to read secure boot info
rksecure: No such device
barebox@Diasom DS-RK3588-BTB-EVB-HAT:/
Am I missing something?
The following lines confuse me, what is these line mean?:
ERROR: optee: smc_abi: driver requires OP-TEE dynamic shared memory support
ERROR: optee firmware:optee.of: probe failed: Function not implemented
Thanks!
^ permalink raw reply [flat|nested] 9+ messages in thread* Re: RK3588 optee question 2026-08-11 11:51 RK3588 optee question Alexander Shiyan @ 2026-08-11 12:19 ` Ahmad Fatoum 2026-08-11 12:54 ` Alexander Shiyan 2026-08-12 6:25 ` Sascha Hauer [not found] ` <6a7c11f4.bd9e1b36.35e6eb.4491SMTPIN_ADDED_MISSING@mx.google.com> 2 siblings, 1 reply; 9+ messages in thread From: Ahmad Fatoum @ 2026-08-11 12:19 UTC (permalink / raw) To: Alexander Shiyan, Barebox List Hi, On 8/11/26 1:51 PM, Alexander Shiyan wrote: > Am I missing something? > The following lines confuse me, what is these line mean?: > ERROR: optee: smc_abi: driver requires OP-TEE dynamic shared memory support > ERROR: optee firmware:optee.of: probe failed: Function not implemented Try enabling CFG_CORE_DYN_SHM in OP-TEE. Cheers, Ahmad -- Pengutronix e.K. | | Steuerwalder Str. 21 | http://www.pengutronix.de/ | 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: RK3588 optee question 2026-08-11 12:19 ` Ahmad Fatoum @ 2026-08-11 12:54 ` Alexander Shiyan 2026-08-11 14:07 ` Ahmad Fatoum 0 siblings, 1 reply; 9+ messages in thread From: Alexander Shiyan @ 2026-08-11 12:54 UTC (permalink / raw) To: Ahmad Fatoum; +Cc: Barebox List Hello. As far as I can see, this option (CFG_CORE_DYN_SHM) is enabled by default in out/arm-plat-rockchip/conf.mk Experiments with the open (BL31) TF-A version give a different error: ... NOTICE: BL31: v2.15.0(release):v2.15.0-274-gc64fe42d7 NOTICE: BL31: Built : 14:41:34, Jul 6 2026 ... arm-scmi firmware:scmi.of: SCMI Protocol v2.0 'rockchip:' Firmware version 0x0 optee: smc_abi: probing for conduit method. WARNING: optee: smc_abi: api uid mismatch ERROR: optee firmware:optee.of: probe failed: Invalid argument вт, 11 авг. 2026 г. в 15:19, Ahmad Fatoum <a.fatoum@pengutronix.de>: > > Hi, > > On 8/11/26 1:51 PM, Alexander Shiyan wrote: > > Am I missing something? > > The following lines confuse me, what is these line mean?: > > ERROR: optee: smc_abi: driver requires OP-TEE dynamic shared memory support > > ERROR: optee firmware:optee.of: probe failed: Function not implemented > > Try enabling CFG_CORE_DYN_SHM in OP-TEE. > > Cheers, > Ahmad > > > -- > Pengutronix e.K. | | > Steuerwalder Str. 21 | http://www.pengutronix.de/ | > 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | > Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | > ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: RK3588 optee question 2026-08-11 12:54 ` Alexander Shiyan @ 2026-08-11 14:07 ` Ahmad Fatoum 2026-08-11 14:13 ` Alexander Shiyan 0 siblings, 1 reply; 9+ messages in thread From: Ahmad Fatoum @ 2026-08-11 14:07 UTC (permalink / raw) To: Alexander Shiyan; +Cc: Barebox List Hi, On 8/11/26 2:54 PM, Alexander Shiyan wrote: > Hello. > > As far as I can see, this option (CFG_CORE_DYN_SHM) is enabled > by default in out/arm-plat-rockchip/conf.mk > > Experiments with the open (BL31) TF-A version give a different error: > ... > NOTICE: BL31: v2.15.0(release):v2.15.0-274-gc64fe42d7 > NOTICE: BL31: Built : 14:41:34, Jul 6 2026 > ... > arm-scmi firmware:scmi.of: SCMI Protocol v2.0 'rockchip:' Firmware version 0x0 > optee: smc_abi: probing for conduit method. > WARNING: optee: smc_abi: api uid mismatch > ERROR: optee firmware:optee.of: probe failed: Invalid argument Huh, no idea off the top my head what is still missing in the OP-TEE or TF-A configuration. Cheers, Ahmad > > вт, 11 авг. 2026 г. в 15:19, Ahmad Fatoum <a.fatoum@pengutronix.de>: >> >> Hi, >> >> On 8/11/26 1:51 PM, Alexander Shiyan wrote: >>> Am I missing something? >>> The following lines confuse me, what is these line mean?: >>> ERROR: optee: smc_abi: driver requires OP-TEE dynamic shared memory support >>> ERROR: optee firmware:optee.of: probe failed: Function not implemented >> >> Try enabling CFG_CORE_DYN_SHM in OP-TEE. >> >> Cheers, >> Ahmad >> >> >> -- >> Pengutronix e.K. | | >> Steuerwalder Str. 21 | http://www.pengutronix.de/ | >> 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | >> Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | >> > -- Pengutronix e.K. | | Steuerwalder Str. 21 | http://www.pengutronix.de/ | 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: RK3588 optee question 2026-08-11 14:07 ` Ahmad Fatoum @ 2026-08-11 14:13 ` Alexander Shiyan 0 siblings, 0 replies; 9+ messages in thread From: Alexander Shiyan @ 2026-08-11 14:13 UTC (permalink / raw) To: Ahmad Fatoum; +Cc: Barebox List Could someone share the correct RK3588 tee.bin binary for the test? Perhaps I compiled something incorrectly... Thanks! вт, 11 авг. 2026 г. в 17:07, Ahmad Fatoum <a.fatoum@pengutronix.de>: > > Hi, > > On 8/11/26 2:54 PM, Alexander Shiyan wrote: > > Hello. > > > > As far as I can see, this option (CFG_CORE_DYN_SHM) is enabled > > by default in out/arm-plat-rockchip/conf.mk > > > > Experiments with the open (BL31) TF-A version give a different error: > > ... > > NOTICE: BL31: v2.15.0(release):v2.15.0-274-gc64fe42d7 > > NOTICE: BL31: Built : 14:41:34, Jul 6 2026 > > ... > > arm-scmi firmware:scmi.of: SCMI Protocol v2.0 'rockchip:' Firmware version 0x0 > > optee: smc_abi: probing for conduit method. > > WARNING: optee: smc_abi: api uid mismatch > > ERROR: optee firmware:optee.of: probe failed: Invalid argument > > Huh, no idea off the top my head what is still missing in the OP-TEE or > TF-A configuration. > > Cheers, > Ahmad > > > > > вт, 11 авг. 2026 г. в 15:19, Ahmad Fatoum <a.fatoum@pengutronix.de>: > >> > >> Hi, > >> > >> On 8/11/26 1:51 PM, Alexander Shiyan wrote: > >>> Am I missing something? > >>> The following lines confuse me, what is these line mean?: > >>> ERROR: optee: smc_abi: driver requires OP-TEE dynamic shared memory support > >>> ERROR: optee firmware:optee.of: probe failed: Function not implemented > >> > >> Try enabling CFG_CORE_DYN_SHM in OP-TEE. > >> > >> Cheers, > >> Ahmad > >> > >> > >> -- > >> Pengutronix e.K. | | > >> Steuerwalder Str. 21 | http://www.pengutronix.de/ | > >> 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | > >> Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | > >> > > > > -- > Pengutronix e.K. | | > Steuerwalder Str. 21 | http://www.pengutronix.de/ | > 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | > Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | > ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: RK3588 optee question 2026-08-11 11:51 RK3588 optee question Alexander Shiyan 2026-08-11 12:19 ` Ahmad Fatoum @ 2026-08-12 6:25 ` Sascha Hauer [not found] ` <6a7c11f4.bd9e1b36.35e6eb.4491SMTPIN_ADDED_MISSING@mx.google.com> 2 siblings, 0 replies; 9+ messages in thread From: Sascha Hauer @ 2026-08-12 6:25 UTC (permalink / raw) To: Alexander Shiyan; +Cc: Barebox List On 2026-08-11 14:51, Alexander Shiyan wrote: > Hello All. > > BL31 = rockchip bl31 from rkbin > BL32 = tee.bin builded from https://github.com/OP-TEE/optee_os.git > > DDR cb12b99cc23 hcy 25/10/17-18:57:13,fwver: v1.21 > ... > NOTICE: BL31: v2.3():v2.3-964-g8319968f5:derrick.huang, fwver: v1.54 > NOTICE: BL31: Built : 17:20:23, Dec 26 2025 > ... > INFO: BL31: Initialising Exception Handling Framework > INFO: BL31: Initializing runtime services > INFO: BL31: Initializing BL32 > INFO: BL31: Preparing for EL3 exit to normal world > INFO: Entry point address = 0xb00000 > INFO: SPSR = 0x3c9 > > barebox 2026.07.0-00839-g50ae8812b950-dirty #144 Tue Aug 11 14:39:36 MSK 2026 > > Board: Diasom DS-RK3588-BTB-EVB > rockchip-dmc memory-controller.of: Detected memory size: 0x100000000 > netconsole: registered as netconsole-1 > fan53555-regulator rk86020: FAN53555 Option[10] Rev[1] Detected! > vdd2_ddr: Bringing 500000uV into 1100000-1100000uV > vddq_ddr: Bringing 500000uV into 600000-600000uV > rockchip_saradc fec10000.adc@fec10000.of: registered as aiodev0 > BTB revision: 3 > EVB revision: 2 > EVB HAT Addon detected. > arm-scmi firmware:scmi.of: SCMI Protocol v2.0 'rockchip:' Firmware version 0x0 > optee: smc_abi: probing for conduit method. > optee: smc_abi: revision 4.10 (71196403f6f9f642) > ERROR: optee: smc_abi: driver requires OP-TEE dynamic shared memory support In OP-TEE this goes down to: #if defined(CFG_CORE_DYN_SHM) dyn_shm_en = core_mmu_nsec_ddr_is_defined(); if (dyn_shm_en) args->a1 |= OPTEE_SMC_SEC_CAP_DYNAMIC_SHM; #endif So either you have compiled OP-TEE without CFG_CORE_DYN_SHM enabled (unlikely, it's the default), or core_mmu_nsec_ddr_is_defined() fails which means OP-TEE doesn't know where your memory is. OP-TEE gets this information from the device tree. Do you pass a device tree to OP-TEE? barebox only does it when CONFIG_ARCH_ROCKCHIP_ATF_PASS_FDT is enabled which currently is not the default as there are some Rockchip TF-A binaries shipped by Rockchip which do not handle a fdt being passed. Looking at your TF-A version you might have one of these, so you likely have to update your TF-A to an upstream one. Side note: Look at bl31_entry(). if it gets a fdt_addr that will be passed to both TF-A and OP-TEE. You *could* try passing NULL as fdt to atf_entry() to pass the fdt only to OP-TEE and not to TF-A, but I wouldn't encourage that. Sascha -- Pengutronix e.K. | | Steuerwalder Str. 21 | http://www.pengutronix.de/ | 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | ^ permalink raw reply [flat|nested] 9+ messages in thread
[parent not found: <6a7c11f4.bd9e1b36.35e6eb.4491SMTPIN_ADDED_MISSING@mx.google.com>]
* Re: RK3588 optee question [not found] ` <6a7c11f4.bd9e1b36.35e6eb.4491SMTPIN_ADDED_MISSING@mx.google.com> @ 2026-08-12 14:44 ` Alexander Shiyan 2026-08-13 6:41 ` Sascha Hauer [not found] ` <6a7d6747.1bdbcb37.263332.61abSMTPIN_ADDED_MISSING@mx.google.com> 0 siblings, 2 replies; 9+ messages in thread From: Alexander Shiyan @ 2026-08-12 14:44 UTC (permalink / raw) To: Sascha Hauer; +Cc: Barebox List Hello Sascha. After enabling CONFIG_ARCH_ROCKCHIP_ATF_PASS_FDT=y the following build errors occur: CC [P] arch/arm/mach-rockchip/rk3588.pbl.o In file included from include/linux/array_size.h:6, from include/linux/kernel.h:6, from /home/ARM64/barebox/arch/arm/include/asm/barebox-arm.h:17, from include/mach/rockchip/bootrom.h:9, from arch/arm/mach-rockchip/bootrom.c:2: include/linux/build_bug.h:100:41: error: static assertion failed: "sizeof(structrockchip_scratch_space) <= CONFIG_SCRATCH_SIZE" 100 | #define __static_assert(expr, msg, ...) _Static_assert(expr, msg) | ^~~~~~~~~~~~~~ include/linux/build_bug.h:99:34: note: in expansion of macro ‘__static_assert’ 99 | #define static_assert(expr, ...) __static_assert(expr, ##__VA_ARGS__, #expr) | ^~~~~~~~~~~~~~~ include/mach/rockchip/bootrom.h:25:1: note: in expansion of macro ‘static_assert’ 25 | static_assert(sizeof(struct rockchip_scratch_space) <= CONFIG_SCRATCH_SIZE); | ^~~~~~~~~~~~~ In file included from include/linux/container_of.h:5, from include/linux/list.h:5, from include/param.h:7, from include/console.h:10, from include/stdio.h:6, from include/common.h:10, from arch/arm/mach-rockchip/rockchip.c:2: include/linux/build_bug.h:100:41: error: static assertion failed: "sizeof(structrockchip_scratch_space) <= CONFIG_SCRATCH_SIZE" 100 | #define __static_assert(expr, msg, ...) _Static_assert(expr, msg) | ^~~~~~~~~~~~~~ include/linux/build_bug.h:99:34: note: in expansion of macro ‘__static_assert’ 99 | #define static_assert(expr, ...) __static_assert(expr, ##__VA_ARGS__, #expr) | ^~~~~~~~~~~~~~~ include/mach/rockchip/bootrom.h:25:1: note: in expansion of macro ‘static_assert’ 25 | static_assert(sizeof(struct rockchip_scratch_space) <= CONFIG_SCRATCH_SIZE); | ^~~~~~~~~~~~~ In file included from include/linux/container_of.h:5, from include/linux/list.h:5, from include/param.h:7, from include/console.h:10, from include/stdio.h:6, from include/common.h:10, from arch/arm/mach-rockchip/rk3568.c:2: include/linux/build_bug.h:100:41: error: static assertion failed: "sizeof(structrockchip_scratch_space) <= CONFIG_SCRATCH_SIZE" 100 | #define __static_assert(expr, msg, ...) _Static_assert(expr, msg) | ^~~~~~~~~~~~~~ include/linux/build_bug.h:99:34: note: in expansion of macro ‘__static_assert’ 99 | #define static_assert(expr, ...) __static_assert(expr, ##__VA_ARGS__, #expr) | ^~~~~~~~~~~~~~~ include/mach/rockchip/bootrom.h:25:1: note: in expansion of macro ‘static_assert’ 25 | static_assert(sizeof(struct rockchip_scratch_space) <= CONFIG_SCRATCH_SIZE); | ^~~~~~~~~~~~~ make[1]: *** [/home/ARM64/barebox/scripts/Makefile.build:170: arch/arm/mach-rockchip/rockchip.o] Error 1 make[1]: *** Waiting for unfinished jobs.... make[1]: *** [/home/ARM64/barebox/scripts/Makefile.build:170: arch/arm/mach-rockchip/bootrom.o] Error 1 make[1]: *** [/home/ARM64/barebox/scripts/Makefile.build:170: arch/arm/mach-rockchip/rk3568.o] Error 1 In file included from include/linux/container_of.h:5, from include/linux/list.h:5, from include/param.h:7, from include/console.h:10, from include/stdio.h:6, from include/common.h:10, from arch/arm/mach-rockchip/rk3588.c:2: include/linux/build_bug.h:100:41: error: static assertion failed: "sizeof(structrockchip_scratch_space) <= CONFIG_SCRATCH_SIZE" 100 | #define __static_assert(expr, msg, ...) _Static_assert(expr, msg) | ^~~~~~~~~~~~~~ include/linux/build_bug.h:99:34: note: in expansion of macro ‘__static_assert’ 99 | #define static_assert(expr, ...) __static_assert(expr, ##__VA_ARGS__, #expr) | ^~~~~~~~~~~~~~~ include/mach/rockchip/bootrom.h:25:1: note: in expansion of macro ‘static_assert’ 25 | static_assert(sizeof(struct rockchip_scratch_space) <= CONFIG_SCRATCH_SIZE); | ^~~~~~~~~~~~~ In file included from include/linux/container_of.h:5, from include/linux/list.h:5, from include/param.h:7, from include/console.h:10, from include/stdio.h:6, from include/common.h:10, from arch/arm/mach-rockchip/bbu.c:2: include/linux/build_bug.h:100:41: error: static assertion failed: "sizeof(structrockchip_scratch_space) <= CONFIG_SCRATCH_SIZE" 100 | #define __static_assert(expr, msg, ...) _Static_assert(expr, msg) | ^~~~~~~~~~~~~~ include/linux/build_bug.h:99:34: note: in expansion of macro ‘__static_assert’ 99 | #define static_assert(expr, ...) __static_assert(expr, ##__VA_ARGS__, #expr) | ^~~~~~~~~~~~~~~ include/mach/rockchip/bootrom.h:25:1: note: in expansion of macro ‘static_assert’ 25 | static_assert(sizeof(struct rockchip_scratch_space) <= CONFIG_SCRATCH_SIZE); | ^~~~~~~~~~~~~ make[1]: *** [/home/ARM64/barebox/scripts/Makefile.build:170: arch/arm/mach-rockchip/rk3588.o] Error 1 make[1]: *** [/home/ARM64/barebox/scripts/Makefile.build:170: arch/arm/mach-rockchip/bbu.o] Error 1 In file included from include/linux/container_of.h:5, from include/linux/list.h:5, from include/param.h:7, from include/console.h:10, from include/stdio.h:6, from include/common.h:10, from arch/arm/mach-rockchip/atf.c:2: include/linux/build_bug.h:100:41: error: static assertion failed: "sizeof(structrockchip_scratch_space) <= CONFIG_SCRATCH_SIZE" 100 | #define __static_assert(expr, msg, ...) _Static_assert(expr, msg) | ^~~~~~~~~~~~~~ include/linux/build_bug.h:99:34: note: in expansion of macro ‘__static_assert’ 99 | #define static_assert(expr, ...) __static_assert(expr, ##__VA_ARGS__, #expr) | ^~~~~~~~~~~~~~~ include/mach/rockchip/bootrom.h:25:1: note: in expansion of macro ‘static_assert’ 25 | static_assert(sizeof(struct rockchip_scratch_space) <= CONFIG_SCRATCH_SIZE); | ^~~~~~~~~~~~~ make[1]: *** [/home/ARM64/barebox/scripts/Makefile.build:167: arch/arm/mach-rockchip/atf.pbl.o] Error 1 In file included from include/linux/container_of.h:5, from include/linux/list.h:5, from include/param.h:7, from include/console.h:10, from include/stdio.h:6, from include/common.h:10, from arch/arm/mach-rockchip/rk3568.c:2: include/linux/build_bug.h:100:41: error: static assertion failed: "sizeof(structrockchip_scratch_space) <= CONFIG_SCRATCH_SIZE" 100 | #define __static_assert(expr, msg, ...) _Static_assert(expr, msg) | ^~~~~~~~~~~~~~ include/linux/build_bug.h:99:34: note: in expansion of macro ‘__static_assert’ 99 | #define static_assert(expr, ...) __static_assert(expr, ##__VA_ARGS__, #expr) | ^~~~~~~~~~~~~~~ include/mach/rockchip/bootrom.h:25:1: note: in expansion of macro ‘static_assert’ 25 | static_assert(sizeof(struct rockchip_scratch_space) <= CONFIG_SCRATCH_SIZE); | ^~~~~~~~~~~~~ In file included from include/linux/container_of.h:5, from include/linux/list.h:5, from include/param.h:7, from include/console.h:10, from include/stdio.h:6, from include/common.h:10, from arch/arm/mach-rockchip/rk3588.c:2: include/linux/build_bug.h:100:41: error: static assertion failed: "sizeof(structrockchip_scratch_space) <= CONFIG_SCRATCH_SIZE" 100 | #define __static_assert(expr, msg, ...) _Static_assert(expr, msg) | ^~~~~~~~~~~~~~ include/linux/build_bug.h:99:34: note: in expansion of macro ‘__static_assert’ 99 | #define static_assert(expr, ...) __static_assert(expr, ##__VA_ARGS__, #expr) | ^~~~~~~~~~~~~~~ include/mach/rockchip/bootrom.h:25:1: note: in expansion of macro ‘static_assert’ 25 | static_assert(sizeof(struct rockchip_scratch_space) <= CONFIG_SCRATCH_SIZE); | ^~~~~~~~~~~~~ make[1]: *** [/home/ARM64/barebox/scripts/Makefile.build:167: arch/arm/mach-rockchip/rk3568.pbl.o] Error 1 make[1]: *** [/home/ARM64/barebox/scripts/Makefile.build:167: arch/arm/mach-rockchip/rk3588.pbl.o] Error 1 make: *** [Makefile:1142: arch/arm/mach-rockchip] Error 2 make: *** Waiting for unfinished jobs.... AR drivers/of/built-in.a AR drivers/built-in.a So, to avoid this, can we define default for CONFIG_SCRATCH_SIZE as CONFIG_ARCH_ROCKCHIP_ATF_FDT_SIZE if this option is used? Finally, at least for RK3568 (cannot test RK3588 right now), the init errors are gone: ... arm-scmi firmware:scmi.of: SCMI Protocol v2.0 'rockchip:' Firmware version 0x0 optee: smc_abi: probing for conduit method. optee: smc_abi: revision 4.10 (5c827bf3bc358e9a) psci psci.of: detected version 1.1 ... The rksecure now works like this: barebox@Diasom DS-RK3568-SOM-EVB:/ rksecure -i NOTICE: optee: optee: No supplicant or RPC handler for command 0x0 ERROR: rk-secure: TA 5cfa57f6-1a4c-407f-94a7-a56c8c47019d: error 0xffff0009 Failed to read secure boot info rksecure: Invalid argument ср, 12 авг. 2026 г. в 09:25, Sascha Hauer <s.hauer@pengutronix.de>: > > On 2026-08-11 14:51, Alexander Shiyan wrote: > > Hello All. > > > > BL31 = rockchip bl31 from rkbin > > BL32 = tee.bin builded from https://github.com/OP-TEE/optee_os.git > > > > DDR cb12b99cc23 hcy 25/10/17-18:57:13,fwver: v1.21 > > ... > > NOTICE: BL31: v2.3():v2.3-964-g8319968f5:derrick.huang, fwver: v1.54 > > NOTICE: BL31: Built : 17:20:23, Dec 26 2025 > > ... > > INFO: BL31: Initialising Exception Handling Framework > > INFO: BL31: Initializing runtime services > > INFO: BL31: Initializing BL32 > > INFO: BL31: Preparing for EL3 exit to normal world > > INFO: Entry point address = 0xb00000 > > INFO: SPSR = 0x3c9 > > > > barebox 2026.07.0-00839-g50ae8812b950-dirty #144 Tue Aug 11 14:39:36 MSK 2026 > > > > Board: Diasom DS-RK3588-BTB-EVB > > rockchip-dmc memory-controller.of: Detected memory size: 0x100000000 > > netconsole: registered as netconsole-1 > > fan53555-regulator rk86020: FAN53555 Option[10] Rev[1] Detected! > > vdd2_ddr: Bringing 500000uV into 1100000-1100000uV > > vddq_ddr: Bringing 500000uV into 600000-600000uV > > rockchip_saradc fec10000.adc@fec10000.of: registered as aiodev0 > > BTB revision: 3 > > EVB revision: 2 > > EVB HAT Addon detected. > > arm-scmi firmware:scmi.of: SCMI Protocol v2.0 'rockchip:' Firmware version 0x0 > > optee: smc_abi: probing for conduit method. > > optee: smc_abi: revision 4.10 (71196403f6f9f642) > > ERROR: optee: smc_abi: driver requires OP-TEE dynamic shared memory support > > In OP-TEE this goes down to: > > #if defined(CFG_CORE_DYN_SHM) > dyn_shm_en = core_mmu_nsec_ddr_is_defined(); > if (dyn_shm_en) > args->a1 |= OPTEE_SMC_SEC_CAP_DYNAMIC_SHM; > #endif > > So either you have compiled OP-TEE without CFG_CORE_DYN_SHM enabled > (unlikely, it's the default), or core_mmu_nsec_ddr_is_defined() fails > which means OP-TEE doesn't know where your memory is. OP-TEE gets this > information from the device tree. Do you pass a device tree to OP-TEE? > barebox only does it when CONFIG_ARCH_ROCKCHIP_ATF_PASS_FDT is enabled > which currently is not the default as there are some Rockchip TF-A > binaries shipped by Rockchip which do not handle a fdt being passed. > > Looking at your TF-A version you might have one of these, so you likely > have to update your TF-A to an upstream one. > > Side note: Look at bl31_entry(). if it gets a fdt_addr that will be > passed to both TF-A and OP-TEE. You *could* try passing NULL as fdt to > atf_entry() to pass the fdt only to OP-TEE and not to TF-A, but I > wouldn't encourage that. > > Sascha > > -- > Pengutronix e.K. | | > Steuerwalder Str. 21 | http://www.pengutronix.de/ | > 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | > Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | > ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: RK3588 optee question 2026-08-12 14:44 ` Alexander Shiyan @ 2026-08-13 6:41 ` Sascha Hauer [not found] ` <6a7d6747.1bdbcb37.263332.61abSMTPIN_ADDED_MISSING@mx.google.com> 1 sibling, 0 replies; 9+ messages in thread From: Sascha Hauer @ 2026-08-13 6:41 UTC (permalink / raw) To: Alexander Shiyan; +Cc: Barebox List On 2026-08-12 17:44, Alexander Shiyan wrote: > Hello Sascha. > > After enabling CONFIG_ARCH_ROCKCHIP_ATF_PASS_FDT=y the following build > errors occur: > > CC [P] arch/arm/mach-rockchip/rk3588.pbl.o > In file included from include/linux/array_size.h:6, > from include/linux/kernel.h:6, > from /home/ARM64/barebox/arch/arm/include/asm/barebox-arm.h:17, > from include/mach/rockchip/bootrom.h:9, > from arch/arm/mach-rockchip/bootrom.c:2: > include/linux/build_bug.h:100:41: error: static assertion failed: > "sizeof(structrockchip_scratch_space) <= CONFIG_SCRATCH_SIZE" Set CONFIG_SCRATCH_SIZE=0x100000 Seems we have to look into it to get a sane default. Sascha -- Pengutronix e.K. | | Steuerwalder Str. 21 | http://www.pengutronix.de/ | 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | ^ permalink raw reply [flat|nested] 9+ messages in thread
[parent not found: <6a7d6747.1bdbcb37.263332.61abSMTPIN_ADDED_MISSING@mx.google.com>]
* Re: RK3588 optee question [not found] ` <6a7d6747.1bdbcb37.263332.61abSMTPIN_ADDED_MISSING@mx.google.com> @ 2026-08-14 6:49 ` Alexander Shiyan 0 siblings, 0 replies; 9+ messages in thread From: Alexander Shiyan @ 2026-08-14 6:49 UTC (permalink / raw) To: Sascha Hauer; +Cc: Barebox List Hello, Sascha. With CONFIG_SCRATCH_SIZE=0x100000 compiles fine. Now about the current errors, one build is used for two images for RK3568 and RK3588. RK3568, Rockchip BL31, tee.bin from OPTEE_OS: arm-scmi firmware:scmi.of: SCMI Protocol v2.0 'rockchip:' Firmware version 0x0 optee: smc_abi: probing for conduit method. optee: smc_abi: revision 4.10 (5c827bf3bc358e9a) psci psci.of: detected version 1.1 RK3588, open source TF-A, tee.bin from OPTEE_OS: arm-scmi firmware:scmi.of: SCMI Protocol v2.0 'rockchip:' Firmware version 0x0 optee: smc_abi: probing for conduit method. WARNING: optee: smc_abi: api uid mismatch ERROR: optee firmware:optee.of: probe failed: Invalid argument Switching to a configuration using Rockchip BL31 with the TEE/OPTEE options currently enabled results in a constant restart of DDR init code, meaning the code never reaches BL31... What else can I watch? Thanks! чт, 13 авг. 2026 г. в 09:42, Sascha Hauer <s.hauer@pengutronix.de>: > > On 2026-08-12 17:44, Alexander Shiyan wrote: > > Hello Sascha. > > > > After enabling CONFIG_ARCH_ROCKCHIP_ATF_PASS_FDT=y the following build > > errors occur: > > > > CC [P] arch/arm/mach-rockchip/rk3588.pbl.o > > In file included from include/linux/array_size.h:6, > > from include/linux/kernel.h:6, > > from /home/ARM64/barebox/arch/arm/include/asm/barebox-arm.h:17, > > from include/mach/rockchip/bootrom.h:9, > > from arch/arm/mach-rockchip/bootrom.c:2: > > include/linux/build_bug.h:100:41: error: static assertion failed: > > "sizeof(structrockchip_scratch_space) <= CONFIG_SCRATCH_SIZE" > > Set CONFIG_SCRATCH_SIZE=0x100000 > > Seems we have to look into it to get a sane default. > > Sascha > > -- > Pengutronix e.K. | | > Steuerwalder Str. 21 | http://www.pengutronix.de/ | > 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | > Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | > > ^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2026-08-14 6:51 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-08-11 11:51 RK3588 optee question Alexander Shiyan
2026-08-11 12:19 ` Ahmad Fatoum
2026-08-11 12:54 ` Alexander Shiyan
2026-08-11 14:07 ` Ahmad Fatoum
2026-08-11 14:13 ` Alexander Shiyan
2026-08-12 6:25 ` Sascha Hauer
[not found] ` <6a7c11f4.bd9e1b36.35e6eb.4491SMTPIN_ADDED_MISSING@mx.google.com>
2026-08-12 14:44 ` Alexander Shiyan
2026-08-13 6:41 ` Sascha Hauer
[not found] ` <6a7d6747.1bdbcb37.263332.61abSMTPIN_ADDED_MISSING@mx.google.com>
2026-08-14 6:49 ` Alexander Shiyan
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox