x86: fatal: report vector number of spurious interrupts

Change-Id: I79de1a77d2b5f87aa3bd1a7aebd0253dbb069252
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
This commit is contained in:
Andrew Boie 2015-12-04 13:03:51 -08:00 committed by Anas Nashif
commit a50f923504
2 changed files with 9 additions and 4 deletions

View file

@ -28,6 +28,7 @@
#include <nano_private.h>
#include <misc/printk.h>
#include <asmPrv.h>
#include <drivers/loapic.h>
/*
* Define a default ESF for use with _NanoFatalErrorHandler() in the event
@ -73,11 +74,13 @@ FUNC_NORETURN void _NanoFatalErrorHandler(unsigned int reason,
/* Display diagnostic information about the error */
switch (reason) {
case _NANO_ERR_SPURIOUS_INT:
printk("***** Unhandled exception/interrupt occurred! "
"*****\n");
case _NANO_ERR_CPU_EXCEPTION:
break;
case _NANO_ERR_SPURIOUS_INT:
printk("***** Unhandled interrupt vector %d occurred! "
"*****\n", _loapic_isr_vector_get());
break;
case _NANO_ERR_INVALID_TASK_EXIT:
printk("***** Invalid Exit Software Error! *****\n");
@ -129,7 +132,7 @@ static FUNC_NORETURN void generic_exc_handle(unsigned int vector,
if ((1 << vector) & _EXC_ERROR_CODE_FAULTS) {
printk("***** Exception code: 0x%x\n", pEsf->errorCode);
}
_NanoFatalErrorHandler(_NANO_ERR_SPURIOUS_INT, pEsf);
_NanoFatalErrorHandler(_NANO_ERR_CPU_EXCEPTION, pEsf);
}
#define EXC_FUNC(vector) \

View file

@ -271,6 +271,8 @@ typedef struct nanoIsf {
#define _NANO_ERR_STACK_CHK_FAIL (4)
/** Kernel Allocation Failure */
#define _NANO_ERR_ALLOCATION_FAIL (5)
/** Unhandled exception */
#define _NANO_ERR_CPU_EXCEPTION (6)
#ifndef _ASMLANGUAGE