VirtualBox

Changeset 47114 in vbox for trunk/src/VBox/Main/src-server


Ignore:
Timestamp:
Jul 12, 2013 11:26:34 AM (11 years ago)
Author:
vboxsync
Message:

On 32-bit darwin we must use the sysctl hw.cpu64bit_capable to figure whether we can do 64-bit.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/src-server/HostImpl.cpp

    r47112 r47114  
    5454# include <VBox/VBoxNetCfg-win.h>
    5555#endif /* #if defined(RT_OS_WINDOWS) && defined(VBOX_WITH_NETFLT) */
     56
     57#if defined(RT_OS_DARWIN) && ARCH_BITS == 32
     58# include <sys/types.h>
     59# include <sys/sysctl.h>
     60#endif
    5661
    5762#ifdef RT_OS_LINUX
     
    353358            m->fLongModeSupported = ASMIsValidExtRange(uExtMaxId)
    354359                                 && (fExtFeaturesEdx & X86_CPUID_EXT_FEATURE_EDX_LONG_MODE);
     360
     361#if defined(RT_OS_DARWIN) && ARCH_BITS == 32 /* darwin.x86 has some optimizations of 64-bit on 32-bit. */
     362            int     f64bitCapable = 0;
     363            size_t  cbParameter   = sizeof(f64bitCapable);
     364            if (sysctlbyname("hw.cpu64bit_capable", &f64bitCapable, &cbParameter, NULL, NULL) != -1)
     365                m->fLongModeSupported = f64bitCapable != 0;
     366#endif
    355367
    356368            /* VT-x? */
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