VirtualBox

Ignore:
Timestamp:
Nov 28, 2008 11:07:18 AM (16 years ago)
Author:
vboxsync
Message:

Fixed 64 bits switcher loading

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMSwitcher.cpp

    r14768 r14771  
    5555    &vmmR3Switcher32BitTo32Bit_Def,
    5656    &vmmR3Switcher32BitToPAE_Def,
    57     NULL, //&vmmR3Switcher32BitToAMD64_Def - disabled because it causes assertions.
     57    &vmmR3Switcher32BitToAMD64_Def,
    5858    &vmmR3SwitcherPAETo32Bit_Def,
    5959    &vmmR3SwitcherPAEToPAE_Def,
    60     NULL, //&vmmR3SwitcherPAEToAMD64_Def - disabled because it causes assertions.
     60    &vmmR3SwitcherPAEToAMD64_Def,
    6161    NULL,   //&vmmR3SwitcherPAETo32Bit_Def,
    6262# ifdef VBOX_WITH_HYBIRD_32BIT_KERNEL
     
    348348            case FIX_GC_2_ID_NEAR_REL:
    349349            {
    350                 Assert(offSrc - pSwitcher->offGCCode < pSwitcher->cbGCCode);
     350                AssertMsg(offSrc - pSwitcher->offGCCode < pSwitcher->cbGCCode, ("%x - %x < %x\n", offSrc, pSwitcher->offGCCode, pSwitcher->cbGCCode));
    351351                uint32_t offTrg = *u.pu32++;
    352352                Assert(offTrg - pSwitcher->offIDCode0 < pSwitcher->cbIDCode0 || offTrg - pSwitcher->offIDCode1 < pSwitcher->cbIDCode1);
     
    610610#if defined(RT_ARCH_AMD64) || defined(VBOX_WITH_HYBIRD_32BIT_KERNEL)
    611611            /*
    612              * 64-bit HC pointer fixup to (HC) target within the code (32-bit offset).
    613              */
    614             case FIX_HC_64BIT:
    615             {
    616                 uint32_t offTrg = *u.pu32++;
    617                 Assert(offSrc < pSwitcher->cbCode);
    618                 Assert(offTrg - pSwitcher->offHCCode0 < pSwitcher->cbHCCode0 || offTrg - pSwitcher->offHCCode1 < pSwitcher->cbHCCode1);
    619                 *uSrc.pu64 = R0PtrCode + offTrg;
    620                 break;
    621             }
    622 
    623             /*
    624612             * 64-bit HC Code Selector (no argument).
    625613             */
     
    636624#endif
    637625            /*
     626             * 64-bit HC pointer fixup to (HC) target within the code (32-bit offset).
     627             */
     628            case FIX_HC_64BIT:
     629            {
     630                uint32_t offTrg = *u.pu32++;
     631                Assert(offSrc < pSwitcher->cbCode);
     632                Assert(offTrg - pSwitcher->offHCCode0 < pSwitcher->cbHCCode0 || offTrg - pSwitcher->offHCCode1 < pSwitcher->cbHCCode1);
     633                *uSrc.pu64 = R0PtrCode + offTrg;
     634                break;
     635            }
     636
     637            /*
    638638             * 64-bit HC pointer to the CPUM instance data (no argument).
    639639             */
     
    661661             */
    662662            case FIX_ID_64BIT:
     663            case FIX_HC_64BIT_NOCHECK:
    663664            {
    664665                uint32_t offTrg = *u.pu32++;
    665666                Assert(offSrc < pSwitcher->cbCode);
    666                 Assert(offTrg - pSwitcher->offIDCode0 < pSwitcher->cbIDCode0 || offTrg - pSwitcher->offIDCode1 < pSwitcher->cbIDCode1);
     667                Assert(u8 == FIX_HC_64BIT_NOCHECK || offTrg - pSwitcher->offIDCode0 < pSwitcher->cbIDCode0 || offTrg - pSwitcher->offIDCode1 < pSwitcher->cbIDCode1);
    667668                *uSrc.pu64 = u32IDCode + offTrg;
    668669                break;
     
    883884}
    884885
     886/**
     887 * Relocator for the PAE to AMD64 world switcher.
     888 */
     889DECLCALLBACK(void) vmmR3SwitcherPAEToAMD64_Relocate(PVM pVM, PVMMSWITCHERDEF pSwitcher, RTR0PTR R0PtrCode, uint8_t *pu8CodeR3, RTGCPTR GCPtrCode, uint32_t u32IDCode)
     890{
     891    vmmR3SwitcherGenericRelocate(pVM, pSwitcher, R0PtrCode, pu8CodeR3, GCPtrCode, u32IDCode,
     892                                 SELMGetHyperCS(pVM), SELMGetHyperDS(pVM), SELMGetHyperTSS(pVM), SELMGetHyperGDT(pVM), SELMGetHyperCS64(pVM));
     893}
     894
    885895
    886896/**
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