VirtualBox

Changeset 140 in vbox


Ignore:
Timestamp:
Jan 18, 2007 3:28:16 PM (18 years ago)
Author:
vboxsync
Message:

64-bit.

Location:
trunk/src/VBox/VMM
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/CPUMInternal.h

    r23 r140  
    153153    uint8_t         auPadding[24];
    154154
    155 #else  /* 64-bit */
     155#elif HC_ARCH_BITS == 64
    156156    /** General purpose register ++
    157157     * { */
     
    234234    /* padding to get 32byte aligned size */
    235235    uint8_t         auPadding[8];
    236 #endif /* 64-bit */
     236#else
     237# error HC_ARCH_BITS not defined
     238#endif
    237239} CPUMHOSTCTX, *PCPUMHOSTCTX;
    238240
  • trunk/src/VBox/VMM/VMMInternal.h

    r23 r140  
    102102    /** Tranditional jmp_buf stuff
    103103     * @{ */
     104#if HC_ARCH_BITS == 32
    104105    uint32_t    ebx;
    105106    uint32_t    esi;
     
    108109    uint32_t    esp;
    109110    uint32_t    eip;
     111#endif
     112#if HC_ARCH_BITS == 64
     113    uint64_t    rbx;
     114# ifdef __WIN__
     115    uint64_t    rsi;           
     116    uint64_t    rdi;           
     117# endif
     118    uint64_t    rbp;
     119    uint64_t    r12;
     120    uint64_t    r13;
     121    uint64_t    r14;
     122    uint64_t    r15;
     123    uint64_t    rsp;
     124    uint64_t    rip;
     125#endif
    110126    /** @} */
    111127
    112128    /** Flag that indicates that we've done a ring-3 call. */
    113129    bool        fInRing3Call;
     130    /** The number of bytes we've saved. */
     131    uint32_t    cbSavedStack;
    114132    /** Pointer to the buffer used to save the stack.
    115133     * This is assumed to be 8KB. */
    116134    void       *pvSavedStack;
    117     /** The number of bytes we've saved. */
    118     uint32_t    cbSavedStack;
    119135    /** Esp we we match against esp on resume to make sure the stack wasn't relocated. */
    120     uint32_t    espCheck;
     136    RTHCUINTREG SpCheck;
    121137    /** The esp we should resume execution with after the restore. */
    122     uint32_t    espResume;
     138    RTHCUINTREG SpResume;
    123139} VMMR0JMPBUF, *PVMMR0JMPBUF;
    124140
  • trunk/src/VBox/VMM/VMMInternal.mac

    r19 r140  
    3434    ; additional state and stack info.
    3535    .fInRing3Call   resd 1
     36    .cbSavedStack   resd 1
    3637    .pvSavedStack   resd 1
    37     .cbSavedStack   resd 1
    38     .espCheck       resd 1
    39     .espResume      resd 1
     38    .SpCheck        resd 1
     39    .SpResume       resd 1
    4040%endif
    4141%ifdef __AMD64__
     
    5858    .cbSavedStack   resd 1
    5959    .pvSavedStack   resq 1
    60     .rspCheck       resq 1
    61     .rspResume      resq 1
     60    .SpCheck        resq 1
     61    .SpResume       resq 1
    6262%endif
    6363endstruc
  • trunk/src/VBox/VMM/VMMR0/VMMR0.cpp

    r72 r140  
    657657     * Check that the jump buffer is armed.
    658658     */
     659#ifdef __X86__
    659660    if (!pVM->vmm.s.CallHostR0JmpBuf.eip)
     661#else
     662    if (!pVM->vmm.s.CallHostR0JmpBuf.rip)
     663#endif
    660664    {
    661665        LogCom(("vmmR0LoggerFlush: Jump buffer isn't armed!\n"));
  • trunk/src/VBox/VMM/VMMR0/VMMR0A.asm

    r19 r140  
    8383.resume:
    8484    ; Sanity checks.
    85     cmp     ecx, [edx + VMMR0JMPBUF.espCheck]
     85    cmp     ecx, [edx + VMMR0JMPBUF.SpCheck]
    8686    je      .espCheck_ok
    8787.bad:
     
    100100    jnz     .bad
    101101    mov     edi, [edx + VMMR0JMPBUF.esp]
    102     sub     edi, [edx + VMMR0JMPBUF.espResume]
     102    sub     edi, [edx + VMMR0JMPBUF.SpResume]
    103103    cmp     ecx, edi
    104104    jne     .bad
     
    111111    shr     ecx, 2
    112112    mov     esi, [edx + VMMR0JMPBUF.pvSavedStack]
    113     mov     edi, [edx + VMMR0JMPBUF.espResume]
     113    mov     edi, [edx + VMMR0JMPBUF.SpResume]
    114114    mov     esp, edi
    115115    rep movsd
     
    168168    ;
    169169    mov     edi, [edx + VMMR0JMPBUF.pvSavedStack]
    170     mov     [edx + VMMR0JMPBUF.espResume], esp
     170    mov     [edx + VMMR0JMPBUF.SpResume], esp
    171171    mov     esi, esp
    172172    mov     ecx, [edx + VMMR0JMPBUF.esp]
     
    193193    ; store the last pieces of info.
    194194    mov     ecx, [edx + VMMR0JMPBUF.esp]
    195     mov     [edx + VMMR0JMPBUF.espCheck], ecx
     195    mov     [edx + VMMR0JMPBUF.SpCheck], ecx
    196196    mov     byte [edx + VMMR0JMPBUF.fInRing3Call], 1
    197197
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