summaryrefslogtreecommitdiff
path: root/arm9/lib/NitroSDK/src/OS_protectionUnit.c
blob: 66811a1e681522fe0203f051085400e605a20028 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#include "function_target.h"
#include "OS_protectionUnit.h"

ARM_FUNC asm void OS_EnableProtectionUnit(void)
{
    mrc p15, 0x0, r0, c1, c0, 0x0 //Control Register
    orr r0, r0, #0x1
    mcr p15, 0x0, r0, c1, c0, 0x0 //Control Register
    bx lr
}

ARM_FUNC asm void OS_DisableProtectionUnit(void)
{
    mrc p15, 0x0, r0, c1, c0, 0x0 //Control Register
    bic r0, r0, #0x1
    mcr p15, 0x0, r0, c1, c0, 0x0 //Control Register
    bx lr
}