Safexcel 15600000.crypto failed with error -16

mtk have this patch - 24.10/files/target/linux/mediatek/patches-6.6/999-2700-crypto-add-eip197-inside-secure-support-for-kernel-6.6.patch - openwrt/feeds/mtk-openwrt-feeds - Gitiles

you can see they force the load of the firmware and a few more things … now this for 6.6 unsure if safexcel code changed for 6.18 but doubt …

followed the code and firmware is loaded after the point where my probe flow exits

safexcel_probe => safexcel_probe_generic (exit at beginning because of version=0) => (nearly at the end) safexcel_hw_init => (nearly at the end) eip197_load_firmwares

so the changed code is not reached in my case…could it be because i have builtin driver and firmware?

i always load it as a module … let me try your 6.18 repo

btw … probably the 6.18-crypto is not ready to load via the emmc …

[    0.000000] Booting Linux on physical CPU 0x0000000000 [0x411fd090]
[    0.000000] Linux version 6.18.0-rc1-bpi-r4-crypto-g38c2790e1ccd-dirty (aarch64-linux-gnu-gcc (Ubuntu 15.2.0-4ubuntu4) 15.2.0, GNU ld (GNU Binutils for Ubuntu) 2.45) #3 SMP Sun Nov 16 05:58:56 GMT 2025
[    0.000000] Machine model: Banana Pi BPI-R4 (2x SFP+)
[    0.000000] earlycon: uart8250 at MMIO32 0x0000000011000000 (options '')
[    0.000000] printk: legacy bootconsole [uart8250] enabled
[    0.000000] efi: EFI v2.11 by Das U-Boot
[    0.000000] efi: RTPROP=0xfa7c5040 SMBIOS 3.0=0xffb09000 INITRD=0xfa4e8040 MEMRESERVE=0xfa4e7040
[    0.000000] OF: reserved mem: 0x0000000042ff0000..0x0000000042ffffff (64 KiB) map non-reusable ramoops@42ff0000
[    0.000000] OF: reserved mem: 0x0000000043000000..0x000000004304ffff (320 KiB) nomap non-reusable secmon@43000000
[    0.000000] Zone ranges:
[    0.000000]   DMA      [mem 0x0000000040000000-0x00000000ffffffff]
[    0.000000]   DMA32    empty
[    0.000000]   Normal   [mem 0x0000000100000000-0x000000023fffffff]
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000040000000-0x0000000042ffffff]
[    0.000000]   node   0: [mem 0x0000000043000000-0x000000004304ffff]
[    0.000000]   node   0: [mem 0x0000000043050000-0x00000000fa3fffff]
[    0.000000]   node   0: [mem 0x00000000fa400000-0x00000000fa400fff]
[    0.000000]   node   0: [mem 0x00000000fa401000-0x00000000fa7c4fff]
[    0.000000]   node   0: [mem 0x00000000fa7c5000-0x00000000fa7c5fff]
[    0.000000]   node   0: [mem 0x00000000fa7c6000-0x00000000fa7c6fff]
[    0.000000]   node   0: [mem 0x00000000fa7c7000-0x00000000fa7e8fff]
[    0.000000]   node   0: [mem 0x00000000fa7e9000-0x00000000ffb08fff]
[    0.000000]   node   0: [mem 0x00000000ffb09000-0x00000000ffb09fff]
[    0.000000]   node   0: [mem 0x00000000ffb0a000-0x00000000ffedffff]
[    0.000000]   node   0: [mem 0x00000000ffee0000-0x00000000ffeeffff]
[    0.000000]   node   0: [mem 0x00000000ffef0000-0x00000000fffa2fff]
[    0.000000]   node   0: [mem 0x00000000fffa3000-0x00000000fffa4fff]
[    0.000000]   node   0: [mem 0x00000000fffa5000-0x000000023fffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000040000000-0x000000023fffffff]
[    0.000000] psci: probing for conduit method from DT.
[    0.000000] psci: PSCIv1.1 detected in firmware.
[    0.000000] psci: Using standard PSCI v0.2 function IDs
[    0.000000] psci: MIGRATE_INFO_TYPE not supported.
[    0.000000] psci: SMC Calling Convention v1.5
[    0.000000] percpu: Embedded 30 pages/cpu s84184 r8192 d30504 u122880
[    0.000000] pcpu-alloc: s84184 r8192 d30504 u122880 alloc=30*4096
[    0.000000] pcpu-alloc: [0] 0 [0] 1 [0] 2 [0] 3
[    0.000000] Detected VIPT I-cache on CPU0
[    0.000000] CPU features: detected: GICv3 CPU interface
[    0.000000] CPU features: detected: Spectre-BHB
[    0.000000] CPU features: detected: ARM erratum 858921
[    0.000000] alternatives: applying boot alternatives
[    0.000000] Kernel command line: BOOT_IMAGE=(hd0,gpt5)/Image-bpi-r4_6.18.0-rc1-crypto.gz root=UUID=1c65c141-24ad-4de5-9bbf-623e26c53f51 rootfstype=ext4 rootwait console=ttyS0,9600n1 earlycon=uart8250,mmio32,0x11000000
[    0.000000] printk: log buffer data + meta data: 131072 + 458752 = 589824 bytes
[    0.000000] Dentry cache hash table entries: 1048576 (order: 11, 8388608 bytes, linear)
[    0.000000] Inode-cache hash table entries: 524288 (order: 10, 4194304 bytes, linear)
[    0.000000] software IO TLB: area num 4.
[    0.000000] software IO TLB: mapped [mem 0x00000000fbb09000-0x00000000ffb09000] (64MB)
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 2097152
[    0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
[    0.000000] rcu: Hierarchical RCU implementation.
[    0.000000] rcu:     RCU event tracing is enabled.
[    0.000000]  Tracing variant of Tasks RCU enabled.
[    0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 10 jiffies.
[    0.000000] RCU Tasks Trace: Setting shift to 2 and lim to 1 rcu_task_cb_adjust=1 rcu_task_cpu_ids=4.
[    0.000000] NR_IRQS: 64, nr_irqs: 64, preallocated irqs: 0
[    0.000000] GICv3: GIC: Using split EOI/Deactivate mode
[    0.000000] GICv3: 416 SPIs implemented
[    0.000000] GICv3: 0 Extended SPIs implemented
[    0.000000] Root IRQ handler: gic_handle_irq
[    0.000000] GICv3: GICv3 features: 16 PPIs
[    0.000000] GICv3: GICD_CTLR.DS=0, SCR_EL3.FIQ=0
[    0.000000] GICv3: CPU0: found redistributor 0 region 0:0x000000000c080000
[    0.000000] rcu: srcu_init: Setting srcu_struct sizes based on contention.
[    0.000000] arch_timer: Enabling local workaround for ARM erratum 858921
[    0.000000] arch_timer: CPU0: Trapping CNTVCT access
[    0.000000] arch_timer: cp15 timer running at 13.00MHz (phys).
[    0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x2ff89eacb, max_idle_ns: 440795202429 ns
[    0.000000] sched_clock: 56 bits at 13MHz, resolution 76ns, wraps every 4398046511101ns
[    0.095834] Console: colour dummy device 80x25
[    0.148912] Calibrating delay loop (skipped), value calculated using timer frequency.. 26.00 BogoMIPS (lpj=130000)
[    0.272682] pid_max: default: 32768 minimum: 301
[    0.327912] Mount-cache hash table entries: 16384 (order: 5, 131072 bytes, linear)
[    0.418418] Mountpoint-cache hash table entries: 16384 (order: 5, 131072 bytes, linear)
[    0.514619] cacheinfo: Unable to detect cache hierarchy for CPU 0
[    0.587895] rcu: Hierarchical SRCU implementation.
[    0.645101] rcu:     Max phase no-delay instances is 1000.
[    0.707599] Timer migration: 1 hierarchy levels; 8 children per group; 1 crossnode level
[    0.804527] Remapping and enabling EFI services.
[    0.859775] smp: Bringing up secondary CPUs ...
[    0.914130] Detected VIPT I-cache on CPU1
[    0.914174] GICv3: CPU1: found redistributor 1 region 0:0x000000000c0a0000
[    0.914184] arch_timer: Enabling local workaround for ARM erratum 858921
[    0.914198] arch_timer: CPU1: Trapping CNTVCT access
[    0.914204] CPU1: Booted secondary processor 0x0000000001 [0x411fd090]
[    0.914502] Detected VIPT I-cache on CPU2
[    0.914525] GICv3: CPU2: found redistributor 2 region 0:0x000000000c0c0000
[    0.914531] arch_timer: Enabling local workaround for ARM erratum 858921
[    0.914536] arch_timer: CPU2: Trapping CNTVCT access
[    0.914541] CPU2: Booted secondary processor 0x0000000002 [0x411fd090]
[    0.914807] Detected VIPT I-cache on CPU3
[    0.914829] GICv3: CPU3: found redistributor 3 region 0:0x000000000c0e0000
[    0.914835] arch_timer: Enabling local workaround for ARM erratum 858921
[    0.914840] arch_timer: CPU3: Trapping CNTVCT access
[    0.914844] CPU3: Booted secondary processor 0x0000000003 [0x411fd090]
[    0.914882] smp: Brought up 1 node, 4 CPUs
[    2.005854] SMP: Total of 4 processors activated.
[    2.062020] CPU: All CPU(s) started at EL2
[    2.110902] CPU features: detected: 32-bit EL0 Support
[    2.172268] CPU features: detected: CRC32 instructions
[    2.233637] CPU features: detected: PMUv3
[    2.281511] alternatives: applying system-wide alternatives
[    2.348412] Memory: 8111500K/8388608K available (15488K kernel code, 2882K rwdata, 5384K rodata, 1536K init, 376K bss, 272620K reserved, 0K cma-reserved)
[    2.513491] devtmpfs: initialized
[    2.555082] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    2.672639] posixtimers hash table entries: 2048 (order: 3, 32768 bytes, linear)
[    2.761076] futex hash table entries: 1024 (65536 bytes on 1 NUMA nodes, total 64 KiB, linear).
[    2.865117] 26304 pages in range for non-PLT usage
[    2.865120] 517824 pages in range for PLT usage
[    2.922369] pinctrl core: initialized pinctrl subsystem
[    3.039129] SMBIOS 3.7.0 present.
[    3.078664] DMI: mediatek mt7988-rfb/mt7988-rfb, BIOS 2025.10-bpi-gd5698ecbbec2-dirty 10/01/2025
[    3.183713] DMI: Memory slots populated: 0/0
[    3.235860] NET: Registered PF_NETLINK/PF_ROUTE protocol family
[    3.306989] DMA: preallocated 1024 KiB GFP_KERNEL pool for atomic allocations
[    3.392465] DMA: preallocated 1024 KiB GFP_KERNEL|GFP_DMA pool for atomic allocations
[    3.486252] DMA: preallocated 1024 KiB GFP_KERNEL|GFP_DMA32 pool for atomic allocations
[    3.582223] thermal_sys: Registered thermal governor 'fair_share'
[    3.582226] thermal_sys: Registered thermal governor 'bang_bang'
[    3.655031] thermal_sys: Registered thermal governor 'step_wise'
[    3.726795] thermal_sys: Registered thermal governor 'user_space'
[    3.798642] hw-breakpoint: found 6 breakpoint and 4 watchpoint registers.
[    3.952601] ASID allocator initialised with 65536 entries
[    4.017670] printk: legacy console [ramoops-1] enabled
[    4.079408] pstore: Registered ramoops as persistent store backend
[    4.153258] ramoops: using 0x10000@0x42ff0000, ecc: 0
[    4.215352] /soc/interrupt-controller@c000000: Fixed dependency cycle(s) with /soc/interrupt-controller@c000000
[    4.339517] /soc/pcie@11280000: Fixed dependency cycle(s) with /soc/pcie@11280000/interrupt-controller
[    4.450937] /soc/pcie@11290000: Fixed dependency cycle(s) with /soc/pcie@11290000/interrupt-controller
[    4.562329] /soc/pcie@11300000: Fixed dependency cycle(s) with /soc/pcie@11300000/interrupt-controller
[    4.673716] /soc/pcie@11310000: Fixed dependency cycle(s) with /soc/pcie@11310000/interrupt-controller
[    4.787404] iommu: Default domain type: Translated
[    4.844652] iommu: DMA domain TLB invalidation policy: strict mode
[    4.922110] SCSI subsystem initialized
[    4.966943] libata version 3.00 loaded.
[    5.012804] usbcore: registered new interface driver usbfs
[    5.078350] usbcore: registered new interface driver hub
[    5.141807] usbcore: registered new device driver usb
[    5.202247] pps_core: LinuxPPS API ver. 1 registered
[    5.261535] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <[email protected]>
[    5.370750] PTP clock support registered
[    5.417653] efivars: Registered efivars operations
[    5.475964] vgaarb: loaded
[    5.508470] clocksource: Switched to clocksource arch_sys_counter
[    5.581505] VFS: Disk quotas dquot_6.6.0
[    5.628356] VFS: Dquot-cache hash table entries: 512 (order 0, 4096 bytes)
[    5.713512] NET: Registered PF_INET protocol family
[    5.772001] IP idents hash table entries: 131072 (order: 8, 1048576 bytes, linear)
[    5.866058] tcp_listen_portaddr_hash hash table entries: 4096 (order: 4, 65536 bytes, linear)
[    5.968033] Table-perturb hash table entries: 65536 (order: 6, 262144 bytes, linear)
[    6.060620] TCP established hash table entries: 65536 (order: 7, 524288 bytes, linear)
[    6.155480] TCP bind hash table entries: 65536 (order: 9, 2097152 bytes, linear)
[    6.244717] TCP: Hash tables configured (established 65536 bind 65536)
[    6.322824] UDP hash table entries: 4096 (order: 6, 262144 bytes, linear)
[    6.404136] UDP-Lite hash table entries: 4096 (order: 6, 262144 bytes, linear)
[    6.490748] NET: Registered PF_UNIX/PF_LOCAL protocol family
[    6.558701] RPC: Registered named UNIX socket transport module.
[    6.629451] RPC: Registered udp transport module.
[    6.685618] RPC: Registered tcp transport module.
[    6.741785] RPC: Registered tcp-with-tls transport module.
[    6.807312] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    6.884806] PCI: CLS 0 bytes, default 64
[    6.931727] Trying to unpack rootfs image as initramfs...
[    6.996718] Initialise system trusted keyrings
[    7.050016] workingset: timestamp_bits=46 max_order=21 bucket_order=0
[    7.127325] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    7.197362] NFS: Registering the id_resolver key type
[    7.257780] Key type id_resolver registered
[    7.307740] Key type id_legacy registered
[    7.355656] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
[    7.375321] Freeing initrd memory: 19276K
[    7.435773] nfs4flexfilelayout_init: NFSv4 Flexfile Layout Driver Registering...
[    7.435832] jffs2: version 2.2. (NAND) (SUMMARY)  © 2001-2006 Red Hat, Inc.
[    7.657115] cryptd: max_cpu_qlen set to 1000
[    7.736096] Key type asymmetric registered
[    7.784990] Asymmetric key parser 'x509' registered
[    7.843270] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 246)
[    7.931751] io scheduler mq-deadline registered
[    7.985846] io scheduler kyber registered
[    8.033713] io scheduler bfq registered
[    8.080203] mtk-xsphy soc:xs-phy@11e10000: failed to get ref_clk(id-1)
**[    8.165865] mtk-socinfo mtk-socinfo.0.auto: error -ENOENT: Failed to get socinfo data**
**[    8.259522] mtk-socinfo mtk-socinfo.0.auto: probe with driver mtk-socinfo failed with error -2**
[    8.381272] Serial: 8250/16550 driver, 3 ports, IRQ sharing disabled
[    8.458449] printk: legacy console [ttyS0] disabled
[    8.537068] 11000000.serial: ttyS0 at MMIO 0x11000000 (irq = 99, base_baud = 2500000) is a ST16650V2
[    8.646321] printk: legacy console [ttyS0] enabled
[    8.646321] printk: legacy console [ttyS0] enabled
[    8.760744] printk: legacy bootconsole [uart8250] disabled
[    8.760744] printk: legacy bootconsole [uart8250] disabled
[    8.895842] loop: module loaded
[    8.935764] spi-nand spi0.0: Winbond SPI NAND was found.
[    8.999253] spi-nand spi0.0: 256 MiB, block size: 128 KiB, page size: 2048, OOB size: 128
[    9.097144] 2 fixed-partitions partitions found on MTD device spi0.0
[    9.173409] Creating 2 MTD partitions on "spi0.0":
[    9.230631] 0x000000000000-0x000000200000 : "bl2"
[    9.289421] ftl_cs: FTL header not found.
[    9.337896] 0x000000200000-0x000008000000 : "ubi"
[    9.468284] ubi0: default fastmap pool size: 50
[    9.522410] ubi0: default fastmap WL pool size: 25
[    9.579622] ubi0: attaching mtd1
[   10.044878] ubi0: scanning is finished
[   10.094087] ubi0: attached mtd1 (name "ubi", size 126 MiB)
[   10.159631] ubi0: PEB size: 131072 bytes (128 KiB), LEB size: 126976 bytes
[   10.241801] ubi0: min./max. I/O unit sizes: 2048/2048, sub-page size 2048
[   10.322929] ubi0: VID header offset: 2048 (aligned 2048), data offset: 4096
[   10.406139] ubi0: good PEBs: 1008, bad PEBs: 0, corrupted PEBs: 0
[   10.478947] ubi0: user volume: 7, internal volumes: 1, max. volumes count: 128
[   10.565272] ubi0: max/mean erase counter: 6/3, WL threshold: 4096, image sequence number: 0
[   10.665119] ubi0: available PEBs: 0, total reserved PEBs: 1008, PEBs reserved for bad PEB handling: 40
[   10.776412] ubi0: background thread "ubi_bgt0d" started, PID 893

