Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

gpu: nova-core: falcon: Add support to write firmware version

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>

authored by

Joel Fernandes and committed by
Alexandre Courbot
945c1eee bb58d1ae

+14
+8
drivers/gpu/nova-core/falcon.rs
··· 621 621 let cpuctl = regs::NV_PRISCV_RISCV_CPUCTL::read(bar, &E::ID); 622 622 cpuctl.active_stat() 623 623 } 624 + 625 + /// Write the application version to the OS register. 626 + #[expect(dead_code)] 627 + pub(crate) fn write_os_version(&self, bar: &Bar0, app_version: u32) { 628 + regs::NV_PFALCON_FALCON_OS::default() 629 + .set_value(app_version) 630 + .write(bar, &E::ID); 631 + } 624 632 }
+6
drivers/gpu/nova-core/regs.rs
··· 230 230 31:0 value as u32; 231 231 }); 232 232 233 + // Used to store version information about the firmware running 234 + // on the Falcon processor. 235 + register!(NV_PFALCON_FALCON_OS @ PFalconBase[0x00000080] { 236 + 31:0 value as u32; 237 + }); 238 + 233 239 register!(NV_PFALCON_FALCON_RM @ PFalconBase[0x00000084] { 234 240 31:0 value as u32; 235 241 });