summaryrefslogtreecommitdiff
path: root/arm9/lib/src/OS_protectionRegion.c
blob: 230f8403f2209fcefd6ae69f8fdda30b9702b82a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
//
// Created by red031000 on 2020-04-24.
//

#include "OS_protectionRegion.h"

asm void OS_SetDPermissionsForProtectionRegion(register u32 setMask, register u32 flags)
{
    mrc p15, 0x0, r2, c5, c0, 0x2
    bic r2, r2, r0
    orr r2, r2, r1
    mcr p15, 0x0, r2, c5, c0, 0x2
    bx lr
}

asm void OS_SetProtectionRegion1(u32 param)
{
    mcr p15, 0x0, r0, c6, c1, 0x0
    bx lr
}

asm void OS_SetProtectionRegion2(u32 param)
{
    mcr p15, 0x0, r0, c6, c2, 0x0
    bx lr
}