Changeset 587 for trunk/hal/tsar_mips32/core/hal_vmm.c
- Timestamp:
- Nov 1, 2018, 12:39:27 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/hal/tsar_mips32/core/hal_vmm.c
r579 r587 1 1 /* 2 * hal_vmm.c - GenericVirtual Memory Manager Initialisation for TSAR2 * hal_vmm.c - Virtual Memory Manager Initialisation for TSAR 3 3 * 4 4 * Authors Alain Greiner (2016,2017) … … 38 38 // identity mapped. The following function is called by the generic vmm_init() function 39 39 // 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. 40 42 ////////////////////////////////////////////////////////////////////////////////////////// 41 43 … … 44 46 { 45 47 error_t error; 46 47 // get pointer on GPT48 gpt_t * gpt = &vmm->gpt;49 48 50 49 // map all pages of "kentry" vseg … … 55 54 vpn < (CONFIG_VMM_KENTRY_BASE + CONFIG_VMM_KENTRY_SIZE); vpn++ ) 56 55 { 57 error = hal_gpt_set_pte( gpt,56 error = hal_gpt_set_pte( XPTR( local_cxy , &vmm->gpt ), 58 57 vpn, 59 58 attr, … … 62 61 if( error ) return error; 63 62 } 64 65 // get extended pointer on lock protecting the VSL66 xptr_t lock_xp = XPTR( local_cxy , &vmm->vsegs_lock );67 68 // get VSL lock69 remote_rwlock_wr_acquire( lock_xp );70 63 71 64 // scan the VSL to found the "kentry" vseg … … 90 83 } 91 84 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; 96 86 97 87 return 0;
Note: See TracChangeset
for help on using the changeset viewer.