VirtualBox

Ignore:
Timestamp:
Dec 9, 2009 2:07:44 AM (15 years ago)
Author:
vboxsync
Message:

SUPDRV_USE_NATIVE_LOADER -> VBOX_WITH_NATIVE_R0_LOADER

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

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/HostDrivers/Support/Makefile.kmk

    r24675 r25260  
    8484        $(if $(VBOX_WITH_SUPSVC),VBOX_WITH_SUPSVC) \
    8585        $(if $(VBOX_WITH_MAIN),VBOX_WITH_MAIN,)
     86ifdef VBOX_WITH_NATIVE_R0_LOADER
     87 SUPR3_DEFS        += VBOX_WITH_NATIVE_R0_LOADER
     88endif
    8689SUPR3_INCS         := $(PATH_SUB_CURRENT)
    8790SUPR3_INCS.l4       = $(L4_INCDIR)
     
    102105        $(if $(VBOX_WITH_SUPSVC),VBOX_WITH_SUPSVC,) \
    103106        $(if $(VBOX_WITH_MAIN),VBOX_WITH_MAIN,)
     107ifdef VBOX_WITH_NATIVE_R0_LOADER
     108 SUPR3HardenedStatic_DEFS   += VBOX_WITH_NATIVE_R0_LOADER
     109endif
    104110SUPR3HardenedStatic_INCS     = .
    105111SUPR3HardenedStatic_SOURCES  = \
     
    172178ifdef VBOX_WITH_VMMR0_DISABLE_PREEMPTION
    173179VBoxDrv_DEFS         += VBOX_WITH_VMMR0_DISABLE_PREEMPTION
     180endif
     181ifdef VBOX_WITH_NATIVE_R0_LOADER
     182 VBoxDrv_DEFS        += VBOX_WITH_NATIVE_R0_LOADER
    174183endif
    175184VBoxDrv_SDKS          = W2K3DDK WINPSDKINCS
     
    228237vboxdrv_DEFS         += EXPORT_SYMTAB
    229238endif
     239ifdef VBOX_WITH_NATIVE_R0_LOADER
     240 VBoxDrv_DEFS        += VBOX_WITH_NATIVE_R0_LOADER
     241endif
    230242vboxdrv_INCS         := \
    231243        $(PATH_SUB_CURRENT) \
     
    314326VBoxDrvTiger_INST        = $(INST_VBOXDRV_TIGER)Contents/MacOS/
    315327VBoxDrvTiger_DEFS       := IN_RT_R0 IN_SUP_R0 SUPDRV_WITH_RELEASE_LOGGER VBOX_SVN_REV=$(VBOX_SVN_REV)
     328ifdef VBOX_WITH_NATIVE_R0_LOADER
     329 VBoxDrvTiger_DEFS      += VBOX_WITH_NATIVE_R0_LOADER
     330endif
    316331VBoxDrvTiger_DEFS.debug += DEBUG_DARWIN_GIP
    317332VBoxDrvTiger_INCS        = .
     
    379394VBoxDrv_TEMPLATE      = VBOXR0DRV
    380395VBoxDrv_DEFS          = IN_RT_R0 IN_SUP_R0
     396ifdef VBOX_WITH_NATIVE_R0_LOADER
     397 VBoxDrv_DEFS        += VBOX_WITH_NATIVE_R0_LOADER
     398endif
    381399VBoxDrv_INCS         := $(PATH_SUB_CURRENT)
    382400#VBoxDrv_LDFLAGS       = -s -t -v
     
    395413VBoxDrvLib_NOINST     = 1
    396414VBoxDrvLib_DEFS       = IN_RT_R0 IN_SUP_R0
     415ifdef VBOX_WITH_NATIVE_R0_LOADER
     416 VBoxDrvLib_DEFS     += VBOX_WITH_NATIVE_R0_LOADER
     417endif
    397418VBoxDrvLib_INCS      := \
    398419        . \
     
    411432vboxdrv_TEMPLATE      = VBOXR0DRV
    412433vboxdrv_DEFS          = IN_RT_R0 IN_SUP_R0 SUPDRV_WITH_RELEASE_LOGGER VBOX_SVN_REV=$(VBOX_SVN_REV)
     434ifdef VBOX_WITH_NATIVE_R0_LOADER
     435 vboxdrv_DEFS        += VBOX_WITH_NATIVE_R0_LOADER
     436endif
    413437vboxdrv_INCS         := $(PATH_SUB_CURRENT)
    414438vboxdrv_LIBS          = $(PATH_LIB)/RuntimeR0Drv$(VBOX_SUFF_LIB)
     
    454478endif
    455479vboxdrv_DEFS         += VBOX_SVN_REV=$(VBOX_SVN_REV)
     480ifdef VBOX_WITH_NATIVE_R0_LOADER
     481 vboxdrv_DEFS        += VBOX_WITH_NATIVE_R0_LOADER
     482endif
    456483vboxdrv_DEPS         += $(VBOX_SVN_REV_KMK)
    457484vboxdrv_INCS         := $(PATH_SUB_CURRENT)
  • trunk/src/VBox/HostDrivers/Support/SUPDrv.c

    r25258 r25260  
    12901290            REQ_CHECK_EXPR(SUP_IOCTL_LDR_OPEN, pReq->u.In.cbImageWithTabs > 0);
    12911291            REQ_CHECK_EXPR(SUP_IOCTL_LDR_OPEN, pReq->u.In.cbImageWithTabs < 16*_1M);
    1292 #ifdef SUPDRV_USE_NATIVE_LOADER
     1292#ifdef VBOX_WITH_NATIVE_R0_LOADER
    12931293            REQ_CHECK_EXPR(SUP_IOCTL_LDR_OPEN, pReq->u.In.cbImageBits > 0);
    12941294            REQ_CHECK_EXPR(SUP_IOCTL_LDR_OPEN, pReq->u.In.cbImageBits > 0);
     
    12981298            REQ_CHECK_EXPR(SUP_IOCTL_LDR_OPEN, memchr(pReq->u.In.szName, '\0', sizeof(pReq->u.In.szName)));
    12991299            REQ_CHECK_EXPR(SUP_IOCTL_LDR_OPEN, !supdrvCheckInvalidChar(pReq->u.In.szName, ";:()[]{}/\\|&*%#@!~`\"'"));
    1300 #ifdef SUPDRV_USE_NATIVE_LOADER
     1300#ifdef VBOX_WITH_NATIVE_R0_LOADER
    13011301            REQ_CHECK_EXPR(SUP_IOCTL_LDR_OPEN, memchr(pReq->u.In.szFilename, '\0', sizeof(pReq->u.In.szFilename)));
    13021302#endif
     
    34803480    pImage->pvImageAlloc    = NULL;
    34813481    pImage->cbImageWithTabs = pReq->u.In.cbImageWithTabs;
    3482 #ifdef SUPDRV_USE_NATIVE_LOADER
     3482#ifdef VBOX_WITH_NATIVE_R0_LOADER
    34833483    pImage->cbImageBits     = pReq->u.In.cbImageBits;
    34843484#else
     
    35003500     * on the older method.
    35013501     */
    3502 #ifdef SUPDRV_USE_NATIVE_LOADER
     3502#ifdef VBOX_WITH_NATIVE_R0_LOADER
    35033503    pImage->fNative         = true;
    35043504    rc = supdrvOSLdrOpen(pDevExt, pImage, pReq->u.In.szFilename);
     
    35103510        pImage->pvImageAlloc = RTMemExecAlloc(pImage->cbImageBits + 31);
    35113511        pImage->pvImage     = RT_ALIGN_P(pImage->pvImageAlloc, 32);
    3512 #ifdef SUPDRV_USE_NATIVE_LOADER
     3512#ifdef VBOX_WITH_NATIVE_R0_LOADER
    35133513        pImage->fNative     = false;
    35143514#endif
     
    35683568        }
    35693569
    3570 #ifdef SUPDRV_USE_NATIVE_LOADER
     3570#ifdef VBOX_WITH_NATIVE_R0_LOADER
    35713571        if (pImage->fNative)
    35723572        {
     
    36203620     * Validate input.
    36213621     */
    3622 #ifdef SUPDRV_USE_NATIVE_LOADER
     3622#ifdef VBOX_WITH_NATIVE_R0_LOADER
    36233623    if (   pImage->cbImageWithTabs != pReq->u.In.cbImageWithTabs
    36243624        || pImage->cbImageBits     != pReq->u.In.cbImageBits)
     
    36283628    {
    36293629        RTSemFastMutexRelease(pDevExt->mtxLdr);
    3630 #ifdef SUPDRV_USE_NATIVE_LOADER
     3630#ifdef VBOX_WITH_NATIVE_R0_LOADER
    36313631        Log(("SUP_IOCTL_LDR_LOAD: image size mismatch!! %d(prep) != %d(load) or %d != %d\n",
    36323632             pImage->cbImageWithTabs, pReq->u.In.cbImageWithTabs, pImage->cbImageBits, pReq->u.In.cbImageBits));
     
    37283728        pImage->pfnModuleTerm = pReq->u.In.pfnModuleTerm;
    37293729
    3730 #ifdef SUPDRV_USE_NATIVE_LOADER
     3730#ifdef VBOX_WITH_NATIVE_R0_LOADER
    37313731        if (pImage->fNative)
    37323732            rc = supdrvOSLdrLoad(pDevExt, pImage, pReq->u.In.achImage);
     
    42244224    }
    42254225
    4226 #ifdef SUPDRV_USE_NATIVE_LOADER
     4226#ifdef VBOX_WITH_NATIVE_R0_LOADER
    42274227    /* do native unload if appropriate. */
    42284228    if (pImage->fNative)
  • trunk/src/VBox/HostDrivers/Support/SUPDrvIOC.h

    r25258 r25260  
    3232#define ___SUPDrvIOC_h___
    3333
    34 /*#define SUPDRV_USE_NATIVE_LOADER*/
     34/*#define VBOX_WITH_NATIVE_R0_LOADER*/
    3535
    3636/*
     
    202202 *          next major version used on the trunk will be 0x00120000!
    203203 */
    204 #ifdef SUPDRV_USE_NATIVE_LOADER
     204#ifdef VBOX_WITH_NATIVE_R0_LOADER
    205205#define SUPDRV_IOC_VERSION                              0x00120000
    206206#else
     
    300300            /** Size of the image we'll be loading (includeing tables). */
    301301            uint32_t        cbImageWithTabs;
    302 #ifdef SUPDRV_USE_NATIVE_LOADER
     302#ifdef VBOX_WITH_NATIVE_R0_LOADER
    303303            /** The size of the image bits. (Less or equal to cbImageWithTabs.) */
    304304            uint32_t        cbImageBits;
     
    308308             * to share code with other processes. (Max len is 32 chars!)  */
    309309            char            szName[32];
    310 #ifdef SUPDRV_USE_NATIVE_LOADER
     310#ifdef VBOX_WITH_NATIVE_R0_LOADER
    311311            /** Image file name.
    312312             * This can be used to load the image using a native loader. */
     
    421421            /** Entry point type. */
    422422            SUPLDRLOADEP    eEPType;
    423 #ifdef SUPDRV_USE_NATIVE_LOADER
     423#ifdef VBOX_WITH_NATIVE_R0_LOADER
    424424            /** The size of the image bits (starting at offset 0 and
    425425             * approaching offSymbols). */
  • trunk/src/VBox/HostDrivers/Support/SUPDrvInternal.h

    r25258 r25260  
    428428    /** Usage count. */
    429429    uint32_t volatile               cUsage;
    430 #ifdef SUPDRV_USE_NATIVE_LOADER
     430#ifdef VBOX_WITH_NATIVE_R0_LOADER
    431431    /** Whether it's loaded by the native loader or not. */
    432432    bool                            fNative;
     
    662662int  VBOXCALL   supdrvOSEnableVTx(bool fEnabled);
    663663
    664 #ifdef SUPDRV_USE_NATIVE_LOADER
     664#ifdef VBOX_WITH_NATIVE_R0_LOADER
    665665
    666666/**
     
    713713void VBOXCALL   supdrvOSLdrUnload(PSUPDRVDEVEXT pDevExt, PSUPDRVLDRIMAGE pImage);
    714714
    715 #endif /* SUPDRV_USE_NATIVE_LOADER */
     715#endif /* VBOX_WITH_NATIVE_R0_LOADER */
    716716
    717717/*******************************************************************************
  • trunk/src/VBox/HostDrivers/Support/SUPLib.cpp

    r25258 r25260  
    272272        strcpy(CookieReq.u.In.szMagic, SUPCOOKIE_MAGIC);
    273273        CookieReq.u.In.u32ReqVersion = SUPDRV_IOC_VERSION;
    274 #ifdef SUPDRV_USE_NATIVE_LOADER
     274#ifdef VBOX_WITH_NATIVE_R0_LOADER
    275275        const uint32_t uMinVersion = (SUPDRV_IOC_VERSION & 0xffff0000) == 0x00120000
    276276                                   ?  0x00120000
     
    16591659    AssertPtrReturn(ppvImageBase, VERR_INVALID_PARAMETER);
    16601660    AssertReturn(strlen(pszModule) < RT_SIZEOFMEMB(SUPLDROPEN, u.In.szName), VERR_FILENAME_TOO_LONG);
    1661 #ifdef SUPDRV_USE_NATIVE_LOADER
     1661#ifdef VBOX_WITH_NATIVE_R0_LOADER
    16621662    char szAbsFilename[RT_SIZEOFMEMB(SUPLDROPEN, u.In.szFilename)];
    16631663    rc = RTPathAbs(pszFilename, szAbsFilename, sizeof(szAbsFilename));
     
    17011701        OpenReq.Hdr.rc = VERR_INTERNAL_ERROR;
    17021702        OpenReq.u.In.cbImageWithTabs = cbImageWithTabs;
    1703 #ifdef SUPDRV_USE_NATIVE_LOADER
     1703#ifdef VBOX_WITH_NATIVE_R0_LOADER
    17041704        OpenReq.u.In.cbImageBits = (uint32_t)CalcArgs.cbImage;
    17051705#endif
    17061706        strcpy(OpenReq.u.In.szName, pszModule);
    1707 #ifdef SUPDRV_USE_NATIVE_LOADER
     1707#ifdef VBOX_WITH_NATIVE_R0_LOADER
    17081708        strcpy(OpenReq.u.In.szFilename, pszFilename);
    17091709#endif
     
    18161816                            pLoadReq->u.In.cbStrTab                   = (uint32_t)CalcArgs.cbStrings;
    18171817                            AssertRelease(pLoadReq->u.In.cbStrTab == CalcArgs.cbStrings);
    1818 #ifdef SUPDRV_USE_NATIVE_LOADER
     1818#ifdef VBOX_WITH_NATIVE_R0_LOADER
    18191819                            pLoadReq->u.In.cbImageBits                = (uint32_t)CalcArgs.cbImage;
    18201820#endif
  • trunk/src/VBox/HostDrivers/Support/SUPLibInternal.h

    r25258 r25260  
    3131#ifndef ___SUPLibInternal_h___
    3232#define ___SUPLibInternal_h___
    33 
    34 /*#define SUPDRV_USE_NATIVE_LOADER*/
    3533
    3634#include <VBox/cdefs.h>
  • trunk/src/VBox/HostDrivers/Support/darwin/SUPDrv-darwin.cpp

    r25258 r25260  
    759759}
    760760
    761 #ifdef SUPDRV_USE_NATIVE_LOADER
     761#ifdef VBOX_WITH_NATIVE_R0_LOADER
    762762
    763763int  VBOXCALL   supdrvOSLdrOpen(PSUPDRVDEVEXT pDevExt, PSUPDRVLDRIMAGE pImage, const char *pszFilename)
     
    787787}
    788788
    789 #endif /* SUPDRV_USE_NATIVE_LOADER */
     789#endif /* VBOX_WITH_NATIVE_R0_LOADER */
    790790
    791791/**
  • trunk/src/VBox/HostDrivers/Support/freebsd/SUPDrv-freebsd.c

    r25258 r25260  
    600600}
    601601
    602 #ifdef SUPDRV_USE_NATIVE_LOADER
     602#ifdef VBOX_WITH_NATIVE_R0_LOADER
    603603
    604604int  VBOXCALL   supdrvOSLdrOpen(PSUPDRVDEVEXT pDevExt, PSUPDRVLDRIMAGE pImage, const char *pszFilename)
     
    628628}
    629629
    630 #endif /* SUPDRV_USE_NATIVE_LOADER */
     630#endif /* VBOX_WITH_NATIVE_R0_LOADER */
    631631
    632632SUPR0DECL(int) SUPR0Printf(const char *pszFormat, ...)
  • trunk/src/VBox/HostDrivers/Support/linux/SUPDrv-linux.c

    r25258 r25260  
    10061006}
    10071007
    1008 #ifdef SUPDRV_USE_NATIVE_LOADER
     1008#ifdef VBOX_WITH_NATIVE_R0_LOADER
    10091009
    10101010int  VBOXCALL   supdrvOSLdrOpen(PSUPDRVDEVEXT pDevExt, PSUPDRVLDRIMAGE pImage, const char *pszFilename)
     
    10341034}
    10351035
    1036 #endif /* SUPDRV_USE_NATIVE_LOADER */
     1036#endif /* VBOX_WITH_NATIVE_R0_LOADER */
    10371037
    10381038/**
  • trunk/src/VBox/HostDrivers/Support/os2/SUPDrv-os2.cpp

    r25258 r25260  
    382382}
    383383
    384 #ifdef SUPDRV_USE_NATIVE_LOADER
     384#ifdef VBOX_WITH_NATIVE_R0_LOADER
    385385
    386386int  VBOXCALL   supdrvOSLdrOpen(PSUPDRVDEVEXT pDevExt, PSUPDRVLDRIMAGE pImage, const char *pszFilename)
     
    410410}
    411411
    412 #endif /* SUPDRV_USE_NATIVE_LOADER */
     412#endif /* VBOX_WITH_NATIVE_R0_LOADER */
    413413
    414414/**
  • trunk/src/VBox/HostDrivers/Support/solaris/SUPDrv-solaris.c

    r25258 r25260  
    897897}
    898898
    899 #ifdef SUPDRV_USE_NATIVE_LOADER
     899#ifdef VBOX_WITH_NATIVE_R0_LOADER
    900900
    901901int  VBOXCALL   supdrvOSLdrOpen(PSUPDRVDEVEXT pDevExt, PSUPDRVLDRIMAGE pImage, const char *pszFilename)
     
    925925}
    926926
    927 #endif /* SUPDRV_USE_NATIVE_LOADER */
     927#endif /* VBOX_WITH_NATIVE_R0_LOADER */
    928928
    929929RTDECL(int) SUPR0Printf(const char *pszFormat, ...)
  • trunk/src/VBox/HostDrivers/Support/win/SUPDrv-win.cpp

    r25258 r25260  
    594594}
    595595
    596 #ifdef SUPDRV_USE_NATIVE_LOADER
     596#ifdef VBOX_WITH_NATIVE_R0_LOADER
    597597
    598598int  VBOXCALL   supdrvOSLdrOpen(PSUPDRVDEVEXT pDevExt, PSUPDRVLDRIMAGE pImage, const char *pszFilename)
     
    622622}
    623623
    624 #endif /* SUPDRV_USE_NATIVE_LOADER */
     624#endif /* VBOX_WITH_NATIVE_R0_LOADER */
    625625
    626626/**
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