This source file includes following definitions.
- flcn64_to_u64
- u64_to_flcn64
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23 #ifndef __NVKM_SECBOOT_PRIV_H__
24 #define __NVKM_SECBOOT_PRIV_H__
25
26 #include <subdev/secboot.h>
27 #include <subdev/mmu.h>
28 struct nvkm_gpuobj;
29
30 struct nvkm_secboot_func {
31 int (*oneinit)(struct nvkm_secboot *);
32 int (*fini)(struct nvkm_secboot *, bool suspend);
33 void *(*dtor)(struct nvkm_secboot *);
34 int (*run_blob)(struct nvkm_secboot *, struct nvkm_gpuobj *,
35 struct nvkm_falcon *);
36 };
37
38 int nvkm_secboot_ctor(const struct nvkm_secboot_func *, struct nvkm_acr *,
39 struct nvkm_device *, int, struct nvkm_secboot *);
40 int nvkm_secboot_falcon_reset(struct nvkm_secboot *);
41 int nvkm_secboot_falcon_run(struct nvkm_secboot *);
42
43 extern const struct nvkm_secboot_func gp102_secboot;
44
45 struct flcn_u64 {
46 u32 lo;
47 u32 hi;
48 };
49
50 static inline u64 flcn64_to_u64(const struct flcn_u64 f)
51 {
52 return ((u64)f.hi) << 32 | f.lo;
53 }
54
55 static inline struct flcn_u64 u64_to_flcn64(u64 u)
56 {
57 struct flcn_u64 ret;
58
59 ret.hi = upper_32_bits(u);
60 ret.lo = lower_32_bits(u);
61
62 return ret;
63 }
64
65 #endif