VirtualBox

Changeset 41067 in vbox for trunk/src/VBox/HostDrivers


Ignore:
Timestamp:
Apr 26, 2012 11:36:57 AM (13 years ago)
Author:
vboxsync
Message:

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

Location:
trunk/src/VBox/HostDrivers/Support
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/HostDrivers/Support/SUPDrv.c

    r40981 r41067  
    39533953    pReq->u.Out.fNeedsLoading = true;
    39543954    pReq->u.Out.fNativeLoader = pImage->fNative;
     3955    supdrvOSLdrNotifyOpened(pDevExt, pImage);
     3956
    39553957    supdrvLdrUnlock(pDevExt);
    3956 
    3957 #if defined(RT_OS_WINDOWS) && defined(DEBUG)
    3958     SUPR0Printf("VBoxDrv: windbg> .reload /f %s=%#p\n", pImage->szName, pImage->pvImage);
    3959 #endif
    39603958    return VINF_SUCCESS;
    39613959}
  • trunk/src/VBox/HostDrivers/Support/SUPDrvInternal.h

    r40981 r41067  
    602602
    603603/**
     604 * Notification call indicating that a image is being opened for the first time.
     605 *
     606 * Can be used to log the load address of the image.
     607 *
     608 * @param   pDevExt             The device globals.
     609 * @param   pImage              The image handle.
     610 */
     611void VBOXCALL   supdrvOSLdrNotifyOpened(PSUPDRVDEVEXT pDevExt, PSUPDRVLDRIMAGE pImage);
     612
     613/**
    604614 * Validates an entry point address.
    605615 *
  • 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{
  • trunk/src/VBox/HostDrivers/Support/freebsd/SUPDrv-freebsd.c

    r39522 r41067  
    498498
    499499
     500void VBOXCALL   supdrvOSLdrNotifyOpened(PSUPDRVDEVEXT pDevExt, PSUPDRVLDRIMAGE pImage)
     501{
     502    NOREF(pDevExt); NOREF(pImage);
     503}
     504
     505
    500506int  VBOXCALL   supdrvOSLdrValidatePointer(PSUPDRVDEVEXT pDevExt, PSUPDRVLDRIMAGE pImage, void *pv, const uint8_t *pbImageBits)
    501507{
  • trunk/src/VBox/HostDrivers/Support/linux/SUPDrv-linux.c

    r40894 r41067  
    734734
    735735
     736void VBOXCALL   supdrvOSLdrNotifyOpened(PSUPDRVDEVEXT pDevExt, PSUPDRVLDRIMAGE pImage)
     737{
     738    NOREF(pDevExt); NOREF(pImage);
     739}
     740
     741
    736742int  VBOXCALL   supdrvOSLdrValidatePointer(PSUPDRVDEVEXT pDevExt, PSUPDRVLDRIMAGE pImage, void *pv, const uint8_t *pbImageBits)
    737743{
  • trunk/src/VBox/HostDrivers/Support/os2/SUPDrv-os2.cpp

    r40806 r41067  
    386386
    387387
     388void VBOXCALL   supdrvOSLdrNotifyOpened(PSUPDRVDEVEXT pDevExt, PSUPDRVLDRIMAGE pImage)
     389{
     390    NOREF(pDevExt); NOREF(pImage);
     391}
     392
     393
    388394int  VBOXCALL   supdrvOSLdrValidatePointer(PSUPDRVDEVEXT pDevExt, PSUPDRVLDRIMAGE pImage, void *pv, const uint8_t *pbImageBits)
    389395{
  • trunk/src/VBox/HostDrivers/Support/solaris/SUPDrv-solaris.c

    r40806 r41067  
    995995
    996996
     997void VBOXCALL   supdrvOSLdrNotifyOpened(PSUPDRVDEVEXT pDevExt, PSUPDRVLDRIMAGE pImage)
     998{
     999    NOREF(pDevExt); NOREF(pImage);
     1000}
     1001
     1002
    9971003int  VBOXCALL   supdrvOSLdrValidatePointer(PSUPDRVDEVEXT pDevExt, PSUPDRVLDRIMAGE pImage, void *pv, const uint8_t *pbImageBits)
    9981004{
     
    11391145
    11401146
     1147void VBOXCALL   supdrvOSLdrNotifyOpened(PSUPDRVDEVEXT pDevExt, PSUPDRVLDRIMAGE pImage)
     1148{
     1149    NOREF(pDevExt); NOREF(pImage);
     1150}
     1151
     1152
    11411153int  VBOXCALL   supdrvOSLdrValidatePointer(PSUPDRVDEVEXT pDevExt, PSUPDRVLDRIMAGE pImage, void *pv, const uint8_t *pbImageBits)
    11421154{
  • trunk/src/VBox/HostDrivers/Support/win/SUPDrv-win.cpp

    r38323 r41067  
    250250
    251251    /*
    252      * Don't create a session for kernel clients, they'll close the handle 
    253      * immediately and work with the file object via 
    254      * VBoxDrvNtInternalDeviceControl.  The first request will there be one 
    255      * to create a session. 
     252     * Don't create a session for kernel clients, they'll close the handle
     253     * immediately and work with the file object via
     254     * VBoxDrvNtInternalDeviceControl.  The first request will there be one
     255     * to create a session.
    256256     */
    257257    NTSTATUS rcNt;
     
    503503            {
    504504                /*
    505                  * Call the generic code. 
    506                  * 
    507                  * Note! Connect and disconnect requires some extra attention 
     505                 * Call the generic code.
     506                 *
     507                 * Note! Connect and disconnect requires some extra attention
    508508                 *       in order to get the session handling right.
    509509                 */
     
    780780
    781781
     782void VBOXCALL   supdrvOSLdrNotifyOpened(PSUPDRVDEVEXT pDevExt, PSUPDRVLDRIMAGE pImage)
     783{
     784    NOREF(pDevExt); NOREF(pImage);
     785}
     786
     787
    782788int  VBOXCALL   supdrvOSLdrValidatePointer(PSUPDRVDEVEXT pDevExt, PSUPDRVLDRIMAGE pImage, void *pv, const uint8_t *pbImageBits)
    783789{
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