From 7544f678853edea145beff4fb0971fe343ce854e Mon Sep 17 00:00:00 2001 From: Potharaju Ravi Teja Date: Thu, 24 Oct 2019 11:07:52 +0530 Subject: inject-vm-err: CBB error handler Add support to handle control back bone errors. - This change adds a sample handler for cbb error. It is a minimal handler that just dumps error information to the console. This can be used as a reference to implement an elaborate error handler. Bug 2580803 Change-Id: I2fbbc994854611a54276068ee90f1d2cffeeb948 (cherry picked from commit ea898756f7b2e4aff8f89546f3b69fc4e97fd300) Signed-off-by: Potharaju Ravi Teja Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2279874 GVS: Gerrit_Virtual_Submit Tested-by: mobile promotions Reviewed-by: Dmitry Pervushin Reviewed-by: Rohit Upadhyay Reviewed-by: mobile promotions --- include/linux/errinfo.h | 36 +++++++++++++++++++++++++++++++++++- include/linux/vm_err.h | 3 ++- 2 files changed, 37 insertions(+), 2 deletions(-) (limited to 'include/linux') diff --git a/include/linux/errinfo.h b/include/linux/errinfo.h index 641b17fa7..e75c2b308 100644 --- a/include/linux/errinfo.h +++ b/include/linux/errinfo.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved. + * Copyright (c) 2019-2020, NVIDIA CORPORATION. All rights reserved. * * NVIDIA CORPORATION and its licensors retain all intellectual property * and proprietary rights in and to this software, related documentation @@ -18,6 +18,7 @@ enum err_reason { REASON_ASYNC_SMMU_GLOBAL, REASON_ASYNC_BRIDGE, REASON_ASYNC_MC, + REASON_ASYNC_CBB, REASON_SYNC_INSTR_ABORT, REASON_SYNC_DATA_ABORT, REASON_SYNC_OTHER, @@ -53,6 +54,38 @@ struct __attribute__((__packed__)) async_bridge_err_t { unsigned int cache; }; +struct __attribute__((__packed__)) async_cbb_err_t { + char cbb_name[NAME_SIZE]; + unsigned int error_logger; + unsigned int errlog0; + char transaction_type[NAME_SIZE]; + char error_code[NAME_SIZE]; + char error_source[NAME_SIZE]; + char error_description[NAME_SIZE]; + bool header_format; + unsigned int packet_header_lock; + unsigned int packet_header_len1; + unsigned int errlog1; + unsigned int errlog2; + uint64_t route_id; + char initflow[NAME_SIZE]; + char targflow[NAME_SIZE]; + unsigned int targ_subrange; + unsigned int seqid; + unsigned int errlog3; + unsigned int errlog4; + uint64_t address; + unsigned int errlog5; + char master_id[NAME_SIZE]; + unsigned int non_mod; + unsigned int axi_id; + unsigned int security_group; + uint32_t cache; + uint32_t protection; + unsigned int falconsec; + unsigned int virtual_q_channel; +}; + struct __attribute__((__packed__)) async_smmu_err_t { unsigned int stream_id; unsigned int cb_id; @@ -93,6 +126,7 @@ struct __attribute__((__packed__)) err_data_t { struct async_bridge_err_t async_bridge_err; struct async_smmu_err_t async_smmu_err; struct async_mc_err_t async_mc_err; + struct async_cbb_err_t async_cbb_err; /* Synchronous */ struct sync_data_abort_t sync_data_abort; }; diff --git a/include/linux/vm_err.h b/include/linux/vm_err.h index a891265ce..31e3fca79 100644 --- a/include/linux/vm_err.h +++ b/include/linux/vm_err.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019 NVIDIA CORPORATION. All rights reserved. + * Copyright (c) 2019-2020 NVIDIA CORPORATION. All rights reserved. * * This software is licensed under the terms of the GNU General Public * License version 2, as published by the Free Software Foundation, and @@ -38,6 +38,7 @@ static const char * const tegra_hv_err_reason_desc[] = { "SMMU Global", "Bridge", "Memory Controller", + "Central Back Bone", "Instruction Abort", "Data Abort", "Other synchronous exception", -- cgit v1.2.2