From: Alexandre Courbot Date: Thu, 19 Jun 2025 13:24:00 +0000 (+0900) Subject: gpu: nova-core: firmware: add ucode descriptor used by FWSEC-FRTS X-Git-Tag: v6.17-rc1~110^2~1^2~21 X-Git-Url: https://gentwo.org/gitweb/?a=commitdiff_plain;h=d0c167eb0afaed24e320e2b461ffae21fe48df7c;p=linux%2F.git gpu: nova-core: firmware: add ucode descriptor used by FWSEC-FRTS FWSEC-FRTS is the first firmware we need to run on the GSP falcon in order to initiate the GSP boot process. Introduce the structure that describes it. Reviewed-by: Lyude Paul Signed-off-by: Alexandre Courbot Link: https://lore.kernel.org/r/20250619-nova-frts-v6-16-ecf41ef99252@nvidia.com Signed-off-by: Danilo Krummrich --- diff --git a/drivers/gpu/nova-core/firmware.rs b/drivers/gpu/nova-core/firmware.rs index 4b8a38358a4f..2f4f5c7c7902 100644 --- a/drivers/gpu/nova-core/firmware.rs +++ b/drivers/gpu/nova-core/firmware.rs @@ -41,6 +41,51 @@ pub(crate) fn new(dev: &device::Device, chipset: Chipset, ver: &str) -> Result usize { + const HDR_SIZE_SHIFT: u32 = 16; + const HDR_SIZE_MASK: u32 = 0xffff0000; + + ((self.hdr & HDR_SIZE_MASK) >> HDR_SIZE_SHIFT) as usize + } +} + pub(crate) struct ModInfoBuilder(firmware::ModInfoBuilder); impl ModInfoBuilder {