18c2ecf20Sopenharmony_ci#ifndef __NVFW_SEC2_H__
28c2ecf20Sopenharmony_ci#define __NVFW_SEC2_H__
38c2ecf20Sopenharmony_ci
48c2ecf20Sopenharmony_cistruct nv_sec2_args {
58c2ecf20Sopenharmony_ci	u32 freq_hz;
68c2ecf20Sopenharmony_ci	u32 falc_trace_size;
78c2ecf20Sopenharmony_ci	u32 falc_trace_dma_base;
88c2ecf20Sopenharmony_ci	u32 falc_trace_dma_idx;
98c2ecf20Sopenharmony_ci	bool secure_mode;
108c2ecf20Sopenharmony_ci};
118c2ecf20Sopenharmony_ci
128c2ecf20Sopenharmony_ci#define NV_SEC2_UNIT_INIT                                                  0x01
138c2ecf20Sopenharmony_ci#define NV_SEC2_UNIT_ACR                                                   0x08
148c2ecf20Sopenharmony_ci
158c2ecf20Sopenharmony_cistruct nv_sec2_init_msg {
168c2ecf20Sopenharmony_ci	struct nvfw_falcon_msg hdr;
178c2ecf20Sopenharmony_ci#define NV_SEC2_INIT_MSG_INIT                                              0x00
188c2ecf20Sopenharmony_ci	u8 msg_type;
198c2ecf20Sopenharmony_ci
208c2ecf20Sopenharmony_ci	u8 num_queues;
218c2ecf20Sopenharmony_ci	u16 os_debug_entry_point;
228c2ecf20Sopenharmony_ci
238c2ecf20Sopenharmony_ci	struct {
248c2ecf20Sopenharmony_ci		u32 offset;
258c2ecf20Sopenharmony_ci		u16 size;
268c2ecf20Sopenharmony_ci		u8 index;
278c2ecf20Sopenharmony_ci#define NV_SEC2_INIT_MSG_QUEUE_ID_CMDQ                                     0x00
288c2ecf20Sopenharmony_ci#define NV_SEC2_INIT_MSG_QUEUE_ID_MSGQ                                     0x01
298c2ecf20Sopenharmony_ci		u8 id;
308c2ecf20Sopenharmony_ci	} queue_info[2];
318c2ecf20Sopenharmony_ci
328c2ecf20Sopenharmony_ci	u32 sw_managed_area_offset;
338c2ecf20Sopenharmony_ci	u16 sw_managed_area_size;
348c2ecf20Sopenharmony_ci};
358c2ecf20Sopenharmony_ci
368c2ecf20Sopenharmony_cistruct nv_sec2_acr_cmd {
378c2ecf20Sopenharmony_ci	struct nvfw_falcon_cmd hdr;
388c2ecf20Sopenharmony_ci#define NV_SEC2_ACR_CMD_BOOTSTRAP_FALCON                                   0x00
398c2ecf20Sopenharmony_ci	u8 cmd_type;
408c2ecf20Sopenharmony_ci};
418c2ecf20Sopenharmony_ci
428c2ecf20Sopenharmony_cistruct nv_sec2_acr_msg {
438c2ecf20Sopenharmony_ci	struct nvfw_falcon_cmd hdr;
448c2ecf20Sopenharmony_ci	u8 msg_type;
458c2ecf20Sopenharmony_ci};
468c2ecf20Sopenharmony_ci
478c2ecf20Sopenharmony_cistruct nv_sec2_acr_bootstrap_falcon_cmd {
488c2ecf20Sopenharmony_ci	struct nv_sec2_acr_cmd cmd;
498c2ecf20Sopenharmony_ci#define NV_SEC2_ACR_BOOTSTRAP_FALCON_FLAGS_RESET_YES                 0x00000000
508c2ecf20Sopenharmony_ci#define NV_SEC2_ACR_BOOTSTRAP_FALCON_FLAGS_RESET_NO                  0x00000001
518c2ecf20Sopenharmony_ci	u32 flags;
528c2ecf20Sopenharmony_ci	u32 falcon_id;
538c2ecf20Sopenharmony_ci};
548c2ecf20Sopenharmony_ci
558c2ecf20Sopenharmony_cistruct nv_sec2_acr_bootstrap_falcon_msg {
568c2ecf20Sopenharmony_ci	struct nv_sec2_acr_msg msg;
578c2ecf20Sopenharmony_ci	u32 error_code;
588c2ecf20Sopenharmony_ci	u32 falcon_id;
598c2ecf20Sopenharmony_ci};
608c2ecf20Sopenharmony_ci#endif
61