Changes between Initial Version and Version 1 of kernel_cp0


Ignore:
Timestamp:
Oct 9, 2014, 10:28:13 AM (10 years ago)
Author:
alain
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • kernel_cp0

    v1 v1  
     1= GIET-VM / CP0 access functions =
     2
     3[[PageOutline]]
     4
     5The [source:soft/giet_vm/giet_common/utils.c utils.c] and [source:soft/giet_vm/giet_common/utils.h util.h] files define kernel functions that are used both by the boot-loader and by the kernel.
     6They are prefixed by ''_'' to remind that they can only be executed by a processor in kernel mode.
     7
     8 === unsigned int _get_sched( void ) ===
     9Returns the virtual address of the scheduler, stored in the CP0_SCHED register, for the processor running the calling task.
     10
     11 === unsigned int _get_epc( void ) ===
     12Returns the value stored in the CP0_EPC register, for the processor running the calling task. 
     13
     14 === unsigned int _get_cr( void ) ===
     15Returns the value stored in the CP0_CR register, for the processor running the calling task.
     16
     17 === unsigned int _get_sr( void ) ===
     18Returns the value stored in the CP0_SR register, for the processor running the calling task.
     19
     20 === unsigned int _get_bvar( void ) ===
     21Returns the value stored in the CP0_BVAR register, for the processor running the calling task.
     22
     23 === unsigned int _get_procid( void ) ===
     24Returns the global processor identifier stored in the CP0_PROCID register for the processor running the calling task.
     25
     26 === unsigned int _get_protime( void ) ===
     27Returns the cycle count stored in the CP0_TIME register for the processor running the calling task.
     28
     29 === void _set_sched( unsigned int value ) ===
     30Writes ''value'' in the CP0_SCHED register, for the processor running the calling task.
     31
     32 === void _set_sr( unsigned int value ) ===
     33Writes ''value'' in the CP0_SR register, for the processor running the calling task.
     34
     35 === void _it_disable( unsigned int* save_sr_ptr ) ===
     36Disables interrupts for the processor running the calling task and save the CP0_SR value at address ''save_sr_ptr''.
     37
     38 === void _it_restore( unsigned int* save_sr_ptr ) ===
     39Writes the value pointed by ''save_sr_ptr'' into the CP0_SR register, for the processor running the calling task.
     40
     41