Changeset 760 for soft/giet_vm/giet_kernel/kernel_init.c
- Timestamp:
- Jan 19, 2016, 11:23:02 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
soft/giet_vm/giet_kernel/kernel_init.c
r742 r760 95 95 //////////////////////////////////////////////////////////////////////////////// 96 96 97 // array of page tables virtual addresses 98 __attribute__((section(".kdata"))) 99 volatile unsigned int _ptabs_vaddr[GIET_NB_VSPACE_MAX][X_SIZE][Y_SIZE]; 100 101 // array of page tables PTPR values (physical addresses >> 13) 102 __attribute__((section(".kdata"))) 103 volatile unsigned int _ptabs_ptprs[GIET_NB_VSPACE_MAX][X_SIZE][Y_SIZE]; 97 // Array of page tables virtual addresses (one per vspace and per cluster) 98 __attribute__((section(".kdata"))) 99 unsigned int _ptabs_vaddr[GIET_NB_VSPACE_MAX][X_SIZE][Y_SIZE]; 100 101 // Array of page tables physical addresses (one per vspace and per cluster) 102 __attribute__((section(".kdata"))) 103 unsigned long long _ptabs_paddr[GIET_NB_VSPACE_MAX][X_SIZE][Y_SIZE]; 104 105 // Array of pt2 allocators (one per vspace and per cluster) 106 __attribute__((section(".kdata"))) 107 unsigned int _ptabs_next_pt2[GIET_NB_VSPACE_MAX][X_SIZE][Y_SIZE]; 108 109 // Page tables max_pt2 (same value for all page tables) 110 __attribute__((section(".kdata"))) 111 unsigned int _ptabs_max_pt2; 104 112 105 113 // Array of pointers on the schedulers … … 122 130 __attribute__((section(".kdata"))) 123 131 sqt_barrier_t _all_procs_barrier __attribute__((aligned(64))); 132 133 // required for concurrent PTAB building 134 __attribute__((section(".kdata"))) 135 spin_lock_t _ptabs_spin_lock[GIET_NB_VSPACE_MAX][X_SIZE][Y_SIZE]; 136 124 137 125 138 //////////////////////////////////////////////////////////////////////////////// … … 191 204 #endif 192 205 206 ////// get max_pt2 value stored in mapping header 207 mapping_header_t* header = (mapping_header_t*)SEG_BOOT_MAPPING_BASE; 208 _ptabs_max_pt2 = header->max_pt2; 209 193 210 ////// TTY fifos initialisation 194 211 unsigned int tty_id; … … 277 294 // step 2 : each processor that is allocated at least one thread loops 278 295 // on its allocated threads: 279 // - contributes to _ptabs_vaddr & _ptabs_p tprsarrays296 // - contributes to _ptabs_vaddr & _ptabs_paddr arrays 280 297 // initialisation, from values stored in the threads contexts. 281 298 // - set CTX_RA slot with the kernel _ctx_eret() virtual address. … … 292 309 unsigned int ptab = _get_thread_slot( x, y, p, ltid , CTX_PTAB_ID ); 293 310 unsigned int ptpr = _get_thread_slot( x, y, p, ltid , CTX_PTPR_ID ); 311 unsigned int npt2 = _get_thread_slot( x, y, p, ltid , CTX_NPT2_ID ); 294 312 295 313 // initialize PTABS arrays 296 _ptabs_vaddr[vsid][x][y] = ptab; 297 _ptabs_ptprs[vsid][x][y] = ptpr; 314 _ptabs_vaddr[vsid][x][y] = ptab; 315 _ptabs_paddr[vsid][x][y] = ((unsigned long long)ptpr) << 13; 316 _ptabs_next_pt2[vsid][x][y] = npt2; 298 317 299 318 // set the PTPR to use the local page table … … 319 338 " - ctx_ra = %x\n", 320 339 x , y , p , ltid , 321 vsid , x , y , ptab,322 vsid , x , y , ((unsigned long long)ptpr)<<13,340 vsid , x , y , _ptabs_vaddr[vsid][x][y] , 341 vsid , x , y , _ptabs_paddr[vsid][x][y] , 323 342 ctx_entry, ctx_ra ); 324 343 #endif
Note: See TracChangeset
for help on using the changeset viewer.