1
2#ifndef __NVKM_INSTMEM_H__
3#define __NVKM_INSTMEM_H__
4#include <core/subdev.h>
5struct nvkm_memory;
6
7struct nvkm_instmem {
8 const struct nvkm_instmem_func *func;
9 struct nvkm_subdev subdev;
10
11 spinlock_t lock;
12 struct list_head list;
13 struct list_head boot;
14 u32 reserved;
15
16
17
18
19 struct mutex mutex;
20
21 struct nvkm_memory *vbios;
22 struct nvkm_ramht *ramht;
23 struct nvkm_memory *ramro;
24 struct nvkm_memory *ramfc;
25};
26
27u32 nvkm_instmem_rd32(struct nvkm_instmem *, u32 addr);
28void nvkm_instmem_wr32(struct nvkm_instmem *, u32 addr, u32 data);
29int nvkm_instobj_new(struct nvkm_instmem *, u32 size, u32 align, bool zero,
30 struct nvkm_memory **);
31
32
33int nv04_instmem_new(struct nvkm_device *, enum nvkm_subdev_type, int, struct nvkm_instmem **);
34int nv40_instmem_new(struct nvkm_device *, enum nvkm_subdev_type, int, struct nvkm_instmem **);
35int nv50_instmem_new(struct nvkm_device *, enum nvkm_subdev_type, int, struct nvkm_instmem **);
36int gk20a_instmem_new(struct nvkm_device *, enum nvkm_subdev_type, int, struct nvkm_instmem **);
37#endif
38