Ignore:
Timestamp:
Jul 12, 2017, 8:12:41 PM (7 years ago)
Author:
alain
Message:

Redefine the PIC device API.

File:
1 edited

Legend:

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

    r101 r188  
    3636struct thread_s;
    3737struct chdev_s;
    38 
     38enum   pic_impl_e;
    3939
    4040/****************************************************************************************
    4141 * This structure defines the core descriptor.
    42  * - It contains an embedded private scheduler.
    43  * - It contains the three interrupt vectors, implemented as three arrays of pointers
    44  *   on the source channel devices, for all IRQs allocated to the core.
     42 * Besides the core identifiers (gid,lid), it contains an embedded private scheduler.
     43 * It contains an architecture specific extension to store the interrupt vector(s).
     44 * The core_init()function must allocate memory for this extension, depending on the
     45 * PIC device implementation type.
    4546 ***************************************************************************************/
    4647
     
    5556        uint32_t            usage;          /*! cumulated busy_percent (idle / total)      */
    5657        uint32_t            spurious_irqs;  /*! for instrumentation...                     */
     58    uint32_t            rpc_threads;    /*! current RPC threads number for this core   */
    5759        struct thread_s   * thread_rpc;     /*! pointer on current RPC thread descriptor   */
    5860        struct thread_s   * thread_idle;    /*! pointer on idle thread descriptor          */
    5961        struct thread_s   * fpu_owner;      /*! pointer on current FPU owner thread        */
    6062    uint32_t            rand_last;      /*! last computed random value                 */
    61         uint32_t            rpc_threads;    /*! total number of RPC threads for this core  */
    62         list_entry_t        rpc_free_list;  /*! root of the list of free RPC threads       */
    63 
    6463        scheduler_t         scheduler;      /*! embedded private scheduler                 */
    6564
    66     struct chdev_s    * hwi_vector[CONFIG_MAX_HWIS_PER_ICU];     /*! on source device  */
    67     struct chdev_s    * pti_vector[CONFIG_MAX_PTIS_PER_ICU];     /*! on source device  */
    68     struct chdev_s    * wti_vector[CONFIG_MAX_WTIS_PER_ICU];     /*! on source device  */
     65    void              * pic_extend;     /*! PIC implementation specific extension      */
    6966}
    7067core_t;
    7168
    72 /***************************************************************************************
     69/****************************************************************************************
    7370 * This macro returns a pointer on the calling core descriptor.
    74  **************************************************************************************/
     71 ***************************************************************************************/
    7572
    7673#define CURRENT_CORE  (CURRENT_THREAD->core)
    7774
    7875/***************************************************************************************
    79  * TODO this initialisation must be completed for the thread_idle field... [AG]
    80  * This function initializes a core descriptor from information found in arch_info.
     76 * This function initializes a core descriptor.
    8177 * It makes the association [gid] <=> [lid], as defined in arch_info, via the
    8278 * boot_info_t structure build by the bootloader in each cluster.
     79 * It allocates memory for the PIC infrastructure specific core extension.
     80 * It does NOT initialize the <thread_idle> and the <pic_extend> fields,
     81 * that must be completed later.
    8382 ***************************************************************************************
    8483 * @ core      : pointer on core descriptor to initialise.
    85  * @ lid       : local core index
    86  * @ gid       : global core identifier (hardware index)
     84 * @ lid       : local core index in cluster.
     85 * @ gid       : global core identifier (hardware index).
    8786 **************************************************************************************/
    88 void core_init( core_t   * core,
    89                 lid_t      lid,
    90                 gid_t      gid );
     87void core_init( core_t          * core,
     88                lid_t             lid,
     89                gid_t             gid );
    9190
    9291/***************************************************************************************
Note: See TracChangeset for help on using the changeset viewer.