Changeset 587 for trunk/hal/generic


Ignore:
Timestamp:
Nov 1, 2018, 12:39:27 PM (5 years ago)
Author:
alain
Message:

Modify the GPT (Generic Page Table) API to support remote accesses,
in order to improve page faults and COW handling.

Location:
trunk/hal/generic
Files:
3 edited

Legend:

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

    r505 r587  
    6060 *****************************************************************************************
    6161 * @ ptr     : pointer on the shared variable (signed or unsigned)
    62  * @ val     : signed value to add
     62 * @ val     : value to add
    6363 * @ return shared variable value before add
    6464 ****************************************************************************************/
  • trunk/hal/generic/hal_exception.h

    r480 r587  
    3535//   => The hal_do_exception() function call the generic vmm_handle_page_fault(),
    3636//      or the fpu_handle_exception() function, and the calling thread resumes execution
    37 //      when the exception has been handled.
     37//      when the exception can be  sucessfully handled.
    3838//
    3939// - USER_ERROR : exceptions such a "illegal vaddr" or "illegal write access" are fatal.
     
    5151
    5252/*****************************************************************************************
     53 * This enum defines the global exception types after analysis by the exception handler.
     54 ****************************************************************************************/
     55
     56typedef enum
     57{
     58    EXCP_NON_FATAL,
     59    EXCP_USER_ERROR,
     60    EXCP_KERNEL_PANIC,
     61}
     62exception_handling_type_t;
     63
     64
     65/*****************************************************************************************
    5366 * This function is called by the hal_kentry() function when an exception is detected by
    5467 * the hardware for a given thread running on a given core.
  • trunk/hal/generic/hal_gpt.h

    r457 r587  
    126126
    127127/****************************************************************************************
    128  * This function map a local GPT entry identified by its VPN, from values defined
    129  * by the ppn and attr arguments. It allocates physical memory for the local generic
    130  * page table itself if required.
     128 * This function map a - local or remote - GPT entry identified by its VPN, from values
     129 * defined by the <ppn> and <attr> arguments. It allocates physical memory in remote
     130 * cluster for the GPT PT2, using a RPC_PMEM_GET_PAGES, if required.
    131131 ****************************************************************************************
    132132 * @ gpt       : [in] pointer on the page table
     
    136136 * @ returns 0 if success / returns ENOMEM if error
    137137 ***************************************************************************************/
    138 error_t hal_gpt_set_pte( gpt_t    * gpt,
     138error_t hal_gpt_set_pte( xptr_t     gpt_xp,
    139139                         vpn_t      vpn,
    140140                         uint32_t   attr,
     
    143143/****************************************************************************************
    144144 * This function unmaps a page table entry identified by the <vpn> argument in the
    145  * local page table identified by the <gpt> argument.
     145 * local GPT identified by the <gpt> argument.
    146146 * It does NOT release the physical memory allocated for the unmapped page.
    147147 ****************************************************************************************
     
    153153
    154154/****************************************************************************************
    155  * This function returns in the <attr> and <ppn> arguments the current values
    156  * stored in a GPT entry, identified by the <gpt> and <vpn> arguments.
    157  ****************************************************************************************
    158  * @ gpt_xp    : [in]  pointer on the page table
     155 * This function returns in the <attr> and <ppn> arguments the current values stored
     156 * in a -local or remote - GPT entry, identified by the <gpt> and <vpn> arguments.
     157 ****************************************************************************************
     158 * @ gpt_xp    : [in]  extended pointer on the page table
    159159 * @ vpn       : [in]  virtual page number
    160160 * @ attr      : [out] generic attributes
    161161 * @ ppn       : [out] physical page number
    162162 ***************************************************************************************/
    163 void hal_gpt_get_pte( gpt_t    * gpt,
     163void hal_gpt_get_pte( xptr_t     gpt_xp,
    164164                      vpn_t      vpn,
    165165                      uint32_t * attr,
Note: See TracChangeset for help on using the changeset viewer.