diff options
author | Revo <projectrevotpp@hotmail.com> | 2021-07-22 20:46:10 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-22 20:46:10 -0400 |
commit | b5b9e57dcb55ee1a69ca86c30e90475bb80e3c28 (patch) | |
tree | 2e91e60bdb7a9174b16d8ca1b532809d4ae2e5b6 /arm9/lib/include/OS_protectionRegion.h | |
parent | c2d91a2d997afd01fa4f40e1e16d5ee85557c9a8 (diff) | |
parent | 5bf13c7f48fe91c7902ce50250bc1a5a2398a2ae (diff) |
Merge pull request #435 from red031000/master
separate out libs to libc, libnns and NitroSDK
Diffstat (limited to 'arm9/lib/include/OS_protectionRegion.h')
-rw-r--r-- | arm9/lib/include/OS_protectionRegion.h | 48 |
1 files changed, 0 insertions, 48 deletions
diff --git a/arm9/lib/include/OS_protectionRegion.h b/arm9/lib/include/OS_protectionRegion.h deleted file mode 100644 index 00b7ae63..00000000 --- a/arm9/lib/include/OS_protectionRegion.h +++ /dev/null @@ -1,48 +0,0 @@ -#ifndef POKEDIAMOND_OS_PROTECTIONREGION_H -#define POKEDIAMOND_OS_PROTECTIONREGION_H - -#include "nitro/types.h" -#include "consts.h" - -void OS_SetDPermissionsForProtectionRegion(register u32 setMask, register u32 flags); -void OS_SetProtectionRegion1(u32 param); -void OS_SetProtectionRegion2(u32 param); - -typedef enum -{ - OSi_PR_BASE_MASK_4KB = 0xfffff000, - OSi_PR_BASE_MASK_8KB = 0xffffe000, - OSi_PR_BASE_MASK_16KB = 0xffffc000, - OSi_PR_BASE_MASK_32KB = 0xffff8000, - OSi_PR_BASE_MASK_64KB = 0xffff0000, - OSi_PR_BASE_MASK_128KB = 0xfffe0000, - OSi_PR_BASE_MASK_256KB = 0xfffc0000, - OSi_PR_BASE_MASK_512KB = 0xfff80000, - OSi_PR_BASE_MASK_1MB = 0xfff00000, - OSi_PR_BASE_MASK_2MB = 0xffe00000, - OSi_PR_BASE_MASK_4MB = 0xffc00000, - OSi_PR_BASE_MASK_8MB = 0xff800000, - OSi_PR_BASE_MASK_16MB = 0xff000000, - OSi_PR_BASE_MASK_32MB = 0xfe000000, - OSi_PR_BASE_MASK_64MB = 0xfc000000, - OSi_PR_BASE_MASK_128MB = 0xf8000000, - OSi_PR_BASE_MASK_256MB = 0xf0000000, - OSi_PR_BASE_MASK_512MB = 0xe0000000, - OSi_PR_BASE_MASK_1GB = 0xc0000000, - OSi_PR_BASE_MASK_2GB = 0x80000000, - OSi_PR_BASE_MASK_4GB = 0x00000000 -} OSiProtectionRegionBaseMask; - -static inline u32 OSi_CalcPRParam(u32 address, u32 size, OSiProtectionRegionBaseMask mask) { - return ((address & mask) | size); -} - -#define OS_SetProtectionRegion(regionNo, address, sizeStr) \ - OS_SetProtectionRegion##regionNo(OSi_CalcPRParam(address, HW_C6_PR_##sizeStr, OSi_PR_BASE_MASK_##sizeStr) \ - | 1) - -#define OS_PR3_ACCESS_MASK (HW_C5_PERMIT_MASK << HW_C5_PR3_SFT) -#define OS_PR3_ACCESS_RW (HW_C5_PERMIT_RW << HW_C5_PR3_SFT) -#define OS_PR3_ACCESS_RO (HW_C5_PERMIT_RO << HW_C5_PR3_SFT) - -#endif //POKEDIAMOND_OS_PROTECTIONREGION_H |