it gets stuck with the ubi0

Is emmc overlay loaded? I do not see mmc detection

The crypto patches are in 6.18-crypto.

yes

## Loading kernel (any) from FIT Image at 48000000 ...
   Using 'conf-base' configuration
   Trying 'kernel-1' kernel subimage
     Description:  Linux Kernel 6.18.0-rc1-crypto
     Created:      2025-11-16   9:46:39 UTC
     Type:      l Image
     Compression:  gzip compressed
     Data Start:   0x480000ec
     Data Size:    10549465 Bytes = 10.1 MiB
     Architecture: AArch64
     OS:           Linux
     Load Address: 0x44000000
     Entry Point:  0x44000000
     Hash algo:    sha1
     Hash value:   99f0dc394af1d5389a728973ae83ffa6bd6c187a
   Verifying Hash Integrity ... sha1+ OK
## Loading fdt (any) from FIT Image at 48000000 ...
   Using 'conf-base' configuration
   Trying 'fdt-base' fdt subimage
     Description:  Flattened Device Tree blob BPI-R4 dual SFP+
     Created:      2025-11-16   9:46:39 UTC
     Type:         Flat Device Tree
     Compression:  uncompressed
     Data Start:   0x48a0fad4
     Data Size:    32758 Bytes = 32 KiB
     Architecture: AArch64
     Load Address: 0x47000000
     Hash algo:    sha1
     Hash value:   76bee3e0171d5949099eb0fd68b359cc01f4efa6
   Verifying Hash Integrity ... sha1+ OK
   Loading fdt from 0x48a0fad4 to 0x47000000
   Loading Device Tree to 00000000fa7b2000, end 00000000fa7bcfff ... OK
