Changeset 725 for soft/giet_vm/giet_kernel/sys_handler.h
- Timestamp:
- Nov 21, 2015, 2:28:31 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
soft/giet_vm/giet_kernel/sys_handler.h
r714 r725 51 51 #define SYSCALL_NO_CHANNEL_AVAILABLE (-18) 52 52 #define SYSCALL_CHANNEL_NON_ALLOCATED (-19) 53 #define SYSCALL_ILLEGAL_ XY_ARGUMENTS(-20)53 #define SYSCALL_ILLEGAL_ARGUMENT (-20) 54 54 #define SYSCALL_OUT_OF_KERNEL_HEAP_MEMORY (-21) 55 55 #define SYSCALL_ADDRESS_NON_ALIGNED (-22) … … 64 64 65 65 /////////////////////////////////////////////////////////////////////////////// 66 // This structure is used by the CMA component to store the status of the 67 // frame buffer (full or empty). The useful information is contained in the 68 // "status" integer (1 for full and 0 for empty). 69 // This structure must be aligned on a cache line (64 bytes) to simplify 70 // the software L2/L3 cache coherence when the IO bridge is used. 71 /////////////////////////////////////////////////////////////////////////////// 72 73 typedef struct buffer_status_s 74 { 75 unsigned int status; 76 unsigned int padding[15]; 77 } buffer_status_t; 78 79 /////////////////////////////////////////////////////////////////////////////// 80 // This structure is used by the CMA component to move a stream 81 // of images from two user buffers to the frame buffer in kernel space. 66 // This structure is used by the CMA component to move a stream of images 67 // from a set of user buffers to the frame buffer in kernel space. 82 68 // It contains two chbuf arrays: 83 // - The SRC chbuf contains two buffers (buf0 & buf1), in user space. 84 // - The DST cbuf contains one single buffer (fbf), that is the frame buffer. 69 // - The SRC chbuf contains <nbufs> buffer descriptors, in user space, 70 // that can be distributed (one buffer per cluster) or not. 71 // - The DST cbuf contains one single buffer, that is the frame buffer. 85 72 // Each buffer is described with a 64 bits buffer descriptor: 86 // - the 26 LSB bits contain bits[6:31] of the buffer physical address 87 // - the 26 following bits contain bits[6:31] of the physical address where the 88 // buffer status is located 89 // - the 12 MSB bits contain the common address extension of the buffer and its 90 // status 91 // The length field define the buffer size (bytes) 73 // - the 26 LSB bits contain bits[31:6] of the status physical address. 74 // - the 26 following bits contain bits[31:6] of the buffer physical address. 75 // - the 12 MSB bits contain the common address extension. 76 // The actual number of user buffers cannot be larger than 256 (at most 77 // one user buffer per cluster for a 16*16 mesh). 78 // NB: The user buffers are mapped in user space, but the chbuf descriptor 79 // contained in this structure is a protected kernel variable. 92 80 // This structure must be 64 bytes aligned. 93 81 /////////////////////////////////////////////////////////////////////////////// … … 95 83 typedef struct fbf_chbuf_s 96 84 { 97 unsigned long long buf0_desc; // first user buffer descriptor 98 unsigned long long buf1_desc; // second user buffer descriptor 99 unsigned long long fbf_desc; // frame buffer descriptor 100 unsigned int length; // buffer length (bytes) 101 unsigned int padding[9]; // padding for 64 bytes alignment 85 unsigned long long fbf_desc; // frame buffer descriptor 86 unsigned long long usr_desc[256]; // user chbuf descriptor 87 unsigned int nbufs; // number of user buffers 102 88 } fbf_chbuf_t; 103 89 … … 110 96 // The actual number of buffers used in the chbuf is defined by (xmax * ymax). 111 97 // Each buffer is described with a 64 bits buffer descriptor: 112 // - the 26 LSB bits contain bits[6:31] of the buffer physical address 113 // - the 26 following bits contain bits[6:31] of the physical address where the 114 // buffer status is located 115 // - the 12 MSB bits contain the common address extension of the buffer and its 116 // status 98 // - the 26 LSB bits contain bits[31:6] of the status physical address. 99 // - the 26 following bits contain bits[31:6] of the buffer physical address. 100 // - the 12 MSB bits contain the common address extension. 101 // The <xmax> and <ymax> fields define the actual mesh size. 117 102 // This structure must be 64 bytes aligned. 118 103 /////////////////////////////////////////////////////////////////////////////// 119 104 120 typedef struct ker_chbuf_s105 typedef struct nic_chbuf_s 121 106 { 122 unsigned long long buf_desc[X_SIZE*Y_SIZE]; // kernel chbuf descriptor107 unsigned long long buf_desc[X_SIZE*Y_SIZE]; // kernel chbuf descriptor 123 108 unsigned int xmax; // nb clusters in a row 124 109 unsigned int ymax; // nb clusters in a column 125 } ker_chbuf_t;110 } nic_chbuf_t; 126 111 127 112 … … 236 221 237 222 extern int _sys_fbf_sync_write( unsigned int offset, 238 void* buffer,239 unsigned int length );223 void* buffer, 224 unsigned int length ); 240 225 241 226 extern int _sys_fbf_sync_read( unsigned int offset, 242 void* buffer,243 unsigned int length );244 245 extern int _sys_fbf_cma_alloc( );227 void* buffer, 228 unsigned int length ); 229 230 extern int _sys_fbf_cma_alloc( unsigned int nbufs ); 246 231 247 232 extern int _sys_fbf_cma_release(); 248 233 249 extern int _sys_fbf_cma_init_buf(void* buf0_vbase, 250 void* buf1_vbase, 251 void* sts0_vaddr, 252 void* sts1_vaddr ); 253 254 extern int _sys_fbf_cma_start( unsigned int length ); 255 256 extern int _sys_fbf_cma_display( unsigned int buffer_index ); 234 extern int _sys_fbf_cma_init_buf( unsigned int index, 235 void* buf_vaddr, 236 void* sts_vaddr ); 237 238 extern int _sys_fbf_cma_start(); 239 240 extern int _sys_fbf_cma_display( unsigned int index ); 241 242 extern int _sys_fbf_cma_check( unsigned int index ); 257 243 258 244 extern int _sys_fbf_cma_stop(); … … 265 251 266 252 extern int _sys_proc_xyp( unsigned int* x, 267 unsigned int* y,268 unsigned int* p );253 unsigned int* y, 254 unsigned int* p ); 269 255 270 256 extern int _sys_procs_number( unsigned int* x_size, 271 unsigned int* y_size,272 unsigned int* nprocs );257 unsigned int* y_size, 258 unsigned int* nprocs ); 273 259 274 260 extern int _sys_vseg_get_vbase( char* vspace_name, 275 char* vseg_name,276 unsigned int* vbase );261 char* vseg_name, 262 unsigned int* vbase ); 277 263 278 264 extern int _sys_vseg_get_length( char* vspace_name, 279 char* vseg_name,280 unsigned int* length );265 char* vseg_name, 266 unsigned int* length ); 281 267 282 268 extern int _sys_xy_from_ptr( void* ptr, 283 unsigned int* x,284 unsigned int* y );269 unsigned int* x, 270 unsigned int* y ); 285 271 286 272 extern int _sys_heap_info( unsigned int* vaddr, 287 unsigned int* length,288 unsigned int x,289 unsigned int y );273 unsigned int* length, 274 unsigned int x, 275 unsigned int y ); 290 276 291 277 #endif
Note: See TracChangeset
for help on using the changeset viewer.