x86: fatal: don't report bogus interrupt vectors

_irq_controller_isr_vector_get() now returns -1 if it couldn't
determine which vector was activated.

Issue: ZEP-602
Change-Id: Ib0f5dbc3b68cc5e2c3a23121530e178aede20d06
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
This commit is contained in:
Andrew Boie 2016-09-08 11:05:21 -07:00
commit e931410756

View file

@ -80,11 +80,16 @@ FUNC_NORETURN void _NanoFatalErrorHandler(unsigned int reason,
case _NANO_ERR_CPU_EXCEPTION:
break;
case _NANO_ERR_SPURIOUS_INT:
printk("***** Unhandled interrupt vector %d occurred! "
"*****\n", _irq_controller_isr_vector_get());
break;
case _NANO_ERR_SPURIOUS_INT: {
int vector = _irq_controller_isr_vector_get();
printk("***** Unhandled interrupt vector ");
if (vector >= 0) {
printk("%d ", vector);
}
printk("*****\n");
break;
}
case _NANO_ERR_INVALID_TASK_EXIT:
printk("***** Invalid Exit Software Error! *****\n");
break;