+++ /dev/null
-#/** @file\r
-# \r
-# IDT vector entry.\r
-# \r
-# Copyright (c) 2007 - 2009, Intel Corporation. All rights reserved.<BR>\r
-# This program and the accompanying materials\r
-# are licensed and made available under the terms and conditions of the BSD License\r
-# which accompanies this distribution. The full text of the license may be found at\r
-# http://opensource.org/licenses/bsd-license.php\r
-# \r
-# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-# \r
-#**/\r
-\r
- .text\r
- .code32\r
-\r
-\r
- .p2align 3\r
- ASM_GLOBAL ASM_PFX(AsmGetVectorTemplatInfo)\r
- ASM_GLOBAL ASM_PFX(AsmVectorFixup)\r
-/*\r
-;\r
-;-----------------------------------------------------------------------\r
-; Template of IDT Vector Handlers. \r
-;\r
-;-----------------------------------------------------------------------\r
-*/\r
-VectorTemplateBase:\r
- pushl %eax\r
- .byte 0x6a # push #VectorNum\r
-VectorNum:\r
- .byte 0\r
- movl CommonInterruptEntry, %eax\r
- jmp *%eax\r
-VectorTemplateEnd:\r
-\r
-\r
-ASM_PFX(AsmGetVectorTemplatInfo):\r
- movl 4(%esp), %ecx\r
- movl $VectorTemplateBase, (%ecx)\r
- movl $(VectorTemplateEnd - VectorTemplateBase), %eax\r
- ret\r
-\r
-ASM_PFX(AsmVectorFixup):\r
- movl 8(%esp), %eax\r
- movl 4(%esp), %ecx\r
- movb %al, (VectorNum - VectorTemplateBase)(%ecx)\r
- ret\r
-\r
-/*\r
-; The follow algorithm is used for the common interrupt routine.\r
-\r
-;\r
-; +---------------------+ <-- 16-byte aligned ensured by processor\r
-; + Old SS +\r
-; +---------------------+\r
-; + Old RSP +\r
-; +---------------------+\r
-; + RFlags +\r
-; +---------------------+\r
-; + CS +\r
-; +---------------------+\r
-; + RIP +\r
-; +---------------------+\r
-; + Error Code +\r
-; +---------------------+\r
-; + Vector Number +\r
-; +---------------------+\r
-*/\r
-\r
-CommonInterruptEntry: \r
- cli\r
-1:\r
- jmp 1b\r
-\r
-\r
-\r
-\r