Changeset 88215 in vbox for trunk/src/VBox/Runtime/r0drv
- Timestamp:
- Mar 19, 2021 6:42:55 PM (4 years ago)
- Location:
- trunk/src/VBox/Runtime/r0drv/solaris
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/r0drv/solaris/initterm-r0drv-solaris.c
r82968 r88215 85 85 /** Host scheduler force preemption offset. */ 86 86 size_t g_offrtSolCpuForceKernelPreempt; 87 /** Whether to use the old-style map_addr() routine. */ 88 bool g_frtSolOldMapAddr = false; 89 /** The map_addr() hooks callout table structure. */ 90 RTR0FNSOLMAPADDR g_rtSolMapAddr; 87 91 /* Resolve using dl_lookup (remove if no longer relevant for supported S10 versions) */ 88 92 extern void contig_free(void *addr, size_t size); … … 223 227 224 228 /* 229 * Mandatory: map_addr() hooks. 230 */ 231 rc = RTR0DbgKrnlInfoQuerySymbol(g_hKrnlDbgInfo, NULL /* pszModule */, "plat_map_align_amount", NULL /* ppvSymbol */); 232 if (RT_SUCCESS(rc)) 233 { 234 g_rtSolMapAddr.u.pfnSol_map_addr = (void *)map_addr; 235 } 236 else 237 { 238 g_frtSolOldMapAddr = true; 239 g_rtSolMapAddr.u.pfnSol_map_addr_old = (void *)map_addr; 240 } 241 242 /* 225 243 * Optional: Timeout hooks. 226 244 */ -
trunk/src/VBox/Runtime/r0drv/solaris/memobj-r0drv-solaris.c
r87106 r88215 578 578 579 579 as_rangelock(pAddrSpace); 580 map_addr(pVirtAddr, cb, 0 /* offset */, 0 /* vacalign */, MAP_SHARED); 580 if (g_frtSolOldMapAddr) 581 g_rtSolMapAddr.u.pfnSol_map_addr_old(pVirtAddr, cb, 0 /* offset */, 0 /* vacalign */, MAP_SHARED); 582 else 583 g_rtSolMapAddr.u.pfnSol_map_addr(pVirtAddr, cb, 0 /* offset */, MAP_SHARED); 581 584 if (*pVirtAddr != NULL) 582 585 rc = as_map(pAddrSpace, *pVirtAddr, cb, rtR0SegVBoxSolCreate, &Args); … … 1053 1056 page_t **papPages = pMemToMapSolaris->pvHandle; 1054 1057 AssertPtr(papPages); 1055 papPages += offSub >> PAGE_S IZE;1058 papPages += offSub >> PAGE_SHIFT; 1056 1059 for (size_t iPage = 0; iPage < cPages; iPage++) 1057 1060 paPhysAddrs[iPage] = rtR0MemObjSolPagePhys(papPages[iPage]); -
trunk/src/VBox/Runtime/r0drv/solaris/memobj-r0drv-solaris.h
r82968 r88215 258 258 259 259 260 #if defined(VBOX_NEW_CRASH_DUMP_FORMAT) 261 static void rtR0SegVBoxSolDump(seg_t *pSeg, dump_addpage_f Func) 262 #else 260 263 static void rtR0SegVBoxSolDump(seg_t *pSeg) 264 #endif 261 265 { 262 266 /* Nothing to do. */ … … 279 283 { 280 284 return ENODEV; 281 }282 283 284 static lgrp_mem_policy_info_t *rtR0SegVBoxSolGetPolicy(seg_t *pSeg, caddr_t virtAddr)285 {286 return NULL;287 285 } 288 286 … … 317 315 rtR0SegVBoxSolSetPageSize, 318 316 rtR0SegVBoxSolGetMemId, 319 rtR0SegVBoxSolGetPolicy,317 NULL, /* getpolicy() */ 320 318 rtR0SegVBoxSolCapable 321 319 }; -
trunk/src/VBox/Runtime/r0drv/solaris/the-solaris-kernel.h
r82968 r88215 203 203 extern bool g_frtSolOldThreadCtx; 204 204 205 /* 206 * Workaround for older Solaris versions which called map_addr()/choose_addr()/ 207 * map_addr_proc() with an 'alignment' argument that was removed in Solaris 208 * 11.4. 209 */ 210 typedef struct RTR0FNSOLMAPADDR 211 { 212 union 213 { 214 void *(*pfnSol_map_addr) (caddr_t *, size_t, offset_t, uint_t); 215 void *(*pfnSol_map_addr_old) (caddr_t *, size_t, offset_t, int, uint_t); 216 } u; 217 } RTR0FNSOLMAPADDR; 218 typedef RTR0FNSOLMAPADDR *PRTR0FNSOLMAPADDR; 219 220 extern RTR0FNSOLMAPADDR g_rtSolMapAddr; 221 extern bool g_frtSolOldMapAddr; 222 205 223 /* Solaris globals. */ 206 224 extern uintptr_t kernelbase;
Note:
See TracChangeset
for help on using the changeset viewer.