Ignore:
Timestamp:
Nov 1, 2018, 12:39:27 PM (6 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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/hal/tsar_mips32/core/hal_vmm.c

    r579 r587  
    11/*
    2  * hal_vmm.c - Generic Virtual Memory Manager Initialisation for TSAR
     2 * hal_vmm.c - Virtual Memory Manager Initialisation for TSAR
    33 *
    44 * Authors  Alain Greiner (2016,2017)
     
    3838// identity mapped. The following function is called by the generic vmm_init() function
    3939// and identity map all pages of the "kentry" vseg.
     40// We dont take the locks protecting the VSL and the GPT, because there is no concurrent
     41// accesses to VMM during VMM initialization.
    4042//////////////////////////////////////////////////////////////////////////////////////////
    4143
     
    4446{
    4547    error_t error;
    46 
    47     // get pointer on GPT
    48     gpt_t * gpt = &vmm->gpt;
    4948
    5049    // map all pages of "kentry" vseg
     
    5554         vpn < (CONFIG_VMM_KENTRY_BASE + CONFIG_VMM_KENTRY_SIZE); vpn++ )
    5655    {
    57         error = hal_gpt_set_pte( gpt,
     56        error = hal_gpt_set_pte( XPTR( local_cxy , &vmm->gpt ),
    5857                                 vpn,
    5958                                 attr,
     
    6261        if( error ) return error;
    6362    }
    64 
    65     // get extended pointer on lock protecting the VSL
    66     xptr_t lock_xp = XPTR( local_cxy , &vmm->vsegs_lock );
    67 
    68     // get VSL lock
    69     remote_rwlock_wr_acquire( lock_xp );
    7063
    7164    // scan the VSL to found the "kentry" vseg
     
    9083    }
    9184
    92     // release the VSL lock
    93     remote_rwlock_wr_release( lock_xp );
    94 
    95     if( found == false ) return error;
     85    if( found == false ) return 0XFFFFFFFF;
    9686
    9787    return 0;
Note: See TracChangeset for help on using the changeset viewer.