HW accelerated crypto module not loading (ccp-crypto)

I have an AMD 5800U based system. When I boot OpenWrt, I am seeing the module needed for for hw accel not loading:

# dmesg | grep -i ccp
[    4.098273] ccp 0000:04:00.2: enabling device (0000 -> 0002)
[    4.104660] ccp 0000:04:00.2: ccp: unable to access the device: you might be running a broken BIOS.
[    7.588811] ccp_crypto: Cannot load: there are no available CCPs
[    9.742383] ccp_crypto: Cannot load: there are no available CCPs
[   10.120408] kmodloader: - ccp-crypto - 0

Yet if I boot the same hardware into Arch Linux running the same kernel version, the module loads fine:

# dmesg | grep -i ccp
[    4.505785] ccp 0000:05:00.2: enabling device (0000 -> 0002)
[    4.519217] ccp 0000:05:00.2: ccp: unable to access the device: you might be running a broken BIOS.
[    4.529376] ccp 0000:05:00.2: tee enabled
[    4.529382] ccp 0000:05:00.2: psp enabled

I did find this thread but found nothing in there I could use. Any advice is appreciated.

I also found this blog post suggesting that libopenssl-devcrypto needed to be on the system but enalbing it did not change the error for me.

I have similar problem and I get the same error massages. I was under the impression it may be connected to the BIOS version...https://forum.openwrt.org/t/cryptographic-hardware-accelerators-cr15ing/166808/2. I was planning to try the Ufi version, but it will be after the vacation.

I do not believe this is relevant at least in my case because if I boot to Arch Linux running the identical kernel version as OpenWrt, the module is loaded without error.

1 Like

Please let me know if you find a solution, as it may be relevant for my case.
Thanks
Kind regards

K.

If I am reading the Makefile correctly, it should be packaging ccp.ko:

Yet, I do not have that file in my build nor on my image. I wonder if that is the problem? Why is that module missing?

On my OpenWrt system:

# find /lib/modules/6.1.42 -name '*ccp*'
/lib/modules/6.1.42/ccp-crypto.ko

Yet on the Arch partition, it is present:

# find /usr/lib/modules/6.1.42-1-lts -name '*ccp*'
/usr/lib/modules/6.1.42-1-lts/kernel/net/netfilter/xt_dccp.ko.zst
/usr/lib/modules/6.1.42-1-lts/kernel/drivers/crypto/ccp
/usr/lib/modules/6.1.42-1-lts/kernel/drivers/crypto/ccp/ccp-crypto.ko.zst
/usr/lib/modules/6.1.42-1-lts/kernel/drivers/crypto/ccp/ccp.ko.zst

I don't think you can compare the two kernels that easy. OpenWrt applies different patches and therein may be the reason why the Arch kernel can work with the ccp module.

The current kernel Arch LTS seems to be 6.1.39 and you can the config file in their git. But it looks like they pull the official kernel and apply only one additional patch for that version.

You would have to check where you're kernel is coming from and what patches are applied. Assuming there are no ccp related patches, the difference would have to be in the ccp code itself (drivers/crypto/ccp). Or may create an issue on github for it.

I only compare to suggest that the BIOS is setup correctly. I did look for patches that are touching this module but found none.

find target/linux -name '*.patch' -print0 | xargs -0 grep --color=auto 'ccp'

I opened an issue: https://github.com/openwrt/openwrt/issues/13184

1 Like