wiki:kernel_cp2

Version 1 (modified by alain, 10 years ago) (diff)

--

GIET-VM / CP2 registers access functions

The utils.c and util.h files define the functions used to access the CP2 registers (Memory Management Unit registers).

They are prefixed by "_" to remind that they can only be executed by a processor in kernel mode.

unsigned int _get_mmu_ptpr( void )

Returns the value stored in the CP2_PTPR register, for the processor running the calling task.

unsigned int _get_mmu_mode( void )

Returns the value stored in the CP2_MODE register, for the processor running the calling task.

void _set_mmu_ptpr( unsigned int value )

Writes value in the CP2_PTPR register, for the processor running the calling task.

void _set_mmu_mode( unsigned int value )

Writes value in the CP2_MODE register, for the processor running the calling task.