• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 #pragma once
13 
14 #define SYNC_EL1t  0
15 #define IRQ_EL1t   1
16 #define FIQ_EL1t   2
17 #define ERROR_EL1t 3
18 
19 #define SYNC_EL1h  4
20 #define IRQ_EL1h   5
21 #define FIQ_EL1h   6
22 #define ERROR_EL1h 7
23 
24 #define SYNC_EL0_64  8
25 #define IRQ_EL0_64   9
26 #define FIQ_EL0_64   10
27 #define ERROR_EL0_64 11
28 
29 #define SYNC_EL0_32  12
30 #define IRQ_EL0_32   13
31 #define FIQ_EL0_32   14
32 #define ERROR_EL0_32 15
33 
34 #ifndef __ASM__
35 /* assembly helper functions */
36 void set_exception_vector(void);
37 void enable_irq(void);
38 void disable_irq(void);
39 /* fault handlers */
40 void do_page_fault(u64 esr, u64 fault_addr, int type, u64 *fix_addr);
41 #endif /* __ASM__ */