wut  v1.7.0
Wii U Toolchain
codegen.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <wut.h>
4 
29 #ifdef __cplusplus
30 extern "C" {
31 #endif
32 
34 typedef enum OSCodegenSecMode
35 {
41 
56 void
57 OSGetCodegenVirtAddrRange(void **outVirtualAddress,
58  uint32_t *outSize);
59 
71 uint32_t
73 
74 uint32_t
76 
88 BOOL
90 
91 //TODO: online docs imply this returns true if codegen is *enabled*, though the
92 //name would imply it gets rw/rx status.
93 uint32_t
95 
122 BOOL
123 OSCodegenCopy(void *dst,
124  void *src,
125  size_t size);
126 
127 #ifdef __cplusplus
128 }
129 #endif
130 
BOOL OSCodegenCopy(void *dst, void *src, size_t size)
Copies data from normal memory into the codegen area, leaving the area in CODEGEN_R_X mode.
uint32_t OSGetSecCodeGenMode()
BOOL OSSwitchSecCodeGenMode(OSCodegenSecMode mode)
Switches the permissions on the codegen memory area.
OSCodegenSecMode
The memory permissions for the codegen area.
Definition: codegen.h:35
void OSGetCodegenVirtAddrRange(void **outVirtualAddress, uint32_t *outSize)
Gets the location and size of codegen memory, if available.
uint32_t OSGetCodegenCore()
Gets the CPU core that's allowed to use codegen.
uint32_t OSGetCodegenMode()
@ CODEGEN_RW_
The area can be read or written to, but not executed.
Definition: codegen.h:37
@ CODEGEN_R_X
The area can be read or executed, but not written to.
Definition: codegen.h:39
int32_t BOOL
Definition: wut_types.h:7