[PATCH v5 28/38] gpu: nova-core: Hopper/Blackwell: add FspCotVersion type

From: John Hubbard

Date: Fri Feb 20 2026 - 21:13:31 EST


Add FspCotVersion to represent the FSP Chain of Trust protocol version,
and Chipset::fsp_cot_version() which returns the version for each
architecture. Hopper uses version 1, Blackwell uses version 2.
Non-FSP architectures return None.

Signed-off-by: John Hubbard <jhubbard@xxxxxxxxxx>
---
drivers/gpu/nova-core/fsp.rs | 19 +++++++++++++++++++
drivers/gpu/nova-core/gpu.rs | 14 ++++++++++++++
2 files changed, 33 insertions(+)

diff --git a/drivers/gpu/nova-core/fsp.rs b/drivers/gpu/nova-core/fsp.rs
index 20c439fc7f7b..8926dd814a83 100644
--- a/drivers/gpu/nova-core/fsp.rs
+++ b/drivers/gpu/nova-core/fsp.rs
@@ -25,6 +25,25 @@
NvdmType, //
};

+/// FSP Chain of Trust protocol version.
+///
+/// Hopper (GH100) uses version 1, Blackwell uses version 2.
+#[derive(Debug, Clone, Copy)]
+pub(crate) struct FspCotVersion(u16);
+
+impl FspCotVersion {
+ /// Create a new FSP COT version.
+ pub(crate) const fn new(version: u16) -> Self {
+ Self(version)
+ }
+
+ /// Return the raw protocol version number for the wire format.
+ #[expect(dead_code)]
+ pub(crate) const fn raw(self) -> u16 {
+ self.0
+ }
+}
+
/// FSP message timeout in milliseconds.
const FSP_MSG_TIMEOUT_MS: i64 = 2000;

diff --git a/drivers/gpu/nova-core/gpu.rs b/drivers/gpu/nova-core/gpu.rs
index 50bf351b64cc..fc34c97a61fc 100644
--- a/drivers/gpu/nova-core/gpu.rs
+++ b/drivers/gpu/nova-core/gpu.rs
@@ -21,6 +21,7 @@
Falcon, //
},
fb::SysmemFlush,
+ fsp::FspCotVersion,
gfw,
gsp::Gsp,
regs,
@@ -127,6 +128,19 @@ pub(crate) const fn arch(&self) -> Architecture {
| Self::GB207 => Architecture::Blackwell,
}
}
+
+ /// Returns the FSP Chain of Trust (COT) protocol version for this chipset.
+ ///
+ /// Hopper (GH100) uses version 1, Blackwell uses version 2.
+ /// Returns `None` for architectures that do not use FSP.
+ #[expect(dead_code)]
+ pub(crate) const fn fsp_cot_version(&self) -> Option<FspCotVersion> {
+ match self.arch() {
+ Architecture::Hopper => Some(FspCotVersion::new(1)),
+ Architecture::Blackwell => Some(FspCotVersion::new(2)),
+ _ => None,
+ }
+ }
}

// TODO
--
2.53.0