Changeset 1480
- Timestamp:
- 03/14/07 19:27:47 (2 years ago)
- Files:
-
- trunk/include/VBox/mm.h (modified) (2 diffs)
- trunk/include/VBox/sup.h (modified) (4 diffs)
- trunk/include/VBox/vm.h (modified) (3 diffs)
- trunk/include/VBox/vm.mac (modified) (1 diff)
- trunk/include/VBox/vmapi.h (modified) (2 diffs)
- trunk/src/VBox/HostDrivers/Support/SUPDRV.h (modified) (2 diffs)
- trunk/src/VBox/HostDrivers/Support/SUPDRVIOC.h (modified) (6 diffs)
- trunk/src/VBox/HostDrivers/Support/SUPDRVShared.c (modified) (54 diffs)
- trunk/src/VBox/HostDrivers/Support/SUPLib.cpp (modified) (6 diffs)
- trunk/src/VBox/HostDrivers/Support/linux/SUPDrv-linux.c (modified) (8 diffs)
- trunk/src/VBox/HostDrivers/Support/testcase/tstInt.cpp (modified) (1 diff)
- trunk/src/VBox/HostDrivers/Support/testcase/tstLow.cpp (modified) (2 diffs)
- trunk/src/VBox/HostDrivers/Support/win32/SUPDrv-win32.cpp (modified) (6 diffs)
- trunk/src/VBox/VMM/MM.cpp (modified) (3 diffs)
- trunk/src/VBox/VMM/MMHyper.cpp (modified) (3 diffs)
- trunk/src/VBox/VMM/MMInternal.h (modified) (3 diffs)
- trunk/src/VBox/VMM/MMPagePool.cpp (modified) (1 diff)
- trunk/src/VBox/VMM/SELM.cpp (modified) (1 diff)
- trunk/src/VBox/VMM/SELMInternal.h (modified) (1 diff)
- trunk/src/VBox/VMM/VM.cpp (modified) (6 diffs)
- trunk/src/VBox/VMM/VMMAll/MMAll.cpp (modified) (1 diff)
- trunk/src/VBox/VMM/testcase/tstVMStructGC.cpp (modified) (2 diffs)
- trunk/src/VBox/VMM/testcase/tstVMStructSize.cpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/include/VBox/mm.h
r834 r1480 25 25 #include <VBox/types.h> 26 26 #include <VBox/x86.h> 27 #include <VBox/sup.h> 27 28 28 29 … … 767 768 768 769 /** 770 * Maps locked R3 virtual memory into the hypervisor region in the GC. 771 * 772 * @return VBox status code. 773 * 774 * @param pVM VM handle. 775 * @param pvR3 The ring-3 address of the memory, must be page aligned. 776 * @param pvR0 The ring-0 address of the memory, must be page aligned. (optional) 777 * @param cPages The number of pages. 778 * @param paPages The page descriptors. 779 * @param pszDesc Mapping description. 780 * @param pGCPtr Where to store the GC address corresponding to pvHC. 781 */ 782 MMR3DECL(int) MMR3HyperMapPages(PVM pVM, void *pvR3, RTR0PTR pvR0, size_t cPages, PCSUPPAGE paPages, const char *pszDesc, PRTGCPTR pGCPtr); 783 784 /** 769 785 * Reserves a hypervisor memory area. 770 786 * Most frequent usage is fence pages and dynamically mappings like the guest PD and PDPTR. trunk/include/VBox/sup.h
r1027 r1480 33 33 */ 34 34 35 /** Physical page. 35 /** 36 * Physical page descriptor. 36 37 */ 37 38 #pragma pack(4) /* space is more important. */ … … 42 43 /** Reserved entry for internal use by the caller. */ 43 44 RTHCUINTPTR uReserved; 44 } SUPPAGE , *PSUPPAGE;45 } SUPPAGE; 45 46 #pragma pack() 47 /** Pointer to a page descriptor. */ 48 typedef SUPPAGE *PSUPPAGE; 49 /** Pointer to a const page descriptor. */ 50 typedef const SUPPAGE *PCSUPPAGE; 46 51 47 52 /** … … 428 433 * The pointer stored here on success must be passed to SUPLowFree when 429 434 * the memory should be released. 435 * @param ppvPagesR0 Where to store the ring-0 pointer to the allocated memory. optional. 430 436 * @param paPages Where to store the physical addresses of the individual pages. 431 437 */ 432 SUPR3DECL(int) SUPLowAlloc(unsigned cPages, void **ppvPages, P SUPPAGE paPages);438 SUPR3DECL(int) SUPLowAlloc(unsigned cPages, void **ppvPages, PRTR0PTR ppvPagesR0, PSUPPAGE paPages); 433 439 434 440 /** … … 537 543 SUPR0DECL(int) SUPR0ObjVerifyAccess(void *pvObj, PSUPDRVSESSION pSession, const char *pszObjName); 538 544 539 SUPR0DECL(int) SUPR0LockMem(PSUPDRVSESSION pSession, void *pvR3, unsignedcb, PSUPPAGE paPages);540 SUPR0DECL(int) SUPR0UnlockMem(PSUPDRVSESSION pSession, void *pvR3);541 SUPR0DECL(int) SUPR0ContAlloc(PSUPDRVSESSION pSession, u nsigned cb, void **ppvR0, PRTR3PTR ppvR3, PRTHCPHYS pHCPhys);542 SUPR0DECL(int) SUPR0ContFree(PSUPDRVSESSION pSession, void *pv);543 SUPR0DECL(int) SUPR0LowAlloc(PSUPDRVSESSION pSession, u nsigned cPages, void **ppvR3, PSUPPAGE paPages);544 SUPR0DECL(int) SUPR0LowFree(PSUPDRVSESSION pSession, void *pv);545 SUPR0DECL(int) SUPR0MemAlloc(PSUPDRVSESSION pSession, u nsigned cb, void **ppvR0, void **ppvR3);546 SUPR0DECL(int) SUPR0MemGetPhys(PSUPDRVSESSION pSession, void *pv, PSUPPAGE paPages);547 SUPR0DECL(int) SUPR0MemFree(PSUPDRVSESSION pSession, void *pv);548 SUPR0DECL(int) SUPR0GipMap(PSUPDRVSESSION pSession, PCSUPGLOBALINFOPAGE *ppGip, RTHCPHYS *pHCPhysGid);545 SUPR0DECL(int) SUPR0LockMem(PSUPDRVSESSION pSession, RTR3PTR pvR3, uint32_t cb, PSUPPAGE paPages); 546 SUPR0DECL(int) SUPR0UnlockMem(PSUPDRVSESSION pSession, RTR3PTR pvR3); 547 SUPR0DECL(int) SUPR0ContAlloc(PSUPDRVSESSION pSession, uint32_t cb, PRTR0PTR ppvR0, PRTR3PTR ppvR3, PRTHCPHYS pHCPhys); 548 SUPR0DECL(int) SUPR0ContFree(PSUPDRVSESSION pSession, RTHCUINTPTR uPtr); 549 SUPR0DECL(int) SUPR0LowAlloc(PSUPDRVSESSION pSession, uint32_t cPages, PRTR0PTR ppvR0, PRTR3PTR ppvR3, PSUPPAGE paPages); 550 SUPR0DECL(int) SUPR0LowFree(PSUPDRVSESSION pSession, RTHCUINTPTR uPtr); 551 SUPR0DECL(int) SUPR0MemAlloc(PSUPDRVSESSION pSession, uint32_t cb, PRTR0PTR ppvR0, PRTR3PTR ppvR3); 552 SUPR0DECL(int) SUPR0MemGetPhys(PSUPDRVSESSION pSession, RTHCUINTPTR uPtr, PSUPPAGE paPages); 553 SUPR0DECL(int) SUPR0MemFree(PSUPDRVSESSION pSession, RTHCUINTPTR uPtr); 554 SUPR0DECL(int) SUPR0GipMap(PSUPDRVSESSION pSession, PCSUPGLOBALINFOPAGE *ppGip, PRTHCPHYS pHCPhysGid); 549 555 SUPR0DECL(int) SUPR0GipUnmap(PSUPDRVSESSION pSession); 550 556 SUPR0DECL(int) SUPR0Printf(const char *pszFormat, ...); trunk/include/VBox/vm.h
r1283 r1480 28 28 #include <VBox/stam.h> 29 29 #include <VBox/vmapi.h> 30 #include <VBox/sup.h> 30 31 31 32 … … 227 228 */ 228 229 volatile uint32_t fForcedActions; 229 /** P hysical address (real) of this structure. */230 R THCPHYS HCPhysVM;230 /** Pointer to the array of page descriptors for the VM structure allocation. */ 231 R3PTRTYPE(PSUPPAGE) paVMPagesR3; 231 232 /** Session handle. For use when calling SUPR0 APIs. */ 232 233 HCPTRTYPE(PSUPDRVSESSION) pSession; … … 318 319 319 320 /* padding to make gnuc put the StatQemuToGC where msc does. */ 320 #if HC_ARCH_BITS == 32321 /*#if HC_ARCH_BITS == 32 321 322 uint32_t padding0; 322 #endif 323 #endif*/ 323 324 324 325 /** Profiling the total time from Qemu to GC. */ trunk/include/VBox/vm.mac
r1283 r1480 40 40 .enmVMState resd 1 41 41 .fForcedActions resd 1 42 . HCPhysVM resq142 .paVMPagesR3 RTR3PTR_RES 1 43 43 .pSession RTR3PTR_RES 1 44 44 .pNext RTHCPTR_RES 1 trunk/include/VBox/vmapi.h
r869 r1480 36 36 * @{ */ 37 37 38 /** @def VM_PHYS_ADDR39 * Converts address of data within the VM structure to the equivalent40 * physical address.41 *42 * @returns physical address.43 * @param pVM Pointer to the VM.44 * @param pvInVM Pointer within the VM.45 */46 #define VM_PHYS_ADDR(pVM, pvInVM) ( pVM->PhysVM + (uint32_t)((uintptr_t)pvInVM - (uintptr_t)pVM) )47 48 38 /** @def VM_GUEST_ADDR 49 * Converts host address of data within the VM structure to the equivalent39 * Converts a current context address of data within the VM structure to the equivalent 50 40 * guest address. 51 41 * 52 42 * @returns guest virtual address. 53 43 * @param pVM Pointer to the VM. 54 * @param pvInVM HC Pointer within the VM. 55 */ 56 #define VM_GUEST_ADDR(pVM, pvInVM) ( (RTGCPTR)((RTGCUINTPTR)pVM->pVMGC + (uint32_t)((uintptr_t)(pvInVM) - (uintptr_t)pVM->pVMHC)) ) 44 * @param pvInVM CC Pointer within the VM. 45 */ 46 #ifdef IN_RING3 47 # define VM_GUEST_ADDR(pVM, pvInVM) ( (RTGCPTR)((RTGCUINTPTR)pVM->pVMGC + (uint32_t)((uintptr_t)(pvInVM) - (uintptr_t)pVM->pVMR3)) ) 48 #elif defined(IN_RING0) 49 # define VM_GUEST_ADDR(pVM, pvInVM) ( (RTGCPTR)((RTGCUINTPTR)pVM->pVMGC + (uint32_t)((uintptr_t)(pvInVM) - (uintptr_t)pVM->pVMR0)) ) 50 #else 51 # define VM_GUEST_ADDR(pVM, pvInVM) ( (RTGCPTR)(pvInVM) ) 52 #endif 53 54 /** @def VM_R3_ADDR 55 * Converts a current context address of data within the VM structure to the equivalent 56 * ring-3 host address. 57 * 58 * @returns host virtual address. 59 * @param pVM Pointer to the VM. 60 * @param pvInVM CC pointer within the VM. 61 */ 62 #ifdef IN_GC 63 # define VM_R3_ADDR(pVM, pvInVM) ( (RTR3PTR)((RTR3UINTPTR)pVM->pVMR3 + (uint32_t)((uintptr_t)(pvInVM) - (uintptr_t)pVM->pVMGC)) ) 64 #elif defined(IN_RING0) 65 # define VM_R3_ADDR(pVM, pvInVM) ( (RTR3PTR)((RTR3UINTPTR)pVM->pVMR3 + (uint32_t)((uintptr_t)(pvInVM) - (uintptr_t)pVM->pVMR0)) ) 66 #else 67 # define VM_R3_ADDR(pVM, pvInVM) ( (RTR3PTR)(pvInVM) ) 68 #endif 69 70 71 /** @def VM_R0_ADDR 72 * Converts a current context address of data within the VM structure to the equivalent 73 * ring-0 host address. 74 * 75 * @returns host virtual address. 76 * @param pVM Pointer to the VM. 77 * @param pvInVM CC pointer within the VM. 78 */ 79 #ifdef IN_GC 80 # define VM_R0_ADDR(pVM, pvInVM) ( (RTR0PTR)((RTR0UINTPTR)pVM->pVMR0 + (uint32_t)((uintptr_t)(pvInVM) - (uintptr_t)pVM->pVMGC)) ) 81 #elif defined(IN_RING3) 82 # define VM_R0_ADDR(pVM, pvInVM) ( (RTR0PTR)((RTR0UINTPTR)pVM->pVMR0 + (uint32_t)((uintptr_t)(pvInVM) - (uintptr_t)pVM->pVMR3)) ) 83 #else 84 # define VM_R0_ADDR(pVM, pvInVM) ( (RTR0PTR)(pvInVM) ) 85 #endif 57 86 58 87 /** @def VM_HOST_ADDR … … 63 92 * @param pVM Pointer to the VM. 64 93 * @param pvInVM GC Pointer within the VM. 94 * @deprecated 65 95 */ 66 96 #define VM_HOST_ADDR(pVM, pvInVM) ( (RTHCPTR)((RTHCUINTPTR)pVM->pVMHC + (uint32_t)((uintptr_t)(pvInVM) - (uintptr_t)pVM->pVMGC)) ) 97 67 98 68 99 trunk/src/VBox/HostDrivers/Support/SUPDRV.h
r1193 r1480 357 357 /** Pointer to the R3 mapping of the memory. 358 358 * Set to NULL if N/A. */ 359 void *pvR3;359 RTR3PTR pvR3; 360 360 /** Size of the locked memory. */ 361 361 unsigned cb; … … 662 662 int VBOXCALL supdrvOSLockMemOne(PSUPDRVMEMREF pMem, PSUPPAGE paPages); 663 663 void VBOXCALL supdrvOSUnlockMemOne(PSUPDRVMEMREF pMem); 664 int VBOXCALL supdrvOSContAllocOne(PSUPDRVMEMREF pMem, void **ppvR0, void **ppvR3, PRTHCPHYS pHCPhys);664 int VBOXCALL supdrvOSContAllocOne(PSUPDRVMEMREF pMem, PRTR0PTR ppvR0, PRTR3PTR ppvR3, PRTHCPHYS pHCPhys); 665 665 void VBOXCALL supdrvOSContFreeOne(PSUPDRVMEMREF pMem); 666 int VBOXCALL supdrvOSLowAllocOne(PSUPDRVMEMREF pMem, void **ppvR3, PSUPPAGE paPages);666 int VBOXCALL supdrvOSLowAllocOne(PSUPDRVMEMREF pMem, PRTR0PTR ppvR0, PRTR3PTR ppvR3, PSUPPAGE paPages); 667 667 void VBOXCALL supdrvOSLowFreeOne(PSUPDRVMEMREF pMem); 668 int VBOXCALL supdrvOSMemAllocOne(PSUPDRVMEMREF pMem, void **ppvR0, void **ppvR3);668 int VBOXCALL supdrvOSMemAllocOne(PSUPDRVMEMREF pMem, PRTR0PTR ppvR0, PRTR3PTR ppvR3); 669 669 void VBOXCALL supdrvOSMemGetPages(PSUPDRVMEMREF pMem, PSUPPAGE paPages); 670 670 void VBOXCALL supdrvOSMemFreeOne(PSUPDRVMEMREF pMem); trunk/src/VBox/HostDrivers/Support/SUPDRVIOC.h
r1193 r1480 181 181 #define SUPCOOKIE_MAGIC "The Magic Word!" 182 182 /** Current interface version. */ 183 #define SUPDRVIOC_VERSION 0x0004000 0183 #define SUPDRVIOC_VERSION 0x00040001 184 184 185 185 /** SUP_IOCTL_COOKIE Output. */ … … 263 263 uint32_t u32SessionCookie; 264 264 /** Start of page range. Must be PAGE aligned. */ 265 void *pv;265 RTR3PTR pvR3; 266 266 /** Size of the range. Must be PAGE aligned. */ 267 267 uint32_t cb; … … 285 285 uint32_t u32SessionCookie; 286 286 /** Start of page range of a range previuosly pinned. */ 287 void *pv;287 RTR3PTR pvR3; 288 288 } SUPUNPINPAGES_IN, *PSUPUNPINPAGES_IN; 289 289 … … 320 320 /** Session cookie. */ 321 321 uint32_t u32SessionCookie; 322 /** The address (virtual, not physical address)of the memory to free. */323 void *pv;322 /** The ring-3 address of the memory to free. */ 323 RTR3PTR pvR3; 324 324 } SUPCONTFREE_IN, *PSUPCONTFREE_IN; 325 325 … … 511 511 typedef struct SUPLOWALLOC_OUT 512 512 { 513 /** The address (virtual & linear) of the allocated memory. */ 514 void *pvVirt; 513 /** The ring-3 address of the allocated memory. */ 514 RTR3PTR pvR3; 515 /** The ring-0 address of the allocated memory. */ 516 RTR0PTR pvR0; 515 517 /** Array of pages. */ 516 518 SUPPAGE aPages[1]; … … 525 527 /** Session cookie. */ 526 528 uint32_t u32SessionCookie; 527 /** The address (virtual, not physical address)of the memory to free. */528 void *pv;529 /** The ring-3 address of the memory to free. */ 530 RTR3PTR pvR3; 529 531 } SUPLOWFREE_IN, *PSUPLOWFREE_IN; 530 532 trunk/src/VBox/HostDrivers/Support/SUPDRVShared.c
r1193 r1480 146 146 __BEGIN_DECLS 147 147 static int supdrvMemAdd(PSUPDRVMEMREF pMem, PSUPDRVSESSION pSession); 148 static int supdrvMemRelease(PSUPDRVSESSION pSession, void *pv, SUPDRVMEMREFTYPE eType);148 static int supdrvMemRelease(PSUPDRVSESSION pSession, RTHCUINTPTR uPtr, SUPDRVMEMREFTYPE eType); 149 149 #ifndef VBOX_WITHOUT_IDT_PATCHING 150 150 static int supdrvIOCtl_IdtInstall(PSUPDRVDEVEXT pDevExt, PSUPDRVSESSION pSession, PSUPIDTINSTALL_IN pIn, PSUPIDTINSTALL_OUT pOut); … … 644 644 || cbOut != sizeof(*pOut)) 645 645 { 646 dprintf(("SUP_IOCTL_COOKIE: Invalid input/output sizes. cbIn=% d expected %d. cbOut=%d expected %d.\n",647 cbIn, sizeof(*pIn), cbOut,sizeof(*pOut)));646 dprintf(("SUP_IOCTL_COOKIE: Invalid input/output sizes. cbIn=%ld expected %ld. cbOut=%ld expected %ld.\n", 647 (long)cbIn, (long)sizeof(*pIn), (long)cbOut, (long)sizeof(*pOut))); 648 648 return SUPDRV_ERR_INVALID_PARAM; 649 649 } … … 685 685 || cbOut < sizeof(*pOut)) 686 686 { 687 dprintf(("SUP_IOCTL_QUERY_FUNCS: Invalid input/output sizes. cbIn=% d expected %d. cbOut=%d expected %d.\n",688 cbIn, sizeof(*pIn), cbOut,sizeof(*pOut)));687 dprintf(("SUP_IOCTL_QUERY_FUNCS: Invalid input/output sizes. cbIn=%ld expected %ld. cbOut=%ld expected %ld.\n", 688 (long)cbIn, (long)sizeof(*pIn), (long)cbOut, (long)sizeof(*pOut))); 689 689 return SUPDRV_ERR_INVALID_PARAM; 690 690 } … … 723 723 || cbOut != sizeof(*pOut)) 724 724 { 725 dprintf(("SUP_IOCTL_INSTALL: Invalid input/output sizes. cbIn=% d expected %d. cbOut=%d expected %d.\n",726 cbIn, sizeof(*pIn), cbOut,sizeof(*pOut)));725 dprintf(("SUP_IOCTL_INSTALL: Invalid input/output sizes. cbIn=%ld expected %ld. cbOut=%ld expected %ld.\n", 726 (long)cbIn, (long)sizeof(*pIn), (long)cbOut, (long)sizeof(*pOut))); 727 727 return SUPDRV_ERR_INVALID_PARAM; 728 728 } … … 756 756 || cbOut != 0) 757 757 { 758 dprintf(("SUP_IOCTL_REMOVE: Invalid input/output sizes. cbIn=% d expected %d. cbOut=%d expected %d.\n",759 cbIn, sizeof(*pIn), cbOut,0));758 dprintf(("SUP_IOCTL_REMOVE: Invalid input/output sizes. cbIn=%ld expected %ld. cbOut=%ld expected %ld.\n", 759 (long)cbIn, (long)sizeof(*pIn), (long)cbOut, (long)0)); 760 760 return SUPDRV_ERR_INVALID_PARAM; 761 761 } … … 788 788 || cbOut < sizeof(*pOut)) 789 789 { 790 dprintf(("SUP_IOCTL_PINPAGES: Invalid input/output sizes. cbIn=% d expected %d. cbOut=%d expected %d.\n",791 cbIn, sizeof(*pIn), cbOut,sizeof(*pOut)));790 dprintf(("SUP_IOCTL_PINPAGES: Invalid input/output sizes. cbIn=%ld expected %ld. cbOut=%ld expected %ld.\n", 791 (long)cbIn, (long)sizeof(*pIn), (long)cbOut, (long)sizeof(*pOut))); 792 792 return SUPDRV_ERR_INVALID_PARAM; 793 793 } … … 799 799 return SUPDRV_ERR_INVALID_MAGIC; 800 800 } 801 if (pIn->cb <= 0 || !pIn->pv )802 { 803 dprintf(("SUP_IOCTL_PINPAGES: Illegal request %p %d\n", pIn->pv, pIn->cb));801 if (pIn->cb <= 0 || !pIn->pvR3) 802 { 803 dprintf(("SUP_IOCTL_PINPAGES: Illegal request %p %d\n", (void *)pIn->pvR3, pIn->cb)); 804 804 return SUPDRV_ERR_INVALID_PARAM; 805 805 } … … 815 815 */ 816 816 *pcbReturned = RT_OFFSETOF(SUPPINPAGES_OUT, aPages[pIn->cb >> PAGE_SHIFT]); 817 rc = SUPR0LockMem(pSession, pIn->pv , pIn->cb, &pOut->aPages[0]);817 rc = SUPR0LockMem(pSession, pIn->pvR3, pIn->cb, &pOut->aPages[0]); 818 818 if (rc) 819 819 *pcbReturned = 0; … … 832 832 || cbOut != 0) 833 833 { 834 dprintf(("SUP_IOCTL_UNPINPAGES: Invalid input/output sizes. cbIn=% d expected %d. cbOut=%d expected %d.\n",835 cbIn, sizeof(*pIn), cbOut,0));834 dprintf(("SUP_IOCTL_UNPINPAGES: Invalid input/output sizes. cbIn=%ld expected %ld. cbOut=%ld expected %ld.\n", 835 (long)cbIn, (long)sizeof(*pIn), (long)cbOut, (long)0)); 836 836 return SUPDRV_ERR_INVALID_PARAM; 837 837 } … … 847 847 * Execute. 848 848 */ 849 return SUPR0UnlockMem(pSession, pIn->pv );849 return SUPR0UnlockMem(pSession, pIn->pvR3); 850 850 } 851 851 … … 862 862 || cbOut < sizeof(*pOut)) 863 863 { 864 dprintf(("SUP_IOCTL_CONT_ALLOC: Invalid input/output sizes. cbIn=% d expected %d. cbOut=%d expected %d.\n",865 cbIn, sizeof(*pIn), cbOut,sizeof(*pOut)));864 dprintf(("SUP_IOCTL_CONT_ALLOC: Invalid input/output sizes. cbIn=%ld expected %ld. cbOut=%ld expected %ld.\n", 865 (long)cbIn, (long)sizeof(*pIn), (long)cbOut, (long)sizeof(*pOut))); 866 866 return SUPDRV_ERR_INVALID_PARAM; 867 867 } … … 894 894 || cbOut != 0) 895 895 { 896 dprintf(("SUP_IOCTL_CONT_FREE: Invalid input/output sizes. cbIn=% d expected %d. cbOut=%d expected %d.\n",897 cbIn, sizeof(*pIn), cbOut,0));896 dprintf(("SUP_IOCTL_CONT_FREE: Invalid input/output sizes. cbIn=%ld expected %ld. cbOut=%ld expected %ld.\n", 897 (long)cbIn, (long)sizeof(*pIn), (long)cbOut, (long)0)); 898 898 return SUPDRV_ERR_INVALID_PARAM; 899 899 } … … 909 909 * Execute. 910 910 */ 911 return SUPR0ContFree(pSession, pIn->pv);911 return SUPR0ContFree(pSession, (RTHCUINTPTR)pIn->pvR3); 912 912 } 913 913 … … 924 924 || cbOut != sizeof(*pOut)) 925 925 { 926 dprintf(("SUP_IOCTL_LDR_OPEN: Invalid input/output sizes. cbIn=% d expected %d. cbOut=%d expected %d.\n",927 cbIn, sizeof(*pIn), cbOut,sizeof(*pOut)));926 dprintf(("SUP_IOCTL_LDR_OPEN: Invalid input/output sizes. cbIn=%ld expected %ld. cbOut=%ld expected %ld.\n", 927 (long)cbIn, (long)sizeof(*pIn), (long)cbOut, (long)sizeof(*pOut))); 928 928 return SUPDRV_ERR_INVALID_PARAM; 929 929 } … … 972 972 || cbOut != 0) 973 973 { 974 dprintf(("SUP_IOCTL_LDR_LOAD: Invalid input/output sizes. cbIn=% d expected greater than %d. cbOut=%d expected %d.\n",975 cbIn, sizeof(*pIn), cbOut,0));974 dprintf(("SUP_IOCTL_LDR_LOAD: Invalid input/output sizes. cbIn=%ld expected greater than %ld. cbOut=%ld expected %ld.\n", 975 (long)cbIn, (long)sizeof(*pIn), (long)cbOut, (long)0)); 976 976 return SUPDRV_ERR_INVALID_PARAM; 977 977 } … … 1055 1055 || cbOut != 0) 1056 1056 { 1057 dprintf(("SUP_IOCTL_LDR_FREE: Invalid input/output sizes. cbIn=% d expected %d. cbOut=%d expected %d.\n",1058 cbIn, sizeof(*pIn), cbOut,0));1057 dprintf(("SUP_IOCTL_LDR_FREE: Invalid input/output sizes. cbIn=%ld expected %ld. cbOut=%ld expected %ld.\n", 1058 (long)cbIn, (long)sizeof(*pIn), (long)cbOut, (long)0)); 1059 1059 return SUPDRV_ERR_INVALID_PARAM; 1060 1060 } … … 1102 1102 if (pszEnd - &pIn->szSymbol[0] >= 1024) 1103 1103 { 1104 dprintf(("SUP_IOCTL_LDR_GET_SYMBOL: The symbol name too long (% d chars, max is %d)!\n",1105 pszEnd - &pIn->szSymbol[0], 1024));1104 dprintf(("SUP_IOCTL_LDR_GET_SYMBOL: The symbol name too long (%ld chars, max is %d)!\n", 1105 (long)(pszEnd - &pIn->szSymbol[0]), 1024)); 1106 1106 return SUPDRV_ERR_INVALID_PARAM; 1107 1107 } … … 1125 1125 || cbOut != sizeof(*pOut)) 1126 1126 { 1127 dprintf(("SUP_IOCTL_CALL_VMMR0: Invalid input/output sizes. cbIn=% d expected %d. cbOut=%d expected %d.\n",1128 cbIn, sizeof(*pIn), cbOut,sizeof(*pOut)));1127 dprintf(("SUP_IOCTL_CALL_VMMR0: Invalid input/output sizes. cbIn=%ld expected %ld. cbOut=%ld expected %ld.\n", 1128 (long)cbIn, (long)sizeof(*pIn), (long)cbOut, (long)sizeof(*pOut))); 1129 1129 return SUPDRV_ERR_INVALID_PARAM; 1130 1130 } … … 1164 1164 || cbOut != sizeof(*pOut)) 1165 1165 { 1166 dprintf(("SUP_IOCTL_GET_PAGING_MODE: Invalid input/output sizes. cbIn=% d expected %d. cbOut=%d expected %d.\n",1167 cbIn, sizeof(*pIn), cbOut,sizeof(*pOut)));1166 dprintf(("SUP_IOCTL_GET_PAGING_MODE: Invalid input/output sizes. cbIn=%ld expected %ld. cbOut=%ld expected %ld.\n", 1167 (long)cbIn, (long)sizeof(*pIn), (long)cbOut, (long)sizeof(*pOut))); 1168 1168 return SUPDRV_ERR_INVALID_PARAM; 1169 1169 } … … 1199 1199 || cbOut < sizeof(*pOut)) 1200 1200 { 1201 dprintf(("SUP_IOCTL_LOW_ALLOC: Invalid input/output sizes. cbIn=% d expected %d. cbOut=%d expected %d.\n",1202 cbIn, sizeof(*pIn), cbOut,sizeof(*pOut)));1201 dprintf(("SUP_IOCTL_LOW_ALLOC: Invalid input/output sizes. cbIn=%ld expected %ld. cbOut=%ld expected %ld.\n", 1202 (long)cbIn, (long)sizeof(*pIn), (long)cbOut, (long)sizeof(*pOut))); 1203 1203 return SUPDRV_ERR_INVALID_PARAM; 1204 1204 } … … 1221 1221 */ 1222 1222 *pcbReturned = RT_OFFSETOF(SUPLOWALLOC_OUT, aPages[pIn->cPages]); 1223 rc = SUPR0LowAlloc(pSession, pIn->cPages, &pOut->pv Virt, &pOut->aPages[0]);1223 rc = SUPR0LowAlloc(pSession, pIn->cPages, &pOut->pvR0, &pOut->pvR3, &pOut->aPages[0]); 1224 1224 if (rc) 1225 1225 *pcbReturned = 0; … … 1238 1238 || cbOut != 0) 1239 1239 { 1240 dprintf(("SUP_IOCTL_LOW_FREE: Invalid input/output sizes. cbIn=% d expected %d. cbOut=%d expected %d.\n",1241 cbIn, sizeof(*pIn), cbOut,0));1240 dprintf(("SUP_IOCTL_LOW_FREE: Invalid input/output sizes. cbIn=%ld expected %ld. cbOut=%ld expected %ld.\n", 1241 (long)cbIn, (long)sizeof(*pIn), (long)cbOut, (long)0)); 1242 1242 return SUPDRV_ERR_INVALID_PARAM; 1243 1243 } … … 1253 1253 * Execute. 1254 1254 */ 1255 return SUPR0LowFree(pSession, pIn->pv);1255 return SUPR0LowFree(pSession, (RTHCUINTPTR)pIn->pvR3); 1256 1256 } 1257 1257 … … 1269 1269 || cbOut != sizeof(*pOut)) 1270 1270 { 1271 dprintf(("SUP_IOCTL_GIP_MAP: Invalid input/output sizes. cbIn=% d expected %d. cbOut=%d expected %d.\n",1272 cbIn, sizeof(*pIn), cbOut,0));1271 dprintf(("SUP_IOCTL_GIP_MAP: Invalid input/output sizes. cbIn=%ld expected %ld. cbOut=%ld expected %ld.\n", 1272 (long)cbIn, (long)sizeof(*pIn), (long)cbOut, (long)0)); 1273 1273 return SUPDRV_ERR_INVALID_PARAM; 1274 1274 } … … 1304 1304 || cbOut != 0) 1305 1305 { 1306 dprintf(("SUP_IOCTL_GIP_UNMAP: Invalid input/output sizes. cbIn=% d expected %d. cbOut=%d expected %d.\n",1307 cbIn, sizeof(*pIn), cbOut,0));1306 dprintf(("SUP_IOCTL_GIP_UNMAP: Invalid input/output sizes. cbIn=%ld expected %ld. cbOut=%ld expected %ld.\n", 1307 (long)cbIn, (long)sizeof(*pIn), (long)cbOut, (long)0)); 1308 1308 return SUPDRV_ERR_INVALID_PARAM; 1309 1309 } … … 1333 1333 || cbOut != 0) 1334 1334 { 1335 dprintf(("SUP_IOCTL_SET_VM_FOR_FAST: Invalid input/output sizes. cbIn=% d expected %d. cbOut=%d expected %d.\n",1336 cbIn, sizeof(*pIn), cbOut,0));1335 dprintf(("SUP_IOCTL_SET_VM_FOR_FAST: Invalid input/output sizes. cbIn=%ld expected %ld. cbOut=%ld expected %ld.\n", 1336 (long)cbIn, (long)sizeof(*pIn), (long)cbOut, (long)0)); 1337 1337 return SUPDRV_ERR_INVALID_PARAM; 1338 1338 } … … 1732 1732 * This must be page aligned. 1733 1733 */ 1734 SUPR0DECL(int) SUPR0LockMem(PSUPDRVSESSION pSession, void *pvR3, unsignedcb, PSUPPAGE paPages)1734 SUPR0DECL(int) SUPR0LockMem(PSUPDRVSESSION pSession, RTR3PTR pvR3, uint32_t cb, PSUPPAGE paPages) 1735 1735 { 1736 1736 int rc; 1737 1737 SUPDRVMEMREF Mem = {0}; 1738 1738 dprintf(("SUPR0LockMem: pSession=%p pvR3=%p cb=%d paPages=%p\n", 1739 pSession, pvR3, cb, paPages));1739 pSession, (void *)pvR3, cb, paPages)); 1740 1740 1741 1741 /* 1742 1742 * Verify input. 1743 1743 */ 1744 if (RT_ALIGN_R3PT(pvR3, PAGE_SIZE, void *) != pvR3 || !pvR3)1745 { 1746 dprintf(("pvR3 (%p) must be page aligned and not NULL!\n", pvR3));1744 if (RT_ALIGN_R3PT(pvR3, PAGE_SIZE, RTR3PTR) != pvR3 || !pvR3) 1745 { 1746 dprintf(("pvR3 (%p) must be page aligned and not NULL!\n", (void *)pvR3)); 1747 1747 return SUPDRV_ERR_INVALID_PARAM; 1748 1748 } 1749 if (RT_ALIGN (cb, PAGE_SIZE) != cb)1749 if (RT_ALIGN_Z(cb, PAGE_SIZE) != cb) 1750 1750 { 1751 1751 dprintf(("cb (%u) must be page aligned!\n", cb)); … … 1822 1822 * @param pvR3 Memory to unlock. 1823 1823 */ 1824 SUPR0DECL(int) SUPR0UnlockMem(PSUPDRVSESSION pSession, void *pvR3)1825 { 1826 dprintf(("SUPR0UnlockMem: pSession=%p pvR3=%p\n", pSession, pvR3));1827 return supdrvMemRelease(pSession, pvR3, MEMREF_TYPE_LOCKED);1824 SUPR0DECL(int) SUPR0UnlockMem(PSUPDRVSESSION pSession, RTR3PTR pvR3) 1825 { 1826 dprintf(("SUPR0UnlockMem: pSession=%p pvR3=%p\n", pSession, (void *)pvR3)); 1827 return supdrvMemRelease(pSession, (RTHCUINTPTR)pvR3, MEMREF_TYPE_LOCKED); 1828 1828 } 1829 1829 … … 1837 1837 * @param pSession Session data. 1838 1838 * @param cb Number of bytes to allocate. 1839 * @param ppvR0 Where to put the address of Ring-0 mapping the allocated memory. optional1839 * @param ppvR0 Where to put the address of Ring-0 mapping the allocated memory. 1840 1840 * @param ppvR3 Where to put the address of Ring-3 mapping the allocated memory. 1841 1841 * @param pHCPhys Where to put the physical address of allocated memory. 1842 1842 */ 1843 SUPR0DECL(int) SUPR0ContAlloc(PSUPDRVSESSION pSession, u nsigned cb, void **ppvR0, PRTR3PTR ppvR3, PRTHCPHYS pHCPhys)1843 SUPR0DECL(int) SUPR0ContAlloc(PSUPDRVSESSION pSession, uint32_t cb, PRTR0PTR ppvR0, PRTR3PTR ppvR3, PRTHCPHYS pHCPhys) 1844 1844 { 1845 1845 int rc; … … 1850 1850 * Validate input. 1851 1851 */ 1852 if (!pSession || !ppvR3 || !p HCPhys)1853 { 1854 dprintf(("Null pointer. All of these should be set: pSession=%p ppvR 3=%p pHCPhys=%p\n",1855 pSession, ppvR 3, pHCPhys));1852 if (!pSession || !ppvR3 || !ppvR0 || !pHCPhys) 1853 { 1854 dprintf(("Null pointer. All of these should be set: pSession=%p ppvR0=%p ppvR3=%p pHCPhys=%p\n", 1855 pSession, ppvR0, ppvR3, pHCPhys)); 1856 1856 return SUPDRV_ERR_INVALID_PARAM; 1857 1857 … … 1879 1879 if (!rc) 1880 1880 { 1881 if (ppvR0) 1882 *ppvR0 = RTR0MemObjAddress(Mem.MemObj); 1883 *ppvR3 = RTR0MemObjAddress(Mem.MapObjR3); 1881 *ppvR0 = RTR0MemObjAddress(Mem.MemObj); 1882 *ppvR3 = (RTR3PTR)RTR0MemObjAddress(Mem.MapObjR3); 1884 1883 *pHCPhys = RTR0MemObjGetPagePhysAddr(Mem.MemObj, 0); 1885 1884 return 0; … … 1899 1898 */ 1900 1899 Mem.pvR0 = NULL; 1901 Mem.pvR3 = N ULL;1900 Mem.pvR3 = NIL_RTR3PTR; 1902 1901 Mem.eType = MEMREF_TYPE_CONT; 1903 1902 Mem.cb = cb; … … 1926 1925 * @returns SUPDRV_ERR_* on failure. 1927 1926 * @param pSession The session to which the memory was allocated. 1928 * @param pv Pointer to the memory.1929 */ 1930 SUPR0DECL(int) SUPR0ContFree(PSUPDRVSESSION pSession, void *pv)1931 { 1932 dprintf(("SUPR0ContFree: pSession=%p pv=%p\n", pSession, pv));1933 return supdrvMemRelease(pSession, pv, MEMREF_TYPE_CONT);1927 * @param uPtr Pointer to the memory (ring-3 or ring-0). 1928 */ 1929 SUPR0DECL(int) SUPR0ContFree(PSUPDRVSESSION pSession, RTHCUINTPTR uPtr) 1930 { 1931 dprintf(("SUPR0ContFree: pSession=%p uPtr=%p\n", pSession, (void *)uPtr)); 1932 return supdrvMemRelease(pSession, uPtr, MEMREF_TYPE_CONT); 1934 1933 } 1935 1934 … … 1942 1941 * @param pSession Session data. 1943 1942 * @param cPages Number of pages to allocate. 1943 * @param ppvR0 Where to put the address of Ring-0 mapping of the allocated memory. 1944 1944 * @param ppvR3 Where to put the address of Ring-3 mapping of the allocated memory. 1945 1945 * @param paPages Where to put the physical addresses of allocated memory. 1946 1946 */ 1947 SUPR0DECL(int) SUPR0LowAlloc(PSUPDRVSESSION pSession, u nsigned cPages, void **ppvR3, PSUPPAGE paPages)1947 SUPR0DECL(int) SUPR0LowAlloc(PSUPDRVSESSION pSession, uint32_t cPages, PRTR0PTR ppvR0, PRTR3PTR ppvR3, PSUPPAGE paPages) 1948 1948 { 1949 1949 unsigned iPage; 1950 1950 int rc; 1951 1951 SUPDRVMEMREF Mem = {0}; 1952 dprintf(("SUPR0LowAlloc: pSession=%p cPages=%d ppvR3=%p p aPages=%p\n", pSession, cPages, ppvR3, paPages));1952 dprintf(("SUPR0LowAlloc: pSession=%p cPages=%d ppvR3=%p ppvR0=%p paPages=%p\n", pSession, cPages, ppvR3, ppvR0, paPages)); 1953 1953 1954 1954 /* 1955 1955 * Validate input. 1956 1956 */ 1957 if (!pSession || !ppvR3 || !p aPages)1958 { 1959 dprintf(("Null pointer. All of these should be set: pSession=%p ppvR3=%p p aPages=%p\n",1960 pSession, ppvR3, p aPages));1957 if (!pSession || !ppvR3 || !ppvR0 || !paPages) 1958 { 1959 dprintf(("Null pointer. All of these should be set: pSession=%p ppvR3=%p ppvR0=%p paPages=%p\n", 1960 pSession, ppvR3, ppvR0, paPages)); 1961 1961 return SUPDRV_ERR_INVALID_PARAM; 1962 1962 … … 1990 1990 AssertMsg(!(paPages[iPage].Phys & (PAGE_SIZE - 1)), ("iPage=%d Phys=%VHp\n", paPages[iPage].Phys)); 1991 1991 } 1992 /*if (ppvR0) 1993 *ppvR0 = RTR0MemObjAddress(Mem.MemObj); */ 1992 *ppvR0 = RTR0MemObjAddress(Mem.MemObj); 1994 1993 *ppvR3 = RTR0MemObjAddress(Mem.MapObjR3); 1995 1994 return 0; … … 2010 2009 */ 2011 2010 Mem.pvR0 = NULL; 2012 Mem.pvR3 = N ULL;2011 Mem.pvR3 = NIL_RTR3PTR; 2013 2012 Mem.eType = MEMREF_TYPE_LOW; 2014 2013 Mem.cb = cPages << PAGE_SHIFT; 2015 rc = supdrvOSLowAllocOne(&Mem, ppvR 3, paPages);2014 rc = supdrvOSLowAllocOne(&Mem, ppvR0, ppvR3, paPages); 2016 2015 if (rc) 2017 2016 return rc; 2018 2017 AssertMsg(!((uintptr_t)*ppvR3 & (PAGE_SIZE - 1)), ("Memory is not page aligned! virt=%p\n", *ppvR3)); 2018 AssertMsg(!((uintptr_t)*ppvR0 & (PAGE_SIZE - 1)), ("Memory is not page aligned! virt=%p\n", *ppvR0)); 2019 2019 for (iPage = 0; iPage < cPages; iPage++) 2020 2020 AssertMsg(!(paPages[iPage].Phys & (PAGE_SIZE - 1)), ("iPage=%d Phys=%VHp\n", paPages[iPage].Phys)); … … 2037 2037 * @returns SUPDRV_ERR_* on failure. 2038 2038 * @param pSession The session to which the memory was allocated. 2039 * @param pv Pointer to the memory.2040 */ 2041 SUPR0DECL(int) SUPR0LowFree(PSUPDRVSESSION pSession, void *pv)2042 { 2043 dprintf(("SUPR0LowFree: pSession=%p pv=%p\n", pSession, pv));2044 return supdrvMemRelease(pSession, pv, MEMREF_TYPE_LOW);2039 * @param uPtr Pointer to the memory (ring-3 or ring-0). 2040 */ 2041 SUPR0DECL(int) SUPR0LowFree(PSUPDRVSESSION pSession, RTHCUINTPTR uPtr) 2042 { 2043 dprintf(("SUPR0LowFree: pSession=%p uPtr=%p\n", pSession, (void *)uPtr)); 2044 return supdrvMemRelease(pSession, uPtr, MEMREF_TYPE_LOW); 2045 2045 } 2046 2046 … … 2057 2057 * @param ppvR3 Where to store the address of the Ring-3 mapping. 2058 2058 */ 2059 SUPR0DECL(int) SUPR0MemAlloc(PSUPDRVSESSION pSession, u nsigned cb, void **ppvR0, void **ppvR3)2059 SUPR0DECL(int) SUPR0MemAlloc(PSUPDRVSESSION pSession, uint32_t cb, PRTR0PTR ppvR0, PRTR3PTR ppvR3) 2060 2060 { 2061 2061 int rc; … … 2096 2096 { 2097 2097 *ppvR0 = RTR0MemObjAddress(Mem.MemObj); 2098 *ppvR3 = RTR0MemObjAddress(Mem.MapObjR3);2098 *ppvR3 = (RTR3PTR)RTR0MemObjAddress(Mem.MapObjR3); 2099 2099 return 0; 2100 2100 } … … 2113 2113 */ 2114 2114 Mem.pvR0 = NULL; 2115 Mem.pvR3 = N ULL;2115 Mem.pvR3 = NIL_RTR3PTR; 2116 2116 Mem.eType = MEMREF_TYPE_MEM; 2117 2117 Mem.cb = cb; … … 2139 2139 * @returns SUPDRV_ERR_* on failure. 2140 2140 * @param pSession The session to which the memory was allocated. 2141 * @param pv The Ring-0 or Ring-3 address returned by SUPR0MemAlloc(). 2142 */ 2143 SUPR0DECL(int) SUPR0MemGetPhys(PSUPDRVSESSION pSession, void *pv, PSUPPAGE paPages) 2141 * @param uPtr The Ring-0 or Ring-3 address returned by SUPR0MemAlloc(). 2142 * @param paPages Where to store the physical addresses. 2143 */ 2144 SUPR0DECL(int) SUPR0MemGetPhys(PSUPDRVSESSION pSession, RTHCUINTPTR uPtr, PSUPPAGE paPages) 2144 2145 { 2145 2146 PSUPDRVBUNDLE pBundle; 2146 2147 RTSPINLOCKTMP SpinlockTmp = RTSPINLOCKTMP_INITIALIZER; 2147 dprintf(("SUPR0MemGetPhys: pSession=%p pv=%p paPages=%p\n", pSession, pv, paPages));2148 dprintf(("SUPR0MemGetPhys: pSession=%p uPtr=%p paPages=%p\n", pSession, (void *)uPtr, paPages)); 2148 2149 2149 2150 /* … … 2155 2156 return SUPDRV_ERR_INVALID_PARAM; 2156 2157 } 2157 if (! pv|| !paPages)2158 { 2159 dprintf(("Illegal address pv=%p or/and paPages=%p\n", pv, paPages));2158 if (!uPtr || !paPages) 2159 { 2160 dprintf(("Illegal address uPtr=%p or/and paPages=%p\n", (void *)uPtr, paPages)); 2160 2161 return SUPDRV_ERR_INVALID_PARAM; 2161 2162 } … … 2175 2176 if ( pBundle->aMem[i].eType == MEMREF_TYPE_MEM 2176 2177 && pBundle->aMem[i].MemObj != NIL_RTR0MEMOBJ 2177 && ( RTR0MemObjAddress(pBundle->aMem[i].MemObj) == pv2178 && ( (RTHCUINTPTR)RTR0MemObjAddress(pBundle->aMem[i].MemObj) == uPtr 2178 2179 || ( pBundle->aMem[i].MapObjR3 != NIL_RTR0MEMOBJ 2179 && RTR0MemObjAddress(pBundle->aMem[i].MapObjR3) == pv)2180 && (RTHCUINTPTR)RTR0MemObjAddress(pBundle->aMem[i].MapObjR3) == uPtr) 2180 2181 ) 2181 2182 ) … … 2193 2194 #else /* !USE_NEW_OS_INTERFACE */ 2194 2195 if ( pBundle->aMem[i].eType == MEMREF_TYPE_MEM 2195 && ( pBundle->aMem[i].pvR0 == pv2196 || pBundle->aMem[i].pvR3 == pv))2196 && ( (RTHCUINTPTR)pBundle->aMem[i].pvR0 == uPtr 2197 || (RTHCUINTPTR)pBundle->aMem[i].pvR3 == uPtr)) 2197 2198 { 2198 2199 supdrvOSMemGetPages(&pBundle->aMem[i], paPages); … … 2205 2206 } 2206 2207 RTSpinlockRelease(pSession->Spinlock, &SpinlockTmp); 2207 dprintf(("Failed to find %p!!!\n", pv));2208 dprintf(("Failed to find %p!!!\n", (void *)uPtr)); 2208 2209 return SUPDRV_ERR_INVALID_PARAM; 2209 2210 } … … 2216 2217 * @returns SUPDRV_ERR_* on failure. 2217 2218 * @param pSession The session owning the allocation. 2218 * @param pvThe Ring-0 or Ring-3 address returned by SUPR0MemAlloc().2219 */ 2220 SUPR0DECL(int) SUPR0MemFree(PSUPDRVSESSION pSession, void *pv)2221 { 2222 dprintf(("SUPR0MemFree: pSession=%p pv=%p\n", pSession, pv));2223 return supdrvMemRelease(pSession, pv, MEMREF_TYPE_MEM);2219 * @param uPtr The Ring-0 or Ring-3 address returned by SUPR0MemAlloc(). 2220 */ 2221 SUPR0DECL(int) SUPR0MemFree(PSUPDRVSESSION pSession, RTHCUINTPTR uPtr) 2222 { 2223 dprintf(("SUPR0MemFree: pSession=%p uPtr=%p\n", pSession, (void *)uPtr)); 2224 return supdrvMemRelease(pSession, uPtr, MEMREF_TYPE_MEM); 2224 2225 } 2225 2226 … … 2238 2239 * and remove the session as a GIP user. 2239 2240 */ 2240 SUPR0DECL(int) SUPR0GipMap(PSUPDRVSESSION pSession, PCSUPGLOBALINFOPAGE *ppGip, RTHCPHYS *pHCPhysGid)2241 SUPR0DECL(int) SUPR0GipMap(PSUPDRVSESSION pSession, PCSUPGLOBALINFOPAGE *ppGip, PRTHCPHYS pHCPhysGid) 2241 2242 { 2242 2243 int rc = 0; … … 2461 2462 * @returns SUPDRV_ERR_INVALID_PARAM on failure. 2462 2463 * @param pSession Session data. 2463 * @param pvPointer to memory. This is matched against both the R0 and R3 addresses.2464 * @param uPtr Pointer to memory. This is matched against both the R0 and R3 addresses. 2464 2465 * @param eType Memory type. 2465 2466 */ 2466 static int supdrvMemRelease(PSUPDRVSESSION pSession, void *pv, SUPDRVMEMREFTYPE eType)2467 static int supdrvMemRelease(PSUPDRVSESSION pSession, RTHCUINTPTR uPtr, SUPDRVMEMREFTYPE eType) 2467 2468 { 2468 2469 PSUPDRVBUNDLE pBundle; … … 2477 2478 return SUPDRV_ERR_I

