160107Sobrien#ifndef __NVFW_SEC2_H__ 28119Sasami#define __NVFW_SEC2_H__ 38119Sasami 48119Sasamistruct nv_sec2_args { 58119Sasami u32 freq_hz; 68119Sasami u32 falc_trace_size; 78119Sasami u32 falc_trace_dma_base; 88119Sasami u32 falc_trace_dma_idx; 932822Syokota bool secure_mode; 108119Sasami}; 118119Sasami 128119Sasami#define NV_SEC2_UNIT_INIT 0x01 1332822Syokota#define NV_SEC2_UNIT_UNLOAD 0x06 148119Sasami#define NV_SEC2_UNIT_ACR 0x08 158119Sasami 168119Sasamistruct nv_sec2_init_msg { 178119Sasami struct nvfw_falcon_msg hdr; 1832822Syokota#define NV_SEC2_INIT_MSG_INIT 0x00 1932822Syokota u8 msg_type; 208119Sasami 2138141Syokota u8 num_queues; 228119Sasami u16 os_debug_entry_point; 238119Sasami 248119Sasami struct { 258119Sasami u32 offset; 268119Sasami u16 size; 278119Sasami u8 index; 288119Sasami#define NV_SEC2_INIT_MSG_QUEUE_ID_CMDQ 0x00 298119Sasami#define NV_SEC2_INIT_MSG_QUEUE_ID_MSGQ 0x01 308119Sasami u8 id; 318119Sasami } queue_info[2]; 3232822Syokota 3332822Syokota u32 sw_managed_area_offset; 348119Sasami u16 sw_managed_area_size; 358119Sasami}; 368119Sasami 378119Sasamistruct nv_sec2_init_msg_v1 { 388119Sasami struct nvfw_falcon_msg hdr; 398119Sasami#define NV_SEC2_INIT_MSG_INIT 0x00 408119Sasami u8 msg_type; 418119Sasami 428119Sasami u8 num_queues; 438119Sasami u16 os_debug_entry_point; 448119Sasami 458119Sasami struct { 468119Sasami u32 offset; 478119Sasami u16 size; 488119Sasami u8 index; 4932822Syokota#define NV_SEC2_INIT_MSG_QUEUE_ID_CMDQ 0x00 508119Sasami#define NV_SEC2_INIT_MSG_QUEUE_ID_MSGQ 0x01 518119Sasami u8 id; 528119Sasami } queue_info[2]; 538119Sasami 548119Sasami u32 sw_managed_area_offset; 558119Sasami u16 sw_managed_area_size; 568119Sasami 578119Sasami u32 unkn[8]; 588119Sasami}; 598119Sasami 608119Sasamistruct nv_sec2_acr_cmd { 6143334Syokota struct nvfw_falcon_cmd hdr; 628119Sasami#define NV_SEC2_ACR_CMD_BOOTSTRAP_FALCON 0x00 6332822Syokota u8 cmd_type; 648119Sasami}; 658119Sasami 668119Sasamistruct nv_sec2_acr_msg { 678119Sasami struct nvfw_falcon_cmd hdr; 688119Sasami u8 msg_type; 698119Sasami}; 708119Sasami 718119Sasamistruct nv_sec2_acr_bootstrap_falcon_cmd { 728119Sasami struct nv_sec2_acr_cmd cmd; 738119Sasami#define NV_SEC2_ACR_BOOTSTRAP_FALCON_FLAGS_RESET_YES 0x00000000 748119Sasami#define NV_SEC2_ACR_BOOTSTRAP_FALCON_FLAGS_RESET_NO 0x00000001 758119Sasami u32 flags; 768119Sasami u32 falcon_id; 778119Sasami}; 788119Sasami 798119Sasamistruct nv_sec2_acr_bootstrap_falcon_msg { 808119Sasami struct nv_sec2_acr_msg msg; 818119Sasami u32 error_code; 8238141Syokota u32 falcon_id; 838119Sasami}; 848119Sasami 858119Sasami#define NV_SEC2_UNIT_V2_INIT 0x01 868119Sasami#define NV_SEC2_UNIT_V2_UNLOAD 0x05 878119Sasami#define NV_SEC2_UNIT_V2_ACR 0x07 888119Sasami 8938141Syokotastruct nv_sec2_acr_bootstrap_falcon_cmd_v1 { 908119Sasami struct nv_sec2_acr_cmd cmd; 918119Sasami#define NV_SEC2_ACR_BOOTSTRAP_FALCON_FLAGS_RESET_YES 0x00000000 928119Sasami#define NV_SEC2_ACR_BOOTSTRAP_FALCON_FLAGS_RESET_NO 0x00000001 938119Sasami u32 flags; 948119Sasami u32 falcon_id; 9518194Ssos u32 unkn08; 968119Sasami u32 unkn0c; 978119Sasami}; 9874119Sache 998119Sasamistruct nv_sec2_acr_bootstrap_falcon_msg_v1 { 1008119Sasami struct nv_sec2_acr_msg msg; 1018119Sasami u32 error_code; 1028119Sasami u32 falcon_id; 1038119Sasami u32 unkn08; 1048119Sasami}; 1058119Sasami#endif 1068119Sasami