Ignore:
Timestamp:
Aug 2, 2017, 3:24:57 PM (7 years ago)
Author:
alain
Message:

RSeveral modifs in the page-fault handling.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/kernel/kern/rpc.h

    r296 r313  
    3535
    3636struct process_s;
     37struct page_s;
    3738struct vseg_s;
    3839struct exec_info_s;
     
    8081    RPC_KCM_FREE               = 23,
    8182    RPC_MAPPER_MOVE_BUFFER     = 24,
     83    RPC_MAPPER_GET_PAGE        = 25,
    8284
    8385    RPC_MAX_INDEX              = 30,
     
    204206/***********************************************************************************
    205207 * [0] The RPC_PMEM_GET_PAGES allocates one or several pages in a remote cluster,
    206  * and returns the PPN of the first allocated page.
     208 * and returns the local pointer on the page descriptor.
    207209 ***********************************************************************************
    208210 * @ cxy     : server cluster identifier
    209211 * @ order   : [in]  ln2( number of requested pages )
    210  * @ error   : [out] error status (0 if success)
    211  * @ ppn     : [out] first physical page number
    212  **********************************************************************************/
    213 void rpc_pmem_get_pages_client( cxy_t      cxy,
    214                                 uint32_t   order,
    215                                 error_t  * error,
    216                                 uint32_t * ppn );
     212 * @ page    : [out] local pointer on page descriptor / NULL if failure
     213 **********************************************************************************/
     214void rpc_pmem_get_pages_client( cxy_t             cxy,
     215                                uint32_t          order,
     216                                struct page_s  ** page );
    217217
    218218void rpc_pmem_get_pages_server( xptr_t xp );
     
    550550
    551551/***********************************************************************************
    552  * [24] The RPC_MAPPER_MOVE_USER is called by the vfs_move() function.
    553  * It allows a client thread to requires a remote mapper to move data to/from
    554  * an user buffer, as specified by the arguments.
     552 * [24] The RPC_MAPPER_MOVE_BUFFER allows a client thread to require a remote
     553 * mapper to move data to/from a kernel or user buffer.
     554 * - It calls the mapper_move_user() function for a - possibly distributed -
     555 *   user buffer identified by a user-space pointer, and casted to uint64_t.
     556 * - It calls the mapper_move_kernel() function for a - possibly remote -
     557 *   kernel buffer identified by an extended pointer, and casted to uint64_t.
     558 * It is used by the vfs_move_user() function to move data between a mapper
     559 * and an user buffer required by a sys_read() or a sys_write().
     560 * It is used by the vmm_get_one_ppn() function to initialise a physical page
     561 * from a .elf file mapper, for a CODE or DATA vseg page fault.
    555562 ***********************************************************************************
    556563 * @ cxy         : server cluster identifier.
    557564 * @ mapper      : [in]  local pointer on mapper
    558  * @ to_buffer   : [in]  move data from buffer to mapper if non zero.
    559  * @ is_user     : [in]  buffer in user space if non zero.
     565 * @ to_buffer   : [in]  move data from mapper to buffer if non zero.
     566 * @ is_user     : [in]  buffer in user space if true
    560567 * @ file_offset : [in]  first byte to move in mapper
    561  * @ buffer      : [in]  pointer on buffer in user space
     568 * @ buffer      : [in]  user space pointer / kernel extended pointer
    562569 * @ size        : [in]  number of bytes to move
    563570 * @ error       : [out] error status (0 if success).
     
    568575                                    bool_t            is_user,
    569576                                    uint32_t          file_offset,
    570                                     void            * buffer,
     577                                    uint64_t          buffer,
    571578                                    uint32_t          size,
    572579                                    error_t         * error );
     
    574581void rpc_mapper_move_buffer_server( xptr_t xp );
    575582
    576 
    577 
     583/***********************************************************************************
     584 * [25] The RPC_MAPPER_GET_PAGE allows a client thread to get the local pointer
     585 * on a remote page descriptor, for a page, identified by the page index in mapper.
     586 * It is used by the vmm_get_one_ppn() function to handle a page fault on
     587 * a FILE type vseg.
     588 ***********************************************************************************
     589 * @ cxy         : server cluster identifier.
     590 * @ mapper      : [in]  local pointer on mapper.
     591 * @ index       : [in]  page index in mapper.
     592 * @ page        : [out] local pointer on page descriptor / NULL if failure.
     593 **********************************************************************************/
     594void rpc_mapper_get_page_client( cxy_t             cxy,
     595                                 struct mapper_s * mapper,
     596                                 uint32_t          index,
     597                                 struct page_s  ** page );
     598
     599void rpc_mapper_get_page_server( xptr_t xp );
    578600
    579601#endif
Note: See TracChangeset for help on using the changeset viewer.