Ignore:
Timestamp:
May 11, 2017, 7:49:17 PM (5 years ago)
Author:
max@…
Message:

Typos, and cosmetic.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/hal/generic/hal_gpt.h

    r16 r17  
    3030//           Generic Page Table Definition (implementation in hal_gpt.c)
    3131//
    32 // It is specified as a simple (one dimensionnal) array indexed by the VPN (vpn_t type),
    33 // even if implementations can use a more sophisticated organistion (two-levels or more).
    34 // - The number of entries (number of pages in a virtual space) is architecture 
    35 //   dependant, and is defined as (CONFIG_USER_SPACE_SIZE / CONFIG_PPM_PAGE_SIZE).
    36 // - Each entry contains a Physical Page Number (ppn_t type),  and a set of attributes,
     32// It is specified as a simple (one dimensional) array indexed by the VPN (vpn_t type),
     33// even if implementations can use a more sophisticated organisation (two-levels or more).
     34// - The number of entries (number of pages in a virtual space) is architecture
     35//   dependent, and is defined as (CONFIG_USER_SPACE_SIZE / CONFIG_PPM_PAGE_SIZE).
     36// - Each entry contains a Physical Page Number (ppn_t type), and a set of attributes,
    3737//   defined as masks on a 32 bits-vector.
    3838//
    39 // Any arch-specific implementation must implement this API. 
     39// Any arch-specific implementation must implement this API.
    4040/////////////////////////////////////////////////////////////////////////////////////////
    4141
     
    7171        void           * ptr;    /*! pointer on GPT root (must be page aligned)            */
    7272        ppn_t            ppn;    /*! PPN of GPT root                                       */
    73     struct page_s  * page;   /*! pointer on page descriptor for GPT root               */
     73        struct page_s  * page;   /*! pointer on page descriptor for GPT root               */
    7474}
    7575gpt_t;
     
    7878/****************************************************************************************
    7979 * This function allocates physical memory for  first level page table (PT1),
    80  * and initialize the page table descriptor.
     80 * and initializes the page table descriptor.
    8181 ****************************************************************************************
    8282 * @ gpt     : pointer on generic page table descriptor.
     
    8888 * This function releases all memory dynamically allocated for a generic page table.
    8989 * For a multi-levels radix tree implementation, it includes all nodes in the tree.
    90  * If the calling thread is running in the reference cluster, it checks that user PTE 
     90 * If the calling thread is running in the reference cluster, it checks that user PTE
    9191 * entries are unmapped, and release the mapped physical pages.
    9292 * The kernel pages are not released.
     
    104104
    105105/****************************************************************************************
    106  * This blocking fonction get a lock on a PTE (page Table Entry) identified
     106 * This blocking function gets a lock on a PTE (page Table Entry) identified
    107107 * by its VPN, and returns only when the PTE has been successfully locked.
    108  * If the target PTE is not present, it allocates and map a physical page.
     108 * If the target PTE is not present, it allocates and maps a physical page.
    109109 * A big page cannot be locked.
    110110 ****************************************************************************************
    111  * @ gpt     : pointer on the generic page table 
     111 * @ gpt     : pointer on the generic page table
    112112 * @ vpn     : virtual page number of the target PTE.
    113  * @ returns 0 if success / return ENOMEM or EINVAL if error. 
     113 * @ returns 0 if success / return ENOMEM or EINVAL if error.
    114114 ***************************************************************************************/
    115115error_t hal_gpt_lock_pte( gpt_t * gpt,
     
    119119 * This function releases the lock on a PTE identified by its VPN.
    120120 ****************************************************************************************
    121  * @ gpt     : pointer on the generic page table 
     121 * @ gpt     : pointer on the generic page table
    122122 * @ vpn     : virtual page number of the target PTE.
    123  * @ returns 0 if success / returns EINVAL if error. 
     123 * @ returns 0 if success / returns EINVAL if error.
    124124 ***************************************************************************************/
    125 error_t hal_gpt_unlock_pte( gpt_t * gpt, 
    126                             vpn_t   vpn ); 
     125error_t hal_gpt_unlock_pte( gpt_t * gpt,
     126                            vpn_t   vpn );
    127127
    128128/****************************************************************************************
    129  * This function map a page table entry identified by its VPN, from values defined
     129 * This function maps a page table entry identified by its VPN, from values defined
    130130 * by the ppn and attr arguments. It allocates physical memory for the local generic
    131131 * page table itself if required.
     
    133133 * @ gpt       : [in] pointer on the page table
    134134 * @ vpn       : [in] virtual page number
    135  * @ ppn       : [in] physical page number 
     135 * @ ppn       : [in] physical page number
    136136 * @ attr      : [in] generic attributes
    137137 * @ returns 0 if success / returns ENOMEM if error
     
    143143
    144144/****************************************************************************************
    145  * This function unmap a page table entry identified by its VPN.
    146  * If the calling thread is running in the reference cluster, it send a broadcast RPC
    147  * to update all others page table copies.
     145 * This function unmaps a page table entry identified by its VPN.
     146 * If the calling thread is running in the reference cluster, it sends a broadcast RPC
     147 * to update all other page table copies.
    148148 ****************************************************************************************
    149149 * @ gpt       : [in] pointer on the page table
     
    160160 * @ vpn       : [in]  virtual page number
    161161 * @ attr      : [out] generic attributes
    162  * @ ppn       : [out] physical page number 
     162 * @ ppn       : [out] physical page number
    163163 ***************************************************************************************/
    164164void hal_gpt_get_pte( gpt_t    * gpt,
     
    166166                      uint32_t * attr,
    167167                      ppn_t    * ppn );
    168  
     168
    169169
    170170#endif  /* _GPT_H_ */
Note: See TracChangeset for help on using the changeset viewer.