Working FDT set to fa7b2000
## Loading fdt (any) from FIT Image at 48000000 ...
   Using 'ov-emmc' configuration
   Trying 'fdt-ov-emmc' fdt subimage
     Description:  Flattened Device Tree blob
     Created:      2025-11-16   9:46:39 UTC
     Type:         Flat Device Tree
     Compression:  uncompressed
     Data Start:   0x48a39dd0
     Data Size:    935 Bytes = 935 Bytes
     Architecture: Unknown Architecture
   Verifying Hash Integrity ... OK
   Booting using the fdt blob at 0xfa7b2000
Working FDT set to fa7b2000
   Uncompressing Kernel Image to 44000000
   Loading Device Tree to 00000000fa7a6000, end 00000000fa7b1147 ... OK
Working FDT set to fa7a6000

Starting kernel ...

anyhow my 6.17 GitHub - rmandrad/BPI-Router-Linux at 6.17-main loads safexcel ok apart from the last line

[   68.523940] crypto-safexcel 15600000.crypto: EIP197:331(7,1,8,4)-HIA:272(2,5,5),PE:151/450(alg:7fe1fc00)/240/240/450
[   68.675325] crypto-safexcel 15600000.crypto: TRC init: 8704d,48a (32r,128h)
[   69.496825] crypto-safexcel 15600000.crypto: FW(1) for PE 0 failed to start

