source: trunk/kernel/kern/rpc.h @ 407

Last change on this file since 407 was 407, checked in by alain, 5 years ago

First implementation of fork/exec.

File size: 31.7 KB
Line 
1/*
2 * rpc.h - RPC (Remote Procedure Call) operations definition.
3 *
4 * Author  Alain Greiner (2016,2017)
5 *
6 * Copyright (c) UPMC Sorbonne Universites
7 *
8 * This file is part of ALMOS-MKH.
9 *
10 * ALMOS-MKH is free software; you can redistribute it and/or modify it
11 * under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; version 2.0 of the License.
13 *
14 * ALMOS-MKH is distributed in the hope that it will be useful, but
15 * WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
17 * General Public License for more details.
18 *
19 * You should have received a copy of the GNU General Public License
20 * along with ALMOS-MKH; if not, write to the Free Software Foundation,
21 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
22 */
23
24#ifndef _RPC_H_
25#define _RPC_H_
26
27#include <kernel_config.h>
28#include <hal_types.h>
29#include <hal_atomic.h>
30#include <bits.h>
31#include <spinlock.h>
32#include <vseg.h>
33#include <remote_fifo.h>
34
35/**** Forward declarations ****/
36
37struct process_s;
38struct page_s;
39struct vseg_s;
40struct exec_info_s;
41struct pthread_attr_s;
42struct remote_sem_s;
43struct fragment_s;
44struct vfs_inode_s;
45struct vfs_dentry_s;
46struct vfs_file_s;
47struct thread_s;
48struct mapper_s;
49
50/**********************************************************************************/
51/**************  structures for Remote Procedure Calls ****************************/
52/**********************************************************************************/
53
54/***********************************************************************************
55 * This enum defines all RPC indexes.
56 * It must be consistent with the rpc_server[] array defined in in the rpc.c file.
57 **********************************************************************************/
58
59typedef enum
60{
61    RPC_PMEM_GET_PAGES         = 0,
62    RPC_PROCESS_PID_ALLOC      = 1,
63    RPC_PROCESS_EXEC           = 2,
64    RPC_PROCESS_KILL           = 3,
65    RPC_THREAD_USER_CREATE     = 4,
66    RPC_THREAD_KERNEL_CREATE   = 5,
67    RPC_SIGNAL_RISE            = 6,
68
69    RPC_VFS_INODE_CREATE       = 10,
70    RPC_VFS_INODE_DESTROY      = 11,
71    RPC_VFS_DENTRY_CREATE      = 12,
72    RPC_VFS_DENTRY_DESTROY     = 13,
73    RPC_VFS_FILE_CREATE        = 14,
74    RPC_VFS_FILE_DESTROY       = 15,
75    RPC_VFS_INODE_LOAD         = 16,
76    RPC_VFS_MAPPER_LOAD_ALL    = 17,
77    RPC_FATFS_GET_CLUSTER      = 18,
78
79    RPC_VMM_GET_VSEG           = 20,
80    RPC_VMM_GET_PTE            = 21,
81    RPC_KCM_ALLOC              = 22,
82    RPC_KCM_FREE               = 23,
83    RPC_MAPPER_MOVE_BUFFER     = 24,
84    RPC_MAPPER_GET_PAGE        = 25,
85    RPC_VMM_CREATE_VSEG        = 26,
86    RPC_SCHED_DISPLAY          = 27,
87
88    RPC_MAX_INDEX              = 30,
89}
90rpc_index_t;
91
92/***********************************************************************************
93 * This defines the prototype of the rpc_server functions,
94 * defined by the rpc_server[] array in the rpc.c file.
95 **********************************************************************************/
96
97typedef  void (rpc_server_t) ( xptr_t xp );
98
99/***********************************************************************************
100 *  This structure defines the RPC descriptor
101 **********************************************************************************/
102
103typedef struct rpc_desc_s
104{
105        rpc_index_t         index;       /*! index of requested RPC service           */
106        volatile uint32_t   response;    /*! response valid when 0                    */
107    struct thread_s   * thread;      /*! local pointer on client thread           */
108    uint32_t            lid;         /*! index of core running the calling thread */ 
109    uint64_t            args[10];    /*! input/output arguments buffer            */
110} 
111rpc_desc_t;
112
113/**********************************************************************************/
114/******* Generic functions supporting RPCs : client side **************************/
115/**********************************************************************************/
116
117/***********************************************************************************
118 * This blocking function executes on the client core.
119 * It puts one RPC extended pointer in the remote fifo.
120 * It sends an IPI if fifo is empty, and waits until RPC response available.
121 * The RPC descriptor must be allocated in the caller's stack
122 * and initialised by the caller.  Exit with a Panic message if remote fifo
123 * is still full after (CONFIG_RPC_PUT_MAX_ITERATIONS) retries.
124 ***********************************************************************************
125 * @ cxy   : server cluster identifier
126 * @ desc  : local pointer on RPC descriptor in client cluster
127 **********************************************************************************/
128void rpc_send_sync( cxy_t        cxy,   
129                    rpc_desc_t * desc );
130
131
132
133/**********************************************************************************/
134/******* Generic functions supporting RPCs : server side **************************/
135/**********************************************************************************/
136
137/***********************************************************************************
138 * This function is the entry point for RPC handling on the server side.
139 * It is executed by a core receiving an IPI, and each time the core enters,
140 * or exit the kernel to handle .
141 * It does nothing and return if the RPC_FIFO is empty.
142 * The calling thread checks if it exist at least one non-blocked RPC thread,
143 * creates a new RPC if required, and deschedule to allow the RPC thead to execute.
144 **********************************************************************************/
145void rpc_check();
146
147/***********************************************************************************
148 * This function contains the loop to execute all pending RPCs on the server side.
149 * It is called by the rpc_thread_func() function with irq disabled, and after
150 * RPC_FIFO ownership acquisition.
151 ***********************************************************************************
152 * @ rpc_fifo  : pointer on the local RPC fifo
153 **********************************************************************************/
154void rpc_execute_all( remote_fifo_t * rpc_fifo );
155
156/***********************************************************************************
157 * This function contains the infinite loop executed by a RPC thread.
158 **********************************************************************************/
159void rpc_thread_func();
160
161/***********************************************************************************
162 * This function is executed in case of illegal RPC index.
163 **********************************************************************************/
164void __attribute__((noinline)) rpc_undefined();
165
166
167
168
169/**********************************************************************************/
170/******* Marshalling functions attached to the various RPCs ***********************/
171/**********************************************************************************/
172
173/***********************************************************************************
174 * [0] The RPC_PMEM_GET_PAGES allocates one or several pages in a remote cluster,
175 * and returns the local pointer on the page descriptor.
176 ***********************************************************************************
177 * @ cxy     : server cluster identifier
178 * @ order   : [in]  ln2( number of requested pages )
179 * @ page    : [out] local pointer on page descriptor / NULL if failure
180 **********************************************************************************/
181void rpc_pmem_get_pages_client( cxy_t             cxy,
182                                uint32_t          order,
183                                struct page_s  ** page );
184
185void rpc_pmem_get_pages_server( xptr_t xp );
186
187/***********************************************************************************
188 * [1] The RPC_PROCESS_PID_ALLOC allocates one new PID in a remote cluster, registers
189 * the new process in the remote cluster, and returns the PID, and an error code.
190 ***********************************************************************************
191 * @ cxy     : server cluster identifier.
192 * @ process : [in]  local pointer on process descriptor in client cluster.
193 * @ error   : [out] error status (0 if success).
194 * @ pid     : [out] new process identifier.
195 **********************************************************************************/
196void rpc_process_pid_alloc_client( cxy_t              cxy,
197                                   struct process_s * process,
198                                   error_t          * error,
199                                   pid_t            * pid );
200
201void rpc_process_pid_alloc_server( xptr_t xp );
202
203/***********************************************************************************
204 * [2] The RPC_PROCESS_EXEC creates a process descriptor copy, in a remote cluster
205 * and initializes if from information found in the reference process descriptor.
206 * This remote cluster becomes the new reference cluster.
207 ***********************************************************************************
208 * @ cxy     : server cluster identifier.
209 * @ info    : [in]   pointer on local exec_info structure.
210 * @ error   : [out]  error status (0 if success).
211 **********************************************************************************/
212void rpc_process_exec_client( cxy_t                cxy,
213                              struct exec_info_s * info,
214                              error_t            * error );
215
216void rpc_process_exec_server( xptr_t xp );
217
218/***********************************************************************************
219 * [3] The RPC_PROCESS_KILL is actually a multicast RPC sent by the reference cluster
220 * to other clusters containing a process descriptor copy, to destroy these copies.
221 ***********************************************************************************
222 * @ process  : local pointer on target process.
223 **********************************************************************************/
224void rpc_process_kill_client( struct process_s * process );
225
226void rpc_process_kill_server( xptr_t xp );
227
228/***********************************************************************************
229 * [4] The RPC_THREAD_USER_CREATE creates an user thread in the server cluster,
230 * as specified by the arguments. It returns an extended pointer on the new
231 * thread descriptor in server cluster, and an error code.
232 * It is called by the sys_thread_create() system call.
233 ***********************************************************************************
234 * @ cxy       : server cluster identifier.
235 * @ attr      : [in]  local pointer on pthread_attr_t in client cluster.
236 * @ thread_xp : [out] buffer for thread extended pointer.
237 * @ error     : [out] error status (0 if success).
238 **********************************************************************************/
239void rpc_thread_user_create_client( cxy_t                   cxy,
240                                    pid_t                   pid,
241                                    void                  * start_func,
242                                    void                  * start_arg,
243                                    pthread_attr_t        * attr,
244                                    xptr_t                * thread_xp,
245                                    error_t               * error );
246
247void rpc_thread_user_create_server( xptr_t xp );
248
249/***********************************************************************************
250 * [5] The RPC_THREAD_KERNEL_CREATE creates a kernel thread in the server cluster,
251 * as specified by the type, func and args arguments. It returns the local pointer
252 * on the thread descriptor in server cluster and an error code.
253 * It is used by the dev_init() function to create the device server thread.
254 ***********************************************************************************
255 * @ cxy       : server cluster identifier.
256 * @ type      : [in]  type of kernel thread.
257 * @ func      : [in]  local pointer on thread function.
258 * @ args      : [in]  local pointer on function arguments.
259 * @ thread_xp : [out] pointer on buffer for thread extended pointer.
260 * @ error     : [out] error status (0 if success).
261 **********************************************************************************/
262void rpc_thread_kernel_create_client( cxy_t     cxy,
263                                      uint32_t  type,
264                                      void    * func,
265                                      void    * args,
266                                      xptr_t  * thread_xp,
267                                      error_t * error );
268
269void rpc_thread_kernel_create_server( xptr_t xp );
270
271/***********************************************************************************
272 * [6] The RPC_SIGNAL_RISE ask a target cluster to register a given signal in
273 * all threads descriptors of a given process.
274 * It is used by the sys_kill() function.
275 ***********************************************************************************
276 * @ cxy       : server cluster identifier.
277 * @ process   : [in]  local pointer on target process descriptor in server.
278 * @ sig_id    : [in]  signal index.
279 **********************************************************************************/
280void rpc_signal_rise_client( cxy_t              cxy,
281                             struct process_s * process,
282                             uint32_t           sig_id );
283                             
284void rpc_signal_rise_server( xptr_t xp );
285
286/***********************************************************************************
287 * [10] The RPC_VFS_INODE_CREATE creates an inode and the associated mapper in a
288 * remote cluster. The parent dentry must have been previously created.
289 * It returns an extended pointer on the created inode.
290 ***********************************************************************************
291 * @ cxy        :  server cluster identifier.
292 * @ dentry_xp  : [in]  extended pointer on parent dentry.
293 * @ fs_type    : [in]  file system type.
294 * @ inode_type : [in]  file system type.
295 * @ extend     : [in]  fs_type_specific inode extension.
296 * @ attr       : [in]  inode attributes.
297 * @ rights     : [in]  access rights
298 * @ uid        : [in]  user ID
299 * @ gid        : [in]  group ID
300 * @ inode_xp   : [out] buffer for extended pointer on created inode.
301 * @ error      : [out] error status (0 if success).
302 **********************************************************************************/
303void rpc_vfs_inode_create_client( cxy_t      cxy,
304                                  xptr_t     dentry_xp,
305                                  uint32_t   fs_type,
306                                  uint32_t   inode_type,
307                                  void     * extend,
308                                  uint32_t   attr,   
309                                  uint32_t   rights, 
310                                  uint32_t   uid,
311                                  uint32_t   gid,
312                                  xptr_t   * inode_xp,
313                                  error_t  * error );
314
315void rpc_vfs_inode_create_server( xptr_t xp );
316
317/***********************************************************************************
318 * [11] The RPC_VFS_INODE_DESTROY releases memory allocated for an inode descriptor
319 * and for the associated mapper in a remote cluster.
320 ***********************************************************************************
321 * @ cxy       :  server cluster identifier
322 * @ inode     : [in]  local pointer on inode.
323 **********************************************************************************/
324void rpc_vfs_inode_destroy_client( cxy_t                 cxy,
325                                   struct vfs_inode_s * inode );
326
327void rpc_vfs_inode_destroy_server( xptr_t xp );
328
329/***********************************************************************************
330 * [12] The RPC_VFS_DENTRY_CREATE creates a dentry in a remote cluster.
331 * It returns an extended pointer on the created dentry.
332 ***********************************************************************************
333 * @ cxy        :  server cluster identifier
334 * @ type       : [in]  file system type.
335 * @ name       : [in]  directory entry name.
336 * @ parent     : [in]  local pointer on parent inode.
337 * @ dentry_xp  : [out] buffer for extended pointer on created dentry.
338 * @ error      : [out] error status (0 if success).
339 **********************************************************************************/
340void rpc_vfs_dentry_create_client( cxy_t                  cxy,
341                                   uint32_t               type,
342                                   char                 * name,   
343                                   struct vfs_inode_s   * parent,
344                                   xptr_t               * dentry_xp,
345                                   error_t              * error );
346
347void rpc_vfs_dentry_create_server( xptr_t xp );
348
349/***********************************************************************************
350 * [13] The RPC_VFS_DENTRY_DESTROY releases memory allocated for an dentry descriptor
351 * in a remote cluster.
352 ***********************************************************************************
353 * @ cxy       :  server cluster identifier
354 * @ dentry     : [in]  local pointer on dentry.
355 **********************************************************************************/
356void rpc_vfs_dentry_destroy_client( cxy_t                 cxy,
357                                    struct vfs_dentry_s * dentry );
358
359void rpc_vfs_dentry_destroy_server( xptr_t xp );
360
361/***********************************************************************************
362 * [14] The RPC_VFS_FILE_CREATE creates a file descriptor in a remote cluster.
363 * It returns an extended pointer on the created file structure.
364 ***********************************************************************************
365 * @ cxy        :  server cluster identifier
366 * @ inode      : [in]  local pointer on parent inode.
367 * @ file_attr  : [in]  new file attributes.
368 * @ file_xp    : [out] buffer for extended pointer on created file.
369 * @ error      : [out] error status (0 if success).
370 **********************************************************************************/
371void rpc_vfs_file_create_client( cxy_t                  cxy,
372                                 struct vfs_inode_s   * inode,
373                                 uint32_t               file_attr,
374                                 xptr_t               * file_xp,
375                                 error_t              * error );
376
377void rpc_vfs_file_create_server( xptr_t xp );
378
379/***********************************************************************************
380 * [15] The RPC_VFS_FILE_DESTROY releases memory allocated for a file descriptor
381 * in a remote cluster.
382 ***********************************************************************************
383 * @ cxy       :  server cluster identifier
384 * @ file       : [in]  local pointer on file.
385 **********************************************************************************/
386void rpc_vfs_file_destroy_client( cxy_t               cxy,
387                                  struct vfs_file_s * file );
388
389void rpc_vfs_file_destroy_server( xptr_t xp );
390
391/***********************************************************************************
392 * [16] The RPC_VFS_LOAD_INODE calls the vfs_inode_load() kernel function in a
393 * remote cluster containing a parent inode directory to scan the associated
394 * mapper, find a directory entry, identified by its name, and update the remote
395 * child inode.
396 ***********************************************************************************
397 * @ cxy            :  server cluster identifier
398 * @ parent_inode   : [in]  local pointer on parent inode.
399 * @ name           : [in]  local pointer on child name (in client cluster).
400 * @ child_inode_xp : [in]  extended pointer on child inode (in another cluster).
401 * @ error          : [out] error status (0 if success).
402 **********************************************************************************/
403void rpc_vfs_inode_load_client( cxy_t                cxy,
404                                struct vfs_inode_s * parent_inode,
405                                char               * name,
406                                xptr_t               child_inode_xp,
407                                error_t            * error );
408
409void rpc_vfs_inode_load_server( xptr_t xp );
410
411/***********************************************************************************
412 * [17] The RPC_VFS_MAPPER_LOAD_ALL calls the vfs_mapper_load_all() kernel function
413 * in a remote cluster containing an inode, to load all pages of the associated
414 * mapper from the file system on device.
415 ***********************************************************************************
416 * @ cxy     :  server cluster identifier
417 * @ inode   : [in]  local pointer on inode in server cluster.
418 * @ error   : [out] error status (0 if success).
419 **********************************************************************************/
420void rpc_vfs_mapper_load_all_client( cxy_t                cxy,
421                                     struct vfs_inode_s * inode,
422                                     error_t            * error );
423
424void rpc_vfs_mapper_load_all_server( xptr_t xp );
425
426/***********************************************************************************
427 * [18] The RPC_FATFS_GET_CLUSTER can be send by any thread running in a "client"
428 * cluster to scan the FAT mapper, stored in a remote "server" cluster, and get
429 * from the mapper the local pointer on a given page.
430 ***********************************************************************************
431 * @ cxy      : server cluster identifier.
432 * @ mapper   : [in]  local pointer on FAT mapper.
433 * @ first    : [in]  FATFS cluster index allocated to first page of file.
434 * @ page     : [in]  page index in file.
435 * @ cluster  : [out] local pointer on buffer for found FATFS cluster index.
436 * @ error    : [out] local pointer on buffer for error code (in client cluster).
437 **********************************************************************************/
438void rpc_fatfs_get_cluster_client( cxy_t             cxy,
439                                   struct mapper_s * mapper,
440                                   uint32_t          first,
441                                   uint32_t          page,
442                                   uint32_t        * cluster,
443                                   error_t         * error );   
444
445void rpc_fatfs_get_cluster_server( xptr_t xp );
446
447/***********************************************************************************
448 * [20] The RPC_VMM_GET_VSEG returns an extended pointer
449 * on the vseg containing a given virtual address in a given process.
450 * The server cluster is supposed to be the reference cluster.
451 * It returns a non zero error value if no vseg has been founded.
452 ***********************************************************************************
453 * @ cxy     : server cluster identifier.
454 * @ process : [in]   pointer on process descriptor in server cluster.
455 * @ vaddr   : [in]   virtual address to be searched.
456 * @ vseg_xp : [out]  buffer for extended pointer on vseg in client cluster.
457 * @ error   : [out] local pointer on buffer for error code (in client cluster).
458 **********************************************************************************/
459void rpc_vmm_get_vseg_client( cxy_t              cxy,
460                              struct process_s * process,
461                              intptr_t           vaddr,
462                              xptr_t           * vseg_xp,
463                              error_t          * error );
464
465void rpc_vmm_get_vseg_server( xptr_t xp );
466
467/***********************************************************************************
468 * [21] The RPC_VMM_GET_PTE returns in the <ppn> and <attr> arguments the PTE value
469 * for a given <vpn> in a given <process> (page_fault or copy_on_write event).
470 * The server cluster is supposed to be the reference cluster, and the vseg
471 * containing the VPN must be registered in the reference VMM.
472 * It returns an error if physical memory cannot be allocated for the missing PTE2,
473 * or for the missing page itself.
474 ***********************************************************************************
475 * @ cxy     : server cluster identifier.
476 * @ process : [in]   pointer on process descriptor in server cluster.
477 * @ vaddr   : [in]   virtual address to be searched.
478 * @ cow     : [in]   "copy_on_write" event if true / "page_fault" event if false.
479 * @ attr    : [out]  address of buffer for attributes.
480 * @ ppn     : [out]  address of buffer for PPN.
481 * @ error   : [out]  address of buffer for error code.
482 **********************************************************************************/
483void rpc_vmm_get_pte_client( cxy_t              cxy,
484                             struct process_s * process,
485                             vpn_t              vpn,
486                             bool_t             cow,
487                             uint32_t         * attr,
488                             ppn_t            * ppn,
489                             error_t          * error );
490
491void rpc_vmm_get_pte_server( xptr_t xp );
492
493/***********************************************************************************
494 * [22] The RPC_KCM_ALLOC allocates memory from a given KCM in a remote cluster,
495 * and returns an extended pointer on the allocated object.
496  It returns XPTR_NULL if physical memory cannot be allocated.
497 ***********************************************************************************
498 * @ cxy       : server cluster identifier.
499 * @ kmem_type : [in]  KCM object type (as defined in kmem.h).
500 * @ buf_xp    : [out] buffer for extended pointer on allocated buffer.
501 **********************************************************************************/
502void rpc_kcm_alloc_client( cxy_t      cxy,
503                           uint32_t   kmem_type,
504                           xptr_t   * buf_xp ); 
505
506void rpc_kcm_alloc_server( xptr_t xp );
507
508/***********************************************************************************
509 * [23] The RPC_KCM_FREE releases memory allocated for a KCM object of a given type,
510 * in a remote cluster.
511 ***********************************************************************************
512 * @ cxy       : server cluster identifier.
513 * @ buf       : [in] local pointer on allocated buffer.
514 * @ kmem_type : [in]  KCM object type (as defined in kmem.h).
515 **********************************************************************************/
516void rpc_kcm_free_client( cxy_t     cxy,
517                          void    * buf,
518                          uint32_t  kmem_type );
519
520void rpc_kcm_free_server( xptr_t xp );
521
522/***********************************************************************************
523 * [24] The RPC_MAPPER_MOVE_BUFFER allows a client thread to require a remote
524 * mapper to move data to/from a kernel or user buffer.
525 * - It calls the mapper_move_user() function for a - possibly distributed -
526 *   user buffer identified by a user-space pointer, and casted to uint64_t.
527 * - It calls the mapper_move_kernel() function for a - possibly remote -
528 *   kernel buffer identified by an extended pointer, and casted to uint64_t.
529 * It is used by the vfs_move_user() function to move data between a mapper
530 * and an user buffer required by a sys_read() or a sys_write().
531 * It is used by the vmm_get_one_ppn() function to initialise a physical page
532 * from a .elf file mapper, for a CODE or DATA vseg page fault.
533 ***********************************************************************************
534 * @ cxy         : server cluster identifier.
535 * @ mapper      : [in]  local pointer on mapper
536 * @ to_buffer   : [in]  move data from mapper to buffer if non zero.
537 * @ is_user     : [in]  buffer in user space if true
538 * @ file_offset : [in]  first byte to move in mapper
539 * @ buffer      : [in]  user space pointer / kernel extended pointer
540 * @ size        : [in]  number of bytes to move
541 * @ error       : [out] error status (0 if success).
542 **********************************************************************************/
543void rpc_mapper_move_buffer_client( cxy_t             cxy,
544                                    struct mapper_s * mapper,
545                                    bool_t            to_buffer,
546                                    bool_t            is_user,
547                                    uint32_t          file_offset,
548                                    uint64_t          buffer,
549                                    uint32_t          size,
550                                    error_t         * error );
551
552void rpc_mapper_move_buffer_server( xptr_t xp );
553
554/***********************************************************************************
555 * [25] The RPC_MAPPER_GET_PAGE allows a client thread to get the local pointer
556 * on a remote page descriptor, for a page, identified by the page index in mapper.
557 * It is used by the vmm_get_one_ppn() function to handle a page fault on
558 * a FILE type vseg.
559 ***********************************************************************************
560 * @ cxy         : server cluster identifier.
561 * @ mapper      : [in]  local pointer on mapper.
562 * @ index       : [in]  page index in mapper.
563 * @ page        : [out] local pointer on page descriptor / NULL if failure.
564 **********************************************************************************/
565void rpc_mapper_get_page_client( cxy_t             cxy,
566                                 struct mapper_s * mapper,
567                                 uint32_t          index,
568                                 struct page_s  ** page );
569
570void rpc_mapper_get_page_server( xptr_t xp );
571
572/***********************************************************************************
573 * [26] The RPC_VMM_CREATE_VSEG allows a client thread to request the remote
574 * reference cluster of a given process to allocate and register in the reference
575 * process VMM a new vseg descriptor.
576 * On the server side, this RPC uses the vmm_create_vseg() function, and returns
577 * to the client the local pointer on the created vseg descriptor.
578 ***********************************************************************************
579 * @ cxy         : server cluster identifier.
580 * @ process     : [in]  local pointer on process descriptor in server.
581 * @ type        : [in]  vseg type.
582 * @ base        : [in]  base address (unused for dynamically allocated vsegs).
583 * @ size        : [in]  number of bytes.
584 * @ file_offset : [in]  offset in file (for CODE, DATA, FILE types).
585 * @ file_size   : [in]  can be smaller than size for DATA type.
586 * @ mapper_xp   : [in]  extended pointer on mapper (for CODE, DATA, FILE types).
587 * @ vseg_cxy    : [in]  target cluster for mapping (if not data type).
588 * @ vseg        : [out] local pointer on vseg descriptor / NULL if failure.
589 **********************************************************************************/
590void rpc_vmm_create_vseg_client( cxy_t              cxy,
591                                 struct process_s * process,
592                                 vseg_type_t        type,
593                                 intptr_t           base,
594                                 uint32_t           size,
595                                 uint32_t           file_offset,
596                                 uint32_t           file_size,
597                                 xptr_t             mapper_xp,
598                                 cxy_t              vseg_cxy,
599                                 struct vseg_s   ** vseg );
600
601void rpc_vmm_create_vseg_server( xptr_t xp );
602
603/***********************************************************************************
604 * [27] The RPC_SCHED_DISPLAY allows a client thread to request the display
605 * of a remote scheduler, identified by the <lid> argument.
606 ***********************************************************************************
607 * @ cxy         : server cluster identifier.
608 * @ lid         : [in]  local index of target core in client cluster.
609 **********************************************************************************/
610void rpc_sched_display_client( cxy_t              cxy,
611                               lid_t              lid );
612
613void rpc_sched_display_server( xptr_t xp );
614
615#endif
Note: See TracBrowser for help on using the repository browser.