diff options
author | Alexandre Courbot <acourbot@nvidia.com> | 2025-06-19 16:24:06 +0300 |
---|---|---|
committer | Danilo Krummrich <dakr@kernel.org> | 2025-06-23 23:03:09 +0300 |
commit | 31f0feefb49a219687a1233e68146db834417d75 (patch) | |
tree | 6475f1eed9a225f5606afadc54bb8012c79205c2 /drivers/gpu/nova-core/gpu.rs | |
parent | 436884511d54b8a090fe2886d48f72143ce95b67 (diff) | |
download | linux-31f0feefb49a219687a1233e68146db834417d75.tar.xz |
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/gpu.rs')
-rw-r--r-- | drivers/gpu/nova-core/gpu.rs | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/drivers/gpu/nova-core/gpu.rs b/drivers/gpu/nova-core/gpu.rs index a748ce689e61..c53e6135ca7d 100644 --- a/drivers/gpu/nova-core/gpu.rs +++ b/drivers/gpu/nova-core/gpu.rs @@ -6,6 +6,7 @@ use crate::driver::Bar0; use crate::falcon::{gsp::Gsp, sec2::Sec2, Falcon}; use crate::fb::FbLayout; use crate::fb::SysmemFlush; +use crate::firmware::fwsec::{FwsecCommand, FwsecFirmware}; use crate::firmware::{Firmware, FIRMWARE_VERSION}; use crate::gfw; use crate::regs; @@ -219,8 +220,18 @@ impl Gpu { let fb_layout = FbLayout::new(spec.chipset, bar)?; dev_dbg!(pdev.as_ref(), "{:#x?}\n", fb_layout); - // Will be used in a later patch when fwsec firmware is needed. - let _bios = Vbios::new(pdev, bar)?; + let bios = Vbios::new(pdev, bar)?; + + let _fwsec_frts = FwsecFirmware::new( + pdev.as_ref(), + &gsp_falcon, + bar, + &bios, + FwsecCommand::Frts { + frts_addr: fb_layout.frts.start, + frts_size: fb_layout.frts.end - fb_layout.frts.start, + }, + )?; Ok(pin_init!(Self { spec, |