Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/generic/ddi.c

    rbf9cb2f r9359aae  
    7171 * @param flags Flags for the new address space area.
    7272 * @param virt  Virtual address of the starting page.
    73  *              If set to AS_AREA_ANY ((void *) -1), a suitable value
    74  *              is found by the kernel, otherwise the kernel tries to
    75  *              obey the desired value.
    76  *
    77  * @return EOK on success.
    78  * @return EPERM if the caller lacks the CAP_MEM_MANAGER capability.
     73 *
     74 * @return EOK on success
     75 * @return EPERM if the caller lacks the CAP_MEM_MANAGER capability
     76 * @return ENOENT if there is no task with specified ID
    7977 * @return ENOMEM if there was some problem in creating
    8078 *         the address space area.
     
    8785}
    8886
    89 /** Lock a piece physical memory for DMA transfers.
    90  *
    91  * The mapping of the specified virtual memory address
    92  * to physical memory address is locked in order to
    93  * make it safe for DMA transferts.
    94  *
    95  * Caller of this function must have the CAP_MEM_MANAGER capability.
    96  *
    97  * @param virt      Virtual address of the memory to be locked.
    98  * @param size      Number of bytes to lock.
    99  * @param map_flags Desired virtual memory area flags.
    100  * @param flags     Flags for the physical memory address.
    101  * @param phys      Locked physical memory address.
    102  *
    103  * @return EOK on success.
    104  * @return EPERM if the caller lacks the CAP_MEM_MANAGER capability.
    105  * @return ENOMEM if there was some problem in creating
    106  *         the address space area.
    107  *
    108  */
    10987int dmamem_map(void *virt, size_t size, unsigned int map_flags,
    11088    unsigned int flags, uintptr_t *phys)
     
    11593}
    11694
    117 /** Map a piece of physical memory suitable for DMA transfers.
    118  *
    119  * Caller of this function must have the CAP_MEM_MANAGER capability.
    120  *
    121  * @param size       Number of bytes to map.
    122  * @param constraint Bit mask defining the contraint on the physical
    123  *                   address to be mapped.
    124  * @param map_flags  Desired virtual memory area flags.
    125  * @param flags      Flags for the physical memory address.
    126  * @param virt       Virtual address of the starting page.
    127  *                   If set to AS_AREA_ANY ((void *) -1), a suitable value
    128  *                   is found by the kernel, otherwise the kernel tries to
    129  *                   obey the desired value.
    130  *
    131  * @return EOK on success.
    132  * @return EPERM if the caller lacks the CAP_MEM_MANAGER capability.
    133  * @return ENOMEM if there was some problem in creating
    134  *         the address space area.
    135  *
    136  */
    13795int dmamem_map_anonymous(size_t size, uintptr_t constraint,
    13896    unsigned int map_flags, unsigned int flags, uintptr_t *phys, void **virt)
     
    263221        size_t pages = SIZE2PAGES(offset + size);
    264222       
    265         void *virt_page = AS_AREA_ANY;
     223        void *virt_page;
    266224        int rc = physmem_map(phys_frame, pages,
    267225            AS_AREA_READ | AS_AREA_WRITE, &virt_page);
Note: See TracChangeset for help on using the changeset viewer.