Index: trunk/kernel/kern/rpc.h
===================================================================
--- trunk/kernel/kern/rpc.h	(revision 296)
+++ trunk/kernel/kern/rpc.h	(revision 313)
@@ -35,4 +35,5 @@
 
 struct process_s;
+struct page_s;
 struct vseg_s;
 struct exec_info_s;
@@ -80,4 +81,5 @@
     RPC_KCM_FREE               = 23,
     RPC_MAPPER_MOVE_BUFFER     = 24,
+    RPC_MAPPER_GET_PAGE        = 25,
 
     RPC_MAX_INDEX              = 30,
@@ -204,15 +206,13 @@
 /***********************************************************************************
  * [0] The RPC_PMEM_GET_PAGES allocates one or several pages in a remote cluster,
- * and returns the PPN of the first allocated page.
+ * and returns the local pointer on the page descriptor.
  ***********************************************************************************
  * @ cxy     : server cluster identifier
  * @ order   : [in]  ln2( number of requested pages )
- * @ error   : [out] error status (0 if success)
- * @ ppn     : [out] first physical page number
- **********************************************************************************/
-void rpc_pmem_get_pages_client( cxy_t      cxy,
-                                uint32_t   order,
-                                error_t  * error,
-                                uint32_t * ppn );
+ * @ page    : [out] local pointer on page descriptor / NULL if failure
+ **********************************************************************************/
+void rpc_pmem_get_pages_client( cxy_t             cxy,
+                                uint32_t          order,
+                                struct page_s  ** page );
 
 void rpc_pmem_get_pages_server( xptr_t xp );
@@ -550,14 +550,21 @@
 
 /***********************************************************************************
- * [24] The RPC_MAPPER_MOVE_USER is called by the vfs_move() function.
- * It allows a client thread to requires a remote mapper to move data to/from
- * an user buffer, as specified by the arguments.
+ * [24] The RPC_MAPPER_MOVE_BUFFER allows a client thread to require a remote
+ * mapper to move data to/from a kernel or user buffer.
+ * - It calls the mapper_move_user() function for a - possibly distributed -
+ *   user buffer identified by a user-space pointer, and casted to uint64_t.
+ * - It calls the mapper_move_kernel() function for a - possibly remote -
+ *   kernel buffer identified by an extended pointer, and casted to uint64_t.
+ * It is used by the vfs_move_user() function to move data between a mapper
+ * and an user buffer required by a sys_read() or a sys_write().
+ * It is used by the vmm_get_one_ppn() function to initialise a physical page
+ * from a .elf file mapper, for a CODE or DATA vseg page fault.
  ***********************************************************************************
  * @ cxy         : server cluster identifier.
  * @ mapper      : [in]  local pointer on mapper
- * @ to_buffer   : [in]  move data from buffer to mapper if non zero.
- * @ is_user     : [in]  buffer in user space if non zero.
+ * @ to_buffer   : [in]  move data from mapper to buffer if non zero.
+ * @ is_user     : [in]  buffer in user space if true
  * @ file_offset : [in]  first byte to move in mapper 
- * @ buffer      : [in]  pointer on buffer in user space
+ * @ buffer      : [in]  user space pointer / kernel extended pointer
  * @ size        : [in]  number of bytes to move
  * @ error       : [out] error status (0 if success).
@@ -568,5 +575,5 @@
                                     bool_t            is_user,
                                     uint32_t          file_offset,
-                                    void            * buffer,
+                                    uint64_t          buffer,
                                     uint32_t          size,
                                     error_t         * error );
@@ -574,6 +581,21 @@
 void rpc_mapper_move_buffer_server( xptr_t xp );
 
-
-
+/***********************************************************************************
+ * [25] The RPC_MAPPER_GET_PAGE allows a client thread to get the local pointer
+ * on a remote page descriptor, for a page, identified by the page index in mapper.
+ * It is used by the vmm_get_one_ppn() function to handle a page fault on 
+ * a FILE type vseg.
+ ***********************************************************************************
+ * @ cxy         : server cluster identifier.
+ * @ mapper      : [in]  local pointer on mapper.
+ * @ index       : [in]  page index in mapper.
+ * @ page        : [out] local pointer on page descriptor / NULL if failure.
+ **********************************************************************************/
+void rpc_mapper_get_page_client( cxy_t             cxy,
+                                 struct mapper_s * mapper,
+                                 uint32_t          index,
+                                 struct page_s  ** page );
+
+void rpc_mapper_get_page_server( xptr_t xp );
 
 #endif
