Index: trunk/kernel/mm/vmm.h
===================================================================
--- trunk/kernel/mm/vmm.h	(revision 401)
+++ trunk/kernel/mm/vmm.h	(revision 406)
@@ -30,5 +30,4 @@
 #include <bits.h>
 #include <list.h>
-#include <grdxt.h>
 #include <spinlock.h>
 #include <hal_gpt.h>
@@ -92,8 +91,6 @@
  * This structure defines the Virtual Memory Manager for a given process in a given cluster.
  * This local VMM provides three main services:
- * 1) It registers all vsegs statically or dynamically defined in the vseg list,
- *    and in the associated radix-tree.
- * 2) It allocates virtual memory space for the STACKS and MMAP vsegs,
- *    using dedicated allocators.
+ * 1) It registers all vsegs statically or dynamically defined in the vseg list.
+ * 2) It allocates virtual memory space for the STACKS and MMAP vsegs.
  * 3) It contains the local copy of the generic page table descriptor.
  ********************************************************************************************/
@@ -104,5 +101,4 @@
 	list_entry_t   vsegs_root;         /*! all vsegs in same process and same cluster       */
 	uint32_t       vsegs_nr;           /*! total number of local vsegs                      */
-  	grdxt_t        grdxt;              /*! embedded generic vsegs radix tree (key is vpn)   */
 
     gpt_t          gpt;                /*! embedded generic page table descriptor           */
@@ -144,10 +140,13 @@
 
 /*********************************************************************************************
- * This function initialises the virtual memory manager attached to a process.
- * - It initializes the VSL (list of vsegs and associated radix tree).
- * - It initializes the generic page table (empty).
+ * This function initialises the virtual memory manager attached to an user process.
+ * - It registers the "kentry", "args", "envs" and "heap" vsegs in the vsegs list.
+ *   The "code" and "data" vsegs are registered by the elf_load_process() function,
+ *   the "stack" vsegs are registered by the thread_user_create() function, and the
+ *   "mmap" vsegs are dynamically created by syscalls.
+ * - It initializes the generic page table, calling the HAL specific hal_gpt_init() function.
+ *   For TSAR it map all pages for the "kentry" vseg, that must be identity mapping.
  * - It initializes the STAK and MMAP allocators.
- * - It registers the "kentry", "args", "envs" and "heap" vsegs in the vsegs list.
- * Any error in this function gives a kernel panic.
+ * TODO : Any error in this function gives a kernel panic => improve error handling.
  *********************************************************************************************
  * @ process   : pointer on process descriptor
@@ -249,7 +248,7 @@
  * (a) if the region is not entirely mapped in an existing vseg, it's an error.
  * (b) if the region has same base and size as an existing vseg, the vseg is removed.
- * (c) if the removed region cut the vseg in two parts, it is removed and re-created.
- * (d) if the removed region cut the vseg in three parts, it is removed, and two are created.
- * TODO : cases (c) and (d) are not implemented [AG]
+ * (c) if the removed region cut the vseg in two parts, it is modified.
+ * (d) if the removed region cut the vseg in three parts, it is modified, and a new
+ *     vseg is created with same type.
  *********************************************************************************************
  * @ process   : pointer on process descriptor
@@ -267,7 +266,6 @@
  * - if the vseg is missing in local VMM, it uses a RPC to get it from the reference cluster,
  *   register it in local VMM and returns the local vseg pointer, if success.
- * - if the vseg is missing in reference VMM, it returns an user error.
- * It creates a kernel panic if there is not enough memory to create a new vseg descriptor
- * in the cluster containing the calling thread.
+ * - it returns an user error if the vseg is missing in the reference VMM, or if there is 
+ *   not enough memory for a new vseg descriptor in cluster containing the calling thread.
  *********************************************************************************************
  * @ process   : [in] pointer on process descriptor
@@ -320,9 +318,11 @@
  * Depending on the vseg type, defined by the <vseg> argument, it returns the PPN 
  * (Physical Page Number) associated to a missing page defined by the <vpn> argument.
- * - For the VSEG_TYPE_FILE, it returns the physical page from the file mapper.
- *   For all other types, it allocates a new physical page from the cluster defined
- *   by the <vseg->cxy> field, or by the <vpn> MSB bits for a distributed vseg.
- * - For the VSEG_TYPE_CODE and VSEG_TYPE_DATA types, the allocated page is initialized
- *   from the .elf file mapper. For others vseg types it is not initialised.
+ * - For the FILE type, it returns directly the physical page from the file mapper.
+ * - For the CODE and DATA types, it allocates a new phsical page from the cluster defined
+ *   by the <vseg->cxy> field, or by the <vpn> MSB bits for a distributed vseg,
+ *   and initialize this page from the .elf file mapper.
+ * - For all other types, it allocates a new physical page from the cluster defined
+ *   by the <vseg->cxy> field, or by the <vpn> MSB bits for a distributed vseg,
+ *   but the new page is not initialized.
  *********************************************************************************************
  * @ vseg   : local pointer on vseg containing the mising page.
