]> git.proxmox.com Git - mirror_edk2.git/blob - MdeModulePkg/Core/DxeIplPeim/Ia32/IdtVectorAsm.asm
Update all files in DxeIpl Peim to follow doxygen style header.
[mirror_edk2.git] / MdeModulePkg / Core / DxeIplPeim / Ia32 / IdtVectorAsm.asm
1 ;/** @file
2 ; IDT vector entry.
3 ;
4 ; Copyright (c) 2007 - 2008, Intel Corporation. <BR>
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 .686p
16 .model flat,C
17 .code
18
19 ;
20 ;------------------------------------------------------------------------------
21 ; Generic IDT Vector Handlers for the Host.
22 ;
23 ;------------------------------------------------------------------------------
24
25 ALIGN 8
26 PUBLIC AsmGetVectorTemplatInfo
27 PUBLIC AsmVectorFixup
28
29 PUBLIC AsmVectorFixup
30
31 @VectorTemplateBase:
32 push eax
33 db 6ah ; push #VectorNumber
34 @VectorNum:
35 db 0
36 mov eax, CommonInterruptEntry
37 jmp eax
38 @VectorTemplateEnd:
39
40
41 AsmGetVectorTemplatInfo PROC
42 mov ecx, [esp + 4]
43 mov [ecx], @VectorTemplateBase
44 mov eax, (@VectorTemplateEnd - @VectorTemplateBase)
45 ret
46 AsmGetVectorTemplatInfo ENDP
47
48
49 AsmVectorFixup PROC
50 mov eax, dword ptr [esp + 8]
51 mov ecx, [esp + 4]
52 mov [ecx + (@VectorNum - @VectorTemplateBase)], al
53 ret
54 AsmVectorFixup ENDP
55
56
57 ;---------------------------------------;
58 ; CommonInterruptEntry ;
59 ;---------------------------------------;
60 ; The follow algorithm is used for the common interrupt routine.
61
62 ;
63 ; +---------------------+ <-- 16-byte aligned ensured by processor
64 ; + Old SS +
65 ; +---------------------+
66 ; + Old RSP +
67 ; +---------------------+
68 ; + RFlags +
69 ; +---------------------+
70 ; + CS +
71 ; +---------------------+
72 ; + RIP +
73 ; +---------------------+
74 ; + Error Code +
75 ; +---------------------+
76 ; + Vector Number +
77 ; +---------------------+
78
79 CommonInterruptEntry PROC
80 cli
81
82 jmp $
83 CommonInterruptEntry ENDP
84
85 END
86
87