Changes between Version 7 and Version 8 of kernel_interrupts


Ignore:
Timestamp:
Mar 12, 2015, 5:45:49 PM (9 years ago)
Author:
alain
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • kernel_interrupts

    v7 v8  
    66[[PageOutline]]
    77
    8 The GIET_VM interrupt handler supports only the SOCLIB ''vci_xcu'' interrupt controler, and does not support the ''vci_icu'' interrupt controler. In a multi-cluster architectures, it must exist one XCU controller in all clusters containing processors.
     8The GIET_VM interrupt handler supports only the SOCLIB XCU interrupt controler. In a multi-cluster architectures, it must exist one XCU controller in all clusters containing processors.
    99
    10 Each multi-channel XCU component in a given cluster must contain as many channels as the number of processors in the cluster (one output IRQ per processor).
     10Each multi-channel XCU component in a given cluster must contain (NB_PROCS_MAX * IRQ_PER_PROCESSOR) channels  (one channel = one output IRQ).
    1111
    12 There is three interrupt vectors per processor (stored in each processor's scheduler) for the three HWI, PTI, and WTI interrupts types. Each interrupt vector entry contains three bits fields:
     12There is three interrupt vectors per processor (stored in each processor's scheduler) for the three HWI (Hardware Interrupt), PTI (Programmable Timer Interrupt), and WTI (Write Triggered Interrupt) interrupts types. Each interrupt vector entry contains two fields:
    1313||isr_id         ||bits[15:0]    || defines the type of ISR to be executed ||
    14 ||channel_id ||bits[30:16]  || defines the channel for multi-channels peripherals ||
    15 ||valid          || bit [31]       || valid interrupt vector entry ||
     14||channel_id ||bits[31:16]  || defines the channel for multi-channels ISR ||
    1615
    17 If the peripheral is replicated in clusters, the channel_id is a global index :
    18 channel_id = cluster_xy * NB_CHANNELS_MAX + loc_id   
     16Regarding the allocation of interrupts to processors (IRQ routing using the XCU_MASK registers), the GIET-VM implement the following policy:
     17 * The GIET-VM uses only one XCU output IRQ per processor  (index = lpid * IRQ_PER_PROCESSOR), even if the hardware platform contains more than one IRQ_PER_PROCESSOR.
     18 * In each cluster the HWI (hardwareinterrupts generated by the local peripherals) are ''statically'' allocated to local processors.
     19 * In each cluster, one PTI (timer interrupt) is statically allocated to each processor for TICK context switch.
     20 * In each cluster, 4 WTI (mailbox interrupts) are allocated to each processor. For each processor, the first WTI mailbox is statically allocated to WAKUP (inter processor interrupt). The three other WTI mailbox are dynamically allocated to external IRQS generated by the external peripherals through the IOPIC component.
     21All XCU masks for all processors are statically defined in the boot phase.
    1922
     23 == __Functions used for all HWI / PTI / WTI interrupts__ ==
    2024
    2125 === void '''_irq_demux'''() ===
     
    4650 === void '''_isr_default'''() ===
    4751This default ISR is called  when the interrupt handler is called, and there is no active IRQ. It simply displays a warning message on the kernel TTY[0].
     52
     53 == __Functions used for dynamic allocation of external IRQs__ ==
     54
     55 === void '''_ext_irq_init'''() ===
     56This function is only used when the architecture contains an external IOPIC component. It initializes the _ext_irq_index[isr][channel] array,
     57defining the IRQ index associated to (isr_type/isr_channel) couple, as specified in the mapping.
     58This array is used by the kernel for dynamic routing of an external IRQ signaling completion to  the processor that launched the I/O operation.
     59
     60 === void '''_ext_irq_alloc( unsigned int isr_type , unsigned int isr_channel , unsigned int* wti_index ) ===
     61This function is used when the architecture contains an external IOPIC component. It dynamically routes an external IRQ signaling completion of an I/O operation to the processor P[x,y,p] running the calling task. The two (isr_type, isr_channel) arguments define actually the external IRQ to be routed.
     62 * '''isr_type''' : type of ISR to be executed
     63 * '''isr_channel''' : ISR channel (for multi-channels peripherals)
     64 * '''wti_index''' : return value defining the index of the WTI mailbox allocated to P[x,y,p]
     65This function does three things:
     66 1. it allocates a WTI mailbox in the XCU of cluster[x,y] to the requesting processor ( index is in [4*p+1, 4*p+2, 4*p+3] ) ;
     67 2. it initialises the IOPIC entry associated to the (isr_type/isr_channel) IRQ.
     68 3. it initializes the proper entry in the WTI interrupt vector associated to processor P[x,y,p].
     69
     70 === void '''_ext_irq_release( unsigned int isr_type , unsigned int isr_channel , unsigned int* wti_index ) ===
     71This function is used when the architecture contains an external IOPIC component. It desallocates the ressources allocated by the  previous _ext_irq_alloc() function to the calling processor. The two (isr_type, isr_channel) arguments define actually the external IRQ to be released.
     72 * '''isr_type''' : type of ISR to be executed
     73 * '''isr_channel''' : ISR channel (for multi-channels peripherals)
     74 * '''wti_index''' :  index of the WTI mailbox allocated to P[x,y,p]
     75This function does only two things:
     76 1.  it desactivates the PIC entry associated to the (isr_type/isr_channel) IRQ.
     77 2. it releases the WTI mailbox allocated to P[x,y,p].
     78 3. The WTI interrupt vector is NOT modified
     79