1 /* $NetBSD: hdcp_psp.h,v 1.2 2021/12/18 23:45:07 riastradh Exp $ */ 2 3 /* 4 * Copyright 2019 Advanced Micro Devices, Inc. 5 * 6 * Permission is hereby granted, free of charge, to any person obtaining a 7 * copy of this software and associated documentation files (the "Software"), 8 * to deal in the Software without restriction, including without limitation 9 * the rights to use, copy, modify, merge, publish, distribute, sublicense, 10 * and/or sell copies of the Software, and to permit persons to whom the 11 * Software is furnished to do so, subject to the following conditions: 12 * 13 * The above copyright notice and this permission notice shall be included in 14 * all copies or substantial portions of the Software. 15 * 16 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 19 * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR 20 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 21 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 22 * OTHER DEALINGS IN THE SOFTWARE. 23 * 24 * Authors: AMD 25 * 26 */ 27 28 #ifndef MODULES_HDCP_HDCP_PSP_H_ 29 #define MODULES_HDCP_HDCP_PSP_H_ 30 31 /* 32 * NOTE: These parameters are a one-to-one copy of the 33 * parameters required by PSP 34 */ 35 enum bgd_security_hdcp_encryption_level { 36 HDCP_ENCRYPTION_LEVEL__INVALID = 0, 37 HDCP_ENCRYPTION_LEVEL__OFF, 38 HDCP_ENCRYPTION_LEVEL__ON 39 }; 40 41 enum bgd_security_hdcp2_content_type { 42 HDCP2_CONTENT_TYPE__INVALID = 0, 43 HDCP2_CONTENT_TYPE__TYPE0, 44 HDCP2_CONTENT_TYPE__TYPE1 45 }; 46 enum ta_dtm_command { 47 TA_DTM_COMMAND__UNUSED_1 = 1, 48 TA_DTM_COMMAND__TOPOLOGY_UPDATE_V2, 49 TA_DTM_COMMAND__TOPOLOGY_ASSR_ENABLE 50 }; 51 52 /* DTM related enumerations */ 53 /**********************************************************/ 54 55 enum ta_dtm_status { 56 TA_DTM_STATUS__SUCCESS = 0x00, 57 TA_DTM_STATUS__GENERIC_FAILURE = 0x01, 58 TA_DTM_STATUS__INVALID_PARAMETER = 0x02, 59 TA_DTM_STATUS__NULL_POINTER = 0x3 60 }; 61 62 /* input/output structures for DTM commands */ 63 /**********************************************************/ 64 /** 65 * Input structures 66 */ 67 enum ta_dtm_hdcp_version_max_supported { 68 TA_DTM_HDCP_VERSION_MAX_SUPPORTED__NONE = 0, 69 TA_DTM_HDCP_VERSION_MAX_SUPPORTED__1_x = 10, 70 TA_DTM_HDCP_VERSION_MAX_SUPPORTED__2_0 = 20, 71 TA_DTM_HDCP_VERSION_MAX_SUPPORTED__2_1 = 21, 72 TA_DTM_HDCP_VERSION_MAX_SUPPORTED__2_2 = 22, 73 TA_DTM_HDCP_VERSION_MAX_SUPPORTED__2_3 = 23 74 }; 75 76 struct ta_dtm_topology_update_input_v2 { 77 /* display handle is unique across the driver and is used to identify a display */ 78 /* for all security interfaces which reference displays such as HDCP */ 79 uint32_t display_handle; 80 uint32_t is_active; 81 uint32_t is_miracast; 82 uint32_t controller; 83 uint32_t ddc_line; 84 uint32_t dig_be; 85 uint32_t dig_fe; 86 uint32_t dp_mst_vcid; 87 uint32_t is_assr; 88 uint32_t max_hdcp_supported_version; 89 }; 90 91 struct ta_dtm_topology_assr_enable { 92 uint32_t display_topology_dig_be_index; 93 }; 94 95 /** 96 * Output structures 97 */ 98 99 /* No output structures yet */ 100 101 union ta_dtm_cmd_input { 102 struct ta_dtm_topology_update_input_v2 topology_update_v2; 103 struct ta_dtm_topology_assr_enable topology_assr_enable; 104 }; 105 106 union ta_dtm_cmd_output { 107 uint32_t reserved; 108 }; 109 110 struct ta_dtm_shared_memory { 111 uint32_t cmd_id; 112 uint32_t resp_id; 113 enum ta_dtm_status dtm_status; 114 uint32_t reserved; 115 union ta_dtm_cmd_input dtm_in_message; 116 union ta_dtm_cmd_output dtm_out_message; 117 }; 118 119 int psp_cmd_submit_buf(struct psp_context *psp, struct amdgpu_firmware_info *ucode, struct psp_gfx_cmd_resp *cmd, 120 uint64_t fence_mc_addr); 121 122 enum ta_hdcp_command { 123 TA_HDCP_COMMAND__INITIALIZE, 124 TA_HDCP_COMMAND__HDCP1_CREATE_SESSION, 125 TA_HDCP_COMMAND__HDCP1_DESTROY_SESSION, 126 TA_HDCP_COMMAND__HDCP1_FIRST_PART_AUTHENTICATION, 127 TA_HDCP_COMMAND__HDCP1_SECOND_PART_AUTHENTICATION, 128 TA_HDCP_COMMAND__HDCP1_ENABLE_ENCRYPTION, 129 TA_HDCP_COMMAND__HDCP1_ENABLE_DP_STREAM_ENCRYPTION, 130 TA_HDCP_COMMAND__HDCP1_GET_ENCRYPTION_STATUS, 131 TA_HDCP_COMMAND__UNUSED_1, 132 TA_HDCP_COMMAND__HDCP2_DESTROY_SESSION, 133 TA_HDCP_COMMAND__UNUSED_2, 134 TA_HDCP_COMMAND__HDCP2_SET_ENCRYPTION, 135 TA_HDCP_COMMAND__HDCP2_GET_ENCRYPTION_STATUS, 136 TA_HDCP_COMMAND__UNUSED_3, 137 TA_HDCP_COMMAND__HDCP2_CREATE_SESSION_V2, 138 TA_HDCP_COMMAND__HDCP2_PREPARE_PROCESS_AUTHENTICATION_MSG_V2, 139 TA_HDCP_COMMAND__HDCP2_ENABLE_DP_STREAM_ENCRYPTION 140 }; 141 142 enum ta_hdcp2_msg_id { 143 TA_HDCP_HDCP2_MSG_ID__NULL_MESSAGE = 1, 144 TA_HDCP_HDCP2_MSG_ID__AKE_INIT = 2, 145 TA_HDCP_HDCP2_MSG_ID__AKE_SEND_CERT = 3, 146 TA_HDCP_HDCP2_MSG_ID__AKE_NO_STORED_KM = 4, 147 TA_HDCP_HDCP2_MSG_ID__AKE_STORED_KM = 5, 148 TA_HDCP_HDCP2_MSG_ID__AKE_SEND_RRX = 6, 149 TA_HDCP_HDCP2_MSG_ID__AKE_SEND_H_PRIME = 7, 150 TA_HDCP_HDCP2_MSG_ID__AKE_SEND_PAIRING_INFO = 8, 151 TA_HDCP_HDCP2_MSG_ID__LC_INIT = 9, 152 TA_HDCP_HDCP2_MSG_ID__LC_SEND_L_PRIME = 10, 153 TA_HDCP_HDCP2_MSG_ID__SKE_SEND_EKS = 11, 154 TA_HDCP_HDCP2_MSG_ID__REPEATERAUTH_SEND_RECEIVERID_LIST = 12, 155 TA_HDCP_HDCP2_MSG_ID__RTT_READY = 13, 156 TA_HDCP_HDCP2_MSG_ID__RTT_CHALLENGE = 14, 157 TA_HDCP_HDCP2_MSG_ID__REPEATERAUTH_SEND_ACK = 15, 158 TA_HDCP_HDCP2_MSG_ID__REPEATERAUTH_STREAM_MANAGE = 16, 159 TA_HDCP_HDCP2_MSG_ID__REPEATERAUTH_STREAM_READY = 17, 160 TA_HDCP_HDCP2_MSG_ID__RECEIVER_AUTH_STATUS = 18, 161 TA_HDCP_HDCP2_MSG_ID__AKE_TRANSMITTER_INFO = 19, 162 TA_HDCP_HDCP2_MSG_ID__AKE_RECEIVER_INFO = 20, 163 TA_HDCP_HDCP2_MSG_ID__SIGNAL_CONTENT_STREAM_TYPE_DP = 129 164 }; 165 166 enum ta_hdcp2_hdcp2_msg_id_max_size { 167 TA_HDCP_HDCP2_MSG_ID_MAX_SIZE__NULL_MESSAGE = 0, 168 TA_HDCP_HDCP2_MSG_ID_MAX_SIZE__AKE_INIT = 12, 169 TA_HDCP_HDCP2_MSG_ID_MAX_SIZE__AKE_SEND_CERT = 534, 170 TA_HDCP_HDCP2_MSG_ID_MAX_SIZE__AKE_NO_STORED_KM = 129, 171 TA_HDCP_HDCP2_MSG_ID_MAX_SIZE__AKE_STORED_KM = 33, 172 TA_HDCP_HDCP2_MSG_ID_MAX_SIZE__AKE_SEND_RRX = 9, 173 TA_HDCP_HDCP2_MSG_ID_MAX_SIZE__AKE_SEND_H_PRIME = 33, 174 TA_HDCP_HDCP2_MSG_ID_MAX_SIZE__AKE_SEND_PAIRING_INFO = 17, 175 TA_HDCP_HDCP2_MSG_ID_MAX_SIZE__LC_INIT = 9, 176 TA_HDCP_HDCP2_MSG_ID_MAX_SIZE__LC_SEND_L_PRIME = 33, 177 TA_HDCP_HDCP2_MSG_ID_MAX_SIZE__SKE_SEND_EKS = 25, 178 TA_HDCP_HDCP2_MSG_ID_MAX_SIZE__REPEATERAUTH_SEND_RECEIVERID_LIST = 181, 179 TA_HDCP_HDCP2_MSG_ID_MAX_SIZE__RTT_READY = 1, 180 TA_HDCP_HDCP2_MSG_ID_MAX_SIZE__RTT_CHALLENGE = 17, 181 TA_HDCP_HDCP2_MSG_ID_MAX_SIZE__REPEATERAUTH_SEND_RACK = 17, 182 TA_HDCP_HDCP2_MSG_ID_MAX_SIZE__REPEATERAUTH_STREAM_MANAGE = 13, 183 TA_HDCP_HDCP2_MSG_ID_MAX_SIZE__REPEATERAUTH_STREAM_READY = 33, 184 TA_HDCP_HDCP2_MSG_ID_MAX_SIZE__RECEIVER_AUTH_STATUS = 4, 185 TA_HDCP_HDCP2_MSG_ID_MAX_SIZE__AKE_TRANSMITTER_INFO = 6, 186 TA_HDCP_HDCP2_MSG_ID_MAX_SIZE__AKE_RECEIVER_INFO = 6, 187 TA_HDCP_HDCP2_MSG_ID_MAX_SIZE__SIGNAL_CONTENT_STREAM_TYPE_DP = 1 188 }; 189 190 /* HDCP related enumerations */ 191 /**********************************************************/ 192 #define TA_HDCP__INVALID_SESSION 0xFFFF 193 #define TA_HDCP__HDCP1_AN_SIZE 8 194 #define TA_HDCP__HDCP1_KSV_SIZE 5 195 #define TA_HDCP__HDCP1_KSV_LIST_MAX_ENTRIES 127 196 #define TA_HDCP__HDCP1_V_PRIME_SIZE 20 197 #define TA_HDCP__HDCP2_TX_BUF_MAX_SIZE \ 198 TA_HDCP_HDCP2_MSG_ID_MAX_SIZE__AKE_NO_STORED_KM + TA_HDCP_HDCP2_MSG_ID_MAX_SIZE__AKE_STORED_KM + 6 199 200 // 64 bits boundaries 201 #define TA_HDCP__HDCP2_RX_BUF_MAX_SIZE \ 202 TA_HDCP_HDCP2_MSG_ID_MAX_SIZE__AKE_SEND_CERT + TA_HDCP_HDCP2_MSG_ID_MAX_SIZE__AKE_RECEIVER_INFO + 4 203 204 enum ta_hdcp_status { 205 TA_HDCP_STATUS__SUCCESS = 0x00, 206 TA_HDCP_STATUS__GENERIC_FAILURE = 0x01, 207 TA_HDCP_STATUS__NULL_POINTER = 0x02, 208 TA_HDCP_STATUS__FAILED_ALLOCATING_SESSION = 0x03, 209 TA_HDCP_STATUS__FAILED_SETUP_TX = 0x04, 210 TA_HDCP_STATUS__INVALID_PARAMETER = 0x05, 211 TA_HDCP_STATUS__VHX_ERROR = 0x06, 212 TA_HDCP_STATUS__SESSION_NOT_CLOSED_PROPERLY = 0x07, 213 TA_HDCP_STATUS__SRM_FAILURE = 0x08, 214 TA_HDCP_STATUS__MST_AUTHENTICATED_ALREADY_STARTED = 0x09, 215 TA_HDCP_STATUS__AKE_SEND_CERT_FAILURE = 0x0A, 216 TA_HDCP_STATUS__AKE_NO_STORED_KM_FAILURE = 0x0B, 217 TA_HDCP_STATUS__AKE_SEND_HPRIME_FAILURE = 0x0C, 218 TA_HDCP_STATUS__LC_SEND_LPRIME_FAILURE = 0x0D, 219 TA_HDCP_STATUS__SKE_SEND_EKS_FAILURE = 0x0E, 220 TA_HDCP_STATUS__REPAUTH_SEND_RXIDLIST_FAILURE = 0x0F, 221 TA_HDCP_STATUS__REPAUTH_STREAM_READY_FAILURE = 0x10, 222 TA_HDCP_STATUS__ASD_GENERIC_FAILURE = 0x11, 223 TA_HDCP_STATUS__UNWRAP_SECRET_FAILURE = 0x12, 224 TA_HDCP_STATUS__ENABLE_ENCR_FAILURE = 0x13, 225 TA_HDCP_STATUS__DISABLE_ENCR_FAILURE = 0x14, 226 TA_HDCP_STATUS__NOT_ENOUGH_MEMORY_FAILURE = 0x15, 227 TA_HDCP_STATUS__UNKNOWN_MESSAGE = 0x16, 228 TA_HDCP_STATUS__TOO_MANY_STREAM = 0x17 229 }; 230 231 enum ta_hdcp_authentication_status { 232 TA_HDCP_AUTHENTICATION_STATUS__NOT_STARTED = 0x00, 233 TA_HDCP_AUTHENTICATION_STATUS__HDCP1_FIRST_PART_FAILED = 0x01, 234 TA_HDCP_AUTHENTICATION_STATUS__HDCP1_FIRST_PART_COMPLETE = 0x02, 235 TA_HDCP_AUTHENTICATION_STATUS__HDCP1_SECOND_PART_FAILED = 0x03, 236 TA_HDCP_AUTHENTICATION_STATUS__HDCP1_AUTHENTICATED = 0x04, 237 TA_HDCP_AUTHENTICATION_STATUS__HDCP22_AUTHENTICATION_PENDING = 0x06, 238 TA_HDCP_AUTHENTICATION_STATUS__HDCP22_AUTHENTICATION_FAILED = 0x07, 239 TA_HDCP_AUTHENTICATION_STATUS__HDCP22_AUTHENTICATED = 0x08, 240 TA_HDCP_AUTHENTICATION_STATUS__HDCP1_KSV_VALIDATION_FAILED = 0x09 241 }; 242 243 enum ta_hdcp2_msg_authentication_status { 244 TA_HDCP2_MSG_AUTHENTICATION_STATUS__SUCCESS = 0, 245 TA_HDCP2_MSG_AUTHENTICATION_STATUS__KM_NOT_AVAILABLE, 246 TA_HDCP2_MSG_AUTHENTICATION_STATUS__UNUSED, 247 TA_HDCP2_MSG_AUTHENTICATION_STATUS__INVALID = 100, // everything above does not fail the request 248 TA_HDCP2_MSG_AUTHENTICATION_STATUS__NOT_ENOUGH_MEMORY, 249 TA_HDCP2_MSG_AUTHENTICATION_STATUS__NOT_EXPECTED_MSG, 250 TA_HDCP2_MSG_AUTHENTICATION_STATUS__SIGNATURE_CERTIFICAT_ERROR, 251 TA_HDCP2_MSG_AUTHENTICATION_STATUS__INCORRECT_HDCP_VERSION, 252 TA_HDCP2_MSG_AUTHENTICATION_STATUS__UNKNOWN_MESSAGE, 253 TA_HDCP2_MSG_AUTHENTICATION_STATUS__INVALID_HMAC, 254 TA_HDCP2_MSG_AUTHENTICATION_STATUS__INVALID_TOPOLOGY, 255 TA_HDCP2_MSG_AUTHENTICATION_STATUS__INVALID_SEQ_NUM, 256 TA_HDCP2_MSG_AUTHENTICATION_STATUS__INVALID_SIZE, 257 TA_HDCP2_MSG_AUTHENTICATION_STATUS__INVALID_LENGTH, 258 TA_HDCP2_MSG_AUTHENTICATION_STATUS__REAUTH_REQUEST 259 }; 260 261 enum ta_hdcp_content_type { 262 TA_HDCP2_CONTENT_TYPE__TYPE0 = 1, 263 TA_HDCP2_CONTENT_TYPE__TYPE1, 264 }; 265 266 enum ta_hdcp_content_type_negotiation_type { 267 TA_HDCP2_CONTENT_TYPE_NEGOTIATION_TYPE__FORCE_TYPE0 = 1, 268 TA_HDCP2_CONTENT_TYPE_NEGOTIATION_TYPE__FORCE_TYPE1, 269 TA_HDCP2_CONTENT_TYPE_NEGOTIATION_TYPE__MAX_SUPPORTED 270 }; 271 272 enum ta_hdcp2_version { 273 TA_HDCP2_VERSION_UNKNOWN = 0, 274 TA_HDCP2_VERSION_2_0 = 20, 275 TA_HDCP2_VERSION_2_1 = 21, 276 TA_HDCP2_VERSION_2_2 = 22 277 }; 278 279 /* input/output structures for HDCP commands */ 280 /**********************************************************/ 281 struct ta_hdcp_cmd_hdcp1_create_session_input { 282 uint8_t display_handle; 283 }; 284 285 struct ta_hdcp_cmd_hdcp1_create_session_output { 286 uint32_t session_handle; 287 uint8_t an_primary[TA_HDCP__HDCP1_AN_SIZE]; 288 uint8_t aksv_primary[TA_HDCP__HDCP1_KSV_SIZE]; 289 uint8_t ainfo_primary; 290 uint8_t an_secondary[TA_HDCP__HDCP1_AN_SIZE]; 291 uint8_t aksv_secondary[TA_HDCP__HDCP1_KSV_SIZE]; 292 uint8_t ainfo_secondary; 293 }; 294 295 struct ta_hdcp_cmd_hdcp1_destroy_session_input { 296 uint32_t session_handle; 297 }; 298 299 struct ta_hdcp_cmd_hdcp1_first_part_authentication_input { 300 uint32_t session_handle; 301 uint8_t bksv_primary[TA_HDCP__HDCP1_KSV_SIZE]; 302 uint8_t bksv_secondary[TA_HDCP__HDCP1_KSV_SIZE]; 303 uint8_t bcaps; 304 uint16_t r0_prime_primary; 305 uint16_t r0_prime_secondary; 306 }; 307 308 struct ta_hdcp_cmd_hdcp1_first_part_authentication_output { 309 enum ta_hdcp_authentication_status authentication_status; 310 }; 311 312 struct ta_hdcp_cmd_hdcp1_second_part_authentication_input { 313 uint32_t session_handle; 314 uint16_t bstatus_binfo; 315 uint8_t ksv_list[TA_HDCP__HDCP1_KSV_LIST_MAX_ENTRIES][TA_HDCP__HDCP1_KSV_SIZE]; 316 uint32_t ksv_list_size; 317 uint8_t pj_prime; 318 uint8_t v_prime[TA_HDCP__HDCP1_V_PRIME_SIZE]; 319 }; 320 321 struct ta_hdcp_cmd_hdcp1_second_part_authentication_output { 322 enum ta_hdcp_authentication_status authentication_status; 323 }; 324 325 struct ta_hdcp_cmd_hdcp1_enable_encryption_input { 326 uint32_t session_handle; 327 }; 328 329 struct ta_hdcp_cmd_hdcp1_enable_dp_stream_encryption_input { 330 uint32_t session_handle; 331 uint32_t display_handle; 332 }; 333 334 struct ta_hdcp_cmd_hdcp1_get_encryption_status_input { 335 uint32_t session_handle; 336 }; 337 338 struct ta_hdcp_cmd_hdcp1_get_encryption_status_output { 339 uint32_t protection_level; 340 }; 341 342 struct ta_hdcp_cmd_hdcp2_create_session_input_v2 { 343 uint32_t display_handle; 344 enum ta_hdcp_content_type_negotiation_type negotiate_content_type; 345 }; 346 347 struct ta_hdcp_cmd_hdcp2_create_session_output_v2 { 348 uint32_t session_handle; 349 }; 350 351 struct ta_hdcp_cmd_hdcp2_destroy_session_input { 352 uint32_t session_handle; 353 }; 354 355 struct ta_hdcp_cmd_hdcp2_authentication_message_v2 { 356 enum ta_hdcp2_msg_id msg_id; 357 uint32_t msg_size; 358 }; 359 360 struct ta_hdcp_cmd_hdcp2_process_authentication_message_input_v2 { 361 struct ta_hdcp_cmd_hdcp2_authentication_message_v2 msg1_desc; 362 struct ta_hdcp_cmd_hdcp2_authentication_message_v2 msg2_desc; 363 struct ta_hdcp_cmd_hdcp2_authentication_message_v2 msg3_desc; 364 uint8_t receiver_message[TA_HDCP__HDCP2_RX_BUF_MAX_SIZE]; 365 }; 366 367 struct ta_hdcp_cmd_hdcp2_process_authentication_message_output_v2 { 368 uint32_t hdcp_version; 369 uint32_t is_km_stored; 370 uint32_t is_locality_precompute_support; 371 uint32_t is_repeater; 372 enum ta_hdcp2_msg_authentication_status msg1_status; 373 enum ta_hdcp2_msg_authentication_status msg2_status; 374 enum ta_hdcp2_msg_authentication_status msg3_status; 375 }; 376 377 struct ta_hdcp_cmd_hdcp2_prepare_authentication_message_input_v2 { 378 enum ta_hdcp2_msg_id msg1_id; 379 enum ta_hdcp2_msg_id msg2_id; 380 }; 381 382 struct ta_hdcp_cmd_hdcp2_prepare_authentication_message_output_v2 { 383 enum ta_hdcp2_msg_authentication_status msg1_status; 384 enum ta_hdcp2_msg_authentication_status msg2_status; 385 struct ta_hdcp_cmd_hdcp2_authentication_message_v2 msg1_desc; 386 struct ta_hdcp_cmd_hdcp2_authentication_message_v2 msg2_desc; 387 uint8_t transmitter_message[TA_HDCP__HDCP2_TX_BUF_MAX_SIZE]; 388 }; 389 390 struct ta_hdcp_cmd_hdcp2_process_prepare_authentication_message_input_v2 { 391 uint32_t session_handle; 392 struct ta_hdcp_cmd_hdcp2_process_authentication_message_input_v2 process; 393 struct ta_hdcp_cmd_hdcp2_prepare_authentication_message_input_v2 prepare; 394 }; 395 396 struct ta_hdcp_cmd_hdcp2_process_prepare_authentication_message_output_v2 { 397 uint32_t authentication_status; 398 struct ta_hdcp_cmd_hdcp2_process_authentication_message_output_v2 process; 399 struct ta_hdcp_cmd_hdcp2_prepare_authentication_message_output_v2 prepare; 400 }; 401 402 struct ta_hdcp_cmd_hdcp2_set_encryption_input { 403 uint32_t session_handle; 404 }; 405 406 struct ta_hdcp_cmd_hdcp2_get_encryption_status_input { 407 uint32_t session_handle; 408 }; 409 410 struct ta_hdcp_cmd_hdcp2_get_encryption_status_output { 411 enum ta_hdcp_content_type hdcp2_type; 412 uint32_t protection_level; 413 }; 414 415 struct ta_hdcp_cmd_hdcp2_enable_dp_stream_encryption_input { 416 uint32_t session_handle; 417 uint32_t display_handle; 418 }; 419 420 /**********************************************************/ 421 /* Common input structure for HDCP callbacks */ 422 union ta_hdcp_cmd_input { 423 struct ta_hdcp_cmd_hdcp1_create_session_input hdcp1_create_session; 424 struct ta_hdcp_cmd_hdcp1_destroy_session_input hdcp1_destroy_session; 425 struct ta_hdcp_cmd_hdcp1_first_part_authentication_input hdcp1_first_part_authentication; 426 struct ta_hdcp_cmd_hdcp1_second_part_authentication_input hdcp1_second_part_authentication; 427 struct ta_hdcp_cmd_hdcp1_enable_encryption_input hdcp1_enable_encryption; 428 struct ta_hdcp_cmd_hdcp1_enable_dp_stream_encryption_input hdcp1_enable_dp_stream_encryption; 429 struct ta_hdcp_cmd_hdcp1_get_encryption_status_input hdcp1_get_encryption_status; 430 struct ta_hdcp_cmd_hdcp2_destroy_session_input hdcp2_destroy_session; 431 struct ta_hdcp_cmd_hdcp2_set_encryption_input hdcp2_set_encryption; 432 struct ta_hdcp_cmd_hdcp2_get_encryption_status_input hdcp2_get_encryption_status; 433 struct ta_hdcp_cmd_hdcp2_create_session_input_v2 hdcp2_create_session_v2; 434 struct ta_hdcp_cmd_hdcp2_process_prepare_authentication_message_input_v2 435 hdcp2_prepare_process_authentication_message_v2; 436 struct ta_hdcp_cmd_hdcp2_enable_dp_stream_encryption_input hdcp2_enable_dp_stream_encryption; 437 }; 438 439 /* Common output structure for HDCP callbacks */ 440 union ta_hdcp_cmd_output { 441 struct ta_hdcp_cmd_hdcp1_create_session_output hdcp1_create_session; 442 struct ta_hdcp_cmd_hdcp1_first_part_authentication_output hdcp1_first_part_authentication; 443 struct ta_hdcp_cmd_hdcp1_second_part_authentication_output hdcp1_second_part_authentication; 444 struct ta_hdcp_cmd_hdcp1_get_encryption_status_output hdcp1_get_encryption_status; 445 struct ta_hdcp_cmd_hdcp2_get_encryption_status_output hdcp2_get_encryption_status; 446 struct ta_hdcp_cmd_hdcp2_create_session_output_v2 hdcp2_create_session_v2; 447 struct ta_hdcp_cmd_hdcp2_process_prepare_authentication_message_output_v2 448 hdcp2_prepare_process_authentication_message_v2; 449 }; 450 /**********************************************************/ 451 452 struct ta_hdcp_shared_memory { 453 uint32_t cmd_id; 454 enum ta_hdcp_status hdcp_status; 455 uint32_t reserved; 456 union ta_hdcp_cmd_input in_msg; 457 union ta_hdcp_cmd_output out_msg; 458 }; 459 460 enum psp_status { 461 PSP_STATUS__SUCCESS = 0, 462 PSP_STATUS__ERROR_INVALID_PARAMS, 463 PSP_STATUS__ERROR_GENERIC, 464 PSP_STATUS__ERROR_OUT_OF_MEMORY, 465 PSP_STATUS__ERROR_UNSUPPORTED_FEATURE 466 }; 467 468 #endif /* MODULES_HDCP_HDCP_PSP_H_ */ 469