2019-07-15 13:18:36 -07:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2019 Intel Corporation
|
|
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <kernel.h>
|
|
|
|
#include <ksched.h>
|
|
|
|
#include <kernel_structs.h>
|
|
|
|
#include <kernel_internal.h>
|
|
|
|
#include <logging/log.h>
|
|
|
|
LOG_MODULE_DECLARE(os);
|
|
|
|
|
2019-11-06 12:26:59 -08:00
|
|
|
void z_x86_exception(z_arch_esf_t *esf)
|
2019-07-15 13:18:36 -07:00
|
|
|
{
|
2019-11-06 12:26:59 -08:00
|
|
|
switch (esf->vector) {
|
2019-12-18 14:12:54 -08:00
|
|
|
case Z_X86_OOPS_VECTOR:
|
|
|
|
z_x86_do_kernel_oops(esf);
|
|
|
|
break;
|
2019-11-06 12:26:59 -08:00
|
|
|
case IV_PAGE_FAULT:
|
|
|
|
z_x86_page_fault_handler(esf);
|
|
|
|
break;
|
|
|
|
default:
|
2019-11-18 12:07:58 -08:00
|
|
|
z_x86_unhandled_cpu_exception(esf->vector, esf);
|
2019-11-06 12:26:59 -08:00
|
|
|
CODE_UNREACHABLE;
|
2019-11-05 14:00:30 -08:00
|
|
|
}
|
2019-07-15 13:18:36 -07:00
|
|
|
}
|