2019-12-07 00:54:03 +08:00
|
|
|
/*
|
2022-01-18 13:35:13 +08:00
|
|
|
* Copyright (c) 2006-2022, RT-Thread Development Team
|
2019-12-07 00:54:03 +08:00
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
|
|
*
|
|
|
|
* Change Logs:
|
|
|
|
* Date Author Notes
|
|
|
|
* 2019-12-04 Jiaxun Yang Initial version
|
2020-08-26 12:03:01 +08:00
|
|
|
* 2020-07-26 lizhirui Add xtlb exception entry
|
2019-12-07 00:54:03 +08:00
|
|
|
*/
|
2020-04-06 15:46:28 +08:00
|
|
|
#ifndef __ASSEMBLY__
|
|
|
|
#define __ASSEMBLY__
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#include <mips.h>
|
2019-12-07 00:54:03 +08:00
|
|
|
|
|
|
|
.section ".exc_vectors", "ax"
|
|
|
|
.extern tlb_refill_handler
|
|
|
|
.extern cache_error_handler
|
|
|
|
.extern mips_irq_handle
|
|
|
|
|
|
|
|
/* 0x0 - TLB refill handler */
|
|
|
|
.global tlb_refill_exception
|
2022-01-18 13:35:13 +08:00
|
|
|
.type tlb_refill_exception,@function
|
2019-12-07 00:54:03 +08:00
|
|
|
ebase_start:
|
|
|
|
tlb_refill_exception:
|
2022-01-18 13:35:13 +08:00
|
|
|
b _general_exception_handler
|
2019-12-07 00:54:03 +08:00
|
|
|
nop
|
|
|
|
|
2020-08-26 12:03:01 +08:00
|
|
|
/* 0x080 - XTLB refill handler */
|
|
|
|
.org ebase_start + 0x080
|
2022-01-18 13:35:13 +08:00
|
|
|
b _general_exception_handler
|
2020-08-26 12:03:01 +08:00
|
|
|
nop
|
|
|
|
|
2019-12-07 00:54:03 +08:00
|
|
|
/* 0x100 - Cache error handler */
|
|
|
|
.org ebase_start + 0x100
|
2022-01-18 13:35:13 +08:00
|
|
|
j cache_error_handler
|
2019-12-07 00:54:03 +08:00
|
|
|
nop
|
|
|
|
|
|
|
|
/* 0x180 - Exception/Interrupt handler */
|
|
|
|
.global general_exception
|
2022-01-18 13:35:13 +08:00
|
|
|
.type general_exception,@function
|
2019-12-07 00:54:03 +08:00
|
|
|
.org ebase_start + 0x180
|
|
|
|
general_exception:
|
2022-01-18 13:35:13 +08:00
|
|
|
b _general_exception_handler
|
2019-12-07 00:54:03 +08:00
|
|
|
nop
|
|
|
|
|
|
|
|
/* 0x200 - Special Exception Interrupt handler (when IV is set in CP0_CAUSE) */
|
|
|
|
.global irq_exception
|
2022-01-18 13:35:13 +08:00
|
|
|
.type irq_exception,@function
|
2019-12-07 00:54:03 +08:00
|
|
|
.org ebase_start + 0x200
|
|
|
|
irq_exception:
|
2022-01-18 13:35:13 +08:00
|
|
|
b _general_exception_handler
|
2019-12-07 00:54:03 +08:00
|
|
|
nop
|
|
|
|
|
|
|
|
/* general exception handler */
|
|
|
|
_general_exception_handler:
|
2022-01-18 13:35:13 +08:00
|
|
|
.set noreorder
|
|
|
|
PTR_LA k0, mips_irq_handle
|
|
|
|
jr k0
|
2019-12-07 00:54:03 +08:00
|
|
|
nop
|
2022-01-18 13:35:13 +08:00
|
|
|
.set reorder
|
2019-12-07 00:54:03 +08:00
|
|
|
|
|
|
|
/* interrupt handler */
|
|
|
|
_irq_handler:
|
2022-01-18 13:35:13 +08:00
|
|
|
.set noreorder
|
|
|
|
PTR_LA k0, mips_irq_handle
|
|
|
|
jr k0
|
2019-12-07 00:54:03 +08:00
|
|
|
nop
|
2022-01-18 13:35:13 +08:00
|
|
|
.set reorder
|