6
6
enum nvkm_falcon_mem {
7
7
IMEM ,
8
8
DMEM ,
9
+ EMEM ,
9
10
};
10
11
11
12
static inline const char *
@@ -14,6 +15,7 @@ nvkm_falcon_mem(enum nvkm_falcon_mem mem)
14
15
switch (mem ) {
15
16
case IMEM : return "imem" ;
16
17
case DMEM : return "dmem" ;
18
+ case EMEM : return "emem" ;
17
19
default :
18
20
WARN_ON (1 );
19
21
return "?mem" ;
@@ -25,6 +27,8 @@ struct nvkm_falcon_func_pio {
25
27
int max ;
26
28
void (* wr_init )(struct nvkm_falcon * , u8 port , bool sec , u32 mem_base );
27
29
void (* wr )(struct nvkm_falcon * , u8 port , const u8 * img , int len , u16 tag );
30
+ void (* rd_init )(struct nvkm_falcon * , u8 port , u32 mem_base );
31
+ void (* rd )(struct nvkm_falcon * , u8 port , const u8 * img , int len );
28
32
};
29
33
30
34
int nvkm_falcon_ctor (const struct nvkm_falcon_func * , struct nvkm_subdev * owner ,
@@ -33,27 +37,25 @@ void nvkm_falcon_dtor(struct nvkm_falcon *);
33
37
int nvkm_falcon_reset (struct nvkm_falcon * );
34
38
int nvkm_falcon_pio_wr (struct nvkm_falcon * , const u8 * img , u32 img_base , u8 port ,
35
39
enum nvkm_falcon_mem mem_type , u32 mem_base , int len , u16 tag , bool sec );
40
+ int nvkm_falcon_pio_rd (struct nvkm_falcon * , u8 port , enum nvkm_falcon_mem type , u32 mem_base ,
41
+ const u8 * img , u32 img_base , int len );
36
42
37
43
int gm200_flcn_reset_wait_mem_scrubbing (struct nvkm_falcon * );
38
44
int gm200_flcn_disable (struct nvkm_falcon * );
39
45
int gm200_flcn_enable (struct nvkm_falcon * );
46
+ void gm200_flcn_bind_inst (struct nvkm_falcon * , int , u64 );
47
+ int gm200_flcn_bind_stat (struct nvkm_falcon * , bool );
40
48
extern const struct nvkm_falcon_func_pio gm200_flcn_imem_pio ;
41
49
extern const struct nvkm_falcon_func_pio gm200_flcn_dmem_pio ;
42
50
43
51
int gp102_flcn_reset_eng (struct nvkm_falcon * );
52
+ extern const struct nvkm_falcon_func_pio gp102_flcn_emem_pio ;
44
53
45
54
void nvkm_falcon_v1_load_imem (struct nvkm_falcon * ,
46
55
void * , u32 , u32 , u16 , u8 , bool );
47
56
void nvkm_falcon_v1_load_dmem (struct nvkm_falcon * , void * , u32 , u32 , u8 );
48
- void nvkm_falcon_v1_read_dmem (struct nvkm_falcon * , u32 , u32 , u8 , void * );
49
- void nvkm_falcon_v1_bind_context (struct nvkm_falcon * , struct nvkm_memory * );
50
- int nvkm_falcon_v1_wait_for_halt (struct nvkm_falcon * , u32 );
51
- int nvkm_falcon_v1_clear_interrupt (struct nvkm_falcon * , u32 );
52
- void nvkm_falcon_v1_set_start_addr (struct nvkm_falcon * , u32 start_addr );
53
57
void nvkm_falcon_v1_start (struct nvkm_falcon * );
54
58
55
- void gp102_sec2_flcn_bind_context (struct nvkm_falcon * , struct nvkm_memory * );
56
-
57
59
#define FLCN_PRINTK (f ,l ,p ,fmt ,a ...) ({ \
58
60
if ((f)->owner->name != (f)->name) \
59
61
nvkm_printk___((f)->owner, (f)->user, NV_DBG_##l, p, "%s:"fmt, (f)->name, ##a); \
@@ -70,7 +72,9 @@ struct nvkm_falcon_fw {
70
72
const struct nvkm_falcon_fw_func {
71
73
int (* signature )(struct nvkm_falcon_fw * , u32 * sig_base_src );
72
74
int (* reset )(struct nvkm_falcon_fw * );
75
+ int (* setup )(struct nvkm_falcon_fw * );
73
76
int (* load )(struct nvkm_falcon_fw * );
77
+ int (* load_bld )(struct nvkm_falcon_fw * );
74
78
int (* boot )(struct nvkm_falcon_fw * ,
75
79
u32 * mbox0 , u32 * mbox1 , u32 mbox0_ok , u32 irqsclr );
76
80
} * func ;
@@ -96,11 +100,14 @@ struct nvkm_falcon_fw {
96
100
u32 dmem_size ;
97
101
u32 dmem_sign ;
98
102
103
+ u8 * boot ;
104
+ u32 boot_size ;
99
105
u32 boot_addr ;
100
106
101
107
struct nvkm_falcon * falcon ;
102
108
struct nvkm_memory * inst ;
103
109
struct nvkm_vmm * vmm ;
110
+ struct nvkm_vma * vma ;
104
111
};
105
112
106
113
int nvkm_falcon_fw_ctor (const struct nvkm_falcon_fw_func * , const char * name , struct nvkm_device * ,
0 commit comments