1 // SPDX-License-Identifier: GPL-2.0 2 // SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. 3 4 use kernel::{ 5 io::Io, 6 sizes::SizeConstants, // 7 }; 8 9 use crate::{ 10 driver::Bar0, 11 fsp::hal::FspHal, 12 regs, // 13 }; 14 15 struct Gh100; 16 17 /// Reads the FSP secure boot status from the Hopper/GB10x thermal scratch register. 18 pub(super) fn fsp_boot_status_gh100(bar: Bar0<'_>) -> u32 { 19 bar.read(regs::gh100::NV_THERM_I2CS_SCRATCH_FSP_BOOT_COMPLETE) 20 .fsp_boot_complete() 21 .into() 22 } 23 24 impl FspHal for Gh100 { 25 fn fsp_boot_status(&self, bar: Bar0<'_>) -> u32 { 26 fsp_boot_status_gh100(bar) 27 } 28 29 fn cot_version(&self) -> u16 { 30 1 31 } 32 33 fn fb_end_reserved_size(&self) -> u64 { 34 u64::SZ_2M 35 } 36 } 37 38 const GH100: Gh100 = Gh100; 39 pub(super) const GH100_HAL: &dyn FspHal = &GH100; 40