Changeset 380 for trunk/kernel


Ignore:
Timestamp:
Aug 14, 2017, 6:31:25 PM (7 years ago)
Author:
alain
Message:

Remove the generic kernel/kern/do_exception files to handle exceptions in HAL.
The HAL call only the vmm_handle_page_fault() function if required.

Location:
trunk/kernel
Files:
2 deleted
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/kernel/kern/core.c

    r367 r380  
    7171                    uint32_t * tm_us )
    7272{
    73         *tm_s  = (core->ticks_nr*CONFIG_SCHED_TICK_PERIOD)/1000;
    74         *tm_us = (core->ticks_nr*CONFIG_SCHED_TICK_PERIOD*1000)%1000000;
     73        *tm_s  = (core->ticks_nr*CONFIG_SCHED_TICK_MS_PERIOD)/1000;
     74        *tm_us = (core->ticks_nr*CONFIG_SCHED_TICK_MS_PERIOD*1000)%1000000;
    7575}
    7676
     
    158158}
    159159
    160 
    161 /* deprecated [AG] july 20017
    162 ///////////////////////////////////////////////////
    163 void core_set_irq_vector_entry( core_t   * core,
    164                                 uint32_t   irq_type,
    165                                 uint32_t   irq_id,
    166                                 chdev_t  * chdev )
    167 {
    168         if     ( irq_type == WTI_TYPE ) core->wti_vector[irq_id] = chdev;
    169         else if( irq_type == HWI_TYPE ) core->hwi_vector[irq_id] = chdev;
    170         else                            core->pti_vector[irq_id] = chdev;
    171 }
    172 */
  • trunk/kernel/kern/kernel_init.c

    r337 r380  
    11221122    }
    11231123
    1124     // each core activates its private TICK IRQ
    1125     dev_pic_enable_timer( CONFIG_SCHED_TICK_PERIOD );
     1124    // each core activates its private TICK IRQ (number of ticks)
     1125    dev_pic_enable_timer( CONFIG_SCHED_TICKS_PER_QUANTUM );
    11261126
    11271127    // each core jump to idle thread
  • trunk/kernel/kern/process.c

    r374 r380  
    627627    parent_pid = hal_remote_lw( XPTR( parent_cxy , &parent_ptr->pid ) );
    628628
    629     exec_dmsg("\n[INFO] %s : thread %x on core[%x,d] enters for path = %s\n",
    630     __FUNCTION__, CURRENT_THREAD->trdid, local_cxy, CURRENT_THREAD->core->lid, path );
     629    exec_dmsg("\n[INFO] %s : thread %x on core[%x,%d] enters for path = %s\n",
     630    __FUNCTION__, CURRENT_THREAD->trdid, local_cxy, CURRENT_THREAD->core->lid , path );
    631631
    632632    // create new process descriptor
     
    654654    process_reference_init( process , pid , parent_xp );
    655655
    656     exec_dmsg("\n[INFO] %s : thread %x on core[%x,d] created process %x / path = %s\n",
     656    exec_dmsg("\n[INFO] %s : thread %x on core[%x,%d] created process %x / path = %s\n",
    657657    __FUNCTION__, CURRENT_THREAD->trdid, local_cxy, CURRENT_THREAD->core->lid, pid, path );
    658658
  • trunk/kernel/vfs/vfs.c

    r367 r380  
    13511351    error_t            error;
    13521352
    1353     vfs_dmsg("\n[INFO] %s : enters for <%s> at cycle %d\n",
    1354              __FUNCTION__ , pathname , (uint32_t)hal_time_stamp() );
    1355 
    13561353    this    = CURRENT_THREAD;
    13571354    process = this->process;
     1355
     1356    vfs_dmsg("\n[INFO] %s : enter for <%s> / core[%x,%d] / cycle %d\n",
     1357    __FUNCTION__ , pathname , local_cxy , this->core->lid , hal_time_stamp() );
    13581358
    13591359    // get extended pointer on first inode to search
     
    13771377        vfs_get_name_from_path( current , name , &next , &last );
    13781378
    1379         vfs_dmsg("\n[INFO] %s : looking for <%s> / last = %d\n",
    1380                  __FUNCTION__ , name , last );
     1379        vfs_dmsg("\n[INFO] %s : looking for <%s> / core[%x,%d] / last = %d\n",
     1380        __FUNCTION__ , name , local_cxy , this->core->lid , last );
    13811381
    13821382        // search a child dentry matching name in parent inode
     
    13951395        if (found == false ) // child node not found in inode tree
    13961396        {
    1397             vfs_dmsg("\n[INFO] %s : <%s> not found, try to load it\n",
    1398                      __FUNCTION__ , name );
     1397            vfs_dmsg("\n[INFO] %s : <%s> not found => load it / core[%x,%d]\n",
     1398            __FUNCTION__ , local_cxy , this->core->lid );
    13991399
    14001400            // release lock on parent inode
     
    14231423            {
    14241424                printk("\n[ERROR] in %s : no memory for inode %s in path %s\n",
    1425                        __FUNCTION__ , name , pathname );
     1425                __FUNCTION__ , name , pathname );
    14261426                return ENOMEM;
    14271427            }
     
    14451445            if ( error )
    14461446            {
    1447                 printk("\n[ERROR] in %s : node %s not found in path %s\n",
    1448                        __FUNCTION__ , name , pathname );
     1447                printk("\n[ERROR] in %s : core[%x,%d] / <%s> not found in parent\n",
     1448                __FUNCTION__ , local_cxy , this->core->lid , name );
    14491449                return ENOENT;
    14501450            }
     
    14701470                if ( error )
    14711471                {
    1472                     printk("\n[ERROR] in %s : cannot access device for node %s in path %s\n",
    1473                            __FUNCTION__ , name , pathname );
     1472                    printk("\n[ERROR] in %s : core[%x,%d] cannot access device for <%s>\n",
     1473                    __FUNCTION__ , local_cxy , this->core->lid , name );
    14741474                    return EIO;
    14751475                }
     
    14821482        }
    14831483
    1484         vfs_dmsg("\n[INFO] %s : found <%s> / parent = %l / child = %l / last = %d\n",
    1485                      __FUNCTION__ , name , parent_xp , child_xp , last );
    1486 
    1487         // TODO check access rights
     1484        vfs_dmsg("\n[INFO] %s : found <%s> / core[%x,%d] / parent = %l / child = %l\n",
     1485        __FUNCTION__ , name , local_cxy , this->core->lid , parent_xp , child_xp );
     1486
     1487        // TODO check access rights here [AG]
    14881488        // error = vfs_access_denied( child_xp,
    14891489        //                            client_uid,
     
    15081508    vfs_inode_unlock( parent_xp );
    15091509
    1510     vfs_dmsg("\n[INFO] in %s : exit <%s> found / inode = %l\n",
     1510    vfs_dmsg("\n[INFO] %s : exit <%s> found / inode = %l\n",
    15111511                 __FUNCTION__ , pathname , child_xp );
    15121512
     
    16071607    parent_ptr = (vfs_inode_t *)GET_PTR( parent_xp );
    16081608
    1609     vfs_dmsg("\n[INFO] %s : enter in cluster %x for <%s> / child_cxy = %x / parent_xp = %l\n",
    1610     __FUNCTION__ , local_cxy , name , child_cxy , parent_xp );
     1609    vfs_dmsg("\n[INFO] %s : enter for <%s> / core[%x,%d] / child_cxy = %x / parent_xp = %l\n",
     1610    __FUNCTION__ , name , local_cxy , CURRENT_THREAD->core->lid , child_cxy , parent_xp );
    16111611
    16121612    // 1. create dentry
Note: See TracChangeset for help on using the changeset viewer.