CAAM api change

caam_jr_enqueue, a function which once returned 0 on success now returns a non-zero value for a pending transaction and existing logic being forward ported was breaking as a result; the kernel was consistently panicking. The resulting splatter made recognizing the issue surprisingly tricky. Luckily I ran into this:

in particular this glorious mofo:

who shared this:

I think, the problem lies in

The return behavior of caam_jr_enqueue slightly changed in kernel 5.7. When
previously it returned 0 on success, it now returns EINPROGRESS:

Accordingly, the next lines should not be
if(!res) {
if(res == -EINPROGRESS) {

It's probably just this fix in line

Unfortunately, I don't have any hardware available to test and debug right now,
so I'll have to leave the actual fix to someone else.

Which swiftly led to cthulu’s noodle appendages retreating from my personal foreground as doors opened.

dtb loadaddr suddenly needs to be specified

Another issue I hit was that my device would not longer boot. The device died at:

Starting Linux ...

if you enabled early printk, you then get to see roughly this

Starting kernel ...

Error: invalid dtb and unrecognized/unsupported machine ID
r1=0x00000f8c, r2=0x10000100
r2[]=05 00 00 00 01 00 41 54 00 00 00 00 00 00 00 00
Available machine support:

ID (hex) NAME
ffffffff Generic DT based system
ffffffff Freescale i.MX6 Quad/DualLite (Device Tree)
ffffffff SCI XPHUB (Device Tree)
ffffffff Freescale i.MX6 SoloLite (Device Tree)
ffffffff Freescale i.MX6 SoloX (Device Tree)
ffffffff Freescale i.MX6 Ultralite (Device Tree)
ffffffff Freescale i.MX7 Dual (Device Tree)
ffffffff Freescale i.MX50 (Device Tree Support)
ffffffff Freescale i.MX51 (Device Tree Support)
ffffffff Freescale i.MX53 (Device Tree Support)
ffffffff Freescale Vybrid VF5xx/VF6xx (Device Tree)
ffffffff Freescale LS1021A
ffffffff ARM-Versatile Express

You should read the NXP thread:

I did not find the responses particularly helpful.

My dtb which is packed in a fitimage appeared to now suddenly be being unpacked to a bogus location. Kind odd bug to hit when jumping kernel versions. This intepretation was bolstered by the fact NFS booting the same kernel with an explicitly placed version of the same device tree was working. I assumed some secondary mechanism had previously been making this work, despite a malconfigured (turns out an actually absent) fitimage loadaddr. Introducing an explicit loadaddr to the dtb entry in fitimage config did acually end up resolving the issue and the kernel proceeded to boot.