Ignore:
Timestamp:
Jul 27, 2017, 12:23:29 AM (5 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.h

    r205 r279  
    3434 * to route a given IRQ to a given core, in a given cluster, and to help the interrupt
    3535 * handler to select  and execute the relevant ISR (Interrupt Service Routine).
    36  * It handles the following type of interrupts:
    37  * - External IRQs generated by the external (shared) peripherals.
    38  * - Internal IRQs generated by the internal (replicated) peripherals.
    39  * - Timer IRQs generated by the timers (one timer per core).
    40  * - Inter Processor IRQs (IPI) generated by software.
    41  *
    42  * In most supported manycores architectures, the PIC device contains two types
     36 * It handles the four following types of interrupts:
     37 *
     38 * 1) EXT_IRQ (External IRQ) generated by the external (shared) peripherals.
     39 * 2) INT_IRQ (Internal IRQ) generated by the internal (replicated) peripherals.
     40 * 3) TIM_IRQ (Timer IRQ) generated by the timers (one timer per core).
     41 * 4) IPI_IRQ (Inter Processor IRQ) generated by software (one IPI per core).
     42 *
     43 * In supported manycores architectures, the PIC device contains two types
    4344 * of hardware components:
    4445 * - the IOPIC is an external component, handling all external peripherals IRQs.
     
    5455 * at kernel initialization.
    5556 *
    56  * The PIC device defines 4 generic commands that can be used by each kernel instance,
     57 * The PIC device defines generic commands that can be used by each kernel instance,
    5758 * - to create in local cluster the PIC implementation specific interupt vector(s),
    5859 * - to bind a given IRQ (internal or external IRQ to a given core in the local cluster,
     
    6465 * cluster manager or to the core descriptors to register the interrupt vectors
    6566 * used by the kernel to select the relevant ISR when an interrupt is received
    66  * by a given core in agiven cluster.
     67 * by a given core in a given cluster.
    6768 
    6869 * This PIC device does not execute itself I/O operations. It is just acting as a
     
    8788typedef void   (disable_irq_t)  ( lid_t lid , xptr_t src_chdev_xp );   
    8889typedef void   (enable_timer_t) ( uint32_t period );   
     90typedef void   (enable_ipi_t)   ( );   
    8991typedef void   (send_ipi_t)     ( cxy_t cxy , lid_t lid );
    9092typedef void   (extend_init_t)  ( uint32_t * lapic_base );
     
    9698    disable_irq_t   * disable_irq;   /*! pointer on the driver "disable_irq" function   */
    9799    enable_timer_t  * enable_timer;  /*! pointer on the driver "enable_timer" function  */
     100    enable_timer_t  * enable_ipi;    /*! pointer on the driver "enable_ipi" function    */
    98101    send_ipi_t      * send_ipi;      /*! pointer on the driver "send_ipi" function      */
    99102    extend_init_t   * extend_init;   /*! pointer on the driver "init_extend" function   */
     
    186189
    187190/*****************************************************************************************
    188  * This function enables remote IRQ generated by a remote chdev, defined by the
     191 * This function enables the IRQ generated by a remote chdev, defined by the
    189192 * <src_chdev_xp> argument. It can be called by any thread running in any cluster,
    190193 * and can be used for both internal & external IRQs.
     
    199202 * This function disables remote IRQ generated by a remote chdev, defined by the
    200203 * <src_chdev_xp> argument. It can be called by any thread running in any cluster,
    201  * and can be used for both internal & external IRQs.
     204 * and can be used for both INT_IRq & EXT_IRQ.
    202205 *****************************************************************************************
    203206 * @ lid           : target core local index (in cluster containing the source chdev).
     
    208211
    209212/*****************************************************************************************
    210  * This function activates the TICK timer for the calling core.
    211  * The <period> argument define the number of cycles between IRQs.
     213 * This function activates the TIM_IRQ for the calling core.
     214 * The <period> argument define the number of cycles between twoo successive IRQs.
    212215 *****************************************************************************************
    213216 * @ period      : number of cycles between IRQs.
    214217 ****************************************************************************************/
    215218void dev_pic_enable_timer( uint32_t period );
     219
     220/*****************************************************************************************
     221 * This function activates the IPI_IRQ for the calling core.
     222 ****************************************************************************************/
     223void dev_pic_enable_ipi();
    216224
    217225/*****************************************************************************************
Note: See TracChangeset for help on using the changeset viewer.