Changeset 637 for trunk/hal/generic
- Timestamp:
- Jul 18, 2019, 2:06:55 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/hal/generic/hal_uspace.h
r626 r637 31 31 // 32 32 // When moving data between user space and kernel space, the user address is always 33 // a virtual address, but the kernel address can be a physical address, on 32 bits 34 // architectures, and require MMU dynamic activation/deactivation. 33 // a virtual address, but the kernel address is an extended pointer. 35 34 // For sake of portability, user/kernel data transfers must use the following API. 36 35 ////////////////////////////////////////////////////////////////////////////////////////// … … 41 40 * that can be located in any cluster. 42 41 ***************************************************************************************** 43 * @ k_cxy : cluster identifier for kernel destination buffer. 44 * @ k_dst : local pointer on kernel destination buffer. 45 * @ u_src : source buffer address in user space. 42 * @ k_dst_xp : extended pointer on kernel destination buffer. 43 * @ u_src_ptr : source buffer address in user space. 46 44 * @ size : size (number of bytes). 47 45 ****************************************************************************************/ 48 extern void hal_copy_from_uspace( cxy_t k_cxy, 49 void * k_dst, 50 void * u_src, 46 extern void hal_copy_from_uspace( xptr_t k_dst_xp, 47 void * u_src_ptr, 51 48 uint32_t size ); 52 49 … … 55 52 * to a data buffer in the user space. 56 53 ***************************************************************************************** 57 * @ k_cxy : cluster identifier for kernel source buffer. 58 * @ k_src : local pointer on kernel source buffer. 59 * @ u_dst : destination buffer address in user space. 54 * @ u_dst_ptr : destination buffer address in user space. 55 * @ k_src_xp : extended pointer on kernel source buffer. 60 56 * @ size : size (number of bytes). 61 57 ****************************************************************************************/ 62 extern void hal_copy_to_uspace( cxy_t k_cxy, 63 void * k_src, 64 void * u_dst, 58 extern void hal_copy_to_uspace( void * u_dst_ptr, 59 xptr_t k_src_xp, 65 60 uint32_t size ); 66 61 … … 69 64 * The transfer stops after the first encountered NUL character, and no more than 70 65 * <max_size> characters are actually copied to target buffer. 71 * If the kernel uses physical addresses, it activates the MMU to access the user buffer.72 66 ***************************************************************************************** 73 * @ u_dst : destination buffer address in user space.74 * @ k_src : source address in kernelspace.67 * @ k_dst_xp : extended pointer on kernel destination buffer. 68 * @ u_src_ptr : source address in user space. 75 69 * @ max_size : max number of characters to be copied. 76 70 ****************************************************************************************/ 77 extern void hal_strcpy_from_uspace( char * k_dst,78 char * u_src ,71 extern void hal_strcpy_from_uspace( xptr_t k_dst_xp, 72 char * u_src_ptr, 79 73 uint32_t max_size ); 80 74 … … 83 77 * The transfer stops after the first encountered NUL character, and no more than 84 78 * <max_size> characters are actually copied to target buffer. 85 * If the kernel uses physical addresses, it activates the MMU to access the user buffer.86 79 ***************************************************************************************** 87 * @ u_dst 88 * @ k_src : source address in kernel space.80 * @ u_dst_ptr : destination buffer address in user space. 81 * @ k_src_xp : extended pointer on kernel source buffer. 89 82 * @ max_size : max number of characters to be copied. 90 83 ****************************************************************************************/ 91 extern void hal_strcpy_to_uspace( char * u_dst ,92 char * k_src,84 extern void hal_strcpy_to_uspace( char * u_dst_ptr, 85 xptr_t k_src_xp, 93 86 uint32_t max_size ); 94 87 95 88 /***************************************************************************************** 96 89 * This function computes the length of a string in user space. 97 * If the kernel uses physical addresses, it activates the MMU to access the user buffer.98 90 ***************************************************************************************** 99 91 * @ string : string in user space.
Note: See TracChangeset
for help on using the changeset viewer.