VirtualBox

Ignore:
Timestamp:
Sep 17, 2007 8:07:47 AM (17 years ago)
Author:
vboxsync
Message:

removed annoying message.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/r0drv/solaris/memobj-r0drv-solaris.c

    r4717 r4850  
    5252 * during contiguous allocations (i_ddi_mem_alloc)
    5353 */
    54 struct ddi_dma_attr g_SolarisX86PhysMemLimits = 
     54struct ddi_dma_attr g_SolarisX86PhysMemLimits =
    5555{
    5656    DMA_ATTR_V0,            /* Version Number */
     
    116116            break;
    117117        }
    118        
     118
    119119        case RTR0MEMOBJTYPE_MAPPING:
    120120        {
     
    143143            break;
    144144        }
    145        
     145
    146146        /* unused */
    147147        case RTR0MEMOBJTYPE_LOW:
     
    152152            return VERR_INTERNAL_ERROR;
    153153    }
    154    
     154
    155155    return VINF_SUCCESS;
    156156}
     
    170170        return VERR_NO_PAGE_MEMORY;
    171171    }
    172    
     172
    173173    pMemSolaris->Core.pv = virtAddr;
    174174    pMemSolaris->ppShadowPages = NULL;
     
    189189            {
    190190                /* Failed! Fall back to physical contiguous alloc */
    191                 cmn_err(CE_NOTE, "4G boundary exceeded\n");
    192191                RTR0MemObjFree(*ppMem, false);
    193192                rc = rtR0MemObjNativeAllocCont(ppMem, cb, fExecutable);
     
    219218    pMemSolaris->Core.pv = virtAddr;
    220219    pMemSolaris->Core.u.Cont.Phys = rtR0MemObjSolarisVirtToPhys(kas.a_hat, virtAddr);
    221     pMemSolaris->ppShadowPages = NULL;   
     220    pMemSolaris->ppShadowPages = NULL;
    222221    *ppMem = &pMemSolaris->Core;
    223222    return VINF_SUCCESS;
     
    246245    if (!pMemSolaris)
    247246        return VERR_NO_MEMORY;
    248    
     247
    249248    /* There is no allocation here, it needs to be mapped somewhere first */
    250249    pMemSolaris->Core.u.Phys.fAllocated = false;
     
    265264    if (R0Process != NIL_RTR0PROCESS)
    266265        userproc = (proc_t *)R0Process;
    267    
     266
    268267    struct as *useras = userproc->p_as;
    269268    page_t **ppl;
     
    283282        return VERR_LOCK_FAILED;
    284283    }
    285    
     284
    286285    pMemSolaris->Core.u.Lock.R0Process = (RTR0PROCESS)userproc;
    287286    pMemSolaris->ppShadowPages = ppl;
     
    300299    caddr_t virtAddr = (caddr_t)((uintptr_t)pv & (uintptr_t)PAGEMASK);
    301300    page_t **ppl;
    302    
     301
    303302    /* Lock down kernel pages */
    304303    int rc = as_pagelock(&kas, &ppl, virtAddr, cb, S_WRITE);
     
    336335int rtR0MemObjNativeMapKernel(PPRTR0MEMOBJINTERNAL ppMem, RTR0MEMOBJ pMemToMap, void *pvFixed, size_t uAlignment, unsigned fProt)
    337336{
    338     PRTR0MEMOBJSOLARIS pMemToMapSolaris = (PRTR0MEMOBJSOLARIS)pMemToMap;   
     337    PRTR0MEMOBJSOLARIS pMemToMapSolaris = (PRTR0MEMOBJSOLARIS)pMemToMap;
    339338    size_t size = pMemToMapSolaris->Core.cb;
    340339    void *pv = pMemToMapSolaris->Core.pv;
     
    354353        /* Use user specified address */
    355354        addr = (caddr_t)pvFixed;
    356        
     355
    357356        /* Blow away any previous mapping */
    358357        as_unmap(&kas, addr, size);
     
    368367            return VERR_NO_MEMORY;
    369368        }
    370        
     369
    371370        /* Check address against alignment, fail if it doesn't match */
    372371        if ((uintptr_t)addr & (uAlignment - 1))
     
    377376        }
    378377    }
    379    
     378
    380379    /* Our protection masks are identical to <sys/mman.h> but we
    381      * need to add PROT_USER for the pages to be accessible by user 
     380     * need to add PROT_USER for the pages to be accessible by user
    382381     */
    383382    struct segvn_crargs crArgs = SEGVN_ZFOD_ARGS(fProt | PROT_USER, PROT_ALL);
     
    389388        return VERR_NO_MEMORY;
    390389    }
    391    
     390
    392391    /* Map each page into kernel space */
    393392    caddr_t kernAddr = pv;
     
    411410int rtR0MemObjNativeMapUser(PPRTR0MEMOBJINTERNAL ppMem, PRTR0MEMOBJINTERNAL pMemToMap, RTR3PTR R3PtrFixed, size_t uAlignment, unsigned fProt, RTR0PROCESS R0Process)
    412411{
    413     PRTR0MEMOBJSOLARIS pMemToMapSolaris = (PRTR0MEMOBJSOLARIS)pMemToMap;   
     412    PRTR0MEMOBJSOLARIS pMemToMapSolaris = (PRTR0MEMOBJSOLARIS)pMemToMap;
    414413    size_t size = pMemToMapSolaris->Core.cb;
    415414    proc_t *userproc = (proc_t *)R0Process;
     
    431430        /* Use user specified address */
    432431        addr = (caddr_t)R3PtrFixed;
    433        
     432
    434433        /* Verify user address (a bit paranoid) */
    435434        rc = valid_usr_range(addr, size, fProt, useras, (caddr_t)USERLIMIT32);
     
    440439            return VERR_INVALID_POINTER;
    441440        }
    442        
     441
    443442        /* Blow away any previous mapping */
    444443        as_unmap(useras, addr, size);
     
    454453            return VERR_MAP_FAILED;
    455454        }
    456        
     455
    457456        /* Check address against alignment, fail if it doesn't match */
    458457        if ((uintptr_t)addr & (uAlignment - 1))
     
    463462        }
    464463    }
    465    
     464
    466465    /* Our protection masks are identical to <sys/mman.h> but we
    467      * need to add PROT_USER for the pages to be accessible by user 
     466     * need to add PROT_USER for the pages to be accessible by user
    468467     */
    469468    struct segvn_crargs crArgs = SEGVN_ZFOD_ARGS(fProt | PROT_USER, PROT_ALL);
     
    542541            else    /* Kernel */
    543542                hatSpace = kas.a_hat;
    544            
     543
    545544            uint8_t *pb = (uint8_t *)pMemSolaris->Core.pv + ((size_t)iPage << PAGE_SHIFT);
    546545            return rtR0MemObjSolarisVirtToPhys(hatSpace, pb);
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette