xref: /linux/drivers/gpu/nova-core/gsp/hal/gh100.rs (revision 82eaa14e7efcbb3933083b4c27fd5496fbb1a4be)
1 // SPDX-License-Identifier: GPL-2.0
2 // SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
3 
4 use kernel::prelude::*;
5 
6 use kernel::{
7     device,
8     dma::Coherent, //
9 };
10 
11 use crate::{
12     driver::Bar0,
13     falcon::{
14         gsp::Gsp as GspEngine,
15         sec2::Sec2,
16         Falcon, //
17     },
18     fb::FbLayout,
19     firmware::{
20         fsp::FspFirmware,
21         FIRMWARE_VERSION, //
22     },
23     fsp::Fsp,
24     gpu::Chipset,
25     gsp::{
26         boot::BootUnloadGuard,
27         hal::GspHal,
28         Gsp,
29         GspFwWprMeta, //
30     },
31 };
32 
33 struct Gh100;
34 
35 impl GspHal for Gh100 {
36     /// Boot GSP via FSP Chain of Trust (Hopper/Blackwell+ path).
37     ///
38     /// This path uses FSP to establish a chain of trust and boot GSP-FMC. FSP handles
39     /// the GSP boot internally - no manual GSP reset/boot is needed.
40     fn boot<'a>(
41         &self,
42         _gsp: &'a Gsp,
43         dev: &'a device::Device<device::Bound>,
44         bar: &'a Bar0,
45         chipset: Chipset,
46         _fb_layout: &FbLayout,
47         _wpr_meta: &Coherent<GspFwWprMeta>,
48         _gsp_falcon: &'a Falcon<GspEngine>,
49         _sec2_falcon: &'a Falcon<Sec2>,
50     ) -> Result<BootUnloadGuard<'a>> {
51         let fsp_fw = FspFirmware::new(dev, chipset, FIRMWARE_VERSION)?;
52         let _fsp = Fsp::wait_secure_boot(dev, bar, chipset, fsp_fw)?;
53 
54         Err(ENOTSUPP)
55     }
56 }
57 
58 const GH100: Gh100 = Gh100;
59 pub(super) const GH100_HAL: &dyn GspHal = &GH100;
60