Rev 10051 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 10051 | Rev 10070 | ||
---|---|---|---|
Line 335... | Line 335... | ||
335 | mov ecx, MSR_AMD_EFER |
335 | mov ecx, MSR_AMD_EFER |
336 | rdmsr |
336 | rdmsr |
337 | or eax, 1 ; bit_0 - System Call Extension (SCE) |
337 | or eax, 1 ; bit_0 - System Call Extension (SCE) |
338 | wrmsr |
338 | wrmsr |
Line 339... | Line 339... | ||
339 | 339 | ||
340 | ; !!!! It`s dirty hack, fix it !!! |
340 | ; !!!! FIXME: Hack, fix it !!! |
341 | ; Bits of EDX : |
341 | ; Bits of EDX : |
342 | ; Bit 31–16 During the SYSRET instruction, this field is copied into the CS register |
342 | ; Bit 31-16 During the SYSRET instruction, this field is copied into the CS register |
343 | ; and the contents of this field, plus 8, are copied into the SS register. |
343 | ; and the contents of this field, plus 8, are copied into the SS register. |
344 | ; Bit 15–0 During the SYSCALL instruction, this field is copied into the CS register |
344 | ; Bit 15-0 During the SYSCALL instruction, this field is copied into the CS register |
Line 345... | Line 345... | ||
345 | ; and the contents of this field, plus 8, are copied into the SS register. |
345 | ; and the contents of this field, plus 8, are copied into the SS register. |
346 | 346 | ||
Line 2551... | Line 2551... | ||
2551 | .04: |
2551 | .04: |
2552 | ;.wrmsr_instr: |
2552 | ;.wrmsr_instr: |
2553 | ;now counter in ecx |
2553 | ;now counter in ecx |
2554 | ;(edx:eax) esi:edi => edx:esi |
2554 | ;(edx:eax) esi:edi => edx:esi |
2555 | ; Fast Call MSR can't be destroy |
2555 | ; Fast Call MSR can't be destroy |
2556 | ; Но MSR_AMD_EFER можно изменять, т.к. в этом регистре лиш |
2556 | ; But MSR_AMD_EFER can be changed, because in this register only |
2557 | ; включаются/выключаются расширенные возможности |
2557 | ; advanced features are enabled/disabled |
2558 | cmp edx, MSR_SYSENTER_CS |
2558 | cmp edx, MSR_SYSENTER_CS |
2559 | je @f |
2559 | je @f |
2560 | cmp edx, MSR_SYSENTER_ESP |
2560 | cmp edx, MSR_SYSENTER_ESP |
2561 | je @f |
2561 | je @f |
2562 | cmp edx, MSR_SYSENTER_EIP |
2562 | cmp edx, MSR_SYSENTER_EIP |