VirtualBox

Changeset 15305 in vbox for trunk/src/recompiler_new


Ignore:
Timestamp:
Dec 11, 2008 3:31:29 PM (16 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
40730
Message:

REM: implement config check heuristic, to select which REM to load

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/recompiler_new/VBoxREMWrapper.cpp

    r15303 r15305  
    19441944
    19451945#ifdef VBOX_USE_BITNESS_SELECTOR
     1946static bool isRem64Needed(PVM pVM)
     1947{
     1948    PCFGMNODE pRoot = CFGMR3GetRoot(pVM);
     1949    uint64_t u64Value = 0;
     1950
     1951    CFGMR3QueryIntegerDef(pRoot, "Rem64Enabled", &u64Value, 0);
     1952
     1953    return u64Value == 1;
     1954}
     1955
    19461956/**
    19471957 * Loads real REM object, resolves all exports (imports are done by native loader).
     
    19531963    size_t  offFilename;
    19541964    char    szPath[RTPATH_MAX];
    1955     bool use64 = (VMR3GetGuestBitness(pVM) == 64);
    1956     int rc = RTPathAppPrivateArch(szPath, sizeof(szPath) - 32);
     1965    int     rc = RTPathAppPrivateArch(szPath, sizeof(szPath) - 32);
    19571966    AssertRCReturn(rc, rc);
    19581967    offFilename = strlen(szPath);
     
    19611970     * Load the VBoxREM32/64 object/DLL.
    19621971     */
    1963     strcpy(&szPath[offFilename], use64 ? "/VBoxREM64" : "/VBoxREM32");
     1972    strcpy(&szPath[offFilename], isRem64Needed(pVM) ? "/VBoxREM64" : "/VBoxREM32");
    19641973    rc = RTLdrLoad(szPath, &g_ModREM2);
    19651974    if (RT_SUCCESS(rc))
Note: See TracChangeset for help on using the changeset viewer.

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