Changeset 99758 in vbox for trunk/src/VBox/Runtime/r0drv
- Timestamp:
- May 11, 2023 9:37:59 PM (21 months ago)
- Location:
- trunk/src/VBox/Runtime/r0drv
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/r0drv/linux/the-linux-kernel.h
r98103 r99758 472 472 * Whether the kernel support high resolution timers (Linux kernel versions 473 473 * 2.6.28 and later (hrtimer_add_expires_ns() & schedule_hrtimeout). */ 474 #if RTLNX_VER_MIN(2,6,28) 474 #if RTLNX_VER_MIN(2,6,28) || defined(DOXYGEN_RUNNING) 475 475 # define IPRT_LINUX_HAS_HRTIMER 476 476 #endif -
trunk/src/VBox/Runtime/r0drv/memobj-r0drv.cpp
r98103 r99758 157 157 158 158 159 /**160 * Checks if this is mapping or not.161 *162 * @returns true if it's a mapping, otherwise false.163 * @param MemObj The ring-0 memory object handle.164 */165 159 RTR0DECL(bool) RTR0MemObjIsMapping(RTR0MEMOBJ MemObj) 166 160 { … … 178 172 179 173 180 /**181 * Gets the address of a ring-0 memory object.182 *183 * @returns The address of the memory object.184 * @returns NULL if the handle is invalid (asserts in strict builds) or if there isn't any mapping.185 * @param MemObj The ring-0 memory object handle.186 */187 174 RTR0DECL(void *) RTR0MemObjAddress(RTR0MEMOBJ MemObj) 188 175 { … … 202 189 203 190 204 /**205 * Gets the ring-3 address of a ring-0 memory object.206 *207 * This only applies to ring-0 memory object with ring-3 mappings of some kind, i.e.208 * locked user memory, reserved user address space and user mappings. This API should209 * not be used on any other objects.210 *211 * @returns The address of the memory object.212 * @returns NIL_RTR3PTR if the handle is invalid or if it's not an object with a ring-3 mapping.213 * Strict builds will assert in both cases.214 * @param MemObj The ring-0 memory object handle.215 */216 191 RTR0DECL(RTR3PTR) RTR0MemObjAddressR3(RTR0MEMOBJ MemObj) 217 192 { … … 241 216 242 217 243 /**244 * Gets the size of a ring-0 memory object.245 *246 * The returned value may differ from the one specified to the API creating the247 * object because of alignment adjustments. The minimal alignment currently248 * employed by any API is PAGE_SIZE, so the result can safely be shifted by249 * PAGE_SHIFT to calculate a page count.250 *251 * @returns The object size.252 * @returns 0 if the handle is invalid (asserts in strict builds) or if there isn't any mapping.253 * @param MemObj The ring-0 memory object handle.254 */255 218 RTR0DECL(size_t) RTR0MemObjSize(RTR0MEMOBJ MemObj) 256 219 { … … 272 235 273 236 274 /**275 * Get the physical address of an page in the memory object.276 *277 * @returns The physical address.278 * @returns NIL_RTHCPHYS if the object doesn't contain fixed physical pages.279 * @returns NIL_RTHCPHYS if the iPage is out of range.280 * @returns NIL_RTHCPHYS if the object handle isn't valid.281 * @param MemObj The ring-0 memory object handle.282 * @param iPage The page number within the object.283 */284 237 /* Work around gcc bug 55940 */ 285 238 #if defined(__GNUC__) && defined(RT_ARCH_X86) && (__GNUC__ * 100 + __GNUC_MINOR__) == 407 … … 322 275 323 276 324 /**325 * Checks whether the allocation was zero initialized or not.326 *327 * This only works on allocations. It is not meaningful for mappings, reserved328 * memory and entered physical address, and will return false for these.329 *330 * @returns true if the allocation was initialized to zero at allocation time,331 * false if not or query not meaningful to the object type.332 * @param hMemObj The ring-0 memory object to be freed.333 *334 * @remarks It can be expected that memory allocated in the same fashion will335 * have the same initialization state. So, if this returns true for336 * one allocation it will return true for all other similarly made337 * allocations.338 */339 277 RTR0DECL(bool) RTR0MemObjWasZeroInitialized(RTR0MEMOBJ hMemObj) 340 278 { … … 358 296 359 297 360 /**361 * Frees a ring-0 memory object.362 *363 * @returns IPRT status code.364 * @retval VERR_INVALID_HANDLE if365 * @param MemObj The ring-0 memory object to be freed. NIL is366 * accepted.367 * @param fFreeMappings Whether or not to free mappings of the object.368 */369 298 RTR0DECL(int) RTR0MemObjFree(RTR0MEMOBJ MemObj, bool fFreeMappings) 370 299 { -
trunk/src/VBox/Runtime/r0drv/nt/alloc-r0drv-nt.cpp
r98103 r99758 93 93 94 94 95 /**96 * Allocates physical contiguous memory (below 4GB).97 * The allocation is page aligned and its contents is undefined.98 *99 * @returns Pointer to the memory block. This is page aligned.100 * @param pPhys Where to store the physical address.101 * @param cb The allocation size in bytes. This is always102 * rounded up to PAGE_SIZE.103 */104 95 RTR0DECL(void *) RTMemContAlloc(PRTCCPHYS pPhys, size_t cb) 105 96 { … … 143 134 144 135 145 /**146 * Frees memory allocated ysing RTMemContAlloc().147 *148 * @param pv Pointer to return from RTMemContAlloc().149 * @param cb The cb parameter passed to RTMemContAlloc().150 */151 136 RTR0DECL(void) RTMemContFree(void *pv, size_t cb) 152 137 { -
trunk/src/VBox/Runtime/r0drv/nt/timer-r0drv-nt.cpp
r98103 r99758 313 313 * Common timer callback worker for the non-omni timers. 314 314 * 315 * @returns HRTIMER_NORESTART or HRTIMER_RESTART depending on whether it's a one-shot or interval timer.316 315 * @param pTimer The timer. 317 316 */
Note:
See TracChangeset
for help on using the changeset viewer.