Changeset 614 for soft/giet_vm/giet_kernel/sys_handler.h
- Timestamp:
- Jul 15, 2015, 6:15:52 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
soft/giet_vm/giet_kernel/sys_handler.h
r556 r614 24 24 25 25 /////////////////////////////////////////////////////////////////////////////// 26 // This structure is used by the nic_chbuf_t and fbf_chbuf_t structures. 27 // It describes a single buffer descriptor. The useful information is 28 // contained in one single 64 bits word (desc field): 29 // - the 48 LSB bits contain the buffer physical address 30 // - the MSB bit 63 indicates the buffer state (empty if 0) 31 // This descriptor must be aligned on a cache line (64 bytes) to simplify 26 // This structure is used by the CMA component to store the status of the 27 // frame buffer (full or empty). The useful information is contained in the 28 // "status" integer (1 for full and 0 for empty). 29 // This structure must be aligned on a cache line (64 bytes) to simplify 32 30 // the software L2/L3 cache coherence when the IO bridge is used. 33 31 /////////////////////////////////////////////////////////////////////////////// 34 32 35 typedef struct buffer_ descriptor_s33 typedef struct buffer_status_s 36 34 { 37 unsigned long long desc;38 unsigned int padding[14];39 } buffer_ descriptor_t;40 35 unsigned int status; 36 unsigned int padding[15]; 37 } buffer_status_t; 38 41 39 /////////////////////////////////////////////////////////////////////////////// 42 40 // This structure is used by the CMA component to move a stream … … 45 43 // - The SRC chbuf contains two buffers (buf0 & buf1), in user space. 46 44 // - The DST cbuf contains one single buffer (fbf), that is the frame buffer. 47 // - The length field define the buffer size (bytes) 45 // Each buffer is described with a 64 bits buffer descriptor: 46 // - the 26 LSB bits contain bits[6:31] of the buffer physical address 47 // - the 26 following bits contain bits[6:31] of the physical address where the 48 // buffer status is located 49 // - the 12 MSB bits contain the common address extension of the buffer and its 50 // status 51 // The length field define the buffer size (bytes) 48 52 // This structure must be 64 bytes aligned. 49 53 /////////////////////////////////////////////////////////////////////////////// … … 51 55 typedef struct fbf_chbuf_s 52 56 { 53 buffer_descriptor_t buf0;// first user buffer descriptor54 buffer_descriptor_t buf1;// second user buffer descriptor55 buffer_descriptor_t fbf;// frame buffer descriptor56 unsigned int length;// buffer length (bytes)57 unsigned int padding[15];// padding for 64 bytes alignment57 unsigned long long buf0_desc; // first user buffer descriptor 58 unsigned long long buf1_desc; // second user buffer descriptor 59 unsigned long long fbf_desc; // frame buffer descriptor 60 unsigned int length; // buffer length (bytes) 61 unsigned int padding[9]; // padding for 64 bytes alignment 58 62 } fbf_chbuf_t; 59 63 … … 65 69 // The number of distributed containers can be smaller than (X_SIZE * YSIZE). 66 70 // The actual number of buffers used in the chbuf is defined by (xmax * ymax). 71 // Each buffer is described with a 64 bits buffer descriptor: 72 // - the 26 LSB bits contain bits[6:31] of the buffer physical address 73 // - the 26 following bits contain bits[6:31] of the physical address where the 74 // buffer status is located 75 // - the 12 MSB bits contain the common address extension of the buffer and its 76 // status 67 77 // This structure must be 64 bytes aligned. 68 78 /////////////////////////////////////////////////////////////////////////////// 69 79 70 typedef struct nic_chbuf_s80 typedef struct ker_chbuf_s 71 81 { 72 buffer_descriptor_t buffer[X_SIZE*Y_SIZE]; // kernel chbuf73 unsigned int xmax; // nb clusters in a row74 unsigned int ymax; // nb clusters in a column75 } nic_chbuf_t;82 unsigned long long buf_desc[X_SIZE*Y_SIZE]; // kernel chbuf descriptor 83 unsigned int xmax; // nb clusters in a row 84 unsigned int ymax; // nb clusters in a column 85 } ker_chbuf_t; 76 86 77 87 … … 171 181 int _sys_fbf_cma_alloc(); 172 182 173 int _sys_fbf_cma_start( void* vbase0, 174 void* vbase1, 175 unsigned int length ); 183 int _sys_fbf_cma_init_buf(void* buf0_vbase, 184 void* buf1_vbase, 185 void* sts0_vaddr, 186 void* sts1_vaddr ); 187 188 int _sys_fbf_cma_start( unsigned int length ); 176 189 177 190 int _sys_fbf_cma_display( unsigned int buffer_index );
Note: See TracChangeset
for help on using the changeset viewer.