Changeset 237 for soft/giet_vm/sys/drivers.c
- Timestamp:
- May 2, 2013, 6:38:04 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
soft/giet_vm/sys/drivers.c
r232 r237 220 220 //unsigned int _timer_reset_irq_cpt(unsigned int cluster_id, unsigned int local_id) { 221 221 // // parameters checking 222 // if ( cluster_id >= NB_CLUSTERS) return 1; 223 // if ( local_id >= NB_TIMERS_MAX ) return 2; 222 // if (cluster_id >= NB_CLUSTERS) { 223 // return 1; 224 // } 225 // if (local_id >= NB_TIMERS_MAX) { 226 // return 2; 227 // } 224 228 // 225 229 //#if USE_XICU … … 227 231 //#else 228 232 // unsigned int * timer_address = (unsigned int *) ((char *) &seg_tim_base + (cluster_id * CLUSTER_SIZE)); 229 // 230 // timer_address[local_id * TIMER_SPAN + TIMER_RESETIRQ] = 1; 233 // unsigned int timer_period = timer_address[local_id * TIMER_SPAN + TIMER_PERIOD]; 234 // 235 // timer_address[local_id * TIMER_SPAN + TIMER_PERIOD] = timer_period; 231 236 //#endif 232 237 // … … 770 775 *status = ioc_address[BLOCK_DEVICE_STATUS]; // read status & reset IRQ 771 776 return 0; 777 } 778 779 780 /////////////////////////////////////////////////////////////////////////////// 781 // _ioc_get_block_size() 782 // This function returns the block_size with which the IOC has been configured. 783 /////////////////////////////////////////////////////////////////////////////// 784 unsigned int _ioc_get_block_size() { 785 // get IOC base address 786 unsigned int * ioc_address = (unsigned int *) &seg_ioc_base; 787 788 return ioc_address[BLOCK_DEVICE_BLOCK_SIZE]; 772 789 } 773 790 … … 905 922 906 923 // get page table address 907 unsigned int user_ptab = _get_context_slot( 924 unsigned int user_ptab = _get_context_slot(task_id, CTX_PTAB_ID); 908 925 909 926 // get peripheral buffer virtual address 910 if ( 927 if (dev_type) { 911 928 device_vaddr = (unsigned int) &seg_nic_base + offset; 912 929 } … … 926 943 927 944 // Compute user buffer physical address 928 ko = _v2p_translate( (page_table_t*)user_ptab, (user_vaddr >> 12), &ppn, &flags);945 ko = _v2p_translate((page_table_t*) user_ptab, (user_vaddr >> 12), &ppn, &flags); 929 946 if (ko) { 930 947 _get_lock(&_tty_put_lock);
Note: See TracChangeset
for help on using the changeset viewer.