Changes between Version 3 and Version 4 of common_utils


Ignore:
Timestamp:
Aug 12, 2014, 1:14:40 PM (10 years ago)
Author:
alain
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • common_utils

    v3 v4  
    1212
    1313 === unsigned int _get_sched( void ) ===
    14 Returns the virtual address of the scheduler stored in the SCHED register for the processor running the calling task.
     14Returns the virtual address of the scheduler, stored in the CP0_SCHED register, for the processor running the calling task.
    1515
    1616 === unsigned int _get_epc( void ) ===
    17 Returns the value stored in the EPC register for the processor running the calling task. 
     17Returns the value stored in the CP0_EPC register, for the processor running the calling task. 
    1818
    1919 === unsigned int _get_cr( void ) ===
    20 Returns the value stored in the CR register for the processor running the calling task.
     20Returns the value stored in the CP0_CR register, for the processor running the calling task.
    2121
    2222 === unsigned int _get_sr( void ) ===
    23 Returns the value stored in the SR register for the processor running the calling task.
     23Returns the value stored in the CP0_SR register, for the processor running the calling task.
    2424
    2525 === unsigned int _get_bvar( void ) ===
    26 Returns the value stored in the BVAR register, for the processor running the calling task.
     26Returns the value stored in the CP0_BVAR register, for the processor running the calling task.
    2727
    2828 === unsigned int _get_procid( void ) ===
    29 Returns the global processor identifier stored in the EBASE register for the processor running the calling task.
     29Returns the global processor identifier stored in the CP0_PROCID register for the processor running the calling task.
     30
     31 === unsigned int _get_protime( void ) ===
     32Returns the cycle count stored in the CP0_TIME register for the processor running the calling task.
    3033
    3134 === void _set_sched( unsigned int value ) ===
    32 Writes ''value'' in the SCHED register, for the processor running the calling task.
     35Writes ''value'' in the CP0_SCHED register, for the processor running the calling task.
    3336
    3437 === void _set_sr( unsigned int value ) ===
    35 Writes ''value'' in the SR register, for the processor running the calling task.
     38Writes ''value'' in the CP0_SR register, for the processor running the calling task.
    3639
    3740 === 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''.
     41Disables interrupts for the processor running the calling task and save the CP0_SR value at address ''save_sr_ptr''.
    3942
    4043 === 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.
     44Writes the value pointed by ''save_sr_ptr'' into the CP0_SR register, for the processor running the calling task.
    4245
     46 == __2) CP2 registers access functions__ ==
    4347
     48 === unsigned int _get_mmu_ptpr( void ) ===
     49Returns the value stored in the CP2_PTPR register, for the processor running the calling task.
    4450
    45  These functions can be used to access the MIPS32 protected registers
     51 === unsigned int _get_mmu_mode( void ) ===
     52Returns the value stored in the CP2_MODE register, for the processor running the calling task.
    4653
    47  == __2) Physical addressing functions__ ==
     54 === void _set_mmu_ptpr( unsigned int value ) ===
     55Writes ''value'' in the CP2_PTPR register, for the processor running the calling task.
    4856
    49  ===
     57 === void _set_mmu_mode( unsigned int value ) ===
     58Writes ''value'' in the CP2_MODE register, for the processor running the calling task.
    5059
    51  === Miscelaneous functions ===
     60 == __3) Physical addressing functions__ ==
     61
     62 === unsigned int _physical_read( unsigned long long paddr ) ===
     63Returns the 32 bits word stored at physical address ''paddr'', after a temporary DTLB deactivation.
     64It uses the CP2_PADDR_EXT register.
     65
     66 === void _physical_write( unsigned long long paddr, unsigned int value )
     67Writes the 32 bits word ''value'' at physical address ''paddr'', after a temporary DTLB deactivation.
     68It uses the CP2_PADDR_EXT register.
     69
     70 === unsigned long long _physical_read_ull( unsigned long long paddr ) ===
     71Returns the 64 bits word stored at physical address ''paddr'', after a temporary DTLB deactivation.
     72It uses the CP2_PADDR_EXT register.
     73
     74 === void _physical_write_ull( unsigned long long paddr, unsigned long long value ) ===
     75Writes the 64 bits word ''value'' at physical address ''paddr'', after a temporary DTLB deactivation.
     76It uses the CP2_PADDR_EXT register.
     77
     78 === void _physical_memcpy( unsigned long long dst_paddr, unsigned long long src paddr, unsigned int size ) ===
     79This 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 ) ===
     82This function is used by the GIET-VM drivers to read a 32 bits word in a peripheral register.
     83If 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 ) ===
     86This function is used by the GIET-VM drivers to write a 32 bits word in a peripheral register.
     87If 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__ ==