arch: mips: use LOG_ERR to print exceptions
Change exception code to use LOG_ERR and align with all other architectures when CONFIG_EXCEPTION_DEBUG is enabled. Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This commit is contained in:
parent
e25f31ab78
commit
dddc5687a9
|
@ -5,7 +5,6 @@
|
|||
*/
|
||||
|
||||
#include <zephyr/kernel.h>
|
||||
#include <zephyr/sys/printk.h>
|
||||
#include <zephyr/logging/log.h>
|
||||
LOG_MODULE_DECLARE(os, CONFIG_KERNEL_LOG_LEVEL);
|
||||
|
||||
|
@ -14,25 +13,25 @@ FUNC_NORETURN void z_mips_fatal_error(unsigned int reason,
|
|||
{
|
||||
#ifdef CONFIG_EXCEPTION_DEBUG
|
||||
if (esf != NULL) {
|
||||
printk("$ 0 : (ze) %08lx(at) %08lx(v0) %08lx(v1)\n",
|
||||
LOG_ERR("$ 0 : (ze) %08lx(at) %08lx(v0) %08lx(v1)\n",
|
||||
esf->at, esf->v0, esf->v1);
|
||||
printk("$ 4 : %08lx(a0) %08lx(a1) %08lx(a2) %08lx(a3)\n",
|
||||
LOG_ERR("$ 4 : %08lx(a0) %08lx(a1) %08lx(a2) %08lx(a3)\n",
|
||||
esf->a0, esf->a1, esf->a2, esf->a3);
|
||||
printk("$ 8 : %08lx(t0) %08lx(t1) %08lx(t2) %08lx(t3)\n",
|
||||
LOG_ERR("$ 8 : %08lx(t0) %08lx(t1) %08lx(t2) %08lx(t3)\n",
|
||||
esf->t0, esf->t1, esf->t2, esf->t3);
|
||||
printk("$12 : %08lx(t4) %08lx(t5) %08lx(t6) %08lx(t7)\n",
|
||||
LOG_ERR("$12 : %08lx(t4) %08lx(t5) %08lx(t6) %08lx(t7)\n",
|
||||
esf->t4, esf->t5, esf->t6, esf->t7);
|
||||
printk("...\n");
|
||||
printk("$24 : %08lx(t8) %08lx(t9)\n",
|
||||
LOG_ERR("...\n");
|
||||
LOG_ERR("$24 : %08lx(t8) %08lx(t9)\n",
|
||||
esf->t8, esf->t9);
|
||||
printk("$28 : %08lx(gp) (sp) (s8) %08lx(ra)\n",
|
||||
LOG_ERR("$28 : %08lx(gp) (sp) (s8) %08lx(ra)\n",
|
||||
esf->gp, esf->ra);
|
||||
|
||||
printk("EPC : %08lx\n", esf->epc);
|
||||
LOG_ERR("EPC : %08lx\n", esf->epc);
|
||||
|
||||
printk("Status: %08lx\n", esf->status);
|
||||
printk("Cause : %08lx\n", esf->cause);
|
||||
printk("BadVA : %08lx\n", esf->badvaddr);
|
||||
LOG_ERR("Status: %08lx\n", esf->status);
|
||||
LOG_ERR("Cause : %08lx\n", esf->cause);
|
||||
LOG_ERR("BadVA : %08lx\n", esf->badvaddr);
|
||||
}
|
||||
#endif /* CONFIG_EXCEPTION_DEBUG */
|
||||
z_fatal_error(reason, esf);
|
||||
|
|
Loading…
Reference in a new issue