]> git.saurik.com Git - apple/xnu.git/blobdiff - osfmk/i386/idt.s
xnu-1228.0.2.tar.gz
[apple/xnu.git] / osfmk / i386 / idt.s
index 2b1a0af776a351885e257ff087c0409960653fe3..bc45d5d4a5ad06881779ef88297deb95627e8767 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000-2005 Apple Computer, Inc. All rights reserved.
+ * Copyright (c) 2000-2006 Apple Computer, Inc. All rights reserved.
  *
  * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  * 
@@ -69,7 +69,7 @@
  */
 #define        IDT_BASE_ENTRY(vec,seg,type) \
        .data                   ;\
-       .long   EXT(vec) - EXT(hi_remap_text) + HIGH_MEM_BASE ;\
+       .long   EXT(vec) - EXT(hi_remap_text) + HIGH_MEM_BASE ; \
        .word   seg             ;\
        .byte   0               ;\
        .byte   type            ;\
@@ -77,7 +77,7 @@
 
 #define        IDT_BASE_ENTRY_INT(vec,seg,type) \
        .data                   ;\
-       .long   vec - EXT(hi_remap_text) + HIGH_MEM_BASE ;\
+       .long   vec - EXT(hi_remap_text) + HIGH_MEM_BASE ; \
        .word   seg             ;\
        .byte   0               ;\
        .byte   type            ;\
@@ -85,7 +85,7 @@
 
 #define        IDT_BASE_ENTRY_TG(vec,seg,type) \
        .data                   ;\
-       .long   0               ;\
+       .long   0               ; \
        .word   seg             ;\
        .byte   0               ;\
        .byte   type            ;\
@@ -322,7 +322,7 @@ INTERRUPT(0x7b)
 INTERRUPT(0x7c)
 INTERRUPT(0x7d)
 INTERRUPT(0x7e)
-INTERRUPT(0x7f)
+EXCEP_USR(0x7f, t_dtrace_ret)
 
 EXCEP_SPC_USR(0x80,hi_unix_scall)
 EXCEP_SPC_USR(0x81,hi_mach_scall)
@@ -548,15 +548,13 @@ EXT(ret_popl_ds):
 EXT(ret_iret):
         iret                            /* return from interrupt */
 fast_exit:
-       popl    %edx                    /* user return eip */
-        popl    %ecx                    /* pop and toss cs */
+       popl    %edx                    /* user return eip */
+       popl    %ecx                    /* pop and toss cs */
        andl    $(~EFL_IF),(%esp)       /* clear intrs enabled, see sti below */
-        popf                            /* flags - carry denotes failure */
-        popl    %ecx                    /* user return esp */
+       popf                            /* flags - carry denotes failure */
+       popl    %ecx                    /* user return esp */
        sti                             /* interrupts enabled after sysexit */
-        sysexit
-
-/*******************************************************************************************************/
+       sysexit
 
                
 Entry(hi_unix_scall)
@@ -612,10 +610,9 @@ Entry(hi_sysenter)
        pushf                           /* flags */
        /*
        * Clear, among others, the Nested Task (NT) flags bit;
-       * This is cleared by INT, but not by sysenter, which only
-       * clears RF, VM and IF.
+       * This is cleared by INT, but not by SYSENTER.
        */
-       pushl   $0
+       pushl   $0
        popfl
        pushl   $(SYSENTER_CS)          /* cs */
 hi_sysenter_2:
@@ -630,8 +627,8 @@ enter_lohandler:
        pushl   %es
         pushl   %fs
         pushl   %gs
-enter_lohandler1:
        pushl   $(SS_32)                /* 32-bit state flavor */
+enter_lohandler1:
        mov     %ss,%eax
        mov     %eax,%ds
        mov     %eax,%fs
@@ -663,7 +660,7 @@ enter_lohandler1:
 2:
        movl    R_TRAPNO(%esp),%ecx                     // Get the interrupt vector
        addl    $1,%gs:hwIntCnt(,%ecx,4)        // Bump the count
-       jmp     *%ebx
+       jmp             *%ebx
 
        
 /*
@@ -836,6 +833,7 @@ push_fs:
 push_gs:
        pushl   %gs                     /* restore gs. */
 push_none:
+       pushl   $(SS_32)                /* 32-bit state flavor */
        movl    %eax,R_TRAPNO(%esp)     /* set trap number */
        movl    %edx,R_ERR(%esp)        /* set error code */
                                        /* now treat as fault from user */