Changes between Version 11 and Version 12 of icu_device_api


Ignore:
Timestamp:
Nov 6, 2016, 9:48:06 PM (7 years ago)
Author:
alain
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • icu_device_api

    v11 v12  
    3737The <icu> argument is a local pointer on the ICU device descriptor.
    3838 
    39 === 2) '''error_t dev_icu_enable_irq'''( uint32_t   irq_type , uint32_t   irq_id , xptr_t  src_dev ) ===
     39=== 2) '''void dev_icu_enable_irq'''( uint32_t   irq_type , uint32_t   irq_id , xptr_t  src_dev ) ===
    4040
    4141This function enables the routing of a given IRQ, defined by its type and index, to the calling core. It registers it in the calling core interrupt vector the extended pointer on the "source" device descriptor.
    4242The <irq_type> and <irq_id> arguments define the IRQ type and index. The <src_dev> argument is the remote pointer on the source device.
    43 It returns 0 if success / returns EINVAL if illegal arguments.
    4443
    45 === 3) '''error_t dev_icu_disable_irq'''( uint32_t   irq_type , uint32_t   irq_id ) ===
     44=== 3) '''void dev_icu_disable_irq'''( uint32_t   irq_type , uint32_t   irq_id ) ===
    4645
    4746This function must be executed by a thread running in the cluster containing the ICU device descriptor. It disables one IRQ defined by its type and index, for the calling core, and remove it from the interrupt vector.
    4847The <irq_type> and <irq_id> arguments define the IRQ type and index.
    49 It returns 0 if success / returns EINVAL if illegal arguments.
    5048
    51 === 4) '''error_t dev_icu_set_period'''( core_t   * core , uint32_t   pti_id , uint32_t   period ) ===
     49=== 4) '''void dev_icu_set_period'''( uint32_t   pti_id , uint32_t   period ) ===
    5250
    5351This  function set the period value for a PTI timer identified by its index in the local ICU device descriptor.
    54 The <core> argument is local pointer on the target core. The <pti_id> argument is the timer index.
    5552The <period> argument is the period value (number of cycles).
    56 It returns 0 if success / returns EINVAL if illegal arguments.
    5753
    58 === 5) '''error_t dev_icu_send_ipi'''( cxy_t    cxy , lid_t    lid ) ===
     54=== 5) '''void dev_icu_ack_timer'''( uint32_t   pti_id ) ===
     55
     56This function acknowledge a PTI IRQ for a timer identified by the PTI index in the local ICU device descriptor.
     57The <pti_id> argument is the timer index.
     58
     59=== 6) '''void dev_icu_send_ipi'''( cxy_t    cxy , lid_t    lid ) ===
    5960
    6061This function send an IPI (Inter Processor Interrupt) to a core identified by its cluster identifier and local index.
    6162This IPI force a context switch, and the handling of pending RPC(s).
    6263The <cxy> argument is the destination cluster identifier. The <lid> argument is the  destination core local index.
    63 It returns 0 if success / returns EINVAL if illegal arguments.
    6464
    65 === 6) '''void dev_icu_irq_handler'''() ===
    66 
     65=== 7) '''void dev_icu_irq_handler'''() ===
     66:
    6767This function is called by a core when it receives an IRQ from the ICU device.
    6868It access the local ICU device descriptor to get the highest priority active IRQ of each type (HWI / WTI / PTI).
    6969 * If it is a WTI or an HWI, the function uses the calling core interrupt-vectors to call the relevant ISR, registered in the source device descriptor.
    7070 * If it is a PTI, the source device descriptor is the ICU device itself, and it call the core_clock() function to execute all operations related to the TICK event.
    71  ****************************************************************************************/
     71
     72=== 8) '''uint32_t dev_icu_wti_alloc'''() ===
     73
     74This function implements the WTI mailbox allocator. This mailbox is used by all I/O operations for completion signaling.
     75If there is no mailbox available, the client thread must deschedule and retry later. It returns the allocated WTI mailbox index.
     76If N is the total number of WTI mailboxes in a cluster, and NC the number of cores, the number of dynamically allocatable WTI mailboxes is (N-NC) because the first N WTI mailboxes are used by the IPIs (one IPI per core).
     77
     78=== 9) '''void dev_icu_wti_release'''( uint32_t  wti_id ) ===
     79
     80This function releases a dynamically allocated WTI mailbox. The <wti_id> argument is the WTI index.
     81
     82=== 10) ''' xptr_t dev_icu_wti_xptr'''( cxy_t  cxy  ,  uint32_t  wti_id ) ===
     83
     84This function returns an extended pointer on a WTI mailbox identified by its cluster identifier and local index in ICU.
     85WARNING: it assumes that all ICU hardware devices have the same local base address.
     86The <cxy> argument is the mailbox cluster identifier. The <wti_id> argument is the mailbox WTI index.
     87It returns extended pointer on the mailbox register.