Subversion Repositories Kolibri OS

Rev

Rev 3537 | Rev 3545 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 3537 Rev 3539
Line 69... Line 69...
69
format binary as "mnt"
69
format binary as "mnt"
Line 70... Line 70...
70
 
70
 
71
include 'macros.inc'
71
include 'macros.inc'
Line 72... Line 72...
72
include 'struct.inc'
72
include 'struct.inc'
Line 73... Line 73...
73
 
73
 
Line 74... Line 74...
74
$Revision: 3537 $
74
$Revision: 3539 $
Line 82... Line 82...
82
debug_direct_print equ 0
82
debug_direct_print equ 0
Line 83... Line 83...
83
 
83
 
84
include "proc32.inc"
84
include "proc32.inc"
85
include "kglobals.inc"
85
include "kglobals.inc"
-
 
86
include "lang.inc"
Line 86... Line 87...
86
include "lang.inc"
87
include "encoding.inc"
87
 
88
 
88
include "const.inc"
89
include "const.inc"
Line 492... Line 493...
492
        or      eax, 1 ; bit_0 - System Call Extension (SCE)
493
        or      eax, 1 ; bit_0 - System Call Extension (SCE)
493
        wrmsr
494
        wrmsr
Line 494... Line 495...
494
 
495
 
495
        ; !!!! It`s dirty hack, fix it !!!
496
        ; !!!! It`s dirty hack, fix it !!!
496
        ; Bits of EDX :
497
        ; Bits of EDX :
497
        ; Bit 31–16 During the SYSRET instruction, this field is copied into the CS register
498
        ; Bit 31–16 During the SYSRET instruction, this field is copied into the CS register
498
        ;  and the contents of this field, plus 8, are copied into the SS register.
499
        ;  and the contents of this field, plus 8, are copied into the SS register.
499
        ; Bit 15–0 During the SYSCALL instruction, this field is copied into the CS register
500
        ; Bit 15–0 During the SYSCALL instruction, this field is copied into the CS register
Line 500... Line 501...
500
        ;  and the contents of this field, plus 8, are copied into the SS register.
501
        ;  and the contents of this field, plus 8, are copied into the SS register.
501
 
502
 
Line 3335... Line 3336...
3335
.04:
3336
.04:
3336
;.wrmsr_instr:
3337
;.wrmsr_instr:
3337
;now counter in ecx
3338
;now counter in ecx
3338
;(edx:eax) esi:edi => edx:esi
3339
;(edx:eax) esi:edi => edx:esi
3339
        ; Fast Call MSR can't be destroy
3340
        ; Fast Call MSR can't be destroy
3340
        ; ® MSR_AMD_EFER ¬®¦­® ¨§¬¥­ïâì, â.ª. ¢ í⮬ ॣ¨áâॠ«¨è
3341
        ; Но MSR_AMD_EFER можно изменять, т.к. в этом регистре лиш
3341
        ; ¢ª«îç îâáï/¢ëª«îç îâáï à áè¨à¥­­ë¥ ¢®§¬®¦­®áâ¨
3342
        ; включаются/выключаются расширенные возможности
3342
        cmp     edx, MSR_SYSENTER_CS
3343
        cmp     edx, MSR_SYSENTER_CS
3343
        je      @f
3344
        je      @f
3344
        cmp     edx, MSR_SYSENTER_ESP
3345
        cmp     edx, MSR_SYSENTER_ESP
3345
        je      @f
3346
        je      @f
3346
        cmp     edx, MSR_SYSENTER_EIP
3347
        cmp     edx, MSR_SYSENTER_EIP