From 17dd85a1cc1d3c97e3db3d92ccfb9db50602e410 Mon Sep 17 00:00:00 2001 From: Potharaju Ravi Teja Date: Thu, 24 Oct 2019 12:55:13 +0530 Subject: inject-vm-err: T19x MC error handler - Add support to handle Memory Controller errors on on t19x. - This change adds a sample handler for MC errors. 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: Ib86b925125650b4812fdbee5310455ae95ccd83c (cherry picked from commit 6c8395d11872f79ab5819a9900cb40b8f946852e) Signed-off-by: Potharaju Ravi Teja Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2279875 Tested-by: mobile promotions Reviewed-by: mobile promotions --- include/linux/errinfo.h | 19 +++++++++++++++++++ include/linux/vm_err.h | 1 + 2 files changed, 20 insertions(+) (limited to 'include/linux') diff --git a/include/linux/errinfo.h b/include/linux/errinfo.h index e75c2b308..074208918 100644 --- a/include/linux/errinfo.h +++ b/include/linux/errinfo.h @@ -18,6 +18,7 @@ enum err_reason { REASON_ASYNC_SMMU_GLOBAL, REASON_ASYNC_BRIDGE, REASON_ASYNC_MC, + REASON_ASYNC_MC_T19X, REASON_ASYNC_CBB, REASON_SYNC_INSTR_ABORT, REASON_SYNC_DATA_ABORT, @@ -105,6 +106,23 @@ struct __attribute__((__packed__)) async_mc_err_t { int32_t peripheral_id; }; +struct __attribute__((__packed__)) async_mc_err_t19x_t { + bool vpr_violation; + unsigned int vpr_base[2]; + unsigned int vpr_size; + unsigned int vpr_ctrl; + unsigned int vpr_override[4]; + bool no_status; + bool two_status; + int client_swgid; + char client_name[NAME_SIZE]; + char fault_msg[NAME_SIZE]; + unsigned int status; + uint64_t address; + unsigned int secure; + unsigned int write; +}; + struct __attribute__((__packed__)) sync_data_abort_t { bool is_filled; /* metadata field per vcpu */ bool is_write; @@ -127,6 +145,7 @@ struct __attribute__((__packed__)) err_data_t { struct async_smmu_err_t async_smmu_err; struct async_mc_err_t async_mc_err; struct async_cbb_err_t async_cbb_err; + struct async_mc_err_t19x_t async_mc_err_t19x; /* Synchronous */ struct sync_data_abort_t sync_data_abort; }; diff --git a/include/linux/vm_err.h b/include/linux/vm_err.h index 31e3fca79..bcb3f255e 100644 --- a/include/linux/vm_err.h +++ b/include/linux/vm_err.h @@ -38,6 +38,7 @@ static const char * const tegra_hv_err_reason_desc[] = { "SMMU Global", "Bridge", "Memory Controller", + "Memory Controller T19X", "Central Back Bone", "Instruction Abort", "Data Abort", -- cgit v1.2.2