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


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

RSeveral modifs in the page-fault handling.

File:
1 edited

Legend:

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

    r68 r313  
    272272                       intptr_t           vaddr );
    273273
     274
    274275/*********************************************************************************************
    275276 * This function is called by the generic exception handler when a page fault
     
    291292/*********************************************************************************************
    292293 * This function returns in the "attr" and "ppn" arguments the PTE associated to a given
    293  * VPN for a given process. This function must be called on the reference cluster.
    294  * To get the PTE from another cluster, use the RPC_VMM_GET_PTE.
     294 * VPN for a given process. This function must be called by a thread running in the
     295 * reference cluster. To get the PTE from another cluster, use the RPC_VMM_GET_PTE.
    295296 * The vseg containing the searched VPN should be registered in the reference VMM.
    296297 * If the PTE in the reference page table is unmapped, this function allocates the missing
    297  * physical page from the target cluster defined by the vseg type, and update the reference
    298  * page table. It can call a RPC_PMEM_GET_PAGES to get the missing physical page,
    299  * if the target cluster is not the reference cluster.
     298 * physical page from the target cluster defined by the vseg type, initilize it,
     299 * and update the reference page table. It calls the RPC_PMEM_GET_PAGES to get and
     300 * initialize the missing physical page, if the target cluster is not the reference cluster.
    300301 *********************************************************************************************
    301302 * @ process   : [in] pointer on process descriptor.
     
    309310                     uint32_t         * attr,
    310311                     ppn_t            * ppn );
     312
     313/*********************************************************************************************
     314 * This function is called by the vmm_get_pte() function.
     315 * Depending on the vseg type, defined by the <vseg> argument, it returns the PPN
     316 * (Physical Page Number) associated to a missing page defined by the <vpn> argument.
     317 * - For the VSEG_TYPE_FILE, it returns the physical page from the file mapper.
     318 *   For all other types, it allocates a new physical page from the cluster defined
     319 *   by the <vseg->cxy> field, or by the <vpn> MSB bits for a distributed vseg.
     320 * - For the VSEG_TYPE_CODE and VSEG_TYPE_DATA types, the allocated page is initialized
     321 *   from the .elf file mapper. For others vseg types it is not initialised.
     322 *********************************************************************************************
     323 * @ vseg   : local pointer on vseg containing the mising page.
     324 * @ vpn    : Virtual Page Number identifying the missing page.
     325 * @ ppn    : [out] returned Physical Page Number.
     326 ********************************************************************************************/
     327error_t vmm_get_one_ppn( vseg_t * vseg,
     328                         vpn_t    vpn,
     329                         ppn_t  * ppn );
    311330
    312331/*********************************************************************************************
Note: See TracChangeset for help on using the changeset viewer.