Changeset 409 for trunk/kernel/mm/vmm.h


Ignore:
Timestamp:
Dec 20, 2017, 4:51:09 PM (4 years ago)
Author:
alain
Message:

Fix bugs in exec

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/kernel/mm/vmm.h

    r408 r409  
    131131 * - It initializes the STACK and MMAP allocators.
    132132 * - It registers the "kentry", "args", "envs" vsegs in the VSL.
     133 * - It initializes the generic page table, calling the HAL specific hal_gpt_init() function.
     134 * - For TSAR it map all pages for the "kentry" vseg, that must be identity mapping.
     135 * Note:
    133136 * - The "code" and "data" vsegs are registered by the elf_load_process() function.
    134137 * - The "stack" vsegs are dynamically created by the thread_user_create() function.
    135  * - The "file", "anon", "remote" vsegs are dynamically created by the mmap() syscalls.
    136  * - It initializes the generic page table, calling the HAL specific hal_gpt_init() function.
    137  * - For TSAR it map all pages for the "kentry" vseg, that must be identity mapping.
     138 * - The "file", "anon", "remote" vsegs are dynamically created by the mmap() syscall.
    138139 * TODO : Any error in this function gives a kernel panic => improve error handling.
    139140 *********************************************************************************************
     
    206207
    207208/*********************************************************************************************
    208  * This function removes all vsegs registered in in the virtual memory manager of the
    209  * process identified by the <process> argument.
    210  * It releases the memory allocated to the local generic page table.
     209 * This function scan the list of vsegs registered in the VSL of the process
     210 * identified by the <process> argument, and for each vseg:
     211 * - it unmap from the GPT and releases all mapped pages in vseg.
     212 * - it removes the vseg from the process VSL.
     213 * - It releases the memory allocated to the vseg descriptor.
     214 * Finally, it releases the memory allocated to the GPT itself.
    211215 *********************************************************************************************
    212216 * @ process   : pointer on process descriptor.
     
    286290
    287291/*********************************************************************************************
    288  * This function unmaps all PTEs of a given vseg, in the generic page table associated
    289  * to a given process descriptor, and releases the corresponding physical memory.
    290  * It can be used for any type of vseg.
     292 * This function unmaps all mapped PTEs of a given vseg, from the generic page table
     293 * associated to a given process descriptor, and releases the physical memory allocated
     294 * to all mapped GPT entries.  It can be used for any type of vseg.
    291295 *********************************************************************************************
    292296 * @ process  : pointer on process descriptor.
Note: See TracChangeset for help on using the changeset viewer.