This source file includes following definitions.
- nv50_mmu_kind
- nv50_mmu_new
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24 #include "mem.h"
25 #include "vmm.h"
26
27 #include <nvif/class.h>
28
29 const u8 *
30 nv50_mmu_kind(struct nvkm_mmu *base, int *count)
31 {
32
33
34
35
36
37
38
39
40 static const u8
41 kind[128] = {
42 0x01, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f,
43 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f,
44 0x01, 0x01, 0x01, 0x01, 0x7f, 0x7f, 0x7f, 0x7f,
45 0x02, 0x02, 0x02, 0x02, 0x7f, 0x7f, 0x7f, 0x7f,
46 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x7f,
47 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x7f,
48 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f,
49 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f,
50 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02,
51 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x7f, 0x7f,
52 0x7f, 0x7f, 0x7f, 0x7f, 0x01, 0x01, 0x01, 0x7f,
53 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f,
54 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x7f,
55 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02,
56 0x01, 0x7f, 0x02, 0x7f, 0x01, 0x7f, 0x02, 0x7f,
57 0x01, 0x01, 0x02, 0x02, 0x01, 0x01, 0x7f, 0x7f
58 };
59 *count = ARRAY_SIZE(kind);
60 return kind;
61 }
62
63 static const struct nvkm_mmu_func
64 nv50_mmu = {
65 .dma_bits = 40,
66 .mmu = {{ -1, -1, NVIF_CLASS_MMU_NV50}},
67 .mem = {{ -1, 0, NVIF_CLASS_MEM_NV50}, nv50_mem_new, nv50_mem_map },
68 .vmm = {{ -1, -1, NVIF_CLASS_VMM_NV50}, nv50_vmm_new, false, 0x1400 },
69 .kind = nv50_mmu_kind,
70 };
71
72 int
73 nv50_mmu_new(struct nvkm_device *device, int index, struct nvkm_mmu **pmmu)
74 {
75 return nvkm_mmu_new_(&nv50_mmu, device, index, pmmu);
76 }