Bug 219883

Summary: amdtee - 6.14-rc6 - failed to load firmware /amdtee/f29bb3d9-bd66-5441-afb88acc2b2b60d6.bin
Product: Drivers Reporter: Jerome C (me)
Component: OtherAssignee: drivers_other
Status: RESOLVED CODE_FIX    
Severity: normal CC: 29adc1fd92, cegolf, dimitris.on.linux, Sanath.S
Priority: P3    
Hardware: AMD   
OS: Linux   
Kernel Version: Subsystem:
Regression: No Bisected commit-id:

Description Jerome C 2025-03-15 14:13:54 UTC
Using kernel 6.14-rc6 I've recently noticed ( same with rc5 and rc4, I don't remember for rc3 down to rc1 ) I see...

[   12.241171] amd-tee driver initialization successful

and then 4 lines ( unrelated to tee ) later the following error messages

[   12.348041] tee tee0: Direct firmware load for /amdtee/f29bb3d9-bd66-5441-afb88acc2b2b60d6.bin failed with error -2
[   12.348047] failed to load firmware /amdtee/f29bb3d9-bd66-5441-afb88acc2b2b60d6.bin
[   12.348049] failed to copy TA binary
[   12.348049] Failed to open TEE session err:0x0, rc:-12
[   12.348051] amd-pmf AMDI0102:00: Failed to open TA session (-12)
[   12.348083] amd-pmf AMDI0102:00: registered PMF device successfully

looking at linux-firmware repository and local file system, I don't see the firmware file at "/lib/firmware/amdtee/f29bb3d9-bd66-5441-afb88acc2b2b60d6.bin".

I only see "/lib/firmware/amdtee/773bd96f-b83f-4d52-b12dc529b13d8543.bin" and "/lib/firmware/amdtee/amd_pmf_v3.bin" which is a symlink to "/lib/firmware/amdtee/773bd96f-b83f-4d52-b12dc529b13d8543.bin"

Loading kernel 6.13.7 and the error is gone ( second line is printed due to a patch from Gentoo which prints the path to the loaded firmware file )

[    7.616711] amd-tee driver initialization successful
[    7.619160] Loading firmware: /amdtee/773bd96f-b83f-4d52-b12dc529b13d8543.bin
[    7.735453] amd-pmf AMDI0102:00: registered PMF device successfully

I'm guessing the firmware "/amdtee/f29bb3d9-bd66-5441-afb88acc2b2b60d6.bin" is missing from linux-firmware repository?
Comment 1 Sanath S 2025-03-17 09:55:51 UTC
Hi Jerome,

The required firmware - /lib/firmware/amdtee/773bd96f-b83f-4d52-b12dc529b13d8543.bin will be submitted to the Linux-Firmware git repository shortly.
Comment 2 Jerome C 2025-03-17 10:08:18 UTC
Hi Sanath

I'm a little confused. Did you mean "/lib/firmware/amdtee/f29bb3d9-bd66-5441-afb88acc2b2b60d6.bin" ?

because "/lib/firmware/amdtee/773bd96f-b83f-4d52-b12dc529b13d8543.bin" is already in the linux-firmware repository

"/lib/firmware/amdtee/f29bb3d9-bd66-5441-afb88acc2b2b60d6.bin" is the one showing as an error during loading
Comment 3 Sanath S 2025-03-18 04:53:02 UTC
Hi Jerome,

Yes, It is /lib/firmware/amdtee/f29bb3d9-bd66-5441-afb88acc2b2b60d6.bin.
Comment 4 Felix P 2025-04-08 10:08:25 UTC
Hi Sanath,

I'm still experiencing this with kernel 6.14.1. Was there any issue with the new firmware (/amdtee/f29bb3d9-bd66-5441-afb88acc2b2b60d6.bin) that people could help debug?
Comment 5 Sanath S 2025-04-09 05:30:55 UTC
Hi Felix,

/lib/firmware/amdtee/f29bb3d9-bd66-5441-afb88acc2b2b60d6.bin is not yet available in 6.14.1.

It should be available in Linux-Firmware git repository by April 25th.
Comment 6 Jerome C 2025-05-05 07:45:27 UTC
Hi, Sanath

The firmware is still not on the repository but you mentioned it be there on April 25th.

Maybe a mistake for it not to be at linux-firmware or release day changed?
Comment 7 Jerome C 2025-05-08 05:05:08 UTC
Hi,

I see the firmware was added however it still failed to load after creating my initramfs using dracut.

using command "modinfo amdtee" I see that the "firmware:" field is not defined, MODULE_FIRMWARE macro not defined anywhere at "linux-src/drivers/tee/amdtee/", so dracut doesn't include those files into my initramfs and during early boot amdtee still fails to load because those files are not in the initramfs

manually adding the files to dracut and it works
Comment 8 Artem S. Tashkinov 2025-05-08 13:06:05 UTC
(In reply to Jerome C from comment #7)
> Hi,
> 
> I see the firmware was added however it still failed to load after creating
> my initramfs using dracut.
> 
> using command "modinfo amdtee" I see that the "firmware:" field is not
> defined, MODULE_FIRMWARE macro not defined anywhere at
> "linux-src/drivers/tee/amdtee/", so dracut doesn't include those files into
> my initramfs and during early boot amdtee still fails to load because those
> files are not in the initramfs
> 
> manually adding the files to dracut and it works

Take it to your distro.