Ignore:
Timestamp:
Jun 27, 2017, 2:07:55 PM (5 years ago)
Author:
max@…
Message:

empty out the x86 drivers

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/hal/x86_64/drivers/soclib_iob.c

    r75 r76  
    2727#include <soclib_iob.h>
    2828
    29 ///////////////////////////////////////
    3029void soclib_iob_init( chdev_t * chdev )
    3130{
    32     // desactivate IOMMU
    33     hal_remote_sw( chdev->base + (IOB_IOMMU_ACTIVE<<2) , 0 );
     31
    3432}
    3533
    36 ////////////////////////////////////////////
    3734void soclib_iob_set_active( xptr_t   iob_xp,
    3835                            uint32_t value )
    3936{
    40     // get IOX device cluster and local pointer
    41     cxy_t     iob_cxy = GET_CXY( iob_xp );
    42     chdev_t * iob_ptr = (chdev_t *)GET_PTR( iob_xp );
    4337
    44     // get extended pointer on SOCLIB_IOB base_xp segment
    45     xptr_t base_xp = (xptr_t)hal_remote_lwd( XPTR( iob_cxy , &iob_ptr->base ) );
    46 
    47     // set ACTIVE register
    48     hal_remote_sw( base_xp + (IOB_IOMMU_ACTIVE<<2) , value );
    4938}
    5039
    51 //////////////////////////////////////////
    5240void soclib_iob_set_ptpr( xptr_t   iob_xp,
    5341                          uint32_t value )
    5442{
    55     // get IOX device cluster and local pointer
    56     cxy_t     iob_cxy = GET_CXY( iob_xp );
    57     chdev_t * iob_ptr = (chdev_t *)GET_PTR( iob_xp );
    5843
    59     // get extended pointer on SOCLIB_IOB base_xp segment
    60     xptr_t base_xp = (xptr_t)hal_remote_lwd( XPTR( iob_cxy , &iob_ptr->base ) );
    61 
    62     // set PTPR register
    63     hal_remote_sw( base_xp + (IOB_IOMMU_PTPR<<2) , value );
    6444}
    6545
    66 ///////////////////////////////////////////
    6746void soclib_iob_inval_page( xptr_t  iob_xp,
    6847                            vpn_t   vpn )
    6948{
    70     // get IOX device cluster and local pointer
    71     cxy_t     iob_cxy = GET_CXY( iob_xp );
    72     chdev_t * iob_ptr = (chdev_t *)GET_PTR( iob_xp );
    7349
    74     // get extended pointer on SOCLIB_IOB base_xp segment
    75     xptr_t base_xp = (xptr_t)hal_remote_lwd( XPTR( iob_cxy , &iob_ptr->base ) );
    76 
    77     // invalidate TLB entry
    78     hal_remote_sw( base_xp + (IOB_INVAL_PTE<<2) , vpn );
    7950}
    8051
    81 //////////////////////////////////////////////
    8252uint32_t soclib_iob_get_bvar( xptr_t  iob_xp )
    8353{
    84     // get IOX device cluster and local pointer
    85     cxy_t     iob_cxy = GET_CXY( iob_xp );
    86     chdev_t * iob_ptr = (chdev_t *)GET_PTR( iob_xp );
    87 
    88     // get extended pointer on SOCLIB_IOB base_xp segment
    89     xptr_t base_xp = (xptr_t)hal_remote_lwd( XPTR( iob_cxy , &iob_ptr->base ) );
    90 
    91     // get BVAR register
    92     return hal_remote_lw( base_xp + (IOB_IOMMU_BVAR<<2) );
     54    return 0;
    9355}
    9456
    95 ///////////////////////////////////////////////
    9657uint32_t soclib_iob_get_srcid( xptr_t  iob_xp )
    9758{
    98     // get IOX device cluster and local pointer
    99     cxy_t     iob_cxy = GET_CXY( iob_xp );
    100     chdev_t * iob_ptr = (chdev_t *)GET_PTR( iob_xp );
    101 
    102     // get extended pointer on SOCLIB_IOB base_xp segment
    103     xptr_t base_xp = (xptr_t)hal_remote_lwd( XPTR( iob_cxy , &iob_ptr->base ) );
    104 
    105     // get BVAR register
    106     return hal_remote_lw( base_xp + (IOB_IOMMU_SRCID<<2) );
     59   return 0;
    10760}
    10861
    109 ///////////////////////////////////////////////
    11062uint32_t soclib_iob_get_error( xptr_t  iob_xp )
    11163{
    112     // get IOX device cluster and local pointer
    113     cxy_t     iob_cxy = GET_CXY( iob_xp );
    114     chdev_t * iob_ptr = (chdev_t *)GET_PTR( iob_xp );
    115 
    116     // get extended pointer on SOCLIB_IOB base_xp segment
    117     xptr_t base_xp = (xptr_t)hal_remote_lwd( XPTR( iob_cxy , &iob_ptr->base ) );
    118 
    119     // get BVAR register
    120     return hal_remote_lw( base_xp + (IOB_IOMMU_ERROR<<2) );
     64   return 0;
    12165}
    12266
    123 
    124 // Local Variables:
    125 // tab-width: 4
    126 // c-basic-offset: 4
    127 // c-file-offsets:((innamespace . 0)(inline-open . 0))
    128 // indent-tabs-mode: nil
    129 // End:
    130 // vim: filetype=c:expandtab:shiftwidth=4:tabstop=4:softtabstop=4
    131 
Note: See TracChangeset for help on using the changeset viewer.