]> git.proxmox.com Git - mirror_edk2.git/blob - MdeModulePkg/Core/DxeIplPeim/Ia32/IdtVectorAsm.S
Update all files in DxeIpl Peim to follow doxygen style header.
[mirror_edk2.git] / MdeModulePkg / Core / DxeIplPeim / Ia32 / IdtVectorAsm.S
1 #/**@file
2 # IDT vector entry.
3 #
4 # Copyright (c) 2007 - 2008, Intel Corporation
5 # All rights reserved. This program and the accompanying materials
6 # are licensed and made available under the terms and conditions of the BSD License
7 # which accompanies this distribution. The full text of the license may be found at
8 # http://opensource.org/licenses/bsd-license.php
9 #
10 # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
12 #
13 #**/
14
15 .text
16 .code32
17
18
19 .align 8
20 .globl ASM_PFX(AsmGetVectorTemplatInfo)
21 .globl ASM_PFX(AsmVectorFixup)
22 /*
23 ;
24 ;-----------------------------------------------------------------------
25 ; Template of IDT Vector Handlers.
26 ;
27 ;-----------------------------------------------------------------------
28 */
29 @VectorTemplateBase:
30 pushl %eax
31 .byte 0x6a # push #VectorNum
32 @VectorNum:
33 .byte 0
34 movl CommonInterruptEntry, %eax
35 jmp *%eax
36 @VectorTemplateEnd:
37
38
39 ASM_PFX(AsmGetVectorTemplatInfo):
40 movl 4(%esp), %ecx
41 movl $@VectorTemplateBase, (%ecx)
42 movl $(@VectorTemplateEnd - @VectorTemplateBase), %eax
43 ret
44
45 ASM_PFX(AsmVectorFixup):
46 movl 8(%esp), %eax
47 movl 4(%esp), %ecx
48 movb %al, (@VectorNum - @VectorTemplateBase)(%ecx)
49 ret
50
51 /*
52 ; The follow algorithm is used for the common interrupt routine.
53
54 ;
55 ; +---------------------+ <-- 16-byte aligned ensured by processor
56 ; + Old SS +
57 ; +---------------------+
58 ; + Old RSP +
59 ; +---------------------+
60 ; + RFlags +
61 ; +---------------------+
62 ; + CS +
63 ; +---------------------+
64 ; + RIP +
65 ; +---------------------+
66 ; + Error Code +
67 ; +---------------------+
68 ; + Vector Number +
69 ; +---------------------+
70 */
71
72 CommonInterruptEntry:
73 cli
74 @@:
75 jmp @@
76
77
78
79