Home | History | Annotate | Download | only in IA32
      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 SECTION .text
     18 
     19 ;----------------------------------------------------------------------------
     20 ; Procedure:    InterruptRedirectionTemplate: Redirects interrupts 0x68-0x6F
     21 ;
     22 ; Input:        None
     23 ;
     24 ; Output:       None
     25 ;
     26 ; Prototype:    VOID
     27 ;               InterruptRedirectionTemplate (
     28 ;                                VOID
     29 ;                                );
     30 ;
     31 ; Saves:        None
     32 ;
     33 ; Modified:     None
     34 ;
     35 ; Description:  Contains the code that is copied into low memory (below 640K).
     36 ;               This code reflects interrupts 0x68-0x6f to interrupts 0x08-0x0f.
     37 ;               This template must be copied into low memory, and the IDT entries
     38 ;               0x68-0x6F must be point to the low memory copy of this code.  Each
     39 ;               entry is 4 bytes long, so IDT entries 0x68-0x6F can be easily
     40 ;               computed.
     41 ;
     42 ;----------------------------------------------------------------------------
     43 
     44 global ASM_PFX(InterruptRedirectionTemplate)
     45 ASM_PFX(InterruptRedirectionTemplate):
     46   int     0x8
     47   DB      0xcf          ; IRET
     48   nop
     49   int     0x9
     50   DB      0xcf          ; IRET
     51   nop
     52   int     0xa
     53   DB      0xcf          ; IRET
     54   nop
     55   int     0xb
     56   DB      0xcf          ; IRET
     57   nop
     58   int     0xc
     59   DB      0xcf          ; IRET
     60   nop
     61   int     0xd
     62   DB      0xcf          ; IRET
     63   nop
     64   int     0xe
     65   DB      0xcf          ; IRET
     66   nop
     67   int     0xf
     68   DB      0xcf          ; IRET
     69   nop
     70 
     71