Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: MIT */
0002 #ifndef __NVKM_INSTMEM_H__
0003 #define __NVKM_INSTMEM_H__
0004 #include <core/subdev.h>
0005 struct nvkm_memory;
0006 
0007 struct nvkm_instmem {
0008     const struct nvkm_instmem_func *func;
0009     struct nvkm_subdev subdev;
0010 
0011     spinlock_t lock;
0012     struct list_head list;
0013     struct list_head boot;
0014     u32 reserved;
0015 
0016     /* <=nv4x: protects NV_PRAMIN/BAR2 MM
0017      * >=nv50: protects BAR2 MM & LRU
0018      */
0019     struct mutex mutex;
0020 
0021     struct nvkm_memory *vbios;
0022     struct nvkm_ramht  *ramht;
0023     struct nvkm_memory *ramro;
0024     struct nvkm_memory *ramfc;
0025 };
0026 
0027 u32 nvkm_instmem_rd32(struct nvkm_instmem *, u32 addr);
0028 void nvkm_instmem_wr32(struct nvkm_instmem *, u32 addr, u32 data);
0029 int nvkm_instobj_new(struct nvkm_instmem *, u32 size, u32 align, bool zero,
0030              struct nvkm_memory **);
0031 
0032 
0033 int nv04_instmem_new(struct nvkm_device *, enum nvkm_subdev_type, int, struct nvkm_instmem **);
0034 int nv40_instmem_new(struct nvkm_device *, enum nvkm_subdev_type, int, struct nvkm_instmem **);
0035 int nv50_instmem_new(struct nvkm_device *, enum nvkm_subdev_type, int, struct nvkm_instmem **);
0036 int gk20a_instmem_new(struct nvkm_device *, enum nvkm_subdev_type, int, struct nvkm_instmem **);
0037 #endif