Changeset 62664 in vbox for trunk/src/VBox/HostDrivers/Support
- Timestamp:
- Jul 28, 2016 11:30:23 PM (8 years ago)
- Location:
- trunk/src/VBox/HostDrivers/Support
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostDrivers/Support/SUPDrv.cpp
r62490 r62664 148 148 DECLINLINE(int) supdrvLdrUnlock(PSUPDRVDEVEXT pDevExt); 149 149 static int supdrvIOCtl_CallServiceModule(PSUPDRVDEVEXT pDevExt, PSUPDRVSESSION pSession, PSUPCALLSERVICE pReq); 150 static int supdrvIOCtl_LoggerSettings(PSUP DRVDEVEXT pDevExt, PSUPDRVSESSION pSession, PSUPLOGGERSETTINGS pReq);150 static int supdrvIOCtl_LoggerSettings(PSUPLOGGERSETTINGS pReq); 151 151 static int supdrvIOCtl_MsrProber(PSUPDRVDEVEXT pDevExt, PSUPMSRPROBER pReq); 152 152 static int supdrvIOCtl_ResumeSuspendedKbds(void); … … 2027 2027 2028 2028 /* execute */ 2029 pReq->Hdr.rc = supdrvIOCtl_LoggerSettings(p DevExt, pSession, pReq);2029 pReq->Hdr.rc = supdrvIOCtl_LoggerSettings(pReq); 2030 2030 return 0; 2031 2031 } … … 3836 3836 return supdrvOSEnableVTx(fEnable); 3837 3837 #else 3838 RT_NOREF1(fEnable); 3838 3839 return VERR_NOT_SUPPORTED; 3839 3840 #endif … … 3870 3871 supdrvOSResumeVTxOnCpu(fSuspended); 3871 3872 #else 3873 RT_NOREF1(fSuspended); 3872 3874 Assert(!fSuspended); 3873 3875 #endif … … 4693 4695 { 4694 4696 supdrvLdrUnlock(pDevExt); 4695 Log(("Bad entry point address: %s=%p (rc=%Rrc)\n", pszWhat, pv, rc)); 4697 Log(("Bad entry point address: %s=%p (rc=%Rrc)\n", pszWhat, pv, rc)); NOREF(pszWhat); 4696 4698 return rc; 4697 4699 } … … 5523 5525 * 5524 5526 * @returns VBox status code. 5525 * @param pDevExt The device extension.5526 * @param pSession The caller's session.5527 5527 * @param pReq The request. 5528 5528 */ 5529 static int supdrvIOCtl_LoggerSettings(PSUP DRVDEVEXT pDevExt, PSUPDRVSESSION pSession, PSUPLOGGERSETTINGS pReq)5529 static int supdrvIOCtl_LoggerSettings(PSUPLOGGERSETTINGS pReq) 5530 5530 { 5531 5531 const char *pszGroup = &pReq->u.In.szStrings[pReq->u.In.offGroups]; … … 5707 5707 return rc; 5708 5708 #else 5709 RT_NOREF2(pDevExt, pReq); 5709 5710 return VERR_NOT_IMPLEMENTED; 5710 5711 #endif -
trunk/src/VBox/HostDrivers/Support/SUPDrvGip.cpp
r62490 r62664 188 188 * updating. 189 189 * 190 * @param pGip Pointer to the GIP.191 190 * @param pGipCpu The per CPU structure for this CPU. 192 191 * @param u64NanoTS The current time. 193 192 */ 194 static void supdrvGipReInitCpu(PSUPG LOBALINFOPAGE pGip, PSUPGIPCPU pGipCpu, uint64_t u64NanoTS)193 static void supdrvGipReInitCpu(PSUPGIPCPU pGipCpu, uint64_t u64NanoTS) 195 194 { 196 195 /* … … 217 216 218 217 if (RT_LIKELY(iCpu < pGip->cCpus && pGip->aCPUs[iCpu].idCpu == idCpu)) 219 supdrvGipReInitCpu( pGip,&pGip->aCPUs[iCpu], *(uint64_t *)pvUser2);218 supdrvGipReInitCpu(&pGip->aCPUs[iCpu], *(uint64_t *)pvUser2); 220 219 221 220 NOREF(pvUser2); … … 260 259 uint16_t idApic; 261 260 int iCpuSet; 261 NOREF(pGip); 262 262 263 263 AssertMsg(idCpu == RTMpCpuId(), ("idCpu=%#x RTMpCpuId()=%#x\n", idCpu, RTMpCpuId())); /* paranoia^3 */ … … 505 505 || pGipR0->u32Mode == SUPGIPMODE_SYNC_TSC 506 506 || RTMpGetOnlineCount() == 1) 507 supdrvGipReInitCpu( pGipR0,&pGipR0->aCPUs[0], u64NanoTS);507 supdrvGipReInitCpu(&pGipR0->aCPUs[0], u64NanoTS); 508 508 else 509 509 RTMpOnAll(supdrvGipReInitCpuCallback, pGipR0, &u64NanoTS); … … 915 915 * 916 916 * @param pDevExt Pointer to the device instance data. 917 * @param pGip Pointer to the GIP. 918 */ 919 static void supdrvGipInitStartTimerForRefiningInvariantTscFreq(PSUPDRVDEVEXT pDevExt, PSUPGLOBALINFOPAGE pGip) 917 */ 918 static void supdrvGipInitStartTimerForRefiningInvariantTscFreq(PSUPDRVDEVEXT pDevExt) 920 919 { 921 920 uint64_t u64NanoTS; … … 1004 1003 uint64_t *puTscStop = (uint64_t *)pvUser1; 1005 1004 uint64_t *pnsStop = (uint64_t *)pvUser2; 1005 RT_NOREF1(idCpu); 1006 1006 1007 1007 *puTscStop = ASMReadTSC(); … … 1020 1020 * 1021 1021 * @returns VBox status code. 1022 * @param pDevExt Pointer to the device instance.1023 1022 * @param pGip Pointer to the GIP. 1024 1023 * @param fRough Set if we're doing the rough calculation that the … … 1028 1027 * achieve in reasonably short time. 1029 1028 */ 1030 static int supdrvGipInitMeasureTscFreq(PSUP DRVDEVEXT pDevExt, PSUPGLOBALINFOPAGE pGip, bool fRough)1029 static int supdrvGipInitMeasureTscFreq(PSUPGLOBALINFOPAGE pGip, bool fRough) 1031 1030 { 1032 1031 uint32_t nsTimerIncr = RTTimerGetSystemGranularity(); … … 1485 1484 bit to much. */ 1486 1485 supdrvGipMpEventOnlineOrInitOnCpu((PSUPDRVDEVEXT)pvUser1, idCpu); 1486 NOREF(pvUser2); 1487 1487 } 1488 1488 … … 1499 1499 Assert(RTMpCpuIdToSetIndex(idCpu) == (intptr_t)pvUser2); 1500 1500 ASMAtomicWriteU64((uint64_t volatile *)pvUser1, ASMReadTSC()); 1501 RT_NOREF2(idCpu, pvUser2); 1501 1502 } 1502 1503 … … 1683 1684 1684 1685 ASMAtomicWriteSize(&pCpu->enmState, SUPGIPCPUSTATE_INVALID); 1685 ASMAtomicWrite Size(&pCpu->idCpu,NIL_RTCPUID);1686 ASMAtomicWriteU32(&pCpu->idCpu, NIL_RTCPUID); 1686 1687 ASMAtomicWriteS16(&pCpu->iCpuSet, -1); 1687 1688 ASMAtomicWriteU16(&pCpu->idApic, UINT16_MAX); … … 1879 1880 if (pGip->u32Mode == SUPGIPMODE_INVARIANT_TSC) 1880 1881 { 1881 rc = supdrvGipInitMeasureTscFreq(p DevExt, pGip, true /*fRough*/); /* cannot fail */1882 supdrvGipInitStartTimerForRefiningInvariantTscFreq(pDevExt , pGip);1882 rc = supdrvGipInitMeasureTscFreq(pGip, true /*fRough*/); /* cannot fail */ 1883 supdrvGipInitStartTimerForRefiningInvariantTscFreq(pDevExt); 1883 1884 } 1884 1885 else 1885 rc = supdrvGipInitMeasureTscFreq(p DevExt, pGip, false /*fRough*/);1886 rc = supdrvGipInitMeasureTscFreq(pGip, false /*fRough*/); 1886 1887 if (RT_SUCCESS(rc)) 1887 1888 { … … 2442 2443 uint64_t u64TSC = ASMReadTSC(); 2443 2444 uint64_t u64NanoTS = RTTimeSystemNanoTS(); 2445 RT_NOREF1(pTimer); 2444 2446 2445 2447 if (pGip->enmUseTscDelta > SUPGIPUSETSCDELTA_PRACTICALLY_ZERO) … … 2490 2492 uint64_t u64TSC = ASMReadTSC(); 2491 2493 uint64_t NanoTS = RTTimeSystemNanoTS(); 2494 RT_NOREF1(pTimer); 2492 2495 2493 2496 /** @todo reset the transaction number and whatnot when iTick == 1. */ … … 2940 2943 { 2941 2944 TSCDELTA_DBG_VARS(); 2945 RT_NOREF1(pOtherSync); 2942 2946 2943 2947 /* … … 3165 3169 3166 3170 3167 static void supdrvTscDeltaMethod2ProcessDataOnMaster(PSUPDRVGIPTSCDELTARGS pArgs , uint32_t iLoop)3171 static void supdrvTscDeltaMethod2ProcessDataOnMaster(PSUPDRVGIPTSCDELTARGS pArgs) 3168 3172 { 3169 3173 int64_t iMasterTscDelta = pArgs->pMaster->i64TSCDelta; … … 3264 3268 { 3265 3269 unsigned iLoop; 3270 RT_NOREF1(iTry); 3266 3271 3267 3272 for (iLoop = 0; iLoop < GIP_TSC_DELTA_M2_LOOPS; iLoop++) … … 3314 3319 if (iLoop >= GIP_TSC_DELTA_M2_PRIMER_LOOPS) 3315 3320 # endif 3316 supdrvTscDeltaMethod2ProcessDataOnMaster(pArgs , iLoop);3321 supdrvTscDeltaMethod2ProcessDataOnMaster(pArgs); 3317 3322 3318 3323 TSCDELTA_MASTER_KICK_OTHER_OUT_OF_AFTER(pMySync, pOtherSync); … … 3507 3512 PSUPTSCDELTASYNC2 volatile *ppOtherSync = fIsMaster ? &pArgs->pSyncWorker : &pArgs->pSyncMaster; 3508 3513 TSCDELTA_DBG_VARS(); 3514 RT_NOREF1(pMySync); 3509 3515 3510 3516 /* … … 3752 3758 { 3753 3759 supdrvMeasureTscDeltaCallbackUnwrapped(idCpu, (PSUPDRVGIPTSCDELTARGS)pvUser1); 3760 RT_NOREF1(pvUser2); 3754 3761 } 3755 3762 … … 4234 4241 } 4235 4242 } 4236 4237 return rc; 4243 /* not reached */ 4238 4244 } 4239 4245 … … 4639 4645 uint32_t fFlags; 4640 4646 RTMSINTERVAL cMsWaitRetry; 4647 RT_NOREF1(pDevExt); 4641 4648 4642 4649 /* -
trunk/src/VBox/HostDrivers/Support/SUPDrvIOC.h
r62490 r62664 50 50 #ifdef RT_OS_WINDOWS 51 51 # ifndef CTL_CODE 52 # include < Windows.h>52 # include <iprt/win/windows.h> 53 53 # endif 54 54 /* Automatic buffering, size not encoded. */ -
trunk/src/VBox/HostDrivers/Support/SUPDrvInternal.h
r62490 r62664 48 48 49 49 #elif defined(RT_OS_WINDOWS) 50 RT_C_DECLS_BEGIN 51 # if (_MSC_VER >= 1400) && !defined(VBOX_WITH_PATCHED_DDK) 52 # define _InterlockedExchange _InterlockedExchange_StupidDDKVsCompilerCrap 53 # define _InterlockedExchangeAdd _InterlockedExchangeAdd_StupidDDKVsCompilerCrap 54 # define _InterlockedCompareExchange _InterlockedCompareExchange_StupidDDKVsCompilerCrap 55 # define _InterlockedAddLargeStatistic _InterlockedAddLargeStatistic_StupidDDKVsCompilerCrap 56 # define _interlockedbittestandset _interlockedbittestandset_StupidDDKVsCompilerCrap 57 # define _interlockedbittestandreset _interlockedbittestandreset_StupidDDKVsCompilerCrap 58 # define _interlockedbittestandset64 _interlockedbittestandset64_StupidDDKVsCompilerCrap 59 # define _interlockedbittestandreset64 _interlockedbittestandreset64_StupidDDKVsCompilerCrap 60 # pragma warning(disable : 4163) 61 # include <iprt/nt/nt.h> 62 # pragma warning(default : 4163) 63 # undef _InterlockedExchange 64 # undef _InterlockedExchangeAdd 65 # undef _InterlockedCompareExchange 66 # undef _InterlockedAddLargeStatistic 67 # undef _interlockedbittestandset 68 # undef _interlockedbittestandreset 69 # undef _interlockedbittestandset64 70 # undef _interlockedbittestandreset64 71 # else 72 # include <iprt/nt/nt.h> 73 # endif 50 # include <iprt/nt/nt.h> 74 51 # include <memory.h> 75 RT_C_DECLS_END76 52 77 53 #elif defined(RT_OS_LINUX) -
trunk/src/VBox/HostDrivers/Support/SUPR0IdcClientInternal.h
r62490 r62664 32 32 33 33 #ifdef RT_OS_WINDOWS 34 # if (_MSC_VER >= 1400) && !defined(VBOX_WITH_PATCHED_DDK) 35 # include <iprt/asm.h> 36 # define _InterlockedExchange _InterlockedExchange_StupidDDKVsCompilerCrap 37 # define _InterlockedExchangeAdd _InterlockedExchangeAdd_StupidDDKVsCompilerCrap 38 # define _InterlockedCompareExchange _InterlockedCompareExchange_StupidDDKVsCompilerCrap 39 # define _InterlockedAddLargeStatistic _InterlockedAddLargeStatistic_StupidDDKVsCompilerCrap 40 # pragma warning(disable : 4163) 41 RT_C_DECLS_BEGIN 42 # include <ntddk.h> 43 RT_C_DECLS_END 44 # pragma warning(default : 4163) 45 # undef _InterlockedExchange 46 # undef _InterlockedExchangeAdd 47 # undef _InterlockedCompareExchange 48 # undef _InterlockedAddLargeStatistic 49 # else 50 RT_C_DECLS_BEGIN 51 # include <ntddk.h> 52 RT_C_DECLS_END 53 # endif 54 #endif /* RT_OS_WINDOWS */ 34 # include <iprt/nt/ntddk.h> 35 #endif 55 36 56 37 -
trunk/src/VBox/HostDrivers/Support/SUPR0IdcClientStubs.c
r62490 r62664 58 58 rc = supR0IdcNativeCall(pHandle, SUPDRV_IDC_REQ_GET_SYMBOL, &Req.Hdr); 59 59 if (RT_SUCCESS(rc)) 60 ASMAtomicWritePtr((void * volatile *)ppfn, Req.u.Out.pfnSymbol);60 ASMAtomicWritePtr((void * volatile *)ppfn, (void *)(uintptr_t)Req.u.Out.pfnSymbol); 61 61 } 62 62
Note:
See TracChangeset
for help on using the changeset viewer.