Home | History | Annotate | Download | only in X64
      1 ;; @file
      2 ;  Interrupt Redirection Template
      3 ;
      4 ; Copyright (c) 2016, Intel Corporation. All rights reserved.<BR>
      5 ;
      6 ; This program and the accompanying materials
      7 ; are licensed and made available under the terms and conditions
      8 ; of the BSD License which accompanies this distribution.  The
      9 ; full text of the license may be found at
     10 ; http://opensource.org/licenses/bsd-license.php
     11 ;
     12 ; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
     13 ; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
     14 ;
     15 ;;
     16 
     17     DEFAULT REL
     18     SECTION .text
     19 
     20 ;----------------------------------------------------------------------------
     21 ; Procedure:    InterruptRedirectionTemplate: Redirects interrupts 0x68-0x6F
     22 ;
     23 ; Input:        None
     24 ;
     25 ; Output:       None
     26 ;
     27 ; Prototype:    VOID
     28 ;               InterruptRedirectionTemplate (
     29 ;                                VOID
     30 ;                                );
     31 ;
     32 ; Saves:        None
     33 ;
     34 ; Modified:     None
     35 ;
     36 ; Description:  Contains the code that is copied into low memory (below 640K).
     37 ;               This code reflects interrupts 0x68-0x6f to interrupts 0x08-0x0f.
     38 ;               This template must be copied into low memory, and the IDT entries
     39 ;               0x68-0x6F must be point to the low memory copy of this code.  Each
     40 ;               entry is 4 bytes long, so IDT entries 0x68-0x6F can be easily
     41 ;               computed.
     42 ;
     43 ;----------------------------------------------------------------------------
     44 
     45 global ASM_PFX(InterruptRedirectionTemplate)
     46 ASM_PFX(InterruptRedirectionTemplate):
     47   int     0x8
     48   DB      0xcf          ; IRET
     49   nop
     50   int     0x9
     51   DB      0xcf          ; IRET
     52   nop
     53   int     0xa
     54   DB      0xcf          ; IRET
     55   nop
     56   int     0xb
     57   DB      0xcf          ; IRET
     58   nop
     59   int     0xc
     60   DB      0xcf          ; IRET
     61   nop
     62   int     0xd
     63   DB      0xcf          ; IRET
     64   nop
     65   int     0xe
     66   DB      0xcf          ; IRET
     67   nop
     68   int     0xf
     69   DB      0xcf          ; IRET
     70   nop
     71 
     72