// SPDX-License-Identifier: (GPL-2.0-only OR BSD-3-Clause) // // This file is provided under a dual BSD/GPLv2 license. When using or // redistributing this file, you may do so under either license. // // Copyright(c) 2018 Intel Corporation // // Author: Pan Xiuli <xiuli.pan@linux.intel.com> //
/* * From 4.4.1.5 table 4-64 Exception Causes of Xtensa * Instruction Set Architecture (ISA) Reference Manual
*/ staticconststruct xtensa_exception_cause xtensa_exception_causes[] = {
{0, "IllegalInstructionCause", "Illegal instruction"},
{1, "SyscallCause", "SYSCALL instruction"},
{2, "InstructionFetchErrorCause", "Processor internal physical address or data error during instruction fetch"},
{3, "LoadStoreErrorCause", "Processor internal physical address or data error during load or store"},
{4, "Level1InterruptCause", "Level-1 interrupt as indicated by set level-1 bits in the INTERRUPT register"},
{5, "AllocaCause", "MOVSP instruction, if caller’s registers are not in the register file"},
{6, "IntegerDivideByZeroCause", "QUOS, QUOU, REMS, or REMU divisor operand is zero"},
{8, "PrivilegedCause", "Attempt to execute a privileged operation when CRING ? 0"},
{9, "LoadStoreAlignmentCause", "Load or store to an unaligned address"},
{12, "InstrPIFDataErrorCause", "PIF data error during instruction fetch"},
{13, "LoadStorePIFDataErrorCause", "Synchronous PIF data error during LoadStore access"},
{14, "InstrPIFAddrErrorCause", "PIF address error during instruction fetch"},
{15, "LoadStorePIFAddrErrorCause", "Synchronous PIF address error during LoadStore access"},
{16, "InstTLBMissCause", "Error during Instruction TLB refill"},
{17, "InstTLBMultiHitCause", "Multiple instruction TLB entries matched"},
{18, "InstFetchPrivilegeCause", "An instruction fetch referenced a virtual address at a ring level less than CRING"},
{20, "InstFetchProhibitedCause", "An instruction fetch referenced a page mapped with an attribute that does not permit instruction fetch"},
{24, "LoadStoreTLBMissCause", "Error during TLB refill for a load or store"},
{25, "LoadStoreTLBMultiHitCause", "Multiple TLB entries matched for a load or store"},
{26, "LoadStorePrivilegeCause", "A load or store referenced a virtual address at a ring level less than CRING"},
{28, "LoadProhibitedCause", "A load referenced a page mapped with an attribute that does not permit loads"},
{32, "Coprocessor0Disabled", "Coprocessor 0 instruction when cp0 disabled"},
{33, "Coprocessor1Disabled", "Coprocessor 1 instruction when cp1 disabled"},
{34, "Coprocessor2Disabled", "Coprocessor 2 instruction when cp2 disabled"},
{35, "Coprocessor3Disabled", "Coprocessor 3 instruction when cp3 disabled"},
{36, "Coprocessor4Disabled", "Coprocessor 4 instruction when cp4 disabled"},
{37, "Coprocessor5Disabled", "Coprocessor 5 instruction when cp5 disabled"},
{38, "Coprocessor6Disabled", "Coprocessor 6 instruction when cp6 disabled"},
{39, "Coprocessor7Disabled", "Coprocessor 7 instruction when cp7 disabled"},
};
/* only need xtensa atm */ staticvoid xtensa_dsp_oops(struct snd_sof_dev *sdev, constchar *level, void *oops)
{ struct sof_ipc_dsp_oops_xtensa *xoops = oops; int i;
dev_printk(level, sdev->dev, "stack dump from 0x%8.8x\n", stack_ptr);
/* * example output: * 0x0049fbb0: 8000f2d0 0049fc00 6f6c6c61 00632e63
*/ for (i = 0; i < stack_words; i += 4) {
hex_dump_to_buffer(stack + i, 16, 16, 4,
buf, sizeof(buf), false);
dev_printk(level, sdev->dev, "0x%08x: %s\n", stack_ptr + i * 4, buf);
}
if (!xoops->plat_hdr.numaregs) return;
dev_printk(level, sdev->dev, "AR registers:\n"); /* the number of ar registers is a multiple of 4 */ for (i = 0; i < xoops->plat_hdr.numaregs; i += 4) {
hex_dump_to_buffer(xoops->ar + i, 16, 16, 4,
buf, sizeof(buf), false);
dev_printk(level, sdev->dev, "%#x: %s\n", i * 4, buf);
}
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.