- Timestamp:
- Oct 17, 2021 1:35:07 PM (3 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/sup.h
r91037 r91785 2145 2145 SUPR0DECL(void) SUPR0BadContext(PSUPDRVSESSION pSession, const char *pszFile, uint32_t uLine, const char *pszExpr); 2146 2146 2147 #if defined(RT_OS_LINUX) || defined(RT_OS_SOLARIS) 2147 #if defined(RT_OS_LINUX) || defined(RT_OS_SOLARIS) || defined(RT_OS_FREEBSD) 2148 2148 /** 2149 2149 * Translates a physical address to a virtual mapping (valid up to end of page). -
trunk/src/VBox/HostDrivers/Support/SUPDrv.cpp
r91783 r91785 238 238 { STKBACK("SUPR0PageMapKernel"), (void *)(uintptr_t)SUPR0PageMapKernel }, 239 239 { STKBACK("SUPR0PageProtect"), (void *)(uintptr_t)SUPR0PageProtect }, 240 #if defined(RT_OS_LINUX) || defined(RT_OS_SOLARIS) 241 { STK BACK("SUPR0HCPhysToVirt"), (void *)(uintptr_t)SUPR0HCPhysToVirt }, /* only-linux, only solaris*/240 #if defined(RT_OS_LINUX) || defined(RT_OS_SOLARIS) || defined(RT_OS_FREEBSD) 241 { STKOKAY("SUPR0HCPhysToVirt"), (void *)(uintptr_t)SUPR0HCPhysToVirt }, /* only-linux, only-solaris, only-freebsd */ 242 242 #endif 243 243 { STKBACK("SUPR0Printf"), (void *)(uintptr_t)SUPR0Printf }, -
trunk/src/VBox/HostDrivers/Support/freebsd/SUPDrv-freebsd.c
r90780 r91785 45 45 #include <sys/conf.h> 46 46 #include <sys/uio.h> 47 #include <vm/pmap.h> /* for pmap_map() */ 47 48 48 49 #include "../SUPDrvInternal.h" … … 638 639 639 640 641 #if defined(RT_ARCH_AMD64) || defined(RT_ARCH_ARM64) 642 SUPR0DECL(int) SUPR0HCPhysToVirt(RTHCPHYS HCPhys, void **ppv) 643 { 644 AssertReturn(!(HCPhys & PAGE_OFFSET_MASK), VERR_INVALID_POINTER); 645 AssertReturn(HCPhys != NIL_RTHCPHYS, VERR_INVALID_POINTER); 646 *ppv = (void *)(uintptr_t)pmap_map(NULL, HCPhys, (HCPhys | PAGE_OFFSET_MASK) + 1, VM_PROT_WRITE | VM_PROT_READ); 647 return VINF_SUCCESS; 648 } 649 #endif 650 651 640 652 SUPR0DECL(int) SUPR0Printf(const char *pszFormat, ...) 641 653 {
Note:
See TracChangeset
for help on using the changeset viewer.