Changeset 654 for trunk/hal/tsar_mips32/drivers
- Timestamp:
- Nov 14, 2019, 4:03:25 PM (5 years ago)
- Location:
- trunk/hal/tsar_mips32/drivers
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/hal/tsar_mips32/drivers/soclib_fbf.c
r647 r654 72 72 #if (DEBUG_HAL_FBF|| DEBUG_HAL_FBF) 73 73 uint32_t cycle = (uint32_t)hal_get_cycles(); 74 thread_t * this = CURRENT_THREAD;75 74 process_t * process = hal_remote_lpt( XPTR( th_cxy , &th_ptr->process ) ); 76 75 pid_t client_pid = hal_remote_l32( XPTR( th_cxy , &process->pid ) ); … … 98 97 #if DEBUG_HAL_FBF 99 98 if( DEBUG_HAL_FBF < cycle ) 100 printk("\n[%s] thread[%x,%x] / client[%x,%x] / READ / offset / length / buffer %x / cycle %d\n",101 __FUNCTION__ , this->process->pid, this->trdid,client_pid, client_trdid,102 offset, length, buffer, cycle);99 printk("\n[%s] client thread[%x,%x] / READ / offset %d / length %d / buffer %x / fbf (%x,%x)\n", 100 __FUNCTION__ , client_pid, client_trdid, 101 offset, length, buffer, GET_CXY(base_xp), GET_PTR(base_xp) ); 103 102 #endif 104 103 hal_copy_to_uspace( buffer, 105 104 base_xp + offset, 106 105 length ); 106 #if DEBUG_HAL_FBF 107 if( DEBUG_HAL_FBF < cycle ) 108 printk("\n[%s] client thread[%x,%x] / READ successful / cycle %d\n", 109 __FUNCTION__ , client_pid, client_trdid , cycle ); 110 #endif 107 111 108 112 } … … 112 116 #if DEBUG_HAL_FBF 113 117 if( DEBUG_HAL_FBF < cycle ) 114 printk("\n[%s] thread[%x,%x] / client[%x,%x] / WRITE / offset / length / buffer %x / cycle %d\n",115 __FUNCTION__ , this->process->pid, this->trdid, client_pid, client_trdid,116 offset, length, buffer, cycle);118 printk("\n[%s] client thread[%x,%x] / WRITE / offset %d / length %d / buffer %x / fbf (%x,%x)\n", 119 __FUNCTION__ , client_pid, client_trdid, 120 offset, length, buffer, GET_CXY(base_xp), GET_PTR(base_xp) ); 117 121 #endif 118 122 hal_copy_from_uspace( base_xp + offset, 119 123 buffer, 120 124 length ); 125 #if DEBUG_HAL_FBF 126 if( DEBUG_HAL_FBF < cycle ) 127 printk("\n[%s] client thread[%x,%x] / WRITE successful / cycle %d\n", 128 __FUNCTION__ , client_pid, client_trdid , cycle ); 129 #endif 130 121 131 } 122 132 -
trunk/hal/tsar_mips32/drivers/soclib_fbf.h
r647 r654 32 32 * 33 33 * This hardware component supports both a frame buffer, and a set of addressable 34 * configuration 34 * configuration/status registers. 35 35 ***************************************************************************************/ 36 36 37 37 /**************************************************************************************** 38 38 * SOCLIB_FBF registers offsets 39 * The three addressables registers are on top of the 4 Mbytes allocated40 * t o the frame buffer itself.39 * The three addressables registers are on top of the 4 Mbytes containing 40 * the frame buffer itself. 41 41 ***************************************************************************************/ 42 42 -
trunk/hal/tsar_mips32/drivers/soclib_mmc.c
r626 r654 116 116 117 117 // get faulty ADDRESS and SRCID from MMC registers 118 uint32_t paddr_lo = *(base + (SOCLIB_MMC_ERROR_FUNC << 7) + SOCLIB_MMC_ERROR_ADDR_LO);119 uint32_t paddr_hi = *(base + (SOCLIB_MMC_ERROR_FUNC << 7) + SOCLIB_MMC_ERROR_ADDR_HI);120 uint32_t srcid = *(base + (SOCLIB_MMC_ERROR_FUNC << 7) + SOCLIB_MMC_ERROR_SRCID);118 uint32_t paddr_lo = *(base + MMC_REG( SOCLIB_MMC_ERROR_FUNC , SOCLIB_MMC_ERROR_ADDR_LO ) ); 119 uint32_t paddr_hi = *(base + MMC_REG( SOCLIB_MMC_ERROR_FUNC , SOCLIB_MMC_ERROR_ADDR_HI ) ); 120 uint32_t srcid = *(base + MMC_REG( SOCLIB_MMC_ERROR_FUNC , SOCLIB_MMC_ERROR_SRCID ) ); 121 121 122 paddr_t paddr = (((paddr_t)paddr_hi)<<32) + ((paddr_t)paddr_lo); 122 // print an error message on kernel terminal 123 printk("\n[ERROR] reported from MMC : cxy %x / cycle %d / bad address [%x,%x] / srcid %x\n", 124 local_cxy , (uint32_t)hal_get_cycles() , paddr_hi , paddr_lo , srcid ); 125 126 // reset MMC IRQ 127 *(base + MMC_REG(SOCLIB_MMC_ERROR_FUNC , SOCLIB_MMC_ERROR_IRQ_RESET) ) = 0; 123 128 124 // reset MMC IRQ125 *(base + (SOCLIB_MMC_ERROR_FUNC << 7) + SOCLIB_MMC_ERROR_IRQ_RESET) = 0;126 127 // print an error message on kernel terminal TODO : should be improved128 printk("\n[ERROR] reported from MMC in cluster %x : faulty address = %l / srcid = %x\n",129 paddr , srcid );130 131 129 } // end soclib_mmc_isr() 132 130
Note: See TracChangeset
for help on using the changeset viewer.