1/* Copyright 2021 Espressif Systems (Shanghai) PTE LTD 2 * 3 * SPDX-License-Identifier: Apache-2.0 4 */ 5 6#include <offsets.h> 7#include <zephyr/toolchain.h> 8 9/* Exports */ 10GTEXT(__soc_is_irq) 11GTEXT(__soc_handle_irq) 12GTEXT(soc_intr_get_next_source) 13 14SECTION_FUNC(exception.other, __soc_is_irq) 15 csrr a0, mcause 16 srli a0, a0, 31 17 ret 18 19SECTION_FUNC(exception.other, __soc_handle_irq) 20 addi sp, sp,-4 21 sw ra, 0x00(sp) 22 la t1, soc_intr_get_next_source 23 jalr ra, t1, 0 24 lw ra, 0x00(sp) 25 addi sp, sp, 4 26 ret 27