summaryrefslogtreecommitdiffstats
path: root/kernel/gsp_sema_service.h
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/gsp_sema_service.h')
-rw-r--r--kernel/gsp_sema_service.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/kernel/gsp_sema_service.h b/kernel/gsp_sema_service.h
index 16a045f..a6893bd 100644
--- a/kernel/gsp_sema_service.h
+++ b/kernel/gsp_sema_service.h
@@ -22,19 +22,42 @@
struct sema_channel_desc {
u32 h_object;
u32 engine_type;
+ u32 cid; /* RM channel id (the doorbell token vector) */
u64 gpfifo_va;
u32 gpfifo_entries;
u64 userd_pa; /* NvA06FControl: GPGet @0x88, GPPut @0x8c */
u32 userd_as; /* NV_ADDR_SYSMEM(1) / NV_ADDR_FBMEM(2) */
u64 instance_pa;
u64 notifier_pa;
+ u32 notifier_as; /* NV_ADDR_SYSMEM(1) / NV_ADDR_FBMEM(2) */
};
void gsp_sema_service_channel_add(const struct sema_channel_desc *desc);
void gsp_sema_service_channel_del(u32 h_object);
+/*
+ * A GPU VA space whose top-level page directory the driver has published (the
+ * driver builds its own page tables for the address spaces it owns, then hands
+ * the directory's physical address to the GPU through SET_PAGE_DIRECTORY).
+ *
+ * pdb is the directory base in the aperture selected by b_vidmem (false =
+ * guest RAM, true = emulated vidmem); num_entries is the root entry count and
+ * fixes the number of VA bits the root covers.
+ */
+struct sema_vaspace_desc {
+ u32 h_vaspace;
+ u64 pdb;
+ u32 num_entries;
+ bool b_vidmem;
+};
+
+void gsp_sema_service_vaspace_add(const struct sema_vaspace_desc *desc);
+void gsp_sema_service_vaspace_del(u32 h_vaspace);
+
int gsp_sema_service_start(void);
void gsp_sema_service_stop(void);
int gsp_sema_service_probe(u64 gpu_va, u32 count);
+int gsp_sema_service_add_map(u64 gpu_va, u64 pa, u64 len);
+void gsp_sema_service_doorbell(u32 token);
#endif /* _GSP_SEMA_SERVICE_H_ */