aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/drivers/gpu/nova-core/firmware.rs
diff options
context:
space:
mode:
authorAlexandre Courbot <acourbot@nvidia.com>2025-06-19 22:24:06 +0900
committerDanilo Krummrich <dakr@kernel.org>2025-06-23 22:03:09 +0200
commit31f0feefb49a219687a1233e68146db834417d75 (patch)
tree6475f1eed9a225f5606afadc54bb8012c79205c2 /drivers/gpu/nova-core/firmware.rs
parentgpu: nova-core: add types for patching firmware binaries (diff)
downloadwireguard-linux-31f0feefb49a219687a1233e68146db834417d75.tar.xz
wireguard-linux-31f0feefb49a219687a1233e68146db834417d75.zip
gpu: nova-core: extract FWSEC from BIOS and patch it to run FWSEC-FRTS
The FWSEC firmware needs to be extracted from the VBIOS and patched with the desired command, as well as the right signature. Do this so we are ready to load and run this firmware into the GSP falcon and create the FRTS region. [joelagnelf@nvidia.com: give better names to FalconAppifHdrV1's fields] Signed-off-by: Alexandre Courbot <acourbot@nvidia.com> Link: https://lore.kernel.org/r/20250619-nova-frts-v6-22-ecf41ef99252@nvidia.com Signed-off-by: Danilo Krummrich <dakr@kernel.org>
Diffstat (limited to 'drivers/gpu/nova-core/firmware.rs')
-rw-r--r--drivers/gpu/nova-core/firmware.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/gpu/nova-core/firmware.rs b/drivers/gpu/nova-core/firmware.rs
index 09e6bd104a6c..0fdece652587 100644
--- a/drivers/gpu/nova-core/firmware.rs
+++ b/drivers/gpu/nova-core/firmware.rs
@@ -15,6 +15,8 @@ use crate::falcon::FalconFirmware;
use crate::gpu;
use crate::gpu::Chipset;
+pub(crate) mod fwsec;
+
pub(crate) const FIRMWARE_VERSION: &str = "535.113.01";
/// Structure encapsulating the firmware blobs required for the GPU to operate.
@@ -114,7 +116,6 @@ struct FirmwareDmaObject<F: FalconFirmware, S: SignedState>(DmaObject, PhantomDa
/// This is module-local and meant for sub-modules to use internally.
trait FirmwareSignature<F: FalconFirmware>: AsRef<[u8]> {}
-#[expect(unused)]
impl<F: FalconFirmware> FirmwareDmaObject<F, Unsigned> {
/// Patches the firmware at offset `sig_base_img` with `signature`.
fn patch_signature<S: FirmwareSignature<F>>(