summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python
diff options
context:
space:
mode:
authorMario Limonciello <mario.limonciello@amd.com>2026-11-14 10:09:25 -0600
committerAlex Deucher <alexander.deucher@amd.com>2026-11-18 01:49:31 -0500
commit6d8e709912753f175256e4fafb73ba1ea50baf9f (patch)
tree749e84a13ab259fdd10fee8a4940d9ac4337b4ac /tools/perf/scripts/python
parentbd2ea9d0787584209eda39332b40a3cf0f8d6865 (diff)
drm/amd: Select the firmware signing scheme the PSP reports
Some platforms ship BIOS with either a default or an alternative trust authority, so firmware for every IP must be signed with the matching scheme. The PSP advertises which one is in use in bit 6 of C2PMSG_63, and in bit 28 whether this is a preproduction part, which needs firmware of its own. Add amdgpu_psp_init_fw_variant() which reads those bits through amdgpu's own MMIO, and keep the result in adev->firmware.sign_type next to load_type, where preproduction is a type of its own. It is initialized once, after IP discovery has populated the register bases and only when firmware is loaded through the front door (the PSP). Only MP0 15.0.0 and 15.0.9 report it. For all other ASICs, SR-IOV VFs and an inaccessible register (all ones) the defaults are kept: AMDGPU_FW_SIGN_DEFAULT. A preproduction part that also reports the alternative scheme is not expected. Mark it AMDGPU_FW_SIGN_UNKNOWN, so that firmware requests warn and fail with -EINVAL rather than load firmware that would be rejected. Firmware for preproduction parts is named with a "_p" suffix before the extension and firmware for the alternative scheme with an "_l" suffix (e.g. "foo.bin" becomes "foo_p.bin" or "foo_l.bin"). Production parts on the default scheme use the plain names. Do the substitution centrally in amdgpu_ucode_request() so it covers every IP that loads firmware through it (PSP, SMU, DMUB, GC, IMU, MES, SDMA, VCN, VPE, ...) without each loader having to care. There is no fallback to the default file: it would be rejected anyway. Declare the variants with MODULE_FIRMWARE() so that initramfs generators include them. Acked-by: Alex Deucher <alexander.deucher@amd.com> Link: https://patch.msgid.link/20261114160925.390350-1-superm1@kernel.org Signed-off-by: Mario Limonciello <mario.limonciello@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> (cherry picked from commit 2fe41c5fb704e05ccf2bf00634e1b5ad2db4e5b7)
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions