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