Changeset 23 for trunk/hal/generic
- Timestamp:
- Jun 18, 2017, 10:06:41 PM (8 years ago)
- Location:
- trunk/hal/generic
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/hal/generic/hal_atomic.h
r17 r23 67 67 68 68 /***************************************************************************************** 69 * This blocking function atomically increments a 32 bits unsigned int shared variable,70 * returning only when atomic increment is successful.71 *****************************************************************************************72 * @ ptr : pointer on the shared variable73 * @ return shared variable value before increment74 ****************************************************************************************/75 uint32_t hal_atomic_inc( uint32_t * ptr );76 77 /*****************************************************************************************78 * This blocking function atomically decrements a 32 bits unsigned int shared variable,79 * returning only when atomic decrement is successful.80 *****************************************************************************************81 * @ ptr : pointer on the shared variable82 * @ return shared variable value before decrement83 ****************************************************************************************/84 uint32_t hal_atomic_dec( uint32_t * ptr );85 86 /*****************************************************************************************87 69 * This NON blocking function makes an atomic Compare-And-Swap on a 32 bits unsigned int 88 70 * shared variable, returning a Boolean to indicate both success and atomicity. -
trunk/hal/generic/hal_gpt.h
r17 r23 166 166 uint32_t * attr, 167 167 ppn_t * ppn ); 168 /**************************************************************************************** 169 * This function copies all valid entries from the source <src_gpt> to the <dst_pgt>. 170 * The <src_gpt> and the <dst_gpt> point on the same physical pages. 171 * If the <cow> argument is true, the GPT_WRITABLE attribute is reset for all writable 172 * entries in both <src_gpt> and <dst_gpt>, and the PG_COW flag is registered in all 173 * writable physical page descriptors, to support the Copy-On-Write mechanism. 174 **************************************************************************************** 175 * @ dst_gpt : [in] pointer on the destination GPT. 176 * @ src_gpt : [in] pointer on the source GPT. 177 * @ cow : [in] activate the COPY-On-Write mechanism if true. 178 ***************************************************************************************/ 179 error_t hal_gpt_copy( gpt_t * dst_gpt, 180 gpt_t * src_gpt, 181 bool_t cow ); 168 182 169 183 -
trunk/hal/generic/hal_uspace.h
r17 r23 2 2 * hal_uspace.h - Generic User Space Access API definition 3 3 * 4 * Authors Mohamed Karaoui (2015) 5 * Alain Greiner (2016) 4 * Authors Alain Greiner (2016,2017) 6 5 * 7 6 * Copyright (c) UPMC Sorbonne Universites … … 33 32 // When moving data between user space and kernel space, the user address is always 34 33 // 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. 36 35 ////////////////////////////////////////////////////////////////////////////////////////// 37 36 … … 39 38 /***************************************************************************************** 40 39 * 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. 43 41 ***************************************************************************************** 44 42 * @ k_dst : destination address in kernel space. … … 52 50 /***************************************************************************************** 53 51 * 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. 56 53 ***************************************************************************************** 57 * @ u_dst : destination buffer address and sizein user space.54 * @ u_dst : destination buffer address in user space. 58 55 * @ k_src : source address in kernel space. 59 56 * @ size : size (number of bytes). 60 57 ****************************************************************************************/ 61 extern void hal_copy_to_uspace( void * u dst,62 void * k src,58 extern void hal_copy_to_uspace( void * u_dst, 59 void * k_src, 63 60 uint32_t size ); 64 61 65 62 /***************************************************************************************** 66 * This function activates the MMU to compute the length of a string in user space,67 * and returns it to a kernelbuffer.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. 68 65 ***************************************************************************************** 69 66 * @ u_str : string address in user space.
Note: See TracChangeset
for help on using the changeset viewer.