Changeset 10680 in vbox for trunk/src/VBox/HostDrivers
- Timestamp:
- Jul 15, 2008 7:46:44 PM (16 years ago)
- Location:
- trunk/src/VBox/HostDrivers/Support
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostDrivers/Support/SUPDrv.c
r10662 r10680 192 192 { "RTSpinlockAcquireNoInts", (void *)RTSpinlockAcquireNoInts }, 193 193 { "RTSpinlockReleaseNoInts", (void *)RTSpinlockReleaseNoInts }, 194 { "RTTimeNanoTS", (void *)RTTimeNanoTS }, 195 { "RTTimeMillieTS", (void *)RTTimeMilliTS }, 196 { "RTTimeSystemNanoTS", (void *)RTTimeSystemNanoTS }, 197 { "RTTimeSystemMillieTS", (void *)RTTimeSystemMilliTS }, 194 198 { "RTThreadNativeSelf", (void *)RTThreadNativeSelf }, 195 199 { "RTThreadSleep", (void *)RTThreadSleep }, … … 888 892 pReq->u.Out.u32SessionCookie = 0xffffffff; 889 893 pReq->u.Out.u32SessionVersion = 0xffffffff; 890 pReq->u.Out.u32DriverVersion = SUPDRV IOC_VERSION;894 pReq->u.Out.u32DriverVersion = SUPDRV_IOC_VERSION; 891 895 pReq->u.Out.pSession = NULL; 892 896 pReq->u.Out.cFunctions = 0; … … 900 904 * The current logic is very simple, match the major interface version. 901 905 */ 902 if ( pReq->u.In.u32MinVersion > SUPDRV IOC_VERSION903 || (pReq->u.In.u32MinVersion & 0xffff0000) != (SUPDRV IOC_VERSION & 0xffff0000))906 if ( pReq->u.In.u32MinVersion > SUPDRV_IOC_VERSION 907 || (pReq->u.In.u32MinVersion & 0xffff0000) != (SUPDRV_IOC_VERSION & 0xffff0000)) 904 908 { 905 909 OSDBGPRINT(("SUP_IOCTL_COOKIE: Version mismatch. Requested: %#x Min: %#x Current: %#x\n", 906 pReq->u.In.u32ReqVersion, pReq->u.In.u32MinVersion, SUPDRV IOC_VERSION));910 pReq->u.In.u32ReqVersion, pReq->u.In.u32MinVersion, SUPDRV_IOC_VERSION)); 907 911 pReq->u.Out.u32Cookie = 0xffffffff; 908 912 pReq->u.Out.u32SessionCookie = 0xffffffff; 909 913 pReq->u.Out.u32SessionVersion = 0xffffffff; 910 pReq->u.Out.u32DriverVersion = SUPDRV IOC_VERSION;914 pReq->u.Out.u32DriverVersion = SUPDRV_IOC_VERSION; 911 915 pReq->u.Out.pSession = NULL; 912 916 pReq->u.Out.cFunctions = 0; … … 917 921 /* 918 922 * Fill in return data and be gone. 919 * N.B. The first one to change SUPDRV IOC_VERSION shall makes sure that923 * N.B. The first one to change SUPDRV_IOC_VERSION shall makes sure that 920 924 * u32SessionVersion <= u32ReqVersion! 921 925 */ … … 923 927 pReq->u.Out.u32Cookie = pDevExt->u32Cookie; 924 928 pReq->u.Out.u32SessionCookie = pSession->u32Cookie; 925 pReq->u.Out.u32SessionVersion = SUPDRV IOC_VERSION;926 pReq->u.Out.u32DriverVersion = SUPDRV IOC_VERSION;929 pReq->u.Out.u32SessionVersion = SUPDRV_IOC_VERSION; 930 pReq->u.Out.u32DriverVersion = SUPDRV_IOC_VERSION; 927 931 pReq->u.Out.pSession = pSession; 928 932 pReq->u.Out.cFunctions = sizeof(g_aFunctions) / sizeof(g_aFunctions[0]); -
trunk/src/VBox/HostDrivers/Support/SUPDrvIOC.h
r10662 r10680 182 182 * The upper 16-bit is the major version, the the lower the minor version. 183 183 * When incompatible changes are made, the upper major number has to be changed. */ 184 #define SUPDRV IOC_VERSION 0x00070004184 #define SUPDRV_IOC_VERSION 0x00070005 185 185 186 186 /** SUP_IOCTL_COOKIE. */ -
trunk/src/VBox/HostDrivers/Support/SUPLib.cpp
r10662 r10680 211 211 CookieReq.Hdr.rc = VERR_INTERNAL_ERROR; 212 212 strcpy(CookieReq.u.In.szMagic, SUPCOOKIE_MAGIC); 213 CookieReq.u.In.u32ReqVersion = SUPDRV IOC_VERSION;214 const uint32_t MinVersion = (SUPDRV IOC_VERSION & 0xffff0000) == 0x00070000215 ? 0x0007000 4/* need new exports */216 : SUPDRV IOC_VERSION & 0xffff0000;213 CookieReq.u.In.u32ReqVersion = SUPDRV_IOC_VERSION; 214 const uint32_t MinVersion = (SUPDRV_IOC_VERSION & 0xffff0000) == 0x00070000 215 ? 0x00070005 /* need new exports */ 216 : SUPDRV_IOC_VERSION & 0xffff0000; 217 217 CookieReq.u.In.u32MinVersion = MinVersion; 218 218 rc = suplibOsIOCtl(SUP_IOCTL_COOKIE, &CookieReq, SUP_IOCTL_COOKIE_SIZE); … … 220 220 && RT_SUCCESS(CookieReq.Hdr.rc)) 221 221 { 222 if ( (CookieReq.u.Out.u32SessionVersion & 0xffff0000) == (SUPDRV IOC_VERSION & 0xffff0000)222 if ( (CookieReq.u.Out.u32SessionVersion & 0xffff0000) == (SUPDRV_IOC_VERSION & 0xffff0000) 223 223 && CookieReq.u.Out.u32SessionVersion >= MinVersion) 224 224 { … … 287 287 { 288 288 LogRel(("Support driver version mismatch: SessionVersion=%#x DriverVersion=%#x ClientVersion=%#x MinVersion=%#x\n", 289 CookieReq.u.Out.u32SessionVersion, CookieReq.u.Out.u32DriverVersion, SUPDRV IOC_VERSION, MinVersion));289 CookieReq.u.Out.u32SessionVersion, CookieReq.u.Out.u32DriverVersion, SUPDRV_IOC_VERSION, MinVersion)); 290 290 rc = VERR_VM_DRIVER_VERSION_MISMATCH; 291 291 } … … 297 297 rc = CookieReq.Hdr.rc; 298 298 LogRel(("Support driver version mismatch: DriverVersion=%#x ClientVersion=%#x rc=%Rrc\n", 299 CookieReq.u.Out.u32DriverVersion, SUPDRV IOC_VERSION, rc));299 CookieReq.u.Out.u32DriverVersion, SUPDRV_IOC_VERSION, rc)); 300 300 if (rc != VERR_VM_DRIVER_VERSION_MISMATCH) 301 301 rc = VERR_VM_DRIVER_VERSION_MISMATCH; … … 304 304 { 305 305 /* for pre 0x00060000 drivers */ 306 LogRel(("Support driver version mismatch: DriverVersion=too-old ClientVersion=%#x\n", SUPDRV IOC_VERSION));306 LogRel(("Support driver version mismatch: DriverVersion=too-old ClientVersion=%#x\n", SUPDRV_IOC_VERSION)); 307 307 rc = VERR_VM_DRIVER_VERSION_MISMATCH; 308 308 } … … 376 376 { "RTSpinlockAcquireNoInts", 0xefef002b }, 377 377 { "RTSpinlockReleaseNoInts", 0xefef002c }, 378 { "RTThreadNativeSelf", 0xefef002d }, 379 { "RTThreadSleep", 0xefef002e }, 380 { "RTThreadYield", 0xefef002f }, 381 { "RTLogDefaultInstance", 0xefef0030 }, 382 { "RTLogRelDefaultInstance", 0xefef0031 }, 383 { "RTLogSetDefaultInstanceThread", 0xefef0032 }, 384 { "RTLogLogger", 0xefef0033 }, 385 { "RTLogLoggerEx", 0xefef0034 }, 386 { "RTLogLoggerExV", 0xefef0035 }, 387 { "AssertMsg1", 0xefef0036 }, 388 { "AssertMsg2", 0xefef0037 }, 378 { "RTTimeNanoTS", 0xefef002d }, 379 { "RTTimeMillieTS", 0xefef002e }, 380 { "RTTimeSystemNanoTS", 0xefef002f }, 381 { "RTTimeSystemMillieTS", 0xefef0030 }, 382 { "RTThreadNativeSelf", 0xefef0031 }, 383 { "RTThreadSleep", 0xefef0032 }, 384 { "RTThreadYield", 0xefef0033 }, 385 { "RTLogDefaultInstance", 0xefef0034 }, 386 { "RTLogRelDefaultInstance", 0xefef0035 }, 387 { "RTLogSetDefaultInstanceThread", 0xefef0036 }, 388 { "RTLogLogger", 0xefef0037 }, 389 { "RTLogLoggerEx", 0xefef0038 }, 390 { "RTLogLoggerExV", 0xefef0039 }, 391 { "AssertMsg1", 0xefef003a }, 392 { "AssertMsg2", 0xefef003b }, 389 393 }; 390 394 -
trunk/src/VBox/HostDrivers/Support/SUPR0.def
r10666 r10680 93 93 RTSpinlockAcquireNoInts 94 94 RTSpinlockReleaseNoInts 95 RTTimeNanoTS 96 RTTimeMillieTS 97 RTTimeSystemNanoTS 98 RTTimeSystemMillieTS 95 99 RTThreadSelf 96 100 RTThreadNativeSelf -
trunk/src/VBox/HostDrivers/Support/darwin/SUPDrv-darwin.cpp
r10662 r10680 257 257 { 258 258 LogRel(("VBoxDrv: version " VBOX_VERSION_STRING " r%d; IOCtl version %#x; IDC version %#x; dev major=%d\n", 259 VBOX_SVN_REV, SUPDRV IOC_VERSION, SUPDRV_IDC_VERSION, g_iMajorDeviceNo));259 VBOX_SVN_REV, SUPDRV_IOC_VERSION, SUPDRV_IDC_VERSION, g_iMajorDeviceNo)); 260 260 return KMOD_RETURN_SUCCESS; 261 261 } -
trunk/src/VBox/HostDrivers/Support/linux/SUPDrv-linux.c
r10662 r10680 600 600 LogFlow(("VBoxDrv::ModuleInit returning %#x\n", rc)); 601 601 printk(KERN_DEBUG DEVICE_NAME ": Successfully loaded version " 602 VBOX_VERSION_STRING " (interface " xstr(SUPDRV IOC_VERSION) ").\n");602 VBOX_VERSION_STRING " (interface " xstr(SUPDRV_IOC_VERSION) ").\n"); 603 603 return rc; 604 604 } … … 1009 1009 MODULE_LICENSE("GPL"); 1010 1010 #ifdef MODULE_VERSION 1011 MODULE_VERSION(VBOX_VERSION_STRING " (" xstr(SUPDRV IOC_VERSION) ")");1011 MODULE_VERSION(VBOX_VERSION_STRING " (" xstr(SUPDRV_IOC_VERSION) ")"); 1012 1012 #endif 1013 1013
Note:
See TracChangeset
for help on using the changeset viewer.