Changeset 25260 in vbox for trunk/src/VBox/HostDrivers/Support
- Timestamp:
- Dec 9, 2009 2:07:44 AM (15 years ago)
- Location:
- trunk/src/VBox/HostDrivers/Support
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostDrivers/Support/Makefile.kmk
r24675 r25260 84 84 $(if $(VBOX_WITH_SUPSVC),VBOX_WITH_SUPSVC) \ 85 85 $(if $(VBOX_WITH_MAIN),VBOX_WITH_MAIN,) 86 ifdef VBOX_WITH_NATIVE_R0_LOADER 87 SUPR3_DEFS += VBOX_WITH_NATIVE_R0_LOADER 88 endif 86 89 SUPR3_INCS := $(PATH_SUB_CURRENT) 87 90 SUPR3_INCS.l4 = $(L4_INCDIR) … … 102 105 $(if $(VBOX_WITH_SUPSVC),VBOX_WITH_SUPSVC,) \ 103 106 $(if $(VBOX_WITH_MAIN),VBOX_WITH_MAIN,) 107 ifdef VBOX_WITH_NATIVE_R0_LOADER 108 SUPR3HardenedStatic_DEFS += VBOX_WITH_NATIVE_R0_LOADER 109 endif 104 110 SUPR3HardenedStatic_INCS = . 105 111 SUPR3HardenedStatic_SOURCES = \ … … 172 178 ifdef VBOX_WITH_VMMR0_DISABLE_PREEMPTION 173 179 VBoxDrv_DEFS += VBOX_WITH_VMMR0_DISABLE_PREEMPTION 180 endif 181 ifdef VBOX_WITH_NATIVE_R0_LOADER 182 VBoxDrv_DEFS += VBOX_WITH_NATIVE_R0_LOADER 174 183 endif 175 184 VBoxDrv_SDKS = W2K3DDK WINPSDKINCS … … 228 237 vboxdrv_DEFS += EXPORT_SYMTAB 229 238 endif 239 ifdef VBOX_WITH_NATIVE_R0_LOADER 240 VBoxDrv_DEFS += VBOX_WITH_NATIVE_R0_LOADER 241 endif 230 242 vboxdrv_INCS := \ 231 243 $(PATH_SUB_CURRENT) \ … … 314 326 VBoxDrvTiger_INST = $(INST_VBOXDRV_TIGER)Contents/MacOS/ 315 327 VBoxDrvTiger_DEFS := IN_RT_R0 IN_SUP_R0 SUPDRV_WITH_RELEASE_LOGGER VBOX_SVN_REV=$(VBOX_SVN_REV) 328 ifdef VBOX_WITH_NATIVE_R0_LOADER 329 VBoxDrvTiger_DEFS += VBOX_WITH_NATIVE_R0_LOADER 330 endif 316 331 VBoxDrvTiger_DEFS.debug += DEBUG_DARWIN_GIP 317 332 VBoxDrvTiger_INCS = . … … 379 394 VBoxDrv_TEMPLATE = VBOXR0DRV 380 395 VBoxDrv_DEFS = IN_RT_R0 IN_SUP_R0 396 ifdef VBOX_WITH_NATIVE_R0_LOADER 397 VBoxDrv_DEFS += VBOX_WITH_NATIVE_R0_LOADER 398 endif 381 399 VBoxDrv_INCS := $(PATH_SUB_CURRENT) 382 400 #VBoxDrv_LDFLAGS = -s -t -v … … 395 413 VBoxDrvLib_NOINST = 1 396 414 VBoxDrvLib_DEFS = IN_RT_R0 IN_SUP_R0 415 ifdef VBOX_WITH_NATIVE_R0_LOADER 416 VBoxDrvLib_DEFS += VBOX_WITH_NATIVE_R0_LOADER 417 endif 397 418 VBoxDrvLib_INCS := \ 398 419 . \ … … 411 432 vboxdrv_TEMPLATE = VBOXR0DRV 412 433 vboxdrv_DEFS = IN_RT_R0 IN_SUP_R0 SUPDRV_WITH_RELEASE_LOGGER VBOX_SVN_REV=$(VBOX_SVN_REV) 434 ifdef VBOX_WITH_NATIVE_R0_LOADER 435 vboxdrv_DEFS += VBOX_WITH_NATIVE_R0_LOADER 436 endif 413 437 vboxdrv_INCS := $(PATH_SUB_CURRENT) 414 438 vboxdrv_LIBS = $(PATH_LIB)/RuntimeR0Drv$(VBOX_SUFF_LIB) … … 454 478 endif 455 479 vboxdrv_DEFS += VBOX_SVN_REV=$(VBOX_SVN_REV) 480 ifdef VBOX_WITH_NATIVE_R0_LOADER 481 vboxdrv_DEFS += VBOX_WITH_NATIVE_R0_LOADER 482 endif 456 483 vboxdrv_DEPS += $(VBOX_SVN_REV_KMK) 457 484 vboxdrv_INCS := $(PATH_SUB_CURRENT) -
trunk/src/VBox/HostDrivers/Support/SUPDrv.c
r25258 r25260 1290 1290 REQ_CHECK_EXPR(SUP_IOCTL_LDR_OPEN, pReq->u.In.cbImageWithTabs > 0); 1291 1291 REQ_CHECK_EXPR(SUP_IOCTL_LDR_OPEN, pReq->u.In.cbImageWithTabs < 16*_1M); 1292 #ifdef SUPDRV_USE_NATIVE_LOADER1292 #ifdef VBOX_WITH_NATIVE_R0_LOADER 1293 1293 REQ_CHECK_EXPR(SUP_IOCTL_LDR_OPEN, pReq->u.In.cbImageBits > 0); 1294 1294 REQ_CHECK_EXPR(SUP_IOCTL_LDR_OPEN, pReq->u.In.cbImageBits > 0); … … 1298 1298 REQ_CHECK_EXPR(SUP_IOCTL_LDR_OPEN, memchr(pReq->u.In.szName, '\0', sizeof(pReq->u.In.szName))); 1299 1299 REQ_CHECK_EXPR(SUP_IOCTL_LDR_OPEN, !supdrvCheckInvalidChar(pReq->u.In.szName, ";:()[]{}/\\|&*%#@!~`\"'")); 1300 #ifdef SUPDRV_USE_NATIVE_LOADER1300 #ifdef VBOX_WITH_NATIVE_R0_LOADER 1301 1301 REQ_CHECK_EXPR(SUP_IOCTL_LDR_OPEN, memchr(pReq->u.In.szFilename, '\0', sizeof(pReq->u.In.szFilename))); 1302 1302 #endif … … 3480 3480 pImage->pvImageAlloc = NULL; 3481 3481 pImage->cbImageWithTabs = pReq->u.In.cbImageWithTabs; 3482 #ifdef SUPDRV_USE_NATIVE_LOADER3482 #ifdef VBOX_WITH_NATIVE_R0_LOADER 3483 3483 pImage->cbImageBits = pReq->u.In.cbImageBits; 3484 3484 #else … … 3500 3500 * on the older method. 3501 3501 */ 3502 #ifdef SUPDRV_USE_NATIVE_LOADER3502 #ifdef VBOX_WITH_NATIVE_R0_LOADER 3503 3503 pImage->fNative = true; 3504 3504 rc = supdrvOSLdrOpen(pDevExt, pImage, pReq->u.In.szFilename); … … 3510 3510 pImage->pvImageAlloc = RTMemExecAlloc(pImage->cbImageBits + 31); 3511 3511 pImage->pvImage = RT_ALIGN_P(pImage->pvImageAlloc, 32); 3512 #ifdef SUPDRV_USE_NATIVE_LOADER3512 #ifdef VBOX_WITH_NATIVE_R0_LOADER 3513 3513 pImage->fNative = false; 3514 3514 #endif … … 3568 3568 } 3569 3569 3570 #ifdef SUPDRV_USE_NATIVE_LOADER3570 #ifdef VBOX_WITH_NATIVE_R0_LOADER 3571 3571 if (pImage->fNative) 3572 3572 { … … 3620 3620 * Validate input. 3621 3621 */ 3622 #ifdef SUPDRV_USE_NATIVE_LOADER3622 #ifdef VBOX_WITH_NATIVE_R0_LOADER 3623 3623 if ( pImage->cbImageWithTabs != pReq->u.In.cbImageWithTabs 3624 3624 || pImage->cbImageBits != pReq->u.In.cbImageBits) … … 3628 3628 { 3629 3629 RTSemFastMutexRelease(pDevExt->mtxLdr); 3630 #ifdef SUPDRV_USE_NATIVE_LOADER3630 #ifdef VBOX_WITH_NATIVE_R0_LOADER 3631 3631 Log(("SUP_IOCTL_LDR_LOAD: image size mismatch!! %d(prep) != %d(load) or %d != %d\n", 3632 3632 pImage->cbImageWithTabs, pReq->u.In.cbImageWithTabs, pImage->cbImageBits, pReq->u.In.cbImageBits)); … … 3728 3728 pImage->pfnModuleTerm = pReq->u.In.pfnModuleTerm; 3729 3729 3730 #ifdef SUPDRV_USE_NATIVE_LOADER3730 #ifdef VBOX_WITH_NATIVE_R0_LOADER 3731 3731 if (pImage->fNative) 3732 3732 rc = supdrvOSLdrLoad(pDevExt, pImage, pReq->u.In.achImage); … … 4224 4224 } 4225 4225 4226 #ifdef SUPDRV_USE_NATIVE_LOADER4226 #ifdef VBOX_WITH_NATIVE_R0_LOADER 4227 4227 /* do native unload if appropriate. */ 4228 4228 if (pImage->fNative) -
trunk/src/VBox/HostDrivers/Support/SUPDrvIOC.h
r25258 r25260 32 32 #define ___SUPDrvIOC_h___ 33 33 34 /*#define SUPDRV_USE_NATIVE_LOADER*/34 /*#define VBOX_WITH_NATIVE_R0_LOADER*/ 35 35 36 36 /* … … 202 202 * next major version used on the trunk will be 0x00120000! 203 203 */ 204 #ifdef SUPDRV_USE_NATIVE_LOADER204 #ifdef VBOX_WITH_NATIVE_R0_LOADER 205 205 #define SUPDRV_IOC_VERSION 0x00120000 206 206 #else … … 300 300 /** Size of the image we'll be loading (includeing tables). */ 301 301 uint32_t cbImageWithTabs; 302 #ifdef SUPDRV_USE_NATIVE_LOADER302 #ifdef VBOX_WITH_NATIVE_R0_LOADER 303 303 /** The size of the image bits. (Less or equal to cbImageWithTabs.) */ 304 304 uint32_t cbImageBits; … … 308 308 * to share code with other processes. (Max len is 32 chars!) */ 309 309 char szName[32]; 310 #ifdef SUPDRV_USE_NATIVE_LOADER310 #ifdef VBOX_WITH_NATIVE_R0_LOADER 311 311 /** Image file name. 312 312 * This can be used to load the image using a native loader. */ … … 421 421 /** Entry point type. */ 422 422 SUPLDRLOADEP eEPType; 423 #ifdef SUPDRV_USE_NATIVE_LOADER423 #ifdef VBOX_WITH_NATIVE_R0_LOADER 424 424 /** The size of the image bits (starting at offset 0 and 425 425 * approaching offSymbols). */ -
trunk/src/VBox/HostDrivers/Support/SUPDrvInternal.h
r25258 r25260 428 428 /** Usage count. */ 429 429 uint32_t volatile cUsage; 430 #ifdef SUPDRV_USE_NATIVE_LOADER430 #ifdef VBOX_WITH_NATIVE_R0_LOADER 431 431 /** Whether it's loaded by the native loader or not. */ 432 432 bool fNative; … … 662 662 int VBOXCALL supdrvOSEnableVTx(bool fEnabled); 663 663 664 #ifdef SUPDRV_USE_NATIVE_LOADER664 #ifdef VBOX_WITH_NATIVE_R0_LOADER 665 665 666 666 /** … … 713 713 void VBOXCALL supdrvOSLdrUnload(PSUPDRVDEVEXT pDevExt, PSUPDRVLDRIMAGE pImage); 714 714 715 #endif /* SUPDRV_USE_NATIVE_LOADER */715 #endif /* VBOX_WITH_NATIVE_R0_LOADER */ 716 716 717 717 /******************************************************************************* -
trunk/src/VBox/HostDrivers/Support/SUPLib.cpp
r25258 r25260 272 272 strcpy(CookieReq.u.In.szMagic, SUPCOOKIE_MAGIC); 273 273 CookieReq.u.In.u32ReqVersion = SUPDRV_IOC_VERSION; 274 #ifdef SUPDRV_USE_NATIVE_LOADER274 #ifdef VBOX_WITH_NATIVE_R0_LOADER 275 275 const uint32_t uMinVersion = (SUPDRV_IOC_VERSION & 0xffff0000) == 0x00120000 276 276 ? 0x00120000 … … 1659 1659 AssertPtrReturn(ppvImageBase, VERR_INVALID_PARAMETER); 1660 1660 AssertReturn(strlen(pszModule) < RT_SIZEOFMEMB(SUPLDROPEN, u.In.szName), VERR_FILENAME_TOO_LONG); 1661 #ifdef SUPDRV_USE_NATIVE_LOADER1661 #ifdef VBOX_WITH_NATIVE_R0_LOADER 1662 1662 char szAbsFilename[RT_SIZEOFMEMB(SUPLDROPEN, u.In.szFilename)]; 1663 1663 rc = RTPathAbs(pszFilename, szAbsFilename, sizeof(szAbsFilename)); … … 1701 1701 OpenReq.Hdr.rc = VERR_INTERNAL_ERROR; 1702 1702 OpenReq.u.In.cbImageWithTabs = cbImageWithTabs; 1703 #ifdef SUPDRV_USE_NATIVE_LOADER1703 #ifdef VBOX_WITH_NATIVE_R0_LOADER 1704 1704 OpenReq.u.In.cbImageBits = (uint32_t)CalcArgs.cbImage; 1705 1705 #endif 1706 1706 strcpy(OpenReq.u.In.szName, pszModule); 1707 #ifdef SUPDRV_USE_NATIVE_LOADER1707 #ifdef VBOX_WITH_NATIVE_R0_LOADER 1708 1708 strcpy(OpenReq.u.In.szFilename, pszFilename); 1709 1709 #endif … … 1816 1816 pLoadReq->u.In.cbStrTab = (uint32_t)CalcArgs.cbStrings; 1817 1817 AssertRelease(pLoadReq->u.In.cbStrTab == CalcArgs.cbStrings); 1818 #ifdef SUPDRV_USE_NATIVE_LOADER1818 #ifdef VBOX_WITH_NATIVE_R0_LOADER 1819 1819 pLoadReq->u.In.cbImageBits = (uint32_t)CalcArgs.cbImage; 1820 1820 #endif -
trunk/src/VBox/HostDrivers/Support/SUPLibInternal.h
r25258 r25260 31 31 #ifndef ___SUPLibInternal_h___ 32 32 #define ___SUPLibInternal_h___ 33 34 /*#define SUPDRV_USE_NATIVE_LOADER*/35 33 36 34 #include <VBox/cdefs.h> -
trunk/src/VBox/HostDrivers/Support/darwin/SUPDrv-darwin.cpp
r25258 r25260 759 759 } 760 760 761 #ifdef SUPDRV_USE_NATIVE_LOADER761 #ifdef VBOX_WITH_NATIVE_R0_LOADER 762 762 763 763 int VBOXCALL supdrvOSLdrOpen(PSUPDRVDEVEXT pDevExt, PSUPDRVLDRIMAGE pImage, const char *pszFilename) … … 787 787 } 788 788 789 #endif /* SUPDRV_USE_NATIVE_LOADER */789 #endif /* VBOX_WITH_NATIVE_R0_LOADER */ 790 790 791 791 /** -
trunk/src/VBox/HostDrivers/Support/freebsd/SUPDrv-freebsd.c
r25258 r25260 600 600 } 601 601 602 #ifdef SUPDRV_USE_NATIVE_LOADER602 #ifdef VBOX_WITH_NATIVE_R0_LOADER 603 603 604 604 int VBOXCALL supdrvOSLdrOpen(PSUPDRVDEVEXT pDevExt, PSUPDRVLDRIMAGE pImage, const char *pszFilename) … … 628 628 } 629 629 630 #endif /* SUPDRV_USE_NATIVE_LOADER */630 #endif /* VBOX_WITH_NATIVE_R0_LOADER */ 631 631 632 632 SUPR0DECL(int) SUPR0Printf(const char *pszFormat, ...) -
trunk/src/VBox/HostDrivers/Support/linux/SUPDrv-linux.c
r25258 r25260 1006 1006 } 1007 1007 1008 #ifdef SUPDRV_USE_NATIVE_LOADER1008 #ifdef VBOX_WITH_NATIVE_R0_LOADER 1009 1009 1010 1010 int VBOXCALL supdrvOSLdrOpen(PSUPDRVDEVEXT pDevExt, PSUPDRVLDRIMAGE pImage, const char *pszFilename) … … 1034 1034 } 1035 1035 1036 #endif /* SUPDRV_USE_NATIVE_LOADER */1036 #endif /* VBOX_WITH_NATIVE_R0_LOADER */ 1037 1037 1038 1038 /** -
trunk/src/VBox/HostDrivers/Support/os2/SUPDrv-os2.cpp
r25258 r25260 382 382 } 383 383 384 #ifdef SUPDRV_USE_NATIVE_LOADER384 #ifdef VBOX_WITH_NATIVE_R0_LOADER 385 385 386 386 int VBOXCALL supdrvOSLdrOpen(PSUPDRVDEVEXT pDevExt, PSUPDRVLDRIMAGE pImage, const char *pszFilename) … … 410 410 } 411 411 412 #endif /* SUPDRV_USE_NATIVE_LOADER */412 #endif /* VBOX_WITH_NATIVE_R0_LOADER */ 413 413 414 414 /** -
trunk/src/VBox/HostDrivers/Support/solaris/SUPDrv-solaris.c
r25258 r25260 897 897 } 898 898 899 #ifdef SUPDRV_USE_NATIVE_LOADER899 #ifdef VBOX_WITH_NATIVE_R0_LOADER 900 900 901 901 int VBOXCALL supdrvOSLdrOpen(PSUPDRVDEVEXT pDevExt, PSUPDRVLDRIMAGE pImage, const char *pszFilename) … … 925 925 } 926 926 927 #endif /* SUPDRV_USE_NATIVE_LOADER */927 #endif /* VBOX_WITH_NATIVE_R0_LOADER */ 928 928 929 929 RTDECL(int) SUPR0Printf(const char *pszFormat, ...) -
trunk/src/VBox/HostDrivers/Support/win/SUPDrv-win.cpp
r25258 r25260 594 594 } 595 595 596 #ifdef SUPDRV_USE_NATIVE_LOADER596 #ifdef VBOX_WITH_NATIVE_R0_LOADER 597 597 598 598 int VBOXCALL supdrvOSLdrOpen(PSUPDRVDEVEXT pDevExt, PSUPDRVLDRIMAGE pImage, const char *pszFilename) … … 622 622 } 623 623 624 #endif /* SUPDRV_USE_NATIVE_LOADER */624 #endif /* VBOX_WITH_NATIVE_R0_LOADER */ 625 625 626 626 /**
Note:
See TracChangeset
for help on using the changeset viewer.