1/* SPDX-License-Identifier: MIT */ 2#ifndef __NVKM_GSP_PRIV_H__ 3#define __NVKM_GSP_PRIV_H__ 4#include <subdev/gsp.h> 5enum nvkm_acr_lsf_id; 6 7int nvkm_gsp_fwsec_frts(struct nvkm_gsp *); 8int nvkm_gsp_fwsec_sb(struct nvkm_gsp *); 9 10struct nvkm_gsp_fwif { 11 int version; 12 int (*load)(struct nvkm_gsp *, int ver, const struct nvkm_gsp_fwif *); 13 const struct nvkm_gsp_func *func; 14 const char *ver; 15 bool enable; 16}; 17 18int gv100_gsp_nofw(struct nvkm_gsp *, int, const struct nvkm_gsp_fwif *); 19int r535_gsp_load(struct nvkm_gsp *, int, const struct nvkm_gsp_fwif *); 20 21struct nvkm_gsp_func { 22 const struct nvkm_falcon_func *flcn; 23 const struct nvkm_falcon_fw_func *fwsec; 24 25 char *sig_section; 26 27 struct { 28 u32 os_carveout_size; 29 u32 base_size; 30 u64 min_size; 31 } wpr_heap; 32 33 struct { 34 int (*ctor)(struct nvkm_gsp *, const char *name, const struct firmware *, 35 struct nvkm_falcon *, struct nvkm_falcon_fw *); 36 } booter; 37 38 void (*dtor)(struct nvkm_gsp *); 39 int (*oneinit)(struct nvkm_gsp *); 40 int (*init)(struct nvkm_gsp *); 41 int (*fini)(struct nvkm_gsp *, bool suspend); 42 int (*reset)(struct nvkm_gsp *); 43 44 const struct nvkm_gsp_rm *rm; 45}; 46 47extern const struct nvkm_falcon_func tu102_gsp_flcn; 48extern const struct nvkm_falcon_fw_func tu102_gsp_fwsec; 49int tu102_gsp_booter_ctor(struct nvkm_gsp *, const char *, const struct firmware *, 50 struct nvkm_falcon *, struct nvkm_falcon_fw *); 51int tu102_gsp_oneinit(struct nvkm_gsp *); 52int tu102_gsp_reset(struct nvkm_gsp *); 53 54extern const struct nvkm_falcon_func ga102_gsp_flcn; 55extern const struct nvkm_falcon_fw_func ga102_gsp_fwsec; 56int ga102_gsp_booter_ctor(struct nvkm_gsp *, const char *, const struct firmware *, 57 struct nvkm_falcon *, struct nvkm_falcon_fw *); 58int ga102_gsp_reset(struct nvkm_gsp *); 59 60void r535_gsp_dtor(struct nvkm_gsp *); 61int r535_gsp_oneinit(struct nvkm_gsp *); 62int r535_gsp_init(struct nvkm_gsp *); 63int r535_gsp_fini(struct nvkm_gsp *, bool suspend); 64extern const struct nvkm_gsp_rm r535_gsp_rm; 65 66int nvkm_gsp_new_(const struct nvkm_gsp_fwif *, struct nvkm_device *, enum nvkm_subdev_type, int, 67 struct nvkm_gsp **); 68 69extern const struct nvkm_gsp_func gv100_gsp; 70#endif 71