• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/*
2 * Copyright (c) 2022-2022 Huawei Technologies Co., Ltd. All rights reserved.
3 *
4 * UniProton is licensed under Mulan PSL v2.
5 * You can use this software according to the terms and conditions of the Mulan PSL v2.
6 * You may obtain a copy of Mulan PSL v2 at:
7 *          http://license.coscl.org.cn/MulanPSL2
8 * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
9 * EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
10 * MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
11 * See the Mulan PSL v2 for more details.
12 * Create: 2022-11-22
13 * Description: 向量表处理。
14 */
15
16    .section .os.vector.text, "ax"
17
18    .global  OsVectorTable
19    .global  OsHwiDispatcher
20    .global  OsVectorTable
21
22    .type   OsHwiDispatcher, function
23    .type  OsVectorTable,function
24
25.macro EXC_HANDLE vecId
26    stp x1, x0, [sp,#-16]!
27    mov x1, #\vecId
28    b   OsExcDispatch
29.endm
30
31    .align 13
32
33OsVectorTable:
34.set    VBAR, OsVectorTable
35.org VBAR                                // Synchronous, Current EL with SP_EL0
36    EXC_HANDLE  0
37
38.org (VBAR + 0x80)                       // IRQ/vIRQ, Current EL with SP_EL0
39    EXC_HANDLE  1
40
41.org (VBAR + 0x100)                      // FIQ/vFIQ, Current EL with SP_EL0
42    EXC_HANDLE  2
43
44.org (VBAR + 0x180)                      // SERROR, Current EL with SP_EL0
45    EXC_HANDLE  3
46
47.org (VBAR + 0x200)                      // Synchronous, Current EL with SP_ELx
48    EXC_HANDLE  4
49
50.org (VBAR + 0x280)                      // IRQ/vIRQ, Current EL with SP_ELx
51    stp x1, x0, [sp,#-16]!
52    mov x1, #5
53    b   OsHwiDispatcher
54
55.org (VBAR + 0x300)                      // FIQ/vFIQ, Current EL with SP_ELx
56    EXC_HANDLE  6
57
58.org (VBAR + 0x380)                      // SERROR, Current EL with SP_ELx
59    EXC_HANDLE  7
60
61.org (VBAR + 0x400)                      // Synchronous, EL changes and the target EL is using AArch64
62    EXC_HANDLE  8
63
64.org (VBAR + 0x480)                      // IRQ/vIRQ, EL changes and the target EL is using AArch64
65    EXC_HANDLE  9
66
67.org (VBAR + 0x500)                      // FIQ/vFIQ, EL changes and the target EL is using AArch64
68    EXC_HANDLE  10
69.org (VBAR + 0x580)                      // SERROR, EL changes and the target EL is using AArch64
70    EXC_HANDLE  11
71.org (VBAR + 0x600)                      // Synchronous, L changes and the target EL is using AArch32
72    EXC_HANDLE  12
73
74.org (VBAR + 0x680)                      // IRQ/vIRQ, EL changes and the target EL is using AArch32
75    EXC_HANDLE  13
76
77.org (VBAR + 0x700)                      // FIQ/vFIQ, EL changes and the target EL is using AArch32
78    EXC_HANDLE  14
79.org (VBAR + 0x780)                      // SERROR, EL changes and the target EL is using AArch32
80    EXC_HANDLE  15
81
82    .text
83
84