diff options
| author | Rohit Khanna <rokhanna@nvidia.com> | 2017-02-21 18:41:45 -0500 |
|---|---|---|
| committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2017-11-07 21:01:09 -0500 |
| commit | 6431ad3e99f4bcb0ff3b130049306cb16ff9fab8 (patch) | |
| tree | a2723810d66130234da30863ba95e055577ab9f0 /include/linux/platform | |
| parent | 09153e17a136ca2842b637b8b49629241144ef5d (diff) | |
tegra: add RAS support for Carmel
Add a driver to handle Carmel RAS errors per core, per core cluster
and per CCPLEX.
Carmel supports two kinds of errors :
Correctable and Uncorrectable
Correctable errors are handled using Fault Handling Interrupt (FHI)
and Uncorrectable errors using SERROR.
For FHI, the driver registers and defines callbacks that interface
with arm64_ras driver.
For SError, driver registers callbacks and defines callbacks that
interface with arm64_traps driver.
Driver also provides support for triggering RAS errors for SW testing
via debugfs nodes.
Bug 1814444
Bug 200319716
Change-Id: Id543bf62d8d00317cc1aaea9fd8c65dd03c29822
Signed-off-by: Rohit Khanna <rokhanna@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1309006
GVS: Gerrit_Virtual_Submit
Reviewed-by: Alexander Van Brunt <avanbrunt@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'include/linux/platform')
| -rw-r--r-- | include/linux/platform/tegra/carmel_ras.h | 159 |
1 files changed, 159 insertions, 0 deletions
diff --git a/include/linux/platform/tegra/carmel_ras.h b/include/linux/platform/tegra/carmel_ras.h new file mode 100644 index 000000000..66176252e --- /dev/null +++ b/include/linux/platform/tegra/carmel_ras.h | |||
| @@ -0,0 +1,159 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (c) 2017, NVIDIA CORPORATION. All rights reserved. | ||
| 3 | * | ||
| 4 | * This program is free software; you can redistribute it and/or modify it | ||
| 5 | * under the terms and conditions of the GNU General Public License, | ||
| 6 | * version 2, as published by the Free Software Foundation. | ||
| 7 | * | ||
| 8 | * This program is distributed in the hope it will be useful, but WITHOUT | ||
| 9 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
| 10 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | ||
| 11 | * more details. | ||
| 12 | */ | ||
| 13 | |||
| 14 | #include <linux/arm64_ras.h> | ||
| 15 | |||
| 16 | /* Error Records Per Core */ | ||
| 17 | /* ERR_CTLR bits for IFU */ | ||
| 18 | #define RAS_IFU_CTL_ITLB_SNP_ERR RAS_BIT(43) | ||
| 19 | #define RAS_IFU_CTL_MITGRP_ERR RAS_BIT(42) | ||
| 20 | #define RAS_IFU_CTL_IMQDP_ERR RAS_BIT(41) | ||
| 21 | #define RAS_IFU_CTL_L2UC_ERR RAS_BIT(40) | ||
| 22 | #define RAS_IFU_CTL_ICTPSNP_ERR RAS_BIT(38) | ||
| 23 | #define RAS_IFU_CTL_ICMHSNP_ERR RAS_BIT(37) | ||
| 24 | #define RAS_IFU_CTL_ITLBP_ERR RAS_BIT(36) | ||
| 25 | #define RAS_IFU_CTL_THERR_ERR RAS_BIT(35) | ||
| 26 | #define RAS_IFU_CTL_ICDP_ERR RAS_BIT(34) | ||
| 27 | #define RAS_IFU_CTL_ICTP_ERR RAS_BIT(33) | ||
| 28 | #define RAS_IFU_CTL_ICMH_ERR RAS_BIT(32) | ||
| 29 | |||
| 30 | /* ERR_CTLR bits for RET_JSR */ | ||
| 31 | #define ERR_CTL_RET_JSR_FRFP_ERR RAS_BIT(35) | ||
| 32 | #define ERR_CTL_RET_JSR_IRFP_ERR RAS_BIT(34) | ||
| 33 | #define ERR_CTL_RET_JSR_GB_ERR RAS_BIT(33) | ||
| 34 | #define ERR_CTL_RET_JSR_TO_ERR RAS_BIT(32) | ||
| 35 | |||
| 36 | /* ERR_CTLR bits for MTS_JSR */ | ||
| 37 | #define ERR_CTL_MTS_JSR_ERRUC_ERR RAS_BIT(32) | ||
| 38 | #define ERR_CTL_MTS_JSR_ERRC_ERR RAS_BIT(33) | ||
| 39 | #define ERR_CTL_MTS_JSR_NAFLL_ERR RAS_BIT(34) | ||
| 40 | #define ERR_CTL_MTS_JSR_CARVE_ERR RAS_BIT(35) | ||
| 41 | #define ERR_CTL_MTS_JSR_CRAB_ERR RAS_BIT(36) | ||
| 42 | #define ERR_CTL_MTS_JSR_MMIO_ERR RAS_BIT(37) | ||
| 43 | |||
| 44 | /* ERR_CTLR bits for LSD_1 */ | ||
| 45 | #define ERR_CTL_LSD1_CCTP_ERR RAS_BIT(32) | ||
| 46 | #define ERR_CTL_LSD1_MCMH_ERR RAS_BIT(33) | ||
| 47 | #define ERR_CTL_LSD1_CCMH_ERR RAS_BIT(34) | ||
| 48 | #define ERR_CTL_LSD1_MCDLP_ERR RAS_BIT(35) | ||
| 49 | #define ERR_CTL_LSD1_CCDLECC_S_ERR RAS_BIT(36) | ||
| 50 | #define ERR_CTL_LSD1_CCDLECC_D_ERR RAS_BIT(37) | ||
| 51 | #define ERR_CTL_LSD1_CCDSECC_S_ERR RAS_BIT(38) | ||
| 52 | #define ERR_CTL_LSD1_CCDSECC_D_ERR RAS_BIT(39) | ||
| 53 | #define ERR_CTL_LSD1_CCDEMLECC_ERR RAS_BIT(40) | ||
| 54 | |||
| 55 | /* ERR_CTLR bits for LSD_2 */ | ||
| 56 | #define ERR_CTL_LSD2_BTCCVPP_ERR RAS_BIT(32) | ||
| 57 | #define ERR_CTL_LSD2_BTCCPPP_ERR RAS_BIT(33) | ||
| 58 | #define ERR_CTL_LSD2_BTCCMH_ERR RAS_BIT(34) | ||
| 59 | #define ERR_CTL_LSD2_VRCDECC_S_ERR RAS_BIT(35) | ||
| 60 | #define ERR_CTL_LSD2_VRCDECC_D_ERR RAS_BIT(36) | ||
| 61 | #define ERR_CTL_LSD2_VRCDP_ERR RAS_BIT(37) | ||
| 62 | #define ERR_CTL_LSD2_MCDEP_ERR RAS_BIT(38) | ||
| 63 | #define ERR_CTL_LSD2_CCDEECC_S_ERR RAS_BIT(39) | ||
| 64 | #define ERR_CTL_LSD2_CCDEECC_D_ERR RAS_BIT(40) | ||
| 65 | #define ERR_CTL_LSD2_L2REQ_UNCORR_ERR RAS_BIT(41) | ||
| 66 | |||
| 67 | /* ERR_CTLR bits for LSD_3 */ | ||
| 68 | #define ERR_CTL_LSD3_L2TLBP_ERR RAS_BIT(32) | ||
| 69 | #define ERR_CTL_LSD3_LATENT_ERR RAS_BIT(63) | ||
| 70 | |||
| 71 | /* Error records per CCPLEX */ | ||
| 72 | /* ERR_CTLR bits for CMU:CCPMU or DPMU*/ | ||
| 73 | #define ERR_CTL_DPMU_DMCE_CRAB_ACC_ERR RAS_BIT(32) | ||
| 74 | #define ERR_CTL_DPMU_CRAB_ACC_ERR RAS_BIT(33) | ||
| 75 | #define ERR_CTL_DPMU_DMCE_UCODE_ERR RAS_BIT(35) | ||
| 76 | |||
| 77 | /* ERR_CTLR bits for SCF:IOB*/ | ||
| 78 | #define ERR_CTL_SCFIOB_REQ_PAR_ERR RAS_BIT(41) | ||
| 79 | #define ERR_CTL_SCFIOB_PUT_PAR_ERR RAS_BIT(40) | ||
| 80 | #define ERR_CTL_SCFIOB_PUT_CECC_ERR RAS_BIT(32) | ||
| 81 | #define ERR_CTL_SCFIOB_PUT_UECC_ERR RAS_BIT(39) | ||
| 82 | #define ERR_CTL_SCFIOB_EVP_ERR RAS_BIT(33) | ||
| 83 | #define ERR_CTL_SCFIOB_TBX_ERR RAS_BIT(34) | ||
| 84 | #define ERR_CTL_SCFIOB_CRI_ERR RAS_BIT(35) | ||
| 85 | #define ERR_CTL_SCFIOB_MMCRAB_ERR RAS_BIT(37) | ||
| 86 | #define ERR_CTL_SCFIOB_IHI_ERR RAS_BIT(36) | ||
| 87 | #define ERR_CTL_SCFIOB_CBB_ERR RAS_BIT(38) | ||
| 88 | |||
| 89 | /* ERR_CTLR bits for SCF:SNOC*/ | ||
| 90 | #define ERR_CTL_SCFSNOC_CPE_TO_ERR RAS_BIT(34) | ||
| 91 | #define ERR_CTL_SCFSNOC_CPE_RSP_ERR RAS_BIT(35) | ||
| 92 | #define ERR_CTL_SCFSNOC_CPE_REQ_ERR RAS_BIT(36) | ||
| 93 | #define ERR_CTL_SCFSNOC_DVMU_TO_ERR RAS_BIT(37) | ||
| 94 | #define ERR_CTL_SCFSNOC_DVMU_PAR_ERR RAS_BIT(38) | ||
| 95 | #define ERR_CTL_SCFSNOC_MISC_CECC_ERR RAS_BIT(32) | ||
| 96 | #define ERR_CTL_SCFSNOC_MISC_UECC_ERR RAS_BIT(39) | ||
| 97 | #define ERR_CTL_SCFSNOC_MISC_PAR_ERR RAS_BIT(40) | ||
| 98 | #define ERR_CTL_SCFSNOC_MISC_RSP_ERR RAS_BIT(41) | ||
| 99 | #define ERR_CTL_SCFSNOC_CARVEOUT_ERR RAS_BIT(33) | ||
| 100 | |||
| 101 | /* ERR_CTLR bits for CMU:CTU*/ | ||
| 102 | #define ERR_CTL_CMUCTU_TRCDMA_PAR_ERR RAS_BIT(32) | ||
| 103 | #define ERR_CTL_CMUCTU_MCF_PAR_ERR RAS_BIT(33) | ||
| 104 | #define ERR_CTL_CMUCTU_TRL_PAR_ERR RAS_BIT(34) | ||
| 105 | #define ERR_CTL_CMUCTU_CTU_DATA_PAR_ERR RAS_BIT(35) | ||
| 106 | #define ERR_CTL_CMUCTU_TAG_PAR_ERR RAS_BIT(36) | ||
| 107 | #define ERR_CTL_CMUCTU_CTU_SNP_ERR RAS_BIT(37) | ||
| 108 | #define ERR_CTL_CMUCTU_TRCDMA_REQ_ERR RAS_BIT(38) | ||
| 109 | |||
| 110 | /* ERR_CTLR bits for SCF:L3_* */ | ||
| 111 | #define ERR_CTL_SCFL3_ADR_ERR RAS_BIT(38) | ||
| 112 | #define ERR_CTL_SCFL3_PERR_ERR RAS_BIT(40) | ||
| 113 | #define ERR_CTL_SCFL3_UECC_ERR RAS_BIT(39) | ||
| 114 | #define ERR_CTL_SCFL3_CECC_ERR RAS_BIT(41) | ||
| 115 | #define ERR_CTL_SCFL3_MH_CAM_ERR RAS_BIT(37) | ||
| 116 | #define ERR_CTL_SCFL3_MH_TAG_ERR RAS_BIT(36) | ||
| 117 | #define ERR_CTL_SCFL3_UNSUPP_REQ_ERR RAS_BIT(35) | ||
| 118 | #define ERR_CTL_SCFL3_PROT_ERR RAS_BIT(34) | ||
| 119 | #define ERR_CTL_SCFL3_TO_ERR RAS_BIT(33) | ||
| 120 | |||
| 121 | /* ERR_CTLR bits for SCFCMU_CLOCKS */ | ||
| 122 | #define ERR_CTL_SCFCMU_LUT0_PAR_ERR RAS_BIT(32) | ||
| 123 | #define ERR_CTL_SCFCMU_LUT1_PAR_ERR RAS_BIT(33) | ||
| 124 | #define ERR_CTL_SCFCMU_ADC0_MON_ERR RAS_BIT(34) | ||
| 125 | #define ERR_CTL_SCFCMU_ADC1_MON_ERR RAS_BIT(35) | ||
| 126 | |||
| 127 | /* Error records per Core Cluster */ | ||
| 128 | /* ERR_CTLR bits for L2 */ | ||
| 129 | #define ERR_CTL_L2_MLD_ECCC_ERR RAS_BIT(32) | ||
| 130 | #define ERR_CTL_L2_URD_ECCC_ERR RAS_BIT(33) | ||
| 131 | #define ERR_CTL_L2_MLD_ECCUD_ERR RAS_BIT(34) | ||
| 132 | #define ERR_CTL_L2_MLD_ECCUC_ERR RAS_BIT(36) | ||
| 133 | #define ERR_CTL_L2_URD_ECCUC_ERR RAS_BIT(37) | ||
| 134 | #define ERR_CTL_L2_NTDP_ERR RAS_BIT(38) | ||
| 135 | #define ERR_CTL_L2_URDP RAS_BIT(39) | ||
| 136 | #define ERR_CTL_L2_MLTP_ERR RAS_BIT(40) | ||
| 137 | #define ERR_CTL_L2_NTTP_ERR RAS_BIT(41) | ||
| 138 | #define ERR_CTL_L2_URTP_ERR RAS_BIT(42) | ||
| 139 | #define ERR_CTL_L2_L2MH_ERR RAS_BIT(43) | ||
| 140 | #define ERR_CTL_L2_CORE02L2CP_ERR RAS_BIT(44) | ||
| 141 | #define ERR_CTL_L2_CORE12L2CP_ERR RAS_BIT(45) | ||
| 142 | #define ERR_CTL_L2_SCF2L2C_ECCC_ERR RAS_BIT(46) | ||
| 143 | #define ERR_CTL_L2_SCF2L2C_ECCU_ERR RAS_BIT(47) | ||
| 144 | #define ERR_CTL_L2_SCF2L2C_FILLDATAP_ERR RAS_BIT(48) | ||
| 145 | #define ERR_CTL_L2_SCF2L2C_ADVNOTP_ERR RAS_BIT(49) | ||
| 146 | #define ERR_CTL_L2_SCF2L2C_REQRSPP_ERR RAS_BIT(50) | ||
| 147 | #define ERR_CTL_L2_SCF2L2C_DECWTERR_ERR RAS_BIT(51) | ||
| 148 | #define ERR_CTL_L2_SCF2L2C_DECRDERR_ERR RAS_BIT(52) | ||
| 149 | #define ERR_CTL_L2_SCF2L2C_SLVWTERR_ERR RAS_BIT(53) | ||
| 150 | #define ERR_CTL_L2_SCF2L2C_SLVRDERR_ERR RAS_BIT(54) | ||
| 151 | #define ERR_CTL_L2_L2PCL_ERR RAS_BIT(55) | ||
| 152 | #define ERR_CTL_L2_URTTO_ERR RAS_BIT(56) | ||
| 153 | |||
| 154 | /* ERR_CTLR bits for MMU */ | ||
| 155 | #define ERR_CTL_MMU_ACPERR_ERR RAS_BIT(32) | ||
| 156 | #define ERR_CTL_MMU_WCPERR_ERR RAS_BIT(34) | ||
| 157 | |||
| 158 | /* ERR_CTLR bits for CLUSTER_CLOCKS */ | ||
| 159 | #define ERR_CTL_CC_FREQ_MON_ERR RAS_BIT(32) | ||