and i can see on /proc/crypto safexcel

driver       : safexcel-rfc4309-ccm-aes
module       : crypto_safexcel
driver       : safexcel-rfc4543-gcm-aes
driver       : safexcel-rfc4106-gcm-aes
driver       : safexcel-authenc-hmac-sha384-cbc-des
module       : crypto_safexcel
driver       : safexcel-authenc-hmac-sha512-cbc-des
module       : crypto_safexcel
driver       : safexcel-authenc-hmac-sha224-cbc-des
module       : crypto_safexcel
driver       : safexcel-authenc-hmac-sha256-cbc-des
module       : crypto_safexcel
driver       : safexcel-authenc-hmac-sha384-cbc-des3_ede
module       : crypto_safexcel
driver       : safexcel-authenc-hmac-sha512-cbc-des3_ede
module       : crypto_safexcel
driver       : safexcel-authenc-hmac-sha224-cbc-des3_ede
module       : crypto_safexcel
driver       : safexcel-authenc-hmac-sha256-cbc-des3_ede
module       : crypto_safexcel
driver       : safexcel-authenc-hmac-sha1-cbc-des
module       : crypto_safexcel
driver       : safexcel-cmac-aes
module       : crypto_safexcel
driver       : safexcel-xcbc-aes
module       : crypto_safexcel
driver       : safexcel-cbcmac-aes
module       : crypto_safexcel
driver       : safexcel-ccm-aes
module       : crypto_safexcel
driver       : safexcel-gcm-aes
module       : crypto_safexcel
driver       : safexcel-authenc-hmac-sha512-ctr-aes
module       : crypto_safexcel
driver       : safexcel-authenc-hmac-sha384-ctr-aes
module       : crypto_safexcel
driver       : safexcel-authenc-hmac-sha256-ctr-aes
module       : crypto_safexcel
driver       : safexcel-authenc-hmac-sha224-ctr-aes
module       : crypto_safexcel
driver       : safexcel-authenc-hmac-sha1-ctr-aes
module       : crypto_safexcel
driver       : safexcel-authenc-hmac-sha1-cbc-des3_ede
module       : crypto_safexcel
driver       : safexcel-authenc-hmac-sha512-cbc-aes
module       : crypto_safexcel
driver       : safexcel-authenc-hmac-sha384-cbc-aes
module       : crypto_safexcel
driver       : safexcel-authenc-hmac-sha256-cbc-aes
module       : crypto_safexcel
driver       : safexcel-authenc-hmac-sha224-cbc-aes
module       : crypto_safexcel
driver       : safexcel-authenc-hmac-sha1-cbc-aes
module       : crypto_safexcel
driver       : safexcel-hmac-sha512
module       : crypto_safexcel
driver       : safexcel-hmac-sha384
module       : crypto_safexcel
driver       : safexcel-hmac-sha256
module       : crypto_safexcel
driver       : safexcel-hmac-sha224
module       : crypto_safexcel
driver       : safexcel-hmac-sha1
module       : crypto_safexcel
driver       : safexcel-hmac-md5
module       : crypto_safexcel
driver       : safexcel-sha512
module       : crypto_safexcel
driver       : safexcel-sha384
module       : crypto_safexcel
driver       : safexcel-sha256
module       : crypto_safexcel
driver       : safexcel-sha224
module       : crypto_safexcel
driver       : safexcel-sha1
module       : crypto_safexcel
driver       : safexcel-md5
module       : crypto_safexcel
driver       : safexcel-ctr-aes
module       : crypto_safexcel
driver       : safexcel-cbc-aes
module       : crypto_safexcel
driver       : safexcel-ecb-aes
module       : crypto_safexcel
driver       : safexcel-cbc-des3_ede
module       : crypto_safexcel
driver       : safexcel-ecb-des3_ede
module       : crypto_safexcel
driver       : safexcel-cbc-des
module       : crypto_safexcel
driver       : safexcel-ecb-des
module       : crypto_safexcel

