1 #ifndef _CRASH_ANALYZER_DEFS_H_ 2 #define _CRASH_ANALYZER_DEFS_H_ 3 4 #include <limits.h> 5 #define HMD_DMXEXCEPTIONCAUSELIST_SIZE 41 6 #define CM4EXCEPTIONCAUSELIST_SIZE 26 7 #define ASSERTDEBUGMODLIST_SIZE 104 8 9 const char* Hmd_DmxExceptionCauseList[HMD_DMXEXCEPTIONCAUSELIST_SIZE] = { 10 "IllegalInstructionCause", 11 "SyscallCause", 12 "InstructionFetchErrorCause", 13 "LoadStoreErrorCause", 14 "Level1InterruptCause", 15 "AllocaCause", 16 "IntegerDivideByZeroCause", 17 "PCValueErrorCause", 18 "PrivilegedCause", 19 "LoadStoreAlignmentCause", 20 "Reserved", 21 "Reserved", 22 "InstrPIFDataErrorCause", 23 "LoadStorePIFDataErrorCause", 24 "InstrPIFAddrErrorCause", 25 "LoadStorePIFAddrErrorCause", 26 "InstTLBMissCause", 27 "InstTLBMultiHitCause", 28 "InstFetchPrivilegeCause", 29 "Reserved", 30 "InstFetchProhibitedCause", 31 "Reserved", 32 "Reserved", 33 "Reserved", 34 "LoadStoreTLBMissCause", 35 "LoadStoreTLBMultiHitCause", 36 "LoadStorePrivilegeCause", 37 "Reserved", 38 "LoadProhibitedCause", 39 "StoreProhibitedCause", 40 "Reserved", 41 "Reserved", 42 "CoprocessornDisabled", 43 "CoprocessornDisabled", 44 "CoprocessornDisabled", 45 "CoprocessornDisabled", 46 "CoprocessornDisabled", 47 "CoprocessornDisabled", 48 "CoprocessornDisabled", 49 "CoprocessornDisabled", 50 "Reserved"}; 51 52 const char* Cm4ExceptionCauseList[CM4EXCEPTIONCAUSELIST_SIZE] = { 53 "IACCVIOL", 54 "DACCVIOL", 55 "Reserved", 56 "MUNSTKERR", 57 "MSTKERR", 58 "MLSPERR", 59 "Reserved", 60 "MMARVALID", 61 "IBUSERR", 62 "PRECISERR", 63 "IMPRECISERR", 64 "UNSTKERR", 65 "STKERR", 66 "LSPERR", 67 "Reserved", 68 "BFARVALID", 69 "UNDEFINSTR", 70 "INVSTATE", 71 "INVPC", 72 "NOCP", 73 "Reserved", 74 "Reserved", 75 "Reserved", 76 "Reserved", 77 "UNALIGNED", 78 "DIVBYZERO"}; 79 80 const char* AssertDebugModList[ASSERTDEBUGMODLIST_SIZE] = { 81 "Invalid", 82 "DBG_MODULE_ID_ACCDETMGR_LOG = 1", 83 "DBG_MODULE_ID_BATTERYMGR_LOG", 84 "DBG_MODULE_ID_BLUETOOTHMGR_LOG", 85 "DBG_MODULE_ID_BUTTONMGR_LOG", 86 "DBG_MODULE_ID_CODECMGR_LOG", 87 "DBG_MODULE_ID_CTRLMGR_LOG", 88 "DBG_MODULE_ID_DMAMGR_LOG", 89 "DBG_MODULE_ID_EVTMGR_LOG", 90 "DBG_MODULE_ID_FLASHMGR_LOG", 91 "DBG_MODULE_ID_LEDMGR_LOG", 92 "DBG_MODULE_ID_POWERMGR_LOG", 93 "DBG_MODULE_ID_STREAMMGR_LOG", 94 "DBG_MODULE_ID_SENSORMGR_LOG", 95 "DBG_MODULE_ID_TUNNELMGR_LOG", 96 "DBG_MODULE_ID_USBMGR_LOG", 97 "DBG_MODULE_ID_PLUGINMGR_LOG", 98 "DBG_MODULE_ID_PLUGINVM_LOG", 99 "DBG_MODULE_ID_PACKAGEUTILS_LOG", 100 "DBG_MODULE_ID_ENDPOINT_LOG", 101 "DBG_MODULE_ID_PUTMSG_LOG", 102 "DBG_MODULE_ID_CONTROLLER_LOG", 103 "DBG_MODULE_ID_MIPSPROFILER_LOG", 104 "DBG_MODULE_ID_DEBUGMONITOR_LOG", 105 "DBG_MODULE_ID_SSPDRV_LOG", 106 "DBG_MODULE_ID_AFDRV_LOG", 107 "DBG_MODULE_ID_SPIDRV_LOG", 108 "DBG_MODULE_ID_I2CDRV_LOG", 109 "DBG_MODULE_ID_A400DRV_LOG", 110 "DBG_MODULE_ID_ADAU1361DRV_LOG", 111 "DBG_MODULE_ID_MAX98090DRV_LOG", 112 "DBG_MODULE_ID_BQ27425DRV_LOG", 113 "DBG_MODULE_ID_USBDRV_LOG", 114 "DBG_MODULE_ID_CSR8811_LOG", 115 "DBG_MODULE_ID_CYW20707DRV_LOG", 116 "DBG_MODULE_ID_BUTTONDRV_LOG", 117 "DBG_MODULE_ID_LEDDRV_LOG", 118 "DBG_MODULE_ID_TIMERDRV_LOG", 119 "DBG_MODULE_ID_UARTDRV_LOG", 120 "DBG_MODULE_ID_FLASHDRV_LOG", 121 "DBG_MODULE_ID_DMADRV_LOG", 122 "DBG_MODULE_ID_GPIODRV_LOG", 123 "DBG_MODULE_ID_MACDRV_LOG", 124 "DBG_MODULE_ID_STMRDRV_LOG", 125 "DBG_MODULE_ID_STMRPTDRV_LOG", 126 "DBG_MODULE_ID_SLIMBUSDRV_LOG", 127 "DBG_MODULE_ID_SSENSORDRV_LOG", 128 "DBG_MODULE_ID_STRMDRV_LOG", 129 "DBG_MODULE_ID_CPUSTRMDRV_LOG", 130 "DBG_MODULE_ID_CLKTREEUTILS_LOG", 131 "DBG_MODULE_ID_SCRIPTMGR_LOG", 132 "DBG_MODULE_ID_MODULES_LOG", 133 "DBG_MODULE_ID_ROUTESMGR_LOG", 134 "DBG_MODULE_ID_RTELEMCYPRESSAUDIO_LOG", 135 "DBG_MODULE_ID_RTELEMDAURAHEADSET_LOG", 136 "DBG_MODULE_ID_RTELEMESTRELLABTAUDIO_LOG", 137 "DBG_MODULE_ID_RTELEMESTRELLACODEC_LOG", 138 "DBG_MODULE_ID_RTELEMESTRELLAUSB_LOG", 139 "DBG_MODULE_ID_RTELEMPDM_LOG", 140 "DBG_MODULE_ID_RTELEMPLUGIN_LOG", 141 "DBG_MODULE_ID_RTELEMFILE_LOG", 142 "DBG_MODULE_ID_TASK_LOG", 143 "DBG_MODULE_ID_BTCORE_LOG", 144 "DBG_MODULE_ID_BTA2DP_LOG", 145 "DBG_MODULE_ID_PERFMON_LOG", 146 "DBG_MODULE_ID_TRACELOG_LOG", 147 "DBG_MODULE_ID_HEAPCOMPACTOR_LOG", 148 "DBG_MODULE_ID_RESOURCEHANDLER_LOG", 149 "DBG_MODULE_ID_LOWPOWERSTREAMMGR_LOG", 150 "DBG_MODULE_ID_SSPSTREAMMGR_LOG", 151 "DBG_MODULE_ID_TUNNELSTREAMMGR_LOG", 152 "DBG_MODULE_ID_TEMPLATE_LOG", 153 "DBG_MODULE_ID_TEMPLATEMODULE_LOG", 154 "DBG_MODULE_ID_FILTER_LOG", 155 "DBG_MODULE_ID_I2SDRV_LOG", 156 "DBG_MODULE_ID_PCMDRV_LOG", 157 "DBG_MODULE_ID_PDMDRV_LOG", 158 "DBG_MODULE_ID_REGMAPDRV_LOG", 159 "DBG_MODULE_ID_SPIREGMAP_LOG", 160 "DBG_MODULE_ID_STMRTIMER_LOG", 161 "DBG_MODULE_ID_RTOSOPS_LOG", 162 "DBG_MODULE_ID_MEMORYMGR_LOG", 163 "DBG_MODULE_ID_ICPUDRV_LOG", 164 "DBG_MODULE_ID_FRAMEMGR_LOG", 165 "DBG_MODULE_ID_DEBUGPRINT_LOG", 166 "DBG_MODULE_ID_DATABASE_LOG", 167 "DBG_MODULE_ID_BULKTRANSFER_LOG", 168 "DBG_MODULE_ID_ROMECONTROLPORT_LOG", 169 "DBG_MODULE_ID_NOTIFYSERVICE_LOG", 170 "DBG_MODULE_ID_SYSTEMSERVICE_LOG", 171 "DBG_MODULE_ID_UISERVICE_LOG", 172 "DBG_MODULE_ID_USBSERVICE_LOG", 173 "DBG_MODULE_ID_USBCONTROLLER_LOG", 174 "DBG_MODULE_ID_BTCONTROLLER_LOG", 175 "DBG_MODULE_ID_LIGHTHOUSEAPP_LOG", 176 "DBG_MODULE_ID_I2CMASTER_LOG", 177 "DBG_MODULE_ID_I2CSLAVE_LOG", 178 "DBG_MODULE_ID_PLATFORM_LOG", 179 "DBG_MODULE_ID_TRCKERNELPORT_LOG", 180 "DBG_MODULE_ID_HWINTERFACE_LOG", 181 "DBG_MODULE_ID_FLICKERSENSORDRV_LOG", 182 "DBG_MODULE_ID_TIEQ_SSAMPLE_STRM_DRV_LOG", 183 "DBG_MODULE_ID_SBL", 184 "DBG_MODULE_ID_FORCE_SIZE" }; 185 186 enum debug_level_e 187 { 188 DBG_LOG_LVL_OFF = 0, 189 DBG_LOG_LVL_CUSTOM, 190 DBG_LOG_LVL_FATAL, 191 DBG_LOG_LVL_ERROR, 192 DBG_LOG_LVL_WARN, 193 DBG_LOG_LVL_INFO, 194 DBG_LOG_LVL_DEBUG, 195 DBG_LOG_LVL_TRACE, 196 197 DBG_LOG_LVL_NUM, 198 /* Force enums to be of size int */ 199 DBG_LOG_LVL_FORCE_SIZE = INT_MAX 200 }; 201 202 /* See ${KERNEL}/include/linux/mfd/adnc/iaxxx-core.h */ 203 enum file_name 204 { 205 CM4_DUMP_DEBUG = 0, 206 HMD_DUMP_DEBUG = 1, 207 DMX_DUMP_DEBUG = 2, 208 CM4_DUMP_CRASH = 3, 209 HMD_DUMP_CRASH = 4, 210 DMX_DUMP_CRASH = 5, 211 FILE_MAX = 6 212 }; 213 214 enum hmd_dmx_index 215 { 216 START_HMD_DMX_INDEX = 0, 217 EXCEPTION_INDEX = 1, 218 EPC1_INDEX = 2, 219 HMD_DMX_INDEX_MAX = 3, 220 }; 221 222 enum cm4_index 223 { 224 START_CM4_INDEX = 0, 225 FAULT_STATUS_INDEX = 6, 226 CM4_INDEX_MAX = 7, 227 }; 228 #endif 229