From nobody Mon Sep 28 07:19:49 2026 Received: from PH0PR06CU001.outbound.protection.outlook.com (mail-westus3azon11011010.outbound.protection.outlook.com [40.107.208.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 609273E3147; Tue, 25 Aug 2026 08:31:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.208.10 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787646697; cv=fail; b=NFqZL37zhr5Pz82DXDBZ3CFk+0omxy2qATjehBd0GbvDVu6tHwqELwzwzGLq3jeHT9UyENc6d2QNDmvJ4J4GAPKRqiCz87qGiTLVbKyMSacX2XCo3LowQxwr98/iuRhHfg2wHkAUqchnyTBhH7h0D2gFVceo2raNapRLL41sz7I= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787646697; c=relaxed/simple; bh=wgmu7mRbgherU0Tp/H621N9eKz9DRI5a/03G5VXVHiU=; h=From:Date:Subject:Content-Type:Message-Id:To:Cc:MIME-Version; b=EV5NYPHjPPpoRCmUxIeF5Y7a19dWl4F528H+GxzexlX5S//Q2f2LPXK7kWj6hJ1NtX9H/Z4yIEIZYjaLq+s/At0zeIGKMpCOVvsLCYnVZL1hhlQvT4RU4gMVt0HNLHWytMK0x2zfX1SZYMeDVqC9M3tv7RldEaifnQB+GHh9Z5E= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=nvidia.com; spf=fail smtp.mailfrom=nvidia.com; dkim=pass (2048-bit key) header.d=Nvidia.com header.i=@Nvidia.com header.b=AQcJv9on; arc=fail smtp.client-ip=40.107.208.10 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=nvidia.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=nvidia.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=Nvidia.com header.i=@Nvidia.com header.b="AQcJv9on" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=xN0aesfRI+eD3urxHgjwnW5HC02BmJdJA4y4kgvyMk3jkTdG7A7wi7yf4h3V8EMTQCAQ/TBfAjUDVkyZamzO9jPKfEIxRQ4+EeZa1UEaWLOcsXMHGhJfFcrNZs3/FJRRc71GwYw/pOqyRJJGsVyVUXAI1DS3DUftJUMHZWdMnOedgbpKRcyMv/hrHA7s4z0LS2GO+NdCRdUAJChIqBVxKApEi4Vd18mKgaU47xqgKEB4lT/vkEk+IwwTb1r48j64hvP954Tt40GSylelFigtLJK8i4cawbYr4ya0ylGJOxD51BewHhSJ3UiyRKzxFC6eSnMFXVEJUbKg1HIjsi+TFw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=1xudmM+jCbqI1mUy3ER2wCa7Pg592HDwdTucH41x+uk=; b=GrIGXb748iKNKAIrhneBkm4C2KeCYOPoPmjQcQbOQlhgV6s8aGTdhok8Xc+JW8OX6zw9KL6WJTPhGo+qilFDIMS3w5vxOot4PjFu04XQdGL/dPIsPc6cfbT5X1QTJ4xhWVm/bTT9+rYwgtEUycOXTQzlK2x8X53iedZDMnPG8BepjAKp4t6kTg/aOpe4yifxpT5VEt585/XGzrx4pjhFLlGEok5gv5x1SnYQ/pmBf7e/naLb4dHF6gji5EkpPZy4iSIBQhQE/cWaGQm1rMLwuf58Mw4DhcK7N6jRjqTTJ41JuUKJj5Pc7WUnxTY566RVJiPQ0u3psjgUagHnBi/k5A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nvidia.com; dmarc=pass action=none header.from=nvidia.com; dkim=pass header.d=nvidia.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=1xudmM+jCbqI1mUy3ER2wCa7Pg592HDwdTucH41x+uk=; b=AQcJv9onlSpV0pGNTY5bXplJA5Ui5ACY58W/O3eP5CbcSNtwk6kclw56jwE5QPuvvOk5DOP2ii5rM/r9Pa+Azm6F5D6Ws4KUkJUOr396Afmjdt0d64csYWQA28+Zy4oE8CcDtPmxRDeraUquht63S9ss95Xb81D7yjVe6n6KqerkegjTnhyvXCIRNQXuDDR/bYLT7RK2ymzPORrDTqVeBz/CAekQtFeJFE06ehBRWZGhIXObUQgeWqLFe/eqPwfxGkNj9rztaaJ8ZoAg3UZiSWZ8RvDSq3dlZUswL+gkmX2qiAaNb2J/y/gelrialbF0Kqfko2c9YAJIQQgRpJoS1Q== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nvidia.com; Received: from MW4PR12MB6873.namprd12.prod.outlook.com (2603:10b6:303:20c::17) by DS7PR12MB6021.namprd12.prod.outlook.com (2603:10b6:8:87::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.21.339.11; Tue, 25 Aug 2026 08:31:28 +0000 Received: from MW4PR12MB6873.namprd12.prod.outlook.com ([fe80::a338:bd2c:3a38:ece1]) by MW4PR12MB6873.namprd12.prod.outlook.com ([fe80::a338:bd2c:3a38:ece1%5]) with mapi id 15.21.0315.014; Tue, 25 Aug 2026 08:31:28 +0000 From: Alexandre Courbot Date: Tue, 25 Aug 2026 17:31:17 +0900 Subject: [PATCH] gpu: nova-core: fix incorrect naming/framing of GSP-FMC firmware Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260825-gsp-fmc-rename-v1-1-f82526f01d7d@nvidia.com> X-B4-Tracking: v=1; b=H4sIAAAAAAAC/yXMTQqDMBBA4avIrB1I4k9pryIuYpzYKZhKRkUI3 t3YLr/FewmEIpPAq0gQaWfhb8jQZQHubcNEyGM2GGVa9TAVTrKgnx1GCnYmHK2yjdJPX9cacrR E8nz8hl3/t2zDh9x6X+A8LyPVxOpyAAAA X-Change-ID: 20260723-gsp-fmc-rename-da0a5019f441 To: Danilo Krummrich , David Airlie , Simona Vetter , Alice Ryhl , Benno Lossin , Gary Guo Cc: John Hubbard , Alistair Popple , Timur Tabi , Eliot Courtney , Zhi Wang , nova-gpu@lists.linux.dev, linux-kernel@vger.kernel.org, rust-for-linux@vger.kernel.org, Alexandre Courbot X-Mailer: b4 0.15.2 X-ClientProxiedBy: OS0P286CA0033.JPNP286.PROD.OUTLOOK.COM (2603:1096:604:9d::20) To MW4PR12MB6873.namprd12.prod.outlook.com (2603:10b6:303:20c::17) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: MW4PR12MB6873:EE_|DS7PR12MB6021:EE_ X-MS-Office365-Filtering-Correlation-Id: bbd164aa-af55-480b-efed-08df0283424b X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|10070799003|376014|1800799024|366016|23010399003|10067099003|56012099006|11063799006|3023799007|18002099003; X-Microsoft-Antispam-Message-Info: lpHaDqI9dAVa7AOslNdGF/r+ut/ZO8bBiwEPtEM9R+gFsBxZoEcnEpMiM6QaRAqnMqaUC6KPNlKBLM6B98Nwj3w5zf9SQbpT790LY95d4IHoB1xHv97P9Sk4Dd0rVE+gunPScxR7c+vKhv8ja0KZrfqcrLemr9Apf7bv2tO9vV3aCMXIkAYiulHXANxc5iDRkYNx01ngyZLWRBaNDVXFnOW+WTWR4QsNi50nsSvPtIQuryYWoKYGTrl7DQu6u8u/QVr5iWVoc3eOF9IJb52LkOnCPfdUzAfQNhZlDI1TcjMtFYmgufU4oUx36puKxwvx/eYUe533XulelSdtiCPHj2uZWkGSWbjOQH/woziqESKe6OSeB0FxuY1GSNpBJXd5tkewtyjFW94nxKzPuEYkR9+NQCYI2nTybSMkk7f9HNwS55K3RzwhTXz/H9ozWcZrsXkdm8an5jbHBYhQZgbaJ6xY196iMlMtsoiDXVtm8u/hFo1vKt3HY0b0E+v4lNkQn0s8RZjctVFxLRkr+28A3JNgrdJS9BBO0X7DzHbZpF6G/FjIp7XCq0IXHrApodwtgF1/dfyhTNolJQ9hL1qMuva9EHIbmn1L4hRYbneG6h4g0hR+0wJrdu8Ne/y92BCnaiZ9H0F4XAAfoiyQocxCcaHPWH6aD361JGqg7kh24Mc= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:MW4PR12MB6873.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(10070799003)(376014)(1800799024)(366016)(23010399003)(10067099003)(56012099006)(11063799006)(3023799007)(18002099003);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 2 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?SW5sNjQycktQSjhsbGtNYU5UdUxoT0FQU2ZMNTFNa3BjTnlrTXU4WGVIOFgw?= =?utf-8?B?eEFtY3VWMDdLQ3V3QVd2MWNXVWtzeXJPQWNLR0o5WHNVayt4WDZyaTlGc2Zp?= =?utf-8?B?emZmckNjczQrLzZaWTQrUkNrVjNpczdKdjhXbTZqZmo0VUl3WG1veWNSNjN0?= =?utf-8?B?dC9KeThnRVpvc0JSS2c1Y01scEs1SHRHaHpFUG1FcG9xbCtETFAxL3FOcVJw?= =?utf-8?B?TytDT2lkNDZkS0lIU2Z6MzdyWks4bmZVdExlQUZDUWw2dWVid1NXTXRFanNV?= =?utf-8?B?M2hsWHpkOFFwbWNFM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Z2NGVTg3djFlZW9WLzJqblYzVTFXOGYxcVM2NXNFaTg1NnVkWTk1S1E3U1Bz?= =?utf-8?B?TUdCWjZ1Z2NONU1sejBQdDE2a0YzN0xHWjRaZ1VlaGVsWVppZ1BjNGFnNW5U?= =?utf-8?B?TDkrUnVmSVNSMklnUEZsZ3JrZzN2bnpZLzgvMFVlYUo5TCtmTnZqYmJPQU41?= =?utf-8?B?VlYyN01yVElIdXYvcW5ESVViMXJFVFc2cjBpeU1qWmtocWtTQ2YyWlpaSm12?= =?utf-8?Q?cFte6oO47K2qB3Z7W2nvDHIJqoOIUCPf6yz55+zzkJpqc?= X-MS-Exchange-AntiSpam-MessageData-1: A5LyenEDPQNX6Q== X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-Network-Message-Id: bbd164aa-af55-480b-efed-08df0283424b X-MS-Exchange-CrossTenant-AuthSource: MW4PR12MB6873.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Aug 2026 08:31:28.7484 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: l7TbpR2gQrN+CZzk2QVWrQca7+2PGue8bEwPyJkETeeq1/Ogrbvug4+USZSCspeqBnEBLpA+xNKaYjT8j6FAyQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS7PR12MB6021 The GSP-FMC firmware code lived in `firmware/fsp.rs` and described itself as running on the FSP. This is incorrect: GSP-FMC is loaded by the FSP, but runs on the GSP as the loader and verifier of GSP-RM. FSP secure-boots on its own before the driver even starts. Correct the naming and files used to contain the GSP-FMC code, by: - Renaming `firmware/fsp.rs` to `firmware/gsp_fmc.rs` (as GSP-FMC is not the FSP firmware), - Changing the prefix of some declarations in that file to `FMC` or `GspFmc` (interestingly some were already correct), - Fixing a mismatch (FMC means "First Mutable Code") in `fsp.rst`. Signed-off-by: Alexandre Courbot Reviewed-by: Danilo Krummrich Reviewed-by: Eliot Courtney --- Documentation/gpu/nova/core/fsp.rst | 2 +- drivers/gpu/nova-core/firmware.rs | 2 +- .../gpu/nova-core/firmware/{fsp.rs =3D> gsp_fmc.rs} | 55 ++++++++++++----= ------ drivers/gpu/nova-core/fsp.rs | 29 +++++++----- 4 files changed, 48 insertions(+), 40 deletions(-) diff --git a/Documentation/gpu/nova/core/fsp.rst b/Documentation/gpu/nova/c= ore/fsp.rst index 52d618d22bb8..cc2e3bbb9b53 100644 --- a/Documentation/gpu/nova/core/fsp.rst +++ b/Documentation/gpu/nova/core/fsp.rst @@ -42,7 +42,7 @@ On **Hopper/Blackwell** GPUs, FSP replaces this multi-sta= ge process with a single message-driven interface:: =20 FSP (hardware root of trust, boots from ROM) - -> FMC (Falcon Microcontroller, verified by FSP) + -> FMC (First Mutable Code, verified by FSP) -> GSP-RM (verified and loaded by FMC) =20 The driver only needs to: diff --git a/drivers/gpu/nova-core/firmware.rs b/drivers/gpu/nova-core/firm= ware.rs index b49613a90bf0..c16fee6e2b2a 100644 --- a/drivers/gpu/nova-core/firmware.rs +++ b/drivers/gpu/nova-core/firmware.rs @@ -23,9 +23,9 @@ }; =20 pub(crate) mod booter; -pub(crate) mod fsp; pub(crate) mod fwsec; pub(crate) mod gsp; +pub(crate) mod gsp_fmc; pub(crate) mod riscv; pub(crate) mod tlv; =20 diff --git a/drivers/gpu/nova-core/firmware/fsp.rs b/drivers/gpu/nova-core/= firmware/gsp_fmc.rs similarity index 71% rename from drivers/gpu/nova-core/firmware/fsp.rs rename to drivers/gpu/nova-core/firmware/gsp_fmc.rs index 5462e318410a..fbb0af133f24 100644 --- a/drivers/gpu/nova-core/firmware/fsp.rs +++ b/drivers/gpu/nova-core/firmware/gsp_fmc.rs @@ -1,7 +1,8 @@ // SPDX-License-Identifier: GPL-2.0 // SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIA= TES. All rights reserved. =20 -//! FSP is a hardware unit that runs FMC firmware. +//! GSP-FMC (First Mutable Code) is loaded by FSP into GSP to serve as the= loader and verifier of +//! GSP-RM. =20 use kernel::{ device, @@ -17,16 +18,16 @@ gpu::Chipset, // }; =20 -/// Size of the FSP SHA-384 hash, in bytes. -const FSP_HASH_SIZE: usize =3D 48; -/// Maximum size of the FSP public key (RSA-3072), in bytes. +/// Size of the GSP-FMC SHA-384 hash, in bytes. +const FMC_HASH_SIZE: usize =3D 48; +/// Maximum size of the GSP-FMC public key (RSA-3072), in bytes. /// -/// The FMC `PKEY` tag may be shorter, so the remaining bytes are zero-pad= ded. -const FSP_PKEY_SIZE: usize =3D 384; -/// Maximum size of the FSP signature (RSA-3072), in bytes. +/// The `PKEY` tag may be shorter, so the remaining bytes are zero-padded. +const FMC_PKEY_SIZE: usize =3D 384; +/// Maximum size of the GSP-FMC signature (RSA-3072), in bytes. /// -/// The FMC `SIGN` tag may be shorter, so the remaining bytes are zero-pad= ded. -const FSP_SIG_SIZE: usize =3D 384; +/// The `SIGN` tag may be shorter, so the remaining bytes are zero-padded. +const FMC_SIG_SIZE: usize =3D 384; =20 /// Structure to hold FMC signatures. /// @@ -34,23 +35,27 @@ #[derive(Debug, Clone, Copy, Zeroable)] #[repr(C)] pub(crate) struct FmcSignatures { - pub(crate) hash384: [u8; FSP_HASH_SIZE], - pub(crate) public_key: [u8; FSP_PKEY_SIZE], - pub(crate) signature: [u8; FSP_SIG_SIZE], + pub(crate) hash384: [u8; FMC_HASH_SIZE], + pub(crate) public_key: [u8; FMC_PKEY_SIZE], + pub(crate) signature: [u8; FMC_SIG_SIZE], } =20 -pub(crate) struct FspFirmware { +pub(crate) struct GspFmcFirmware { /// FMC firmware image data pub(crate) fmc_image: Coherent<[u8]>, /// FMC firmware signatures. pub(crate) fmc_sigs: KBox, } =20 -impl FspFirmware { +impl GspFmcFirmware { pub(crate) fn new(dev: &device::Device, chipset: Chipse= t) -> Result { let fw =3D request_tlv(dev, chipset, "fmc")?; let tlv =3D Tlv::new(fw.data())?; - dev_dbg!(dev, "loaded fsp firmware v{}\n", tlv.get_string(b"VERS")= ?); + dev_dbg!( + dev, + "loaded GSP-FMC firmware v{}\n", + tlv.get_string(b"VERS")? + ); =20 let fmc_image_data =3D tlv.get_bytes(b"BLOB")?; let fmc_image =3D Coherent::from_slice(dev, fmc_image_data, GFP_KE= RNEL)?; @@ -70,34 +75,34 @@ fn extract_fmc_signatures(tlv: &Tlv<'_>, dev: &device::= Device) -> Result FSP_PKEY_SIZE { + if pkey_section.len() > FMC_PKEY_SIZE { dev_err!( dev, "FMC public key section size {} > maximum {}\n", pkey_section.len(), - FSP_PKEY_SIZE + FMC_PKEY_SIZE ); return Err(EINVAL); } - if sig_section.len() > FSP_SIG_SIZE { + if sig_section.len() > FMC_SIG_SIZE { dev_err!( dev, "FMC signature section size {} > maximum {}\n", sig_section.len(), - FSP_SIG_SIZE + FMC_SIG_SIZE ); return Err(EINVAL); } @@ -106,11 +111,11 @@ fn extract_fmc_signatures(tlv: &Tlv<'_>, dev: &device= ::Device) -> Result().chain(|sigs| { - // PANIC: src and dst lengths are both FSP_HASH_SIZE (veri= fied above). + // PANIC: src and dst lengths are both `FMC_HASH_SIZE` (ve= rified above). sigs.hash384.copy_from_slice(hash_section); - // PANIC: dst is sliced to src.len(); src.len() <=3D FSP_P= KEY_SIZE (verified above). + // PANIC: dst is sliced to src.len(); src.len() <=3D `FMC_= PKEY_SIZE` (verified above). sigs.public_key[..pkey_section.len()].copy_from_slice(pkey= _section); - // PANIC: dst is sliced to src.len(); src.len() <=3D FSP_S= IG_SIZE (verified above). + // PANIC: dst is sliced to src.len(); src.len() <=3D `FMC_= SIG_SIZE` (verified above). sigs.signature[..sig_section.len()].copy_from_slice(sig_se= ction); Ok(()) }), diff --git a/drivers/gpu/nova-core/fsp.rs b/drivers/gpu/nova-core/fsp.rs index ab685fb4168f..d2be19b8bff9 100644 --- a/drivers/gpu/nova-core/fsp.rs +++ b/drivers/gpu/nova-core/fsp.rs @@ -3,9 +3,12 @@ =20 //! FSP (Foundation Security Processor) interface for Hopper/Blackwell GPU= s. //! -//! Hopper/Blackwell use a simplified firmware boot sequence: FMC, then FS= P, then GSP. +//! Hopper/Blackwell use a simplified firmware boot sequence: FSP secure-b= oots independently before +//! the driver starts. The driver then sends FSP a Chain-of-Trust request = containing the GSP-FMC +//! image. FSP authenticates the image and launches GSP-FMC on the GSP RIS= C-V core; GSP-FMC +//! subsequently authenticates and boots GSP-RM. +//! //! Unlike Turing/Ampere/Ada, there is no SEC2 (Security Engine 2) usage. -//! FSP handles secure boot directly using FMC firmware and Chain of Trust. =20 use kernel::{ device, @@ -32,9 +35,9 @@ Falcon, // }, fb::FbSizes, - firmware::fsp::{ + firmware::gsp_fmc::{ FmcSignatures, - FspFirmware, // + GspFmcFirmware, // }, gpu::Chipset, gsp::{ @@ -267,7 +270,7 @@ fn frts_vidmem_offset(hal: &dyn hal::FspHal, fb_info: &= FbSizes) -> Result { /// Returns an in-place initializer for [`FspCotMessage`]. fn new<'a>( fb_info: &FbSizes, - fsp_fw: &'a FspFirmware, + fmc_fw: &'a GspFmcFirmware, args: &'a FmcBootArgs<'_>, ) -> Result + 'a> { let hal =3D hal::fsp_hal(args.chipset).ok_or(ENOTSUPP)?; @@ -296,13 +299,13 @@ fn new<'a>( .chain(move |msg| { msg.cot.version =3D version; msg.cot.size =3D size; - msg.cot.gsp_fmc_sysmem_offset =3D fsp_fw.fmc_image.dma_address= (); + msg.cot.gsp_fmc_sysmem_offset =3D fmc_fw.fmc_image.dma_address= (); msg.cot.frts_vidmem_offset =3D frts_vidmem_offset; msg.cot.frts_vidmem_size =3D frts_size; // frts_sysmem_* are left at zero because this path places FRT= S in vidmem. The sysmem // fields point to an FRTS buffer in sysmem instead, for syste= ms without VRAM. msg.cot.gsp_boot_args_sysmem_offset =3D args.fmc_boot_params.d= ma_address(); - msg.cot.sigs =3D *fsp_fw.fmc_sigs; + msg.cot.sigs =3D *fmc_fw.fmc_sigs; =20 Ok(()) })) @@ -381,12 +384,12 @@ pub(crate) fn boot_params(&self) -> &Coherent { =20 /// FSP interface for Hopper/Blackwell GPUs. /// -/// An `Fsp` is produced by [`Fsp::wait_secure_boot`], which only returns = once FSP secure boot -/// has completed. It owns the FSP falcon and the FMC firmware, which are = used for the subsequent +/// An `Fsp` is produced by [`Fsp::wait_secure_boot`], which only returns = once FSP secure boot has +/// completed. It owns the FSP falcon and the GSP-FMC firmware, which are = used for the subsequent /// Chain of Trust boot. pub(crate) struct Fsp<'a> { falcon: Falcon<'a, FspEngine>, - fsp_fw: FspFirmware, + fmc_fw: GspFmcFirmware, } =20 impl<'a> Fsp<'a> { @@ -422,7 +425,7 @@ fn wait_secure_boot( const FSP_SECURE_BOOT_TIMEOUT_MS: i64 =3D 5000; =20 let falcon =3D Falcon::::new(dev, chipset, bar)?; - let fsp_fw =3D FspFirmware::new(dev, chipset)?; + let fmc_fw =3D GspFmcFirmware::new(dev, chipset)?; =20 read_poll_timeout( || Ok(hal.fsp_boot_status(bar)), @@ -434,7 +437,7 @@ fn wait_secure_boot( dev_err!(dev, "FSP secure boot completion error: {:?}\n", e); })?; =20 - Ok(Fsp { falcon, fsp_fw }) + Ok(Fsp { falcon, fmc_fw }) } =20 /// Sends a message to FSP and waits for the response. @@ -540,7 +543,7 @@ pub(crate) fn boot_fmc( ) -> Result { dev_dbg!(dev, "Starting FSP boot sequence for {}\n", args.chipset); =20 - let msg =3D KBox::init(FspCotMessage::new(fb_info, &self.fsp_fw, a= rgs)?, GFP_KERNEL)?; + let msg =3D KBox::init(FspCotMessage::new(fb_info, &self.fmc_fw, a= rgs)?, GFP_KERNEL)?; =20 let _response_buf =3D self.send_sync_fsp(dev, &*msg)?; =20 --- base-commit: 66498c75b4f8017f62d720d9b59675bdf3abce91 change-id: 20260723-gsp-fmc-rename-da0a5019f441 Best regards, -- =20 Alexandre Courbot