Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/amdgpu/psp: udpate ta_ras interface header

ras ta interface header need to be updated to match with latest ta fw updates

Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com>
Reviewed-by: James Zhu <James.Zhu@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

authored by

Hawking Zhang and committed by
Alex Deucher
5a6bfe09 561564be

+59 -49
+59 -49
drivers/gpu/drm/amd/amdgpu/ta_ras_if.h
··· 1 - /****************************************************************************\ 2 - * 3 - * File Name ta_ras_if.h 4 - * Project AMD PSP SW IP Module 5 - * 6 - * Description Interface to the RAS Trusted Application 7 - * 8 - * Copyright 2019 Advanced Micro Devices, Inc. 9 - * 10 - * Permission is hereby granted, free of charge, to any person obtaining a copy of this software 11 - * and associated documentation files (the "Software"), to deal in the Software without restriction, 12 - * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, 13 - * and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, 14 - * subject to the following conditions: 15 - * 16 - * The above copyright notice and this permission notice shall be included in all copies or substantial 17 - * portions of the Software. 18 - * 19 - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 20 - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 21 - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 22 - * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR 23 - * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 24 - * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 25 - * OTHER DEALINGS IN THE SOFTWARE. 26 - */ 1 + /* 2 + * Copyright 2019 Advanced Micro Devices, Inc. 3 + * 4 + * Permission is hereby granted, free of charge, to any person obtaining a 5 + * copy of this software and associated documentation files (the "Software"), 6 + * to deal in the Software without restriction, including without limitation 7 + * the rights to use, copy, modify, merge, publish, distribute, sublicense, 8 + * and/or sell copies of the Software, and to permit persons to whom the 9 + * Software is furnished to do so, subject to the following conditions: 10 + * 11 + * The above copyright notice and this permission notice shall be included in 12 + * all copies or substantial portions of the Software. 13 + * 14 + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 17 + * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR 18 + * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 19 + * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 20 + * OTHER DEALINGS IN THE SOFTWARE. 21 + * 22 + */ 23 + 27 24 #ifndef _TA_RAS_IF_H 28 25 #define _TA_RAS_IF_H 29 26 ··· 28 31 #define RSP_ID_MASK (1U << 31) 29 32 #define RSP_ID(cmdId) (((uint32_t)(cmdId)) | RSP_ID_MASK) 30 33 31 - #define TA_NUM_BLOCK_MAX 14 32 - 34 + /* RAS related enumerations */ 35 + /**********************************************************/ 33 36 enum ras_command { 34 37 TA_RAS_COMMAND__ENABLE_FEATURES = 0, 35 38 TA_RAS_COMMAND__DISABLE_FEATURES, ··· 42 45 TA_RAS_STATUS__ERROR_INVALID_PARAMETER = 0x02, 43 46 TA_RAS_STATUS__ERROR_RAS_NOT_AVAILABLE = 0x03, 44 47 TA_RAS_STATUS__ERROR_RAS_DUPLICATE_CMD = 0x04, 45 - TA_RAS_STATUS__ERROR_INJECTION_FAILED = 0x05 48 + TA_RAS_STATUS__ERROR_INJECTION_FAILED = 0x05, 49 + TA_RAS_STATUS__ERROR_ASD_READ_WRITE = 0x06, 50 + TA_RAS_STATUS__ERROR_TOGGLE_DF_CSTATE = 0x07, 51 + TA_RAS_STATUS__ERROR_TIMEOUT = 0x08, 52 + TA_RAS_STATUS__ERROR_BLOCK_DISABLED = 0x09, 53 + TA_RAS_STATUS__ERROR_GENERIC = 0x10, 46 54 }; 47 55 48 56 enum ta_ras_block { ··· 64 62 TA_RAS_BLOCK__SEM, 65 63 TA_RAS_BLOCK__MP0, 66 64 TA_RAS_BLOCK__MP1, 67 - TA_RAS_BLOCK__FUSE = (TA_NUM_BLOCK_MAX - 1), 65 + TA_RAS_BLOCK__FUSE, 66 + TA_NUM_BLOCK_MAX 68 67 }; 69 68 70 69 enum ta_ras_error_type { 71 - TA_RAS_ERROR__NONE = 0, 72 - TA_RAS_ERROR__PARITY = 1, 73 - TA_RAS_ERROR__SINGLE_CORRECTABLE = 2, 74 - TA_RAS_ERROR__MULTI_UNCORRECTABLE = 4, 75 - TA_RAS_ERROR__POISON = 8 70 + TA_RAS_ERROR__NONE = 0, 71 + TA_RAS_ERROR__PARITY = 1, 72 + TA_RAS_ERROR__SINGLE_CORRECTABLE = 2, 73 + TA_RAS_ERROR__MULTI_UNCORRECTABLE = 4, 74 + TA_RAS_ERROR__POISON = 8, 76 75 }; 77 76 77 + /* Input/output structures for RAS commands */ 78 + /**********************************************************/ 79 + 78 80 struct ta_ras_enable_features_input { 79 - enum ta_ras_block block_id; 80 - enum ta_ras_error_type error_type; 81 + enum ta_ras_block block_id; 82 + enum ta_ras_error_type error_type; 81 83 }; 82 84 83 85 struct ta_ras_disable_features_input { 84 - enum ta_ras_block block_id; 85 - enum ta_ras_error_type error_type; 86 + enum ta_ras_block block_id; 87 + enum ta_ras_error_type error_type; 86 88 }; 87 89 88 90 struct ta_ras_trigger_error_input { 89 - enum ta_ras_block block_id; 90 - enum ta_ras_error_type inject_error_type; 91 - uint32_t sub_block_index; 92 - uint64_t address; 93 - uint64_t value; 91 + enum ta_ras_block block_id; // ras-block. i.e. umc, gfx 92 + enum ta_ras_error_type inject_error_type; // type of error. i.e. single_correctable 93 + uint32_t sub_block_index; // mem block. i.e. hbm, sram etc. 94 + uint64_t address; // explicit address of error 95 + uint64_t value; // method if error injection. i.e persistent, coherent etc. 94 96 }; 95 97 98 + /* Common input structure for RAS callbacks */ 99 + /**********************************************************/ 96 100 union ta_ras_cmd_input { 97 101 struct ta_ras_enable_features_input enable_features; 98 102 struct ta_ras_disable_features_input disable_features; 99 103 struct ta_ras_trigger_error_input trigger_error; 100 104 }; 101 105 106 + /* Shared Memory structures */ 107 + /**********************************************************/ 102 108 struct ta_ras_shared_memory { 103 - uint32_t cmd_id; 104 - uint32_t resp_id; 105 - enum ta_ras_status ras_status; 106 - uint32_t reserved; 107 - union ta_ras_cmd_input ras_in_message; 109 + uint32_t cmd_id; 110 + uint32_t resp_id; 111 + enum ta_ras_status ras_status; 112 + uint32_t reserved; 113 + union ta_ras_cmd_input ras_in_message; 108 114 }; 109 115 110 116 #endif // TL_RAS_IF_H_