Changeset 11794 in vbox
- Timestamp:
- Aug 29, 2008 9:13:37 AM (17 years ago)
- svn:sync-xref-src-repo-rev:
- 35604
- Location:
- trunk
- Files:
-
- 21 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/sup.h
r11725 r11794 341 341 /** 342 342 * Initializes the support library. 343 * Each succesful call to SUP Init() must be countered by a343 * Each succesful call to SUPR3Init() must be countered by a 344 344 * call to SUPTerm(false). 345 345 * 346 346 * @returns VBox status code. 347 347 * @param ppSession Where to store the session handle. Defaults to NULL. 348 * @param cbReserve The number of bytes of contiguous memory that should be reserved by 349 * the runtime / support library. 350 * Set this to 0 if no reservation is required. (default) 351 * Set this to ~0 if the maximum amount supported by the VM is to be 352 * attempted reserved, or the maximum available. 353 */ 354 #ifdef __cplusplus 355 SUPR3DECL(int) SUPInit(PSUPDRVSESSION *ppSession = NULL, size_t cbReserve = 0); 356 #else 357 SUPR3DECL(int) SUPInit(PSUPDRVSESSION *ppSession, size_t cbReserve); 358 #endif 348 */ 349 SUPR3DECL(int) SUPR3Init(PSUPDRVSESSION *ppSession); 359 350 360 351 /** -
trunk/include/iprt/initterm.h
r8245 r11794 50 50 * @returns iprt status code. 51 51 * 52 * @param fInitSUPLib Set if SUP Init() shall be called during init (default).52 * @param fInitSUPLib Set if SUPR3Init() shall be called during init (default). 53 53 * Clear if not to call it. 54 * @param cbReserve The number of bytes of contiguous memory that should be reserved by 55 * the runtime / support library. 56 * Set this to 0 if no reservation is required. (default) 57 * Set this to ~(size_t)0 if the maximum amount supported by the VM is to be 58 * attempted reserved, or the maximum available. 59 * This argument only applies if fInitSUPLib is true and we're in ring-3 HC. 54 * @param cbReserve Ignored. 60 55 */ 61 56 RTR3DECL(int) RTR3Init( -
trunk/src/VBox/Devices/Network/testcase/tstIntNet-1.cpp
r11684 r11794 830 830 */ 831 831 PSUPDRVSESSION pSession; 832 rc = SUP Init(&pSession, 0);832 rc = SUPR3Init(&pSession); 833 833 if (RT_FAILURE(rc)) 834 834 { 835 RTPrintf("tstIntNet-1: SUP Init -> %Rrc\n", rc);835 RTPrintf("tstIntNet-1: SUPR3Init -> %Rrc\n", rc); 836 836 return 1; 837 837 } … … 937 937 938 938 if (fPingTest) 939 doPingTest(OpenReq.hIf, pSession, pBuf, &SrcMac, pFileRaw, pFileText); 940 939 doPingTest(OpenReq.hIf, pSession, pBuf, &SrcMac, pFileRaw, pFileText); 940 941 941 /* 942 942 * Either enter sniffing mode or do a timeout thing. … … 951 951 g_cErrors++; 952 952 } 953 953 954 954 if ( fPingTest 955 955 && !g_fPingReply) -
trunk/src/VBox/HostDrivers/Support/SUPLib.cpp
r11725 r11794 211 211 212 212 213 SUPR3DECL(int) SUP Init(PSUPDRVSESSION *ppSession /* NULL */, size_t cbReserve /* 0 */)213 SUPR3DECL(int) SUPR3Init(PSUPDRVSESSION *ppSession) 214 214 { 215 215 /* … … 368 368 suplibOsTerm(&g_supLibData); 369 369 } 370 AssertMsgFailed(("SUP Init() failed rc=%Vrc\n", rc));370 AssertMsgFailed(("SUPR3Init() failed rc=%Vrc\n", rc)); 371 371 g_cInits--; 372 372 … … 485 485 * Verify state. 486 486 */ 487 AssertMsg(g_cInits > 0, ("SUPTerm() is called before SUP Init()!\n"));487 AssertMsg(g_cInits > 0, ("SUPTerm() is called before SUPR3Init()!\n")); 488 488 if (g_cInits == 0) 489 489 return VERR_WRONG_ORDER; -
trunk/src/VBox/HostDrivers/Support/SUPLibInternal.h
r11725 r11794 258 258 * 259 259 * This is dynamically resolved and invoked by the static library before it 260 * calls RTR3Init and thereby SUP Init.260 * calls RTR3Init and thereby SUPR3Init. 261 261 * 262 262 * @returns IPRT status code. -
trunk/src/VBox/HostDrivers/Support/SUPR0IdcClient.c
r10377 r11794 91 91 * special API feature was just added will they set an actual version. 92 92 * So, this is the place where can easily enforce a minimum IDC version 93 * on bugs and similar. It corresponds a bit to what SUP Init is93 * on bugs and similar. It corresponds a bit to what SUPR3Init is 94 94 * responsible for. 95 95 */ -
trunk/src/VBox/HostDrivers/Support/testcase/tstContiguous.cpp
r9334 r11794 47 47 48 48 RTR3Init(false); 49 rc = SUP Init();50 RTPrintf("tstContiguous: SUP Init -> rc=%Vrc\n", rc);49 rc = SUPR3Init(NULL); 50 RTPrintf("tstContiguous: SUPR3Init -> rc=%Vrc\n", rc); 51 51 rcRet += rc != 0; 52 52 if (!rc) -
trunk/src/VBox/HostDrivers/Support/testcase/tstGIP-2.cpp
r9961 r11794 105 105 */ 106 106 PSUPDRVSESSION pSession = NIL_RTR0PTR; 107 int rc = SUP Init(&pSession);107 int rc = SUPR3Init(&pSession); 108 108 if (VBOX_SUCCESS(rc)) 109 109 { … … 134 134 if ( g_pSUPGlobalInfoPage->aCPUs[iCpu].u64CpuHz > 0 135 135 && g_pSUPGlobalInfoPage->aCPUs[iCpu].u64CpuHz != _4G + 1) 136 { 136 { 137 137 PSUPGIPCPU pPrevCpu = &s_aaCPUs[!(i & 1)][iCpu]; 138 138 PSUPGIPCPU pCpu = &s_aaCPUs[i & 1][iCpu]; … … 181 181 } 182 182 else 183 RTPrintf("tstGIP-2: SUP Init failed: %Vrc\n", rc);183 RTPrintf("tstGIP-2: SUPR3Init failed: %Vrc\n", rc); 184 184 return !!rc; 185 185 } -
trunk/src/VBox/HostDrivers/Support/testcase/tstGetPagingMode.cpp
r8155 r11794 44 44 int rc; 45 45 RTR3Init(false); 46 rc = SUP Init();46 rc = SUPR3Init(NULL); 47 47 if (VBOX_SUCCESS(rc)) 48 48 { … … 93 93 } 94 94 else 95 RTPrintf("SUP Init -> rc=%Vrc\n", rc);95 RTPrintf("SUPR3Init -> rc=%Vrc\n", rc); 96 96 97 97 return !VBOX_SUCCESS(rc); -
trunk/src/VBox/HostDrivers/Support/testcase/tstInit.cpp
r8155 r11794 44 44 int rc; 45 45 RTR3Init(false); 46 rc = SUP Init();47 RTPrintf("tstInit: SUP Init -> rc=%d\n", rc);46 rc = SUPR3Init(NULL); 47 RTPrintf("tstInit: SUPR3Init -> rc=%d\n", rc); 48 48 if (!rc) 49 49 { -
trunk/src/VBox/HostDrivers/Support/testcase/tstInt.cpp
r10724 r11794 81 81 RTR3Init(); 82 82 PSUPDRVSESSION pSession; 83 rc = SUP Init(&pSession);83 rc = SUPR3Init(&pSession); 84 84 rcRet += rc != 0; 85 RTPrintf("tstInt: SUP Init -> rc=%Vrc\n", rc);85 RTPrintf("tstInt: SUPR3Init -> rc=%Vrc\n", rc); 86 86 if (!rc) 87 87 { -
trunk/src/VBox/HostDrivers/Support/testcase/tstLow.cpp
r8155 r11794 50 50 RTPrintf("tstLow: TESTING...\n"); 51 51 52 rc = SUP Init();52 rc = SUPR3Init(NULL); 53 53 if (VBOX_SUCCESS(rc)) 54 54 { … … 151 151 else 152 152 { 153 RTPrintf("SUP Init -> rc=%Vrc\n", rc);153 RTPrintf("SUPR3Init -> rc=%Vrc\n", rc); 154 154 rcRet++; 155 155 } -
trunk/src/VBox/HostDrivers/Support/testcase/tstPage.cpp
r8155 r11794 46 46 int rc = 0; 47 47 RTR3Init(true, _1M*168); 48 rc = SUP Init(NULL, _1M*168);48 rc = SUPR3Init(NULL); 49 49 cErrors += rc != 0; 50 50 if (!rc) … … 87 87 } 88 88 else 89 RTPrintf("tstPage: SUP Init failed rc=%d\n", rc);89 RTPrintf("tstPage: SUPR3Init failed rc=%d\n", rc); 90 90 91 91 if (!cErrors) -
trunk/src/VBox/HostDrivers/Support/testcase/tstPin.cpp
r8155 r11794 49 49 50 50 RTR3Init(true, ~0); 51 rc = SUP Init(NULL, ~0);52 RTPrintf("SUP Init -> rc=%d\n", rc);51 rc = SUPR3Init(NULL); 52 RTPrintf("SUPR3Init -> rc=%d\n", rc); 53 53 rcRet += rc != 0; 54 54 if (!rc) -
trunk/src/VBox/Runtime/VBox/VBoxRTDeps.cpp
r11320 r11794 41 41 PFNRT g_VBoxRTDeps[] = 42 42 { 43 (PFNRT)SUP Init,43 (PFNRT)SUPR3Init, 44 44 (PFNRT)SUPPageLock 45 45 }; -
trunk/src/VBox/Runtime/r3/init.cpp
r11597 r11794 107 107 * @returns iprt status code. 108 108 * 109 * @param fInitSUPLib Set if SUP Init() shall be called during init (default).109 * @param fInitSUPLib Set if SUPR3Init() shall be called during init (default). 110 110 * Clear if not to call it. 111 * @param cbReserve The number of bytes of contiguous memory that should be reserved by 112 * the runtime / support library. 113 * Set this to 0 if no reservation is required. (default) 114 * Set this to ~0 if the maximum amount supported by the VM is to be 115 * attempted reserved, or the maximum available. 116 * This argument only applies if fInitSUPLib is true and we're in ring-3 HC. 111 * @param cbReserve Ignored. 117 112 */ 118 113 RTR3DECL(int) RTR3Init(bool fInitSUPLib, size_t cbReserve) … … 122 117 /* 123 118 * Do reference counting, only initialize the first time around. 124 * 125 * We are ASSUMING that nobody will be able to race RTR3Init calls when the 119 * 120 * We are ASSUMING that nobody will be able to race RTR3Init calls when the 126 121 * first one, the real init, is running (second assertion). 127 122 */ … … 133 128 #if !defined(IN_GUEST) && !defined(RT_NO_GIP) 134 129 if (fInitSUPLib) 135 SUP Init(NULL, cbReserve);136 #endif 130 SUPR3Init(NULL); 131 #endif 137 132 } 138 133 ASMAtomicWriteBool(&g_fInitializing, true); … … 177 172 * (The more time for updates before real use, the better.) 178 173 */ 179 SUP Init(NULL, cbReserve);174 SUPR3Init(NULL); 180 175 } 181 176 #endif -
trunk/src/VBox/VMM/VM.cpp
r11740 r11794 197 197 * Initialize the support library creating the session for this v 198 198 */ 199 rc = SUP Init(&pUVM->vm.s.pSession, 0);199 rc = SUPR3Init(&pUVM->vm.s.pSession); 200 200 if (RT_SUCCESS(rc)) 201 201 { -
trunk/src/VBox/VMM/testcase/tstCFGM.cpp
r8155 r11794 49 49 */ 50 50 PVM pVM; 51 int rc = SUP Init(NULL);51 int rc = SUPR3Init(NULL); 52 52 if (VBOX_SUCCESS(rc)) 53 53 rc = SUPPageAlloc(RT_ALIGN_Z(sizeof(*pVM), PAGE_SIZE) >> PAGE_SHIFT, (void **)&pVM); -
trunk/src/VBox/VMM/testcase/tstGlobalConfig.cpp
r8155 r11794 96 96 */ 97 97 PSUPDRVSESSION pSession; 98 int rc = SUP Init(&pSession, 0);98 int rc = SUPR3Init(&pSession); 99 99 if (RT_FAILURE(rc)) 100 100 { 101 RTPrintf("tstGlobalConfig: SUP Init -> %Rrc\n", rc);101 RTPrintf("tstGlobalConfig: SUPR3Init -> %Rrc\n", rc); 102 102 return 1; 103 103 } -
trunk/src/VBox/VMM/testcase/tstMMHyperHeap.cpp
r11311 r11794 53 53 RTR0PTR pvR0; 54 54 SUPPAGE aPages[RT_ALIGN_Z(sizeof(*pVM), PAGE_SIZE) >> PAGE_SHIFT]; 55 int rc = SUP Init(NULL);55 int rc = SUPR3Init(NULL); 56 56 if (VBOX_SUCCESS(rc)) 57 57 rc = SUPLowAlloc(RT_ELEMENTS(aPages), (void **)&pVM, &pvR0, &aPages[0]); -
trunk/src/VBox/VMM/testcase/tstSSM.cpp
r10903 r11794 621 621 * Create an fake VM structure and init SSM. 622 622 */ 623 int rc = SUP Init(NULL);623 int rc = SUPR3Init(NULL); 624 624 if (VBOX_FAILURE(rc)) 625 625 {
Note:
See TracChangeset
for help on using the changeset viewer.