Home | History | Annotate | Line # | Download | only in nvfw
      1  1.1  riastrad /*	$NetBSD: sec2.h,v 1.2 2021/12/18 23:45:32 riastradh Exp $	*/
      2  1.1  riastrad 
      3  1.1  riastrad #ifndef __NVFW_SEC2_H__
      4  1.1  riastrad #define __NVFW_SEC2_H__
      5  1.1  riastrad 
      6  1.1  riastrad struct nv_sec2_args {
      7  1.1  riastrad 	u32 freq_hz;
      8  1.1  riastrad 	u32 falc_trace_size;
      9  1.1  riastrad 	u32 falc_trace_dma_base;
     10  1.1  riastrad 	u32 falc_trace_dma_idx;
     11  1.1  riastrad 	bool secure_mode;
     12  1.1  riastrad };
     13  1.1  riastrad 
     14  1.1  riastrad #define NV_SEC2_UNIT_INIT                                                  0x01
     15  1.1  riastrad #define NV_SEC2_UNIT_ACR                                                   0x08
     16  1.1  riastrad 
     17  1.1  riastrad struct nv_sec2_init_msg {
     18  1.1  riastrad 	struct nv_falcon_msg hdr;
     19  1.1  riastrad #define NV_SEC2_INIT_MSG_INIT                                              0x00
     20  1.1  riastrad 	u8 msg_type;
     21  1.1  riastrad 
     22  1.1  riastrad 	u8 num_queues;
     23  1.1  riastrad 	u16 os_debug_entry_point;
     24  1.1  riastrad 
     25  1.1  riastrad 	struct {
     26  1.1  riastrad 		u32 offset;
     27  1.1  riastrad 		u16 size;
     28  1.1  riastrad 		u8 index;
     29  1.1  riastrad #define NV_SEC2_INIT_MSG_QUEUE_ID_CMDQ                                     0x00
     30  1.1  riastrad #define NV_SEC2_INIT_MSG_QUEUE_ID_MSGQ                                     0x01
     31  1.1  riastrad 		u8 id;
     32  1.1  riastrad 	} queue_info[2];
     33  1.1  riastrad 
     34  1.1  riastrad 	u32 sw_managed_area_offset;
     35  1.1  riastrad 	u16 sw_managed_area_size;
     36  1.1  riastrad };
     37  1.1  riastrad 
     38  1.1  riastrad struct nv_sec2_acr_cmd {
     39  1.1  riastrad 	struct nv_falcon_cmd hdr;
     40  1.1  riastrad #define NV_SEC2_ACR_CMD_BOOTSTRAP_FALCON                                   0x00
     41  1.1  riastrad 	u8 cmd_type;
     42  1.1  riastrad };
     43  1.1  riastrad 
     44  1.1  riastrad struct nv_sec2_acr_msg {
     45  1.1  riastrad 	struct nv_falcon_cmd hdr;
     46  1.1  riastrad 	u8 msg_type;
     47  1.1  riastrad };
     48  1.1  riastrad 
     49  1.1  riastrad struct nv_sec2_acr_bootstrap_falcon_cmd {
     50  1.1  riastrad 	struct nv_sec2_acr_cmd cmd;
     51  1.1  riastrad #define NV_SEC2_ACR_BOOTSTRAP_FALCON_FLAGS_RESET_YES                 0x00000000
     52  1.1  riastrad #define NV_SEC2_ACR_BOOTSTRAP_FALCON_FLAGS_RESET_NO                  0x00000001
     53  1.1  riastrad 	u32 flags;
     54  1.1  riastrad 	u32 falcon_id;
     55  1.1  riastrad };
     56  1.1  riastrad 
     57  1.1  riastrad struct nv_sec2_acr_bootstrap_falcon_msg {
     58  1.1  riastrad 	struct nv_sec2_acr_msg msg;
     59  1.1  riastrad 	u32 error_code;
     60  1.1  riastrad 	u32 falcon_id;
     61  1.1  riastrad };
     62  1.1  riastrad #endif
     63