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