]> git.proxmox.com Git - mirror_edk2.git/commitdiff
IntelFrameworkModulePkg LegacyBiosDxe: Convert X64/InterruptTable.asm to NASM
authorLiming Gao <liming.gao@intel.com>
Tue, 14 Jun 2016 08:39:51 +0000 (16:39 +0800)
committerLiming Gao <liming.gao@intel.com>
Tue, 28 Jun 2016 01:52:20 +0000 (09:52 +0800)
The BaseTools/Scripts/ConvertMasmToNasm.py script was used to convert
X64/InterruptTable.asm to X64/InterruptTable.nasm.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Liming Gao <liming.gao@intel.com>
IntelFrameworkModulePkg/Csm/LegacyBiosDxe/X64/InterruptTable.nasm [new file with mode: 0644]

diff --git a/IntelFrameworkModulePkg/Csm/LegacyBiosDxe/X64/InterruptTable.nasm b/IntelFrameworkModulePkg/Csm/LegacyBiosDxe/X64/InterruptTable.nasm
new file mode 100644 (file)
index 0000000..38d1860
--- /dev/null
@@ -0,0 +1,71 @@
+;; @file\r
+;  Interrupt Redirection Template\r
+;\r
+; Copyright (c) 2016, Intel Corporation. All rights reserved.<BR>\r
+;\r
+; This program and the accompanying materials\r
+; are licensed and made available under the terms and conditions\r
+; of the BSD License which accompanies this distribution.  The\r
+; 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
+    DEFAULT REL\r
+    SECTION .text\r
+\r
+;----------------------------------------------------------------------------\r
+; Procedure:    InterruptRedirectionTemplate: Redirects interrupts 0x68-0x6F\r
+;\r
+; Input:        None\r
+;\r
+; Output:       None\r
+;\r
+; Prototype:    VOID\r
+;               InterruptRedirectionTemplate (\r
+;                                VOID\r
+;                                );\r
+;\r
+; Saves:        None\r
+;\r
+; Modified:     None\r
+;\r
+; Description:  Contains the code that is copied into low memory (below 640K).\r
+;               This code reflects interrupts 0x68-0x6f to interrupts 0x08-0x0f.\r
+;               This template must be copied into low memory, and the IDT entries\r
+;               0x68-0x6F must be point to the low memory copy of this code.  Each\r
+;               entry is 4 bytes long, so IDT entries 0x68-0x6F can be easily\r
+;               computed.\r
+;\r
+;----------------------------------------------------------------------------\r
+\r
+global ASM_PFX(InterruptRedirectionTemplate)\r
+ASM_PFX(InterruptRedirectionTemplate):\r
+  int     0x8\r
+  DB      0xcf          ; IRET\r
+  nop\r
+  int     0x9\r
+  DB      0xcf          ; IRET\r
+  nop\r
+  int     0xa\r
+  DB      0xcf          ; IRET\r
+  nop\r
+  int     0xb\r
+  DB      0xcf          ; IRET\r
+  nop\r
+  int     0xc\r
+  DB      0xcf          ; IRET\r
+  nop\r
+  int     0xd\r
+  DB      0xcf          ; IRET\r
+  nop\r
+  int     0xe\r
+  DB      0xcf          ; IRET\r
+  nop\r
+  int     0xf\r
+  DB      0xcf          ; IRET\r
+  nop\r
+\r