]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
gpu: nova-core: falcon: Add support to write firmware version
authorJoel Fernandes <joelagnelf@nvidia.com>
Mon, 10 Nov 2025 13:34:22 +0000 (22:34 +0900)
committerAlexandre Courbot <acourbot@nvidia.com>
Fri, 14 Nov 2025 11:25:57 +0000 (20:25 +0900)
This will be needed by both the GSP boot code as well as GSP resume code
in the sequencer.

Reviewed-by: Lyude Paul <lyude@redhat.com>
Signed-off-by: Joel Fernandes <joelagnelf@nvidia.com>
Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
Message-ID: <20251110-gsp_boot-v9-14-8ae4058e3c0e@nvidia.com>

drivers/gpu/nova-core/falcon.rs
drivers/gpu/nova-core/regs.rs

index 4c1f36073533a6888fd449e93e1da5caffc079ac..31904e1d804b3fec7f99e33f0d2ff48aebc464b6 100644 (file)
@@ -621,4 +621,12 @@ impl<E: FalconEngine + 'static> Falcon<E> {
         let cpuctl = regs::NV_PRISCV_RISCV_CPUCTL::read(bar, &E::ID);
         cpuctl.active_stat()
     }
+
+    /// Write the application version to the OS register.
+    #[expect(dead_code)]
+    pub(crate) fn write_os_version(&self, bar: &Bar0, app_version: u32) {
+        regs::NV_PFALCON_FALCON_OS::default()
+            .set_value(app_version)
+            .write(bar, &E::ID);
+    }
 }
index 5d5ba766cd61085ceb6d137ad13e7539fc8e7574..274e53a1a44d79bb973f8289710f2b4a7f1389d9 100644 (file)
@@ -230,6 +230,12 @@ register!(NV_PFALCON_FALCON_MAILBOX1 @ PFalconBase[0x00000044] {
     31:0    value as u32;
 });
 
+// Used to store version information about the firmware running
+// on the Falcon processor.
+register!(NV_PFALCON_FALCON_OS @ PFalconBase[0x00000080] {
+    31:0    value as u32;
+});
+
 register!(NV_PFALCON_FALCON_RM @ PFalconBase[0x00000084] {
     31:0    value as u32;
 });