have you added any patches? afair i had nothing (also not crypto-node) in my 6.17, and yours look same

regarding emmc, looks right and also the emmc-overlay looks correct…also it is same in 6.17-main, so strange that emmc is not detected in 6.18-rc

btw. tested 6.18-rc and my emmc is detected, but somehow i got trace because of devtmpfs

[    1.816193] mmc0: Host Software Queue enabled                                                                                      
[    1.830648] mmc0: new HS400 MMC card at address 0001                                                                               
[    1.845941] mmcblk0: mmc0:0001 8GTF4R 7.28 GiB                                                                                     
[    1.863442]  mmcblk0: p1 p2 p3 p4 p5 p6                                                                                            
[    1.928819] mmcblk0boot0: mmc0:0001 8GTF4R 4.00 MiB                                                                                
[    1.953952] mmcblk0boot1: mmc0:0001 8GTF4R 4.00 MiB                                                                                
[    1.955526] mmcblk0rpmb: mmc0:0001 8GTF4R 512 KiB, chardev (242:0)                                                                 
...
[    3.528727] EXT4-fs (mmcblk0p6): mounted filesystem f6602b56-a8be-478d-958a-a0c653b27878 ro with ordered data mode. Quota mode: di.
[    3.541113] VFS: Mounted root (ext4 filesystem) readonly on device 179:6.                                                          
[    3.548213] devtmpfs: error mounting -2

