Skip to content

Commit 31f0fee

Browse files
GnurouDanilo Krummrich
authored andcommitted
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. [[email protected]: give better names to FalconAppifHdrV1's fields] Signed-off-by: Alexandre Courbot <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Danilo Krummrich <[email protected]>
1 parent 4368845 commit 31f0fee

File tree

5 files changed

+434
-15
lines changed

5 files changed

+434
-15
lines changed

drivers/gpu/nova-core/dma.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,6 @@
22

33
//! Simple DMA object wrapper.
44
5-
// To be removed when all code is used.
6-
#![expect(dead_code)]
7-
85
use core::ops::{Deref, DerefMut};
96

107
use kernel::device;

drivers/gpu/nova-core/firmware.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ use crate::falcon::FalconFirmware;
1515
use crate::gpu;
1616
use crate::gpu::Chipset;
1717

18+
pub(crate) mod fwsec;
19+
1820
pub(crate) const FIRMWARE_VERSION: &str = "535.113.01";
1921

2022
/// Structure encapsulating the firmware blobs required for the GPU to operate.
@@ -114,7 +116,6 @@ struct FirmwareDmaObject<F: FalconFirmware, S: SignedState>(DmaObject, PhantomDa
114116
/// This is module-local and meant for sub-modules to use internally.
115117
trait FirmwareSignature<F: FalconFirmware>: AsRef<[u8]> {}
116118

117-
#[expect(unused)]
118119
impl<F: FalconFirmware> FirmwareDmaObject<F, Unsigned> {
119120
/// Patches the firmware at offset `sig_base_img` with `signature`.
120121
fn patch_signature<S: FirmwareSignature<F>>(

0 commit comments

Comments
 (0)