Ignore:
Timestamp:
Mar 5, 2013, 1:42:57 PM (11 years ago)
Author:
joannou
Message:
  • Bugfix in Interruption mechanism :
    • _it_mask() and _it_restore() functions now share a global array indexed by the proc_id (used a simple global variable before => problem with multiproc)
    • added 2 new fuctions _it_enable() and _it_disable() that only affect the IE bit of the status register in COP0
    • replaced interrupt masking/restoring arround _ctx_switch() in sys_handler by a simple interrupt disabling before the call to _ctx_switch (restoring after a _ctx_switch wouldn't restore the correct task's status register)
    • replaced the use of _ctx_switch in _exit() by a call to _context_switch() (this function actually does the interrupt disabling)
  • Added some comments in the ctx_handler.h
  • Added the delay reset in the idle task (ctx_handler.c)
  • Added a new irq type (PTI)
    • Modifications in xml_parser.c to accept PTI irq type (now used in xml mappings)
    • Added the test on the irq type in the _irq_demux() function. This leads to a different argument passed to the ISR (i.e. either channel_id or irq_id (aka icuid) )
File:
1 edited

Legend:

Unmodified
Added
Removed
  • soft/giet_vm/sys/irq_handler.c

    r228 r231  
    5757        unsigned int entry = _get_interrupt_vector_entry(irq_id);
    5858        unsigned int isr_id = entry & 0x000000FF;
     59        unsigned int type_id = (entry >> 8) & 0x000000FF;
    5960        unsigned int channel_id = (entry >> 16) & 0x0000FFFF;
    60         if      ( isr_id == ISR_SWITCH) _isr_switch( channel_id);
    61         else if ( isr_id == ISR_IOC   ) _isr_ioc();
    62         else if ( isr_id == ISR_DMA   ) _isr_dma(channel_id);
    63         else if ( isr_id == ISR_TTY   ) _isr_tty(channel_id);
    64         else if ( isr_id == ISR_TIMER ) _isr_timer(channel_id);
    65         else                            _isr_default();
     61        if(type_id == 0) // HARD irq type
     62        {
     63            if      ( isr_id == ISR_SWITCH) _isr_switch(channel_id);
     64            else if ( isr_id == ISR_IOC   ) _isr_ioc();
     65            else if ( isr_id == ISR_DMA   ) _isr_dma(channel_id);
     66            else if ( isr_id == ISR_TTY   ) _isr_tty(channel_id);
     67            else if ( isr_id == ISR_TIMER ) _isr_timer(channel_id);
     68            else                            _isr_default();
     69        }
     70        else // PTI irq type
     71        {
     72            if      ( isr_id == ISR_SWITCH) _isr_switch(irq_id);
     73            else if ( isr_id == ISR_TIMER ) _isr_timer(irq_id);
     74        }
    6675    }
    6776}
Note: See TracChangeset for help on using the changeset viewer.