Changeset 314 for soft/giet_vm
- Timestamp:
- Apr 21, 2014, 5:48:29 AM (11 years ago)
- Location:
- soft/giet_vm
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
soft/giet_vm/Makefile
r304 r314 13 13 ### partition sectors = 524832 14 14 15 MAP_XML ?= mappings/tsar_leti_ 2_2_4_sort.xml15 MAP_XML ?= mappings/tsar_leti_4_4_4_transpose.xml 16 16 17 17 ### Objects to be linked for kernel.elf … … 153 153 mcopy -o -i $(DISK_IMAGE) build/gameoflife/gameoflife.elf ::/build/gameoflife 154 154 mcopy -o -i $(DISK_IMAGE) build/dhrystone/dhrystone.elf ::/build/dhrystone 155 mcopy -o -i $(DISK_IMAGE) transpose/images.raw ::/misc 155 156 mcopy -o -i $(DISK_IMAGE) map.bin ::/ 156 157 dd if=build/boot/boot.elf of=$(DISK_IMAGE) seek=2 conv=notrunc -
soft/giet_vm/giet_common/utils.c
r301 r314 374 374 375 375 /////////////////////////////////////////////////////////////////////////////////// 376 // This function is used by all drivers (_xxx_set_register() function)376 // This function is used by several drivers (_xxx_set_register() function) 377 377 // If the MMU is not activated, the virtual address is extended using 378 378 // X_IO and Y_IO to reach the cluster_io. … … 422 422 423 423 /////////////////////////////////////////////////////////////////////////////////// 424 // Takes a lock with an ll/sc atomic access. 425 // A pseudo random delay is introduced before retry in case of miss 426 // (delay average value = 100 cycles) 424 // Takes a lock with a blocking ll/sc atomic access. 425 // When the cache coherence is granted by the hardware, 426 // the first read is a standard (cacheable) lw, as the local copy 427 // can be polled when the lock is already taken by another task, reducing 428 // trafic on the interconnect. When the lock is released by the owner task, 429 // the local copy is updated or invalidated by the coherence protocol. 430 // If there is no hardware cache coherence a random delay is introduced 431 // betwween two successive retry. 427 432 /////////////////////////////////////////////////////////////////////////////////// 428 433 inline void _get_lock(unsigned int * plock) 429 434 { 435 #if NO_HARD_CC 436 430 437 register unsigned int delay = ( _get_proctime() ^ _get_procid() << 4) & 0xFF; 431 438 … … 451 458 :"r"(plock), "r"(delay) 452 459 :"$2", "$3", "$4"); 460 #else 461 462 asm volatile ( 463 "_lock_llsc: \n" 464 " lw $2, 0(%0) \n" /* dcache <= _ioc_lock current value */ 465 " bnez $2, _lock_llsc \n" /* retry if lock already taken */ 466 " nop \n" 467 " ll $2, 0(%0) \n" /* ll_buffer <= _ioc_lock current value */ 468 " bnez $2, _lock_llsc \n" /* retry if _ioc_lock already taken */ 469 " li $3, 1 \n" /* $3 <= argument for sc */ 470 " sc $3, 0(%0) \n" /* try to set _ioc_lock */ 471 " beqz $3, _lock_llsc \n" /* retry if sc failure */ 472 " nop \n" 473 : 474 :"r"(plock) 475 :"$2", "$3"); 476 #endif 477 478 // register unsigned int delay = ( _get_proctime() ^ _get_procid() << 4) & 0xFF; 479 480 // if (delay == 0) delay++; 481 482 // asm volatile ( 483 // "_lock_llsc: \n" 484 // "ll $2, 0(%0) \n" /* $2 <= _ioc_lock current value */ 485 // "bnez $2, _lock_delay \n" /* delay if _ioc_lock already taken */ 486 // "li $3, 1 \n" /* $3 <= argument for sc */ 487 // "sc $3, 0(%0) \n" /* try to set _ioc_lock */ 488 // "bnez $3, _lock_ok \n" /* exit if atomic */ 489 // "_lock_delay: \n" 490 // "move $4, %1 \n" /* $4 <= delay */ 491 // "_lock_loop: \n" 492 // "addi $4, $4, -1 \n" /* $4 <= $4 - 1 */ 493 // "bnez $4, _lock_loop \n" /* test end delay */ 494 // "nop \n" 495 // "j _lock_llsc \n" /* retry */ 496 // "nop \n"ache 497 // "_lock_ok: \n" 498 // : 499 // :"r"(plock), "r"(delay) 500 // :"$2", "$3", "$4"); 501 453 502 } 454 503 -
soft/giet_vm/giet_config.h
r303 r314 22 22 #define BOOT_DEBUG_ELF 0 /* trace .elf files loading */ 23 23 24 #define GIET_DEBUG_INIT 0 /* trace parallelkernel initialisation */24 #define GIET_DEBUG_INIT 0 /* trace kernel initialisation */ 25 25 #define GIET_DEBUG_FAT 0 /* trace fat accesses */ 26 26 #define GIET_DEBUG_SWITCH 0 /* trace context switchs */ 27 27 #define GIET_DEBUG_IRQS 0 /* trace interrupts */ 28 28 #define GIET_DEBUG_IOC_DRIVER 0 /* trace IOC accesses */ 29 #define GIET_DEBUG_BDV_DRIVER 0 /* trace BDV accesses */30 29 #define GIET_DEBUG_TTY_DRIVER 0 /* trace TTY accesses */ 31 30 #define GIET_DEBUG_DMA_DRIVER 0 /* trace DMA accesses */ -
soft/giet_vm/giet_fat32/fat32.c
r300 r314 1045 1045 #if GIET_DEBUG_FAT 1046 1046 _printf("\n[FAT DEBUG] Boot Sector Loaded\n"); 1047 display_fat_cache(); 1047 1048 #endif 1048 1049
Note: See TracChangeset
for help on using the changeset viewer.