Changeset 754 for soft/giet_vm
- Timestamp:
- Jan 7, 2016, 4:12:54 PM (9 years ago)
- Location:
- soft/giet_vm
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
soft/giet_vm/giet_common/kernel_malloc.h
r594 r754 53 53 extern void _heap_init(); 54 54 55 extern unsigned int _get_heap_info( unsigned int* heap_base, 56 unsigned int* heap_size, 57 unsigned int x, 58 unsigned int y ); 59 55 60 56 61 #endif -
soft/giet_vm/giet_drivers/mmc_driver.c
r630 r754 10 10 #include <tty0.h> 11 11 #include <kernel_locks.h> 12 #include <kernel_malloc.h> 12 13 #include <utils.h> 13 14 … … 80 81 else 81 82 { 83 // get heap_base & heap size 84 unsigned int heap_base; 85 unsigned int heap_size; 86 if ( _get_heap_info( &heap_base, &heap_size, x, y ) ) continue; 87 82 88 _mmc_distributed_lock[x][y] = _remote_malloc( sizeof(spin_lock_t), x, y ); 83 89 _spin_lock_init( _mmc_distributed_lock[x][y] ); -
soft/giet_vm/giet_drivers/rdk_driver.c
r529 r754 26 26 #if USE_IOC_RDK 27 27 28 #if GIET_DEBUG_IOC _DRIVER28 #if GIET_DEBUG_IOC 29 29 unsigned int procid = _get_procid(); 30 30 unsigned int x = procid >> (Y_WIDTH + P_WIDTH); … … 37 37 38 38 char* rdk = (char*)SEG_RDK_BASE + (512*lba); 39 char* buf = (char*)buf_ paddr;39 char* buf = (char*)buf_vaddr; 40 40 41 41 if ( to_mem ) memcpy( buf, rdk, count*512 ); -
soft/giet_vm/giet_kernel/sys_handler.c
r753 r754 194 194 &_sys_fbf_size, /* 0x08 */ 195 195 &_sys_fbf_alloc, /* 0x09 */ 196 197 #if NB_CMA_CHANNELS 196 198 &_sys_fbf_cma_alloc, /* 0x0A */ 197 199 &_sys_fbf_cma_init_buf, /* 0x0B */ … … 200 202 &_sys_fbf_cma_stop, /* 0x0E */ 201 203 &_sys_fbf_cma_check, /* 0x0F */ 204 #else 205 &_sys_ukn, /* 0x0A */ 206 &_sys_ukn, /* 0x0B */ 207 &_sys_ukn, /* 0x0C */ 208 &_sys_ukn, /* 0x0D */ 209 &_sys_ukn, /* 0x0E */ 210 &_sys_ukn, /* 0x0F */ 211 #endif 202 212 203 213 &_sys_applications_status, /* 0x10 */ … … 235 245 &_sys_ukn, /* 0x2F */ 236 246 247 #if NB_NIC_CHANNELS 237 248 &_sys_nic_alloc, /* 0x30 */ 238 249 &_sys_nic_start, /* 0x31 */ … … 241 252 &_sys_nic_stats, /* 0x34 */ 242 253 &_sys_nic_clear, /* 0x35 */ 254 #else 255 &_sys_ukn, /* 0x30 */ 256 &_sys_ukn, /* 0x31 */ 257 &_sys_ukn, /* 0x32 */ 258 &_sys_ukn, /* 0x33 */ 259 &_sys_ukn, /* 0x34 */ 260 &_sys_ukn, /* 0x35 */ 261 #endif 262 243 263 &_sys_tty_write, /* 0x36 */ 244 264 &_sys_tty_read, /* 0x37 */ … … 1540 1560 int _sys_tty_alloc( unsigned int shared ) 1541 1561 { 1542 unsigned int channel ; // allocated TTY channel1543 1544 // get trdid andvsid for the calling thread1562 unsigned int channel = 0; // allocated TTY channel 1563 1564 // get vsid for the calling thread 1545 1565 unsigned int vsid = _get_context_slot( CTX_VSID_ID ); 1546 unsigned int trdid = _get_thread_trdid();1547 1566 1548 1567 mapping_header_t *header = (mapping_header_t *)SEG_BOOT_MAPPING_BASE; … … 1555 1574 else users = 1; 1556 1575 1576 #if NB_TTY_CHANNELS > 1 1577 // get trdid for the calling thread 1578 unsigned int trdid = _get_thread_trdid(); 1579 1557 1580 // get a TTY channel 1558 1581 for ( channel = 0 ; channel < NB_TTY_CHANNELS ; channel++ ) … … 1562 1585 if ( _atomic_test_and_set( palloc , users ) == 0 ) break; 1563 1586 } 1564 if ( channel >= NB_TTY_CHANNELS)1587 if ( ( channel >= NB_TTY_CHANNELS ) ) 1565 1588 { 1566 1589 _printf("\n[GIET_ERROR] in _sys_tty_alloc() : " … … 1582 1605 unsigned int p = procid & ((1<<P_WIDTH)-1); 1583 1606 _tty_channel_wti[channel] = x<<24 | y<<16 | p<<8 | wti_id; 1607 1608 #else 1609 1610 unsigned int* palloc = &_tty_channel_alloc[0]; 1611 _atomic_increment( palloc, users ); 1612 1613 #endif 1584 1614 1585 1615 // update CTX_TTY_ID … … 1905 1935 #define NIC_CONTAINER_SIZE 4096 1906 1936 1907 #if NB_NIC_CHANNELS 1937 #if NB_NIC_CHANNELS && NB_CMA_CHANNELS 1908 1938 1909 1939 //////////////////////////////////////// … … 2684 2714 } // end _sys_nic_stats() 2685 2715 2686 #endif 2716 #endif // if NB_NIC_CHANNELS && NB_CMA_CHANNELS 2687 2717 2688 2718 ///////////////////////////////////////////////////////////////////////////////////////// … … 2817 2847 } 2818 2848 2849 #if NB_CMA_CHANNELS 2850 2819 2851 //////////////////////////////////////////// 2820 2852 int _sys_fbf_cma_alloc( unsigned int nbufs ) … … 3294 3326 3295 3327 } // end _sys_fbf_cma_stop() 3328 3329 #endif // if NB_CMA_CHANNELS 3296 3330 3297 3331
Note: See TracChangeset
for help on using the changeset viewer.