VirtualBox

Ignore:
Timestamp:
Apr 26, 2012 11:36:57 AM (13 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
77635
Message:

supdrvOSLdrNotifyOpened so we can record the load address in NVRAM if we choose to.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/HostDrivers/Support/darwin/SUPDrv-darwin.cpp

    r40806 r41067  
    6464#include <IOKit/IOUserClient.h>
    6565#include <IOKit/pwr_mgt/RootDomain.h>
     66#include <IOKit/IODeviceTreeSupport.h>
    6667
    6768#ifdef VBOX_WITH_HOST_VMX
     
    760761
    761762
     763void VBOXCALL   supdrvOSLdrNotifyOpened(PSUPDRVDEVEXT pDevExt, PSUPDRVLDRIMAGE pImage)
     764{
     765#if 1
     766    NOREF(pDevExt); NOREF(pImage);
     767#else
     768    /* Put
     769    IORegistryEntry *pEntry = IORegistryEntry::fromPath("/options", gIODTPlane);
     770    if (pEntry)
     771    {
     772        char szVar[80];
     773        RTStrPrintf(szVar, sizeof(szVar), "vboximage-%s", pImage->szName);
     774        char szValue[48];
     775        RTStrPrintf(szValue, sizeof(szValue), "%#llx,%#llx", (uint64_t)(uintptr_t)pImage->pvImage,
     776                    (uint64_t)(uintptr_t)pImage->pvImage + pImage->cbImageBits - 1);
     777        bool fRc = pEntry->setProperty(szVar, szValue); NOREF(fRc);
     778        pEntry->release();
     779        /*SUPR0Printf("fRc=%d '%s'='%s'\n", fRc, szVar, szValue);*/
     780    }
     781    /*else
     782        SUPR0Printf("failed to find /options in gIODTPlane\n");*/
     783#endif
     784}
     785
     786
    762787int  VBOXCALL   supdrvOSLdrOpen(PSUPDRVDEVEXT pDevExt, PSUPDRVLDRIMAGE pImage, const char *pszFilename)
    763788{
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