Ignore:
Timestamp:
Jul 27, 2017, 12:23:29 AM (7 years ago)
Author:
alain
Message:

1) Introduce independant command fields for the various devices in the thread descriptor.
2) Introduce a new dev_pic_enable_ipi() function in the generic PIC device
3) Fix two bugs identified by Maxime in the scheduler initialisation, and in the sched_select().
4) fix several bugs in the TSAR hal_kentry.S.
5) Introduce a third kgiet segment (besides kdata and kcode) in the TSAR bootloader.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/kernel/devices/dev_pic.c

    r252 r279  
    2626#include <chdev.h>
    2727#include <printk.h>
     28#include <thread.h>
    2829#include <hal_drivers.h>
    2930#include <dev_pic.h>
     
    8283                         xptr_t  src_chdev_xp )
    8384{
     85    irq_dmsg("\n[INFO] %s : core = [%x,%d] / source_chdev_xp = %l\n",
     86             __FUNCTION__ , local_cxy , lid , src_chdev_xp );
     87
    8488    // get pointer on PIC chdev
    8589    chdev_t * pic_ptr = (chdev_t *)GET_PTR( chdev_dir.pic );
     
    97101                          xptr_t  src_chdev_xp )
    98102{
     103    irq_dmsg("\n[INFO] %s : core = [%x,%d] / source_chdev_xp = %l\n",
     104             __FUNCTION__ , local_cxy , lid , src_chdev_xp );
     105
    99106    // get pointer on PIC chdev
    100107    chdev_t * pic_ptr = (chdev_t *)GET_PTR( chdev_dir.pic );
     
    111118void dev_pic_enable_timer( uint32_t period )
    112119{
     120    irq_dmsg("\n[INFO] %s : core = [%x,%d] / period = %d\n",
     121             __FUNCTION__ , local_cxy , CURRENT_THREAD->core->lid , period );
     122
    113123    // get pointer on PIC chdev
    114124    chdev_t * pic_ptr = (chdev_t *)GET_PTR( chdev_dir.pic );
     
    122132}
    123133
     134/////////////////////////
     135void dev_pic_enable_ipi()
     136{
     137    irq_dmsg("\n[INFO] %s : core = [%x,%d]\n",
     138             __FUNCTION__ , local_cxy , CURRENT_THREAD->core->lid );
     139
     140    // get pointer on PIC chdev
     141    chdev_t * pic_ptr = (chdev_t *)GET_PTR( chdev_dir.pic );
     142    cxy_t     pic_cxy = GET_CXY( chdev_dir.pic );
     143
     144    // get pointer on enable_timer function
     145    enable_ipi_t * f = hal_remote_lpt( XPTR( pic_cxy , &pic_ptr->ext.pic.enable_ipi ) );
     146
     147    // call relevant driver function
     148    f();
     149}
     150
    124151//////////////////////////////////
    125152void dev_pic_send_ipi( cxy_t  cxy,
    126153                       lid_t  lid )
    127154{
     155    irq_dmsg("\n[INFO] %s : enter / src_core = [%x,%d] / dst_core = [%x,%d] / cycle = %d\n",
     156             __FUNCTION__, local_cxy, CURRENT_THREAD->core->lid, cxy, lid, hal_time_stamp() );
     157
    128158    // get pointer on PIC chdev
    129159    chdev_t * pic_ptr = (chdev_t *)GET_PTR( chdev_dir.pic );
     
    135165    // call relevant driver function
    136166    f( cxy , lid );
     167
     168    irq_dmsg("\n[INFO] %s : exit / src_core = [%x,%d] / dst_core = [%x,%d] / cycle = %d\n",
     169             __FUNCTION__, local_cxy, CURRENT_THREAD->core->lid, cxy, lid, hal_time_stamp() );
    137170}
    138171
Note: See TracChangeset for help on using the changeset viewer.