From b72cb7bcc20c3a0d7fc29590a6e85de3dfbe9eff Mon Sep 17 00:00:00 2001 From: Timur Tabi Date: Thu, 22 Jan 2026 16:28:37 -0600 Subject: gpu: nova-core: add ImemNonSecure section infrastructure The GSP booter firmware in Turing and GA100 includes a third memory section called ImemNonSecure, which is non-secure IMEM. This section must be loaded separately from DMEM and secure IMEM, but only if it actually exists. Signed-off-by: Timur Tabi Reviewed-by: John Hubbard Reviewed-by: Gary Guo Acked-by: Danilo Krummrich Link: https://patch.msgid.link/20260122222848.2555890-3-ttabi@nvidia.com [acourbot@nvidia.com: add `debug_assert`.] Signed-off-by: Alexandre Courbot --- drivers/gpu/nova-core/firmware/booter.rs | 9 +++++++++ drivers/gpu/nova-core/firmware/fwsec.rs | 5 +++++ 2 files changed, 14 insertions(+) (limited to 'drivers/gpu/nova-core/firmware') diff --git a/drivers/gpu/nova-core/firmware/booter.rs b/drivers/gpu/nova-core/firmware/booter.rs index 096cd01dbc9d..1b98bb47424c 100644 --- a/drivers/gpu/nova-core/firmware/booter.rs +++ b/drivers/gpu/nova-core/firmware/booter.rs @@ -253,6 +253,9 @@ impl<'a> FirmwareSignature for BooterSignature<'a> {} pub(crate) struct BooterFirmware { // Load parameters for Secure `IMEM` falcon memory. imem_sec_load_target: FalconLoadTarget, + // Load parameters for Non-Secure `IMEM` falcon memory, + // used only on Turing and GA100 + imem_ns_load_target: Option, // Load parameters for `DMEM` falcon memory. dmem_load_target: FalconLoadTarget, // BROM falcon parameters. @@ -359,6 +362,8 @@ impl BooterFirmware { dst_start: 0, len: app0.len, }, + // Exists only in the booter image for Turing and GA100 + imem_ns_load_target: None, dmem_load_target: FalconLoadTarget { src_start: load_hdr.os_data_offset, dst_start: 0, @@ -375,6 +380,10 @@ impl FalconLoadParams for BooterFirmware { self.imem_sec_load_target.clone() } + fn imem_ns_load_params(&self) -> Option { + self.imem_ns_load_target.clone() + } + fn dmem_load_params(&self) -> FalconLoadTarget { self.dmem_load_target.clone() } diff --git a/drivers/gpu/nova-core/firmware/fwsec.rs b/drivers/gpu/nova-core/firmware/fwsec.rs index 6a2f5a0d4b15..e4009faba6c5 100644 --- a/drivers/gpu/nova-core/firmware/fwsec.rs +++ b/drivers/gpu/nova-core/firmware/fwsec.rs @@ -232,6 +232,11 @@ impl FalconLoadParams for FwsecFirmware { } } + fn imem_ns_load_params(&self) -> Option { + // Only used on Turing and GA100, so return None for now + None + } + fn dmem_load_params(&self) -> FalconLoadTarget { FalconLoadTarget { src_start: self.desc.imem_load_size, -- cgit v1.2.3