Changeset 440 for soft/giet_vm/giet_kernel/sys_handler.h
- Timestamp:
- Nov 3, 2014, 11:03:55 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
soft/giet_vm/giet_kernel/sys_handler.h
r428 r440 5 5 // Copyright (c) UPMC-LIP6 6 6 /////////////////////////////////////////////////////////////////////////////////// 7 // The sys_handler.c and sys_handler.h files are part of the GIET-VM nano-kernel. 8 // It define the syscall_vector[] (at the end of this file), as well as the 9 // associated syscall handlers. 10 /////////////////////////////////////////////////////////////////////////////////// 7 11 8 12 #ifndef _SYS_HANDLER_H 9 13 #define _SYS_HANDLER_H 10 14 11 ////////////////////////////////////////////////////////////////////////////////// 15 #include <mapping_info.h> 16 17 /////////////////////////////////////////////////////////////////////////////////// 12 18 // Syscall Vector Table (indexed by syscall index) 13 ////////////////////////////////////////////////////////////////////////////////// 19 /////////////////////////////////////////////////////////////////////////////////// 14 20 15 21 extern const void * _syscall_vector[64]; 16 22 23 /////////////////////////////////////////////////////////////////////////////////// 24 // This structure can be used by the vci_chbuf_dma component to transfer a stream 25 // of images from two buffers in user space to the frame buffer in kernel space. 26 // It contains two chbuf descriptors 27 // - The SRC chbuf contains two buffers (buf0 & buf1), that can be in user space. 28 // - The DST cbuf contains one single buffer (fbf), that is the frame buffer. 29 /////////////////////////////////////////////////////////////////////////////////// 30 31 typedef struct fbf_chbuf_s 32 { 33 unsigned long long buf0; // physical address + status for user buffer 0 34 unsigned long long buf1; // physical address + status for user buffer 1 35 unsigned long long fbf; // physical address + status for user buffer 0 36 unsigned int length; // buffer length (bytes) 37 unsigned int padding; // for 32 bytes alignment 38 } fbf_chbuf_t; 39 17 40 ////////////////////////////////////////////////////////////////////////////////// 18 // Prototypes os the syscall handlers (other than peripheral drivers)41 // TTY related syscall handlers 19 42 ////////////////////////////////////////////////////////////////////////////////// 20 43 21 void _sys_ukn();44 int _sys_tty_alloc(); 22 45 23 void _proc_xyp( unsigned int* x,24 unsigned int* y,25 unsigned int* p);46 int _sys_tty_write( const char* buffer, 47 unsigned int length, 48 unsigned int channel ); 26 49 27 void _task_exit(); 50 int _sys_tty_read( char* buffer, 51 unsigned int length, 52 unsigned int channel ); 28 53 29 void _context_switch(); 54 int _sys_tty_get_lock( unsigned int channel, 55 unsigned int * save_sr_ptr ); 30 56 31 unsigned int _local_task_id(); 57 int _sys_tty_release_lock( unsigned int channel, 58 unsigned int * save_sr_ptr ); 32 59 33 unsigned int _global_task_id(); 60 ////////////////////////////////////////////////////////////////////////////// 61 // TIM related syscall handlers 62 ////////////////////////////////////////////////////////////////////////////// 34 63 35 unsigned int _thread_id();64 int _sys_tim_alloc(); 36 65 37 unsigned int _procs_number( unsigned int cluster_id, 38 unsigned int* number ); 66 int _sys_tim_start( unsigned int period ); 39 67 40 unsigned int _vobj_get_vbase( char* vspace_name, 41 char* vobj_name, 42 unsigned int* vobj_vbase ); 68 int _sys_tim_stop(); 43 69 44 unsigned int _vobj_get_length( char* vspace_name, 45 char* vobj_name, 46 unsigned int* vobj_length ); 70 ////////////////////////////////////////////////////////////////////////////// 71 // NIC related syscall handlers 72 ////////////////////////////////////////////////////////////////////////////// 47 73 48 unsigned int _get_xy_from_ptr( void* ptr, 49 unsigned int* x, 50 unsigned int* y ); 74 int _sys_nic_alloc(); 51 75 76 int _sys_nic_sync_send( void* vbuf ); 77 78 int _sys_nic_sync_receive( void* vbuf ); 79 80 ////////////////////////////////////////////////////////////////////////////// 81 // FBF related syscall handlers 82 ////////////////////////////////////////////////////////////////////////////// 83 84 int _sys_fbf_sync_write( unsigned int offset, 85 void* buffer, 86 unsigned int length ); 87 88 int _sys_fbf_sync_read( unsigned int offset, 89 void* buffer, 90 unsigned int length ); 91 92 int _sys_fbf_cma_alloc(); 93 94 int _sys_fbf_cma_start( void* vbase0, 95 void* vbase1, 96 unsigned int length ); 97 98 int _sys_fbf_cma_display( unsigned int buffer_index ); 99 100 int _sys_fbf_cma_stop(); 101 102 ////////////////////////////////////////////////////////////////////////////// 103 // Miscelaneous syscall handlers 104 ////////////////////////////////////////////////////////////////////////////// 105 106 int _sys_ukn(); 107 108 int _sys_proc_xyp( unsigned int* x, 109 unsigned int* y, 110 unsigned int* p ); 111 112 int _sys_task_exit( char* string ); 113 114 int _context_switch(); 115 116 int _sys_local_task_id(); 117 118 int _sys_global_task_id(); 119 120 int _sys_thread_id(); 121 122 int _sys_procs_number( unsigned int x, 123 unsigned int y, 124 unsigned int* number ); 125 126 int _sys_vobj_get_vbase( char* vspace_name, 127 char* vobj_name, 128 unsigned int* vbase ); 129 130 int _sys_vobj_get_length( char* vspace_name, 131 char* vobj_name, 132 unsigned int* length ); 133 134 int _sys_xy_from_ptr( void* ptr, 135 unsigned int* x, 136 unsigned int* y ); 137 138 int _sys_heap_info( unsigned int* vaddr, 139 unsigned int* length, 140 unsigned int x, 141 unsigned int y ); 52 142 53 143 #endif
Note: See TracChangeset
for help on using the changeset viewer.