2017-01-23 00:21:34 +08:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2016 Cadence Design Systems, Inc.
|
|
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
|
|
*/
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Xtensa-specific interrupt and exception functions for RTOS ports.
|
|
|
|
* Also see xtensa_intr_asm.S.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <stdlib.h>
|
|
|
|
|
|
|
|
#include <xtensa/config/core.h>
|
|
|
|
#include "xtensa_rtos.h"
|
|
|
|
#include "xtensa_api.h"
|
|
|
|
#include <kernel_structs.h>
|
2017-07-08 01:35:18 +08:00
|
|
|
#include <sw_isr_table.h>
|
2017-01-23 00:21:34 +08:00
|
|
|
|
|
|
|
#if XCHAL_HAVE_EXCEPTIONS
|
2017-07-20 04:50:50 +08:00
|
|
|
static void unhandled_exception_trampoline(XtExcFrame *frame)
|
2017-01-23 00:21:34 +08:00
|
|
|
{
|
|
|
|
FatalErrorHandler();
|
|
|
|
CODE_UNREACHABLE;
|
|
|
|
}
|
|
|
|
|
2017-07-20 04:50:50 +08:00
|
|
|
xt_exc_handler _xt_exception_table[XCHAL_EXCCAUSE_NUM] __aligned(4) = {
|
|
|
|
[0 ... (XCHAL_EXCCAUSE_NUM - 1)] = unhandled_exception_trampoline
|
|
|
|
};
|
2017-01-23 00:21:34 +08:00
|
|
|
#endif
|
|
|
|
|
2017-07-08 01:35:18 +08:00
|
|
|
#if defined(CONFIG_SW_ISR_TABLE) && defined(XCHAL_HAVE_INTERRUPTS)
|
|
|
|
void _irq_spurious(void *arg)
|
2017-01-23 00:21:34 +08:00
|
|
|
{
|
|
|
|
ReservedInterruptHandler((unsigned int)arg);
|
|
|
|
CODE_UNREACHABLE;
|
|
|
|
}
|
2017-07-08 01:35:18 +08:00
|
|
|
#endif
|