Changeset 196 for trunk/hal/x86_64


Ignore:
Timestamp:
Jul 13, 2017, 12:35:48 PM (7 years ago)
Author:
max@…
Message:

sync

Location:
trunk/hal/x86_64
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/hal/x86_64/core/hal_drivers.c

    r190 r196  
    2727#include <soclib_tty.h>
    2828#include <soclib_xcu.h>
     29#include <soclib_pic.h>
    2930
    3031void hal_drivers_txt_init(chdev_t *dev)
     
    5758{
    5859        /* update the PIC chdev extension */
    59 /*      TODO
    60         pic->ext.pic.enable_timer = &soclib_pic_enable_timer;
    61         pic->ext.pic.enable_irq   = &soclib_pic_enable_irq;
    62         pic->ext.pic.disable_irq  = &soclib_pic_disable_irq;
    63         pic->ext.pic.bind_irq     = &soclib_pic_bind_irq;
    64         pic->ext.pic.send_ipi     = &soclib_pic_send_ipi;
    65         pic->ext.pic.extend_init  = &soclib_pic_extend_init;
    66 */
     60        dev->ext.pic.enable_timer = &soclib_pic_enable_timer;
     61        dev->ext.pic.enable_irq   = &soclib_pic_enable_irq;
     62        dev->ext.pic.disable_irq  = &soclib_pic_disable_irq;
     63        dev->ext.pic.bind_irq     = &soclib_pic_bind_irq;
     64        dev->ext.pic.send_ipi     = &soclib_pic_send_ipi;
     65        dev->ext.pic.extend_init  = &soclib_pic_extend_init;
    6766}
    6867
  • trunk/hal/x86_64/drivers/soclib_pic.c

    r76 r196  
    3030#include <vfs.h>
    3131
    32 void soclib_pic_init( chdev_t  * chdev )
     32void soclib_pic_init( chdev_t * pic )
    3333{
    34 
     34        x86_panic((char *)__func__);
    3535}
    3636
    37 void soclib_pic_bind_irq( xptr_t     dev_xp,
    38                           uint32_t   irq_id,
    39                           xptr_t     xp_wti )
     37void soclib_pic_extend_init( uint32_t * xcu_base )
    4038{
    41 
     39        x86_panic((char *)__func__);
    4240}
    4341
    44 void soclib_pic_unbind_irq( xptr_t     dev_xp,
    45                             uint32_t   irq_id )
     42void soclib_pic_bind_irq( lid_t     lid,
     43                          chdev_t * src_chdev )
    4644{
    47 
     45        x86_panic((char *)__func__);
    4846}
    4947
    50 void soclib_pic_get_status( xptr_t     dev_xp,
    51                             uint32_t   irq_id,
    52                             uint32_t * status)
     48void soclib_pic_enable_irq( lid_t     lid,
     49                            chdev_t * src_chdev )
    5350{
    54 
     51        x86_panic((char *)__func__);
    5552}
    5653
     54void soclib_pic_disable_irq( lid_t     lid,
     55                             chdev_t * src_chdev )
     56{
     57        x86_panic((char *)__func__);
     58}
     59
     60void soclib_pic_enable_timer( uint32_t period )
     61{
     62        x86_panic((char *)__func__);
     63}
     64
     65void soclib_pic_send_ipi( cxy_t    cxy,
     66                          lid_t    lid )
     67{
     68        x86_panic((char *)__func__);
     69}
  • trunk/hal/x86_64/drivers/soclib_pic.h

    r75 r196  
    2727#include <hal_types.h>
    2828
    29 /******************************************************************************************
    30  *  PIC register offsets (per input IRQ)
    31  *****************************************************************************************/
     29void soclib_pic_init( chdev_t * pic );
     30void soclib_pic_extend_init( uint32_t * xcu_base );
     31void soclib_pic_bind_irq( lid_t     lid,
     32                          chdev_t * src_chdev );
     33void soclib_pic_enable_irq( lid_t     lid,
     34                            chdev_t * src_chdev );
     35void soclib_pic_disable_irq( lid_t     lid,
     36                             chdev_t * src_chdev );
     37void soclib_pic_enable_timer( uint32_t period );
    3238
    33 #define IOPIC_ADDRESS           0
    34 #define IOPIC_EXTEND            1
    35 #define IOPIC_STATUS            2
    36 #define IOPIC_MASK              3
    37 #define IOPIC_SPAN              4
    38 
    39 /******************************************************************************************
    40  * This blocking function desactivates all input IRQs in PIC controler.
    41  * It must be called by a local thread.
    42  ******************************************************************************************
    43  * @ chdev    : pointer on PIC chdev descriptor.
    44  *****************************************************************************************/
    45 void   soclib_pic_init( chdev_t * chdev );
    46 
    47 /******************************************************************************************
    48  * This blocking function returns the status for a given input IRQ in the remote
    49  * PIC controler. It can be called by any thread running on any cluster.
    50  ******************************************************************************************
    51  * @ dev_xp    : extended pointer on the PIC device descriptor.
    52  * @ irq_id    : input IRQ index.
    53  * @ status    : pointer on local buffer for returned status.
    54  *****************************************************************************************/
    55 void   soclib_pic_get_status( xptr_t     dev_xp,
    56                               uint32_t   irq_id,
    57                               uint32_t * status );
    58 
    59 /******************************************************************************************
    60  * This blocking function unmask an input IRQ in a remote PIC controler, and bind it
    61  * with a WTI mailbox, by registering the WTI mailbox extended pointer.
    62  * It can be called by any thread running on any cluster.
    63  ******************************************************************************************
    64  * @ dev_xp    : extended pointer on the PIC device descriptor.
    65  * @ irq_id    : input IRQ index.
    66  * @ xp_wti    : extended pointer on the WTI mailbox.
    67  *****************************************************************************************/
    68 void   soclib_pic_bind_irq( xptr_t    dev_xp,
    69                             uint32_t  irq_id,
    70                             xptr_t    wti_xp );
    71 
    72 /******************************************************************************************
    73  * This blocking function mask an input IRQ in a remote PIC controler.
    74  * It can be called by any thread running on any cluster.
    75  ******************************************************************************************
    76  * @ dev_xp    : extended pointer on the PIC device descriptor.
    77  * @ irq_id    : input IRQ index.
    78  *****************************************************************************************/
    79 void   soclib_pic_unbind_irq( xptr_t    dev_xp,
    80                               uint32_t  irq_id );
    81 
     39void soclib_pic_send_ipi( cxy_t    cxy,
     40                          lid_t    lid );
    8241
    8342#endif  /* _SOCLIB_IOPIC_H_ */
Note: See TracChangeset for help on using the changeset viewer.