Ignore:
Timestamp:
Dec 27, 2018, 7:38:58 PM (3 years ago)
Author:
alain
Message:

Fix several bugs in VFS to support the following
ksh commandis : cp, mv, rm, mkdir, cd, pwd

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/hal/tsar_mips32/core/hal_uspace.c

    r457 r610  
    4343    uint32_t dst = (uint32_t)k_dst;
    4444
     45#if DEBUG_HAL_USPACE
     46thread_t * this = CURRENT_THREAD;
     47printk("\n[%s] thread[%x,%x] enter in cluster %x / u_src %x / k_dst %x / size %d\n",
     48__FUNCTION__, this->process->pid, this->trdid, local_cxy, u_src, k_dst, size );
     49#endif
     50
    4551        if( (dst & 0x3) || (src & 0x3) ) wsize = 0;          // do it all in bytes
    4652    else                             wsize = size >> 2;
     
    8086
    8187    hal_restore_irq( save_sr );
     88
     89#if DEBUG_HAL_USPACE
     90printk("\n[%s] thread[%x,%x] exit\n",
     91__FUNCTION__, this->process->pid, this->trdid );
     92#endif
    8293
    8394}  // end hal_copy_from_uspace()
     
    94105    uint32_t dst = (uint32_t)u_dst;
    95106
     107#if DEBUG_HAL_USPACE
     108thread_t * this = CURRENT_THREAD;
     109printk("\n[%s] thread[%x,%x] enter in cluster %x / k_src %x / u_dst %x / size %d\n",
     110__FUNCTION__, this->process->pid, this->trdid, local_cxy, k_src, u_dst, size );
     111#endif
     112
    96113        if( (dst & 0x3) || (src & 0x3) ) wsize = 0;          // not aligned
    97114    else                             wsize = size >> 2;
     
    118135        asm volatile(
    119136        "mfc2   $15,   $1           \n"   /* save   MMU_MODE                */
    120         "lw         $13,   0(%0)        \n"   /* read data from kernel space    */
     137        "lb         $13,   0(%0)        \n"   /* read data from kernel space    */
    121138        "ori    $14,   $0,  0x7     \n" 
    122139        "mtc2   $14,   $1                       \n"   /* MMU_MODE <= DTLB ON            */
     
    130147
    131148    hal_restore_irq( save_sr );
     149
     150#if DEBUG_HAL_USPACE
     151printk("\n[%s] thread[%x,%x] exit\n",
     152__FUNCTION__, this->process->pid, this->trdid );
     153#endif
    132154
    133155}  // end hal_copy_to_uspace()
Note: See TracChangeset for help on using the changeset viewer.