Ignore:
Timestamp:
Jun 18, 2017, 10:06:41 PM (7 years ago)
Author:
alain
Message:

Introduce syscalls.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/hal/generic/hal_uspace.h

    r17 r23  
    22 * hal_uspace.h - Generic User Space Access API definition
    33 *
    4  * Authors   Mohamed Karaoui  (2015)
    5  *           Alain Greiner    (2016)
     4 * Authors    Alain Greiner (2016,2017)
    65 *
    76 * Copyright (c)  UPMC Sorbonne Universites
     
    3332// When moving data between user space and kernel space, the user address is always
    3433// a virtual address, but the kernel address can be a physical address, on some
    35 // architectures. Therefore, data transfers must use the following API.
     34// architectures. For sake of portability, data transfers must use the following API.
    3635//////////////////////////////////////////////////////////////////////////////////////////
    3736
     
    3938/*****************************************************************************************
    4039 * This function tranfers a data buffer from the user space to the kernel space.
    41  * As the kernel is using physical addresses on the TSAR architecture, it activates
    42  * the MMU to access the user buffer.
     40 * If the kernel uses physical addresses, it activates the MMU to access the user buffer.
    4341 *****************************************************************************************
    4442 * @ k_dst     : destination address in kernel space.
     
    5250/*****************************************************************************************
    5351 * This function tranfers a data buffer from the kernel space to the user space.
    54  * As the kernel is using physical addresses on the TSAR architecture, it activates
    55  * the MMU to access the user buffer.
     52 * If the kernel uses physical addresses, it activates the MMU to access the user buffer.
    5653 *****************************************************************************************
    57  * @ u_dst     : destination buffer address and size in user space.
     54 * @ u_dst     : destination buffer address in user space.
    5855 * @ k_src     : source address in kernel space.
    5956 * @ size      : size (number of bytes).
    6057 ****************************************************************************************/
    61 extern void hal_copy_to_uspace( void     * udst,
    62                                 void     * ksrc,
     58extern void hal_copy_to_uspace( void     * u_dst,
     59                                void     * k_src,
    6360                                uint32_t   size );
    6461
    6562/*****************************************************************************************
    66  * This function activates the MMU to compute the length of a string in user space,
    67  * and returns it to a kernel buffer.
     63 * This function computes the length of a string in user space.
     64 * If the kernel uses physical addresses, it activates the MMU to access the user buffer.
    6865 *****************************************************************************************
    6966 * @ u_str     : string address in user space.
Note: See TracChangeset for help on using the changeset viewer.