diff options
author | red031000 <rubenru09@aol.com> | 2020-05-01 17:54:04 +0100 |
---|---|---|
committer | red031000 <rubenru09@aol.com> | 2020-05-01 17:54:04 +0100 |
commit | f04501a417999dddd7ec5963b90ab2e152ac3477 (patch) | |
tree | e4cff97cd3b2b43238e60de733286aa98caaef4c /arm9/lib/src/OS_protectionRegion.c | |
parent | 10b569f131fc58959d7c50dd4b07f01a52b5e162 (diff) |
match OS_protectionRegion
Diffstat (limited to 'arm9/lib/src/OS_protectionRegion.c')
-rw-r--r-- | arm9/lib/src/OS_protectionRegion.c | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/arm9/lib/src/OS_protectionRegion.c b/arm9/lib/src/OS_protectionRegion.c new file mode 100644 index 00000000..382310d9 --- /dev/null +++ b/arm9/lib/src/OS_protectionRegion.c @@ -0,0 +1,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 +}
\ No newline at end of file |