Main Page | Class Hierarchy | Class List | File List | Class Members | File Members

fastsys.inc

Go to the documentation of this file.
00001 ; /* 00002 ; 00003 ; Copyright (c) 1997 Microsoft Corporation 00004 ; 00005 ; Module Name: 00006 ; 00007 ; fastsys.inc 00008 ; 00009 ; Abstract: 00010 ; 00011 ; This module implements the header for Fast System Calls for Intel 00012 ; x86 family processors. 00013 ; 00014 ; Author: 00015 ; 00016 ; Environment: 00017 ; 00018 ; kernel mode. 00019 ; 00020 ; Revision History: 00021 ; 00022 ;-- 00023 00024 if 0 ; Begin C only code */ 00025 00026 // CPUID Feature bit in EDX indicating that fast system calls are supported 00027 #define KI_FAST_SYSCALL_SUPPORTED 0x0800 00028 00029 #define SYSENTER_CS_MSR 0x00000174 00030 #define SYSENTER_ESP_MSR 0x00000175 00031 #define SYSENTER_EIP_MSR 0x00000176 00032 00033 #define SYSENTER_INSTR __asm { _emit 0fh } \ 00034 __asm { _emit 34h } 00035 #define SYSEXIT_INSTR __asm { _emit 0fh } \ 00036 __asm { _emit 35h } 00037 00038 /* 00039 endif 00040 ; 00041 ; Begin Assembly definitions 00042 ; 00043 00044 00045 SYSENTER_INSTR macro 00046 db 0fH,34H 00047 endm ;; SYSENTER_INSTR 00048 00049 SYSEXIT_INSTR macro 00050 db 0fH,35H 00051 endm ;; SYSEXIT_INSTR 00052 00053 ; CPUID Feature bit in EDX indicating that fast system calls are supported 00054 KI_FAST_SYSCALL_SUPPORTED equ 00000800h 00055 00056 SYSENTER_CS_MSR equ 00000174h 00057 SYSENTER_ESP_MSR equ 00000175h 00058 SYSENTER_EIP_MSR equ 00000176h 00059 00060 UPDATE_MSR macro MsrAddress, Value 00061 00062 push eax 00063 push edx 00064 push ecx 00065 mov eax, Value 00066 mov edx, 0 00067 mov ecx, MsrAddress 00068 .586 00069 wrmsr 00070 pop ecx 00071 pop edx 00072 pop eax 00073 00074 endm ;; UPDATE_MSR 00075 00076 ; */

Generated on Sat May 15 19:39:58 2004 for test by doxygen 1.3.7