summaryrefslogtreecommitdiffstats
path: root/UefiCpuPkg/CpuDxe/Ia32/IvtAsm.S
blob: ee40b03ed83ae7633149c2f01cf593e5d53070c4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
#------------------------------------------------------------------------------
#
# Copyright (c) 2006 - 2009, Intel Corporation
# All rights reserved. This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution.  The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
#
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#
# Module Name:
#
#   IvtAsm.S
#
# Abstract:
#
#   Interrupt Vector Table
#
#------------------------------------------------------------------------------

#
# Interrupt Vector Table
#

.macro SingleIdtVectorMacro vectorNum
    call    ASM_PFX(CommonInterruptEntry)
    .short  \vectorNum
    nop
.endm

.macro EightIdtVectors firstVectorNum
    SingleIdtVectorMacro \firstVectorNum
    SingleIdtVectorMacro "(\firstVectorNum+1)"
    SingleIdtVectorMacro "(\firstVectorNum+2)"
    SingleIdtVectorMacro "(\firstVectorNum+3)"
    SingleIdtVectorMacro "(\firstVectorNum+4)"
    SingleIdtVectorMacro "(\firstVectorNum+5)"
    SingleIdtVectorMacro "(\firstVectorNum+6)"
    SingleIdtVectorMacro "(\firstVectorNum+7)"
.endm

.macro SixtyFourIdtVectors firstVectorNum
    EightIdtVectors \firstVectorNum
    EightIdtVectors "(\firstVectorNum+0x08)"
    EightIdtVectors "(\firstVectorNum+0x10)"
    EightIdtVectors "(\firstVectorNum+0x18)"
    EightIdtVectors "(\firstVectorNum+0x20)"
    EightIdtVectors "(\firstVectorNum+0x28)"
    EightIdtVectors "(\firstVectorNum+0x30)"
    EightIdtVectors "(\firstVectorNum+0x38)"
.endm

ASM_GLOBAL ASM_PFX(AsmIdtVector00)
.p2align 3
ASM_PFX(AsmIdtVector00):
    SixtyFourIdtVectors 0x00
    SixtyFourIdtVectors 0x40
    SixtyFourIdtVectors 0x80
    SixtyFourIdtVectors 0xC0
ASM_GLOBAL ASM_PFX(AsmCommonIdtEnd)
ASM_PFX(AsmCommonIdtEnd):
    .byte 0