1 /* 2 * Copyright (c) 2023 Institute of Parallel And Distributed Systems (IPADS), Shanghai Jiao Tong University (SJTU) 3 * Licensed under the Mulan PSL v2. 4 * You can use this software according to the terms and conditions of the Mulan PSL v2. 5 * You may obtain a copy of Mulan PSL v2 at: 6 * http://license.coscl.org.cn/MulanPSL2 7 * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR 8 * IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR 9 * PURPOSE. 10 * See the Mulan PSL v2 for more details. 11 */ 12 #ifndef IRQ_IRQ_H 13 #define IRQ_IRQ_H 14 15 #include <object/thread.h> 16 #include <irq_num.h> 17 18 #define HANDLE_KERNEL 0 19 #define HANDLE_USER 1 20 extern unsigned char irq_handle_type[MAX_IRQ_NUM]; 21 22 void arch_interrupt_init(void); /* in arch/xxx/irq/irq_entry.c */ 23 void arch_interrupt_init_per_cpu(void); /* in arch/xxx/irq/irq_entry.c */ 24 void arch_enable_irqno(int irqno); 25 void arch_disable_irqno(int irqno); 26 27 /* XXX: only needed in ARM and SPARC */ 28 void plat_handle_irq(void); /* in arch/xxx/plat/xxx/irq/irq.c */ 29 void plat_handle_irqno(int irq); /* in arch/xxx/plat/xxx/irq/irq.c */ 30 void plat_interrupt_init(void); /* in arch/xxx/plat/xxx/irq/irq.c */ 31 void plat_disable_timer(void); 32 void plat_enable_timer(void); 33 void plat_enable_irqno(int irq); 34 void plat_disable_irqno(int irq); 35 36 void plat_ack_irq(int irq); 37 38 /* XXX: only needed in TrustZone */ 39 void plat_handle_fiq(void); 40 #endif /* IRQ_IRQ_H */ 41