diff options
| author | Arthur Hanson Rasmusson <arthur@vgpu.io> | 2026-10-01 01:06:14 -0400 |
|---|---|---|
| committer | Arthur Hanson Rasmusson <arthur@vgpu.io> | 2026-10-01 01:06:14 -0400 |
| commit | 9a038702b1fc6ab867ebd3d6652ac3c7d04d6fff (patch) | |
| tree | 8c950a14e7c8f0753569fc7d92bbb4f01e526b54 /kernel/gsp_phys_fwsec.h | |
| parent | bef0d867a0d666b98123d4e19edd3084ea95c3c0 (diff) | |
| download | open-iov-9a038702b1fc6ab867ebd3d6652ac3c7d04d6fff.tar.gz open-iov-9a038702b1fc6ab867ebd3d6652ac3c7d04d6fff.zip | |
gsp-phys: stage 3c FWSEC via VBIOS BIT image plus failure recovery
Diffstat (limited to 'kernel/gsp_phys_fwsec.h')
| -rw-r--r-- | kernel/gsp_phys_fwsec.h | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/kernel/gsp_phys_fwsec.h b/kernel/gsp_phys_fwsec.h new file mode 100644 index 0000000..8e9d71d --- /dev/null +++ b/kernel/gsp_phys_fwsec.h @@ -0,0 +1,36 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +#ifndef GSP_PHYS_FWSEC_H +#define GSP_PHYS_FWSEC_H + +#include <linux/types.h> +#include <linux/pci.h> +#include <linux/io.h> + +#include "gsp_phys_boot.h" + +/* + * Real-GSP boot stage 3c: the FWSEC secure-verification run that carves + * WPR2/FRTS on the claimed physical GPU, plus the teardown path that removes + * WPR2 again before the device is handed back to the distribution driver. + * + * The stage is disabled by default (gsp_phys_fwsec=N); claim must be enabled + * too (gsp_phys_gpu=1 + gsp_phys_hazard_ack=1) and the boot layout (stage 3b) + * must have succeeded. Every step logs its register reads; failures abort and + * the recovery path is attempted immediately. + */ + +bool gsp_phys_fwsec_enabled(void); + +int gsp_phys_fwsec_run(struct gsp_phys_boot *boot, struct pci_dev *pdev, + void __iomem *bar0); + +/* + * Prepare the device for hand-back. If a FWSEC run programmed WPR2, run the + * teardown (FWSEC-SB + booter unload) while the module still owns BAR0. + * Returns nonzero when WPR2 could not be torn down: the caller must then + * refuse to rebind the distribution driver and keep the power-domain locks. + */ +int gsp_phys_fwsec_release(struct gsp_phys_boot *boot, struct pci_dev *pdev, + void __iomem *bar0); + +#endif /* GSP_PHYS_FWSEC_H */ |
