Changeset 623 for trunk/kernel/mm/vseg.c
- Timestamp:
- Mar 6, 2019, 4:37:15 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/kernel/mm/vseg.c
r595 r623 4 4 * Authors Ghassan Almaless (2008,2009,2010,2011, 2012) 5 5 * Mohamed Lamine Karaoui (2015) 6 * Alain Greiner (2016,201 8,2019)6 * Alain Greiner (2016,2017,2018,2019) 7 7 * 8 8 * Copyright (c) UPMC Sorbonne Universites … … 55 55 else if( vseg_type == VSEG_TYPE_FILE ) return "FILE"; 56 56 else if( vseg_type == VSEG_TYPE_REMOTE ) return "REMO"; 57 else if( vseg_type == VSEG_TYPE_KCODE ) return "KCOD"; 58 else if( vseg_type == VSEG_TYPE_KDATA ) return "KDAT"; 59 else if( vseg_type == VSEG_TYPE_KDEV ) return "KDEV"; 57 60 else return "undefined"; 58 61 } … … 142 145 VSEG_CACHE ; 143 146 } 147 else if( type == VSEG_TYPE_KCODE ) 148 { 149 vseg->flags = VSEG_EXEC | 150 VSEG_CACHE | 151 VSEG_PRIVATE ; 152 } 153 else if( type == VSEG_TYPE_KDATA ) 154 { 155 vseg->flags = VSEG_CACHE | 156 VSEG_WRITE ; 157 } 158 else if( type == VSEG_TYPE_KDEV ) 159 { 160 vseg->flags = VSEG_WRITE ; 161 } 144 162 else 145 163 { … … 158 176 159 177 // initialize vseg with remote_read access 160 vseg->type = hal_remote_l32 178 vseg->type = hal_remote_l32( XPTR( cxy , &ptr->type ) ); 161 179 vseg->min = (intptr_t)hal_remote_lpt( XPTR( cxy , &ptr->min ) ); 162 180 vseg->max = (intptr_t)hal_remote_lpt( XPTR( cxy , &ptr->max ) ); 163 vseg->vpn_base = hal_remote_l32 164 vseg->vpn_size = hal_remote_l32 165 vseg->flags = hal_remote_l32 166 vseg->file_offset = hal_remote_l32 167 vseg->file_size = hal_remote_l32 181 vseg->vpn_base = hal_remote_l32( XPTR( cxy , &ptr->vpn_base ) ); 182 vseg->vpn_size = hal_remote_l32( XPTR( cxy , &ptr->vpn_size ) ); 183 vseg->flags = hal_remote_l32( XPTR( cxy , &ptr->flags ) ); 184 vseg->file_offset = hal_remote_l32( XPTR( cxy , &ptr->file_offset ) ); 185 vseg->file_size = hal_remote_l32( XPTR( cxy , &ptr->file_size ) ); 168 186 vseg->mapper_xp = (xptr_t) hal_remote_l64( XPTR( cxy , &ptr->mapper_xp ) ); 169 187 170 188 switch (vseg->type) 171 189 { 172 case VSEG_TYPE_DATA: 190 case VSEG_TYPE_DATA: // unused 173 191 { 174 192 vseg->cxy = 0xffff; 175 193 break; 176 194 } 177 case VSEG_TYPE_CODE: 195 case VSEG_TYPE_CODE: // always local 178 196 case VSEG_TYPE_STACK: 197 case VSEG_TYPE_KCODE: 179 198 { 180 199 vseg->cxy = local_cxy; 181 200 break; 182 201 } 183 case VSEG_TYPE_ANON: 202 case VSEG_TYPE_ANON: // intrinsic 184 203 case VSEG_TYPE_FILE: 185 204 case VSEG_TYPE_REMOTE: 205 case VSEG_TYPE_KDEV: 206 case VSEG_TYPE_KDATA: 186 207 { 187 208 vseg->cxy = (cxy_t) hal_remote_l32( XPTR(cxy, &ptr->cxy) );
Note: See TracChangeset
for help on using the changeset viewer.