- Timestamp:
- Jun 3, 2013, 5:28:47 PM (11 years ago)
- Location:
- soft/giet_vm
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
soft/giet_vm/boot/boot_init.c
r238 r240 1521 1521 boot_get_sched_vaddr( cluster_id, &sched_vbase, &sched_length ); 1522 1522 1523 // each processor scheduler requires 1Kbytes1524 if ( sched_length < (nprocs<<1 0) )1523 // each processor scheduler requires 4 Kbytes 1524 if ( sched_length < (nprocs<<12) ) 1525 1525 { 1526 1526 boot_puts("\n[BOOT ERROR] Schedulers segment too small in cluster "); … … 1536 1536 // set the schedulers pointers array 1537 1537 boot_schedulers[cluster_id * NB_PROCS_MAX + lpid] = 1538 (static_scheduler_t*)( sched_vbase + (lpid<<1 0) );1538 (static_scheduler_t*)( sched_vbase + (lpid<<12) ); 1539 1539 1540 1540 #if BOOT_DEBUG_SCHED … … 1542 1542 boot_putd(lpid); 1543 1543 boot_puts(" : scheduler virtual base address = "); 1544 boot_putx( sched_vbase + (lpid<<1 0) );1544 boot_putx( sched_vbase + (lpid<<12) ); 1545 1545 boot_puts("\n"); 1546 1546 #endif 1547 1547 // current processor scheduler pointer : psched 1548 static_scheduler_t* psched = (static_scheduler_t*)(sched_vbase+(lpid<<1 0));1548 static_scheduler_t* psched = (static_scheduler_t*)(sched_vbase+(lpid<<12)); 1549 1549 1550 1550 // initialise the "tasks" variable -
soft/giet_vm/boot/reset.S
r238 r240 183 183 184 184 # all processors initialise the CP0 SCHED register 185 # SCHED contains the scheduler s arrayvirtual base address185 # SCHED contains the scheduler virtual base address 186 186 mfc0 k0, CP0_PROCID 187 187 andi k0, k0, 0xFFF -
soft/giet_vm/giet_config.h
r238 r240 15 15 /* Debug parameters */ 16 16 17 #define BOOT_DEBUG_PERI 1/* trace peripherals initialisation */18 #define BOOT_DEBUG_PT 1/* trace page tables initialisation */19 #define BOOT_DEBUG_VOBJS 1/* trace vobjs initialisation */20 #define BOOT_DEBUG_SCHED 1/* trace schedulers initialisation */17 #define BOOT_DEBUG_PERI 0 /* trace peripherals initialisation */ 18 #define BOOT_DEBUG_PT 0 /* trace page tables initialisation */ 19 #define BOOT_DEBUG_VOBJS 0 /* trace vobjs initialisation */ 20 #define BOOT_DEBUG_SCHED 0 /* trace schedulers initialisation */ 21 21 22 22 #define GIET_DEBUG_INIT 0 /* trace parallel kernel initialisation */ -
soft/giet_vm/sys/common.c
r238 r240 26 26 // _get_sched() 27 27 // Access CP0 and returns a pointer (virtual address) on the calling 28 // processor scheduler (taking into account the processor local index).28 // processor scheduler. 29 29 /////////////////////////////////////////////////////////////////////////////////// 30 30 static_scheduler_t* _get_sched() 31 31 { 32 static_scheduler_t* psched; 33 unsigned int vaddr; 34 unsigned int lpid = _procid() % NB_PROCS_MAX; 35 32 unsigned int vaddr; 36 33 asm volatile( 37 34 "mfc0 %0, $22 \n" 38 35 : "=r"(vaddr) ); 39 40 psched = (static_scheduler_t*)vaddr; 41 return (psched + lpid); 36 return (static_scheduler_t*)vaddr; 42 37 } 43 38
Note: See TracChangeset
for help on using the changeset viewer.