Changeset 60892 in vbox for trunk/src/VBox
- Timestamp:
- May 9, 2016 1:15:43 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMRC/TRPMRCHandlersA.asm
r60891 r60892 488 488 %endif 489 489 490 ; For v8086 mode we must branch off before we enable write protection. 491 test dword [ebx + CPUMCTXCORE.eflags], X86_EFL_VM 492 jnz .gc_V86_return 493 490 494 ; enable WP 491 495 mov eax, cr0 ;; @todo try elimiate this read. … … 515 519 mov [%$STK_EIP], eax 516 520 517 test dword [ebx + CPUMCTXCORE.eflags], X86_EFL_VM518 jnz .gc_V86_return519 520 521 mov ax, [ebx + CPUMCTXCORE.gs.Sel] 521 522 TRPM_NP_GP_HANDLER NAME(trpmRCTrapInGeneric), TRPM_TRAP_IN_MOV_GS … … 544 545 ALIGNCODE(16) 545 546 .gc_V86_return: 546 mov eax, dword [ebx + CPUMCTXCORE.es.Sel] 547 mov [%$STK_V86_ES], eax 548 mov eax, dword [ebx + CPUMCTXCORE.ds.Sel] 549 mov [%$STK_V86_DS], eax 550 mov eax, dword [ebx + CPUMCTXCORE.fs.Sel] 551 mov [%$STK_V86_FS], eax 552 mov eax, dword [ebx + CPUMCTXCORE.gs.Sel] 553 mov [%$STK_V86_GS], eax 554 555 ; finally restore our scratch register eax and ebx. 556 pop ebx 557 pop eax 558 add esp, 16 + 8 ; skip segregs, error code, and vector number. 559 560 TRPM_NP_GP_HANDLER NAME(trpmRCTrapInGeneric), TRPM_TRAP_IN_IRET | TRPM_TRAP_IN_V86 561 iret 547 ; 548 ; We may be returning to V8086 while having entered from protected mode! 549 ; So, we have to push the whole stack frame. There's code in CPUMRC that 550 ; does exactly that, so call it instead of duplicating it. 551 ; 552 push ebx 553 extern NAME(CPUMGCCallV86Code) 554 call NAME(CPUMGCCallV86Code) 555 int3 ; doesn't return... 556 562 557 563 558 ; … … 951 946 %endif 952 947 948 ; For v8086 mode we must branch off before we enable write protection. 953 949 test dword [ebx + CPUMCTXCORE.eflags], X86_EFL_VM 954 950 jnz .gc_V86_return
Note:
See TracChangeset
for help on using the changeset viewer.