Changeset 88215 in vbox for trunk/src/VBox/Additions/solaris
- Timestamp:
- Mar 19, 2021 6:42:55 PM (4 years ago)
- Location:
- trunk/src/VBox/Additions/solaris
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/solaris/DRM/Makefile.kmk
r82968 r88215 40 40 vboxvideo_DEFS = VBOX_WITH_HGCM VBOX_SVN_REV=$(VBOX_SVN_REV) 41 41 vboxvideo_DEPS += $(VBOX_SVN_REV_KMK) 42 if ($(VBOX_SOLARIS_11_UPDATE_VERSION) > 3) 43 vboxvideo_DEFS += VBOX_WITH_SYSTEM_QUEUE_H 44 endif 42 45 vboxvideo_INCS := \ 43 46 include/ -
trunk/src/VBox/Additions/solaris/DRM/include/drmP.h
r33540 r88215 58 58 #include "drm_atomic.h" 59 59 #include "drm.h" 60 #include "queue.h" 60 #if !defined(VBOX_WITH_SYSTEM_QUEUE_H) 61 # include "queue.h" 62 #endif 61 63 #include "drm_linux_list.h" 62 64 -
trunk/src/VBox/Additions/solaris/SharedFolders/Makefile.kmk
r82968 r88215 53 53 vboxfs_deps.asm_ASFLAGS = -f bin -g null 54 54 endif 55 if $(VBOX_SOLARIS_11_VERSION) > 175 \ 56 || ( $(VBOX_SOLARIS_11_VERSION) == 175 \ 57 && ( $(VBOX_SOLARIS_11_UPDATE_VERSION) > 1 \ 58 || ($(VBOX_SOLARIS_11_UPDATE_VERSION) == 1 && $(VBOX_SOLARIS_11_BUILD_VERSION) >= 10) ) ) 55 if ($(VBOX_SOLARIS_11_UPDATE_VERSION) > 1 \ 56 || ($(VBOX_SOLARIS_11_UPDATE_VERSION) == 1 && $(VBOX_SOLARIS_11_BUILD_VERSION) >= 10)) 59 57 vboxfs_DEFS += VBOX_VFS_EXTENDED_POLICY 60 58 endif -
trunk/src/VBox/Additions/solaris/SharedFolders/vboxfs_vfs.c
r88189 r88215 27 27 #include <VBox/log.h> 28 28 #include <VBox/version.h> 29 #include <iprt/dbg.h> 29 30 30 31 #include <sys/types.h> … … 44 45 #include <sys/pathname.h> 45 46 #include <sys/cmn_err.h> 47 #include <sys/vmsystm.h> 46 48 #undef u /* /usr/include/sys/user.h:249:1 is where this is defined to (curproc->p_user). very cool. */ 47 49 … … 104 106 int sffs_minor; /* minor number for device */ 105 107 108 /** Whether to use the old-style map_addr()/choose_addr() routines. */ 109 bool g_fVBoxVFS_SolOldAddrMap; 110 /** The map_addr()/choose_addr() hooks callout table structure. */ 111 VBoxVFS_SolAddrMap g_VBoxVFS_SolAddrMap; 112 106 113 /* 107 114 * Module linkage information … … 122 129 _init() 123 130 { 131 RTDBGKRNLINFO hKrnlDbgInfo; 132 int rc = RTR0DbgKrnlInfoOpen(&hKrnlDbgInfo, 0 /* fFlags */); 133 if (RT_SUCCESS(rc)) 134 { 135 rc = RTR0DbgKrnlInfoQuerySymbol(hKrnlDbgInfo, NULL /* pszModule */, "plat_map_align_amount", NULL /* ppvSymbol */); 136 if (RT_SUCCESS(rc)) 137 { 138 #if defined(VBOX_VFS_SOLARIS_10U6) 139 g_VBoxVFS_SolAddrMap.MapAddr.pfnSol_map_addr = (void *)map_addr; 140 #else 141 g_VBoxVFS_SolAddrMap.ChooseAddr.pfnSol_choose_addr = (void *)choose_addr; 142 #endif 143 } 144 else 145 { 146 g_fVBoxVFS_SolOldAddrMap = true; 147 #if defined(VBOX_VFS_SOLARIS_10U6) 148 g_VBoxVFS_SolAddrMap.MapAddr.pfnSol_map_addr_old = (void *)map_addr; 149 #else 150 g_VBoxVFS_SolAddrMap.ChooseAddr.pfnSol_choose_addr_old = (void *)choose_addr; 151 #endif 152 } 153 154 RTR0DbgKrnlInfoRelease(hKrnlDbgInfo); 155 } 156 else 157 { 158 cmn_err(CE_NOTE, "RTR0DbgKrnlInfoOpen failed. rc=%d\n", rc); 159 return rc; 160 } 161 124 162 return (mod_install(&modlinkage)); 125 163 } -
trunk/src/VBox/Additions/solaris/SharedFolders/vboxfs_vfs.h
r82968 r88215 49 49 } sffs_data_t; 50 50 51 /* 52 * Workaround for older Solaris versions which called map_addr()/choose_addr()/ 53 * map_addr_proc() with an 'alignment' argument that was removed in Solaris 54 * 11.4. 55 */ 56 typedef struct VBoxVFS_SolAddrMap 57 { 58 union 59 { 60 void *(*pfnSol_map_addr) (caddr_t *, size_t, offset_t, uint_t); 61 void *(*pfnSol_map_addr_old) (caddr_t *, size_t, offset_t, int, uint_t); 62 } MapAddr; 63 64 union 65 { 66 int (*pfnSol_choose_addr) (struct as *, caddr_t *, size_t, offset_t, uint_t); 67 int (*pfnSol_choose_addr_old) (struct as *, caddr_t *, size_t, offset_t, int, uint_t); 68 } ChooseAddr; 69 } VBoxVFS_SolAddrMap; 70 typedef VBoxVFS_SolAddrMap *pVBoxVFS_SolAddrMap; 71 72 extern bool g_fVBoxVFS_SolOldAddrMap; 73 extern VBoxVFS_SolAddrMap g_VBoxVFS_SolAddrMap; 51 74 52 75 #ifdef __cplusplus -
trunk/src/VBox/Additions/solaris/SharedFolders/vboxfs_vnode.c
r82968 r88215 1767 1767 if ((flags & MAP_FIXED) == 0) 1768 1768 { 1769 map_addr(addrp, len, off, 1, flags); 1769 if (g_fVBoxVFS_SolOldAddrMap) 1770 g_VBoxVFS_SolAddrMap.MapAddr.pfnSol_map_addr_old(addrp, len, off, 1, flags); 1771 else 1772 g_VBoxVFS_SolAddrMap.MapAddr.pfnSol_map_addr(addrp, len, off, flags); 1770 1773 if (*addrp == NULL) 1771 1774 error = ENOMEM; … … 1774 1777 as_unmap(asp, *addrp, len); /* User specified address, remove any previous mappings */ 1775 1778 #else 1776 error = choose_addr(asp, addrp, len, off, ADDR_VACALIGN, flags); 1779 if (g_fVBoxVFS_SolOldAddrMap) 1780 error = g_VBoxVFS_SolAddrMap.ChooseAddr.pfnSol_choose_addr_old(asp, addrp, len, off, 1, flags); 1781 else 1782 error = g_VBoxVFS_SolAddrMap.ChooseAddr.pfnSol_choose_addr(asp, addrp, len, off, flags); 1777 1783 #endif 1778 1784
Note:
See TracChangeset
for help on using the changeset viewer.