| | 1 | = GIET-VM / CP2 registers access functions = |
| | 2 | |
| | 3 | [[PageOutline]] |
| | 4 | |
| | 5 | The [source:soft/giet_vm/giet_common/utils.c utils.c] and [source:soft/giet_vm/giet_common/utils.h util.h] files define the functions used to access the CP2 registers (Memory Management Unit registers). |
| | 6 | |
| | 7 | They are prefixed by "_" to remind that they can only be executed by a processor in kernel mode. |
| | 8 | |
| | 9 | === unsigned int _get_mmu_ptpr( void ) === |
| | 10 | Returns the value stored in the CP2_PTPR register, for the processor running the calling task. |
| | 11 | |
| | 12 | === unsigned int _get_mmu_mode( void ) === |
| | 13 | Returns the value stored in the CP2_MODE register, for the processor running the calling task. |
| | 14 | |
| | 15 | === void _set_mmu_ptpr( unsigned int value ) === |
| | 16 | Writes ''value'' in the CP2_PTPR register, for the processor running the calling task. |
| | 17 | |
| | 18 | === void _set_mmu_mode( unsigned int value ) === |
| | 19 | Writes ''value'' in the CP2_MODE register, for the processor running the calling task. |