Home | History | Annotate | Line # | Download | only in subdev
      1 /*	$NetBSD: fault.h,v 1.2 2021/12/18 23:45:33 riastradh Exp $	*/
      2 
      3 #ifndef __NVKM_FAULT_H__
      4 #define __NVKM_FAULT_H__
      5 #include <core/subdev.h>
      6 #include <core/notify.h>
      7 
      8 struct nvkm_fault {
      9 	const struct nvkm_fault_func *func;
     10 	struct nvkm_subdev subdev;
     11 
     12 	struct nvkm_fault_buffer *buffer[2];
     13 	int buffer_nr;
     14 
     15 	struct nvkm_event event;
     16 
     17 	struct nvkm_notify nrpfb;
     18 
     19 	struct nvkm_device_oclass user;
     20 };
     21 
     22 struct nvkm_fault_data {
     23 	u64  addr;
     24 	u64  inst;
     25 	u64  time;
     26 	u8 engine;
     27 	u8  valid;
     28 	u8    gpc;
     29 	u8    hub;
     30 	u8 access;
     31 	u8 client;
     32 	u8 reason;
     33 };
     34 
     35 int gp100_fault_new(struct nvkm_device *, int, struct nvkm_fault **);
     36 int gp10b_fault_new(struct nvkm_device *, int, struct nvkm_fault **);
     37 int gv100_fault_new(struct nvkm_device *, int, struct nvkm_fault **);
     38 int tu102_fault_new(struct nvkm_device *, int, struct nvkm_fault **);
     39 #endif
     40