gpu: nova-core: set MCTP transport header version to 1

FSP, the GPU's Foundation Security Processor, receives the driver's
messages as packets of MCTP, the Management Component Transport
Protocol. It requires header version 1 in bits 3:0 of the MCTP transport
header.

Nova-core left those bits at zero, so every Chain of Trust request and
every Product Reconfiguration Control request that it sent carried an
invalid transport header.

Declare the version field and set it. Declare the destination endpoint
ID field as well. The driver leaves that field at zero.

Assisted-by: LLM
Signed-off-by: John Hubbard <jhubbard@nvidia.com>
Reviewed-by: Timur Tabi <ttabi@nvidia.com>
Reviewed-by: Zhi Wang <zhiw@nvidia.com>
Link: https://patch.msgid.link/20260918010719.1176945-3-jhubbard@nvidia.com
[acourbot: explicitly set deid field]
Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
This commit is contained in:
John Hubbard 2026-09-17 18:06:48 -07:00 committed by Alexandre Courbot
parent f9836eb2cf
commit 6f0bdccfff
2 changed files with 16 additions and 2 deletions

View File

@ -106,6 +106,8 @@ All FSP messages share a common header format consisting of two 32-bit words:
- Bit 30: EOM (End of Message)
- Bits 29:28: Packet sequence number
- Bits 23:16: Source Endpoint ID
- Bits 15:8: Destination Endpoint ID
- Bits 3:0: MCTP header version (1)
**NVDM header** (NVIDIA Vendor Defined Message):

View File

@ -42,13 +42,25 @@ pub(crate) struct MctpHeader(u32) {
29:28 seq;
/// Source endpoint ID.
23:16 seid;
/// Destination endpoint ID.
15:8 deid;
/// MCTP header version.
3:0 version;
}
}
impl MctpHeader {
/// Builds a single-packet MCTP header (`SOM=1`, `EOM=1`, `SEQ=0`, `SEID=0`).
/// The MCTP header version that this driver uses.
const VERSION: u32 = 1;
/// Builds the MCTP header of a message that fits in one packet: `SOM` and `EOM` set, the
/// version set, and every other field zero.
pub(crate) fn single_packet() -> Self {
Self::zeroed().with_som(true).with_eom(true)
Self::zeroed()
.with_const_version::<{ Self::VERSION }>()
.with_const_deid::<0>()
.with_som(true)
.with_eom(true)
}
/// Returns whether this is a complete single-packet message (`SOM=1` and `EOM=1`).