VirtualBox

Changeset 60205 in vbox


Ignore:
Timestamp:
Mar 27, 2016 12:45:44 PM (9 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
106239
Message:

bs3-cmn-syscall.asm: Save and restore g_uBs3TrapEipHint in 16-bit and 32-bit mode so the testcases doesn't need to set it for each trap in the same location.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-Syscall.asm

    r60000 r60205  
    5656        push    xBX
    5757
    58 %if TMPL_BITS == 16
     58%if TMPL_BITS == 32
     59        mov     ebx, .return
     60        xchg    ebx, [BS3_DATA16_WRT(g_uBs3TrapEipHint)]
     61%elif TMPL_BITS == 16
    5962        mov     bl, [BS3_DATA16_WRT(g_bBs3CurrentMode)]
    6063        and     bl, BS3_MODE_CODE_MASK
    6164        cmp     bl, BS3_MODE_CODE_V86
    6265        mov     bx, 0
    63         mov     [2 + BS3_DATA16_WRT(g_uBs3TrapEipHint)], bx
     66        xchg    bx, [2 + BS3_DATA16_WRT(g_uBs3TrapEipHint)]
    6467        jne     .normal
    65         db 0xf0                         ; lock prefix
    66 %else
    67         BS3_LEA_MOV_WRT_RIP(xBX, .return)
    68         mov     [BS3_DATA16_WRT(g_uBs3TrapEipHint)], ebx
     68
     69        db      0xf0                    ; Lock prefix for causing #UD in V8086 mode.
    6970%endif
    7071.normal:
     
    7273
    7374.return:
     75        ; Restore the EIP hint so the testcase code doesn't need to set it all the time.
     76%if TMPL_BITS == 32
     77        mov     [BS3_DATA16_WRT(g_uBs3TrapEipHint)], ebx
     78%elif TMPL_BITS == 16
     79        mov     [2 + BS3_DATA16_WRT(g_uBs3TrapEipHint)], bx
     80%endif
     81
    7482        pop     xBX
    7583        pop     xBP
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette