VirtualBox

source: vbox/trunk/include/VBox/sup.h@ 4765

Last change on this file since 4765 was 4765, checked in by vboxsync, 17 years ago

Added SUPPageFreeLocked & SUPPageAllocLocked

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 20.3 KB
Line 
1/** @file
2 * SUP - Support Library.
3 */
4
5/*
6 * Copyright (C) 2006-2007 innotek GmbH
7 *
8 * This file is part of VirtualBox Open Source Edition (OSE), as
9 * available from http://www.virtualbox.org. This file is free software;
10 * you can redistribute it and/or modify it under the terms of the GNU
11 * General Public License as published by the Free Software Foundation,
12 * in version 2 as it comes in the "COPYING" file of the VirtualBox OSE
13 * distribution. VirtualBox OSE is distributed in the hope that it will
14 * be useful, but WITHOUT ANY WARRANTY of any kind.
15 */
16
17#ifndef ___VBox_sup_h
18#define ___VBox_sup_h
19
20#include <VBox/cdefs.h>
21#include <VBox/types.h>
22#include <iprt/assert.h>
23#include <iprt/asm.h>
24
25__BEGIN_DECLS
26
27/** @defgroup grp_sup The Support Library API
28 * @{
29 */
30
31/**
32 * Physical page descriptor.
33 */
34#pragma pack(4) /* space is more important. */
35typedef struct SUPPAGE
36{
37 /** Physical memory address. */
38 RTHCPHYS Phys;
39 /** Reserved entry for internal use by the caller. */
40 RTHCUINTPTR uReserved;
41} SUPPAGE;
42#pragma pack()
43/** Pointer to a page descriptor. */
44typedef SUPPAGE *PSUPPAGE;
45/** Pointer to a const page descriptor. */
46typedef const SUPPAGE *PCSUPPAGE;
47
48/**
49 * The paging mode.
50 */
51typedef enum SUPPAGINGMODE
52{
53 /** The usual invalid entry.
54 * This is returned by SUPGetPagingMode() */
55 SUPPAGINGMODE_INVALID = 0,
56 /** Normal 32-bit paging, no global pages */
57 SUPPAGINGMODE_32_BIT,
58 /** Normal 32-bit paging with global pages. */
59 SUPPAGINGMODE_32_BIT_GLOBAL,
60 /** PAE mode, no global pages, no NX. */
61 SUPPAGINGMODE_PAE,
62 /** PAE mode with global pages. */
63 SUPPAGINGMODE_PAE_GLOBAL,
64 /** PAE mode with NX, no global pages. */
65 SUPPAGINGMODE_PAE_NX,
66 /** PAE mode with global pages and NX. */
67 SUPPAGINGMODE_PAE_GLOBAL_NX,
68 /** AMD64 mode, no global pages. */
69 SUPPAGINGMODE_AMD64,
70 /** AMD64 mode with global pages, no NX. */
71 SUPPAGINGMODE_AMD64_GLOBAL,
72 /** AMD64 mode with NX, no global pages. */
73 SUPPAGINGMODE_AMD64_NX,
74 /** AMD64 mode with global pages and NX. */
75 SUPPAGINGMODE_AMD64_GLOBAL_NX
76} SUPPAGINGMODE;
77
78
79#pragma pack(1) /* paranoia */
80
81/**
82 * Per CPU data.
83 * This is only used when
84 */
85typedef struct SUPGIPCPU
86{
87 /** Update transaction number.
88 * This number is incremented at the start and end of each update. It follows
89 * thusly that odd numbers indicates update in progress, while even numbers
90 * indicate stable data. Use this to make sure that the data items you fetch
91 * are consistent. */
92 volatile uint32_t u32TransactionId;
93 /** The interval in TSC ticks between two NanoTS updates.
94 * This is the average interval over the last 2, 4 or 8 updates + a little slack.
95 * The slack makes the time go a tiny tiny bit slower and extends the interval enough
96 * to avoid ending up with too many 1ns increments. */
97 volatile uint32_t u32UpdateIntervalTSC;
98 /** Current nanosecond timestamp. */
99 volatile uint64_t u64NanoTS;
100 /** The TSC at the time of u64NanoTS. */
101 volatile uint64_t u64TSC;
102 /** Current CPU Frequency. */
103 volatile uint64_t u64CpuHz;
104 /** Number of errors during updating.
105 * Typical errors are under/overflows. */
106 volatile uint32_t cErrors;
107 /** Index of the head item in au32TSCHistory. */
108 volatile uint32_t iTSCHistoryHead;
109 /** Array of recent TSC interval deltas.
110 * The most recent item is at index iTSCHistoryHead.
111 * This history is used to calculate u32UpdateIntervalTSC.
112 */
113 volatile uint32_t au32TSCHistory[8];
114 /** Reserved for future per processor data. */
115 volatile uint32_t au32Reserved[6];
116} SUPGIPCPU;
117AssertCompileSize(SUPGIPCPU, 96);
118/*AssertCompileMemberAlignment(SUPGIPCPU, u64TSC, 8); -fixme */
119
120/** Pointer to per cpu data.
121 * @remark there is no const version of this typedef, see g_pSUPGlobalInfoPage for details. */
122typedef SUPGIPCPU *PSUPGIPCPU;
123
124/**
125 * Global Information Page.
126 *
127 * This page contains useful information and can be mapped into any
128 * process or VM. It can be accessed thru the g_pSUPGlobalInfoPage
129 * pointer when a session is open.
130 */
131typedef struct SUPGLOBALINFOPAGE
132{
133 /** Magic (SUPGLOBALINFOPAGE_MAGIC). */
134 uint32_t u32Magic;
135 /** The GIP version. */
136 uint32_t u32Version;
137
138 /** The GIP update mode, see SUPGIPMODE. */
139 uint32_t u32Mode;
140 /** Reserved / padding. */
141 uint32_t u32Padding0;
142 /** The update frequency of the of the NanoTS. */
143 volatile uint32_t u32UpdateHz;
144 /** The update interval in nanoseconds. (10^9 / u32UpdateHz) */
145 volatile uint32_t u32UpdateIntervalNS;
146 /** The timestamp of the last time we update the update frequency. */
147 volatile uint64_t u64NanoTSLastUpdateHz;
148
149 /** Padding / reserved space for future data. */
150 uint32_t au32Padding1[56];
151
152 /** Array of per-cpu data.
153 * If u32Mode == SUPGIPMODE_SYNC_TSC then only the first entry is used.
154 * If u32Mode == SUPGIPMODE_ASYNC_TSC then the CPU ACPI ID is used as an
155 * index into the array. */
156 SUPGIPCPU aCPUs[32];
157} SUPGLOBALINFOPAGE;
158AssertCompile(sizeof(SUPGLOBALINFOPAGE) <= 0x1000);
159/* AssertCompileMemberAlignment(SUPGLOBALINFOPAGE, aCPU, 32); - fixme */
160
161/** Pointer to the global info page.
162 * @remark there is no const version of this typedef, see g_pSUPGlobalInfoPage for details. */
163typedef SUPGLOBALINFOPAGE *PSUPGLOBALINFOPAGE;
164
165#pragma pack() /* end of paranoia */
166
167/** The value of the SUPGLOBALINFOPAGE::u32Magic field. (Soryo Fuyumi) */
168#define SUPGLOBALINFOPAGE_MAGIC 0x19590106
169/** The GIP version.
170 * Upper 16 bits is the major version. Major version is only changed with
171 * incompatible changes in the GIP. */
172#define SUPGLOBALINFOPAGE_VERSION 0x00020000
173
174/**
175 * SUPGLOBALINFOPAGE::u32Mode values.
176 */
177typedef enum SUPGIPMODE
178{
179 /** The usual invalid null entry. */
180 SUPGIPMODE_INVALID = 0,
181 /** The TSC of the cores and cpus in the system is in sync. */
182 SUPGIPMODE_SYNC_TSC,
183 /** Each core has it's own TSC. */
184 SUPGIPMODE_ASYNC_TSC,
185 /** The usual 32-bit hack. */
186 SUPGIPMODE_32BIT_HACK = 0x7fffffff
187} SUPGIPMODE;
188
189/** Pointer to the Global Information Page.
190 *
191 * This pointer is valid as long as SUPLib has a open session. Anyone using
192 * the page must treat this pointer as higly volatile and not trust it beyond
193 * one transaction.
194 *
195 * @remark The GIP page is read-only to everyone but the support driver and
196 * is actually mapped read only everywhere but in ring-0. However
197 * it is not marked 'const' as this might confuse compilers into
198 * thinking that values doesn't change even if members are marked
199 * as volatile. Thus, there is no PCSUPGLOBALINFOPAGE type.
200 */
201#if defined(IN_SUP_R0) || defined(IN_SUP_R3) || defined(IN_SUP_GC)
202extern DECLEXPORT(PSUPGLOBALINFOPAGE) g_pSUPGlobalInfoPage;
203#elif defined(IN_RING0)
204extern DECLIMPORT(SUPGLOBALINFOPAGE) g_SUPGlobalInfoPage;
205# if defined(__GNUC__) && !defined(RT_OS_DARWIN) && defined(RT_ARCH_AMD64)
206/** Workaround for ELF+GCC problem on 64-bit hosts.
207 * (GCC emits a mov with a R_X86_64_32 reloc, we need R_X86_64_64.) */
208DECLINLINE(PSUPGLOBALINFOPAGE) SUPGetGIP(void)
209{
210 PSUPGLOBALINFOPAGE pGIP;
211 __asm__ __volatile__ ("movabs $g_SUPGlobalInfoPage,%0\n\t"
212 : "=a" (pGIP));
213 return pGIP;
214}
215# define g_pSUPGlobalInfoPage (SUPGetGIP())
216# else
217# define g_pSUPGlobalInfoPage (&g_SUPGlobalInfoPage)
218# endif
219#else
220extern DECLIMPORT(PSUPGLOBALINFOPAGE) g_pSUPGlobalInfoPage;
221#endif
222
223
224/**
225 * Gets the TSC frequency of the calling CPU.
226 *
227 * @returns TSC frequency.
228 * @param pGip The GIP pointer.
229 */
230DECLINLINE(uint64_t) SUPGetCpuHzFromGIP(PSUPGLOBALINFOPAGE pGip)
231{
232 unsigned iCpu;
233
234 if (RT_UNLIKELY(!pGip || pGip->u32Magic != SUPGLOBALINFOPAGE_MAGIC))
235 return ~(uint64_t)0;
236
237 if (pGip->u32Mode != SUPGIPMODE_ASYNC_TSC)
238 iCpu = 0;
239 else
240 {
241 iCpu = ASMGetApicId();
242 if (RT_UNLIKELY(iCpu >= RT_ELEMENTS(pGip->aCPUs)))
243 return ~(uint64_t)0;
244 }
245
246 return pGip->aCPUs[iCpu].u64CpuHz;
247}
248
249
250#ifdef IN_RING3
251
252/** @defgroup grp_sup_r3 SUP Host Context Ring 3 API
253 * @ingroup grp_sup
254 * @{
255 */
256
257/**
258 * Installs the support library.
259 *
260 * @returns VBox status code.
261 */
262SUPR3DECL(int) SUPInstall(void);
263
264/**
265 * Uninstalls the support library.
266 *
267 * @returns VBox status code.
268 */
269SUPR3DECL(int) SUPUninstall(void);
270
271/**
272 * Initializes the support library.
273 * Each succesful call to SUPInit() must be countered by a
274 * call to SUPTerm(false).
275 *
276 * @returns VBox status code.
277 * @param ppSession Where to store the session handle. Defaults to NULL.
278 * @param cbReserve The number of bytes of contiguous memory that should be reserved by
279 * the runtime / support library.
280 * Set this to 0 if no reservation is required. (default)
281 * Set this to ~0 if the maximum amount supported by the VM is to be
282 * attempted reserved, or the maximum available.
283 */
284#ifdef __cplusplus
285SUPR3DECL(int) SUPInit(PSUPDRVSESSION *ppSession = NULL, size_t cbReserve = 0);
286#else
287SUPR3DECL(int) SUPInit(PSUPDRVSESSION *ppSession, size_t cbReserve);
288#endif
289
290/**
291 * Terminates the support library.
292 *
293 * @returns VBox status code.
294 * @param fForced Forced termination. This means to ignore the
295 * init call count and just terminated.
296 */
297#ifdef __cplusplus
298SUPR3DECL(int) SUPTerm(bool fForced = false);
299#else
300SUPR3DECL(int) SUPTerm(int fForced);
301#endif
302
303/**
304 * Sets the ring-0 VM handle for use with fast IOCtls.
305 *
306 * @returns VBox status code.
307 * @param pVMR0 The ring-0 VM handle.
308 * NIL_RTR0PTR can be used to unset the handle when the
309 * VM is about to be destroyed.
310 */
311SUPR3DECL(int) SUPSetVMForFastIOCtl(PVMR0 pVMR0);
312
313/**
314 * Calls the HC R0 VMM entry point.
315 * See VMMR0Entry() for more details.
316 *
317 * @returns error code specific to uFunction.
318 * @param pVMR0 Pointer to the Ring-0 (Host Context) mapping of the VM structure.
319 * @param uOperation Operation to execute.
320 * @param pvArg Argument.
321 */
322SUPR3DECL(int) SUPCallVMMR0(PVMR0 pVMR0, unsigned uOperation, void *pvArg);
323
324/**
325 * Calls the HC R0 VMM entry point, in a safer but slower manner than SUPCallVMMR0.
326 * When entering using this call the R0 components can call into the host kernel
327 * (i.e. use the SUPR0 and RT APIs).
328 *
329 * See VMMR0Entry() for more details.
330 *
331 * @returns error code specific to uFunction.
332 * @param pVMR0 Pointer to the Ring-0 (Host Context) mapping of the VM structure.
333 * @param uOperation Operation to execute.
334 * @param pvArg Pointer to argument structure or if cbArg is 0 just an value.
335 * @param cbArg The size of the argument. This is used to copy whatever the argument
336 * points at into a kernel buffer to avoid problems like the user page
337 * being invalidated while we're executing the call.
338 */
339SUPR3DECL(int) SUPCallVMMR0Ex(PVMR0 pVMR0, unsigned uOperation, void *pvArg, unsigned cbArg);
340
341/**
342 * Queries the paging mode of the host OS.
343 *
344 * @returns The paging mode.
345 */
346SUPR3DECL(SUPPAGINGMODE) SUPGetPagingMode(void);
347
348/**
349 * Allocate zero-filled pages.
350 *
351 * Use this to allocate a number of pages rather than using RTMem*() and mess with
352 * alignment. The returned address is of course page aligned. Call SUPPageFree()
353 * to free the pages once done with them.
354 *
355 * @returns VBox status.
356 * @param cPages Number of pages to allocate.
357 * @param ppvPages Where to store the base pointer to the allocated pages.
358 */
359SUPR3DECL(int) SUPPageAlloc(size_t cPages, void **ppvPages);
360
361/**
362 * Frees pages allocated with SUPPageAlloc().
363 *
364 * @returns VBox status.
365 * @param pvPages Pointer returned by SUPPageAlloc().
366 * @param cPages Number of pages that was allocated.
367 */
368SUPR3DECL(int) SUPPageFree(void *pvPages, size_t cPages);
369
370/**
371 * Allocate zero-filled locked pages.
372 *
373 * Use this to allocate a number of pages rather than using RTMem*() and mess with
374 * alignment. The returned address is of course page aligned. Call SUPPageFreeLocked()
375 * to free the pages once done with them.
376 *
377 * @returns VBox status.
378 * @param cPages Number of pages to allocate.
379 * @param ppvPages Where to store the base pointer to the allocated pages.
380 */
381SUPR3DECL(int) SUPPageAllocLocked(size_t cPages, void **ppvPages);
382
383/**
384 * Frees locked pages allocated with SUPPageAllocLocked().
385 *
386 * @returns VBox status.
387 * @param pvPages Pointer returned by SUPPageAlloc().
388 * @param cPages Number of pages that was allocated.
389 */
390SUPR3DECL(int) SUPPageFreeLocked(void *pvPages, size_t cPages);
391
392/**
393 * Locks down the physical memory backing a virtual memory
394 * range in the current process.
395 *
396 * @returns VBox status code.
397 * @param pvStart Start of virtual memory range.
398 * Must be page aligned.
399 * @param cPages Number of pages.
400 * @param paPages Where to store the physical page addresses returned.
401 * On entry this will point to an array of with cbMemory >> PAGE_SHIFT entries.
402 */
403SUPR3DECL(int) SUPPageLock(void *pvStart, size_t cPages, PSUPPAGE paPages);
404
405/**
406 * Releases locked down pages.
407 *
408 * @returns VBox status code.
409 * @param pvStart Start of virtual memory range previously locked
410 * down by SUPPageLock().
411 */
412SUPR3DECL(int) SUPPageUnlock(void *pvStart);
413
414/**
415 * Allocated memory with page aligned memory with a contiguous and locked physical
416 * memory backing below 4GB.
417 *
418 * @returns Pointer to the allocated memory (virtual address).
419 * *pHCPhys is set to the physical address of the memory.
420 * The returned memory must be freed using SUPContFree().
421 * @returns NULL on failure.
422 * @param cPages Number of pages to allocate.
423 * @param pHCPhys Where to store the physical address of the memory block.
424 */
425SUPR3DECL(void *) SUPContAlloc(size_t cPages, PRTHCPHYS pHCPhys);
426
427/**
428 * Allocated memory with page aligned memory with a contiguous and locked physical
429 * memory backing below 4GB.
430 *
431 * @returns Pointer to the allocated memory (virtual address).
432 * *pHCPhys is set to the physical address of the memory.
433 * If ppvR0 isn't NULL, *ppvR0 is set to the ring-0 mapping.
434 * The returned memory must be freed using SUPContFree().
435 * @returns NULL on failure.
436 * @param cPages Number of pages to allocate.
437 * @param pR0Ptr Where to store the ring-0 mapping of the allocation. (optional)
438 * @param pHCPhys Where to store the physical address of the memory block.
439 *
440 * @remark This 2nd version of this API exists because we're not able to map the
441 * ring-3 mapping executable on WIN64. This is a serious problem in regard to
442 * the world switchers.
443 */
444SUPR3DECL(void *) SUPContAlloc2(size_t cPages, PRTR0PTR pR0Ptr, PRTHCPHYS pHCPhys);
445
446/**
447 * Frees memory allocated with SUPContAlloc().
448 *
449 * @returns VBox status code.
450 * @param pv Pointer to the memory block which should be freed.
451 * @param cPages Number of pages to be freed.
452 */
453SUPR3DECL(int) SUPContFree(void *pv, size_t cPages);
454
455/**
456 * Allocated non contiguous physical memory below 4GB.
457 *
458 * @returns VBox status code.
459 * @returns NULL on failure.
460 * @param cPages Number of pages to allocate.
461 * @param ppvPages Where to store the pointer to the allocated memory.
462 * The pointer stored here on success must be passed to SUPLowFree when
463 * the memory should be released.
464 * @param ppvPagesR0 Where to store the ring-0 pointer to the allocated memory. optional.
465 * @param paPages Where to store the physical addresses of the individual pages.
466 */
467SUPR3DECL(int) SUPLowAlloc(size_t cPages, void **ppvPages, PRTR0PTR ppvPagesR0, PSUPPAGE paPages);
468
469/**
470 * Frees memory allocated with SUPLowAlloc().
471 *
472 * @returns VBox status code.
473 * @param pv Pointer to the memory block which should be freed.
474 * @param cPages Number of pages that was allocated.
475 */
476SUPR3DECL(int) SUPLowFree(void *pv, size_t cPages);
477
478/**
479 * Load a module into R0 HC.
480 *
481 * @returns VBox status code.
482 * @param pszFilename The path to the image file.
483 * @param pszModule The module name. Max 32 bytes.
484 */
485SUPR3DECL(int) SUPLoadModule(const char *pszFilename, const char *pszModule, void **ppvImageBase);
486
487/**
488 * Frees a R0 HC module.
489 *
490 * @returns VBox status code.
491 * @param pszModule The module to free.
492 * @remark This will not actually 'free' the module, there are of course usage counting.
493 */
494SUPR3DECL(int) SUPFreeModule(void *pvImageBase);
495
496/**
497 * Get the address of a symbol in a ring-0 module.
498 *
499 * @returns VBox status code.
500 * @param pszModule The module name.
501 * @param pszSymbol Symbol name. If it's value is less than 64k it's treated like a
502 * ordinal value rather than a string pointer.
503 * @param ppvValue Where to store the symbol value.
504 */
505SUPR3DECL(int) SUPGetSymbolR0(void *pvImageBase, const char *pszSymbol, void **ppvValue);
506
507/**
508 * Load R0 HC VMM code.
509 *
510 * @returns VBox status code.
511 * @deprecated Use SUPLoadModule(pszFilename, "VMMR0.r0", &pvImageBase)
512 */
513SUPR3DECL(int) SUPLoadVMM(const char *pszFilename);
514
515/**
516 * Unloads R0 HC VMM code.
517 *
518 * @returns VBox status code.
519 * @deprecated Use SUPFreeModule().
520 */
521SUPR3DECL(int) SUPUnloadVMM(void);
522
523/**
524 * Get the physical address of the GIP.
525 *
526 * @returns VBox status code.
527 * @param pHCPhys Where to store the physical address of the GIP.
528 */
529SUPR3DECL(int) SUPGipGetPhys(PRTHCPHYS pHCPhys);
530
531/** @} */
532#endif /* IN_RING3 */
533
534
535#ifdef IN_RING0
536/** @defgroup grp_sup_r0 SUP Host Context Ring 0 API
537 * @ingroup grp_sup
538 * @{
539 */
540
541/**
542 * Security objectype.
543 */
544typedef enum SUPDRVOBJTYPE
545{
546 /** The usual invalid object. */
547 SUPDRVOBJTYPE_INVALID = 0,
548 /** Internal network. */
549 SUPDRVOBJTYPE_INTERNAL_NETWORK,
550 /** Internal network interface. */
551 SUPDRVOBJTYPE_INTERNAL_NETWORK_INTERFACE,
552 /** The first invalid object type in this end. */
553 SUPDRVOBJTYPE_END,
554 /** The usual 32-bit type size hack. */
555 SUPDRVOBJTYPE_32_BIT_HACK = 0x7ffffff
556} SUPDRVOBJTYPE;
557
558/**
559 * Object destructor callback.
560 * This is called for reference counted objectes when the count reaches 0.
561 *
562 * @param pvObj The object pointer.
563 * @param pvUser1 The first user argument.
564 * @param pvUser2 The second user argument.
565 */
566typedef DECLCALLBACK(void) FNSUPDRVDESTRUCTOR(void *pvObj, void *pvUser1, void *pvUser2);
567/** Pointer to a FNSUPDRVDESTRUCTOR(). */
568typedef FNSUPDRVDESTRUCTOR *PFNSUPDRVDESTRUCTOR;
569
570SUPR0DECL(void *) SUPR0ObjRegister(PSUPDRVSESSION pSession, SUPDRVOBJTYPE enmType, PFNSUPDRVDESTRUCTOR pfnDestructor, void *pvUser1, void *pvUser2);
571SUPR0DECL(int) SUPR0ObjAddRef(void *pvObj, PSUPDRVSESSION pSession);
572SUPR0DECL(int) SUPR0ObjRelease(void *pvObj, PSUPDRVSESSION pSession);
573SUPR0DECL(int) SUPR0ObjVerifyAccess(void *pvObj, PSUPDRVSESSION pSession, const char *pszObjName);
574
575SUPR0DECL(int) SUPR0LockMem(PSUPDRVSESSION pSession, RTR3PTR pvR3, uint32_t cPages, PSUPPAGE paPages);
576SUPR0DECL(int) SUPR0UnlockMem(PSUPDRVSESSION pSession, RTR3PTR pvR3);
577SUPR0DECL(int) SUPR0ContAlloc(PSUPDRVSESSION pSession, uint32_t cPages, PRTR0PTR ppvR0, PRTR3PTR ppvR3, PRTHCPHYS pHCPhys);
578SUPR0DECL(int) SUPR0ContFree(PSUPDRVSESSION pSession, RTHCUINTPTR uPtr);
579SUPR0DECL(int) SUPR0LowAlloc(PSUPDRVSESSION pSession, uint32_t cPages, PRTR0PTR ppvR0, PRTR3PTR ppvR3, PSUPPAGE paPages);
580SUPR0DECL(int) SUPR0LowFree(PSUPDRVSESSION pSession, RTHCUINTPTR uPtr);
581SUPR0DECL(int) SUPR0MemAlloc(PSUPDRVSESSION pSession, uint32_t cb, PRTR0PTR ppvR0, PRTR3PTR ppvR3);
582SUPR0DECL(int) SUPR0MemGetPhys(PSUPDRVSESSION pSession, RTHCUINTPTR uPtr, PSUPPAGE paPages);
583SUPR0DECL(int) SUPR0MemFree(PSUPDRVSESSION pSession, RTHCUINTPTR uPtr);
584SUPR0DECL(int) SUPR0PageAlloc(PSUPDRVSESSION pSession, uint32_t cb, PRTR3PTR ppvR3);
585SUPR0DECL(int) SUPR0PageGetPhys(PSUPDRVSESSION pSession, RTHCUINTPTR uPtr, uint32_t cPages, PSUPPAGE paPages);
586SUPR0DECL(int) SUPR0PageFree(PSUPDRVSESSION pSession, RTHCUINTPTR uPtr);
587SUPR0DECL(bool) SUPR0PageWasLockedByPageAlloc(PSUPDRVSESSION pSession, RTHCUINTPTR uPtr);
588SUPR0DECL(int) SUPR0GipMap(PSUPDRVSESSION pSession, PRTR3PTR ppGipR3, PRTHCPHYS pHCPhysGid);
589SUPR0DECL(int) SUPR0GipUnmap(PSUPDRVSESSION pSession);
590SUPR0DECL(int) SUPR0Printf(const char *pszFormat, ...);
591
592/** @} */
593#endif
594
595/** @} */
596
597__END_DECLS
598
599#endif
600
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette