Ignore:
Timestamp:
Nov 14, 2019, 4:03:25 PM (4 years ago)
Author:
alain
Message:

euh...

Location:
trunk/hal/tsar_mips32/drivers
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/hal/tsar_mips32/drivers/soclib_fbf.c

    r647 r654  
    7272#if (DEBUG_HAL_FBF|| DEBUG_HAL_FBF)
    7373uint32_t    cycle        = (uint32_t)hal_get_cycles();
    74 thread_t  * this         = CURRENT_THREAD;
    7574process_t * process      = hal_remote_lpt( XPTR( th_cxy , &th_ptr->process ) );
    7675pid_t       client_pid   = hal_remote_l32( XPTR( th_cxy , &process->pid ) );
     
    9897#if DEBUG_HAL_FBF
    9998if( 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 );
     99printk("\n[%s] client thread[%x,%x] / READ / offset %d / length %d / buffer %x / fbf (%x,%x)\n",
     100__FUNCTION__ , client_pid, client_trdid,
     101offset, length, buffer, GET_CXY(base_xp), GET_PTR(base_xp) );
    103102#endif
    104103        hal_copy_to_uspace( buffer,
    105104                            base_xp + offset,
    106105                            length );
     106#if DEBUG_HAL_FBF
     107if( DEBUG_HAL_FBF < cycle )
     108printk("\n[%s] client thread[%x,%x] / READ successful / cycle %d\n",
     109__FUNCTION__ , client_pid, client_trdid , cycle );
     110#endif
    107111
    108112    }
     
    112116#if DEBUG_HAL_FBF
    113117if( 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 );
     118printk("\n[%s] client thread[%x,%x] / WRITE / offset %d / length %d / buffer %x / fbf (%x,%x)\n",
     119__FUNCTION__ , client_pid, client_trdid,
     120offset, length, buffer, GET_CXY(base_xp), GET_PTR(base_xp) );
    117121#endif
    118122        hal_copy_from_uspace( base_xp + offset,
    119123                              buffer,
    120124                              length );
     125#if DEBUG_HAL_FBF
     126if( DEBUG_HAL_FBF < cycle )
     127printk("\n[%s] client thread[%x,%x] / WRITE successful / cycle %d\n",
     128__FUNCTION__ , client_pid, client_trdid , cycle );
     129#endif
     130
    121131    }
    122132
  • trunk/hal/tsar_mips32/drivers/soclib_fbf.h

    r647 r654  
    3232 *
    3333 * This hardware component supports both a frame buffer, and a set of addressable
    34  * configuration status registers.
     34 * configuration/status registers.
    3535 ***************************************************************************************/
    3636
    3737/****************************************************************************************
    3838 *                    SOCLIB_FBF registers offsets
    39  * The three addressables registers are on top  of the 4 Mbytes allocated
    40  * to the frame buffer itself.
     39 * The three addressables registers are on top  of the 4 Mbytes containing
     40 * the frame buffer itself.
    4141 ***************************************************************************************/
    4242
  • trunk/hal/tsar_mips32/drivers/soclib_mmc.c

    r626 r654  
    116116
    117117    // 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 ) );
    121121
    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;
    123128   
    124     // reset MMC IRQ
    125     *(base + (SOCLIB_MMC_ERROR_FUNC << 7) + SOCLIB_MMC_ERROR_IRQ_RESET) = 0;
    126    
    127     // print an error message on kernel terminal TODO : should be improved
    128     printk("\n[ERROR] reported from MMC in cluster %x : faulty address = %l / srcid = %x\n",
    129            paddr , srcid );
    130 
    131129} // end soclib_mmc_isr()
    132130
Note: See TracChangeset for help on using the changeset viewer.