x86: print helpful message on FPU exception

A few people have tripped over this recently.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
This commit is contained in:
Andrew Boie 2018-12-06 11:47:12 -08:00 committed by Andrew Boie
commit d4363e4185

View file

@ -220,10 +220,16 @@ static FUNC_NORETURN void generic_exc_handle(unsigned int vector,
const NANO_ESF *pEsf)
{
printk("***** ");
if (vector == 13) {
switch (vector) {
case IV_GENERAL_PROTECTION:
printk("General Protection Fault\n");
} else {
break;
case IV_DEVICE_NOT_AVAILABLE:
printk("Floating point unit not enabled\n");
break;
default:
printk("CPU exception %d\n", vector);
break;
}
if ((1 << vector) & _EXC_ERROR_CODE_FAULTS) {
printk("***** Exception code: 0x%x\n", pEsf->errorCode);