Changeset 315 for trunk/kernel/mm/vseg.c


Ignore:
Timestamp:
Aug 3, 2017, 10:15:18 AM (7 years ago)
Author:
alain
Message:

Redefine the fuctions ppm_base2page() / ppm_page2base() / ppm_page2ppn() / ppm_ppn2page() / ppm_base2ppn() / ppm_ppn2base(),
to use explicitely extended pointers.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/kernel/mm/vseg.c

    r184 r315  
    9292                vpn_t         vpn_size,
    9393                        uint32_t      type,
    94                 cxy_t         cxy,
    95                 fdid_t        fdid,
    96                         uint32_t      offset )
     94                cxy_t         cxy )
    9795{
    9896    vseg->type      = type;
     
    10199    vseg->vpn_base  = vpn_base;
    102100        vseg->vpn_size  = vpn_size;
    103         vseg->mapper    = XPTR_NULL;
    104         vseg->fdid      = fdid;
    105         vseg->offset    = offset;
     101        vseg->mapper_xp = XPTR_NULL;
    106102    vseg->cxy       = cxy;
    107103
     
    171167        hal_core_sleep();
    172168    }
    173 }
     169
     170}  // end vseg_init()
    174171
    175172//////////////////////////////////////////
     
    182179
    183180    // initialize vseg with remote_read access
    184     vseg->type     =           hal_remote_lw ( XPTR( cxy , &ptr->type     ) );
    185     vseg->min      = (intptr_t)hal_remote_lpt( XPTR( cxy , &ptr->min      ) );
    186     vseg->max      = (intptr_t)hal_remote_lpt( XPTR( cxy , &ptr->max      ) );
    187     vseg->vpn_base =           hal_remote_lw ( XPTR( cxy , &ptr->vpn_base ) );
    188     vseg->vpn_size =           hal_remote_lw ( XPTR( cxy , &ptr->vpn_size ) );
    189     vseg->flags    =           hal_remote_lw ( XPTR( cxy , &ptr->flags    ) );
    190         vseg->mapper   = (xptr_t)  hal_remote_lwd( XPTR( cxy , &ptr->mapper   ) );
    191 
    192     if( vseg->type == VSEG_TYPE_FILE )
    193     {
    194         vseg->fdid   = hal_remote_lw( XPTR( cxy , &ptr->fdid   ) );
    195         vseg->offset = hal_remote_lw( XPTR( cxy , &ptr->offset ) );
    196     }
    197     else
    198     {
    199         vseg->fdid   = 0;
    200         vseg->offset = 0;
    201     }
     181    vseg->type       =           hal_remote_lw ( XPTR( cxy , &ptr->type      ) );
     182    vseg->min        = (intptr_t)hal_remote_lpt( XPTR( cxy , &ptr->min       ) );
     183    vseg->max        = (intptr_t)hal_remote_lpt( XPTR( cxy , &ptr->max       ) );
     184    vseg->vpn_base   =           hal_remote_lw ( XPTR( cxy , &ptr->vpn_base  ) );
     185    vseg->vpn_size   =           hal_remote_lw ( XPTR( cxy , &ptr->vpn_size  ) );
     186    vseg->flags      =           hal_remote_lw ( XPTR( cxy , &ptr->flags     ) );
     187        vseg->mapper_xp  = (xptr_t)  hal_remote_lwd( XPTR( cxy , &ptr->mapper_xp ) );
    202188}
    203189
Note: See TracChangeset for help on using the changeset viewer.