Path: blob/21.2-virgl/src/gallium/drivers/radeon/pspdecryptionparam.h
4570 views
/**************************************************************************1*2* Copyright 2020 Advanced Micro Devices, Inc.3* All Rights Reserved.4*5* Permission is hereby granted, free of charge, to any person obtaining a6* copy of this software and associated documentation files (the7* "Software"), to deal in the Software without restriction, including8* without limitation the rights to use, copy, modify, merge, publish,9* distribute, sub license, and/or sell copies of the Software, and to10* permit persons to whom the Software is furnished to do so, subject to11* the following conditions:12*13* The above copyright notice and this permission notice (including the14* next paragraph) shall be included in all copies or substantial portions15* of the Software.16*17* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS18* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF19* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.20* IN NO EVENT SHALL THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR21* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,22* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE23* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.24*25**************************************************************************/26#ifndef _PSP_DECRYPTION_PARAM_H_27#define _PSP_DECRYPTION_PARAM_H_2829typedef struct _DECRYPT_PARAMETERS_30{31uint32_t frame_size; // Size of encrypted frame32uint8_t encrypted_iv[16]; // IV of the encrypted frame (clear)33uint8_t encrypted_key[16]; // key to decrypt encrypted frame (encrypted with session key)34uint8_t session_iv[16]; // IV to be used to decrypt encrypted_key3536union37{38struct39{40uint32_t drm_id : 4; //DRM session ID41uint32_t ctr : 1;42uint32_t cbc : 1;43uint32_t reserved : 26;44} s;45uint32_t value;46} u;47} DECRYPT_PARAMETERS;4849#endif //_PSP_DECRYPTION_PARAM_H_505152