1 /* SPDX-License-Identifier: MIT */
2 #ifndef __NVKM_INSTMEM_H__
3 #define __NVKM_INSTMEM_H__
4 #include <core/subdev.h>
8 const struct nvkm_instmem_func *func;
9 struct nvkm_subdev subdev;
14 struct list_head list;
15 struct list_head boot;
18 /* <=nv4x: protects NV_PRAMIN/BAR2 MM
19 * >=nv50: protects BAR2 MM & LRU
23 struct nvkm_memory *vbios;
24 struct nvkm_ramht *ramht;
25 struct nvkm_memory *ramro;
26 struct nvkm_memory *ramfc;
34 u32 nvkm_instmem_rd32(struct nvkm_instmem *, u32 addr);
35 void nvkm_instmem_wr32(struct nvkm_instmem *, u32 addr, u32 data);
36 int nvkm_instobj_new(struct nvkm_instmem *, u32 size, u32 align, bool zero, bool preserve,
37 struct nvkm_memory **);
38 int nvkm_instobj_wrap(struct nvkm_device *, struct nvkm_memory *, struct nvkm_memory **);
40 int nv04_instmem_new(struct nvkm_device *, enum nvkm_subdev_type, int, struct nvkm_instmem **);
41 int nv40_instmem_new(struct nvkm_device *, enum nvkm_subdev_type, int, struct nvkm_instmem **);
42 int nv50_instmem_new(struct nvkm_device *, enum nvkm_subdev_type, int, struct nvkm_instmem **);
43 int gk20a_instmem_new(struct nvkm_device *, enum nvkm_subdev_type, int, struct nvkm_instmem **);