Ignore:
Timestamp:
Oct 4, 2018, 11:48:51 PM (6 years ago)
Author:
alain
Message:

Complete restructuration of kernel locks.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/kernel/devices/dev_fbf.c

    r492 r565  
    5555    if( impl == IMPL_FBF_SCL )
    5656    {
    57         // TODO
     57        printk("\n[WARNING] Soclib FBF driver not implemented yet\n");
    5858    }
    5959    else
     
    7878
    7979    // return values
    80     *width  = hal_remote_lw( XPTR( dev_cxy , &dev_ptr->ext.fbf.width ) );
    81     *height = hal_remote_lw( XPTR( dev_cxy , &dev_ptr->ext.fbf.height ) );
     80    *width  = hal_remote_l32( XPTR( dev_cxy , &dev_ptr->ext.fbf.width ) );
     81    *height = hal_remote_l32( XPTR( dev_cxy , &dev_ptr->ext.fbf.height ) );
    8282
    8383}  // end dev_fbf_get_size()
    8484
    85 ///////////////////////
     85/////////////////////////////
    8686error_t dev_fbf_alloc( void )
    8787{
    8888    // get extended pointer on FBF chdev descriptor
    89     xptr_t  dev_xp = chdev_dir.fbf[0];
    90 
    91     assert( (dev_xp != XPTR_NULL) , "undefined FBF chdev descriptor" );
    92 
    93     // get FBF chdev cluster and local pointer
    94     cxy_t     dev_cxy = GET_CXY( dev_xp );
    95     chdev_t * dev_ptr = (chdev_t *)GET_PTR( dev_xp );
     89    // xptr_t  dev_xp = chdev_dir.fbf[0];
     90
     91    // assert( (dev_xp != XPTR_NULL) , "undefined FBF chdev descriptor" );
     92
     93    // get FBF chdev cluster and local pointer
     94    // cxy_t     dev_cxy = GET_CXY( dev_xp );
     95    // chdev_t * dev_ptr = GET_PTR( dev_xp );
    9696
    9797    // try to get FBF ownership
    98     return remote_spinlock_trylock( XPTR( dev_cxy , &dev_ptr->wait_lock ) );
     98
     99assert( false , "not implemented yet" );
    99100
    100101}  // end dev_fbf_alloc()
    101102
    102 ///////////////////
     103/////////////////////////
    103104void dev_fbf_free( void )
    104105{
    105106    // get extended pointer on FBF chdev descriptor
    106     xptr_t  dev_xp = chdev_dir.fbf[0];
    107 
    108     assert( (dev_xp != XPTR_NULL) , "undefined FBF chdev descriptor" );
    109 
    110     // get FBF chdev cluster and local pointer
    111     cxy_t     dev_cxy = GET_CXY( dev_xp );
    112     chdev_t * dev_ptr = (chdev_t *)GET_PTR( dev_xp );
     107    // xptr_t  dev_xp = chdev_dir.fbf[0];
     108
     109    // assert( (dev_xp != XPTR_NULL) , "undefined FBF chdev descriptor" );
     110
     111    // get FBF chdev cluster and local pointer
     112    // cxy_t     dev_cxy = GET_CXY( dev_xp );
     113    // chdev_t * dev_ptr = (GET_PTR( dev_xp );
    113114
    114115    // release FBF ownership
    115     remote_spinlock_unlock( XPTR( dev_cxy , &dev_ptr->wait_lock ) );
     116
     117assert( false , "not implemented yet" );
    116118
    117119}  // end dev_fbf_free()
     
    139141
    140142    // get frame buffer base address, width and height
    141     xptr_t   base   = hal_remote_lwd( XPTR( fbf_cxy , &fbf_ptr->base ) );
    142     uint32_t width  = hal_remote_lw ( XPTR( fbf_cxy , &fbf_ptr->ext.fbf.width ) );
    143     uint32_t height = hal_remote_lw ( XPTR( fbf_cxy , &fbf_ptr->ext.fbf.height ) );
     143    xptr_t   base   = hal_remote_l64( XPTR( fbf_cxy , &fbf_ptr->base ) );
     144    uint32_t width  = hal_remote_l32 ( XPTR( fbf_cxy , &fbf_ptr->ext.fbf.width ) );
     145    uint32_t height = hal_remote_l32 ( XPTR( fbf_cxy , &fbf_ptr->ext.fbf.height ) );
    144146
    145147    // check offset and length versus FBF size
Note: See TracChangeset for help on using the changeset viewer.