Changes between Version 3 and Version 4 of common_utils
- Timestamp:
- Aug 12, 2014, 1:14:40 PM (10 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
common_utils
v3 v4 12 12 13 13 === unsigned int _get_sched( void ) === 14 Returns the virtual address of the scheduler stored in the SCHED registerfor the processor running the calling task.14 Returns the virtual address of the scheduler, stored in the CP0_SCHED register, for the processor running the calling task. 15 15 16 16 === unsigned int _get_epc( void ) === 17 Returns the value stored in the EPC registerfor the processor running the calling task.17 Returns the value stored in the CP0_EPC register, for the processor running the calling task. 18 18 19 19 === unsigned int _get_cr( void ) === 20 Returns the value stored in the C R registerfor the processor running the calling task.20 Returns the value stored in the CP0_CR register, for the processor running the calling task. 21 21 22 22 === unsigned int _get_sr( void ) === 23 Returns the value stored in the SR registerfor the processor running the calling task.23 Returns the value stored in the CP0_SR register, for the processor running the calling task. 24 24 25 25 === unsigned int _get_bvar( void ) === 26 Returns the value stored in the BVAR register, for the processor running the calling task.26 Returns the value stored in the CP0_BVAR register, for the processor running the calling task. 27 27 28 28 === unsigned int _get_procid( void ) === 29 Returns the global processor identifier stored in the EBASE register for the processor running the calling task. 29 Returns the global processor identifier stored in the CP0_PROCID register for the processor running the calling task. 30 31 === unsigned int _get_protime( void ) === 32 Returns the cycle count stored in the CP0_TIME register for the processor running the calling task. 30 33 31 34 === void _set_sched( unsigned int value ) === 32 Writes ''value'' in the SCHED register, for the processor running the calling task.35 Writes ''value'' in the CP0_SCHED register, for the processor running the calling task. 33 36 34 37 === void _set_sr( unsigned int value ) === 35 Writes ''value'' in the SR register, for the processor running the calling task.38 Writes ''value'' in the CP0_SR register, for the processor running the calling task. 36 39 37 40 === void _it_disable( unsigned int* save_sr_ptr ) === 38 Disables interrupts for the processor running the calling task and save the SR value at address ''save_sr_ptr''.41 Disables interrupts for the processor running the calling task and save the CP0_SR value at address ''save_sr_ptr''. 39 42 40 43 === void _it_restore( unsigned int* save_sr_ptr ) === 41 Writes the value pointed by ''save_sr_ptr'' into the SR register, for the processor running the calling task.44 Writes the value pointed by ''save_sr_ptr'' into the CP0_SR register, for the processor running the calling task. 42 45 46 == __2) CP2 registers access functions__ == 43 47 48 === unsigned int _get_mmu_ptpr( void ) === 49 Returns the value stored in the CP2_PTPR register, for the processor running the calling task. 44 50 45 These functions can be used to access the MIPS32 protected registers 51 === unsigned int _get_mmu_mode( void ) === 52 Returns the value stored in the CP2_MODE register, for the processor running the calling task. 46 53 47 == __2) Physical addressing functions__ == 54 === void _set_mmu_ptpr( unsigned int value ) === 55 Writes ''value'' in the CP2_PTPR register, for the processor running the calling task. 48 56 49 === 57 === void _set_mmu_mode( unsigned int value ) === 58 Writes ''value'' in the CP2_MODE register, for the processor running the calling task. 50 59 51 === Miscelaneous functions === 60 == __3) Physical addressing functions__ == 61 62 === unsigned int _physical_read( unsigned long long paddr ) === 63 Returns the 32 bits word stored at physical address ''paddr'', after a temporary DTLB deactivation. 64 It uses the CP2_PADDR_EXT register. 65 66 === void _physical_write( unsigned long long paddr, unsigned int value ) 67 Writes the 32 bits word ''value'' at physical address ''paddr'', after a temporary DTLB deactivation. 68 It uses the CP2_PADDR_EXT register. 69 70 === unsigned long long _physical_read_ull( unsigned long long paddr ) === 71 Returns the 64 bits word stored at physical address ''paddr'', after a temporary DTLB deactivation. 72 It uses the CP2_PADDR_EXT register. 73 74 === void _physical_write_ull( unsigned long long paddr, unsigned long long value ) === 75 Writes the 64 bits word ''value'' at physical address ''paddr'', after a temporary DTLB deactivation. 76 It uses the CP2_PADDR_EXT register. 77 78 === void _physical_memcpy( unsigned long long dst_paddr, unsigned long long src paddr, unsigned int size ) === 79 This function makes a memcpy from a source buffer to a destination buffer, using physical addresses, after a temporary DTLB de-activation. The ''src_paddr'', ''dst_paddr'' and ''size'' arguments must be multiple of 4 bytes. 80 81 === unsigned int _io_extended_read( unsigned int* vaddr ) === 82 This function is used by the GIET-VM drivers to read a 32 bits word in a peripheral register. 83 If the MMU is not activated, the virtual address is extended using X_IO and Y_IO (defined in the hard-config.h file) to reach the cluster_io. 84 85 === void _io_extended_write( unsigned int* vaddr, unsigned int value ) === 86 This function is used by the GIET-VM drivers to write a 32 bits word in a peripheral register. 87 If the MMU is not activated, the virtual address is extended using X_IO and Y_IO (defined in the hard-config.h file) to reach the cluster_io. 88 89 == __X) Miscelaneous functions__ ==