diff options
author | PikalaxALT <pikalaxalt@gmail.com> | 2021-07-25 13:23:02 -0400 |
---|---|---|
committer | PikalaxALT <pikalaxalt@gmail.com> | 2021-07-25 13:23:02 -0400 |
commit | 5e0e326b75402a36c4d31502b8b5a05b862ac23c (patch) | |
tree | 1b5807c1efb72dbdd9d01f329cefb41171913a64 /arm9/lib/NitroSDK/src/OS_protectionUnit.c | |
parent | 1f9d4503c898f9138422215132b53224571a281a (diff) | |
parent | 68d7aa47cc52ef822220e0e35890863d7cad479f (diff) |
Merge remote-tracking branch 'origin/master' into pikalax_work
Diffstat (limited to 'arm9/lib/NitroSDK/src/OS_protectionUnit.c')
-rw-r--r-- | arm9/lib/NitroSDK/src/OS_protectionUnit.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/arm9/lib/NitroSDK/src/OS_protectionUnit.c b/arm9/lib/NitroSDK/src/OS_protectionUnit.c new file mode 100644 index 00000000..66811a1e --- /dev/null +++ b/arm9/lib/NitroSDK/src/OS_protectionUnit.c @@ -0,0 +1,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 +} |