diff options
author | red031000 <rubenru09@aol.com> | 2020-05-24 18:12:56 +0100 |
---|---|---|
committer | red031000 <rubenru09@aol.com> | 2020-05-24 18:12:56 +0100 |
commit | 0dfb0011dd9d7e485ecbc8727f71d2f82b946930 (patch) | |
tree | a0b28649e7d09fe25726e54e144ed9644c27efa7 /arm9/lib/src/OS_protectionUnit.c | |
parent | 1856ec317f9952f1c379aa5c20488832e98417f0 (diff) |
OS_protectionUnit.c
Diffstat (limited to 'arm9/lib/src/OS_protectionUnit.c')
-rw-r--r-- | arm9/lib/src/OS_protectionUnit.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/arm9/lib/src/OS_protectionUnit.c b/arm9/lib/src/OS_protectionUnit.c new file mode 100644 index 00000000..be57dcd6 --- /dev/null +++ b/arm9/lib/src/OS_protectionUnit.c @@ -0,0 +1,21 @@ +// +// Created by red031000 on 2020-05-24. +// + +#include "function_target.h" + +ARM_FUNC asm void OS_EnableProtectionUnit(void) +{ + mrc p15, 0x0, r0, c1, c0, 0x0 + orr r0, r0, #0x1 + mcr p15, 0x0, r0, c1, c0, 0x0 + bx lr +} + +ARM_FUNC asm void OS_DisableProtectionUnit(void) +{ + mrc p15, 0x0, r0, c1, c0, 0x0 + bic r0, r0, #0x1 + mcr p15, 0x0, r0, c1, c0, 0x0 + bx lr +} |