VirtualBox

source: vbox/trunk/src/VBox/Runtime/r0drv/solaris/vbi/memobj-r0drv-solaris.c@ 40227

Last change on this file since 40227 was 37281, checked in by vboxsync, 14 years ago

IPRT/r0drv/solaris: Working on large page allocation optimization. Some cleanup.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 17.9 KB
Line 
1/* $Id: memobj-r0drv-solaris.c 37281 2011-05-31 21:32:44Z vboxsync $ */
2/** @file
3 * IPRT - Ring-0 Memory Objects, Solaris.
4 */
5
6/*
7 * Copyright (C) 2006-2007 Oracle Corporation
8 *
9 * This file is part of VirtualBox Open Source Edition (OSE), as
10 * available from http://www.virtualbox.org. This file is free software;
11 * you can redistribute it and/or modify it under the terms of the GNU
12 * General Public License (GPL) as published by the Free Software
13 * Foundation, in version 2 as it comes in the "COPYING" file of the
14 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
15 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
16 *
17 * The contents of this file may alternatively be used under the terms
18 * of the Common Development and Distribution License Version 1.0
19 * (CDDL) only, as it comes in the "COPYING.CDDL" file of the
20 * VirtualBox OSE distribution, in which case the provisions of the
21 * CDDL are applicable instead of those of the GPL.
22 *
23 * You may elect to license modified versions of this file under the
24 * terms and conditions of either the GPL or the CDDL or both.
25 */
26
27
28/*******************************************************************************
29* Header Files *
30*******************************************************************************/
31#include "../the-solaris-kernel.h"
32#include "internal/iprt.h"
33#include <iprt/memobj.h>
34
35#include <iprt/asm.h>
36#include <iprt/assert.h>
37#include <iprt/err.h>
38#include <iprt/log.h>
39#include <iprt/mem.h>
40#include <iprt/param.h>
41#include <iprt/process.h>
42#include "internal/memobj.h"
43
44/*******************************************************************************
45* Structures and Typedefs *
46*******************************************************************************/
47/**
48 * The Solaris version of the memory object structure.
49 */
50typedef struct RTR0MEMOBJSOLARIS
51{
52 /** The core structure. */
53 RTR0MEMOBJINTERNAL Core;
54 /** Pointer to kernel memory cookie. */
55 ddi_umem_cookie_t Cookie;
56 /** Shadow locked pages. */
57 void *pvHandle;
58 /** Access during locking. */
59 int fAccess;
60 /** Set if large pages are involved in an RTR0MEMOBJTYPE_PHYS
61 * allocation. */
62 bool fLargePage;
63} RTR0MEMOBJSOLARIS, *PRTR0MEMOBJSOLARIS;
64
65
66
67DECLHIDDEN(int) rtR0MemObjNativeFree(RTR0MEMOBJ pMem)
68{
69 PRTR0MEMOBJSOLARIS pMemSolaris = (PRTR0MEMOBJSOLARIS)pMem;
70
71 switch (pMemSolaris->Core.enmType)
72 {
73 case RTR0MEMOBJTYPE_LOW:
74 vbi_lowmem_free(pMemSolaris->Core.pv, pMemSolaris->Core.cb);
75 break;
76
77 case RTR0MEMOBJTYPE_PHYS:
78 if (!pMemSolaris->Core.u.Phys.fAllocated)
79 { /* nothing to do here */; }
80 else if (pMemSolaris->fLargePage)
81 vbi_large_page_free(pMemSolaris->pvHandle, pMemSolaris->Core.cb);
82 else
83 vbi_phys_free(pMemSolaris->Core.pv, pMemSolaris->Core.cb);
84 break;
85
86 case RTR0MEMOBJTYPE_PHYS_NC:
87 vbi_pages_free(pMemSolaris->pvHandle, pMemSolaris->Core.cb);
88 break;
89
90 case RTR0MEMOBJTYPE_PAGE:
91 ddi_umem_free(pMemSolaris->Cookie);
92 break;
93
94 case RTR0MEMOBJTYPE_LOCK:
95 vbi_unlock_va(pMemSolaris->Core.pv, pMemSolaris->Core.cb, pMemSolaris->fAccess, pMemSolaris->pvHandle);
96 break;
97
98 case RTR0MEMOBJTYPE_MAPPING:
99 vbi_unmap(pMemSolaris->Core.pv, pMemSolaris->Core.cb);
100 break;
101
102 case RTR0MEMOBJTYPE_RES_VIRT:
103 {
104 if (pMemSolaris->Core.u.ResVirt.R0Process == NIL_RTR0PROCESS)
105 vmem_xfree(heap_arena, pMemSolaris->Core.pv, pMemSolaris->Core.cb);
106 else
107 AssertFailed();
108 break;
109 }
110
111 case RTR0MEMOBJTYPE_CONT: /* we don't use this type here. */
112 default:
113 AssertMsgFailed(("enmType=%d\n", pMemSolaris->Core.enmType));
114 return VERR_INTERNAL_ERROR;
115 }
116
117 return VINF_SUCCESS;
118}
119
120
121DECLHIDDEN(int) rtR0MemObjNativeAllocPage(PPRTR0MEMOBJINTERNAL ppMem, size_t cb, bool fExecutable)
122{
123 /* Create the object. */
124 PRTR0MEMOBJSOLARIS pMemSolaris = (PRTR0MEMOBJSOLARIS)rtR0MemObjNew(sizeof(*pMemSolaris), RTR0MEMOBJTYPE_PAGE, NULL, cb);
125 if (!pMemSolaris)
126 return VERR_NO_MEMORY;
127
128 void *virtAddr = ddi_umem_alloc(cb, DDI_UMEM_SLEEP, &pMemSolaris->Cookie);
129 if (!virtAddr)
130 {
131 rtR0MemObjDelete(&pMemSolaris->Core);
132 return VERR_NO_PAGE_MEMORY;
133 }
134
135 pMemSolaris->Core.pv = virtAddr;
136 pMemSolaris->pvHandle = NULL;
137 *ppMem = &pMemSolaris->Core;
138 return VINF_SUCCESS;
139}
140
141
142DECLHIDDEN(int) rtR0MemObjNativeAllocLow(PPRTR0MEMOBJINTERNAL ppMem, size_t cb, bool fExecutable)
143{
144 NOREF(fExecutable);
145
146 /* Create the object */
147 PRTR0MEMOBJSOLARIS pMemSolaris = (PRTR0MEMOBJSOLARIS)rtR0MemObjNew(sizeof(*pMemSolaris), RTR0MEMOBJTYPE_LOW, NULL, cb);
148 if (!pMemSolaris)
149 return VERR_NO_MEMORY;
150
151 /* Allocate physically low page-aligned memory. */
152 uint64_t physAddr = _4G - 1;
153 caddr_t virtAddr = vbi_lowmem_alloc(physAddr, cb);
154 if (virtAddr == NULL)
155 {
156 rtR0MemObjDelete(&pMemSolaris->Core);
157 return VERR_NO_LOW_MEMORY;
158 }
159 pMemSolaris->Core.pv = virtAddr;
160 pMemSolaris->pvHandle = NULL;
161 *ppMem = &pMemSolaris->Core;
162 return VINF_SUCCESS;
163}
164
165
166DECLHIDDEN(int) rtR0MemObjNativeAllocCont(PPRTR0MEMOBJINTERNAL ppMem, size_t cb, bool fExecutable)
167{
168 NOREF(fExecutable);
169 return rtR0MemObjNativeAllocPhys(ppMem, cb, _4G - 1, PAGE_SIZE /* alignment */);
170}
171
172
173DECLHIDDEN(int) rtR0MemObjNativeAllocPhysNC(PPRTR0MEMOBJINTERNAL ppMem, size_t cb, RTHCPHYS PhysHighest)
174{
175#if HC_ARCH_BITS == 64
176 PRTR0MEMOBJSOLARIS pMemSolaris = (PRTR0MEMOBJSOLARIS)rtR0MemObjNew(sizeof(*pMemSolaris), RTR0MEMOBJTYPE_PHYS_NC, NULL, cb);
177 if (!pMemSolaris)
178 return VERR_NO_MEMORY;
179
180 uint64_t PhysAddr = PhysHighest;
181 void *pvPages = vbi_pages_alloc(&PhysAddr, cb);
182 if (!pvPages)
183 {
184 LogRel(("rtR0MemObjNativeAllocPhysNC: vbi_pages_alloc failed.\n"));
185 rtR0MemObjDelete(&pMemSolaris->Core);
186 return VERR_NO_MEMORY;
187 }
188 pMemSolaris->Core.pv = NULL;
189 pMemSolaris->pvHandle = pvPages;
190
191 Assert(!(PhysAddr & PAGE_OFFSET_MASK));
192 *ppMem = &pMemSolaris->Core;
193 return VINF_SUCCESS;
194
195#else /* 32 bit: */
196 return VERR_NOT_SUPPORTED; /* see the RTR0MemObjAllocPhysNC specs */
197#endif
198}
199
200
201DECLHIDDEN(int) rtR0MemObjNativeAllocPhys(PPRTR0MEMOBJINTERNAL ppMem, size_t cb, RTHCPHYS PhysHighest, size_t uAlignment)
202{
203 AssertMsgReturn(PhysHighest >= 16 *_1M, ("PhysHigest=%RHp\n", PhysHighest), VERR_NOT_SUPPORTED);
204
205 PRTR0MEMOBJSOLARIS pMemSolaris = (PRTR0MEMOBJSOLARIS)rtR0MemObjNew(sizeof(*pMemSolaris), RTR0MEMOBJTYPE_PHYS, NULL, cb);
206 if (!pMemSolaris)
207 return VERR_NO_MEMORY;
208
209 /*
210 * Allocating one large page gets special treatment.
211 */
212 static uint32_t s_cbLargePage = UINT32_MAX;
213 if (s_cbLargePage == UINT32_MAX)
214 {
215#if 0 /* currently not entirely stable, so disabled. */
216 if (page_num_pagesizes() > 1)
217 ASMAtomicWriteU32(&s_cbLargePage, page_get_pagesize(1));
218 else
219#endif
220 ASMAtomicWriteU32(&s_cbLargePage, 0);
221 }
222 uint64_t PhysAddr;
223 if ( cb == s_cbLargePage
224 && cb == uAlignment
225 && PhysHighest == NIL_RTHCPHYS)
226 {
227 /*
228 * Allocate one large page.
229 */
230 void *pvPages = vbi_large_page_alloc(&PhysAddr, cb);
231 if (pvPages)
232 {
233 AssertMsg(!(PhysAddr & (cb - 1)), ("%RHp\n", PhysAddr));
234 pMemSolaris->Core.pv = NULL;
235 pMemSolaris->Core.u.Phys.PhysBase = PhysAddr;
236 pMemSolaris->Core.u.Phys.fAllocated = true;
237 pMemSolaris->pvHandle = pvPages;
238 pMemSolaris->fLargePage = true;
239
240 *ppMem = &pMemSolaris->Core;
241 return VINF_SUCCESS;
242 }
243 }
244 else
245 {
246 /*
247 * Allocate physically contiguous memory aligned as specified.
248 */
249 AssertCompile(NIL_RTHCPHYS == UINT64_MAX);
250 PhysAddr = PhysHighest;
251 caddr_t pvMem = vbi_phys_alloc(&PhysAddr, cb, uAlignment, 1 /* contiguous */);
252 if (RT_LIKELY(pvMem))
253 {
254 Assert(!(PhysAddr & PAGE_OFFSET_MASK));
255 Assert(PhysAddr < PhysHighest);
256 Assert(PhysAddr + cb <= PhysHighest);
257
258 pMemSolaris->Core.pv = pvMem;
259 pMemSolaris->Core.u.Phys.PhysBase = PhysAddr;
260 pMemSolaris->Core.u.Phys.fAllocated = true;
261 pMemSolaris->pvHandle = NULL;
262 pMemSolaris->fLargePage = false;
263
264 *ppMem = &pMemSolaris->Core;
265 return VINF_SUCCESS;
266 }
267 }
268 rtR0MemObjDelete(&pMemSolaris->Core);
269 return VERR_NO_CONT_MEMORY;
270}
271
272
273DECLHIDDEN(int) rtR0MemObjNativeEnterPhys(PPRTR0MEMOBJINTERNAL ppMem, RTHCPHYS Phys, size_t cb, uint32_t uCachePolicy)
274{
275 AssertReturn(uCachePolicy == RTMEM_CACHE_POLICY_DONT_CARE, VERR_NOT_SUPPORTED);
276
277 /* Create the object. */
278 PRTR0MEMOBJSOLARIS pMemSolaris = (PRTR0MEMOBJSOLARIS)rtR0MemObjNew(sizeof(*pMemSolaris), RTR0MEMOBJTYPE_PHYS, NULL, cb);
279 if (!pMemSolaris)
280 return VERR_NO_MEMORY;
281
282 /* There is no allocation here, it needs to be mapped somewhere first. */
283 pMemSolaris->Core.u.Phys.fAllocated = false;
284 pMemSolaris->Core.u.Phys.PhysBase = Phys;
285 pMemSolaris->Core.u.Phys.uCachePolicy = uCachePolicy;
286 *ppMem = &pMemSolaris->Core;
287 return VINF_SUCCESS;
288}
289
290
291DECLHIDDEN(int) rtR0MemObjNativeLockUser(PPRTR0MEMOBJINTERNAL ppMem, RTR3PTR R3Ptr, size_t cb, uint32_t fAccess,
292 RTR0PROCESS R0Process)
293{
294 AssertReturn(R0Process == RTR0ProcHandleSelf(), VERR_INVALID_PARAMETER);
295 NOREF(fAccess);
296
297 /* Create the locking object */
298 PRTR0MEMOBJSOLARIS pMemSolaris = (PRTR0MEMOBJSOLARIS)rtR0MemObjNew(sizeof(*pMemSolaris), RTR0MEMOBJTYPE_LOCK, (void *)R3Ptr, cb);
299 if (!pMemSolaris)
300 return VERR_NO_MEMORY;
301
302 /* Lock down user pages. */
303 int fPageAccess = S_READ;
304 if (fAccess & RTMEM_PROT_WRITE)
305 fPageAccess = S_WRITE;
306 if (fAccess & RTMEM_PROT_EXEC)
307 fPageAccess = S_EXEC;
308 void *pvPageList = NULL;
309 int rc = vbi_lock_va((caddr_t)R3Ptr, cb, fPageAccess, &pvPageList);
310 if (rc != 0)
311 {
312 LogRel(("rtR0MemObjNativeLockUser: vbi_lock_va failed rc=%d\n", rc));
313 rtR0MemObjDelete(&pMemSolaris->Core);
314 return VERR_LOCK_FAILED;
315 }
316
317 /* Fill in the object attributes and return successfully. */
318 pMemSolaris->Core.u.Lock.R0Process = R0Process;
319 pMemSolaris->pvHandle = pvPageList;
320 pMemSolaris->fAccess = fPageAccess;
321 *ppMem = &pMemSolaris->Core;
322 return VINF_SUCCESS;
323}
324
325
326DECLHIDDEN(int) rtR0MemObjNativeLockKernel(PPRTR0MEMOBJINTERNAL ppMem, void *pv, size_t cb, uint32_t fAccess)
327{
328 NOREF(fAccess);
329
330 PRTR0MEMOBJSOLARIS pMemSolaris = (PRTR0MEMOBJSOLARIS)rtR0MemObjNew(sizeof(*pMemSolaris), RTR0MEMOBJTYPE_LOCK, pv, cb);
331 if (!pMemSolaris)
332 return VERR_NO_MEMORY;
333
334 /* Lock down kernel pages. */
335 int fPageAccess = S_READ;
336 if (fAccess & RTMEM_PROT_WRITE)
337 fPageAccess = S_WRITE;
338 if (fAccess & RTMEM_PROT_EXEC)
339 fPageAccess = S_EXEC;
340 void *pvPageList = NULL;
341 int rc = vbi_lock_va((caddr_t)pv, cb, fPageAccess, &pvPageList);
342 if (rc != 0)
343 {
344 LogRel(("rtR0MemObjNativeLockKernel: vbi_lock_va failed rc=%d\n", rc));
345 rtR0MemObjDelete(&pMemSolaris->Core);
346 return VERR_LOCK_FAILED;
347 }
348
349 /* Fill in the object attributes and return successfully. */
350 pMemSolaris->Core.u.Lock.R0Process = NIL_RTR0PROCESS;
351 pMemSolaris->pvHandle = pvPageList;
352 pMemSolaris->fAccess = fPageAccess;
353 *ppMem = &pMemSolaris->Core;
354 return VINF_SUCCESS;
355}
356
357
358DECLHIDDEN(int) rtR0MemObjNativeReserveKernel(PPRTR0MEMOBJINTERNAL ppMem, void *pvFixed, size_t cb, size_t uAlignment)
359{
360 PRTR0MEMOBJSOLARIS pMemSolaris;
361
362 /*
363 * Use xalloc.
364 */
365 void *pv = vmem_xalloc(heap_arena, cb, uAlignment, 0 /*phase*/, 0 /*nocross*/,
366 NULL /*minaddr*/, NULL /*maxaddr*/, VM_SLEEP);
367 if (RT_UNLIKELY(!pv))
368 return VERR_NO_MEMORY;
369
370 /* Create the object. */
371 pMemSolaris = (PRTR0MEMOBJSOLARIS)rtR0MemObjNew(sizeof(*pMemSolaris), RTR0MEMOBJTYPE_RES_VIRT, pv, cb);
372 if (!pMemSolaris)
373 {
374 LogRel(("rtR0MemObjNativeReserveKernel failed to alloc memory object.\n"));
375 vmem_xfree(heap_arena, pv, cb);
376 return VERR_NO_MEMORY;
377 }
378
379 pMemSolaris->Core.u.ResVirt.R0Process = NIL_RTR0PROCESS;
380 *ppMem = &pMemSolaris->Core;
381 return VINF_SUCCESS;
382}
383
384
385DECLHIDDEN(int) rtR0MemObjNativeReserveUser(PPRTR0MEMOBJINTERNAL ppMem, RTR3PTR R3PtrFixed, size_t cb, size_t uAlignment, RTR0PROCESS R0Process)
386{
387 return VERR_NOT_SUPPORTED;
388}
389
390
391DECLHIDDEN(int) rtR0MemObjNativeMapKernel(PPRTR0MEMOBJINTERNAL ppMem, RTR0MEMOBJ pMemToMap, void *pvFixed, size_t uAlignment,
392 unsigned fProt, size_t offSub, size_t cbSub)
393{
394 /** @todo rtR0MemObjNativeMapKernel / Solaris - Should be fairly simple alloc kernel memory and memload it. */
395 return VERR_NOT_SUPPORTED;
396}
397
398
399DECLHIDDEN(int) rtR0MemObjNativeMapUser(PPRTR0MEMOBJINTERNAL ppMem, PRTR0MEMOBJINTERNAL pMemToMap, RTR3PTR R3PtrFixed,
400 size_t uAlignment, unsigned fProt, RTR0PROCESS R0Process)
401{
402 /*
403 * Fend off things we cannot do.
404 */
405 AssertMsgReturn(R3PtrFixed == (RTR3PTR)-1, ("%p\n", R3PtrFixed), VERR_NOT_SUPPORTED);
406 AssertMsgReturn(R0Process == RTR0ProcHandleSelf(), ("%p != %p\n", R0Process, RTR0ProcHandleSelf()), VERR_NOT_SUPPORTED);
407 if (uAlignment != PAGE_SIZE)
408 return VERR_NOT_SUPPORTED;
409
410 /*
411 * Get parameters from the source object.
412 */
413 PRTR0MEMOBJSOLARIS pMemToMapSolaris = (PRTR0MEMOBJSOLARIS)pMemToMap;
414 void *pv = pMemToMapSolaris->Core.pv;
415 size_t cb = pMemToMapSolaris->Core.cb;
416 pgcnt_t cPages = cb >> PAGE_SHIFT;
417
418 /*
419 * Create the mapping object
420 */
421 PRTR0MEMOBJSOLARIS pMemSolaris;
422 pMemSolaris = (PRTR0MEMOBJSOLARIS)rtR0MemObjNew(sizeof(*pMemSolaris), RTR0MEMOBJTYPE_MAPPING, pv, cb);
423 if (RT_UNLIKELY(!pMemSolaris))
424 return VERR_NO_MEMORY;
425
426 int rc = VINF_SUCCESS;
427 uint64_t *paPhysAddrs = kmem_zalloc(sizeof(uint64_t) * cPages, KM_SLEEP);
428 if (RT_LIKELY(paPhysAddrs))
429 {
430 /*
431 * Prepare the pages according to type.
432 */
433 if (pMemToMapSolaris->Core.enmType == RTR0MEMOBJTYPE_PHYS_NC)
434 rc = vbi_pages_premap(pMemToMapSolaris->pvHandle, cb, paPhysAddrs);
435 else if ( pMemToMapSolaris->Core.enmType == RTR0MEMOBJTYPE_PHYS
436 && pMemToMapSolaris->fLargePage)
437 {
438 RTHCPHYS Phys = pMemToMapSolaris->Core.u.Phys.PhysBase;
439 for (pgcnt_t iPage = 0; iPage < cPages; iPage++, Phys += PAGE_SIZE)
440 paPhysAddrs[iPage] = Phys;
441 rc = vbi_large_page_premap(pMemToMapSolaris->pvHandle, cb);
442 }
443 else
444 {
445 /* Have kernel mapping, just translate virtual to physical. */
446 AssertPtr(pv);
447 rc = 0;
448 for (pgcnt_t iPage = 0; iPage < cPages; iPage++)
449 {
450 paPhysAddrs[iPage] = vbi_va_to_pa(pv);
451 if (RT_UNLIKELY(paPhysAddrs[iPage] == -(uint64_t)1))
452 {
453 LogRel(("rtR0MemObjNativeMapUser: no page to map.\n"));
454 rc = -1;
455 break;
456 }
457 pv = (void *)((uintptr_t)pv + PAGE_SIZE);
458 }
459 }
460 if (!rc)
461 {
462 /*
463 * Perform the actual mapping.
464 */
465 caddr_t UserAddr = NULL;
466 rc = vbi_user_map(&UserAddr, fProt, paPhysAddrs, cb);
467 if (!rc)
468 {
469 pMemSolaris->Core.u.Mapping.R0Process = R0Process;
470 pMemSolaris->Core.pv = UserAddr;
471
472 *ppMem = &pMemSolaris->Core;
473 kmem_free(paPhysAddrs, sizeof(uint64_t) * cPages);
474 return VINF_SUCCESS;
475 }
476
477 LogRel(("rtR0MemObjNativeMapUser: vbi_user_map failed.\n"));
478 }
479 rc = VERR_MAP_FAILED;
480 kmem_free(paPhysAddrs, sizeof(uint64_t) * cPages);
481 }
482 else
483 rc = VERR_NO_MEMORY;
484 rtR0MemObjDelete(&pMemSolaris->Core);
485 return rc;
486}
487
488
489DECLHIDDEN(int) rtR0MemObjNativeProtect(PRTR0MEMOBJINTERNAL pMem, size_t offSub, size_t cbSub, uint32_t fProt)
490{
491 NOREF(pMem);
492 NOREF(offSub);
493 NOREF(cbSub);
494 NOREF(fProt);
495 return VERR_NOT_SUPPORTED;
496}
497
498
499DECLHIDDEN(RTHCPHYS) rtR0MemObjNativeGetPagePhysAddr(PRTR0MEMOBJINTERNAL pMem, size_t iPage)
500{
501 PRTR0MEMOBJSOLARIS pMemSolaris = (PRTR0MEMOBJSOLARIS)pMem;
502
503 switch (pMemSolaris->Core.enmType)
504 {
505 case RTR0MEMOBJTYPE_PHYS_NC:
506 if (pMemSolaris->Core.u.Phys.fAllocated)
507 {
508 uint8_t *pb = (uint8_t *)pMemSolaris->Core.pv + ((size_t)iPage << PAGE_SHIFT);
509 return vbi_va_to_pa(pb);
510 }
511 return vbi_page_to_pa(pMemSolaris->pvHandle, iPage);
512
513 case RTR0MEMOBJTYPE_PAGE:
514 case RTR0MEMOBJTYPE_LOW:
515 case RTR0MEMOBJTYPE_LOCK:
516 {
517 uint8_t *pb = (uint8_t *)pMemSolaris->Core.pv + ((size_t)iPage << PAGE_SHIFT);
518 return vbi_va_to_pa(pb);
519 }
520
521 /*
522 * Although mapping can be handled by vbi_va_to_pa(offset) like the above case,
523 * request it from the parent so that we have a clear distinction between CONT/PHYS_NC.
524 */
525 case RTR0MEMOBJTYPE_MAPPING:
526 return rtR0MemObjNativeGetPagePhysAddr(pMemSolaris->Core.uRel.Child.pParent, iPage);
527
528 case RTR0MEMOBJTYPE_CONT:
529 case RTR0MEMOBJTYPE_PHYS:
530 AssertFailed(); /* handled by the caller */
531 case RTR0MEMOBJTYPE_RES_VIRT:
532 default:
533 return NIL_RTHCPHYS;
534 }
535}
536
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