Changeset f0a2528 in rtems


Ignore:
Timestamp:
Apr 18, 2005, 5:25:59 PM (17 years ago)
Author:
Jennifer Averett <Jennifer.Averett@…>
Branches:
4.10, 4.11, 4.8, 4.9, 5, master
Children:
c163605f
Parents:
68f4e5f
Message:

2005-04-18 Eric Valette <eric.valette@…>

  • irq/irq.c, irq/irq.h, irq/irq_asm.S, irq/irq_init.c: Added parameter to irq handler
Location:
c/src/lib/libbsp/i386/shared
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libbsp/i386/shared/ChangeLog

    r68f4e5f rf0a2528  
     12005-04-18      Eric Valette <eric.valette@free.fr>
     2
     3        * irq/irq.c, irq/irq.h, irq/irq_asm.S, irq/irq_init.c: Added parameter
     4        to irq handler
     5
    162005-03-14      Joel Sherrill <joel@OARcorp.com>
    27
  • c/src/lib/libbsp/i386/shared/irq/irq.c

    r68f4e5f rf0a2528  
    2828
    2929/*
    30  * Copy of data given via initial BSP_rtems_irq_mngt_set() for
    31  * the sake of efficiency.
    32  * CAUTION : this table is accessed directly by interrupt routine
    33  *           prologue.
    34  */
    35 rtems_irq_hdl           current_irq[BSP_IRQ_LINES_NUMBER];
    36 /*
    3730 * default handler connected on each irq after bsp initialization
    3831 */
     
    4437 */
    4538static rtems_irq_global_settings*       internal_config;
    46 static rtems_irq_connect_data*          rtems_hdl_tbl;
     39rtems_irq_connect_data*                 rtems_hdl_tbl;
    4740/*-------------------------------------------------------------------------+
    4841| Cache for 1st and 2nd PIC IRQ line's status (enabled or disabled) register.
     
    191184
    192185/*
    193  * Caution : this function assumes the variable "internal_config"
    194  * is already set and that the tables it contains are still valid
    195  * and accessible.
    196  */
    197 static void make_copy_of_handlers ()
    198 {
    199   int i;
    200   for (i=0; i < internal_config->irqNb; i++) {
    201     current_irq [i] = internal_config->irqHdlTbl[i].hdl;
    202   }
    203 }
    204 
    205 /*
    206186 * This function check that the value given for the irq line
    207187 * is valid.
     
    244224    rtems_hdl_tbl[irq->name] = *irq;
    245225    /*
    246      * update table used directly by rtems interrupt prologue
    247      */
    248     current_irq [irq->name] = irq->hdl;
    249     /*
    250226     * Enable interrupt at PIC level
    251227     */
     
    308284     */
    309285    rtems_hdl_tbl[irq->name] = default_rtems_entry;
    310 
    311     current_irq[irq->name] = default_rtems_entry.hdl;
    312286
    313287    _CPU_ISR_Enable(level);
     
    336310     */
    337311    compute_i8259_masks_from_prio ();
    338     make_copy_of_handlers ();
    339312
    340313    for (i=0; i < internal_config->irqNb; i++) {
     
    380353   */
    381354}
     355
     356void processIrq(unsigned index)
     357{
     358  rtems_hdl_tbl[index].hdl(rtems_hdl_tbl[index].handle);
     359}
     360
  • c/src/lib/libbsp/i386/shared/irq/irq.h

    r68f4e5f rf0a2528  
    7171struct  __rtems_irq_connect_data__;     /* forward declaratiuon */
    7272
    73 typedef void (*rtems_irq_hdl)           (void);
     73typedef void *rtems_irq_hdl_param;
     74typedef void (*rtems_irq_hdl)           (rtems_irq_hdl_param);
    7475typedef void (*rtems_irq_enable)        (const struct __rtems_irq_connect_data__*);
    7576typedef void (*rtems_irq_disable)       (const struct __rtems_irq_connect_data__*);
     
    8586   */
    8687  rtems_irq_hdl                 hdl;
     88  /*
     89   * Handler handle to store private data
     90   */
     91  rtems_irq_hdl_param         handle;
    8792  /*
    8893   * function for enabling interrupts at device level (ONLY!).
  • c/src/lib/libbsp/i386/shared/irq/irq_asm.S

    r68f4e5f rf0a2528  
    108108
    109109        pushl     ecx                       /* push vector number */
    110         mov       SYM (current_irq) (,ecx,4),eax
    111                                             /* eax = Users handler */
    112         call      *eax                      /* invoke user ISR */
     110        lea       (ecx,ecx,2), eax
     111        mov       SYM (rtems_hdl_tbl), edx
     112        shl       $0x3,eax
     113        pushl     0x8(edx,eax,1)            /* push hdl argument */
     114        call      *0x4(edx,eax,1)           /* call hdl */
     115        addl      $4, esp
     116
    113117        /*
    114118         * disable interrupts_again
  • c/src/lib/libbsp/i386/shared/irq/irq_init.c

    r68f4e5f rf0a2528  
    8282
    8383static rtems_irq_connect_data           defaultIrq = {
    84   /* vectorIdex,         hdl            , on            , off           , isOn */
    85   0,                     nop_func       , nop_func      , nop_func      , not_connected
     84  /* vectorIdex,         hdl            , handle        , on            , off           , isOn */
     85  0,                     nop_func       , 0             , nop_func      , nop_func      , not_connected
    8686};
    8787
Note: See TracChangeset for help on using the changeset viewer.