had it some time ago, but then it was gone…now 2 times

ah, seems i have no rootfs on emmc of this device :smiley:

root@bpi:~# uname -a
Linux bpi 6.18.0-rc1-bpi-r4-jumbo #2 SMP Sun Nov 16 10:47:08 CET 2025 aarch64 GNU/Linux
root@bpi:~# cat /proc/partitions 
major minor  #blocks  name

  31        0       2048 mtdblock0
  31        1     129024 mtdblock1
 179        0    7634944 mmcblk0
 179        1       4079 mmcblk0p1
 179        2        512 mmcblk0p2
 179        3       2048 mmcblk0p3
 179        4       2048 mmcblk0p4
 179        5     102400 mmcblk0p5
 179        6    6758400 mmcblk0p6
 179        8       4096 mmcblk0boot0
 179       16       4096 mmcblk0boot1
 259        0  488386584 nvme0n1
 259        1     523264 nvme0n1p1
 259        2    5766144 nvme0n1p2
   8        0    2015232 sda
   8        1    2013184 sda1
root@bpi:~# cat /proc/crypto | grep safe
root@bpi:~# dmesg | grep safe                                                                                                                                                                   
root@bpi:~#

for the 6.17-main i added the crypto-safexcel patches (it seems the same as the ones you applied to 6.18 …you can compare my repo dts + safexcel crypto driver

I changed to module and now the version=0 issue is gone. I get not same output like you yesterday with 6.17 (safexcel init in dmesg and /proc/crypto).

I managed to get the interrupts incrementing by enabling the afalg

cat /proc/interrupts |grep cry
131:     436356          0          0          0    GICv3 246 Level     15600000.crypto
132:          0     556514          0          0    GICv3 247 Level     15600000.crypto
133:          0          0     528677          0    GICv3 248 Level     15600000.crypto
134:          0          0          0     551391    GICv3 249 Level     15600000.crypto

 openssl speed -evp aes128 -elapsed -engine afalg
Engine "afalg" set.
You have chosen to measure elapsed time instead of user CPU time.
Doing AES-128-CBC ops for 3s on 16 size blocks: 87662 AES-128-CBC ops in 3.00s
Doing AES-128-CBC ops for 3s on 64 size blocks: 91549 AES-128-CBC ops in 3.00s
Doing AES-128-CBC ops for 3s on 256 size blocks: 87329 AES-128-CBC ops in 3.00s
Doing AES-128-CBC ops for 3s on 1024 size blocks: 84148 AES-128-CBC ops in 3.00s
Doing AES-128-CBC ops for 3s on 8192 size blocks: 60113 AES-128-CBC ops in 3.00s
Doing AES-128-CBC ops for 3s on 16384 size blocks: 44054 AES-128-CBC ops in 3.00s
version: 3.5.4
built on: Sat Nov  1 11:22:59 2025 UTC
options: bn(64,64)
compiler: gcc -fPIC -pthread -Wa,--noexecstack -Wall -fzero-call-used-regs=used-gpr -Wa,--noexecstack -g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/build/reproducible-path/openssl-3.5.4=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -mbranch-protection=standard -DOPENSSL_USE_NODELETE -DOPENSSL_PIC -DOPENSSL_BUILDING_OPENSSL -DZLIB -DZSTD -DNDEBUG -Wdate-time -D_FORTIFY_SOURCE=2
CPUINFO: OPENSSL_armcap=0xbd
The 'numbers' are in 1000s of bytes per second processed.
type             16 bytes     64 bytes    256 bytes   1024 bytes   8192 bytes  16384 bytes
AES-128-CBC        467.53k     1953.05k     7452.07k    28722.52k   164148.57k   240593.58k

1 Like

Can you compare blocks processes by openssl with and without cryptodev?

as i said on another thread I am not using cryptodev as it is not included on the kernel … i really don’t know how you managed to have it on your setup … also one will need to compile openssl with devcrypto which is not by default anymore i don’t think

lsmod|grep crypto
crypto_safexcel       122880  0
authenc                12288  2 authencesn,crypto_safexcel
crypto_null            12288  0
crypto_user            12288  0

&

algif_hash             16384  0
algif_skcipher         12288  0
algif_rng              16384  0
algif_aead             12288  0
af_alg                 24576  4 algif_hash,algif_skcipher,algif_aead,algif_rng


I meant the CONFIG_CRYPTO_DEV_SAFEXCEL

sure without

openssl speed -evp AES-256-CBC -elapsed -engine afalg
Engine "afalg" set.
You have chosen to measure elapsed time instead of user CPU time.
Doing AES-256-CBC ops for 3s on 16 size blocks: 230982 AES-256-CBC ops in 3.00s
Doing AES-256-CBC ops for 3s on 64 size blocks: 228849 AES-256-CBC ops in 3.00s
Doing AES-256-CBC ops for 3s on 256 size blocks: 221979 AES-256-CBC ops in 3.00s
Doing AES-256-CBC ops for 3s on 1024 size blocks: 202275 AES-256-CBC ops in 3.00s
Doing AES-256-CBC ops for 3s on 8192 size blocks: 104001 AES-256-CBC ops in 3.00s
Doing AES-256-CBC ops for 3s on 16384 size blocks: 65606 AES-256-CBC ops in 3.00s
version: 3.5.4
built on: Sat Nov  1 11:22:59 2025 UTC
options: bn(64,64)
compiler: gcc -fPIC -pthread -Wa,--noexecstack -Wall -fzero-call-used-regs=used-gpr -Wa,--noexecstack -g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/build/reproducible-path/openssl-3.5.4=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -mbranch-protection=standard -DOPENSSL_USE_NODELETE -DOPENSSL_PIC -DOPENSSL_BUILDING_OPENSSL -DZLIB -DZSTD -DNDEBUG -Wdate-time -D_FORTIFY_SOURCE=2
CPUINFO: OPENSSL_armcap=0xbd
The 'numbers' are in 1000s of bytes per second processed.
type             16 bytes     64 bytes    256 bytes   1024 bytes   8192 bytes  16384 bytes
AES-256-CBC       1231.90k     4882.11k    18942.21k    69043.20k   283992.06k   358296.23k

& without afalg

openssl speed -evp AES-256-CBC -elapsed
You have chosen to measure elapsed time instead of user CPU time.
Doing AES-256-CBC ops for 3s on 16 size blocks: 34584649 AES-256-CBC ops in 3.00s
Doing AES-256-CBC ops for 3s on 64 size blocks: 21309296 AES-256-CBC ops in 3.00s
Doing AES-256-CBC ops for 3s on 256 size blocks: 8220113 AES-256-CBC ops in 3.00s
Doing AES-256-CBC ops for 3s on 1024 size blocks: 2366627 AES-256-CBC ops in 3.00s
Doing AES-256-CBC ops for 3s on 8192 size blocks: 311310 AES-256-CBC ops in 3.00s
Doing AES-256-CBC ops for 3s on 16384 size blocks: 156233 AES-256-CBC ops in 3.00s
version: 3.5.4
built on: Sat Nov  1 11:22:59 2025 UTC
options: bn(64,64)
compiler: gcc -fPIC -pthread -Wa,--noexecstack -Wall -fzero-call-used-regs=used-gpr -Wa,--noexecstack -g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/build/reproducible-path/openssl-3.5.4=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -mbranch-protection=standard -DOPENSSL_USE_NODELETE -DOPENSSL_PIC -DOPENSSL_BUILDING_OPENSSL -DZLIB -DZSTD -DNDEBUG -Wdate-time -D_FORTIFY_SOURCE=2
CPUINFO: OPENSSL_armcap=0xbd
The 'numbers' are in 1000s of bytes per second processed.
type             16 bytes     64 bytes    256 bytes   1024 bytes   8192 bytes  16384 bytes
AES-256-CBC     184451.46k   454598.31k   701449.64k   807808.68k   850083.84k   853240.49k

with crypto_safexcel

 openssl speed -evp AES-256-CBC -elapsed -engine afalg
Engine "afalg" set.
You have chosen to measure elapsed time instead of user CPU time.
Doing AES-256-CBC ops for 3s on 16 size blocks: 88421 AES-256-CBC ops in 3.00s
Doing AES-256-CBC ops for 3s on 64 size blocks: 90939 AES-256-CBC ops in 3.00s
Doing AES-256-CBC ops for 3s on 256 size blocks: 89572 AES-256-CBC ops in 3.00s
Doing AES-256-CBC ops for 3s on 1024 size blocks: 85458 AES-256-CBC ops in 3.00s
Doing AES-256-CBC ops for 3s on 8192 size blocks: 57125 AES-256-CBC ops in 3.00s
Doing AES-256-CBC ops for 3s on 16384 size blocks: 41171 AES-256-CBC ops in 3.00s
version: 3.5.4
built on: Sat Nov  1 11:22:59 2025 UTC
options: bn(64,64)
compiler: gcc -fPIC -pthread -Wa,--noexecstack -Wall -fzero-call-used-regs=used-gpr -Wa,--noexecstack -g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/build/reproducible-path/openssl-3.5.4=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -mbranch-protection=standard -DOPENSSL_USE_NODELETE -DOPENSSL_PIC -DOPENSSL_BUILDING_OPENSSL -DZLIB -DZSTD -DNDEBUG -Wdate-time -D_FORTIFY_SOURCE=2
CPUINFO: OPENSSL_armcap=0xbd
The 'numbers' are in 1000s of bytes per second processed.
type             16 bytes     64 bytes    256 bytes   1024 bytes   8192 bytes  16384 bytes
AES-256-CBC        471.58k     1940.03k     7643.48k    29169.66k   155989.33k   224848.55k

& without afalg
openssl speed -evp AES-256-CBC -elapsed
You have chosen to measure elapsed time instead of user CPU time.
Doing AES-256-CBC ops for 3s on 16 size blocks: 34585000 AES-256-CBC ops in 3.00s
Doing AES-256-CBC ops for 3s on 64 size blocks: 21209210 AES-256-CBC ops in 3.00s
Doing AES-256-CBC ops for 3s on 256 size blocks: 8205380 AES-256-CBC ops in 3.00s
Doing AES-256-CBC ops for 3s on 1024 size blocks: 2365360 AES-256-CBC ops in 3.00s
Doing AES-256-CBC ops for 3s on 8192 size blocks: 311289 AES-256-CBC ops in 3.00s
Doing AES-256-CBC ops for 3s on 16384 size blocks: 156238 AES-256-CBC ops in 3.00s
version: 3.5.4
built on: Sat Nov  1 11:22:59 2025 UTC
options: bn(64,64)
compiler: gcc -fPIC -pthread -Wa,--noexecstack -Wall -fzero-call-used-regs=used-gpr -Wa,--noexecstack -g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/build/reproducible-path/openssl-3.5.4=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -mbranch-protection=standard -DOPENSSL_USE_NODELETE -DOPENSSL_PIC -DOPENSSL_BUILDING_OPENSSL -DZLIB -DZSTD -DNDEBUG -Wdate-time -D_FORTIFY_SOURCE=2
CPUINFO: OPENSSL_armcap=0xbd
The 'numbers' are in 1000s of bytes per second processed.
type             16 bytes     64 bytes    256 bytes   1024 bytes   8192 bytes  16384 bytes
AES-256-CBC     184453.33k   452463.15k   700192.43k   807376.21k   850026.50k   853267.80k


only can see the crypto interrupts increasing with the afalg engine