-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathsvchax.h
47 lines (39 loc) · 1.24 KB
/
svchax.h
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#ifndef __SVCHAX_H__
#define _SVCHAX_H__
/*
* for 3DSX builds, svchax_init expects that:
*
* - gfxInit was already called.
* - new 3DS higher clockrate and L2 cache are disabled.
* - there is at least 64 KBytes (16 pages) of unallocated linear memory.
* ( the current 3dsx loaders and ctrulib's default allocator will keep 1MB
* of unallocated linear memory, so this is only relevant when using
* a custom allocator)
*
*
* svchax_init will grant full svc access to the calling thread and process
* up to system version 10.7 (kernel version 2.50-11), by using:
* - memchunkhax1 for kernel version <= 2.46-0
* - memchunkhax2 for 2.46-0 < kernel version <= 2.50-11
*
* access to privileged services can also be obtained by calling
* svchax_init with patch_srv set to true.
*
* __ctr_svchax and __ctr_svchax_srv will reflect the current
* status of the privileged access for svc calls and services respectively.
*
* svchax assumes that CIA builds already have access to svcBackdoor
* and will skip running memchunkhax there.
*
*/
#include <3ds/types.h>
#ifdef __cplusplus
extern "C" {
#endif
Result svchax_init(bool patch_srv);
extern u32 __ctr_svchax;
extern u32 __ctr_svchax_srv;
#ifdef __cplusplus
}
#endif
#endif //_SVCHAX_H__