Changeset 421 for trunk/kernel/syscalls/sys_get_config.c
- Timestamp:
- Jan 29, 2018, 5:40:34 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/kernel/syscalls/sys_get_config.c
r410 r421 35 35 int sys_get_config( uint32_t * x_size, 36 36 uint32_t * y_size, 37 uint32_t * y_width, 37 38 uint32_t * ncores ) 38 39 { … … 40 41 uint32_t k_x_size; 41 42 uint32_t k_y_size; 43 uint32_t k_y_width; 42 44 uint32_t k_ncores; 43 45 … … 48 50 49 51 // check buffer in user space 50 error |= vmm_v2p_translate( false , x_size , &paddr ); 51 error |= vmm_v2p_translate( false , y_size , &paddr ); 52 error |= vmm_v2p_translate( false , ncores , &paddr ); 52 error |= vmm_v2p_translate( false , x_size , &paddr ); 53 error |= vmm_v2p_translate( false , y_size , &paddr ); 54 error |= vmm_v2p_translate( false , y_width , &paddr ); 55 error |= vmm_v2p_translate( false , ncores , &paddr ); 53 56 54 57 if( error ) … … 61 64 62 65 // get parameters 63 k_x_size = LOCAL_CLUSTER->x_size; 64 k_y_size = LOCAL_CLUSTER->y_size; 65 k_ncores = LOCAL_CLUSTER->cores_nr; 66 k_x_size = LOCAL_CLUSTER->x_size; 67 k_y_size = LOCAL_CLUSTER->y_size; 68 k_y_width = LOCAL_CLUSTER->y_width; 69 k_ncores = LOCAL_CLUSTER->cores_nr; 66 70 67 71 // copy to user space 68 hal_copy_to_uspace( x_size , &k_x_size , sizeof(uint32_t) ); 69 hal_copy_to_uspace( y_size , &k_y_size , sizeof(uint32_t) ); 70 hal_copy_to_uspace( ncores , &k_ncores , sizeof(uint32_t) ); 72 hal_copy_to_uspace( x_size , &k_x_size , sizeof(uint32_t) ); 73 hal_copy_to_uspace( y_size , &k_y_size , sizeof(uint32_t) ); 74 hal_copy_to_uspace( y_width , &k_y_width , sizeof(uint32_t) ); 75 hal_copy_to_uspace( ncores , &k_ncores , sizeof(uint32_t) ); 71 76 72 77 return 0;
Note: See TracChangeset
for help on using the changeset viewer.